http://stackoverflow.com/q/29382803
answer count: 1
accepted answer: http://stackoverflow.com/a/29383445
tagged with: mongoose
tagged with: javascript
tagged with: express
tagged with: asynchronous
favorite count: 0
upvote count: 1
has body: I have a exports module in Node.JS exports.doSomethingImportant= function(req, res) { var id = req.params.id; Demo.findOne({'_id': id}) .exec(function(err, demosReturned) { async.waterfall([ function(outerCallBack){ console.log("In the First Call Back"); firstOrderFunction(demosReturned,outerCallBack); }, function(x,outerCallBack){ var y =3 var z = x*y; console.log("In the Second Call Back"); outerCallBack(null,z); } ],function(err,z){ if(err){ console.log("Error is == " +err); }else{ console.log("The Returned Value is == "+z); } }); });//End Demo.findOne }; Now, my firstOrderfunction again has a async.each embedding async.waterfall function fistOrderFunction(demosReturned,outerCallBack){ console.log("Called the External Function"); async.each(demosReturned.locations, function(location, innerCallBack) { console.log('Computing Location #'); async.waterfall([ function(internalCallBack){ console.log("Computing Inner First Waterfall"); a = 14; innternalCallBack(null,a); }, function(a,internalCallBack){ console.log("Computing Inner Second Waterfall"); b =14; c = a*b; innternalBack(null,c) } ],function(err,c){ if(err){ console.log("Error is == " +err); }else{ d = c; console.log("The Returned Value is == "+c); innerCallBack(null,d); } });//End Async.Waterfall },function(err,d){ if(err){enter code here console.log("The Error in Async.Each === " + err); }else{ console.log("The Returned Value is Processed "); outerCallBack(null, d); } }); //End Async.Each } The Output I get is In the First Call Back Called the External Function Computing Location # Computing Location # Computing Inner First Waterfall Computing Inner First Waterfall The Returned Value is Processed In the Second Call Back The Returned Value is == NaN I want everything to be run synchronously in the following order. Call async.waterfall in exec call back of Demo.findone Call the firstOrderFunction Call async.each inside firstOrderFunction Call async.waterfall inside async.each Call the first callback function re…
has answer: http://stackoverflow.com/a/29383445
tagged with: node.js
type: AnsweredQuestion
score: 1
has title: How to call async.each in an external function having async.waterfall inside async.each
type: Question
downvote count: 0

http://stackoverflow.com/q/29425483
has comment: http://stackoverflow.com/comment/47022247
has answer: http://stackoverflow.com/a/29425544
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29425544
has answer: http://stackoverflow.com/a/29425555
has title: referenceNode.parentNode throwing undefined
type: Question
possible better answer: http://stackoverflow.com/a/29425555
has body: I'm trying to replicate jQuery's after() with JavaScript: var orangeBlock = 'Try out the New Version of CLO ' var greyBlock = document.getElementsByClassName('grey-block') function insertAfter(newNode, referenceNode) { console.log(referenceNode.parentNode) referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling) } insertAfter(orangeBlock, greyBlock) But I'm getting the following error: Uncaught TypeError: Cannot call method 'insertBefore' of undefined theme.js:62 insertAfter theme.js:62 (anonymous function) I find it strange, since console.log(greyBlock) outputs the item: [item: function] 0: div.grey-block length: 1 __proto__: NodeList Live site: http://www.chineselearnonline.com/amember/member.php
has comment: http://stackoverflow.com/comment/47022258
answer count: 2
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/14028959
score: 0

http://stackoverflow.com/comment/47049213
type: QuestionComment
comment on: http://stackoverflow.com/q/29439860
score: 0
has text: The website is not accessible, intranet so it is. Yes it does load. I can't understand why the JavaScript works fine outside of the button click function but when I put it in it fails, baffles me ha
type: Comment

http://stackoverflow.com/comment/46981768
score: 0
type: Comment
type: QuestionComment
has text: It is called. Add `console.log()` lines! `console.log(this);` Put on before the setTimeout and one after it. I see both being triggered. And I see the exact issue I talked about and what the answer below also talks about. Debugging 101.
comment on: http://stackoverflow.com/q/29402883

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

http://stackoverflow.com/q/29472641
accepted answer: http://stackoverflow.com/a/29472971
has title: communicating parent directive variable to child directive in angular
has answer: http://stackoverflow.com/a/29472907
type: Question
tagged with: angularjs-directive
possible better answer: http://stackoverflow.com/a/29472907
tagged with: javascript
has comment: http://stackoverflow.com/comment/47106950
upvote count: 2
answer count: 2
has body: I am attempting to build a simple show/hide directive based on elements transcluded into divs. I have a parent and a child directive. When the parent directive is clicked on, the child directive should toggle show/hide it's div. The toggle function sits in the parent controller and toggles the variable between true and false so that the child directive can show/hide. The problem: the toggle function in the parent directive works correctly, however the child directive is not aware of the toggle variable changing when the parent is clicked. I am passing the ctrl to the link function in the child directive by using require. This way I can access the parent controller objects for showing and hiding. The toggle variable is visible by the child, but does not reflect any changes after the initial load of the page. When clicked, nothing shows or hides. code: angular.module('demo', []) .directive('demoParent', function() { return { restrict: 'E', scope: {}, transclude: true, template: '&lt;div ng-click="toggleTarget()" ng-transclude&gt;&lt;/div&gt;', controller: function($scope) { $scope.toggleTarget = function() { this.openTarget = !this.openTarget; }; this.openTarget = false; } }; }) .directive('demoChild', function() { return { require: '^demoParent', restrict: 'E', transclude: true, link: function(scope, elem, attrs, ctrl) { scope.ctrl = ctrl; }, template: '&lt;div ng-show="ctrl.openTarget" ng-transclude&gt;&lt;/div&gt;', }; }); Does the child need to add a watcher to the parent ctrl or is this a case of isolated variables once passed from parent to child?
favorite count: 0
has comment: http://stackoverflow.com/comment/47106639
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47106744
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29472971

http://stackoverflow.com/comment/47117914
type: AnswerComment
comment on: http://stackoverflow.com/a/29478156
type: Comment
has text: as in the ?
score: 0

http://stackoverflow.com/comment/46981984
type: Comment
type: QuestionComment
has text: @Amadan I don't know how startFunc is going to use my callback. It's probably going to call it with some paramaters that I am completely unaware of.
comment on: http://stackoverflow.com/q/29403229
score: 0

http://stackoverflow.com/q/29468346
has comment: http://stackoverflow.com/comment/47099675
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/47099533
has comment: http://stackoverflow.com/comment/47099440
type: Question
has title: changing the pitch of a music with the web audio API
has body: In audacity, there's an option to change the pitch of a music and I want to get that effect with the web audio API but I can't find anything about it, is it possible?
tagged with: javascript
has comment: http://stackoverflow.com/comment/47103464
tagged with: web-audio-api
has comment: http://stackoverflow.com/comment/47099290
type: UnansweredQuestion

http://stackoverflow.com/q/29465821
has comment: http://stackoverflow.com/comment/47094783
type: Question
has answer: http://stackoverflow.com/a/29466441
has comment: http://stackoverflow.com/comment/47094696
has comment: http://stackoverflow.com/comment/47094508
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47094525
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47094487
has comment: http://stackoverflow.com/comment/47094660
has comment: http://stackoverflow.com/comment/47094586
favorite count: 0
tagged with: ajax
linked to: http://stackoverflow.com/q/14265219
type: UnansweredQuestion
has title: Handle the events of the beginning and end of an ajax request sent by a third-party library
has answer: http://stackoverflow.com/a/29486018
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/47095918
has comment: http://stackoverflow.com/comment/47094712
has body: I'm using a third-party library in my project which sends some ajax requests. It's a quite complex library and it sends them to the urls which have a random GUID so I can't predict what the GUIDs would be and thus what the exact url would be. I want to be able to handle the beginning and end of the ajax requests it sends so I can show an ajax spinner or something - to inform the user that there's something going on. Especially when the page is getting loaded for the first time. I tried this for the even when it's already done but it didn't work: $(document).ajaxStop(function () { alert('done'); }); And document.ready didn't work the way I needed either because the responses from the ajax request came back after it. Again, I'm not sending those ajax request, the library sends them. For the sake of simplicity we can assume there's only one ajax request, not many. And I can't change the source code of the library. Is there any way? UPDATE: Isn't not using jquery. And it creates a script dynamically by var s = document.createElement('script'); s.src = url; s.async = true; s.onreadystatechange = s.onload = function(){ //.... some stuff

http://stackoverflow.com/comment/46993780
type: AnswerComment
comment on: http://stackoverflow.com/a/29408490
has text: no mapOptions doesn't need to be outside the scope. Also try setting id to `map_canvas` instead of `divMap` in case if you are only one instance of maps. Google maps have issues with different id(s) sometimes.
score: 0
type: Comment

http://stackoverflow.com/a/29510807
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29509899
has body: try to put them in web directory in a js directory. And call them in twig like that each time {{asset('js/script.js')}} Exemple : { require : "{{asset('js/require.js')}}", size: "80196" },

http://stackoverflow.com/q/29484426
has comment: http://stackoverflow.com/comment/47129223
accepted answer: http://stackoverflow.com/a/33888107
type: Question
has title: Datatable get column value gives only first 10 rows
tagged with: javascript
tagged with: jquery
tagged with: datatables
answer count: 1
downvote count: 0
has body: Am trying to get the values of the column 1. As the datatable docs suggested i tried, var data = table.column( 0 ).data(); Table configuration: var datatable = table.dataTable({ "scrollX" : "100%", "scrollY" : "600px", "scrollCollapse" : true, "paging" : true, "searching" : true, "ordering" : true, "processing": true, "serverSide": true, "ajax": { url: dataUrl, type: 'POST' }, "order": [ 1, 'asc' ], "columns" : columns }); Since the table is with paging, it has only the values of the current page. Only the first 10 rows. Is there any way to get all the rows of a particular column?
has answer: http://stackoverflow.com/a/33888107
favorite count: 0
has comment: http://stackoverflow.com/comment/47169547
type: AnsweredQuestion
score: 2
upvote count: 2

http://stackoverflow.com/q/29492827
accepted answer: http://stackoverflow.com/a/29492896
possible better answer: http://stackoverflow.com/a/29492920
has answer: http://stackoverflow.com/a/29492920
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29492937
upvote count: 4
has answer: http://stackoverflow.com/a/29493004
has answer: http://stackoverflow.com/a/29492896
downvote count: 0
tagged with: jquery
has body: I am new to JS and trying to understand basic concepts. I want to learn object oriented JS, but I am coming to my difficulty. I am trying to understand the usage of the return statement. I was just going through the code in dropdown.js and came across the following line: return $this.trigger('click') Now I am used to seeing: return true return false And even: return (1 + 1) &gt; 10 ; I know the usage of these return statements. My general overview of the return statement is it is used for returning a value that you would like to use in another place. I still can not understand why this statement is being used: return $this.trigger('click'); This line can also be found on line 75 on git. Thank you. Alex-z.
favorite count: 0
has title: Why is a trigger('click') being returned?
answer count: 4
score: 4
type: AnsweredQuestion

http://stackoverflow.com/comment/47193688
has text: How would I use .getItem on the result.html page?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29519225

http://stackoverflow.com/comment/47205103
score: 0
comment on: http://stackoverflow.com/a/29525166
type: AnswerComment
type: Comment
has text: Thank you vihan1086, this is amazing I understand better how it works, and trim() is really usefull

http://stackoverflow.com/comment/46949130
comment on: http://stackoverflow.com/q/29378273
type: QuestionComment
has text: @gaiat: I tried that... see here: http://pastebin.com/UHPWyV70 I just get dozens of error messages. I cannot seem to get this work... What's my mistake here?
score: 0
type: Comment

http://stackoverflow.com/q/29382252
has comment: http://stackoverflow.com/comment/46963329
has title: Using jQuery to parse a JSONP where source uses a variable instead of a function
has comment: http://stackoverflow.com/comment/46943991
answer count: 0
tagged with: c3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46963271
has comment: http://stackoverflow.com/comment/46944323
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: jsonp
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/58467715
score: 0
has body: I am trying to parse some data from a source that is formatted like this: var = jsonReturnData = {} instead of this: jsonReturnData({}) If I read the file using a script tag like this: &lt;script src="http://foundationphp.com/phpclinic/podata.php?startDate=20150301&amp;endDate=20150302&amp;raw"&gt;&lt;/script&gt; I have no problem reading the data, but if I try to do any sort of JSON or JSONP call from within jQuery, I either get an error or no access to the data depending on how I do it. $.getJSON('http://foundationphp.com/phpclinic/podata.php?startDate=20150301&amp;endDate=20150321&amp;raw', function(data) { console.log(jsonReturnData); }); I need to be able to load the data dynamically when someone chooses some dates. Here's a sample of the interface working, but with no access to the JSON file. The data that you see is being read by the script method. http://iviewsource.com/exercises/codeclinic/01/

http://stackoverflow.com/q/29443140
upvote count: 1
has comment: http://stackoverflow.com/comment/47053993
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29480866
has answer: http://stackoverflow.com/a/29481735
linked to: http://stackoverflow.com/q/3063787
has body: I created a ajax request in Javascript using json, but the $_POST variable is empty. var userid = "james"; var score = 200; var jsondata = { userid: userid, score: score }; data = JSON.stringify(jsondata); req = new XMLHttpRequest(); req.setRequestHeader("Content-Type", "application/json"); req.open("POST", 'functions.php', true); req.send(data); My functions.php file looks like this: print "CONTENT_TYPE: " . $_SERVER['CONTENT_TYPE'] . "&lt;BR /&gt;"; $data = file_get_contents('php://input'); print "DATA: &lt;pre&gt;"; var_dump($data); var_dump($_POST); var_dump($_GET); However all of this gives me an empty array. Any help, please?
tagged with: javascript
tagged with: post
answer count: 3
favorite count: 0
tagged with: ajax
has title: $_POST variable is empty
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/29443213
score: 0

http://stackoverflow.com/a/29447485
answers question: http://stackoverflow.com/q/29447200
score: 0
has comment: http://stackoverflow.com/comment/47061927
type: Answer
has comment: http://stackoverflow.com/comment/47062137
has comment: http://stackoverflow.com/comment/47061666
has body: Just like BeingDev said, ng-if/ng-show/ng-hide is the angular way of doing.. Below is a plunker link in which you can check the output http://plnkr.co/edit/GVYuI47TKlAVqkVDUDOq?p=preview Please choose an option

javascript
tags question: http://stackoverflow.com/q/29485771
tags question: http://stackoverflow.com/q/29378593
tags question: http://stackoverflow.com/q/29382744
tags question: http://stackoverflow.com/q/29386536
tags question: http://stackoverflow.com/q/29396039
tags question: http://stackoverflow.com/q/29459715
tags question: http://stackoverflow.com/q/29429861
tags question: http://stackoverflow.com/q/29517467
tags question: http://stackoverflow.com/q/29472667
tags question: http://stackoverflow.com/q/29458266
tags question: http://stackoverflow.com/q/29378773
tags question: http://stackoverflow.com/q/29400084
tags question: http://stackoverflow.com/q/29498310
tags question: http://stackoverflow.com/q/29502233
tags question: http://stackoverflow.com/q/29398779
tags question: http://stackoverflow.com/q/29500752
tags question: http://stackoverflow.com/q/29423668
tags question: http://stackoverflow.com/q/29389983
tags question: http://stackoverflow.com/q/29513460
tags question: http://stackoverflow.com/q/29399479
tags question: http://stackoverflow.com/q/29402472
tags question: http://stackoverflow.com/q/29377871
tags question: http://stackoverflow.com/q/29473157
tags question: http://stackoverflow.com/q/29501280
tags question: http://stackoverflow.com/q/29404505
tags question: http://stackoverflow.com/q/29432148
tags question: http://stackoverflow.com/q/29512646
tags question: http://stackoverflow.com/q/29483686
tags question: http://stackoverflow.com/q/29385412
tags question: http://stackoverflow.com/q/29511491
tags question: http://stackoverflow.com/q/29387522
tags question: http://stackoverflow.com/q/29432342
tags question: http://stackoverflow.com/q/29402104
tags question: http://stackoverflow.com/q/29375783
tags question: http://stackoverflow.com/q/29441322
tags question: http://stackoverflow.com/q/29446713
tags question: http://stackoverflow.com/q/29462217
tags question: http://stackoverflow.com/q/29395459
tags question: http://stackoverflow.com/q/29482812
tags question: http://stackoverflow.com/q/29407968
tags question: http://stackoverflow.com/q/29442852
tags question: http://stackoverflow.com/q/29454785
tags question: http://stackoverflow.com/q/29400334
tags question: http://stackoverflow.com/q/29446405
tags question: http://stackoverflow.com/q/29454340
tags question: http://stackoverflow.com/q/29374664
tags question: http://stackoverflow.com/q/29522384
tags question: http://stackoverflow.com/q/29463229
tags question: http://stackoverflow.com/q/29402120
tags question: http://stackoverflow.com/q/29451360
tags question: http://stackoverflow.com/q/29374066
tags question: http://stackoverflow.com/q/29451462
tags question: http://stackoverflow.com/q/29462297
tags question: http://stackoverflow.com/q/29402775
tags question: http://stackoverflow.com/q/29442508
tags question: http://stackoverflow.com/q/29459424
tags question: http://stackoverflow.com/q/29400389
tags question: http://stackoverflow.com/q/29406848
tags question: http://stackoverflow.com/q/29508030
tags question: http://stackoverflow.com/q/29474294
tags question: http://stackoverflow.com/q/29483877
tags question: http://stackoverflow.com/q/29441985
tags question: http://stackoverflow.com/q/29388955
tags question: http://stackoverflow.com/q/29527874
tags question: http://stackoverflow.com/q/29393189
tags question: http://stackoverflow.com/q/29482617
tags question: http://stackoverflow.com/q/29517414
tags question: http://stackoverflow.com/q/29471503
tags question: http://stackoverflow.com/q/29522194
tags question: http://stackoverflow.com/q/29417626
tags question: http://stackoverflow.com/q/29417228
tags question: http://stackoverflow.com/q/29507086
tags question: http://stackoverflow.com/q/29395122
tags question: http://stackoverflow.com/q/29400274
tags question: http://stackoverflow.com/q/29529757
tags question: http://stackoverflow.com/q/29451223
tags question: http://stackoverflow.com/q/29484307
tags question: http://stackoverflow.com/q/29390276
tags question: http://stackoverflow.com/q/29375175
tags question: http://stackoverflow.com/q/29405168

http://stackoverflow.com/comment/47213337
comment on: http://stackoverflow.com/q/29527883
score: 0
type: Comment
type: QuestionComment
has text: Good point. But I tested them in chrome, where they all work, and in chrome for android -using OTG to get a mouse cursor- and none of them did. Are we thinking that mobile browsers don't employ these styles AT ALL, even though OTG exists and is well supported? And if so, it'd be nice to know that for sure...

http://stackoverflow.com/a/29378398
upvote count: 1
has comment: http://stackoverflow.com/comment/46958773
has body: Use ng-style instead of ng-class. You have two ways to use it: &lt;div ng-style="style(value)"&gt; and &lt;div ng-style="{'background-color': value}"&gt;
answers question: http://stackoverflow.com/q/29378216
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/29506814
score: 6
upvote count: 6
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/52855667
has body: I am trying to make a basic mongoose connection in c9.io using node.js, React, ReactRouter and webpack. I have my mongodb established and listening, but when I try to require mongoose and start a connection, it fails and tells me "undefined is not a function", pointing me to "mongoose.connect". Here is my code. I am not sure what I am doing wrong. var mongoose = require('mongoose'); mongoose.connect('mongodb://localhost:27017');//this returns "undefined is not a function" and fails var Schema = mongoose.Schema; var postSchema = new Schema({ title: String, description: String, author: String, content: String }); var Post = mongoose.model('Post', postSchema); module.exports = Post; Any thoughts? I am wondering if it is a problem with webpack, since I'm using React-router instead of something server-side.
type: Question
tagged with: mongodb
tagged with: reactjs
has answer: http://stackoverflow.com/a/59220769
has answer: http://stackoverflow.com/a/29507491
downvote count: 0
tagged with: mongoose
tagged with: javascript
has comment: http://stackoverflow.com/comment/47195615
has answer: http://stackoverflow.com/a/35630427
has comment: http://stackoverflow.com/comment/47171109
possible better answer: http://stackoverflow.com/a/59220769
answer count: 3
favorite count: 0
has title: mongoose.connect undefined is not a function
has comment: http://stackoverflow.com/comment/99385087
accepted answer: http://stackoverflow.com/a/35630427
has comment: http://stackoverflow.com/comment/47183458

http://stackoverflow.com/q/29486353
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/47132227
has comment: http://stackoverflow.com/comment/47132387
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47134561
has title: native Array.filter doesn't work on $resource items
has comment: http://stackoverflow.com/comment/47132716
has comment: http://stackoverflow.com/comment/47157510
score: 0
has comment: http://stackoverflow.com/comment/47132660
has body: When I try to apply a function to a native filter() call on an array (returned from $resource), I get an undefined error: Job.query().$promise .then(function(data){ var all = data; var lastDay = all.filter(lastDay); var lastWeek = all.filter(lastWeek); $scope.jobs.day = lastDay.length; $scope.jobs.week = lastWeek.length; }); I get all.filter is undefined.
tagged with: angularjs

angularjs
tags question: http://stackoverflow.com/q/29507000
tags question: http://stackoverflow.com/q/29423899
tags question: http://stackoverflow.com/q/29496386
tags question: http://stackoverflow.com/q/29515951
tags question: http://stackoverflow.com/q/29494873
tags question: http://stackoverflow.com/q/29429827
tags question: http://stackoverflow.com/q/29460152
tags question: http://stackoverflow.com/q/29503445
tags question: http://stackoverflow.com/q/29450944
tags question: http://stackoverflow.com/q/29519683
tags question: http://stackoverflow.com/q/29507689
tags question: http://stackoverflow.com/q/29479993
tags question: http://stackoverflow.com/q/29507673
tags question: http://stackoverflow.com/q/29475779
tags question: http://stackoverflow.com/q/29377994
tags question: http://stackoverflow.com/q/29409787
tags question: http://stackoverflow.com/q/29497597
tags question: http://stackoverflow.com/q/29468377
tags question: http://stackoverflow.com/q/29395362
tags question: http://stackoverflow.com/q/29411764
tags question: http://stackoverflow.com/q/29420151
tags question: http://stackoverflow.com/q/29508317
tags question: http://stackoverflow.com/q/29496217
tags question: http://stackoverflow.com/q/29384757
tags question: http://stackoverflow.com/q/29516204
tags question: http://stackoverflow.com/q/29404583
tags question: http://stackoverflow.com/q/29437692
tags question: http://stackoverflow.com/q/29472641
tags question: http://stackoverflow.com/q/29389089
tags question: http://stackoverflow.com/q/29472862
tags question: http://stackoverflow.com/q/29481927
tags question: http://stackoverflow.com/q/29439302
tags question: http://stackoverflow.com/q/29417876
tags question: http://stackoverflow.com/q/29495464
tags question: http://stackoverflow.com/q/29391090
tags question: http://stackoverflow.com/q/29407327
tags question: http://stackoverflow.com/q/29518756
tags question: http://stackoverflow.com/q/29505050
tags question: http://stackoverflow.com/q/29498375
tags question: http://stackoverflow.com/q/29408718
tags question: http://stackoverflow.com/q/29409374
tags question: http://stackoverflow.com/q/29499180
tags question: http://stackoverflow.com/q/29483299
tags question: http://stackoverflow.com/q/29513065
tags question: http://stackoverflow.com/q/29480241
tags question: http://stackoverflow.com/q/29448794
tags question: http://stackoverflow.com/q/29441976
tags question: http://stackoverflow.com/q/29491484
tags question: http://stackoverflow.com/q/29507504
tags question: http://stackoverflow.com/q/29512410
tags question: http://stackoverflow.com/q/29473415
tags question: http://stackoverflow.com/q/29453777
tags question: http://stackoverflow.com/q/29524560
tags question: http://stackoverflow.com/q/29446056
tags question: http://stackoverflow.com/q/29493833
tags question: http://stackoverflow.com/q/29473526
tags question: http://stackoverflow.com/q/29401144
tags question: http://stackoverflow.com/q/29506103
tags question: http://stackoverflow.com/q/29388149
tags question: http://stackoverflow.com/q/29398928
tags question: http://stackoverflow.com/q/29487914
tags question: http://stackoverflow.com/q/29509510
tags question: http://stackoverflow.com/q/29498102
tags question: http://stackoverflow.com/q/29382187
tags question: http://stackoverflow.com/q/29374028
tags question: http://stackoverflow.com/q/29526030
tags question: http://stackoverflow.com/q/29518152
tags question: http://stackoverflow.com/q/29398863
tags question: http://stackoverflow.com/q/29461378
tags question: http://stackoverflow.com/q/29485219
tags question: http://stackoverflow.com/q/29418798
tags question: http://stackoverflow.com/q/29396371
tags question: http://stackoverflow.com/q/29486747
tags question: http://stackoverflow.com/q/29463528
tags question: http://stackoverflow.com/q/29490724
tags question: http://stackoverflow.com/q/29454986
tags question: http://stackoverflow.com/q/29460828
tags question: http://stackoverflow.com/q/29475966
tags question: http://stackoverflow.com/q/29443165
tags question: http://stackoverflow.com/q/29528918

http://stackoverflow.com/comment/47154523
type: QuestionComment
has text: @tymeJV Shouldn't the double quotes around the name make that unnecessary?
score: 2
type: Comment
comment on: http://stackoverflow.com/q/29497857

http://stackoverflow.com/a/37492399
downvote count: 1
has comment: http://stackoverflow.com/comment/98523941
score: 60
has body: While there isn't a standard way of doing this in ES6, there is a library called Bluebird to handle this. There is also a recommended way described as part of the react documentation. It looks similar to what you have in your 2 and 3rd updates. const makeCancelable = (promise) =&gt; { let hasCanceled_ = false; const wrappedPromise = new Promise((resolve, reject) =&gt; { promise.then((val) =&gt; hasCanceled_ ? reject({isCanceled: true}) : resolve(val) ); promise.catch((error) =&gt; hasCanceled_ ? reject({isCanceled: true}) : reject(error) ); }); return { promise: wrappedPromise, cancel() { hasCanceled_ = true; }, }; }; const cancelablePromise = makeCancelable( new Promise(r =&gt; component.setState({...}})) ); cancelablePromise .promise .then(() =&gt; console.log('resolved')) .catch((reason) =&gt; console.log('isCanceled', reason.isCanceled)); cancelablePromise.cancel(); // Cancel the promise Taken from: https://facebook.github.io/react/blog/2015/12/16/ismounted-antipattern.html
has comment: http://stackoverflow.com/comment/95760818
upvote count: 61
type: Answer
answers question: http://stackoverflow.com/q/29478751
has comment: http://stackoverflow.com/comment/104406127
has comment: http://stackoverflow.com/comment/101872858

http://stackoverflow.com/comment/47135142
type: QuestionComment
score: 0
has text: Can you share it in plunker
comment on: http://stackoverflow.com/q/29487914
type: Comment

http://stackoverflow.com/comment/47178955
type: AnswerComment
has text: ohh so do you want to remove that element from the select box as well?? is it you want??
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29511415

http://stackoverflow.com/q/29459322
tagged with: php
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/29459418
has answer: http://stackoverflow.com/a/29459429
score: 0
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29459429
favorite count: 0
tagged with: ajax
has body: Basically what I'm trying to do is have a text field where the user enters in a foodstuff, and as theyre typing a message updates to say whether or not said item is in stock (through contacting the database). My php code for the xml: require 'connect.php'; header('Content-Type: text/xml'); echo "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>"; echo ' '; if (isset($_GET['foodInput'])&&!empty($_GET['foodInput'])) { extract($_GET); $sql = "SELECT * FROM food WHERE name=:foodInput"; $stmt = $db -> prepare($sql); if ($stmt ->execute(array(':foodInput'=>$foodInput))) { if ($stmt -> rowCount()>0) { $results = $stmt -> fetch(PDO::FETCH_OBJ); echo 'Yes, we do in fact have '.$results->name.'.'; }else{ echo 'No, '.$foodInput.' is not available champ.'; } } }else{ echo 'Please enter foodstuff.'; } echo ' '; My Javascript for the rest: function createHttp(){ var xmlhttp; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); }else if (window.ActiveXObject) { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); }; return xmlhttp; } var xmlhttp = createHttp(); function handleServerResponse(){ if(xmlhttp.readyState==4){ if (xmlhttp.status==200) { xmlResponse = xmlhttp.responseXML; xmlDoc = xmlResponse.documentElement; message = xmlDoc.firstChild.data; document.getElementById('updated').innerHTML = message; setTimeout(process, 1000); }; }else{ alert('Something is amiss'); } } function process(){ if (xmlhttp.readyState==4||xmlhttp.readyState==0){ food = encodeURIComponent(document.getElementById('food').value); xmlhttp.open('GET', 'include/foodstore.php?foodInput='+food,true); xmlhttp.onreadystatechange = handleServerResponse; xmlhttp.send(); }else{ setTimeout(process, 1000); } } As soon as the process is initialised I get the alert something is amiss message that occurs when readyState is no longer 4. I entered a console.log(xmlhttp.readyState) and the resulting log was basically 1234123412341234 etc. So instead of sticking it out at 4 it would do something, else? Honest…
has title: Javascript ajax request
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29459418
upvote count: 1

http://stackoverflow.com/comment/46928970
score: 0
comment on: http://stackoverflow.com/q/29374148
type: Comment
type: QuestionComment
has text: No, you have to check with your own code to see whether there's a value before trying to use it as an object reference

http://stackoverflow.com/comment/46931219
type: Comment
has text: @KJPrice that's on my server, not theirs. i'm updating the question with some more info
comment on: http://stackoverflow.com/a/29375342
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46968625
has text: None of my code (or my one dependency) makes any calls to window, document, or navigator. And the tests are very similar. Why would some run and not the others? It's not a syntax error. I've spent an entire afternoon scouring the tests, and tried commenting out various combinations.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29392781
type: AnswerComment

php
tags question: http://stackoverflow.com/q/29384776
tags question: http://stackoverflow.com/q/29482984
tags question: http://stackoverflow.com/q/29496887
tags question: http://stackoverflow.com/q/29485360
tags question: http://stackoverflow.com/q/29488131
tags question: http://stackoverflow.com/q/29446627
tags question: http://stackoverflow.com/q/29504217
tags question: http://stackoverflow.com/q/29518494
tags question: http://stackoverflow.com/q/29480130
tags question: http://stackoverflow.com/q/29433386
tags question: http://stackoverflow.com/q/29390206
tags question: http://stackoverflow.com/q/29404490
tags question: http://stackoverflow.com/q/29520105
tags question: http://stackoverflow.com/q/29402039
tags question: http://stackoverflow.com/q/29528279
tags question: http://stackoverflow.com/q/29429054
tags question: http://stackoverflow.com/q/29498472
tags question: http://stackoverflow.com/q/29427695
tags question: http://stackoverflow.com/q/29512973
tags question: http://stackoverflow.com/q/29471491
tags question: http://stackoverflow.com/q/29454673
tags question: http://stackoverflow.com/q/29508412
tags question: http://stackoverflow.com/q/29390509
tags question: http://stackoverflow.com/q/29458737
tags question: http://stackoverflow.com/q/29438832
tags question: http://stackoverflow.com/q/29519173
tags question: http://stackoverflow.com/q/29373881
tags question: http://stackoverflow.com/q/29382751
tags question: http://stackoverflow.com/q/29457403
tags question: http://stackoverflow.com/q/29412629
tags question: http://stackoverflow.com/q/29473721
tags question: http://stackoverflow.com/q/29380829
tags question: http://stackoverflow.com/q/29423336
tags question: http://stackoverflow.com/q/29502138
tags question: http://stackoverflow.com/q/29427612
tags question: http://stackoverflow.com/q/29421831
tags question: http://stackoverflow.com/q/29415033
tags question: http://stackoverflow.com/q/29497425
tags question: http://stackoverflow.com/q/29415197
tags question: http://stackoverflow.com/q/29410761
tags question: http://stackoverflow.com/q/29446363
tags question: http://stackoverflow.com/q/29507191
tags question: http://stackoverflow.com/q/29474755
tags question: http://stackoverflow.com/q/29433240
tags question: http://stackoverflow.com/q/29444230
tags question: http://stackoverflow.com/q/29523366
tags question: http://stackoverflow.com/q/29516515
tags question: http://stackoverflow.com/q/29393784
tags question: http://stackoverflow.com/q/29493056
tags question: http://stackoverflow.com/q/29399599
tags question: http://stackoverflow.com/q/29380572
tags question: http://stackoverflow.com/q/29509831
tags question: http://stackoverflow.com/q/29487440
tags question: http://stackoverflow.com/q/29432871
tags question: http://stackoverflow.com/q/29523572
tags question: http://stackoverflow.com/q/29419471
tags question: http://stackoverflow.com/q/29498657
tags question: http://stackoverflow.com/q/29495116
tags question: http://stackoverflow.com/q/29472359
tags question: http://stackoverflow.com/q/29481393
tags question: http://stackoverflow.com/q/29421003
tags question: http://stackoverflow.com/q/29385319
tags question: http://stackoverflow.com/q/29377234
tags question: http://stackoverflow.com/q/29462743
tags question: http://stackoverflow.com/q/29424620
tags question: http://stackoverflow.com/q/29499953
tags question: http://stackoverflow.com/q/29385303
tags question: http://stackoverflow.com/q/29474721
tags question: http://stackoverflow.com/q/29445448
tags question: http://stackoverflow.com/q/29468055
tags question: http://stackoverflow.com/q/29379531
tags question: http://stackoverflow.com/q/29383843
tags question: http://stackoverflow.com/q/29443214
tags question: http://stackoverflow.com/q/29423257
tags question: http://stackoverflow.com/q/29406400
tags question: http://stackoverflow.com/q/29457758
tags question: http://stackoverflow.com/q/29470072
tags question: http://stackoverflow.com/q/29485082
tags question: http://stackoverflow.com/q/29491192
tags question: http://stackoverflow.com/q/29431408

http://stackoverflow.com/comment/47066422
comment on: http://stackoverflow.com/q/29444908
type: Comment
type: QuestionComment
has text: share the java code written in GCMInterface.java file...
score: 0

http://stackoverflow.com/q/29469959
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/102133210
has body: I'm looking for a way to be able to resize div like you would resize a component on a desktop app. I know about the resize CSS property, but you have to put your cursor on the bottom right corner to resize the element. What I mean by "like on a desktop app" is that I would be able to resize an element by moving my cursor anywhere on the border of it, not just on the bottom right corner. I couldn't find any JS library or CSS property to do that, I know google drive has this functionnality (see screen) Is there any way to achieve that easily ?
type: Question
tagged with: javascript
tagged with: resize
score: 0
has title: Resize div like desktop application
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29470127
answer count: 1

http://stackoverflow.com/comment/47170155
comment on: http://stackoverflow.com/a/29502728
has text: I recommend to you to use this as a general practice. That is, when parameters will depend on each other, to define them that way. It's not always obvious which ones they are but here for example all the radii will probably depend on each other because otherwise, changing one number will mess up the ratios.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46965019
has text: No it is not firing at least once. No error appears too.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29389534

http://stackoverflow.com/comment/47049073
score: 0
has text: Yup, this is a duplicate. Sorry, @Barmar.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29440144

http://stackoverflow.com/q/29402883
type: Question
has comment: http://stackoverflow.com/comment/46981768
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46981211
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46981374
has comment: http://stackoverflow.com/comment/46981580
has comment: http://stackoverflow.com/comment/46981232
has answer: http://stackoverflow.com/a/29403139
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/46981273
has comment: http://stackoverflow.com/comment/46981990
has title: Can't access appended element
score: -3
has comment: http://stackoverflow.com/comment/46982017
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29403139
has comment: http://stackoverflow.com/comment/46981881
has comment: http://stackoverflow.com/comment/46981638
has comment: http://stackoverflow.com/comment/46981834
downvote count: 3
has comment: http://stackoverflow.com/comment/46982255
has body: Before you mark this question as a duplicate: I have tried pretty much every solution from other questions here. I want to remove a previously appended element, but the code for that isn't executed. Maybe, you can also tell me a more beautiful way to store the content in var $content. var messageBoxCount = 0; function createMessageBox(message) { messageBoxCount++; var $content = $(" Fehler "+message+" "); $("#messages").append($content);; window.scrollTo(0,0); } $("#messages").on("click", ".closeMessageBox", function() { var close = $(this); var currentBox = $(this).parent(); currentBox.removeClass("enabled"); currentBox.addClass("disabled"); setTimeout(function() {$(this).closest(".box").remove();}, 400); }); createMessageBox("Test"); .closeMessageBox { background-color: red; width: 15px; height: 15px; }
has comment: http://stackoverflow.com/comment/46982078
has comment: http://stackoverflow.com/comment/46981179

http://stackoverflow.com/a/29465335
answers question: http://stackoverflow.com/q/29464454
has body: You really don't need jQuery for this. JSON can be accessed directly through javascript. However if you want to use jQuery - var obj = jQuery.parseJSON( '"1234A":{ "apcdiv_staffname":"MOHD NASA", "apcdiv_staffimage":"http://localhost/jknsapc/wp-content/uploads/2014/06/product-landing-layout-thumb.png", "apcdiv_workplace":"HOSPITAL", "apcdiv_grade":"U44", "apcdiv_position":"PEGAWAI FARMASI", "apcdiv_ic":"1234567" }' ); alert( obj.1234A ); alert( obj.1234A.apcdiv_staffname ); More Information https://api.jquery.com/jquery.parsejson/
type: Answer
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/47164631
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29502582
has text: @Legends this means you are calling the javascript compiler, which is very slow.

http://stackoverflow.com/comment/125361203
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29390135
type: Comment
has text: When you say whatever folder, do you mean a folder server-side or client-side ?

http://stackoverflow.com/comment/46959115
type: AnswerComment
comment on: http://stackoverflow.com/a/29390766
has text: Thank you. I tried your suggestions and although I don't get any error I still can not filter the data based on the first letters. I get all the values from the database.
type: Comment
score: 0

http://stackoverflow.com/q/29397867
tagged with: javascript
tagged with: bing-maps
tagged with: windows-runtime
score: 0
answer count: 1
has body: Bing maps dosent work when bing speech is also referenced in a win8 system(works for win8.1 system). In veapicore.js and veapiModules.js there is window[$MapsNamespace]. When both spech and maps are referenced maps is never intialized in the namespace. Only speech is present which.The maps namespace has only 2 dll files which is refernced by bing speech. This happens only in a Windows 8 system. in 8.1 we get both speech and maps in the maps namespace. Is there any solution to this.
tagged with: windows-store-apps
type: AnsweredQuestion
tagged with: windows-phone-8.1
type: Question
has answer: http://stackoverflow.com/a/29398627
accepted answer: http://stackoverflow.com/a/29398627
has title: Bing Speech and Bing Maps conflicting in Windows 8 Store app

http://stackoverflow.com/q/29465903
has answer: http://stackoverflow.com/a/29472321
tagged with: asp.net-mvc
tagged with: javascript
score: 0
answer count: 2
has title: Knockout and Typescript with Model outside ViewModel not working
has answer: http://stackoverflow.com/a/29466840
type: UnansweredQuestion
tagged with: typescript
has body: Ok, so if I do something like this with knockout it works perfectly function UserModel() { UserID = ko.observable(); Name = ko.observable(); } function UserSettingsViewModel() { var user = UserModel(); this.Save = function(user) { SaveUser(user);}; } ko.applyBindings(new UserSettingsViewModel()); Tried to do the same with typescript, but it doesn't really work declare var ko: any; interface IUser { UserID: any; Username: any; Name: any; LastName: any; CreatedOn: any; LastLogin: any; Picture: any; } class User implements IUser{ UserID = ko.observable(''); Username = ko.observable(''); Name = ko.observable(''); LastName = ko.observable(''); CreatedOn= ko.observable(''); LastLogin= ko.observable(''); Picture = ko.observable(''); } function SaveUser(userSetting: any) : void { alert("I was saved!"); } function EditUser(userSetting: any): void { alert("I was Edited!"); } function DeleteUser(userSetting: any): void { alert("I was Deleted!"); } class UserSettingsViewModel { userSetting: any; constructor() { this.userSetting = (&lt;any&gt;User)(); } Save() { SaveUser(this.userSetting); } Delete() { DeleteUser(this.userSetting); } Edit() { EditUser(this.userSetting); } } window.onload = () =&gt; { var ViewModel = new UserSettingsViewModel(); ko.applyBindings(ViewModel); }; How can I do the same with TypeScript, I have tried different methos, but they didn't work.
tagged with: knockout.js
type: Question

http://stackoverflow.com/a/29425555
has comment: http://stackoverflow.com/comment/47022380
has body: Well, your insertAfter function does expect DOM nodes! Neither orangeBlock (a string) nor greyBlock (a Nodelist) are nodes. So rather do something like // create an element using DOM methods var orangeBlock = document.createElement("a"); orangeBlock.href="http://clo2015.chineselearnonline.com/"; orangeBlock.appendChild(document.createTextNode("Try out the New Version of CLO")); // access the first element in the node list var greyBlock = document.getElementsByClassName('grey-block')[0]; function insertAfter(newNode, referenceNode) { console.log(referenceNode.parentNode) referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling) } if (greyBlock) insertAfter(orangeBlock, greyBlock) else alert("could not find an element with the class 'grey-block'"); But actually, you'll want to use the insertAdjacentHTML method: document.getElementsByClassName('grey-block')[0].insertAdjacentHTML('afterend', 'Try out the New Version of CLO')
answers question: http://stackoverflow.com/q/29425483
has comment: http://stackoverflow.com/comment/47022353
has comment: http://stackoverflow.com/comment/47022384
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47022374
downvote count: 0

record
type: Tag
tag name: record
tags question: http://stackoverflow.com/q/29445624
tags question: http://stackoverflow.com/q/29447304

http://stackoverflow.com/a/29505906
score: 0
type: Answer
has body: try this Demo option 1 $('#change').click(function(){ $('#type').val('option 1'); });
has comment: http://stackoverflow.com/comment/47169787
answers question: http://stackoverflow.com/q/29505825

http://stackoverflow.com/comment/47064232
has text: @Majid: jQuery is easy to pick up, however I recommend learning Javascript. So, if you just want to get things done, jQuery is easy to pick up and you can easily implement what you want with it. As you learn and are stuck with something, you can always post here.
type: QuestionComment
comment on: http://stackoverflow.com/q/29448943
type: Comment
score: 0

http://stackoverflow.com/comment/47093187
type: Comment
has text: can we use `textContent` to change ?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29465144

http://stackoverflow.com/comment/47195923
score: 0
has text: Seems there are problems with the marker variable.. What does this.get('id') return?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29520328

http://stackoverflow.com/q/29492052
type: Question
score: 7
has answer: http://stackoverflow.com/a/29492112
has title: How to wrap multiple middleware functions into one?
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/47166505
has comment: http://stackoverflow.com/comment/47182467
tagged with: express
favorite count: 0
has body: I have a number of middleware functions similar to the following: function validate(req, res, next) { req.validationError = new Error('invalid'); } function checkValid(req, res, next) { if (req.validationError) { next(req.validationError); } else { next(); } } function respond() { res.json({result: 'success'}); } Is there a way to wrap them into one function? So I'd do something like: function respondIfValid(req, res, next) { // Evoke the following middleware: // validate // checkValid // respond } app.use('/', respondIfValid); Instead of: app.use('/', validate, checkValid, respond);
tagged with: node.js
type: UnansweredQuestion
upvote count: 7

http://stackoverflow.com/a/29490101
type: Answer
answers question: http://stackoverflow.com/q/29489988
score: 0
has body: I would suggest you to avoid using setInterval for this use case. Even if you are going to use it, then you must clear it once the form is validated. Increase the timer interval as well. 200ms is too short and you're triggering the function so many times. var timer = setInterval(checkLogin, 500); In your checkLogin() function. function checkLogin() { var email = $("#username").val(); var password = $("#password").val(); if (!!email &amp;&amp; !!password) { $("#loginform .button.primary").attr('disabled', false); clearInterval(timer); } else { $("#loginForm .button.primary").attr('disabled', true); } } Instead of setInterval, you can use keypress or input event and check if they are filled or not.

http://stackoverflow.com/comment/47146567
has text: why do you say `String.fromCharCode(188)` should return `,`? Comma ASCII/Unicode is 44.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29492934

http://stackoverflow.com/a/29393611
has body: "Do I need to do this on every single script tag of every single page of my application?" Yes you do. The cache is based on the file's url, including those extra parameters. Adding those parameters doesn't actually remove the file from the browser's cache, it more or less sees it as a new, different file. This also answers point 2, since having to do it on all pages means you can't do it on only one page.
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29393503
type: Answer
downvote count: 0

http://stackoverflow.com/comment/65842055
type: Comment
has text: I solved the same issue with using promise-polyfill: https://www.npmjs.com/package/promise-polyfill
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/31166888

http://stackoverflow.com/q/29395471
possible better answer: http://stackoverflow.com/a/29396073
has answer: http://stackoverflow.com/a/29396073
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29760839
tagged with: request-headers
type: AnsweredQuestion
type: Question
has title: Ability to set JavaScript breakpoints in browser pointed at local environment
accepted answer: http://stackoverflow.com/a/29760839
tagged with: javascript
score: 4
has body: Unfortunately, while JavaScript breakpoints can be set in production, they cannot be set in local. In local, on refresh, JavaScript execution proceeds unimpeded, as if no breakpoint had ever been set. (This has been tested in Chrome, Safari and FF on Mac OS X.) The current local environment differs in the headers for JavaScript files. The headers are pasted, below. Is there any difference in the headers being set, which would cause this undesirable behavior in local. Thanks! Production General Remote Address:23.235.33.207:80 Request URL:http://www.example.com/wp-content/themes/example/js/header.top.min.js?ver=1427752599 Request Method:GET Status Code:200 OK (from cache) Response Headers Accept-Ranges:bytes Access-Control-Allow-Origin:* Age:149381 Cache-Control:max-age=31536000 Connection:keep-alive Content-Encoding:gzip Content-Length:56250 Content-Type:application/javascript Date:Wed, 01 Apr 2015 15:28:14 GMT ETag:"2a5ce-5128893ad1780-gzip" Last-Modified:Mon, 30 Mar 2015 21:58:06 GMT Server:Apache Varnish-X-Cache:HIT Varnish-X-Cache-Hits:4259 Vary:Accept-Encoding X-Cache:HIT X-Cache-Hits:4259 X-Served-By:cache-jfk1021-JFK X-Timer:S1427902094.409391,VS0,VE0 Request Headers Provisional headers are shown User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36 Query String Parameters ver:1427752599 Local General Remote Address:192.168.33.28:80 Request URL:http://example.local/wp-content/themes/example/js/header.top.min.js?ver=1427902154 Request Method:GET Status Code:200 OK Response Headers Accept-Ranges:bytes Connection:Keep-Alive Content-Length:173487 Content-Type:application/javascript Date:Wed, 01 Apr 2015 15:29:16 GMT ETag:"2a5af-51294e60377c0" Keep-Alive:timeout=5, max=100 Last-Modified:Tue, 31 Mar 2015 12:40:07 GMT Server:Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.6.7 Request Headers Accept:*/* Accept-Encoding:gzip, deflate, sdch Accept-Language:en-US,en;q=0.8 Connection:keep-alive…
upvote count: 4
tagged with: response-headers
answer count: 2
tagged with: breakpoints

http://stackoverflow.com/q/29485643
has body: I am working on a project where i am stuck at an awkward problem. There are two sets of input fields, one for teacher's sign-in and the other for the students. The values in the input fields are passed to a script in the same file and then using ajax i am sending the data to a php file on the localhost. The issue is that there is no problem when i am running it on the browser but after building an apk using phonegap the teacher's sign-in is having problem. Username: Password: Login Username: Password: Login JavaScript Functions Used : function student_verification(php_file, tagID) { var request = get_XmlHttp(); var the_data = 'Name='+document.getElementById('loginStudentUsername').value+'&Password='+document.getElementById('loginStudentPassword').value; request.open("POST", php_file, true); request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); request.send(the_data); request.onreadystatechange = function() { if (request.readyState == 4) { if(request.responseText==0) { $("#modalview-login4").kendoMobileModalView("close"); openError(); } else{ window.location.href = "https://www.google.com"; } } } } function teacher_verification(php_file, tagID) { var requestTeacher = get_XmlHttp(); var the_data='Name='+document.getElementById('loginTeacherUsername').value+'&Password='+document.getElementById('loginTeacherPassword').value; requestTeacher.open("POST", php_file, true); requestTeacher.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); requestTeacher.send(the_data); requestTeacher.onreadystatechange = function() { if (requestTeacher.readyState == 4) { alert(requestTeacher.responseText);// here is the issue in android app which is described below.. if(requestTeacher.responseText==0) { $("#modalview-login3").kendoMobileModalView("close"); openError(); } else{ window.location.href = "https://www.google.com"; } } } } PHP FILES: Teacher_Verification.php - <?php header('Access-Control-Allow-Origin: *'); session_start(); $name = $_POS…
score: 2
has title: Input fields working fine in browser but not in android app built using Phonegap
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ajax
tagged with: android
tagged with: cordova
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/q/29396009
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29396179
accepted answer: http://stackoverflow.com/a/29396179
has comment: http://stackoverflow.com/comment/46968650
type: AnsweredQuestion
has title: jQuery .val() not returning what is expected
has comment: http://stackoverflow.com/comment/46968491
downvote count: 0
type: Question
score: 1
has comment: http://stackoverflow.com/comment/46968616
has comment: http://stackoverflow.com/comment/46968346
upvote count: 1
has comment: http://stackoverflow.com/comment/46968331
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46968511
has body: I am trying to implement the following code snippet into my project: http://jsfiddle.net/Zmf6t/. But I am running into a bit of difficulty; I have wrapped the JavaScript in the jQuery(document).ready() callback function, and checking it in the Chrome debugger shows that the script is running. However, when I get to the if( jQuery(this).val() == "-1" ) (as my &lt;select&gt; value has -1 as its value), the debugger reports that the elements value property is "-1", but the statement within the if is never evaluated. Instead the else property is evaluated. Does anyone have any idea why this might be happening? I cannot seem to isolate the issue to provide a minimal working example; my jQuery is as below: jQuery(document).ready( function() { jQuery('#test').change( function() { if( jQuery(this).val() == "-1" ) { jQuery(this).addClass( "empty-combo" ); } else { jQuery(this).removeClass( "empty-combo" ); } }); jQuery('#test').change(); });
favorite count: 0

http://stackoverflow.com/comment/47194604
score: 0
comment on: http://stackoverflow.com/q/29519593
has text: yes i have images/ folder
type: Comment
type: QuestionComment

three.js
tags question: http://stackoverflow.com/q/29398381
tags question: http://stackoverflow.com/q/29499647
tags question: http://stackoverflow.com/q/29518886
tag name: three.js
tags question: http://stackoverflow.com/q/29480162
tags question: http://stackoverflow.com/q/29521032
tags question: http://stackoverflow.com/q/29456547
tags question: http://stackoverflow.com/q/29377045
tags question: http://stackoverflow.com/q/29421702
tags question: http://stackoverflow.com/q/29422118
tags question: http://stackoverflow.com/q/29474525
tags question: http://stackoverflow.com/q/29382782
tags question: http://stackoverflow.com/q/29530030
tags question: http://stackoverflow.com/q/29418828
tags question: http://stackoverflow.com/q/29449068
tags question: http://stackoverflow.com/q/29510455
tags question: http://stackoverflow.com/q/29393109
tags question: http://stackoverflow.com/q/29389295
tags question: http://stackoverflow.com/q/29378273
tags question: http://stackoverflow.com/q/29415263
type: Tag
tags question: http://stackoverflow.com/q/29375594
tags question: http://stackoverflow.com/q/29463945
tags question: http://stackoverflow.com/q/29465452
tags question: http://stackoverflow.com/q/29529179
tags question: http://stackoverflow.com/q/29494449
tags question: http://stackoverflow.com/q/29436763
tags question: http://stackoverflow.com/q/29477589
tags question: http://stackoverflow.com/q/29446991
tags question: http://stackoverflow.com/q/29495476
tags question: http://stackoverflow.com/q/29502747
tags question: http://stackoverflow.com/q/29456869
tags question: http://stackoverflow.com/q/29373888
tags question: http://stackoverflow.com/q/29482759
tags question: http://stackoverflow.com/q/29417374
tags question: http://stackoverflow.com/q/29464072

http://stackoverflow.com/q/29477546
has answer: http://stackoverflow.com/a/29477586
has answer: http://stackoverflow.com/a/29477588
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29477586
tagged with: css
favorite count: 0
tagged with: twitter-bootstrap
downvote count: 2
has comment: http://stackoverflow.com/comment/47115872
has title: Create a professional looking calendar for a website form
accepted answer: http://stackoverflow.com/a/29477588
type: AnsweredQuestion
type: Question
answer count: 2
has body: I am creating a form which requires the user to fill in a date for a booking. I want to have a calendar as a part of the form where the default date is the date for that particular date. Are there any premade calendars (I don't want to reinvent the wheel)? I am developing using html, css, javascript, jsp and bootstrap. I don't mind adding another framework in order to make this work. Thank you!
upvote count: 0
score: -2
tagged with: jsp
tagged with: javascript

http://stackoverflow.com/comment/47011694
has text: @hardik `$when` is for making parallel Ajax requests i believe. I'm not making parallel Ajax calls i'm making one Ajax call that is prevented by the loading media.
comment on: http://stackoverflow.com/q/29419288
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29477487
type: Answer
upvote count: 1
score: 1
has body: Both getTime() and Date.parse return milliseconds from 1/1/1970 in UTC time, but you are not declaring both in utc time. So timezones are going to alter what you are comparing. In other words, if it's 3pm local time and 7pm UTC time, and you run that code, when you get a new Date() you are actually saying it's 7pm UTC time, so when you put in a string that indicates it's 7pm without a timezone, it's interpreting that as 7pm as well. The end result is you have a 0 hour difference, because the original dates were in different time zones but indicating the same time once converted to UTC. Hopefully that makes sense... handling datetime values is a nightmare in every programming language and doubly so in javascript. If possible, I recommend a good javascript date library like moment.js.
answers question: http://stackoverflow.com/q/29477274
downvote count: 0

http://stackoverflow.com/a/29630300
downvote count: 2
score: 0
answers question: http://stackoverflow.com/q/29488449
type: Answer
has body: In your case the function does not have a name, it is assigned to a property which has a name. You must name your function as follows: Test.prototype.method_name = function method_name(first_argument) { // body... return "a"; };
upvote count: 2
has comment: http://stackoverflow.com/comment/47422479

http://stackoverflow.com/a/29429363
type: Answer
answers question: http://stackoverflow.com/q/29428858
score: 3
upvote count: 3
downvote count: 0
has body: I'd probably lean towards using computed properties here, specifically sort import Ember from 'ember'; export default Ember.Controller.extend({ selectedCompany: null, companies: Ember.computed.alias('model.companies'), shipSort: ['name:asc'], sortedShips: Ember.computed.sort('model.ships', 'shipSort') }); Bonus: working js-bin

http://stackoverflow.com/comment/47049000
has text: Thank you for the answer, I have figured out how to fix it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29425073
type: Comment

http://stackoverflow.com/q/29430480
has body: I have a quick form field where you can enter your age. When the user enters his/her age in words (like: twenty), it should give a quick alert telling that the age should be in numbers. This is my code and it doesn't work var formAge = $("&lt;input class='inputClass' type='text' placeholder='bv.: 21'/&gt;").appendTo(formDiv); $(formAge).blur(function(){ if($(this).val() == isNaN){ alert("insert a number"); } })
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47031822
type: Question
has answer: http://stackoverflow.com/a/29430496
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/29430566
has title: jquery check if number is typed isNaN
tagged with: onblur
tagged with: focus
has comment: http://stackoverflow.com/comment/47030626

http://stackoverflow.com/a/29476343
score: 0
has body: I haven't tested it, but you could try something like this: $("select[name^='item']").each(function(){ console.log($(this).attr("name") + ": " + $(this).find(":selected").attr("value")); }); With a slight tweak, you could turn that into key value pairs, and then, if I understand the question correctly, potentially use eval() to get the desired value.
type: Answer
answers question: http://stackoverflow.com/q/29476131

http://stackoverflow.com/comment/59270072
score: 0
has text: did you found the solution for this?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29503445

http://stackoverflow.com/a/29515776
has body: I'm not an expert on meteor but I think I know what went wrong here. You will notice that function toggleSearchBottom is called only once. When the page loads it will trigger once, the class will be assigned and that's it. Meteor has no way of knowing that you want to trigger this function each time esInput field's value has changed. This might be slightly confusing because Meteor is so smart when working with sessions and collections, but those automatic bindings do not work for arbitrary DOM. You will have to take a bit different approach, I created a MeteorPad with an example. But this is the core of solution: Template.body.events({ "keyup .esInput": function(event) { if($(event.target).val().length &gt; 0) { $("#state").addClass("hide"); } else { $("#state").removeClass("hide"); } } });
accepted answer of: http://stackoverflow.com/q/29515050
answers question: http://stackoverflow.com/q/29515050
type: AcceptedAnswer
score: 3
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/47192215
upvote count: 3

http://stackoverflow.com/a/29522268
downvote count: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29522234
has body: No, in this case they do literally the same thing: https://github.com/jackmoore/zoom/blob/master/jquery.zoom.js#L85 $.fn.zoom = function (options) { return this.each(function () { Maybe the only difference is $('.zoom').each(... would require $.fn.each to be ran twice.
score: 3
accepted answer of: http://stackoverflow.com/q/29522234
upvote count: 3

http://stackoverflow.com/a/29469163
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29468949
type: Answer
has body: From its documentation in the change event description you have Chosen triggers the standard DOM event whenever a selection is made (it also sends a selected or deselected parameter that tells you which option was changed). This suggests you should observe the arguments received by the event handler at run time to get a hint about (and most likely a reference to) the removed/deselected option.
score: 1

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/29393759
tags question: http://stackoverflow.com/q/29517954
tags question: http://stackoverflow.com/q/29426755
type: Tag
tags question: http://stackoverflow.com/q/29422389
tags question: http://stackoverflow.com/q/29510133

http://stackoverflow.com/q/29420509
accepted answer: http://stackoverflow.com/a/29422899
has body: I'm writing a paginated table with a page selector at the bottom that displays the different page numbers I'm using knockout. The numbers are coming from a ko.computed array (self.pages) that calculates how many pages there are based on the number of results / results per page. The problem I'm running into is if the data array is very long and the results per page is set somewhat low, I get something like this: What I want to do is limit the number of menu items to three, so if page #4 is selected, only items 3,4,5 are visible. Currently I'm implementing a second ko.computed that first retrieves the value of self.pages, then gets the value of the current page number (self.pageNumber), and slices the array so that only 3 items are returned: self.availablePages = ko.computed(function() { var pages = self.pages(); var current = self.pageNumber(); if (current === 0) { return pages.slice(current, current + 3); } else { return pages.slice(current - 1, current + 2); } }); Now all of this seems to be working fine but there's one bug I have not been able to stamp out. Using the knockout css data-bind, I'm telling it to assign a class of 'selected' to whichever element holds the same value as self.pageNumber (see code below). If the element selected does not require self.availablePages to change (i.e. selecting 2 when 1 was the previous selection), there are no problems; 2 becomes selected and 1 becomes un-selected. However, if the selection does require self.availablePages to change (i.e. 1,2,3 visible, selecting 3 will change visible to 2,3,4), the correct numbers display, but instead of 3 being selected, 4 is selected. I'm assuming this is because the index of the array that 3 used to be located at (last) is now being occupied by 4. Here's the menu: <li data-bind="if: $index() < 1"> First Last The array being iterated over was originally just an array of numbers, but in trying to fix this bug I changed it to be an array of the following object: available.MenuModel = functi…
has comment: http://stackoverflow.com/comment/47015926
upvote count: 1
type: AnsweredQuestion
has title: KnockoutJS or Javascript not keeping proper track of displayed array
score: 1
tagged with: knockout.js
type: Question
has answer: http://stackoverflow.com/a/29422899
answer count: 1
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47017246
favorite count: 0
tagged with: css

http://stackoverflow.com/comment/47108675
type: Comment
type: QuestionComment
has text: Please show some actual data examples. Time "ago" has little to do with time zones, but you might be *parsing* the data in a way that does.
score: 0
comment on: http://stackoverflow.com/q/29460718

http://stackoverflow.com/a/29383953
type: Answer
has body: As I mentioned in the comment before, you'll have to bind the popups inside onEachFeture function, something like this: L.geoJson('data', { onEachFeature: function(feature, layer) { layer.on('click', function() { //you bind the popup here, you can acces any property of your Geojson with feature.properties.propertyname layer.bindPopup('&lt;p&gt;' + feature.properties.name + '&lt;/p&gt;&lt;p&gt;' + feature.properties.density + '&lt;/p&gt;').openPopup(); }); } }); Here's an updated JSFiddle demonstrating this: http://jsfiddle.net/yLa4acvy/2/
answers question: http://stackoverflow.com/q/29375075
score: 0

http://stackoverflow.com/q/29377234
answer count: 1
type: UnansweredQuestion
has title: Fill in a form on a site with information that was saved beforehand?
has body: so I'm working on an extension for Google Chrome for a friend. He wants it to fill out his shipping information when a checkout page is loaded with information filled out in a form beforehand. I've set up the form, and saved his information with the chrome.storage API. I can also track the URL that he is on with the tab API. The only thing I can't figure out is how to access the input fields of the page since it isn't my code. I can inspect the element and see the ID's, but since their page isn't linked to my JavaScript, I don't know how to get the strings in there. I've seen it done, and with this site too, but I can't find exactly how to do it. Can anyone nudge me in the right direction?
has answer: http://stackoverflow.com/a/29377331
tagged with: javascript
type: Question
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
score: 0
tagged with: php

http://stackoverflow.com/comment/47091195
comment on: http://stackoverflow.com/q/29455577
type: Comment
has text: Which console? browser or terminal/server? You need to be specific.
score: 0
type: QuestionComment

http://stackoverflow.com/q/29394494
has title: What is difference between these two self invoking functions
has comment: http://stackoverflow.com/comment/46967229
upvote count: 3
has comment: http://stackoverflow.com/comment/46966291
answer count: 1
has comment: http://stackoverflow.com/comment/46965581
has comment: http://stackoverflow.com/comment/46965996
has comment: http://stackoverflow.com/comment/46965897
has comment: http://stackoverflow.com/comment/46965567
tagged with: javascript
has answer: http://stackoverflow.com/a/29394539
has comment: http://stackoverflow.com/comment/46965669
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29394539
score: 1
linked to: http://stackoverflow.com/q/3384504
favorite count: 0
type: Question
has body: Both of these functions below are self-invoking functions. Can anyone explain to me what is difference between these two? I've looked around a lot of places. But I've not been able to find anything. First Type (function(){ console.log('Hello world'); }()); Second Type (function(){ console.log('Hello world'); })();
downvote count: 2
duplicate of: http://stackoverflow.com/q/3384504

http://stackoverflow.com/a/29398344
upvote count: 0
answers question: http://stackoverflow.com/q/29397817
has comment: http://stackoverflow.com/comment/46975947
score: -1
has body: Solution First I advice putting the code in multiple lines just to ease reading. var $li = $('' + '&lt;li&gt;' + '&lt;a href="#" onclick="downloadPdf(\"' + val.title + '\", \"' + val.url + '\")"&gt;' + val.title + '&lt;/a&gt;' + '&lt;/li&gt;'); I specially do this for this awful templates. Second you need to escape the quotes using \" or \' Real advice pay some attention to what epascarello is saying there. His way is way better and easy to understand, than the escaping mess in a single line.
downvote count: 1
type: Answer

http://stackoverflow.com/comment/46967506
score: 0
type: Comment
type: QuestionComment
has text: I have my d&d working. I am trying to have a dblclick event on the dropped object, but keep getting a jquery error. Any suggestions? Thanks
comment on: http://stackoverflow.com/q/29377339

http://stackoverflow.com/a/29510019
has comment: http://stackoverflow.com/comment/47392124
answers question: http://stackoverflow.com/q/29509831
has comment: http://stackoverflow.com/comment/47392071
has comment: http://stackoverflow.com/comment/47391979
type: Answer
has body: Since you use PHP, PHP can call external commands via exec or system, then use these functions to call Git commands with the arguments (e.g repository you need) and fetch the results (if failed for example). I used something similar to make an Subversion web application for a client. For example have HTML/JavaScript create an interface where user can set repository parameters and arguments and pass (or post these) to PHP. Then PHP will use exec or system (with the necessary validation and escaping of course) to call Git commands for the repository and return the results back to PHP then from PHP back to JS app (via AJAX for example). Further info: if the Git commands need to take some time to complete (have a timeout, or need to communicate with remote repositories and so on), a solution is to use a central data management (i.e a database with only one table pending_processes for example) like this: Have JS post the Git request to PHP, have PHP add an entry to the pending_processes DB table for this current process and set its status to pending. Have PHP return the id of this (Git) process. have same PHP script, use exec (or system) (fork and) execute the Git command and wait (or poll) for Git command completion. When the Git completes, the same (forked) PHP script, updates the central DB table for this proces to new status (e.g completed or failed, whatever suits your needs and use-cases). Optionaly it can add the result or output of the Git command. Have JS in the meantime poll (e.g via Ajax calls) the status of this command via another PHP script which simply accepts the id and checks the central processes table for the status of this process. If the status is completed, it can optionaly fetch the output or result back into the JS app. Then JS will show the result of the command to the user. Hope this clear and helpful to you. This can be a complex application, needing to synchronise different parts in various levels of the web stack (i.e client/server/php/js/gti…
score: 0

http://stackoverflow.com/q/29466237
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/29470624
has comment: http://stackoverflow.com/comment/47097876
has comment: http://stackoverflow.com/comment/47101362
possible better answer: http://stackoverflow.com/a/29466438
accepted answer: http://stackoverflow.com/a/29466277
type: AnsweredQuestion
has title: Change href attribute using jquery
has answer: http://stackoverflow.com/a/29466277
linked to: http://stackoverflow.com/q/179713
type: Question
has answer: http://stackoverflow.com/a/29466438
tagged with: javascript
tagged with: jquery
has body: &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;script src="js/jquery-1.10.2.min.js" &gt;&lt;/script&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $('#show').click(function(){ var href = $(this).attr('href'); alert(href); }); }); &lt;/script&gt; &lt;style&gt; .show{ background:#693; color:#000; text-decoration:none; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;p class="credits"&gt;Figure credits goes here&lt;/p&gt; &lt;/figure&gt; &lt;p&gt;&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;figure class="image"&gt;&lt;img alt="" height="228" src="http://localhost/rvrite/uploader/img/541akki.png" width="300" /&gt; &lt;figcaption&gt; &lt;p&gt;&lt;a class="figure-lable" id="f2" name="figure2"&gt;Figure 2&amp;nbsp;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Caption&lt;/p&gt; &lt;/figcaption&gt; &lt;p class="credits"&gt;Figure credits goes here&lt;/p&gt; &lt;/figure&gt; &lt;p&gt;&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp;demo test&amp;nbsp…

http://stackoverflow.com/q/29467607
has body: I need to create a shopping cart. The first thing to do is to list the catalogue in a table using JavaScript. I am able to list it in one long list like table but I want the page to display 10 items at a time. For example: Product ID, Product Name and Price are my three columns. I want these columns to repeat 4 times over. The code I have so fat is: //Initialize Constants TABLE_BEGIN = " "; TABLE_END = " "; TABLE_HEADING_BEGIN = " "; TABLE_HEADING_END = " "; TABLE_ROW_BEGIN = " "; TABLE_ROW_END = " "; TABLE_COLUMN_BEGIN = " "; TABLE_COLUMN_END = " "; UNDERLINE = " "; // Shopping cart based arrays var orderedProductCodeArr = new Array() var quantityArr = new Array() // Creating the catalogue document.writeln(" HomewareCity Catalogue "); document.writeln(UNDERLINE); // Create Table for catalogue document.writeln(TABLE_BEGIN); document.writeln(TABLE_HEADING_BEGIN + "Item ID" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Product Name" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Price" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Item ID" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Product Name" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Price" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Item ID" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Product Name" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Price" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Item ID" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Product Name" + TABLE_HEADING_END + TABLE_HEADING_BEGIN + "Price" + TABLE_HEADING_END); // List all the products for(i = 0; i<=productListArr.length; i++){ document.writeln(TABLE_ROW_BEGIN); document.writeln(TABLE_COLUMN_BEGIN + i + TABLE_COLUMN_END + TABLE_COLUMN_BEGIN + productListArr[i] + TABLE_COLUMN_END + TABLE_COLUMN_BEGIN + priceListArr[i] + TABLE_COLUMN_END); document.writeln(TABLE_ROW_END); } document.writeln(TABLE_END); This code does work for me. I have not included the declaration of i since there are a lot of other things that are not related to this quest…
answer count: 1
has comment: http://stackoverflow.com/comment/47097923
accepted answer: http://stackoverflow.com/a/29467897
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 0
type: Question
has title: Aligning Tables using JavaScript
has answer: http://stackoverflow.com/a/29467897
tagged with: javascript
has comment: http://stackoverflow.com/comment/47099243
tagged with: html-table

http://stackoverflow.com/a/29513055
has body: The .bind() method does not mutate a function, instead it returns a new one. You're not doing anything with the return value. The following would work: ob.bind_part = ob.bind_part.bind(t);
score: 0
answers question: http://stackoverflow.com/q/29512951
type: Answer

http://stackoverflow.com/comment/47193623
comment on: http://stackoverflow.com/a/29517863
type: Comment
score: 0
has text: I have var target = $('#name').val(); var redirectTo = 'http://nurelo.com/' + target + '.html';
type: AnswerComment

http://stackoverflow.com/comment/47166009
has text: OP tries to create `N` ` ` elements, your code still creates one.
comment on: http://stackoverflow.com/a/29504249
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47163770
score: 1
type: AnswerComment
type: Comment
has text: The point is that this answer is dangerously naive. Sure, if the OP is doing *exactly this* in their code, no big deal. But answers should address underlying causes and issues. Saying things like "doesn't change anything" sets a dangerous precedent that those words would remain true, which - in a large majority of cases - they won't. This is especially true in this particular scenario where the OP has already stated they're not comfortable with the concept. Reassuring that everything is fine while leaving out all the common gotchas is naive at best and borderline sadistic at worst.
comment on: http://stackoverflow.com/a/29502253

formstack
tags question: http://stackoverflow.com/q/29472859
type: Tag
tag name: formstack

mouseover
tags question: http://stackoverflow.com/q/29428001
tags question: http://stackoverflow.com/q/29435192
tags question: http://stackoverflow.com/q/29480608
type: Tag
tags question: http://stackoverflow.com/q/29398763
tag name: mouseover
tags question: http://stackoverflow.com/q/29522895

http://stackoverflow.com/comment/47029386
has text: i just updated the question. i can't regenerate the problem anymore, i don't know how that possible but the problem is gone now !!. but problem can be back (i don't know how !) and there is another problem : context menu should be fire once to work fine after that
type: Comment
comment on: http://stackoverflow.com/q/29429550
type: QuestionComment
score: 0

http://stackoverflow.com/q/29445797
type: Question
has comment: http://stackoverflow.com/comment/47386787
has answer: http://stackoverflow.com/a/29473066
answer count: 1
tagged with: javascript
has title: Android 5.1 WebView javascript problems
upvote count: 1
tagged with: android
favorite count: 0
has body: After upgrading my Nexus 7 to Android 5.1 alert() and confirm() boxes in my Webviews (WebChromeClient) are no longer executed. SetJavaScriptEnabled is set to true and alert() and confirm() worked perfectly well in all earlier versions of Android. Can anyone running Android 5.1 test this issue so I can confirm if this problem is only related to my device or if this is a bug in the Android 5.1 version?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47323929
tagged with: webview
has comment: http://stackoverflow.com/comment/47507630
has comment: http://stackoverflow.com/comment/47064209
linked to: http://stackoverflow.com/q/26044179
downvote count: 0
has comment: http://stackoverflow.com/comment/47524879
has comment: http://stackoverflow.com/comment/47063492
score: 1
has comment: http://stackoverflow.com/comment/47063466
has comment: http://stackoverflow.com/comment/47058836
has comment: http://stackoverflow.com/comment/47523670
has comment: http://stackoverflow.com/comment/47059645
has comment: http://stackoverflow.com/comment/47059714

http://stackoverflow.com/a/29460602
type: Answer
has comment: http://stackoverflow.com/comment/47100476
score: 5
accepted answer of: http://stackoverflow.com/q/29460585
upvote count: 5
has comment: http://stackoverflow.com/comment/47085739
has body: You're adding an external file and then checking for it immediately. It's not surprising that you wouldn't see it yet, the HTTP request is probably still outstanding. If you check back later, once the HTTP request is complete and the styles parsed and applied, you'll see it in document.styleSheets. According to the HTML5 specification, you can use the load event on the link element to get a notification of when the resource has been loaded. So: element.addEventListener("load", function() { console.log('After add: ' + document.styleSheets.length); }, false); console.log('Before add: ' + document.styleSheets.length); document.getElementsByTagName("head")[0].appendChild(link); Of course, loading and parsing/applying may not be simultaneous, so if you still see a disparity, you may need a setTimeout in there: element.addEventListener("load", function() { setTimeout(function() { console.log('After add: ' + document.styleSheets.length); }, 0); }, false); console.log('Before add: ' + document.styleSheets.length); document.getElementsByTagName("head")[0].appendChild(link); Re your function that tries to avoid adding a stylesheet twice, since the element is there reliably even if the entry in document.styleSheets isn't, I'd just look for the element: function requiresCSS( name ) { // If we already have an element for this stylesheet, return if (document.querySelector('link[rel=stylesheet][href="' + name + '"]') { return; } // Add it var link = document.createElement("link"); link.rel = "stylesheet"; link.type = "text/css"; link.href = name; document.getElementsByTagName("head")[0].appendChild(link); } (You could also use querySelector for finding head, it'd be a bit more concise. querySelector / querySelectorAll are supported on all modern browsers, and also IE8.)
answers question: http://stackoverflow.com/q/29460585
has comment: http://stackoverflow.com/comment/47097760
has comment: http://stackoverflow.com/comment/47099862
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47085100
downvote count: 0
has comment: http://stackoverflow.com/comment/47098012

http://stackoverflow.com/q/29482966
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47164865
has body: I've managed to successfully get ReactJS to work on the server side, but i'm having a difficult time wrapping my head around getting my client side to respond. Like I need to turn everything on or something. I'm not grabbing data via ajax or anything, any data is in JSON in the components themselves. I see lots of textual advice, but no exact code of how to get it to work. Also, I'm using react router. Additional background, I'm using commonJS and grunt to compile it. I include the compiled JS in my html file. When i click buttons and such, nothing happens. Server: var React = require('react'); var Router = require('react-router'); var Express = require('express'); var fs = require('fs'); var routes = require('./src/routes'); var app = Express(); app.use('/dist', Express.static(__dirname + '/dist')); app.use(function (req, res) { // pass in `req.url` and the router will immediately match Router.run(routes, req.url, function (Handler) { var content = React.renderToString(React.createElement(Handler, null)); var index = fs.readFileSync('index.html', {encoding: 'utf8'}); res.send(index.replace('%%%content%%%', content)); }); }); var server = app.listen(9001, function () { var host = server.address().address var port = server.address().port console.log('Example app listening at http://%s:%s', host, port) }) router: var React = require('react'); var Router = require('react-router'); var Route = Router.Route; var DefaultRoute = Router.DefaultRoute; //TODO: dynamically load each route somehow... var App = require('./app'); var Home = require('./home'); var ItemInstance = require('./item-instance'); var Todo = require('./todo'); var Task = require('./task'); var Project = require('./project'); var Workspace = require('./workspace'); var routes = ( &lt;Route name="index" path="/" handler={App}&gt; &lt;Route name="home" path="/home" handler={Home} /&gt; &lt;Route name="workspace" path="/workspace" handler={Workspace} /&gt; &lt;Route name="instanceitem" path="/:tag/:id" handle…
has comment: http://stackoverflow.com/comment/47138939
has title: allow a server side ReactJS app to respond client side
tagged with: react-router
has comment: http://stackoverflow.com/comment/47165720
type: Question
score: 0
tagged with: reactjs
tagged with: javascript
answer count: 0
has comment: http://stackoverflow.com/comment/47174609

http://stackoverflow.com/q/29387368
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46953313
has comment: http://stackoverflow.com/comment/46952949
has comment: http://stackoverflow.com/comment/46952965
type: Question
possible better answer: http://stackoverflow.com/a/29387664
has comment: http://stackoverflow.com/comment/46953072
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46952973
has body: I have to allow only alphabets to the text box. I have validated through JavaScript on text box using "on blur". The alert from the JavaScript remains open even though I try to close. Find the demo link and the JavaScript below. Note: Type any non-alphabet in the text box 1 and press tab or click on somewhere else from the following link. http://demo.acclary.com/test.aspx The JavaScript I used is, below: function checkalphabets(textbox) { var pattern = /^[a-zA-Z\s]+$/; if (!pattern.test(textbox.value)) { modal({ type: 'warning', title: 'Warning', text: 'Only Alphabets allowed!', center: false, }); setTimeout(function () { textbox.focus(); }, 1); exit; return false; } return true; } $('.modal-btn').click(function() { $('#modal-window').hide(); });
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29388172
accepted answer: http://stackoverflow.com/a/29388172
has answer: http://stackoverflow.com/a/29387664
has answer: http://stackoverflow.com/a/29387750
has comment: http://stackoverflow.com/comment/46952897
has comment: http://stackoverflow.com/comment/46952882
has title: Alert box error

http://stackoverflow.com/q/29478905
type: Question
tagged with: testing
has answer: http://stackoverflow.com/a/29478932
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/34015610
has answer: http://stackoverflow.com/a/45956508
possible better answer: http://stackoverflow.com/a/45956508
answer count: 4
favorite count: 0
accepted answer: http://stackoverflow.com/a/29478932
score: 54
upvote count: 54
has body: I have an element defined as this.clientRowName = element(by.id('CLIENT_NAME')); //page object file I want to read the text in this element which is "ABC" but doing: var client = page.clientRowName.getText(); returns an object instead of a string. Is there any other way that I can get the text for the element
has answer: http://stackoverflow.com/a/66111429
type: AnsweredQuestion
tagged with: protractor
has title: Protractor: element.getText() returns an object and not String

http://stackoverflow.com/a/29487673
answers question: http://stackoverflow.com/q/29487527
score: 0
has body: I guess this should do: function PrepareJsonFormat() { window.arr = []; // declare this array var to hold an obj jQuery.getJSON( "/abc/xyz", { varA: jQuery("#qwerty").val() }, function(data) { if (data != null &amp;&amp; data != "") { $.each(data, function(i, val) { arr.push(val.value); // here you can push the val.value in the array decalred. }); } }); }
type: Answer

http://stackoverflow.com/q/29528014
has body: The switch statement has different cases but for the default, the user is prompted to enter a new value. I want that new value to be checked against the different cases. If case matches, corresponding code is executed. But otherwise, it will go to default and re-prompt. How do I write the code to re-check the expression inside the switch statement? var anyLetter; anyLetter = prompt("Enter one of the following letters (b, o, or h): "); switch(anyLetter) { case "b": case "B": //code if user enters b or B break; case "o": case "O": //code break; case "h": case "H": //code break; default: var anyLetterAgain; anyLetterAgain = prompt("Enter one of the following letters (b, o, or h): "); } I want what the user enters for anyLetterAgain to run thru the switch statement, and continue until b, o, or h is entered. Please help! Thanks
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29528076
has title: Q about JavaScript: how can i "reset" switch statement?
tagged with: switch-statement
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29528264
has comment: http://stackoverflow.com/comment/47210187
score: 0
possible better answer: http://stackoverflow.com/a/29528076
answer count: 3
has answer: http://stackoverflow.com/a/29528048
accepted answer: http://stackoverflow.com/a/29528048
upvote count: 1
favorite count: 0

http://stackoverflow.com/comment/46937383
type: AnswerComment
score: 0
type: Comment
has text: yes that looks better, I guess the one thing I wasn't totally clear about is that first column always needs to have 3 divs in it. My bad.
comment on: http://stackoverflow.com/a/29378349

http://stackoverflow.com/comment/46933780
type: QuestionComment
has text: Reasonable thought with the `Accept-Encoding`, but already gave it a go, and confirmed that it will *always* send back `Content-Encoding: gzip`, regardless.
comment on: http://stackoverflow.com/q/29376101
score: 0
type: Comment

http://stackoverflow.com/a/29419252
has comment: http://stackoverflow.com/comment/47012446
answers question: http://stackoverflow.com/q/29418161
has comment: http://stackoverflow.com/comment/47013118
accepted answer of: http://stackoverflow.com/q/29418161
score: 0
type: AcceptedAnswer
type: Answer
has body: The result you're trying to achieve is not impossible, but there are two things that are off is one thing that is off with your current approach: You cannot perform an ActiveRecord query (i.e. Vacancy.find(...)) from within the view template. This action is typically performed from within the controller. Total brain cramp on my part -- it's definitely possible :P You are attempting to mix Angular scopes with interpreted Ruby code. The reason you're getting the nil:NilClass exception is because in the scope of that Ruby code, there's no defined "vacancy" variable, even though it's defined in Angular's scope. The way you could achieve the retrieval of Vacancy objects is through an API layer set up to communicate between your Rails database backend and your AngularJS frontend. The process could look something like: Define dedicated routes for your api in your Rails routes. Set up an Angular controller which triggers a GET request to your specific API route. Once that route is hit, your specific Rails controller action kicks in, which can fetch your Vacancy objects, and return a JSON response. Then, your Angular code can handle the provided response to assign the returned vacancies JSON object to $scope.vacancies. Then you can do ng-repeat in your view and you'll have the full Vacancy objects within your vacancies collection, without having to fetch each one as a separate request. I think this article can give you a clearer example to work off of. There's a decent amount of information to cover on the subject of integrating Rails with AngularJS, and I know you didn't ask for this specifically, but this book covers the basics of integrating Rails and Angular quite well. AngularJS + Rails.

http://stackoverflow.com/comment/47176731
has text: show your ajax code and only errors you got.
type: QuestionComment
comment on: http://stackoverflow.com/q/29510317
type: Comment
score: 0

http://stackoverflow.com/q/29445936
answer count: 1
downvote count: 0
tagged with: jsp
tagged with: javascript
tagged with: jquery
has title: Javascript error:Uncaught TypeError: Cannot read property 'branchei' of undefined
favorite count: 0
has body: i have this javascript code: &lt;script type="text/javascript"&gt; var b=document.update.branchei; function selectItemByValue(b, &lt;%=branche%&gt;){ for(var i=0; i &lt; b.options.length; i++) { if(b.options[i].value == &lt;%=branche%&gt;) b.selectedIndex = i; } } &lt;/script&gt; 'update' is the name of the form and 'branchei' is the name of the selectbox.
tagged with: http://stackoverflow.com/tag/html
upvote count: 1
has answer: http://stackoverflow.com/a/29445969
has comment: http://stackoverflow.com/comment/47058875
type: AnsweredQuestion
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/29445969

http://stackoverflow.com/a/29530236
downvote count: 0
has body: The problem was with your attr if you use attr you should use attr('disabled', 'disabled') and if you want to use ('disabled', true) then use prop attribute. And one more you must enable other input box so user can enter value in one box at least. &lt;script&gt; function toggleNominalStatus() { if ($('#nominalRadioBox').attr("checked")) { $('#nominalInputBox').removeAttr('disabled'); $('#percentInputBox').attr('disabled', 'disabled'); } } function togglePercentStatus() { if ($('#percentRadioBox').attr("checked")) { $('#percentInputBox').removeAttr('disabled'); $('#nominalInputBox').attr('disabled', 'disabled'); } } &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/29530114
score: 1
upvote count: 1

http://stackoverflow.com/comment/47020563
type: Comment
has text: You can reverse the order and then do two separate queries. :)
comment on: http://stackoverflow.com/a/29410584
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47005549
type: Comment
comment on: http://stackoverflow.com/a/29415986
score: 0
has text: Answer and comments both being totally ignored by OP, *tsk tsk*.
type: AnswerComment

http://stackoverflow.com/comment/46972328
has text: He says he wants to handie it "differently" in the child. That different handling should be in the child's event handler. `stopPropagation` then serves to stop it from _also_ being handled in the parent.
type: Comment
comment on: http://stackoverflow.com/a/29396745
type: AnswerComment
score: 0

http://stackoverflow.com/comment/47075013
has text: Thanks! My js understanding became better!
comment on: http://stackoverflow.com/a/29454856
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29430374
tagged with: scope
score: 0
has comment: http://stackoverflow.com/comment/47030374
tagged with: nested
has answer: http://stackoverflow.com/a/29479603
type: UnansweredQuestion
has body: Is it possible to insert new actions inside the scope of a function from outside? For example: function main(){ //I want to insert in here new action to perform } var dosomething = function() { console.log("I want to be inside the main"); } main(); How do I make the function main permanently execute the function dosomething? And after that, how can I take out the function dosomething from the main? The concept is more or less this: function main(){ //I want to insert in here new actions to perform } var dosomething = function() { console.log("I want to be inside the main"); } *insert dosomething in main* //This is how it should look now the function main: function main(){ dosomething(); } *erase dosomething from main* //The function main come back to be empty: function main(){ } The only solution I found is to make the function main execute all the functions inside an array and use this array to insert/take-out functions from outside. Is there any better solution?
linked to: http://stackoverflow.com/q/24911700
has title: Insert a new function inside a function...from outside
has comment: http://stackoverflow.com/comment/47030996
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/47030343
has comment: http://stackoverflow.com/comment/47069152

http://stackoverflow.com/a/29425146
type: Answer
accepted answer of: http://stackoverflow.com/q/29425108
has body: That's a strange syntax, but something like this maybe $wnd.$(el) .find('li:gt(9)') .hide() .end() .append( $wnd.$(' +More ').click(function () { $wnd.$(this).remove().siblings(':hidden').slice(0, 10).show(); if ($wnd.$(el).find('li:hidden').length === 0) { $wnd.$(el).append( $wnd.$(' +Less ').click(function () { $wnd.$(el).find('li:gt(9)').hide(); }) ) } }) );
upvote count: 2
answers question: http://stackoverflow.com/q/29425108
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29444116
score: 4
accepted answer of: http://stackoverflow.com/q/29444081
has body: use parsedTest = JSON.parse( $("#fileuploaddelete").val());// this will convert it into array
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29444081
upvote count: 4
downvote count: 0

http://stackoverflow.com/a/29410328
answers question: http://stackoverflow.com/q/29410046
has body: here is a little fiddle that can handle it : https://jsfiddle.net/pnok7euo/ And code for it. In a simple way : a div container is positionned relative. Both 2 other divs are positionned in it in absolute (100% width/height). A link is positionned, but it can be anywhere else. On JS, when the link is mouseover, we just fadeOut the first block and fadeIn the second one. HTML : Back content ? Back 2 content ? JS : jQuery(document).on('mouseover','a.hover',function(){ jQuery('div#back').stop().fadeOut() ; jQuery('div#back2').stop().fadeIn() ; }) ; jQuery(document).on('mouseout','a.hover',function(){ jQuery('div#back2').stop().fadeOut() ; jQuery('div#back').stop().fadeIn() ; }) ; CSS : div#container { width:500px ; height:300px ; position:relative ; } div#back, div#back2 { position:absolute ; top:0 ; left:0 ; right:0 ; bottom:0 ; background-position:center center ; background-repeat:no-repeat ; color:white ; text-align:center ; font-size:2em ; } div#back { background-image:url('http://angeoudemongif.a.n.pic.centerblog.net/d3e42620.gif') ; z-index:4 ; } div#back2 { background-image:url('http://www.joomlaworks.net/images/demos/galleries/abstract/7.jpg') ; z-index:2 ; } a.hover { position:absolute ; display:block ; background:white ; opacity:0.8 ; padding:10px ; top:10px ; left:10px ; z-index:10 ; }
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29410046
score: 2

http://stackoverflow.com/comment/47022247
has text: Well, that's a simple one: your `insertAfter` does expect **dom nodes**! Neither `orangeBlock` (a string) nor `greyBlock` (a nodelist) are nodes!!!
comment on: http://stackoverflow.com/q/29425483
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29510338
has body: Yes it's possible. First of all, you will need something like this as structure: 1 2 3 4 5 6 The .scroll element will be your scrolling container, it's limited in either width or height (depending on how you want to scroll) and has an overflow. The .container on the other hands takes the highest possible width, so for 6 elements it would be element width * 6. Finally, because you want to create a left/right scrolling animation, you probably want to set float: left to all .element nodes. The JavaScript code isn't hard either. You want to add an onScroll event handler to the .scroll element, you can do that like this: query(".scroll").on("scroll", function(evt) { }); Then you want to detect whether or not you're scrolling to the left or right. You can do that by comparing the scrolling offset to the previous scrolling offset, for example: if (lastPos && lastPos - evt.target.scrollLeft > 0) { // Scrolling to the left } else if (lastPos && lastPos - evt.target.scrollLeft < 0) { // Scrolling to the right } lastPos = evt.target.scrollLeft; Now, inside the if, you want to loop over all your .element's, detect whether or not on the left- or rightside of the visible portion, and if it is on one of those sides, you move it to the other side (depending on the scrolling direction). To check whether or not the element is on the left- or right-side of the .scroll, I'm using Element.getBoundingClientRect(): var isLeftOfContainer = function(element) { var bounds = element.getBoundingClientRect(); return (-bounds.left + element.parentNode.offsetLeft) >= bounds.width; }; var isRightOfContainer = function(element) { var bounds = element.getBoundingClientRect(); var box = element.parentNode.parentNode.getBoundingClientRect(); return bounds.left - element.parentNode.offsetLeft > box.width; }; To move the node to the other side, I'm using dojo/dom-construct::place(). You can add either "first" or "last" as third parameter, depending on the direction you're scrolling, for example: domCons…
has comment: http://stackoverflow.com/comment/47179906
answers question: http://stackoverflow.com/q/29388755
has comment: http://stackoverflow.com/comment/47180908
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/47180952
score: 0
downvote count: 1

http://stackoverflow.com/a/29399703
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46975826
answers question: http://stackoverflow.com/q/29397865
accepted answer of: http://stackoverflow.com/q/29397865
has body: So if I get it right you want to know how to make a progress bar? I'd say if you don't want to get too much into the niddy-griddy parts, I'd recommend bootsrap and jquery. I made an example of something I would do: http://jsfiddle.net/1tq6scga/3/ //JS var song_seconds = 10; c = 0; i = 0; var invt = setInterval(function(){ c = i/song_seconds; c = (Math.round(c * 100 * 100)/100) + '%'; $('.progress-bar').html(c); $('.progress-bar').css({'width':c}); i++; if(i === song_seconds + 1) { clearInterval(invt); } }, 1000); so for you I would make it so that the variable max is the length of the song in seconds. Then I'd wrap this up in a function and do it so once a button play is clicked this code is ran in the background, and when I pause the song then the interval gets cleared. I really don't wanna write more than this, because it requires coding a whole webpage. But this should be enough to get you started.

http://stackoverflow.com/q/29382526
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29383160
has answer: http://stackoverflow.com/a/29383160
accepted answer: http://stackoverflow.com/a/29385087
answer count: 3
favorite count: 0
has body: I'm using react to mounting two same components on a page, var SelectBox = React.createClass({ getDefaultProps: function() { return { value: [] }; }, getInitialState: function() { return {checked: this.props.value,count: 1}; }, handleClick: function() { var opt = this.state.checked; opt.push({id: this.state.count, name: this.state.count}); this.setState({checked: opt, count: this.state.count + 1}); }, render: function() { var that = this; var options = this.state.checked.map(item => {item.name} ); return ( {options} add ); } }); React.render( <SelectBox name='one'/>, document.getElementById('one') ); React.render( <SelectBox name='two'/>, document.getElementById('two') ); then click the button of the 'one', it's alright, but when i click the button of the 'two', some of 'one' crop up in 'two',why?? it make me confuse. console show: Warning: flattenChildren(...): Encountered two children with the same key, `.$checked-two1`. Child keys must be unique; when two children share a key, only the first child will be used. but just do some change var a = [{id: 5, name: 5}]; React.render( <SelectBox name='one' value={a}/>, document.getElementById('one') ); it work properly. what happenned？is there something wrong or it's bug？
has answer: http://stackoverflow.com/a/33727528
type: AnsweredQuestion
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/29385087
has title: React.js confuse with 'two children with the same key'
type: Question
tagged with: reactjs

http://stackoverflow.com/a/29426424
answers question: http://stackoverflow.com/q/29425072
has comment: http://stackoverflow.com/comment/47025551
has comment: http://stackoverflow.com/comment/47023942
has body: I think its ok to use policy to save data into the res.locals, but in my implementation I save data to the request itself and send it to the view in the controller (It looks clearer to me) config/policies/getCategories module.exports = function(req, res, next){ Categories.find().exec(function(err, models) { if (err) return res.badRequest("Error"); req.categories = models; next(); }); } api/controllers/ABCController.js module.exports = { index : function(req, res, next){ res.view('page/index', { categories : req.categories }); } } config/policies.js ABCController : { index: ['getCategories', 'getProfiles'] // add this policy to any page who needs nav bar categories } **config/routes.js '/home/': { controller: "ABCController", action: "index" }
has comment: http://stackoverflow.com/comment/47039914
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/47063657

http://stackoverflow.com/comment/47943432
has text: Adding a concrete example will help
comment on: http://stackoverflow.com/q/29390517
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47156155
has text: You caught me. Thanks J
score: 0
comment on: http://stackoverflow.com/q/29498193
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29432360
has answer: http://stackoverflow.com/a/29433784
accepted answer: http://stackoverflow.com/a/29433784
tagged with: javascript
score: 0
has title: Equating two Objects in JavaScript. On Changing one, second automatically changes
answer count: 1
has body: I am trying to use a hash map in a for loop: But while resetting the second object, it is automatically changes Map values of the previous Key in the Hash Map.Please help me prevent this. Code: for (i = 0; i &lt; tds.length; ++i) { tdtext = $(tds[i]).text(); //iIndex = tdtext.indexOf('Success')&gt;-1 ? tdtext.indexOf('Success') : tdtext.indexOf('Failed'); iIndex = 8; key = tdtext.substring(0, iIndex); outcome = tdtext.substring(iIndex); //var sCombine = sNum1 + sNum2; console.log(iIndex, outcome); //Reset oCount for next use var oCount = Object.create(null); oCount.total = 0; oCount.success = 0;//2. Here it is changing the vlaues assigned in step 1 //Case 1: If map already has key if (map.hasOwnProperty(key)) { //var ob = map.get(key); if (outcome === "Success") map[key].success++; map[key].total++; } //Case 2: If map doesn't have key else { if (outcome === "Success") oCount.success++; //If outcome is failure or success irrespective of that we increase the total count oCount.total++; map[key] = oCount;//1. Here I am Equating 2 Objects }
has comment: http://stackoverflow.com/comment/47034456
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/29480962
has comment: http://stackoverflow.com/comment/47122772
has comment: http://stackoverflow.com/comment/47122759
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47123029
has answer: http://stackoverflow.com/a/29481204
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29481204
has answer: http://stackoverflow.com/a/29481324
tagged with: django
has title: Use jQuery to return only the first table cell value following a selected checkbox
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47122868
has comment: http://stackoverflow.com/comment/47122838
has body: http://jsfiddle.net/nealjones/xpyhxg0t/1/ I'm relatively new to jQuery and regrettably have been stumped on this issue for days. If you open up the terminal and view the console, when either of the bottom two boxes are checked, it outputs ALL values, I need it to output only the ONE value that is associated with that checkbox (on the same row). My purpose is to ultimately insert an additional row on a table within a Django Admin page which will display the total and average of different columns. I imagine this simply comes down to properly navigating the DOM, but like I mentioned, I am currently stumped. Thanks for taking the time to look at this. HTML: &lt;div class="results"&gt; &lt;table id="result_list"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope="col" class="action-checkbox-column"&gt; &lt;div class="text"&gt;&lt;span&gt;&lt;input type="checkbox" id="action-toggle" /&gt;&lt;/span&gt; &lt;/div&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;/th&gt; &lt;th scope="col" class="sortable column-status"&gt; &lt;div class="text"&gt;&lt;a href="?o=1"&gt;Status&lt;/a&gt; &lt;/div&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;/th&gt; &lt;th scope="col" class="sortable column-pool"&gt; &lt;div class="text"&gt;&lt;a href="?o=2"&gt;Pool&lt;/a&gt; &lt;/div&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;/th&gt; &lt;th scope="col" class="sortable column-_id"&gt; &lt;div class="text"&gt;&lt;a href="?o=3"&gt; id&lt;/a&gt; &lt;/div&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;/th&gt; &lt;th scope="col" class="sortable column-number"&gt; &lt;div class="text"&gt;&lt;a href="?o=4"&gt; Number&lt;/a&gt; &lt;/div&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;/th&gt; &lt;th scope="col" class="sortable column-id_number"&gt; &lt;div class="text"&gt;&lt;a href="?o=5"&gt; id number&lt;/a&gt; &lt;/div&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;/th&gt; &lt;th scope="col" class="sortable column-property_type"&gt; &lt;div class="text"&gt;&lt;a href="?o=6"&gt;type&lt;/a&gt; &lt;/div&gt; &lt;div cl…
type: Question
accepted answer: http://stackoverflow.com/a/29481324

http://stackoverflow.com/comment/47208371
has text: I also added some information about the display names to [the timezone tag wiki](http://stackoverflow.com/tags/timezone/info).
comment on: http://stackoverflow.com/a/29522931
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/47198690
type: QuestionComment
comment on: http://stackoverflow.com/q/29521844
has text: When I console log information in that function it outputs twice.
score: 0
type: Comment

http://stackoverflow.com/q/29475779
upvote count: 7
tagged with: javascript
has answer: http://stackoverflow.com/a/29476036
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4631928
downvote count: 0
score: 7
favorite count: 0
possible better answer: http://stackoverflow.com/a/29475849
tagged with: angularjs
has title: How to convert epoch to readable dates in Angular to use in Chartist
type: Question
has answer: http://stackoverflow.com/a/29475849
tagged with: epoch
answer count: 2
tagged with: datetime
accepted answer: http://stackoverflow.com/a/29476036
has body: Here I'm getting an array of date/time epochs ApiFactory.getTweetQuotes(the_ticker).then(function(data) { // Create epoch array: for (var i = 0; i &lt; data.data.quotes.length; i++) { vs.tweet_epochs.push(data.data.quotes[i].start_epoch); } console.log(vs.tweet_epochs); initChart(); vs.loadingChart = true; }); vs.tweet_epochs looks like this consoled out: I'm using Chartist and it's not printing out very pretty at the moment: I found this answer here Convert UTC Epoch to local date with javascript however it just added 3 more 0's to each epoch instead of convert them into dates. If you need the Charist code: var initChart = function() { var data = { labels: vs.tweet_epochs, series: [ vs.tweet_vol ] }; // Chart options: var options = { showPoint: true, showArea: true, lineSmooth: true, fullWidth: true, axisX: { showGrid: false, showLabel: true }, axisY: { offset: 40, labelInterpolationFnc: function(value) { return '$' + value; } } }; var chart = new Chartist.Line('.ct-chart', data, options); }

http://stackoverflow.com/comment/46958443
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29390675
has text: Well, I actually don't want to call a global function but the one that's in the same scope of the method, called `x()` if I pass in `x` as an argument.

http://stackoverflow.com/comment/47021812
comment on: http://stackoverflow.com/a/29382340
score: 0
type: AnswerComment
type: Comment
has text: Everything on the internet has a direct URL that keeps everything linked. In the "your link" section, you would put the direct URL to the image or webpage that you want your user to be source to upon click. [Example: If you want to link to your image directly, you would insert... " http://www.YourWebsite.com/images/YourImage.jpg ", and it would be the exact same link that you put inside your SRC.] You need the direct URL to your image, if you're going to source it. Every linked action within code requires the designation of a path/link/url, and if you don't have the path, then you're screwed.

http://stackoverflow.com/q/29511322
has comment: http://stackoverflow.com/comment/47178579
tagged with: http://stackoverflow.com/tag/html
has body: Hi i am developing one intranet app for this i have a functionality like i need get ther username and password of whom are logged in that particular system i got following snippet for ie var objUserInfo = new ActiveXObject("WScript.network"); document.write(objUserInfo.ComputerName+"&lt;br&gt;"); document.write(objUserInfo.UserDomain+"&lt;br&gt;"); document.write(objUserInfo.UserName+"&lt;br&gt;"); var uname = objUserInfo.UserName; alert(uname); but it is not working any other browser can acny one help me regarding this note:i am okay if there is any alternate solution for this
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47178941
has title: how to get windows logged in user details using javascript or angular js
has comment: http://stackoverflow.com/comment/47179240
linked to: http://stackoverflow.com/q/12754437
tagged with: javascript
type: Question
score: 0
linked to: http://stackoverflow.com/q/3899643
tagged with: angularjs

socket.io
tags question: http://stackoverflow.com/q/29410687
tags question: http://stackoverflow.com/q/29512210
type: Tag
tags question: http://stackoverflow.com/q/29479770
tags question: http://stackoverflow.com/q/29491731
tags question: http://stackoverflow.com/q/29377329
tag name: socket.io
tags question: http://stackoverflow.com/q/29493127
tags question: http://stackoverflow.com/q/29481085
tags question: http://stackoverflow.com/q/29511404
tags question: http://stackoverflow.com/q/29379138
tags question: http://stackoverflow.com/q/29374270
tags question: http://stackoverflow.com/q/29468984
tags question: http://stackoverflow.com/q/29496378
tags question: http://stackoverflow.com/q/29516393
tags question: http://stackoverflow.com/q/29417485
tags question: http://stackoverflow.com/q/29425248

http://stackoverflow.com/a/29452560
downvote count: 0
has body: I think I got this particular message just yesterday. Avast ended up flagging it while it was being downloaded through Outlook, and I thought to have a look at it today. It seems the attachment I received is identical to yours. Let's focus on the script. The first line, function BDE(r), looks like a decoder of sorts. Looking at the second line, which calls this function, it is apparent that BDE() is a base64 decoder. The second line calls it to convert the base64 into a blob and stores it in BSs. If you decode the base64 string, you'll notice that the result isn't exactly readable. Looking at the rest of the script, it is clear that the decoded result is fed through another function, and after being transformed by that function, should result in something that looks like HTML. The third line is where it gets interesting. Here's the code prettified: function XD1(r, t) { var n = [], o = ""; for (z = 1; 255 &gt;= z; z++) n[String.fromCharCode(z)] = z; for (j = z = 0; z &lt; r.length; z++) o += String.fromCharCode(n[r.substr(z, 1)] ^ n[t.substr(j, 1)]), j = j &lt; t.length ? j + 1 : 0; return o } Variable n is an array, which is initialized with values 0 to 255, as you can see from the third line. We'll call it the "cipher table". o is the return value. The fourth line is where the real work gets done. Keep in mind r is the content to decrypt, and t is the key. What the loop does is for each byte in the content, it uses that byte to index into the cipher table, and at the same time, sequentially picks a byte from the key and uses it to index into the cipher table. The two resulting bytes are XORed together, converted to a character, and appended to the result. The reason why the table is used instead of XORing directly is because a string XOR a string doesn't produce a useful result. Instead, by indexing into the table, two numbers are received, which can be XORed together, and the result can be converted to a character. In the end, this is your standard XOR cipher. One…
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29381276

http://stackoverflow.com/q/29425826
tagged with: jsp
has title: File upload clearing in jsp
possible better answer: http://stackoverflow.com/a/29426688
accepted answer: http://stackoverflow.com/a/29428300
has body: The scenario is to upload and preview image for crop and save it. Every thing is working fine but when i'm uploading the image and press cancel the dialog for cropping and trying to upload another file its showing the previous image in preview as well. i.e previewing the previous and latest file both. I want only recent uploaded file. i.e want to clear the previous upload. Here is the jsp code: function imageHandler(e2) { document.getElementById("cropbox").src = e2.target.result; initJcrop(); $("#dialog").dialog({ show: { effect: "blind", duration: 1000 } , width:document.getElementById('cropbox').height }); } function readFile(e1){ var filename = document.getElementById('imageId').files[0]; var fr = new FileReader(); fr.readAsDataURL(filename); fr.onload = imageHandler; document.getElementById("isSubmit").value = "false"; // document.getElementById("postForm").submit(); } &lt;span id="reuploadImg" &gt;&lt;html:file name="uf" property="file" size="37" onchange="readFile(this)" styleId="imageId" /&gt;&lt;/span&gt; &lt;div id="dialog" style="display: none" title="Preview"&gt; &lt;img id="cropbox"&gt; &lt;br/&gt;&lt;br/&gt; &lt;div style="width: 100%;text-align: center"&gt; &lt;input type="button" value="Save" onclick="cropPic()" class="stdbutton"/&gt; &lt;input type="button" value="Cancel" onclick="closeDialog()" class="stdbutton"/&gt; &lt;/div&gt; &lt;/div&gt;
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
answer count: 2
tagged with: struts-1
has answer: http://stackoverflow.com/a/29428300
tagged with: javascript
has answer: http://stackoverflow.com/a/29426688
type: AnsweredQuestion

http://stackoverflow.com/q/29459508
has comment: http://stackoverflow.com/comment/47109314
type: Question
has title: Handsontable: Updating renderers after removing row
has comment: http://stackoverflow.com/comment/47086508
has answer: http://stackoverflow.com/a/29476792
has comment: http://stackoverflow.com/comment/47088772
favorite count: 0
has body: I am trying to implement Handsontable into our reporting system. Ive done everything i wanted except one thing. I am highlighting error cell using renderers (simply by setting red color on background). However when i remove row by context menu->remove row, all renderers remain on their x-y positions. I'd like them to follow their rows instead. $container.handsontable({ data: data, rowHeaders: true, colHeaders: true, minSpareRows: 1, contextMenu: true, stretchH: 'all', comments: true, cells: function(row, col, prop) { var cellProperties = {}; {foreach $excelError as $error} if (row === {$error['row']} &amp;&amp; col === {$error['col']}) { cellProperties.renderer = {$error['renderer']}; cellProperties.comment = {$error['desc']}; } {/foreach} if (row === 0) { cellProperties.renderer = firstRowRenderer; } return cellProperties; } }); Despite variable name $error it also contents correct row data which just pain cells with white color. The errorRenderer function looks like this (white one is similar to this one) var errorRenderer = function(instance, td, row, col, prop, value, cellProperties) { Handsontable.renderers.TextRenderer.apply(this, arguments); $(td).css({ background: 'red', color: "white", fontWeight: "bold" }); }; Any idea how to fix that? I'd be fine even just with catch of that remove row event as i can call ajax and rerender cells again. Thank you for any ideas. EDIT: Fixed solution: var cellsProp = new Array(); {foreach $excelError as $error} cellsProp[{$error['row']}] = new Array(); cellsProp[{$error['row']}][{$error['col']}] = {$error['renderer']|noescape}; {/foreach} var removing = false; $container.handsontable({ data: data, rowHeaders: true, colHeaders: true, minSpareRows: 1, contextMenu: true, stretchH: 'all', comments: true, cells: function(row, col, prop) { var cellProperties = {}; if (typeof cellsProp[row] != "undefined") { cellProperties.renderer = cellsProp[row][col]; } if (row === 0) { cellProperties.renderer = firstRowRenderer; } return cellPr…
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/47110864
has comment: http://stackoverflow.com/comment/47110240
tagged with: handsontable
score: 0
accepted answer: http://stackoverflow.com/a/29476792
has comment: http://stackoverflow.com/comment/47110837
downvote count: 1
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/47155560
has text: Browsers enforce permissions to prevent reading files out of the local file system. To host the page instead, I'd recommend using Python's built-in server. See the D3 docs for more details: https://github.com/mbostock/d3/wiki#using
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29498111

http://stackoverflow.com/comment/46948274
type: Comment
type: QuestionComment
score: 2
has text: I'm sorry to close-vote this "Fools days" question - but I think it is just a tad to off-topic
comment on: http://stackoverflow.com/q/29381899

http://stackoverflow.com/comment/47047001
type: Comment
type: QuestionComment
has text: Shouldn't karma be loading the output JS files rather than the input JSX? (I'm not familiar with JSX, but have set up ES6/Babel projects like that before)
comment on: http://stackoverflow.com/q/29437997
score: 0

http://stackoverflow.com/comment/139411009
type: Comment
score: 1
has text: I have made a reusable component that combines these enhancements and also reworks the function to return a `Promise` instead of directly taking a callback. https://github.com/logiclrd/DetectWebMAlphaSupport/
type: AnswerComment
comment on: http://stackoverflow.com/a/40511297

http://stackoverflow.com/comment/47239714
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29497305
has text: In the past I have rolled my own solution by creating a custom code Tag (implementing TagSupport) that would spit out a javascript block declaring a javascript var, and generating the JSON to represent the object you pass in. It does work real nice when you have a smaller object you wish to access in JS.

http://stackoverflow.com/q/29393430
type: Question
upvote count: 4
tagged with: google-visualization
has body: I've built a google chart stacked column chart. I am able to annotate each stacked item. When it comes to styling each column item, only the last stacked item is effected. working code for the last stacked item: // Create the data table. var data = google.visualization.arrayToDataTable([ ['Genre', '', "Label", { role: 'annotation', role:'style' } ], ['column1', 5, 11, 31, 'opacity: 0.2'], ['column2', 5, 12, 32, 'opacity: 0.2'], ['column3', 5, 13, 33, 'opacity: 0.2'], ['column4', 5, 14, 34, 'opacity: 0.2'], ['column5', 5, 15, 35, 'opacity: 0.2'], ['column6', 5, 26, 36, 'opacity: 0.2'] ]); I've played around with the code a lot but always receive an error. I would like to apply styles for each of the series of data in each data row(stacked columns).
tagged with: javascript
has comment: http://stackoverflow.com/comment/46963831
linked to: http://stackoverflow.com/q/29409613
answer count: 1
has answer: http://stackoverflow.com/a/29393594
favorite count: 0
has title: Google chart stacked column chart. How to style each individual stacked item (data series)
type: AnsweredQuestion
tagged with: charts
score: 3
tagged with: stacked
accepted answer: http://stackoverflow.com/a/29393594
downvote count: 1

http://stackoverflow.com/comment/47028105
comment on: http://stackoverflow.com/q/29428672
type: Comment
has text: They are not on the same server, web project will be on web server (in this case on a virtual pc) and any client will have their own embedded http server to handle client responses, I know it sounds weird but I will save a video file from user's desktop to shared storage via the web project. I'm sending ajax request from client's browser and embedded http server will handle the request.
type: QuestionComment
score: 0

http://stackoverflow.com/a/29418147
has comment: http://stackoverflow.com/comment/63003162
has comment: http://stackoverflow.com/comment/67532755
score: 30
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/67514569
accepted answer of: http://stackoverflow.com/q/29417374
has body: You have to do the opposite: for( var i = scene.children.length - 1; i &gt;= 0; i--) { obj = scene.children[i]; scene.remove(obj); } because in each iteration the .children array changes once you do a .remove() from the start and the indexing of that array changes. If you want to understand it better, unroll the for loop and follow what the index into the array is.
upvote count: 30
answers question: http://stackoverflow.com/q/29417374
type: Answer

http://stackoverflow.com/q/29490199
has body: Can anyone help me for getting the time in seconds of a youtube video that was watched?
upvote count: 0
answer count: 1
has title: How long Youtube Video was Watched for?
favorite count: 0
has comment: http://stackoverflow.com/comment/47139432
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29607365
has comment: http://stackoverflow.com/comment/47139622
downvote count: 2
type: Question
tagged with: google-analytics
score: -2
tagged with: javascript

http://stackoverflow.com/q/29500716
tagged with: google-chrome
type: Question
tagged with: reactjs
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29500991
has body: I'm having trouble getting getBoundingClientRect() working in Google Chrome. My code is the following: React.js render: render() { return ( &lt;div className="TapTwo-container" ref="clickContainer" onClick={this._handleTap}&gt; &lt;div id="TapTwo-forkContainer" className="TapTwo-forkContainer u-animationLinear u-animationLoop tapTwo-moveForkLeft" ref="fork"&gt; &lt;img src="img/fork.png" className="tapTwo-fork"/&gt; &lt;/div&gt; &lt;div className="TapTwo-pieContainer"&gt; &lt;img src="img/pie.png" className="tapTwo-pie" /&gt; &lt;img src="img/plate.png" className="tapTwo-plate"/&gt; &lt;/div&gt; &lt;/div&gt; ) } The function _handleTap does the following: _handleTap() { let element = document.getElementById('TapTwo-forkContainer'); let box = element.getBoundingClientRect() let top = box.top; let left = box.left; console.log(Math.round(top),Math.round(left)); } Things to note here: The TapTwo-forkContainer gets animated + transformed with CSS. It moves from the left of the screen to the right, for example, one of the keyframes: @-webkit-keyframes moveForkLeft { 0% { transform: translate(0,0); } 100% { transform: translate(1250px, 0); } } When I test it in Firefox, the every click I get a different value based on the position of the TapTwo-forkContainer. However, when I check it in Google Chrome (41.0.2272.118), I get the same values over and over again. Here's a demo (try spamming the Click me button and see the values returned in the console) http://jsfiddle.net/d26cpdfk/4/
upvote count: 1
answer count: 1
has title: getBoundingClientRect returning same value in Chrome
has answer: http://stackoverflow.com/a/29500991
favorite count: 0
has comment: http://stackoverflow.com/comment/47160431
has comment: http://stackoverflow.com/comment/47160506
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47160213
downvote count: 0
score: 1

http://stackoverflow.com/comment/47010765
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29419295
type: Comment
has text: @JohannesReuter, Your answer is correct. If you want to answer the question with that, I will mark it as the correct answer. Thank you for the insight...

http://stackoverflow.com/q/29448756
has title: Images containing chart are not repainted after ajax load()
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47065668
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/29449902
has body: I've a page containing dataTable.NET and two images which contain charts rendered by controller. If I render a complete page first time, everything is OK. But when I handle row click event on dataTable and trying to generate another charts depending on row Id, the images are not repainted, but if I inspect network traffic in browser, there is HTTP result 200 and mouse over icon in Firefox's log entry shows an image with the new content. Here is my code to reaload images. If I debug my controller and/or trying debug view using alert dialogs in ajax load callback, everythink seems work properly except the images are not repainted and page shows images loaded first time when complete page has been loaded. Please, could anybody push me forward and point out what I'm missing and/or doing wrong way? Thanks, pf $('#cashnode-datastatus-table-id').on('click', 'tbody tr', function() { $('#cashnode-datastatus-table-id tbody tr').removeClass('selected'); var row = $(this); row.addClass('selected'); var data = CashNodeDataStatusTable.fnGetData(row); var url = '/Data/DataStatus/NodeAmountStatusChart?Id=' + data.DT_RowId; $("img#NodeAmountStatusChart").load(url); url = '/Data/DataStatus/NodeCountStatusChart?Id=' + data.DT_RowId; $("img#NodeCountStatusChart").load(url); });
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47065352
type: Question
accepted answer: http://stackoverflow.com/a/29449902
tagged with: asp.net-mvc
answer count: 1

http://stackoverflow.com/comment/47105079
type: Comment
type: QuestionComment
has text: Please us http://jsfiddle.net or http://codepen.io/ instead of uploading a file with DropBox. i wouldn't recommend people to download files like this from DropBox (you know, viruses and all that...)
score: 0
comment on: http://stackoverflow.com/q/29438912

http://stackoverflow.com/comment/47118486
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29478296
score: 0
has text: Many alternatives there, most are complex or voted down because they are incorrect. I only need something that looks a bit bell-curve-ish, it's not to specific. Does anyone have a sugestion?

http://stackoverflow.com/comment/47054668
comment on: http://stackoverflow.com/q/29443503
score: 4
has text: You should assign the reduced value back to `y`, like this `y -= 4`
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47169934
has text: I'm not sure if you can make it synchronous, but that's deprecated anyway. You need to nest callbacks to accomplish that... I will update answer
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29503783
type: Comment

http://stackoverflow.com/a/29467788
accepted answer of: http://stackoverflow.com/q/29467758
answers question: http://stackoverflow.com/q/29467758
has comment: http://stackoverflow.com/comment/47097808
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Create a new Audio object each time you want to play the same sound clip (if its already playing). function playSound() { var snd = new Audio(); snd.src = "sound.mp3"; snd.play(); }

http://stackoverflow.com/q/29385692
has title: How can I drag edit form properly in jqgrid?
has comment: http://stackoverflow.com/comment/46955542
tagged with: jquery-ui
tagged with: jqgrid
tagged with: javascript
tagged with: jquery
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46950820
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46999061
answer count: 0
score: 1
upvote count: 1
has body: When I drag a edit form, the position of the form is not valid. Always it starts from position (0,0) to the window. Its position is not relative to mouse cursor position. How can I fix this? These are my code. &lt;table id="jqGrid"&gt;&lt;/table&gt; &lt;div id="jqGridPager"&gt;&lt;/div&gt; $("#jqGrid").jqGrid({ url: url, mtype: "GET", postData: data, datatype: "jsonp", colModel: [ { label: 'd_id', name: 'd_id', width: 15, key: true, hidden: true}, { label: 'driver', name: 'd_name', width: 30, align:"center", editable: true, editoptions: {size: 40} }, { label: 'phone', name: 'd_phone', width: 30, align:"center", editable: true, editoptions: {size: 40} }, { label: '', name: '' } ], viewrecords: true, autowidth: true, height: '100%', rownumbers: true, rownumWidth: 25, rowNum: 20, editurl: g_base_url + 'driver/edit', pager: "#jqGridPager", loadError : function(xhr,st,err) { }, loadComplete: function () { }, onCellSelect: function(rowid, iCol, cellcontent, e) { } }); and my jqgrid version is 4.8, jquery version is jquery-1.11.2 and jquery-ui version is 1.11.4. please visit jqgrid demo and click edit button ("+" symbol in the page bar) and drag edit form serveral times. You can find its position always starts at pos (0,0). demo link is http://www.guriddo.net/demo/guriddojs/edit_add_delete/edit_template/index.html
type: Question

http://stackoverflow.com/a/29517648
upvote count: 1
has comment: http://stackoverflow.com/comment/47190854
answers question: http://stackoverflow.com/q/29517567
score: 1
has body: You can try with something like this: var orcsSent = 0; function sendOrc() { $("#gameBoard").append("&lt;img class='Orc' src='Img/Orc.gif' alt='Orc'/&gt;"); $( ".Orc" ).animate({ "left": "+=100%" }, 20000 ); console.log("test"); if(orcsSent &lt; 5) { orcsSent++; setTimeout(function () { sendOrc(); }, 4000); } } sendOrc();
downvote count: 0
type: Answer

http://stackoverflow.com/a/29431055
has comment: http://stackoverflow.com/comment/47031610
has body: Easy and simple method According to the comments in my answer, I also add this way: if ("ontouchstart" in document.documentElement) { //do stuff } A mobile device is touch-sensitive so if the touch event exists it has to be mobile. Javascript You can detect mobile devices this way with Javascript: var isMobile = { Android: function() { return navigator.userAgent.match(/Android/i); }, BlackBerry: function() { return navigator.userAgent.match(/BlackBerry/i); }, iOS: function() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); }, Opera: function() { return navigator.userAgent.match(/Opera Mini/i); }, Windows: function() { return navigator.userAgent.match(/IEMobile/i); }, any: function() { return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); } }; Now you can check if its a Mobile Device by using this function: if(isMobile.any()) { alert("This is a Mobile Device"); } So if the element is for example "#my-element": if(isMobile.any()) { //either $("#my-element").remove() // or $("#my-element").css("display", "none") } BTW, if the class you add works but you didn't know how to reach this point, you can simply: if(isMobile.any()) { //either $("#my-element").addClass("hidden-sm") //or hidden-xs, Idk } CSS You can do the same with CSS using the following method: @media only screen and (max-device-width: 480px) { #my-element { display: none; } } Where 480 px could be the value you consider it is the max. mobile device width, but this is not really precise to determine, since this may vary, and you might find a tablet really big and a laptop whose screen is really small (best approach is JS) However, there's no single approach that's truly foolproof. The ideal bet would be to mix and match a variety of tricks as needed, to increase the chances of successfully detecting a wider range of handheld devices. IMO, I'd ask for the user to load the video, and knowing their feedback, either load the video or not. But thi…
has comment: http://stackoverflow.com/comment/47031737
has comment: http://stackoverflow.com/comment/47031653
has comment: http://stackoverflow.com/comment/47032174
has comment: http://stackoverflow.com/comment/47032294
has comment: http://stackoverflow.com/comment/47032803
downvote count: 0
has comment: http://stackoverflow.com/comment/47033114
type: Answer
has comment: http://stackoverflow.com/comment/47032086
answers question: http://stackoverflow.com/q/29430850
score: 2
upvote count: 2

http://stackoverflow.com/comment/47084487
has text: Some particles coming from the side of the screen
type: QuestionComment
comment on: http://stackoverflow.com/q/29460284
score: 0
type: Comment

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/29413914
tags question: http://stackoverflow.com/q/29424703
tags question: http://stackoverflow.com/q/29394849
tags question: http://stackoverflow.com/q/29441611
tags question: http://stackoverflow.com/q/29401475
tags question: http://stackoverflow.com/q/29385121
tags question: http://stackoverflow.com/q/29490634
tags question: http://stackoverflow.com/q/29503828
tags question: http://stackoverflow.com/q/29479875
tags question: http://stackoverflow.com/q/29387130
tags question: http://stackoverflow.com/q/29485693
tags question: http://stackoverflow.com/q/29497515
tags question: http://stackoverflow.com/q/29483766
tags question: http://stackoverflow.com/q/29458624
tags question: http://stackoverflow.com/q/29489188
tags question: http://stackoverflow.com/q/29456882
tags question: http://stackoverflow.com/q/29490555
tags question: http://stackoverflow.com/q/29454074
tags question: http://stackoverflow.com/q/29472756
tags question: http://stackoverflow.com/q/29411569
tags question: http://stackoverflow.com/q/29447302
tags question: http://stackoverflow.com/q/29404754
tags question: http://stackoverflow.com/q/29486236
tags question: http://stackoverflow.com/q/29428947
tags question: http://stackoverflow.com/q/29473591
tags question: http://stackoverflow.com/q/29433546
tags question: http://stackoverflow.com/q/29440055
tags question: http://stackoverflow.com/q/29388844
tags question: http://stackoverflow.com/q/29497123
tags question: http://stackoverflow.com/q/29378679
tags question: http://stackoverflow.com/q/29399075
tags question: http://stackoverflow.com/q/29388736
tags question: http://stackoverflow.com/q/29479123
tags question: http://stackoverflow.com/q/29496190
tags question: http://stackoverflow.com/q/29522629
tags question: http://stackoverflow.com/q/29411717
tags question: http://stackoverflow.com/q/29415880
tags question: http://stackoverflow.com/q/29415897
tags question: http://stackoverflow.com/q/29483741
tags question: http://stackoverflow.com/q/29473676
tags question: http://stackoverflow.com/q/29382044
tags question: http://stackoverflow.com/q/29381213
tags question: http://stackoverflow.com/q/29511522
tags question: http://stackoverflow.com/q/29410322
tags question: http://stackoverflow.com/q/29445936
tags question: http://stackoverflow.com/q/29436074
tags question: http://stackoverflow.com/q/29460146
tags question: http://stackoverflow.com/q/29412471
tags question: http://stackoverflow.com/q/29529472
tags question: http://stackoverflow.com/q/29450293
tags question: http://stackoverflow.com/q/29462181
tags question: http://stackoverflow.com/q/29510885
tags question: http://stackoverflow.com/q/29431649
tags question: http://stackoverflow.com/q/29440117
tags question: http://stackoverflow.com/q/29475324
tags question: http://stackoverflow.com/q/29491053
tags question: http://stackoverflow.com/q/29502696
tags question: http://stackoverflow.com/q/29518621
tags question: http://stackoverflow.com/q/29440478
tags question: http://stackoverflow.com/q/29376941
tags question: http://stackoverflow.com/q/29425732
tags question: http://stackoverflow.com/q/29512118
tags question: http://stackoverflow.com/q/29411713
tags question: http://stackoverflow.com/q/29504895
tags question: http://stackoverflow.com/q/29377730
tags question: http://stackoverflow.com/q/29384973
tags question: http://stackoverflow.com/q/29431010
tags question: http://stackoverflow.com/q/29495434
tags question: http://stackoverflow.com/q/29496603
tags question: http://stackoverflow.com/q/29437993
tags question: http://stackoverflow.com/q/29469341
tags question: http://stackoverflow.com/q/29382121
tags question: http://stackoverflow.com/q/29516280
tags question: http://stackoverflow.com/q/29376648
tags question: http://stackoverflow.com/q/29501199
tags question: http://stackoverflow.com/q/29441647
tags question: http://stackoverflow.com/q/29454436
tags question: http://stackoverflow.com/q/29469196
tags question: http://stackoverflow.com/q/29465085
tags question: http://stackoverflow.com/q/29515217

http://stackoverflow.com/comment/47135300
type: AnswerComment
comment on: http://stackoverflow.com/a/29485927
type: Comment
has text: @bartezr I have just figured out the issue; gimme a minute;
score: 0

http://stackoverflow.com/comment/46971668
comment on: http://stackoverflow.com/q/29397813
has text: how many `xxxx` should be der
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29444132
answer count: 2
downvote count: 0
has body: I have this angular code: $scope.searchTracks = function(text) { Search.search.get({ text: text }, function(data) { $scope.tracks = data; }) } And in my template: &lt;div ng-repeat="track in tracks"&gt; &lt;p&gt;{{ track.href }}&lt;/p&gt; &lt;audio src="{{ track.href }}"&gt;&lt;/audio&gt; &lt;/div&gt; In &lt;p&gt; i see my link, but get this error for &lt;audio tag: Error: $interpolate:interr Interpolation Error Why? track.href example: https://0.s3.envato.com/files/91351865/preview.mp3 UPDATE: In chrome console i see this error: https://docs.angularjs.org/error/$sce/insecurl?p0=https:%2F%2F0.s3.envato.com%2Ffiles%2F106073010%2Fpreview.mp3 Maybe i get this error because my url with https? Full error: http://errors.angularjs.org/1.3.15/$interpolate/interr?p0=%5B%5B%20track.href%20%5D%5D&amp;p1=Error%3A%20%5B%24sce%3Ainsecurl%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.3.15%2F%24sce%2Finsecurl%3Fp0%3Dhttps%253A%252F%252F0.s3.envato.com%252Ffiles%252F91351865%252Fpreview.mp3 R/&lt;@http://soundizer.local/vendor/js/libs.js:11:417 v@http://soundizer.local/vendor/js/libs.js:93:110 p/c&lt;@http://soundizer.local/vendor/js/libs.js:114:321 g/&lt;@http://soundizer.local/vendor/js/libs.js:94:145 Oa/&lt;.compile/&lt;.pre@http://soundizer.local/vendor/js/libs.js:73:479 $@http://soundizer.local/vendor/js/libs.js:75:197 B@http://soundizer.local/vendor/js/libs.js:64:66 g@http://soundizer.local/vendor/js/libs.js:56:335 g@http://soundizer.local/vendor/js/libs.js:56:352 g@http://soundizer.local/vendor/js/libs.js:56:352 g@http://soundizer.local/vendor/js/libs.js:56:352 g@http://soundizer.local/vendor/js/libs.js:56:352 D/&lt;@http://soundizer.local/vendor/js/libs.js:55:444 P/&lt;@http://soundizer.local/vendor/js/libs.js:57:322 k@http://soundizer.local/vendor/js/libs.js:61:322 ne&lt;/&lt;.compile/&lt;/&lt;@http://soundizer.local/vendor/js/libs.js:239:428 Pe/this.$get&lt;/n.prototype.$watchCollection/&lt;@http://soundizer.local/vendor/js/libs.js:127:291 Pe/this.$get&lt;/n.prototype.$digest…
has title: Angular Interpolation Error for src attribute
possible better answer: http://stackoverflow.com/a/29444142
favorite count: 0
linked to: http://stackoverflow.com/q/19994161
has answer: http://stackoverflow.com/a/29444142
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29444362
score: 1
upvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29444362

http://stackoverflow.com/comment/47584654
has text: So +1 to what Robert said - this is what Canvas was made for :)
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29519680

http://stackoverflow.com/q/29463053
favorite count: 0
has title: adding and retrieving arrays from localStorage
type: AnsweredQuestion
upvote count: 0
type: Question
possible better answer: http://stackoverflow.com/a/29463105
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29463105
has body: I am trying to retrieve value from localStorage but below code is printing NULL in browser Console instead of array object values! any one can help me with this please var ary = []; function setFavorite(n, v) { alert("a=" + n + " ,v=" + v); var obj = {}; obj[n] = v; ary.push(obj); // Put the object into storage localStorage.setItem('testObject', JSON.stringify(ary)); // Retrieve the object from storage var retrievedObject = localStorage.getItem('ary'); console.log('retrievedObject: ', JSON.parse(retrievedObject)); } setFavorite("Power", "Power Converter"); //calling above function from a button click
answer count: 2
has answer: http://stackoverflow.com/a/29463079
accepted answer: http://stackoverflow.com/a/29463079
downvote count: 1
tagged with: jquery

http://stackoverflow.com/q/29504743
answer count: 1
tagged with: javascript
upvote count: 3
has title: Clarification regarding parseInt() in Javascript
tagged with: parseint
has body: parseInt(0.000004); //0 parseInt(0.0000004); //4 why does the first parseInt() return 0, but if I increase the number of zeros after decimal it gives 4?
linked to: http://stackoverflow.com/q/27650459
favorite count: 0
has comment: http://stackoverflow.com/comment/47166853
type: AnsweredQuestion
score: 3
downvote count: 0
has answer: http://stackoverflow.com/a/29504784
accepted answer: http://stackoverflow.com/a/29504784
type: Question

http://stackoverflow.com/q/29525159
has comment: http://stackoverflow.com/comment/47204865
has comment: http://stackoverflow.com/comment/47205577
score: 0
has answer: http://stackoverflow.com/a/29525240
has comment: http://stackoverflow.com/comment/47205255
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47205333
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/29525240
type: AnsweredQuestion
has title: JQuery example doesnt work - "Object doesn't support property or method 'button'"
type: Question
has body: I know this question was already asked in several topics, I went over them but didnt find anything helpful. Its quite simple - jquery ui doesnt work for me. I would like to use their "button", downloaded their css file and tried to implement example from their page. However, I keep getting error "JavaScript runtime error: Object doesn't support property or method 'button'" Here are relevant parts of my code. In head: And in body: Button label Script is easy, but I still keep getting error mentioned above. Anyone has an idea where could be a problem? Thank you, Jozef
has comment: http://stackoverflow.com/comment/47204745
has comment: http://stackoverflow.com/comment/47205303

jquery
tags question: http://stackoverflow.com/q/29464731
tags question: http://stackoverflow.com/q/29382244
tags question: http://stackoverflow.com/q/29502524
tags question: http://stackoverflow.com/q/29414219
tags question: http://stackoverflow.com/q/29518816
tags question: http://stackoverflow.com/q/29440468
tags question: http://stackoverflow.com/q/29424756
tags question: http://stackoverflow.com/q/29394442
tags question: http://stackoverflow.com/q/29493548
tags question: http://stackoverflow.com/q/29457743
tags question: http://stackoverflow.com/q/29465472
tags question: http://stackoverflow.com/q/29465242
tags question: http://stackoverflow.com/q/29382252
tags question: http://stackoverflow.com/q/29399324
tags question: http://stackoverflow.com/q/29410570
tags question: http://stackoverflow.com/q/29527373
tags question: http://stackoverflow.com/q/29464240
tags question: http://stackoverflow.com/q/29419374
tags question: http://stackoverflow.com/q/29519593
tags question: http://stackoverflow.com/q/29461141
tags question: http://stackoverflow.com/q/29461096
tags question: http://stackoverflow.com/q/29495712
tags question: http://stackoverflow.com/q/29380685
tags question: http://stackoverflow.com/q/29466417
tags question: http://stackoverflow.com/q/29523051
tags question: http://stackoverflow.com/q/29497857
tags question: http://stackoverflow.com/q/29527898
tags question: http://stackoverflow.com/q/29421822
tags question: http://stackoverflow.com/q/29383521
tags question: http://stackoverflow.com/q/29447856
tags question: http://stackoverflow.com/q/29446140
tags question: http://stackoverflow.com/q/29513305
tags question: http://stackoverflow.com/q/29440674
tags question: http://stackoverflow.com/q/29461433
tags question: http://stackoverflow.com/q/29499674
tags question: http://stackoverflow.com/q/29479637
tags question: http://stackoverflow.com/q/29413620
tags question: http://stackoverflow.com/q/29463123
tags question: http://stackoverflow.com/q/29462199
tags question: http://stackoverflow.com/q/29416999
tags question: http://stackoverflow.com/q/29480252
tags question: http://stackoverflow.com/q/29426755
tags question: http://stackoverflow.com/q/29465970
tags question: http://stackoverflow.com/q/29487066
tags question: http://stackoverflow.com/q/29522309
tags question: http://stackoverflow.com/q/29434917
tags question: http://stackoverflow.com/q/29412667
tags question: http://stackoverflow.com/q/29424007
tags question: http://stackoverflow.com/q/29408535
tags question: http://stackoverflow.com/q/29424683
tags question: http://stackoverflow.com/q/29389136
tags question: http://stackoverflow.com/q/29397090
tags question: http://stackoverflow.com/q/29390187
tags question: http://stackoverflow.com/q/29486320
tags question: http://stackoverflow.com/q/29509455
tags question: http://stackoverflow.com/q/29422097
tags question: http://stackoverflow.com/q/29481167
tags question: http://stackoverflow.com/q/29447939
tags question: http://stackoverflow.com/q/29406756
tags question: http://stackoverflow.com/q/29450773
tags question: http://stackoverflow.com/q/29432326
tags question: http://stackoverflow.com/q/29426620
tags question: http://stackoverflow.com/q/29401149
tags question: http://stackoverflow.com/q/29393064
tags question: http://stackoverflow.com/q/29465922
tags question: http://stackoverflow.com/q/29479366
tags question: http://stackoverflow.com/q/29447542
tags question: http://stackoverflow.com/q/29515502
tags question: http://stackoverflow.com/q/29392444
tags question: http://stackoverflow.com/q/29412742
tags question: http://stackoverflow.com/q/29411037
tags question: http://stackoverflow.com/q/29499534
tags question: http://stackoverflow.com/q/29490222
tags question: http://stackoverflow.com/q/29413916
tags question: http://stackoverflow.com/q/29506429
tags question: http://stackoverflow.com/q/29515632
tags question: http://stackoverflow.com/q/29396948
tags question: http://stackoverflow.com/q/29429951
tags question: http://stackoverflow.com/q/29468372
tags question: http://stackoverflow.com/q/29503953

http://stackoverflow.com/comment/47179281
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29511711
has text: it doesn't work. when mouse is over box2, it still triggers the box1 hover event. i want to avaoid that

http://stackoverflow.com/comment/47293576
type: Comment
comment on: http://stackoverflow.com/a/29555584
score: 0
type: AnswerComment
has text: Thank You So Much. i appreciate this answer but im sorry for not saying this i already did this kind of code. the problem of this code is. if i refresh my page, i will wait for 5 seconds to load the markers and then if the markers is loaded the setinterval stops and never loop again. this is my full files and kindly try it. and see the problem. https://www.dropbox.com/s/p20vvrxo2uncxx5/poy.rar?dl=0

http://stackoverflow.com/comment/46936336
score: 0
type: AnswerComment
has text: I agree that's how it works, however that's not what I'm doing. I'm passing a method of a class to another function as a callback. The other function calls that method meaning that `this` now refers to the other function, not the function which constructed the method
type: Comment
comment on: http://stackoverflow.com/a/29378029

http://stackoverflow.com/comment/47235605
type: Comment
comment on: http://stackoverflow.com/a/29539114
score: 0
type: AnswerComment
has text: Trouble with this answer - although I'm going to accept it if nothing more informative appears - is that I do not know what actually happens here. Why the hell function attached to click (`console.log()`) is cloned and restored instantly, without any additional steps and tooltip function with it's event bindings fails and need steps @RaraituL described. Do not kill me if I tell you that `tooltip` is not the only case with this problem.

http://stackoverflow.com/comment/47130427
type: QuestionComment
type: Comment
score: 0
has text: What sort of exploit/circumvention in particular are you worried about?
comment on: http://stackoverflow.com/q/29485360

http://stackoverflow.com/comment/47088013
type: Comment
has text: Got it perfectly. I did as you said but nothing appears. :(
comment on: http://stackoverflow.com/a/29461517
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47087060
comment on: http://stackoverflow.com/a/29457094
type: Comment
score: 3
has text: I said that because - syntactically incorrect code just will not run. While a code with a memory leak will run fine. So not sure what your analogy is about. So you technically cannot forget to add a comma here.
type: AnswerComment

http://stackoverflow.com/comment/47076764
type: Comment
has text: You should simply `console.log` the value of the above expression. I got `1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 2.10, 2.11, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7`.
comment on: http://stackoverflow.com/a/29456041
type: AnswerComment
score: 0

http://stackoverflow.com/q/29465878
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47096127
favorite count: 0
upvote count: 2
has body: I want to know about some function (if any) or library which may provide direct functions to find the type of elements in an array. Suppose I have an array containing elements of same data type : var sameArray = [1, 2, 3, 4]; var diffArray = ['a', 'b', 'c', 4]; sameArray.itemPrototype(); // Returns int diffArray.itemPrototype(); // Returns undefined For first array, it should return int and for the second one undefined or false.
accepted answer: http://stackoverflow.com/a/29468507
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47096532
has title: Find type of elements contained in an array javascript
type: Question
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/29468507
has comment: http://stackoverflow.com/comment/47094473

http://stackoverflow.com/q/29422951
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47017505
has body: Well passing a php variable in ng-click is understood but how can i pass complete php object through ng-click function i have successfully passed JavaScript object through it but i cant pass php object any help will be appreciated. Here is my script: &lt;ul&gt; &lt;!-- Retrieving of main products --&gt; &lt;? if(isset($products)): foreach($products as $row): ?&gt; &lt;li&gt; &lt;a href="products/&lt;?=$row-&gt;sub_c_id?&gt;/&lt;?=$row-&gt;pid?&gt;" class="title colr"&gt;&lt;?=$row-&gt;pname?&gt;&lt;/a&gt; &lt;a href="products/&lt;?=$row-&gt;sub_c_id?&gt;/&lt;?=$row-&gt;pid?&gt;" class="thumb"&gt; &lt;img src="&lt;?php echo base_url(); ?&gt;uploads/&lt;?=$row-&gt;product_pic?&gt;" style="width:157px; height:181px;" alt="" /&gt; &lt;/a&gt; &lt;div class="prodbuttons"&gt; &lt;p class="price bold"&gt;&lt;?=$row-&gt;pprice?&gt;&lt;/p&gt; &lt;a class="cart upper" ng-click="addtocart(&lt;?=$row-&gt;pid?&gt;,'&lt;?=$this-&gt;session-&gt;userdata('session_id'); ?&gt;','&lt;?=$row-&gt;pname?&gt;',&lt;?=$row-&gt;pprice?&gt;,&lt;?=$row-&gt;pquantity?&gt;,&lt;?=$row-&gt;sub_c_id?&gt;,'&lt;?=$row-&gt;product_pic?&gt;','&lt;?=$row-&gt;color?&gt;','&lt;?=$row-&gt;size?&gt;',1)"&gt;Add to Cart&lt;/a&gt; &lt;a ng-click="check(&lt;? json_encode($row) ?&gt;)"&gt;email me&lt;/a&gt; &lt;/div&gt; &lt;/li&gt; &lt;? endforeach; endif; ?&gt; &lt;/ul&gt; I have also tried like that but it gave me error as well: &lt;a ng-click="check(&lt;? echo json_encode($row) ?&gt;)"&gt;email me&lt;/a&gt; Angular js script: $scope.addtocart=function(pid,current_session_id,pname,pprice,pquantity,sub_c_id,product_pic,color,size,qty){ $scope.errors.splice(0, $scope.errors.length); // remove all error messages $scope.msgs.splice(0, $scope.msgs.length); $http.post('/product/ng_insertincart', { pid : pid, current_session_id : current_session_id, pname : pname, pprice : pprice, pquantity : pquantity,sub_c_id : sub_c_id,product_pic : product_pic,color : color,size : size, qty : qty} ).success(function(data, status,…
has answer: http://stackoverflow.com/a/29425174
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47018141
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47017797
has title: How to pass php object in ng-click
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29423049
has comment: http://stackoverflow.com/comment/47017706

regex
tags question: http://stackoverflow.com/q/29494037
tags question: http://stackoverflow.com/q/29420617
tags question: http://stackoverflow.com/q/29443474
tags question: http://stackoverflow.com/q/29458794
tags question: http://stackoverflow.com/q/29386315
tags question: http://stackoverflow.com/q/29492974
tags question: http://stackoverflow.com/q/29465492
tags question: http://stackoverflow.com/q/29433696
tags question: http://stackoverflow.com/q/29525832
tags question: http://stackoverflow.com/q/29476651
tags question: http://stackoverflow.com/q/29499195
tags question: http://stackoverflow.com/q/29493457
tags question: http://stackoverflow.com/q/29471080
tag name: regex
tags question: http://stackoverflow.com/q/29477766
tags question: http://stackoverflow.com/q/29386039
tags question: http://stackoverflow.com/q/29479518
tags question: http://stackoverflow.com/q/29377598
tags question: http://stackoverflow.com/q/29458304
tags question: http://stackoverflow.com/q/29492143
tags question: http://stackoverflow.com/q/29427691
tags question: http://stackoverflow.com/q/29416697
tags question: http://stackoverflow.com/q/29405306
tags question: http://stackoverflow.com/q/29439790
tags question: http://stackoverflow.com/q/29472534
tags question: http://stackoverflow.com/q/29417938
tags question: http://stackoverflow.com/q/29465214
tags question: http://stackoverflow.com/q/29487793
tags question: http://stackoverflow.com/q/29482004
tags question: http://stackoverflow.com/q/29404240
tags question: http://stackoverflow.com/q/29438261
tags question: http://stackoverflow.com/q/29396013
tags question: http://stackoverflow.com/q/29466887
tags question: http://stackoverflow.com/q/29457053
tags question: http://stackoverflow.com/q/29449486
tags question: http://stackoverflow.com/q/29467075
tags question: http://stackoverflow.com/q/29494608
tags question: http://stackoverflow.com/q/29442497
tags question: http://stackoverflow.com/q/29383955
tags question: http://stackoverflow.com/q/29397813
tags question: http://stackoverflow.com/q/29453666
tags question: http://stackoverflow.com/q/29410665
tags question: http://stackoverflow.com/q/29417544
tags question: http://stackoverflow.com/q/29381368
tags question: http://stackoverflow.com/q/29441322
tags question: http://stackoverflow.com/q/29508081
tags question: http://stackoverflow.com/q/29441007
tags question: http://stackoverflow.com/q/29442750
tags question: http://stackoverflow.com/q/29529830
tags question: http://stackoverflow.com/q/29483080
tags question: http://stackoverflow.com/q/29444353
tags question: http://stackoverflow.com/q/29453347
tags question: http://stackoverflow.com/q/29507279
tags question: http://stackoverflow.com/q/29525467
tags question: http://stackoverflow.com/q/29501362
tags question: http://stackoverflow.com/q/29434666
tags question: http://stackoverflow.com/q/29409805
tags question: http://stackoverflow.com/q/29373893
tags question: http://stackoverflow.com/q/29463716
tags question: http://stackoverflow.com/q/29400235
tags question: http://stackoverflow.com/q/29497997
tags question: http://stackoverflow.com/q/29420501
tags question: http://stackoverflow.com/q/29442324
tags question: http://stackoverflow.com/q/29417983
tags question: http://stackoverflow.com/q/29499556
tags question: http://stackoverflow.com/q/29420879
tags question: http://stackoverflow.com/q/29439739
tags question: http://stackoverflow.com/q/29448585
tags question: http://stackoverflow.com/q/29401382
tags question: http://stackoverflow.com/q/29494873
tags question: http://stackoverflow.com/q/29379786
tags question: http://stackoverflow.com/q/29407699
tags question: http://stackoverflow.com/q/29391238
tags question: http://stackoverflow.com/q/29524215
tags question: http://stackoverflow.com/q/29442170
tags question: http://stackoverflow.com/q/29489247
tags question: http://stackoverflow.com/q/29478712
tags question: http://stackoverflow.com/q/29496564
tags question: http://stackoverflow.com/q/29400845
tags question: http://stackoverflow.com/q/29475400

http://stackoverflow.com/q/29516393
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
tagged with: socket.io
type: Question
answer count: 1
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29516961
accepted answer: http://stackoverflow.com/a/29516961
has title: socket.io+ Node:Object #<Namespace> has no method 'clients'
favorite count: 0
downvote count: 2
has body: console.log(io.sockets.clients('test1234fgdgdfgdfg')); It gives me error : Object # has no method 'clients'

http://stackoverflow.com/comment/46997117
comment on: http://stackoverflow.com/a/29412048
score: 0
type: AnswerComment
has text: Thanks! Your version is working but the function part apparently isn't necessary.
type: Comment

http://stackoverflow.com/q/29520522
type: Question
score: -2
possible better answer: http://stackoverflow.com/a/29520573
tagged with: javascript
has answer: http://stackoverflow.com/a/29520597
has comment: http://stackoverflow.com/comment/47197247
upvote count: 0
has answer: http://stackoverflow.com/a/29520594
favorite count: 0
has comment: http://stackoverflow.com/comment/47196008
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29520572
has body: I'm trying to use this script on a basic HTML page, though I cannot get it to run. Here is a JSFiddle of the JS working. http://jsfiddle.net/ChristianL/AVyND/ The Fiddle actually contains the javascript code necessary. Here is my HTML: My First Heading My first paragraph. I just would like it call the script on load. Please, refer to the Fiddle for the JS code if necessary. Update: I have fixed the original issue in my script tag. It was just a typo. The main problem of getting this script to run still remains. I would like for it to automatically execute when a user loads the page.
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47196003
accepted answer: http://stackoverflow.com/a/29520572
downvote count: 2
has title: Calling Javascript External File in HTML
has answer: http://stackoverflow.com/a/29520573

http://stackoverflow.com/a/29474558
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29466832
type: Answer
has body: You are using the correct methods, but setMandatory is not supported in a client script. You can instead try using the exact same code in a User Event, Before Load event handler. Contrary to the documentation, the nlobjField returned by nlapiGetField is not read-only. Some of the setter methods still work (e.g. setDisplayType) on the client side. You can experiment with which ones do and do not work, but setMandatory is confirmed as not supported on the client side.

http://stackoverflow.com/comment/46957981
has text: try removing `form` tag and check
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29390388
score: 1

http://stackoverflow.com/comment/46968092
has text: @JLRishe, thanks, it's really weird. I've rearranged a code a little bit and included into my question how it looks right now. The success callbacks are still being called right after `nodeSubtypesMetadataErrorCb` rejection callback. How can I debug it?
comment on: http://stackoverflow.com/q/29395077
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29376628
tagged with: sticky
tagged with: css
has comment: http://stackoverflow.com/comment/46934738
favorite count: 0
has body: I'm trying to create a standard sticky-function for my bottom side navigation. It's really just a low functioning tool, making it an absolutely positioned element roughly 300 px from the top of the window to the bottom of the page. It SHOULD be easy. I've written the following code below CSS .style2info { margin-top:170px; height: 3800px; background-color: #6B6B6B; margin-left: 59px; width: 70px; position: relative; } .anchornav { height: 30px; width: 25px; position: absolute; } .anchornav.sticky { position: fixed; top: 0px; } Javascript $(document).ready(function () { var win = $(window), fxel = $('.anchornav'), eloffset = fxel.offset().top; win.scroll(function() { if (win.scrollTop() > eloffset) { fxel.addClass("sticky"); } else { fxel.removeClass("sticky"); } }); HTML sticky? On my Fiddle, it's working PERFECTLY. The problem is on the actual website, not so much. http://webstage.emich.edu/dining-new/locations.php (Ignore the inline styles, it's just for as long as I'm still working on the javascript) The only thing I can think of is that the way it's located on the page, it the larger div ("style2info") has a negative margin-top to position it correctly. Is it possible that that would be messing up my code? Or is it something else? Any help is always appreciated! Thank you!!!! ******I have read the other stackoverflows regarding sticky objects. the problem is that they're either taking from github, or attempting to do other things. mine is just very straight and simple and I'd like to learn what I'm doing wrong rather than using other programs to do it**
has comment: http://stackoverflow.com/comment/47004782
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46934216
has comment: http://stackoverflow.com/comment/46934022
has comment: http://stackoverflow.com/comment/46934406
has comment: http://stackoverflow.com/comment/47008101
upvote count: 0
has answer: http://stackoverflow.com/a/29419601
type: Question
has comment: http://stackoverflow.com/comment/46933776
downvote count: 2
has title: Javascript for sticky function not working
score: -2
has comment: http://stackoverflow.com/comment/46934404
answer count: 1
has comment: http://stackoverflow.com/comment/46934121
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/71171570
type: Answer
answers question: http://stackoverflow.com/q/29401989
has body: Although I don't know a complete and updated library to do it, I know about https://www.npmjs.com/package/java-deserialization. It's easy to use if you don't have any fancy java class serialized. var javaDeserialization = require("java-deserialization"); var objects = javaDeserialization.parse(buf);
score: 0

http://stackoverflow.com/comment/47023868
score: 0
has text: ...or put `Access-Control-Allow-Origin` header on the AJAXed server, if it is under your control.
type: QuestionComment
comment on: http://stackoverflow.com/q/29426482
type: Comment

http://stackoverflow.com/q/29451462
has title: How do I add the same functions back into my code after detaching in Jquery?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/47070834
has comment: http://stackoverflow.com/comment/47069359
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/47070991
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29452834
accepted answer: http://stackoverflow.com/a/29452834
tagged with: jquery
has comment: http://stackoverflow.com/comment/47070865
favorite count: 0
has body: I'm trying to recreate my .click functions, for loops, if statements after they are used the first time. I created a button on the page that asks the user if they want to start over when the user clicks this button it does indeed reload everything except my .click functions, for loops, if statements in jquery. How can I make my button reload the functions,loops,if statements? I tried using remove(). It didn't work either. As you can see in my code when the user clicks on the button that says Yes! then the divs they have created are detached() from the code a long with most of the other elements on the page. After that I am using before() & after() to recreate the removed questions, spaces under them & their submit buttons. The problem is that the submit buttons no longer function after they are created again. Razzakun's Etch A Sketch Welcome to Razzakun's Etch A Sketch How many vertical squares of Etch A Sketch Space do you want? How many horizontal squares of Etch A Sketch Space do you want?

http://stackoverflow.com/comment/47006768
has text: yeah, I'd say give that a spin. The debugger functionality is actually explained in the API docs (not the most obvious place for it, but [it's useful nevertheless](https://nodejs.org/api/debugger.html))
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29406365

http://stackoverflow.com/comment/47236580
has text: @ChavdarSlavov Thanks for the Fiddle! I don't know what it's wrong, I just updated my question, the scrollable section is in my template, instead my items to display are on a page view
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29460729

http://stackoverflow.com/comment/47198572
type: QuestionComment
type: Comment
has text: @maddog I just did and it still submits twice.
comment on: http://stackoverflow.com/q/29521844
score: 0

http://stackoverflow.com/comment/46976218
has text: If you can just manually pause it at a random time, and display the call stack, that will show you every line of code that's currently executing. Do it 10 times. The cost of every line of code or function you see is roughly the fraction of the time you see it on the stack. This gives very rough measurement, but while the time measurement is rough, the information about *why* it's taking time is very detailed. And after all, that's what you really want to know, isn't it?
score: 0
comment on: http://stackoverflow.com/q/29398111
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/131445752
type: AnswerComment
has text: It is discouraged to modify the scene graph such as removing children inside the traverse and traverseVisible. See : https://threejs.org/docs/#api/en/core/Object3D.traverse . I have done it and it results into deleting the undefined.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/40881451

http://stackoverflow.com/a/29422899
downvote count: 0
has comment: http://stackoverflow.com/comment/47019546
score: 3
has comment: http://stackoverflow.com/comment/47019781
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29420509
answers question: http://stackoverflow.com/q/29420509
has body: I went ahead and built a paginator. Instead of using an array as you did, I used just the number of available pages, pageCount. Probably the only thing worth looking into in more detail is the calculation which pages are to be displayed: this.visiblePages = ko.computed(function() { var previousHalf = Math.floor( (this.visiblePageCount() - 1) / 2 ), nextHalf = Math.ceil( (this.visiblePageCount() - 1) / 2 ), visiblePages = [], firstPage, lastPage; // too close to the beginning if ( this.currentPage() - previousHalf < 1 ) { firstPage = 1; lastPage = this.visiblePageCount(); if ( lastPage > this.pageCount() ) { lastPage = this.pageCount(); } // too close to the end } else if ( this.currentPage() + nextHalf > this.pageCount() ) { lastPage = this.pageCount(); firstPage = this.pageCount() - this.visiblePageCount() + 1; if (firstPage < 1) { firstPage = 1; } // just right } else { firstPage = this.currentPage() - previousHalf; lastPage = this.currentPage() + nextHalf; } for (var i = firstPage; i <= lastPage; i++) { visiblePages.push(i); } return visiblePages; }, this); Let's go through this piece by piece. We want our current page to be in the middle of all displayed pagination buttons, with some to its left and some to its right. But how many? If we use an odd number such as three, that's simple: the number minus 1 (the selected one) divided by two. (3 - 1) / 2 = 1, or one to each side. With an even number of pagination buttons to display, that doesn't work, so we calculate each side individually and round one result up and one result down: var previousHalf = Math.floor( (this.visiblePageCount() - 1) / 2 ), nextHalf = Math.ceil( (this.visiblePageCount() - 1) / 2 ), There are three possible results: our selection fits we're too close to the beginning we're too close to the end If we're too close to the beginning: if ( this.currentPage() - previousHalf < 1 ) { firstPage = 1; lastPage = this.visiblePageCount(); if ( lastPage > this.pageCount() ) { lastPage = this.pageCount(); …
type: Answer
has comment: http://stackoverflow.com/comment/47019855
upvote count: 3

http://stackoverflow.com/a/29458129
score: 0
has comment: http://stackoverflow.com/comment/47080859
answers question: http://stackoverflow.com/q/29458030
has comment: http://stackoverflow.com/comment/47081400
has comment: http://stackoverflow.com/comment/47081615
type: Answer
accepted answer of: http://stackoverflow.com/q/29458030
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47081022
has body: I don't know why you're surprised by what selectedDate is returning. You have only set it to new Date() (now). Nothing in the code is manipulating this variable from the point of creation. You are, however, manipulating the value and storing the change in startDate and dateLabel.innerHTML. You would only notice the formatting though since the second function strips any change in "time" (done by the first function). So, in short: You create a date (now), change the time, then format it to only show date. var selectedDate = new Date(); //selectedDate value = the date and time right now var startDate = getDateFromDateAtHourOfDay(selectedDate, hour); //startDate value = whatever selectedDate was + hours sent as parameter document.getElementById("dateLabel").innerHTML = getDateDescriptionFromDate(startDate); //Formatted value of startDate, to only show date As per comment: You're missing that month in javascript is zero-based. So you'll have to do something like: var month = date.getMonth() + 1; //in the second function function getDateFromDateAtHourOfDay(date, hour) { var year = date.getFullYear(); var month = date.getMonth(); var day = date.getDate(); var newDate = new Date(year, month, day, hour, 0, 0); return (newDate); } function getDateDescriptionFromDate(date) { var year = date.getFullYear(); var month = date.getMonth() + 1; var day = date.getDate(); return ( (day &lt; 10 ? ("0" + day) : (day)) + "." + (month &lt; 10 ? ("0" + month) : (month)) + "." + year); } var selectedDate = new Date(); // normally function parameter var startDate = getDateFromDateAtHourOfDay(selectedDate, 15); document.getElementById("dateLabel").innerHTML = 'Your current system date: ' + getDateDescriptionFromDate(startDate); &lt;div id="dateLabel"&gt;&lt;/div&gt;

http://stackoverflow.com/comment/47123282
comment on: http://stackoverflow.com/a/29481204
type: Comment
has text: Thanks, this definitely helped me understand things a little bit better.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47138526
has text: Also, you should consider using `$ccType` for full cards. Eager typing is intended for displaying issuer logos or other UI features. `$ccType` matches a stricter regex for the full card number. It's possible to achieve a state where `$ccEagerType` is defined but the ` ` is invalid and therefore `$ccType` is `undefined`.
comment on: http://stackoverflow.com/a/29486334
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/29518883
tagged with: list
score: 0
accepted answer: http://stackoverflow.com/a/29520846
answer count: 1
has body: I am trying to create a search option for a list of items. This way the user can search for a specific item within the list. However, I am having a couple issues. My list uses both span and images. The jquery I created to sort sorts the list by the spans just fine however, when I try to use the active search it doesn't do anything. Here is my sample code: Lesson 1 Lesson 2 Lesson3 Lesson 4 Lesson 5 Again my sort jQuery works just fine: $(document).ready(function(e) { var desc = $(this).hasClass("asc"), list = $("#lessonList"); list.append(list.children().get().sort(function(a, b) { var aProp = $(a).find("span.name").text(), bProp = $(b).find("span.name").text(); return (aProp > bProp ? 1 : aProp < bProp ? -1 : 0) * (desc ? -1 : 1); })); $(this).toggleClass("desc", desc) .toggleClass("asc", !desc) .siblings().removeClass("asc desc"); e.preventDefault();}); However, when I try to use the input to create an active search nothing happens. Here is its code: $('#searchInput').keyup(function(){ //var that = this, $allListElements = $('ul > li'); var valThis = $(this).val(); var list = $('ul li span'); list.each(function(){ var text = $(this).text().toLowerCase(); (text.indexOf(valThis) == 0) ? $(this).show() : $(this).hide();});}); What am I doing wrong? Is this even something I can do? Thanks in advance.
tagged with: javascript
tagged with: search
type: AnsweredQuestion
has title: Active Search Bar In JQuery
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29520846

http://stackoverflow.com/a/29412941
type: Answer
has comment: http://stackoverflow.com/comment/46999281
has comment: http://stackoverflow.com/comment/46999879
answers question: http://stackoverflow.com/q/29412742
score: 0
has comment: http://stackoverflow.com/comment/46998834
has comment: http://stackoverflow.com/comment/46998713
has comment: http://stackoverflow.com/comment/46998690
has body: Home About Rentals Contact Apply $(document).ready(function(){ $('input[name=mainpage]').change(function(){ alert('test'); }); }); demo
has comment: http://stackoverflow.com/comment/46998588

http://stackoverflow.com/a/29430849
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29428858
accepted answer of: http://stackoverflow.com/q/29428858
type: Answer
has body: While Ember.computed.sort might be the easiest way to go if you only want to have those ships sorted (see answer by Kori John Roys), this doesn't address what's going wrong in your code. In short: You're trying to sort the promise, not the data. To sort the data you'd have to do the following: ... return model.then(function(data){return data.sortBy('name');}) ... Now the sorting is done on the actual data once the promise has been resolved.
upvote count: 1
score: 1

http://stackoverflow.com/q/29525467
type: AnsweredQuestion
has title: Regex javascript to vb
score: 1
has answer: http://stackoverflow.com/a/29527265
accepted answer: http://stackoverflow.com/a/29527265
type: Question
has body: I have a javascript function maxRepeat. Im having trouble translating it to vb.net, seems regex engine differs...and Im not so strong on regex. Would you mind pointing me in the right direction for translating the regex string to the appropriate vb.net one ? ...I understand how to do the logic afterwords, just lost on the regex string... Im talking about this function.. function maxRepeat(input) { var reg = /(?=((.+)(?:.*?\2)+))/g; var sub = ""; var maxstr = ""; reg.lastIndex = 0; sub = reg.exec(input); while (!(sub == null)) { if ((!(sub == null)) &amp;&amp; (sub[2].length &gt; maxstr.length)) { maxstr = sub[2]; } sub = reg.exec(input); reg.lastIndex++; } return maxstr; } This functions returns the largest sequence of characters that appear at least twice. "one two one three one four" would return "one t" &lt;--with space || "onetwoonethreeonefour" would return "onet" "324234241122332211345435311223322112342345541122332211234234324" returns "1122332211234234"
answer count: 1
tagged with: javascript
upvote count: 1
tagged with: regex
favorite count: 0
downvote count: 0
tagged with: repeat
tagged with: vb.net

http://stackoverflow.com/q/29515791
has body: I have a <ui:repeat> setup as follows : <ui:repeat id="iterator" value="#{myBean.linkList}" var="link" varStatus="linkStatus"> <ui:fragment rendered="#{!linkStatus.first and myBean.currLink.type eq 'comm'}"> <p:commandLink id="commLink" value="Test" onclick="commLinkClicked(#{linkStatus.index}, #{linkStatus.end});"></p:commandLink> </ui:fragment> </ui:repeat> As you can see I send the index of the current object aswell as the last index of the list to a javascript function. The problem is the #{linkStatus.index} resolves to the correct value, but the #{linkStatus.end} resolves to nothing. This ofcourse results in a syntax error as follows SyntaxError: expected expression, got ')' I have looked at the source code of UIRepeat and IterationStatus and as far as I can see varStatus.end is implemented and used. This list in the backing bean is defined as follows : private List<MyLink> links; This list is initiated on load from the database with a DAO class that returns Query.list(); directly. The relevant part of my pom follows : com.sun.faces jsf-api 2.1.7 com.sun.faces jsf-impl 2.1.7 I am also using Primefaces 5.0, but I doubt that would be causing any issues with a select part of the
duplicate of: http://stackoverflow.com/q/11766259
has comment: http://stackoverflow.com/comment/47187148
has comment: http://stackoverflow.com/comment/47187244
answer count: 0
type: UnansweredQuestion
has title: <ui:repeat> varStatus.end returns nothing
tagged with: jsf
tagged with: primefaces
tagged with: java
type: Question
tagged with: jsf-2
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/11766259

http://stackoverflow.com/q/29521230
favorite count: 0
answer count: 0
type: UnansweredQuestion
downvote count: 0
score: 1
tagged with: forms
type: Question
tagged with: javascript
has body: Does anyone know a way to use airMode with summernote, but correctly have it work with a form? For some reason, when I use airMode, And js: $('.summernote').summernote({airMode:true}); For some reason this only submits correctly when airmode is turned off.
tagged with: summernote
upvote count: 1
has title: Summernote airmode in a form textarea?

http://stackoverflow.com/a/29383769
accepted answer of: http://stackoverflow.com/q/29382914
answers question: http://stackoverflow.com/q/29382914
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/46948849
score: 4
has body: UPDATED Answer for HTML5 and IE without HTML5 you need to use FileReader.readAsDataURL() instead see js fiddle example function getImage() { var reader = new FileReader(); var f = document.getElementById("file-select").files; reader.onloadend = function () { console.log(reader.result); } reader.readAsDataURL(f[0]); } Convert For IE without HTML5 you need to use an activex object and make sure you allow activex to run scripts in your internet options Convert
has comment: http://stackoverflow.com/comment/46965843
type: AcceptedAnswer

http://stackoverflow.com/comment/47015379
type: Comment
comment on: http://stackoverflow.com/q/29421684
has text: need to refresh the page for seeing effective changes
score: 0
type: QuestionComment

http://stackoverflow.com/comment/47092357
score: 0
comment on: http://stackoverflow.com/q/29464663
type: Comment
type: QuestionComment
has text: Move the `html` code UP, into the function where `start` is defined, right after it's defined

http://stackoverflow.com/q/29404240
has answer: http://stackoverflow.com/a/29404314
has answer: http://stackoverflow.com/a/29404473
accepted answer: http://stackoverflow.com/a/29404314
favorite count: 0
has title: Parse string with javascript
has comment: http://stackoverflow.com/comment/46983559
tagged with: regex
type: AnsweredQuestion
score: 1
has body: I have an element on the form: &lt;img src="/media/BodyPart_7d0cf57e-a461-44fd-903f-ce77b005e299/300/0" class="media-item"&gt; I want to extract the Bodypart_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Here ix the mask of the string "/{anyt-ext-here}/BodyPart_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/{any-number-here}/{any-number-here}" What is the best day of doint it?
upvote count: 1
possible better answer: http://stackoverflow.com/a/29404336
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/1732348
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/29404336

http://stackoverflow.com/comment/47185480
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29514545
has text: @Jordumus not a problem and thanks for the upvote. You learn something new everyday :)
score: 0

http://stackoverflow.com/q/29525745
has title: Backbone model server side and memory handling
tagged with: javascript
has comment: http://stackoverflow.com/comment/47207966
has body: If I have a backbone model on the server (node.js) and insert data on each route (using Express), will that model grow infinitely? Should I clear memory manually when the model has performed what it was supposed to do? Pseudo-example: var model = require('./model') route.index = function() { var key = new Date() model.set(key, 'foobar') console.dir(model.toJSON()) } On each reload in the browser, this model will grow. My question is: do I need to manually empty the model or is there a "garbage collector" in node that will take care of this?
tagged with: express
has answer: http://stackoverflow.com/a/29525821
favorite count: 0
type: Question
score: 1
tagged with: node.js
tagged with: backbone.js
linked to: http://stackoverflow.com/q/137975
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/47206867
has comment: http://stackoverflow.com/comment/47206308
type: UnansweredQuestion
downvote count: 0

http://stackoverflow.com/comment/46929961
type: Comment
type: QuestionComment
has text: Is that when you run it manually or when it runs first time?
comment on: http://stackoverflow.com/q/29374517
score: 0

http://stackoverflow.com/a/29415138
score: 2
has comment: http://stackoverflow.com/comment/47004626
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: This should work without the curly brackets: In your controller: var vm = this; vm.mapInfo = { mapFile: "Content/svg/fargo-map.svg"}; See this fiddle for a similar solution.
upvote count: 2
answers question: http://stackoverflow.com/q/29414918
accepted answer of: http://stackoverflow.com/q/29414918

http://stackoverflow.com/comment/47121802
type: Comment
has text: I never thought of that ! Thanks! :D
comment on: http://stackoverflow.com/a/29480274
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46987148
has text: I think you're literally asking how to go back in time. Not possible (yet). What you can do though is prevent the event **right away**, then later re-emit it in your callback if you decide you actually wanted it.
comment on: http://stackoverflow.com/q/29406196
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/29518417
score: 19
has comment: http://stackoverflow.com/comment/47222632
answers question: http://stackoverflow.com/q/29517885
accepted answer of: http://stackoverflow.com/q/29517885
has comment: http://stackoverflow.com/comment/47193806
type: AcceptedAnswer
downvote count: 0
has body: The script seems to add a dropzone object to the given element. So you can do something like this : var $dropZone = $("#mydropzone").dropzone({ /*options*/ }); // ... $dropZone[0].dropzone.processQueue();
has comment: http://stackoverflow.com/comment/47230606
type: Answer
upvote count: 19
has comment: http://stackoverflow.com/comment/47221416

http://stackoverflow.com/comment/47151772
has text: The sound keeps playing irrespective of whether I am logged in or not ! So it keeps firing the beeps unnecessarily!
comment on: http://stackoverflow.com/q/29496070
score: 0
type: Comment
type: QuestionComment

umbraco7
tags question: http://stackoverflow.com/q/29385891
type: Tag
tag name: umbraco7

http://stackoverflow.com/comment/47059441
type: Comment
score: 0
type: AnswerComment
has text: No not really i followed the second order only `code: `
comment on: http://stackoverflow.com/a/29446075

http://stackoverflow.com/q/29445268
has comment: http://stackoverflow.com/comment/47058054
tagged with: javascript
type: UnansweredQuestion
answer count: 2
score: 3
downvote count: 0
has answer: http://stackoverflow.com/a/29445541
favorite count: 0
tagged with: promise
tagged with: angularjs
linked to: http://stackoverflow.com/q/23803743
type: Question
tagged with: angular-promise
has answer: http://stackoverflow.com/a/29446139
has comment: http://stackoverflow.com/comment/47057798
upvote count: 3
has comment: http://stackoverflow.com/comment/47058432
has body: I'm trying to get the response of a $http call from ng-repeat inputs. And then determining whether to show the individual ng-repeat's given each response. Currently the actual $http api isn't available, so I've just hardcoded the response. It works just fine without using promises. But I am unable to even run it on jsfiddle when using the promise method. How can I get the promise working? EDIT: I've reworked my question thanks to Benjamin Gruenbaum I'm not actually using $http but using pouchDB (local DB so no need to worry about DOS). Just using $http as an example since it returns a promise as well. What I really need to work out is how to get the promises to update again when adding new names. e.g If "joe" is added then he should be on 'billsNotPaid' http://jsfiddle.net/TheSlamminSalmon/cs0gxxxd/6/ View: Hello Plunker! Everyone {{name}} These guys haven't paid their bills (Non Promise) {{name}} These guys haven't paid their bills (Using http Promise) {{name}} AngularJS Controller: function MainController($scope, $http) { $scope.names = [ "James", "Tim", "Alex", "Sam", "Kim" ]; $scope.billsNotPaid = []; // start as empty $scope.NotPaidBillsNonPromise = function (name) { if (name == "Tim" || name == "Sam" || name == "Joe") return true; }; $scope.NotPaidBills = function (name) { return $http.get("http://echo.jsontest.com/name/" + name) .then(function (r) { return (r.data.name === "Tim" || r.data.name === "Sam" || r.data.name === "Joe") }); }; $scope.newGuy; $scope.AddNewGuy = function () { $scope.names.push($scope.newGuy); }; // start the check for each name $scope.names.forEach(function(name){ return $scope.NotPaidBills(name).then(function(notPaid){ console.log(name, notPaid); if(notPaid) $scope.billsNotPaid.push(name); }); }); }
has title: How do you use promises in AngularJS Views (ng-show)?

http://stackoverflow.com/a/29495310
accepted answer of: http://stackoverflow.com/q/29487007
type: AcceptedAnswer
has body: @Liarez in his answer wrote: In this example I make difference for 3 urls, this can be messy if you have an URL that is like /posts/whatever/contacts because there is 2 places that will return True (2nd and 3rd li) So here is the better option for handling this: {% with request.resolver_match.url_name as url_name %} Home Posts Contact {% endwith %} Now we don't have problem with duplications in our url paths. That will work, assuming that you have wrote your url patterns with names like this: url(r'^$', 'home_view', name=u'home'), url(r'^posts/$', 'posts_view', name=u'blog'), url(r'^contact/$', 'contact_view', name=u'contact'),
score: 21
type: Answer
upvote count: 21
answers question: http://stackoverflow.com/q/29487007
downvote count: 0

http://stackoverflow.com/q/29421781
favorite count: 0
score: 24
linked to: http://stackoverflow.com/q/53919515
tagged with: single-threaded
answer count: 1
upvote count: 24
tagged with: asynchronous
linked to: http://stackoverflow.com/q/21607692
has answer: http://stackoverflow.com/a/29422900
accepted answer: http://stackoverflow.com/a/29422900
linked to: http://stackoverflow.com/q/22286887
downvote count: 0
has body: GENERAL GOAL I’d like to know how the following pieces of a javascript environment interconnect as a system. Javascript Engine Event Loop Event Queue We can limit this to a browser environment since node has been covered in another article (here) THINGS I (believe to) UNDERSTAND: Javascript is single threaded and therefore only has one callstack. Javascript environments provide only a few functions that are truly asynchronous. These may include setTimeout(), setInterval(), and I/O function(s). A developer cannot create their own asynchronous functions without using one of these. Javascript itself runs synchronously but through it’s async functions can callback the would-be blocking functions once the current callstack is clear. EXAMPLE: console.log(‘Sync code started…’); setTimeout(function asyncLog() { console.log(‘Async function has completed’) }, 2000); console.log(‘Sync code finished…') EXAMPLE STEPS: ( Please correct steps if I’m wrong ) ‘Sync code started…’ is logged setTimeout is added to stack but immediately returns control setTimeout is sent to a different ‘thread’…’worker’? outside of javascript’s single thread to count the 2000 milliseconds ‘Sync code finished…’ is logged After 2000 milliseconds asyncLog() is pushed to the Event Queue Because the callstack is clear the Event Loop checks the Event Queue for pending callbacks asyncLog() is removed from the queue and pushed to the stack by the Event Loop 'Async function has completed’ is logged callstack is now clear QUESTIONS These don’t need to be answered one by one if someone could produce an overview of the steps of how and where async functions (such as setTimeout) go from the time they first hit the callstack to when they are called back to the callstack. On step 3, who produces this new thread? Is it the browser? This new thread is being blocked correct? What happens if you have a loop that creates 1000 setTimeouts. Are 1000 ‘threads’ created? Is there a limit to how many threads can be spawned at a…
type: Question
type: AnsweredQuestion
has title: How are the Event Loop, Callback Queue, and Javascript’s single thread connected?
tagged with: event-loop
tagged with: event-queue
tagged with: javascript

http://stackoverflow.com/comment/47144962
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29490189
has text: In practice this will not work properly, as the Ajax call will not stop the browser stopping execution and closing the window, because it is meant to be asynchronous.
score: 0

http://stackoverflow.com/q/29396371
has comment: http://stackoverflow.com/comment/46969295
has title: $routeParams undefined when passing to new view & controller
type: Question
has comment: http://stackoverflow.com/comment/46970305
has comment: http://stackoverflow.com/comment/46971436
answer count: 1
tagged with: asp.net-web-api
tagged with: javascript
has comment: http://stackoverflow.com/comment/46980539
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46971326
has comment: http://stackoverflow.com/comment/46970119
accepted answer: http://stackoverflow.com/a/29520785
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29520785
has body: Fairly new to AngularJS and WebAPI here, and figure the best way to learn is by doing. Apologies in advance if this question seems simple - I've spent a day flipping through StackOverflow and tried them all. I currently have a separate Master &amp; Detail view, both with their own controller. I am trying to pass the selected ID through to the Details controller so I can query my database using the ID, though am getting "undefined" on my $routeParams. I'm unsure if I am missing something simple, or whether I'm even approaching this correctly. The controller doesn't seem to like it when I inject '$routeParams' either. My app.js module: var app = angular.module("ProjectDashboardModule", ["ngRoute"]); app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { $routeProvider .when("/", { templateUrl: "/Home/Index" }) .when("/Project", { templateUrl: '/Project/Index', controller: 'ProjectCrudController' }) .when("/Project/project/:id", {templateUrl:'/Project/project', controller: 'ProjectTaskController' }); $routeProvider.otherwise({redirectTo: '/home' }); $locationProvider.html5Mode(true); }]); my Factory.js: app.factory('projectFactory', ['$http', function ($http) { var urlBase = '/api/Projects/'; var projectFactory = {}; projectFactory.getProjects = function () { return $http.get(urlBase); }; projectFactory.getSingleProject = function (id) { return $http.get(urlBase + '/' + id); }; return projectFactory; }]); my ProjectTaskController.js: app.controller('ProjectTaskController', ['$scope', "$routeParams", 'projectFactory', function ($scope, $routeParams, projectFactory) { alert($routeParams.id) $scope.project; $scope.message; getProjectById($routeParams.id); function getProjectById(id) { projectFactory.getSingleProject(id) .success(function (data) { $scope.project = data; }) .error(function (error) { $scope.message = 'error retrieving project ' + error.message; }); } }]);
has comment: http://stackoverflow.com/comment/46980330

http://stackoverflow.com/a/29434516
score: 0
answers question: http://stackoverflow.com/q/29433765
type: Answer
has body: The function keyword can be used two ways: as a function statement or an expression. There is a discussion of the differences here, but I'll try to cover the relevant parts. When used as a statement (as below), the function name will be valid within the surrounding scope of the statement: function hi(){ console.log(typeof hi); // "function" } console.log(typeof hi); // "function" But when used as an expression, the function name is only valid within the function body: var greetings = function hi(){ console.log(typeof hi); // "function" } console.log(typeof hi); // "undefined" console.log(typeof greetings); // "undefined So the scope problem with your initial example is that, because you are using it as an expression, the name attachFunction will be undefined when you try to unbind it. (I think you also have some confusion about how parameters are passed to event handlers, but that's a separate issue.)

http://stackoverflow.com/q/29421215
upvote count: 7
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47026316
has body: I'm fetching some data with $.getJSON that I want to asynchronously bind to controller context. I've come up with this in my route - which works, but I'm not happy with it: setupController: function(controller, model) { this._super(controller, model); Em.RSVP.Promise.cast(Em.$.getJSON((this.get('ENV.apiBaseURL')) + "/users/current/live_matchday_stats")).then((function(_this) { return function(s) { return _this.controller.set('matchdayStats', Em.Object.create(s)); }; } Then, in my template, I can, for example, use: Foo: {{matchdayStats.foo}} And it works just fine. Is there a better way to write this (perhaps without promise casts and Em.Object creation) - I know this automatically works if I put Em.$.getJSON into a model hook.
favorite count: 0
accepted answer: http://stackoverflow.com/a/29425252
tagged with: ember.js
has title: Ember.js: Proper way to cast Em.$.getJSON into a promise and bind response to controller context?
type: AnsweredQuestion
score: 7
has answer: http://stackoverflow.com/a/29425252
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47017258

http://stackoverflow.com/q/29386842
has answer: http://stackoverflow.com/a/29867284
type: Question
score: 3
tagged with: javascript
tagged with: dom
upvote count: 4
has body: I have to load same html page with in colorbox but with different Query string parameters. Everything is working fine except JQuery. i.e. the count of some specific divs, I am using $('div').length; and it is returning the wrong output which is the sum of last opened colorbox and currently opened.
answer count: 1
has title: Reopen same Colorbox with different Query string
favorite count: 0
tagged with: colorbox
type: UnansweredQuestion
downvote count: 1

http://stackoverflow.com/q/29476362
answer count: 1
downvote count: 0
tagged with: javascript
has title: Google maps JS API referer URL
has body: Does google maps JS API (v3) support any referer URLs other than http:// or https:// protocol? I'm building a series of native mobile application (ios, android and windows), but wanted to integrate google maps js api, because most of the UIs in my application are developed with html5/js. And yes, we are bundling all our js/html assets with the native application. Therefore, the google maps js library will get a referer URL like file:///var/mobile/Container/...., but seems this kind of referer URL is not supported by google. an alternative solution is to setup a mini server on the device to host all js/html assets, and then register http://localhost as one of the referer url. But I really want to avoid this.
favorite count: 0
type: UnansweredQuestion
tagged with: maps
score: 3
upvote count: 3
type: Question
tagged with: api
tagged with: mobile
has answer: http://stackoverflow.com/a/29851047

http://stackoverflow.com/q/29385718
has comment: http://stackoverflow.com/comment/46949690
has answer: http://stackoverflow.com/a/29385939
type: Question
has title: I want to Find a string in java script
has comment: http://stackoverflow.com/comment/46949649
linked to: http://stackoverflow.com/q/24231617
downvote count: 3
has comment: http://stackoverflow.com/comment/46949791
has body: I want to search for a string in all .txt files in one folder and return the file namw. The folder can have sub folders and the string I Want to search should be passed as parameter. For ex I want all the file name and locations which have the string 0754665477
has comment: http://stackoverflow.com/comment/46949722
linked to: http://stackoverflow.com/q/13709482
score: -2
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46949685
has comment: http://stackoverflow.com/comment/46949699
has comment: http://stackoverflow.com/comment/46950248
favorite count: 0
linked to: http://stackoverflow.com/q/1087246
has comment: http://stackoverflow.com/comment/46949776
has comment: http://stackoverflow.com/comment/46949673
has comment: http://stackoverflow.com/comment/46949975
has comment: http://stackoverflow.com/comment/46949656
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/q/29506527
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47229003
type: Question
linked to: http://stackoverflow.com/q/12813573
has comment: http://stackoverflow.com/comment/47170618
has body: I am working on my project and I am trying to make this . I want to make everything work on click for every image (so every image would have they own paper), need this to hover and I would like to use the toggle blind effect. I was reading that it would be wise to use CSS Backgrounds on this, so I can swap pictures but I can not understand it. I have taken some code to make a div who will hover on click, but I did not made desired effect. jQuery(document).ready(function($) { $('.brownbox_trigger').click(function(event) { //prevent deafault action (hyperlink) e.preventDefault(); //Get clicked link href var image_href = $(this).attr("href"); /* If the brownbox window HTML already exists in document, change the img src to mach the href of whatever link wac c If the brownbox window HTML doesn't exists, create it and insert (This will only happen the first time around) */ if ($('#brownbox').length > 0) { // #brownbox exists //place href as img src value $('#content').html(' '); //show brownbox window $('#brownbox').show(); } else { //create HTML markup for brownbox window var brownbox = ' ' + ' Click to close ' + ' ' + ' ' + ' ' + ' '; //insert brownbox into page $('body').append(brownbox); } /* Act on the event */ }); //Click enywhere on the page to get rid of the brownbox window $('#brownbox').live('click', function() { $('#brownbox').hide(); }); // Our script here }); EDIT: I want to use SlideDown()-SlideUp() from jQuery(), so I have used some examples to make changes to mine HTML, but nothing is happening when I click over an image. JSFiddle example. I want to be able to click on it, and the hidden image div will appear containing text, then the jQuery will do the slide. Problem is that after I click on mine image nothing is happening, or as I see it, the whole picture is sliding down? Can you help me over come this, thank you.
has comment: http://stackoverflow.com/comment/47228686
has comment: http://stackoverflow.com/comment/47170285
has comment: http://stackoverflow.com/comment/47170163
upvote count: 2
has comment: http://stackoverflow.com/comment/47232443
answer count: 2
has comment: http://stackoverflow.com/comment/47425983
has title: How to hover,change,toggle a picture with jQuery
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47170492
favorite count: 0
has answer: http://stackoverflow.com/a/29508895
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29507140
has comment: http://stackoverflow.com/comment/47424906
has comment: http://stackoverflow.com/comment/47424672
has comment: http://stackoverflow.com/comment/47260299
has comment: http://stackoverflow.com/comment/47231842
score: 2
has comment: http://stackoverflow.com/comment/47263709

http://stackoverflow.com/comment/47003390
comment on: http://stackoverflow.com/a/29415455
score: 0
type: AnswerComment
type: Comment
has text: @squint: and [tag:java] doesn't automatically coerce booleans to int's anyway.

http://stackoverflow.com/comment/47120897
type: Comment
comment on: http://stackoverflow.com/a/29454960
type: AnswerComment
has text: Last thing..how can I make sure it works on all paragraphs, not just the one? http://jsfiddle.net/3ZKP9/157/
score: 0

http://stackoverflow.com/a/29503870
type: Answer
answers question: http://stackoverflow.com/q/29435486
has body: Apologies in advance if I'm stating the obvious but do you have PhantomJS installed? I can't see it in your packages.json file. You can install it using npm install phantomjs --save-dev in your project root. The save-dev will add it to your packages.json so when you run npm install it will automatically get installed.
score: 0
has comment: http://stackoverflow.com/comment/47174492

d3.js
tags question: http://stackoverflow.com/q/29482436
tags question: http://stackoverflow.com/q/29517081
tags question: http://stackoverflow.com/q/29451529
tags question: http://stackoverflow.com/q/29413914
tags question: http://stackoverflow.com/q/29454232
tags question: http://stackoverflow.com/q/29435089
tags question: http://stackoverflow.com/q/29473676
tags question: http://stackoverflow.com/q/29499374
tags question: http://stackoverflow.com/q/29392414
tags question: http://stackoverflow.com/q/29408478
tags question: http://stackoverflow.com/q/29486496
tags question: http://stackoverflow.com/q/29517216
tags question: http://stackoverflow.com/q/29522425
tags question: http://stackoverflow.com/q/29418323
tags question: http://stackoverflow.com/q/29495475
tags question: http://stackoverflow.com/q/29392117
tags question: http://stackoverflow.com/q/29455546
tags question: http://stackoverflow.com/q/29465911
tags question: http://stackoverflow.com/q/29528307
tags question: http://stackoverflow.com/q/29425276
tags question: http://stackoverflow.com/q/29380033
tags question: http://stackoverflow.com/q/29421717
tags question: http://stackoverflow.com/q/29460275
tags question: http://stackoverflow.com/q/29438515
tags question: http://stackoverflow.com/q/29413119
tags question: http://stackoverflow.com/q/29385146
tags question: http://stackoverflow.com/q/29489155
type: Tag
tags question: http://stackoverflow.com/q/29494988
tags question: http://stackoverflow.com/q/29459361
tags question: http://stackoverflow.com/q/29476518
tags question: http://stackoverflow.com/q/29523845
tags question: http://stackoverflow.com/q/29395263
tags question: http://stackoverflow.com/q/29473721
tags question: http://stackoverflow.com/q/29482336
tags question: http://stackoverflow.com/q/29529772
tags question: http://stackoverflow.com/q/29422792
tags question: http://stackoverflow.com/q/29492093
tags question: http://stackoverflow.com/q/29508732
tags question: http://stackoverflow.com/q/29514406
tags question: http://stackoverflow.com/q/29497553
tags question: http://stackoverflow.com/q/29396072
tags question: http://stackoverflow.com/q/29492000
tags question: http://stackoverflow.com/q/29523879
tags question: http://stackoverflow.com/q/29393989
tags question: http://stackoverflow.com/q/29466011
tags question: http://stackoverflow.com/q/29522454
tags question: http://stackoverflow.com/q/29465884
tags question: http://stackoverflow.com/q/29519742
tags question: http://stackoverflow.com/q/29487336
tags question: http://stackoverflow.com/q/29408785
tags question: http://stackoverflow.com/q/29381952
tags question: http://stackoverflow.com/q/29396758
tags question: http://stackoverflow.com/q/29491761
tag name: d3.js
tags question: http://stackoverflow.com/q/29457659
tags question: http://stackoverflow.com/q/29458482
tags question: http://stackoverflow.com/q/29495486
tags question: http://stackoverflow.com/q/29466806
tags question: http://stackoverflow.com/q/29398386
tags question: http://stackoverflow.com/q/29394797
tags question: http://stackoverflow.com/q/29463783
tags question: http://stackoverflow.com/q/29515188
tags question: http://stackoverflow.com/q/29499280
tags question: http://stackoverflow.com/q/29493843
tags question: http://stackoverflow.com/q/29435703
tags question: http://stackoverflow.com/q/29521823
tags question: http://stackoverflow.com/q/29485448
tags question: http://stackoverflow.com/q/29410303
tags question: http://stackoverflow.com/q/29494260
tags question: http://stackoverflow.com/q/29513084
tags question: http://stackoverflow.com/q/29484365
tags question: http://stackoverflow.com/q/29398581
tags question: http://stackoverflow.com/q/29477695
tags question: http://stackoverflow.com/q/29453363
tags question: http://stackoverflow.com/q/29499553
tags question: http://stackoverflow.com/q/29522663
tags question: http://stackoverflow.com/q/29487813
tags question: http://stackoverflow.com/q/29498111

http://stackoverflow.com/q/29519017
has comment: http://stackoverflow.com/comment/47194268
has comment: http://stackoverflow.com/comment/47193233
has comment: http://stackoverflow.com/comment/47193278
has body: So basically I am trying to format some phone numbers before I submit them to the server using the following code. I am submitting a home phone and a work phone, both inputs with a class of phone. Note: I use the setTimeout because I am showing an ajax loader to give the impression that work is being done. submitHandler: function(form){ //Fires if validator plugin finds no errors //Cleanup Phone Numbers - Should receive phone numbers like (xxx) xxx-xxxx $("input.phone").each(function(){ this.value = this.value.replace(/\D/g,"").replace(/(\d{3})(\d{3})(\d{4})/, "$1-$2-$3"); }); setTimeout(function(){ form.submit(); }, 2500); } jsFiddle Why is it that I am sometimes neither home phone and work phone are properly formatted, sometimes both are properly formatter, or only home phone is properly formatted? In my two specific cases where this has failed, I have received the numbers in xxxxxxxxxx format, which leads me to believe the second replace doesn't always work or the form is submitting before the second replace can fire in some instances.
type: UnansweredQuestion
has title: Can a setTimeout function fire before code infront of it has executed?
has comment: http://stackoverflow.com/comment/47195143
has comment: http://stackoverflow.com/comment/47193321
has answer: http://stackoverflow.com/a/29519387
has comment: http://stackoverflow.com/comment/47194950
has comment: http://stackoverflow.com/comment/47193737
score: 1
has comment: http://stackoverflow.com/comment/47195239
has comment: http://stackoverflow.com/comment/47194600
has comment: http://stackoverflow.com/comment/47194646
upvote count: 1
has comment: http://stackoverflow.com/comment/47193381
type: Question
has comment: http://stackoverflow.com/comment/47193194
tagged with: javascript
has comment: http://stackoverflow.com/comment/47196094
answer count: 1
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/47193149
favorite count: 0
has comment: http://stackoverflow.com/comment/47193598

http://stackoverflow.com/comment/47128710
comment on: http://stackoverflow.com/a/29484292
has text: between do check if you have enough content to scroll down, ie, (height of document) should be greater than (height of window)
score: 0
type: AnswerComment
type: Comment

recursion
type: Tag
tags question: http://stackoverflow.com/q/29456460
tags question: http://stackoverflow.com/q/29385535
tags question: http://stackoverflow.com/q/29425267
tags question: http://stackoverflow.com/q/29509652
tags question: http://stackoverflow.com/q/29501040
tag name: recursion
tags question: http://stackoverflow.com/q/29482178
tags question: http://stackoverflow.com/q/29381078
tags question: http://stackoverflow.com/q/29386613
tags question: http://stackoverflow.com/q/29376702
tags question: http://stackoverflow.com/q/29464439
tags question: http://stackoverflow.com/q/29454470

http://stackoverflow.com/comment/46949656
type: QuestionComment
score: 1
has text: Maybe you wanted to use Java instead of JavaScript. Didn't you?
comment on: http://stackoverflow.com/q/29385718
type: Comment

http://stackoverflow.com/comment/47027506
type: Comment
type: QuestionComment
has text: No, I am using stylus with AngularJS. I am looking for solution how to use stylus without sprites.
score: 0
comment on: http://stackoverflow.com/q/29428591

http://stackoverflow.com/q/29406809
type: Question
has comment: http://stackoverflow.com/comment/46989210
tagged with: javascript
has answer: http://stackoverflow.com/a/29407660
score: -1
has comment: http://stackoverflow.com/comment/46988713
has body: This is my php file. I want autosuggest for my text box which is not working. I have 3-4 sources of autosuggest. <?php $con =mysqli_connect("due connectn attributes"); $return_arr = array(); $search = mysqli_real_escape_string($_GET["term"]); if (!$search) return; $sql = "SELECT PName, PNo FROM PlayerDetails WHERE PName LIKE '%$search%'"; $sql = mysqli_query($sql); while ($row = mysqli_fetch_assoc($sql)){ $row_array['PNo'] = $row['PNo']; $row_array['PName'] = $row['PName']; //echo "$PName|$PNo\n"; array_push($return_arr, $row_array); /* Toss back results as json encoded array. */ echo json_encode($return_arr); } mysqli_close($con); ?> The javascript part: The HTML part is: Username:
answer count: 2
upvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/46989440
has comment: http://stackoverflow.com/comment/46988662
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46988939
accepted answer: http://stackoverflow.com/a/29407660
tagged with: mysqli
tagged with: php
type: AnsweredQuestion
has title: WHy my autocomplete is not suggesting anything
possible better answer: http://stackoverflow.com/a/29406905
has answer: http://stackoverflow.com/a/29406905
downvote count: 1
has comment: http://stackoverflow.com/comment/46988003

http://stackoverflow.com/comment/46972209
score: 0
has text: @anubhava yes xxxx will vary
type: QuestionComment
comment on: http://stackoverflow.com/q/29397813
type: Comment

http://stackoverflow.com/comment/47012763
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29414564
type: QuestionComment
has text: possible duplicate of [Mongoose instance method is undefined](http://stackoverflow.com/questions/10724876/mongoose-instance-method-is-undefined)

http://stackoverflow.com/q/29523768
answer count: 3
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/22438407
has body: what am I doing wrong? this is the easiest variation from magnific popup, but I just can't get this running for hours. I'm a newbie to JS, but other things worked out pretty well?! i used the JS-File from here https://raw.github.com/dimsemenov/Magnific-Popup/master/dist/jquery.magnific-popup.min.js from that stackoverflow post: Magnific-popup doesn't work at all @charset "utf-8"; /* CSS Document */ #some-button, #some-button2 {padding:20px} .white-popup { position: relative; background: black; padding: 40px; width: 2000px; max-width: 2000px; margin: 20px auto; text-align: center; } /* Magnific Popup CSS */ .mfp-bg { top: 0; left: 0; width: 100%; height: 100%; z-index: 1042; overflow: hidden; position: fixed; background: #0b0b0b; opacity: 0.8; filter: alpha(opacity=80); } .mfp-wrap { top: 0; left: 0; width: 100%; height: 100%; z-index: 1043; position: fixed; outline: none !important; -webkit-backface-visibility: hidden; } .mfp-container { text-align: center; position: absolute; width: 100%; height: 100%; left: 0; top: 0; padding: 0 8px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .mfp-container:before { content: ''; display: inline-block; height: 100%; vertical-align: middle; } .mfp-align-top .mfp-container:before { display: none; } .mfp-content { position: relative; display: inline-block; vertical-align: middle; margin: 0 auto; text-align: left; z-index: 1045; } .mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content { width: 100%; cursor: auto; } .mfp-ajax-cur { cursor: progress; } .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { cursor: -moz-zoom-out; cursor: -webkit-zoom-out; cursor: zoom-out; } .mfp-zoom { cursor: pointer; cursor: -webkit-zoom-in; cursor: -moz-zoom-in; cursor: zoom-in; } .mfp-auto-cursor .mfp-content { cursor: auto; } .mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter { -webkit-user-select: none; -moz-user-select: none; user-select: none; } .mfp-loading.mfp-figure { display: …
tagged with: magnific-popup
type: UnansweredQuestion
has title: jquery Magnific Popup won't work - js-newbie
has comment: http://stackoverflow.com/comment/47202044
has answer: http://stackoverflow.com/a/29524071
has answer: http://stackoverflow.com/a/29523990
tagged with: css
has answer: http://stackoverflow.com/a/29524361
has comment: http://stackoverflow.com/comment/47201959
linked to: http://stackoverflow.com/q/1795438
type: Question
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/47123897
type: Comment
has text: Thanks danh, but I keep getting the error no matter where I put my success/error call. I'm going to set up a new question to deal with this since my code is somewhat elaborate for this. I will try to simplify it.
type: AnswerComment
comment on: http://stackoverflow.com/a/29481449
score: 0

http://stackoverflow.com/comment/47134712
has text: In code you have `zoomtype`, where should be `zoomType`, see demo: http://jsfiddle.net/qprmjm67/3/
comment on: http://stackoverflow.com/q/29455656
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29493367
has body: it is because child is undefined or null. You need to check for child to be undefined or null and based on that you can show alert. Something like this, if(child!=null &amp;&amp; typeof child != 'undefined') alert(parent + ":" + child + ":" + grandchild); else alert(parent + ":" + " " + ":" + grandchild);
answers question: http://stackoverflow.com/q/29493281
score: 0
type: Answer

http://stackoverflow.com/q/29503984
upvote count: 6
has title: AJAX call error - status of 400 (Bad Request)
type: AnsweredQuestion
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/47167234
tagged with: javascript
has body: I'm trying to use the BloomAPI to retrieve Doctor's NPI number by querying with their first and last name. I'm using Jquery Ajax to make a get request for the JSON data. I am able to get the JSON data when I do CURL in the terminal: curl -X GET 'http://www.bloomapi.com/api/search?offset=0&amp;key1=last_name&amp;op1=eq&amp;value1=LIN&amp;key2=first_name&amp;op2=eq&amp;value2=JOHN' For the purpose below - I just hardcoded in the params into the URL. I get a "Failed to load resource: the server responded with a status of 400 (Bad Request" Error. Any idea what I might be doing wrong? $.ajax({ type: 'GET', url: 'http://www.bloomapi.com/api/search?offset=0&amp;key1=last_name&amp;op1=eq&amp;value1=LIN&amp;key2=first_name&amp;op2=eq&amp;value2=JOHN', dataType: 'jsonp' }).done(function(server_data) { console.log(server_data) }).fail(console.log("failed"));
score: 4
has answer: http://stackoverflow.com/a/29504211
accepted answer: http://stackoverflow.com/a/29504211
has comment: http://stackoverflow.com/comment/47165586
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/a/29423250
has comment: http://stackoverflow.com/comment/47027176
has body: Maybe it would help to simplify things a bit. This works for me in Chrome, IE 9+, and Firefox: var alreadyUsed = []; $(document).ready( function() { $("select[name^='dd']").data("previous","0"); $("select[name^='dd']").on("change", function(event) { var newValue = $(this).val(); var prevValue = $(this).data("previous"); if(alreadyUsed.indexOf(newValue) == -1){ if(prevValue != "0") alreadyUsed.splice( alreadyUsed.indexOf(prevValue), 1 ); alreadyUsed.push(newValue); $(this).data("previous",newValue); }else{ alert("Field is already in use.\nPlease, select a different field."); $(this).val(prevValue); } }); }); -Select- cat dog bear -Select- cat dog bear -Select- cat dog bear You code is a bit more complicated, and obviously does other things, but perhaps this simple working version will help.
type: AcceptedAnswer
score: 0
answers question: http://stackoverflow.com/q/29420549
type: Answer
accepted answer of: http://stackoverflow.com/q/29420549

http://stackoverflow.com/q/29399636
accepted answer: http://stackoverflow.com/a/29400984
has comment: http://stackoverflow.com/comment/46975789
downvote count: 2
has title: Javascript post of json string: nothing passes in or back
has comment: http://stackoverflow.com/comment/46975532
has comment: http://stackoverflow.com/comment/46975715
has comment: http://stackoverflow.com/comment/46975373
type: Question
has comment: http://stackoverflow.com/comment/46976164
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46975960
has comment: http://stackoverflow.com/comment/46975644
has comment: http://stackoverflow.com/comment/46976316
score: -2
has comment: http://stackoverflow.com/comment/46975323
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46975780
has comment: http://stackoverflow.com/comment/46975578
tagged with: javascript
has comment: http://stackoverflow.com/comment/46975232
has comment: http://stackoverflow.com/comment/46975821
has body: I'm working on a page that gets data from an html table (two columns plus an index of a form) and makes a json string. This is supposed to pass into php, then I do some calculations on the data, then send it back to the page to append the table with new column values. Here's what I've got so far: Data Arrays This is what one of the arrays looks like (LatData): [1, 1, "43.07104167", "43.07178767", "43.0707977", "43.07115595", "43.06975769", "43.07023291", "43.07269194", "43.07112776", "43.07067623", "43.07285063", "43.07132924", "43.07091389", "43.07218128", "43.07279775", "43.07440354", "43.07560161", "43.07471769", "43.07073611", "43.07067713", "43.070925", "43.07148333", "43.07070833", "43.07046389", "43.07024444", "43.07127778"] Convert arrays and the int to a JSON string So I take two arrays like the one above of the same length and the Item which is just a single value integer and I make my json string: json = JSON.stringify({"Item":Item, "Lat": LatData, "Lon": LongData}); Then I get a nice json string as follows: {"Item":1,"Lat":[1,1,"43.07104167","43.07178767","43.0707977","43.07115595","43.06975769","43.07023291","43.07269194","43.07112776","43.07067623","43.07285063","43.07132924","43.07091389","43.07218128","43.07279775","43.07440354","43.07560161","43.07471769","43.07073611","43.07067713","43.070925","43.07148333","43.07070833","43.07046389","43.07024444","43.07127778"],"Lon":[1,1,"-99.325375","-99.32837458","-99.32465527","-99.325341","-99.32509187","-99.32417542","-99.32573126","-99.32726626","-99.32830531","-99.32749062","-99.32966364","-99.32493056","-99.33109478","-99.33023795","-99.32853197","-99.32776487","-99.32631851","-99.3253","-99.32540699","-99.32571944","-99.32540278","-99.32453889","-99.32566667","-99.32622222","-99.32622222"]} Send the JSON string to PHP Here's how I'm posting the data: function MakePhpCall() { var json =""; //this is the JSON string of all the data var Item=1; //holding this constant for now json = JSON.stringify({"Item":…
has answer: http://stackoverflow.com/a/29400984
has comment: http://stackoverflow.com/comment/46976320
has comment: http://stackoverflow.com/comment/46975735
upvote count: 0
has comment: http://stackoverflow.com/comment/46977545
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46975555
has comment: http://stackoverflow.com/comment/46976349
has comment: http://stackoverflow.com/comment/46975867
has comment: http://stackoverflow.com/comment/46975497
has comment: http://stackoverflow.com/comment/46975832
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46976230
tagged with: php
has comment: http://stackoverflow.com/comment/46975998
has comment: http://stackoverflow.com/comment/46976286
has comment: http://stackoverflow.com/comment/46976171

http://stackoverflow.com/comment/47000814
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29393813
has text: I posted my _form_submit_callback but I don't know how it will be useful. I don't have ajax callbacks. Drupal do the works alone.

http://stackoverflow.com/a/29444108
upvote count: 1
answers question: http://stackoverflow.com/q/29443231
has body: $compile(element)(scope) returns an element that you should place in the DOM. The .html() part of your code is just inserting your uncompiled html, and you're not doing anything with the compiled element. Instead, you could do something like: angular.element(el).empty().append($compile(html)(scope))
score: 1
has comment: http://stackoverflow.com/comment/47072632
downvote count: 0
type: Answer

http://stackoverflow.com/q/29471641
has comment: http://stackoverflow.com/comment/47171758
has body: I want to load Google different coordinates on href click. For Example Location 1 Location 2 Location 3 Below this there is a DIV which loads the Google Map which loads the locations from the above links. Here is the script which is loading the Map with single location. function initialize() { var mapOptions = { center: new google.maps.LatLng(51.520904, -0.107466), zoom: 17, draggable: false, scrollwheel: false, disableDoubleClickZoom: true, zoomControl: false }; var map = new google.maps.Map(document.getElementById("map-container"), mapOptions); var styles = [ { featureType: "landscape.man_made", elementType: "geometry", stylers: [ { visibility: "on" }, { color: "#d4ebf4" } ] }, { featureType: "road", elementType: "labels.text.fill", stylers: [ { visibility: "on" }, { color: "#202020"} ] }, { featureType: "poi.business", elementType: "all", stylers: [ { visibility: "on" } ] }, { featureType: "poi.park", elementType: "all", stylers: [ { color: "#98d1e8" } ] }, { featureType: "poi.school", elementType: "all", stylers: [ { visibility: "off" }, { color: "#808080" } ] }, { featureType: "all", elementType: "geometry.stroke", stylers: [ { visibility: "off" } ] }, { featureType: "poi.park", elementType: "labels.text.fill", stylers: [ { visibility: "off" } ] }, { featureType: "transit.station.rail", elementType: "labels.icon", stylers: [ { hue: "#005eff" }, { saturation: -37 } ] }, { featureType: "poi.park", elementType: "labels.text.stroke", stylers: [ { color: "#808080" } ] }, { featureType: "road.local", elementType: "all", stylers: [ { color: "#ffffff" } ] }, { featureType: "all", elementType: "labels.text.fill", stylers: [ { color: "#808080" } ] }, { featureType: "transit.line", elementType: "all", stylers: [ { color: "#ffffff" } ] } ]; map.setOptions({styles: styles}); var blueIco = { url: "<?php bloginfo('template_directory'); ?>/images/map-pin.png", size: new google.maps.Size(55, 73), anchor: new google.maps.Point(28, 72) }; var latLng = new google.maps.LatLng(51.52…
favorite count: 0
linked to: http://stackoverflow.com/q/28127344
possible better answer: http://stackoverflow.com/a/29512426
has comment: http://stackoverflow.com/comment/47105556
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29472970
upvote count: 2
score: 1
has title: Load Location in Google Map on href Click
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47105647
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29472970
tagged with: google-maps-api-3
answer count: 2
tagged with: google-maps
has answer: http://stackoverflow.com/a/29512426
tagged with: jquery

http://stackoverflow.com/comment/47075750
score: 0
type: AnswerComment
type: Comment
has text: @WeDoTDD - yes, `=` will replace a previously existing value too and yes the functions could be inline anonymous functions rather than a reference to a named function. In Javascript a function reference can be either a named function or an inline anonymous function.
comment on: http://stackoverflow.com/a/29455009

http://stackoverflow.com/comment/47106272
score: 0
has text: @DanSingerman, I see that I am probably wrong in terminology, but my goal is to keep the same role that CSRF token plays in forms.
comment on: http://stackoverflow.com/q/29472359
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29473560
has body: $sector_final = array(); //array_push($sector_final, array("Sector", "Amount")); foreach( $sector_data as $row){ $final = array("Sector" =&gt; "' . $row['sector'] . '", "Amount" =&gt; $row['amount']); array_push($sector_final, $final); } var_dump(json_encode($sector_final));
answers question: http://stackoverflow.com/q/29473453
downvote count: 0
score: 1
upvote count: 1
type: Answer

http://stackoverflow.com/comment/47006445
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29414215
score: 0
has text: found my answer here: http://stackoverflow.com/questions/25254355/how-to-pass-extra-data-down-a-parse-promise-chain

http://stackoverflow.com/a/29396005
accepted answer of: http://stackoverflow.com/q/29375100
has comment: http://stackoverflow.com/comment/69099954
has comment: http://stackoverflow.com/comment/68378379
type: Answer
has comment: http://stackoverflow.com/comment/68427457
has comment: http://stackoverflow.com/comment/69107401
answers question: http://stackoverflow.com/q/29375100
has comment: http://stackoverflow.com/comment/68412383
has comment: http://stackoverflow.com/comment/63679417
upvote count: 20
has comment: http://stackoverflow.com/comment/68428399
has comment: http://stackoverflow.com/comment/68398716
has comment: http://stackoverflow.com/comment/68428334
score: 20
has comment: http://stackoverflow.com/comment/63680581
has body: cast can be translated to resolve. defer should indeed not be used. You'd create your loop only by chaining and nesting then invocations onto an initial Promise.resolve(undefined). function promiseWhile(predicate, action, value) { return Promise.resolve(value).then(predicate).then(function(condition) { if (condition) return promiseWhile(predicate, action, action()); }); } Here, both predicate and action may return promises. For similar implementations also have a look at Correct way to write loops for promise. Closer to your original function would be function promiseWhile(predicate, action) { function loop() { if (!predicate()) return; return Promise.resolve(action()).then(loop); } return Promise.resolve().then(loop); }
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29391918
answer count: 1
tagged with: jquery
tagged with: ajax
has title: AJAX Search on 2 Elements
type: UnansweredQuestion
has body: I am working on a project using classic ASP (not my idea) and AJAX which uses an access database to pull data from. I have the following form: Start typing a name The javascript I have at the top of my page is the following: function showCustomer(str) { // remove white space from the name entered on the search screen str = str.replace(" ", ""); var xmlhttp; if (str=="") { document.getElementById("txtHint").innerHTML="No records found"; return; } 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 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","get_customer.asp?q="+str,true); xmlhttp.send(); } This links to the an ASP file: <% response.expires=-1 dim name name = request.querystring("q") sql="SELECT person.id, person.forename, person.surname, person.postid, person.extension, person.internal_extension, person.mobile, person.room_number, job.id, job.name FROM staff INNER JOIN posts ON job.id = person.jobid WHERE (person.forename & person.surname like '%" & name & "%') or job.name like '%" & name & "%' set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open("E:\websites\directory\database.mdb") set rs=Server.CreateObject("ADODB.recordset") rs.Open sql,conn response.write(" ") response.write(" ") response.write(" ") response.write(" Forename ") response.write(" Surname ") response.write(" Extension ") response.write(" Internal Ext. ") response.write(" Mobile ") response.write(" Room No. ") response.write(" ") response.write(" ") response.write(" ") response.write(" ") Do While Not rs.EOF response.write(" ") response.write(" " & rs("forename") & " ") response.write(" " & rs("surname") & " ") response.write(" " & rs("extension") & " ") response.write(" " & rs("interna…
has answer: http://stackoverflow.com/a/29392941
has comment: http://stackoverflow.com/comment/46961760
type: Question
tagged with: javascript
tagged with: asp-classic
score: 0
has comment: http://stackoverflow.com/comment/46961880

http://stackoverflow.com/a/29390118
has comment: http://stackoverflow.com/comment/46959160
type: Answer
has comment: http://stackoverflow.com/comment/46958043
has comment: http://stackoverflow.com/comment/46958315
has comment: http://stackoverflow.com/comment/46958457
has comment: http://stackoverflow.com/comment/46957633
score: 1
answers question: http://stackoverflow.com/q/29389924
upvote count: 1
has comment: http://stackoverflow.com/comment/46958428
has comment: http://stackoverflow.com/comment/46957730
has comment: http://stackoverflow.com/comment/46959548
has comment: http://stackoverflow.com/comment/46963353
has comment: http://stackoverflow.com/comment/46959731
has comment: http://stackoverflow.com/comment/46958184
has comment: http://stackoverflow.com/comment/46960030
has comment: http://stackoverflow.com/comment/46958776
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46959070
accepted answer of: http://stackoverflow.com/q/29389924
has body: When you are using foreach in a nested loop you can access only properties of a parent model. Experts is not a property of an item from the ExpertRoles. It is a property of viewModel model. That's why it doesn't work. Try using $root: = 0, attr: { 'data-cid': ConnectionId, 'title': Username }">
has comment: http://stackoverflow.com/comment/46959044
has comment: http://stackoverflow.com/comment/46964703
has comment: http://stackoverflow.com/comment/46957928
has comment: http://stackoverflow.com/comment/46959308
has comment: http://stackoverflow.com/comment/46959344

http://stackoverflow.com/a/29479087
answers question: http://stackoverflow.com/q/29475553
has body: The code inside the then block will be executed later. getText() is an asynchronous method that returns a promise that will be resolved when the text is actually fetched (which will happen later). In general, with promises, you need to chain dependent code off the code it depends on with then, so make your "outside" code run inside a then. In practice, most of the top-level protractor methods register their promises with a ControlFlow that makes sure the promises are resolved in order. This minimizes the number of explicit then chains, but does make the code a bit more magical. (The controlflow infrastructure is part of WebDriverJS that Protractor builds on.) Read https://github.com/angular/protractor/blob/master/docs/control-flow.md and https://github.com/SeleniumHQ/selenium/wiki/WebDriverJs#control-flows
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/50581157
type: Answer
accepted answer of: http://stackoverflow.com/q/29475553
downvote count: 0
score: 1

http://stackoverflow.com/comment/47161687
has text: i've used `if(this.Date)return new ...` ; ok, as long as the instance doesn't define ".Date"
comment on: http://stackoverflow.com/q/29501628
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/29418103
type: Answer
downvote count: 0
has body: If you wanted to create an isolated alias per fieldset group without a directive, you could use ng-repeat and filter to the precise item you want in your collection. ItemA @Html.Partial("_SingleItem") ItemB @Html.Partial("_SingleItem")
score: 1
has comment: http://stackoverflow.com/comment/47010560
upvote count: 1
answers question: http://stackoverflow.com/q/29417231

http://stackoverflow.com/comment/47141831
comment on: http://stackoverflow.com/q/29491344
has text: You have to iterate at some point to modify the list, I would suggest using `map`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/47119101
score: 0
type: AnswerComment
has text: @ricky3350 try again, I just fixed it.
comment on: http://stackoverflow.com/a/29478749
type: Comment

http://stackoverflow.com/a/29394514
has body: This is basic Javascript. nothing to do with Json or jQuery: var jsonObj = { "elements" : [] }; jsonObj.elements.push(1); jsonObj.elements.push(1.5); jsonObj.elements.push("some text"); jsonObj.elements.push({element: "some element"}); Here's a jsbin to fool around with: http://jsbin.com/hajale/2/edit
answers question: http://stackoverflow.com/q/29394398
score: 0
type: Answer

http://stackoverflow.com/comment/47079844
type: Comment
score: 0
has text: what do you mean by `for loop`? `JS for loop` or `PHP for loop`? as per your question and issue stated, it is working 100% fine on my side. What do you want more please?
comment on: http://stackoverflow.com/a/29457773
type: AnswerComment

http://stackoverflow.com/q/29454982
upvote count: 2
accepted answer: http://stackoverflow.com/a/30395388
type: AnsweredQuestion
tagged with: blob
has title: Javascript - buffer video from blobs source?
tagged with: javascript
type: Question
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/30395388
favorite count: 0
tagged with: buffer
has body: Context: Fiddling with javascript. Html5 browser. Question: Is it possible to have, say, two video blobs and buffer their content in a video tag and play them smoothly without concatenating them at first ? The underlying is : is it possible to dynamically add data to the video buffer in javascript in the browsers at any moment (the video may have already started to play and we still add data from a blob after that)? All the solutions seems to need the whole data at the beginning.
tagged with: cross-browser
score: 2
tagged with: video

virtual-earth
type: Tag
tags question: http://stackoverflow.com/q/29524505
tag name: virtual-earth

http://stackoverflow.com/a/29418450
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/29416861
accepted answer of: http://stackoverflow.com/q/29416861
has comment: http://stackoverflow.com/comment/47080314
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47009371
has comment: http://stackoverflow.com/comment/47010103
type: Answer
has body: function rowclick(e) { var obj = this if (obj.tagName == "TR") { if (obj.style.backgroundColor === "red") obj.style.backgroundColor = "white" else obj.style.backgroundColor = "red" } } $('table tr').click(rowclick) hello world hello world hello world Updated to toggle background color.

http://stackoverflow.com/q/29390436
has answer: http://stackoverflow.com/a/29394641
tagged with: arduino-ide
type: Question
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/29394641
answer count: 1
tagged with: arduino
has body: Is there a way to connect and send sms from the arduino uno (with gsm shield) using cylon.js. Do I have to use node gsm.ino library and if so how ? (just like the way we use cylon.js to control devices(LED, motor,etc) connected to arduino) Thank you
tagged with: arduino-uno
has title: cylon.js and gsm-shield in arduino
type: AnsweredQuestion

http://stackoverflow.com/comment/46981881
score: 0
type: QuestionComment
has text: You tried to eat a pizza before it was made. `console.log("I found:", $("#messages").length); $("#messages").on("click".....;` You can not attach events to an element before it exists on the page.
type: Comment
comment on: http://stackoverflow.com/q/29402883

http://stackoverflow.com/q/29493538
tagged with: javascript
score: 0
answer count: 2
tagged with: cross-domain
has comment: http://stackoverflow.com/comment/47146131
has comment: http://stackoverflow.com/comment/47146037
accepted answer: http://stackoverflow.com/a/29493712
linked to: http://stackoverflow.com/q/21507918
possible better answer: http://stackoverflow.com/a/29493713
has answer: http://stackoverflow.com/a/29493713
type: AnsweredQuestion
has title: why is this a cross domain request
has body: I'm trying to make a set of files to be able to send to someone and they can view some stuff in a web browser locally. My code works when viewed using a web server(apache) but if I load it up just as a file, (i.e. file:///C:/Code/Web/test/index.html) it get a cross domain request error from my JavaScript file when loading a JSON file. The HTML, JS, and JSON files are all in the same folder. I'm not sure how this is a cross domain request and why chrome and IE fail at loading the JSON file. Firefox loads it without problem. The JS I use for loading the file is: const JSON_FILE = "tin.json"; var xmlhttp; function webGLStart() { fetchDoc(JSON_FILE,loadJSON) } function fetchDoc(url,cfunc) { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } xmlhttp.onreadystatechange=cfunc; xmlhttp.open("GET",url,false); xmlhttp.send(); } function loadJSON() { if(xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { var input = JSON.parse(xmlhttp.responseText); displayData(input); } } Nothing really happens in my html page. Its just a canvas where the body calls webGLStart on load. Is there a way around this or is this something chrome and IE don't allow?
type: Question
has answer: http://stackoverflow.com/a/29493712
has comment: http://stackoverflow.com/comment/47153728

http://stackoverflow.com/comment/48426093
type: AnswerComment
comment on: http://stackoverflow.com/a/30082225
type: Comment
has text: @muglio, I figured that. You stated very carefully. But I couldn't figure out how to reproduce it.
score: 0

http://stackoverflow.com/comment/47031665
type: Comment
type: QuestionComment
has text: Looks like a simple matter of JavaScript changing the "this" value in different functions. Try storing `this` in a variable like `var self = this`, and then set `self.products`.
score: 1
comment on: http://stackoverflow.com/q/29430884

http://stackoverflow.com/a/29466789
has comment: http://stackoverflow.com/comment/47126026
has comment: http://stackoverflow.com/comment/47123676
type: Answer
has comment: http://stackoverflow.com/comment/47128948
has comment: http://stackoverflow.com/comment/47128521
has comment: http://stackoverflow.com/comment/47123796
has comment: http://stackoverflow.com/comment/47129657
has comment: http://stackoverflow.com/comment/47125945
has comment: http://stackoverflow.com/comment/47130123
has comment: http://stackoverflow.com/comment/47126131
has comment: http://stackoverflow.com/comment/47130655
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47125672
has comment: http://stackoverflow.com/comment/47106367
has comment: http://stackoverflow.com/comment/47126369
accepted answer of: http://stackoverflow.com/q/29464566
has comment: http://stackoverflow.com/comment/47125908
score: 0
has comment: http://stackoverflow.com/comment/47115336
answers question: http://stackoverflow.com/q/29464566
has body: So I had a go at what I get as the gist of it. Slightly changed the CSS, giving the main content below the top margin instead of .header. It was a bit easier to code it that way. Here's the live example : http://codepen.io/anon/pen/azrwog?editors=001 And the JavaScript (changed that a lot) : var previous = 0, delta, initial = true, stopped; $(window).scroll(function() { clearTimeout(stopped); var fromtop = $(window).scrollTop(); if (fromtop-previous &gt; 0) delta = -1; else delta = 1; previous = fromtop; if (fromtop &lt; 400) { var factor = 400-fromtop; $('.banner').css({'height': factor, 'opacity': factor/400}); $('.header').removeClass('fixed'); if (delta == -1 &amp;&amp; initial) firstScroll(); else if (delta == 1) scrollAction(); } else $('.header').addClass('fixed'); }); function firstScroll() { initial = false; $('html, body').animate({scrollTop: 400}, 800); } function scrollAction() {stopped = setTimeout(function() {goTop()}, 200)} function goTop() { var topoffset = $(window).scrollTop(); $('html, body').animate({scrollTop: 0}, 2*topoffset, function() { initial = true; }); } Another solution update - cross browser smooth, using the mousewheel.js plugin : http://codepen.io/anon/pen/jEoGxG?editors=001 var fromtop, initial = true, stopped; $(window).mousewheel(function(turn, delta) { if (!initial) $('html, body').finish(); $(window).scroll(function() { clearTimeout(stopped); fromtop = $(window).scrollTop(); if (fromtop &lt;= 400) { changeOpacity(); $('.header').removeClass('fixed'); if (delta == 1) scrollAction(); } else $('.header').addClass('fixed'); }); if (initial) { if (delta == -1) $('html, body').animate({scrollTop: 400}, 800, function() { initial = false; }); return false; } }); function scrollAction() {stopped = setTimeout(function() {goTop()}, 200)} function changeOpacity() { var factor = 400-fromtop; $('.banner').css({'height': factor, 'opacity': factor/400}); } function goTop() { var topoffset = $(window).scrollTop(); $('html, body').animate({scrollT…
has comment: http://stackoverflow.com/comment/47125968

http://stackoverflow.com/q/29502354
type: Question
has body: I've simplified the code to hopefully make it easier to figure out. HTML Javascript $(function() { $("#datepicker").datepicker(); }); I've uploaded both my HTML and javascript files on my school's hosting space here. When I visit the link on Safari the calendar shows up fine but when I open it on Firefox or Chrome nothing happens. Any help would be appreciated!
has answer: http://stackoverflow.com/a/29502396
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29502396
tagged with: datepicker
upvote count: 1
type: AnsweredQuestion
score: 1
has title: jQuery Datepicker working in Safari, but not FF or Chrome

http://stackoverflow.com/comment/47010620
has text: Can anyone add to this? Only thing I have found is if I hide the folder where 'node_modules' exists, it is fine. There has to be a better work around though?
comment on: http://stackoverflow.com/q/29402788
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29491143
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29493385
has answer: http://stackoverflow.com/a/29491330
has answer: http://stackoverflow.com/a/29491559
has comment: http://stackoverflow.com/comment/47141608
type: Question
tagged with: javascript
has body: Need help in finalizing the dynamic addition of fields. I have HTML drop-down list. First Second Third Add your question + Add new question And Jquery code //---- Add field script ----// $(document).ready(function() { var max_fields = 3; var wrapper = $(".input_fields_wrap"); var add_button = $(".add_field_button"); var x = 1; $(add_button).click(function(e){ e.preventDefault(); if(x < max_fields){ x++; $(wrapper).append(' First Second Third Add your question Remove '); } }); $(wrapper).on("click",".remove_field", function(e){ e.preventDefault(); $(this).parent('div').remove(); x--;}) }); //Add question fields $('#list1').change(function(){ if($("#list1").val() == 'addq'){ $('#youq').html(" "); } else {$('#youq').html("");}; }); All this is done in order to be able to choose a question from the list or add your own. Adding a drop-down lists by clicking the "+ Add new question" works well. But I have problems with the addition of a text box when you select "Add your question" from the list. If you select it from the first list, the field is displayed. But if you click on "+ Add new question" and select "Add your question" in the new list is a new text field does not show. Please help me. jsfiddle Edit
score: 0
answer count: 3
tagged with: jquery
has title: Jquery to dynamically add fields when you select from the list
type: UnansweredQuestion

http://stackoverflow.com/q/29417544
tagged with: listjs
has answer: http://stackoverflow.com/a/29418206
tagged with: javascript
tagged with: special-characters
score: 0
answer count: 1
has title: Use non-english characters in List.js
accepted answer: http://stackoverflow.com/a/29418206
tagged with: regex
type: AnsweredQuestion
has body: I have a list of features created with List.js library. Is there any way I could match non-english characters with regular ones? For example, the list contains this elements: 'șuncă', 'brânză', 'mărar'. I'm curious if there's a way to find these elements even if I'm searching without the non-english characters, like this: 'sunca', 'branza', 'marar'
type: Question

http://stackoverflow.com/comment/47204115
has text: do you get the expected values from splt[1] and subs? what is the current document mode that your IE11 is in?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29524343
type: Comment

http://stackoverflow.com/comment/47221291
comment on: http://stackoverflow.com/a/29491538
type: Comment
score: 0
has text: Ok thanks. I switched to vaadin framework where it was quite easy to achieve. I saw that they were using an ActiveXObject but I cannot much say about the internal conversion to JS that happens in vaadin.
type: AnswerComment

http://stackoverflow.com/comment/47126278
type: AnswerComment
type: Comment
has text: well the login form doesn't scroll at all for me using your fiddle. What browser are you using?
comment on: http://stackoverflow.com/a/29482710
score: 0

http://stackoverflow.com/q/29419532
type: Question
tagged with: pagination
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/47013348
has title: jQuery Pagination next and previous buttons fail after hitting zero or past last page
downvote count: 0
has comment: http://stackoverflow.com/comment/47011012
score: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/29421488
favorite count: 0
has comment: http://stackoverflow.com/comment/47012561
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29421496
has body: previous and Next buttons don't have limitations, ie: can move before and after first and last pages... cant seem to limit this. I've created if statements to try and stop the button from executing but it wont work. any ideas? jsFiddle: https://jsfiddle.net/s7ac8aq3/ $(function() { $(document).ready(function(){ //amount of items on page var num = $('.post').length; //set items per page var itemsPerPage = 1; var nav = false; //array of all items var items = $(".post"); //rounds up to the nearest whole number -- number of pages needed to display all results var numOfPages = Math.ceil((num / itemsPerPage)); //container div var paginationContainer = $("#pagination-container"); //initial link num var linkNum = 1; paginationContainer.prepend(" Prev "); //creates all pagination links as input buttons (can be anything... li, a, div, whatever) for(i = 0; i < numOfPages; i++) { paginationContainer.append(" " + (i + 1) + " "); } paginationContainer.append(" Next "); //does the initial filtering of the items, hides anything greater than page 1 items.filter(":gt(" + (itemsPerPage -1) + ")").hide(); //finds the input feilds and executes onclick paginationContainer.find('button').on('click', function(){ //REQUIRED RESETS NAV BOOL SO CLICKS WILL REGISTER nav = false; //stores the value of the link in this var var val = $(this).val(); //if value is next or prev if(val == "prev") { if(linkNum > 1) { nav = true; linkNum = linkNum - 1; var currentBtn = paginationContainer.find("#btn-" + linkNum); var otherButtons = paginationContainer.find('button'); otherButtons.attr('class', "pagination"); currentBtn.attr('class', "current"); currentBtn.focus(); } } else if (val == "next") { if(linkNum < numOfPages) { nav = true; linkNum = linkNum + 1; var currentBtn = paginationContainer.find("#btn-" + linkNum); var otherButtons = paginationContainer.find('button'); otherButtons.attr('class', "pagination"); currentBtn.attr('class', "current"); currentBtn.focus(); } } if(nav == false) { //reoves the …
upvote count: 1

http://stackoverflow.com/a/72645968
has body: Phew, that took a while! I made a barebones demo for you. Just click on the select and a keyboard will pop up. The trick here is that the select2 search input doesn't exist in the DOM before user clicks the select, so we use the select2:open event to find the select2 text input after it is appended to the DOM and then attach the jquery virtual keyboard to it. // Make the Select2 select $('#sel').select2({ dropdownCssClass: 'keyboard_target_wrapper' }); // We don't want to accidentally make multiple virtual keyboards let kb_bound = false; // Wait until the Select2 select is opened // as the Select2 select input element // might not be in the DOM yet $('#sel').on('select2:open', function (e) { // Save the search input query let $select2SearchInput = $('.keyboard_target_wrapper') .find('.select2-search__field') // If we already have an initialized virtual keyboard // we just return it if(kb_bound) { $('.keyboard_target_wrapper') .find('.select2-search__field') .getkeyboard(); return; } // Create the virtual keyboard $select2SearchInput.keyboard({ openOn: 'focus', appendLocally: false, // Append to body appendTo: 'body', usePreview: false, // Hide the text preview on the keyboard reposition: true, // Make keyboard react to viewport changes layout: 'qwerty', css: { container: 'ui-widget-content ui-widget ui-corner-all ui-helper-clearfix', popup: '' }, stopAtEnd: true, resetDefault: false, beforeInsert: function(e, keyboard, el, str) { // Must trigger keyup event on the Select2 // search input manually, because // the virtual keyboard doesn't do it $select2SearchInput.keyup(); // Just return the input text normally return str; }, }); kb_bound = true; }); Cat Dog Bird Fish Dinosaur
answers question: http://stackoverflow.com/q/29429392
upvote count: 2
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/q/29384656
has comment: http://stackoverflow.com/comment/46947744
tagged with: express
tagged with: ejs
score: 0
has body: I have a javascript client application and express.js server. I want to update a page in my server with some information that i'm sending with an ajax call from my client application, and i need the page to be updated real time. In my javascript: var url = 'http://'+base_url+'/make-order'; $.ajax({ type: 'POST', url: url, data : {data : JSON.stringify(info)} }).done(function(res){ //finished }); In my express router: mobile_router.post('/make-order', function(req, res){ // here i need to update some page in the server without rendering it // back to the client, res.end('updated') is enough });
answer count: 1
has answer: http://stackoverflow.com/a/29384708
tagged with: ajax
has comment: http://stackoverflow.com/comment/46963580
tagged with: node.js
type: AnsweredQuestion
has title: Real-time page updating on server using an Ajax call
accepted answer: http://stackoverflow.com/a/29384708
type: Question
tagged with: javascript

http://stackoverflow.com/q/29496564
type: AnsweredQuestion
score: 1
has body: I am trying one of regular expression for condition like: atleast 1 number, atleast 1 character, should be 3 to 16 digit long. No character and number should repeat more than 2 time. I tried one regular expression here what i tried. (^(?=.*\d)(?=.*[a-zA-Z]).{3,16}$)\1{2,} but it did not do the trick. example for valid and invalid post: advan@123 -valid advan@4 -valid advvvan@123 -invalid advan@11123 -invalid advan123 -valid 1231123123ab -valid advadvvadv12 -valid
type: Question
tagged with: c#
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/47152023
tagged with: regex
tagged with: asp.net
has answer: http://stackoverflow.com/a/29496666
accepted answer: http://stackoverflow.com/a/29496666
has title: Regular Expression for atleast one character and one number with no repeat more than two
has comment: http://stackoverflow.com/comment/47152191
upvote count: 1

http://stackoverflow.com/a/29526007
downvote count: 0
answers question: http://stackoverflow.com/q/29525832
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29525832
type: AcceptedAnswer
has body: personally I would avoid regex for this. if your string is always in the value=SOMETHING&amp;value=SOMETHINGELSE format use this string.split("value=").join("").split("&amp;") according to How to replace all occurrences of a string in JavaScript? its actually quicker to use this over regex also var string = "value=8kadctgwqqe0&amp;value=8kaczvfgoyrs&amp;value=8kwkgz2ysm1i" var yourArray = string.split("value=").join("").split("&amp;") ["8kadctgwqqe0", "8kaczvfgoyrs", "8kwkgz2ysm1i"] You may need to add some tests to ensure the correct format of string if you are not sure about it.
type: Answer
score: 3

http://stackoverflow.com/q/29425581
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Take Input from a form and save it to an array
has answer: http://stackoverflow.com/a/29425793
type: UnansweredQuestion
score: 0
has body: I am having trouble trying to convert this into an array. I don't fully understand how to take input from a form and save it in an array. My project states: Do NOT save the input in a set of variables and then put those in an array. Use the array as your collection of data saving variables. (That is what a data structure is for.) I have looked for the last 2 hours trying to find something to help me. I have to do this project in JavaScript, but keep finding jquery and I'm not quite sure on how to convert it to Javascript Any suggestions on how I can take the form input and save it in an array? This is only a little bit of my project. I just took the first function and the HTML that is attached to the function. Code in the snippet. function getID() { var studentID = new Array(); studentID = document.forms["getFormInfo"]["txtStudentID"].value; var numberOnly = /^[0-9]+$/; //Checks for a null/blank within Student ID: field. if (studentID.length == 0) { document.getElementById('divAllField').style.display = ''; document.forms["getFormInfo"]["txtStudentID"].focus(); return false; } //End of if statement else { if (studentID.length == 8 && studentID.match(numberOnly)) { //Run the next function getFirstName(); } //End of else/if statement else { //Show Error Message document.getElementById('divStudentID').style.display = ""; //Focus on input field with the error. document.forms["getFormInfo"]["txtStudentID"].focus(); } //end of else/if/else statement } //End of else statement } //End of function getID() h1 { text-align: center; color: teal; } table { border-spacing: 8px; border: 2px solid black; text-align: justify; } th { text-align: center; padding: 8px; color: blue; font-size: 125%; } td { padding: 5px; } input, select { width: 200px; border: 1px solid #000; padding: 0; margin: 0; height: 22px; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } input { text-indent: 2px; } label { float: left; min-width: 115px; } div { padding: 3px; co…
has answer: http://stackoverflow.com/a/29425636
type: Question
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/47060683
score: 1
type: AnswerComment
type: Comment
has text: @DolphinWood: I wouldn't say that. Reading the spec isn't as easy as it might be (sadly, that's getting worse, not better -- the ES6 spec makes the ES5 spec look like a children's book!).
comment on: http://stackoverflow.com/a/29446601

http://stackoverflow.com/comment/46996064
comment on: http://stackoverflow.com/q/29411463
score: 0
type: Comment
type: QuestionComment
has text: Your code can probably be fixed but I don't understand the goal.

http://stackoverflow.com/q/29474351
answer count: 0
score: 1
upvote count: 1
tagged with: intel-xdk
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/50225213
downvote count: 0
tagged with: jquery-mobile
has title: Intel XDK jquery mobile button doesn´t work
has comment: http://stackoverflow.com/comment/50339466
favorite count: 0
type: UnansweredQuestion
has body: I´m having some problem working an easy example in the Intel XDK coded in jquery mobile. The button doesn´t work and I did´t found why. I posted the full code but is a single button and a query selector to open an alert and write in the console. Please any help? HUMEDAD grafica 2

http://stackoverflow.com/comment/47148184
comment on: http://stackoverflow.com/q/29494449
score: 0
has text: @SpencerWieczorek depends whether you're looking at the gzipped or original size of the file, but given that most 3D things will be loaded for quite a while, I doubt it's much of an issue.
type: Comment
type: QuestionComment

ajax
tags question: http://stackoverflow.com/q/29514427
tags question: http://stackoverflow.com/q/29492900
tags question: http://stackoverflow.com/q/29529091
tags question: http://stackoverflow.com/q/29525765
tags question: http://stackoverflow.com/q/29438974
tags question: http://stackoverflow.com/q/29507232
tags question: http://stackoverflow.com/q/29458274
tags question: http://stackoverflow.com/q/29501631
tags question: http://stackoverflow.com/q/29405234
tags question: http://stackoverflow.com/q/29512972
tags question: http://stackoverflow.com/q/29431168
tags question: http://stackoverflow.com/q/29447070
tags question: http://stackoverflow.com/q/29493056
tags question: http://stackoverflow.com/q/29501908
tags question: http://stackoverflow.com/q/29510133
tags question: http://stackoverflow.com/q/29417584
tags question: http://stackoverflow.com/q/29489400
tags question: http://stackoverflow.com/q/29514788
tags question: http://stackoverflow.com/q/29427189
tags question: http://stackoverflow.com/q/29474946
tags question: http://stackoverflow.com/q/29431596
tags question: http://stackoverflow.com/q/29421003
tags question: http://stackoverflow.com/q/29407833
tags question: http://stackoverflow.com/q/29499953
tags question: http://stackoverflow.com/q/29526575
tags question: http://stackoverflow.com/q/29439778
tags question: http://stackoverflow.com/q/29452590
tags question: http://stackoverflow.com/q/29409112
tags question: http://stackoverflow.com/q/29450773
tags question: http://stackoverflow.com/q/29485643
tags question: http://stackoverflow.com/q/29401953
tags question: http://stackoverflow.com/q/29523259
tags question: http://stackoverflow.com/q/29421823
tags question: http://stackoverflow.com/q/29510516
tags question: http://stackoverflow.com/q/29432997
tags question: http://stackoverflow.com/q/29520441
tags question: http://stackoverflow.com/q/29431141
tags question: http://stackoverflow.com/q/29402282
tags question: http://stackoverflow.com/q/29471482
tags question: http://stackoverflow.com/q/29437487
tags question: http://stackoverflow.com/q/29393813
tags question: http://stackoverflow.com/q/29388921
tags question: http://stackoverflow.com/q/29464906
tags question: http://stackoverflow.com/q/29505676
tags question: http://stackoverflow.com/q/29397738
tags question: http://stackoverflow.com/q/29463949
tags question: http://stackoverflow.com/q/29383105
tags question: http://stackoverflow.com/q/29467442
tags question: http://stackoverflow.com/q/29430418
type: Tag
tags question: http://stackoverflow.com/q/29489153
tags question: http://stackoverflow.com/q/29482984
tags question: http://stackoverflow.com/q/29375228
tags question: http://stackoverflow.com/q/29439354
tags question: http://stackoverflow.com/q/29446627
tags question: http://stackoverflow.com/q/29430628
tags question: http://stackoverflow.com/q/29528279
tags question: http://stackoverflow.com/q/29401915
tags question: http://stackoverflow.com/q/29493691
tags question: http://stackoverflow.com/q/29502494
tags question: http://stackoverflow.com/q/29514557
tags question: http://stackoverflow.com/q/29428763
tags question: http://stackoverflow.com/q/29458737
tags question: http://stackoverflow.com/q/29457403
tags question: http://stackoverflow.com/q/29412629
tags question: http://stackoverflow.com/q/29475933
tags question: http://stackoverflow.com/q/29406931
tags question: http://stackoverflow.com/q/29387284
tags question: http://stackoverflow.com/q/29499880
tags question: http://stackoverflow.com/q/29404183
tags question: http://stackoverflow.com/q/29412865
tags question: http://stackoverflow.com/q/29464911
tags question: http://stackoverflow.com/q/29400898
tags question: http://stackoverflow.com/q/29383684
tags question: http://stackoverflow.com/q/29414927
tags question: http://stackoverflow.com/q/29510765
tags question: http://stackoverflow.com/q/29516515
tags question: http://stackoverflow.com/q/29527693
tags question: http://stackoverflow.com/q/29524971
tags question: http://stackoverflow.com/q/29455930

http://stackoverflow.com/a/29382935
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46985738
has body: simply use json_encode Example $syns = ['hi','wassip','yeaboy','heya','heo']; $arr["hello"] = $syns; $jsonFormat = json_encode($arr);
has comment: http://stackoverflow.com/comment/46985864
answers question: http://stackoverflow.com/q/29382751

http://stackoverflow.com/comment/47135630
comment on: http://stackoverflow.com/a/29488075
score: 0
has text: Yes, I changed it and still no luck. It didn't do anything.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29489090
answers question: http://stackoverflow.com/q/29479513
has comment: http://stackoverflow.com/comment/47147474
score: 1
upvote count: 1
downvote count: 0
has body: I'm pretty new to configuring nginx as a reverse proxy, but this is how I did it on my local machine. I have some static files (images, css, etc.) that I want to be served by nginx because it's much faster at doing that, and for all other GET and POST requests, it forwards them to Node. I didn't quite get what you wanted to be served by nginx, and what you wanted Node to do, but here goes.. Open your nginx.conf file and try setting up your http block, and the server block inside it to look something like this: http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 80; #if localhost doesn't work, try 127.0.0.1 !!! server_name localhost; location / { #note the port number below! You'll have to enter the #port that Node uses!! (it's usually 3000) proxy_pass http://127.0.0.1:3000; proxy_redirect off; proxy_buffering off; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } } This tells nginx to forward GET requests from 127.0.0.1:80 to 127.0.0.1:3000. Now, let's say you had an img folder where you store your images and you want nginx to serve these, instead of node (which is a VERY common scenario), you'd want another location block inside your server block.. it would look something like this: location /img { # /yourProjectLocation folder should contain the img folder- # if not, then go down until…
type: Answer

http://stackoverflow.com/q/29401613
has title: SWF downloads twice in IE
score: 0
tagged with: flash
has comment: http://stackoverflow.com/comment/47017353
tagged with: swfobject
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47035606
answer count: 0
has body: I see SWFs download twice in IE, but not in Chrome. I'm using IE 11. I can see the download requests in the F12 dev tools Network tab and in server access logs. Below is a simple example that exhibits the problem. I'm using swfobject 2.2. I've tried calling swfobject.switchOffAutoHideShow() before calling swfobject.embedSWF(), but that doesn't help. You can test this by putting the HTML and swfobject.js in the same directory and browsing from the disk, so you don't need an HTTP server to test/reproduce this. Does anyone know why this happens and how to stop the second download? My Version No flash here. Move along.
type: Question
tagged with: internet-explorer
tagged with: javascript

http://stackoverflow.com/q/29427703
accepted answer: http://stackoverflow.com/a/29427802
type: AnsweredQuestion
score: -1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29427917
has comment: http://stackoverflow.com/comment/47025898
has answer: http://stackoverflow.com/a/29427802
answer count: 3
possible better answer: http://stackoverflow.com/a/29427819
has body: I am trying to display multiple data using .append using for loop. I need all data to be replaced by second click to some other data by .html function. This is my code for more explanation. $(".content").html(function(){ for(var l=1; l&lt;4 ; l++) $(".content").append("Event-"+l+"&lt;br&gt;"+player.activity[l].desc+"&lt;br&gt;"); } suppose I have activity json like below: player : [{ "name": "Johny", "activity" : [ {"id:1","desc" : "abc"}, {"id:2","desc" : "abc"}, {"id:3","desc" : "abc"} ] },{ "name": "Mony", "activity" : [ {"id:1","desc" : "abc"}, {"id:2","desc" : "abc"}, {"id:3","desc" : "abc"} ] }] So basically I want to replace my Johny's activity to mony's. I also tried swapping the methods such as .html inside .append which is working fine but .appnd inside .html is not working. It is appending the Mony's data to johny's data. Any suggestion?
downvote count: 1
has answer: http://stackoverflow.com/a/29427819
upvote count: 0
has title: .append inside .html is not working in jquery
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29491886
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/47170858
type: Question
has title: CSS flipping page "trembles"
has body: I'm trying to create a flipping page effect with pure CSS. I found this code and now I'm trying to customize it. Basically I want the flipping animation to happen once the page is loaded. So I did this. Now instead of #page-flip:hover #s3 (for example) I have .hover #s3 and I add hover class to #page-flip with JS: window.addEventListener('DOMContentLoaded', init); function init(){ setTimeout(function(){ document.getElementById('page-flip').classList.add('hover') }, 100); } It works just fine. The problem is, on both animations I see a little page "trembling" when the animation starts. I'm trying to get rid of it for hours and for now no luck. Any suggestions, please?
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/47148003
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2

http://stackoverflow.com/q/29412966
answer count: 1
tagged with: .net
has title: Why doesn't my dropdown submit the form?
tagged with: javascript
has body: Here's my code: &lt;div class="center"&gt; &lt;p&gt; Choose item:&lt;/p&gt; &lt;div class="dropdown"&gt; @using (Html.BeginForm("Start", "Home", FormMethod.Post, new { name = "form", id = "form" })) { @Html.DropDownListFor(x =&gt; x.SelectedId, @Model.ViewJaren, new { onchange = "this.parentNode.form.submit()" } ) } &lt;/div&gt; &lt;/div&gt; Been trying to get it to work but can't figure it out. I got the onchange to work with document.getElementById("form"). But there is no value passed. I get a blank page.
accepted answer: http://stackoverflow.com/a/29415581
has comment: http://stackoverflow.com/comment/46998624
has comment: http://stackoverflow.com/comment/46999111
score: 0
has comment: http://stackoverflow.com/comment/46999552
has comment: http://stackoverflow.com/comment/46998715
tagged with: html.dropdownlistfor
tagged with: model-view-controller
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29415581
has comment: http://stackoverflow.com/comment/46999267
has comment: http://stackoverflow.com/comment/46999173
type: Question
has comment: http://stackoverflow.com/comment/46998939

http://stackoverflow.com/a/29426014
score: 0
has comment: http://stackoverflow.com/comment/47040367
answers question: http://stackoverflow.com/q/29424794
has body: Using the border-radius property, you can create pure css Venn diagram like this: Here's my pen http://jsfiddle.net/sLzUG/195/ .circle{ position:absolute; width:150px; height: 150px; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; filter: alpha(opacity=30); -moz-opacity: 0.3; -khtml-opacity: 0.3; opacity:0.3; -webkit-border-radius: 50%; -moz-border-radius: 50%; border-radius: 50%; border: 2px solid black; } #second{position:relative; left:92px; top:4px; background: yellow; } #first { background: blue; } #third { position: relative; top: -70px; left: 40px; background: red; } #problem{ font-size: 8pt; color:white; position: absolute; width: 75px; height: 75px; border-left:2px solid red; border-top:2px solid red; top : 41px; left:71px; z-index:-4; background:red; } #problem:after{ position:absolute; content:" "; background:white; width:150px; height:150px; top:-2px; left: -2px; -webkit-border-radius: 50%; -moz-border-radius: 50%; border-radius: 50%; z-index:-3; } &lt;div id="first" class="circle"&gt;&lt;/div&gt; &lt;div id="second" class="circle"&gt;&lt;/div&gt; &lt;div id="third" class="circle"&gt;&lt;/div&gt;
type: Answer

http://stackoverflow.com/a/29454994
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29454885
has comment: http://stackoverflow.com/comment/47075069
answers question: http://stackoverflow.com/q/29454885
has body: Try this fragment of code it worked for me. jsfiddle here $("#InputAtLast").keyup(function(e) { this.selectionStart = this.selectionEnd = this.value.length; }); $("#InputAtLast").focus(function(e) { this.selectionStart = this.selectionEnd = this.value.length; }); $("#InputAtLast").click(function(e) { this.selectionStart = this.selectionEnd = this.value.length; }); For more options try this link here Click here.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47074984
type: Answer

http://stackoverflow.com/comment/47175783
score: 0
type: QuestionComment
type: Comment
has text: why dont you just not call the drag on the SVG ? Or are you trying to set a boundary for the drag ?
comment on: http://stackoverflow.com/q/29508732

http://stackoverflow.com/q/29491761
has body: TLDR; FIXED AS FOLLOWS selectedValue = selectedValue.replace(/\s+/g, '') Thanks to: Richard Macarthy and Aaron Digulla for the answer, which led me down the poath to the correct answer. Just tp be clear, it seems Grunt was adding this whitespace for some reason. The fix is very simple... ORIGINAL QUESTION I have an JSON request, which get the contents of a JSON file to be used for data visualisations using d3.js. This all works fine locally, but when I run grunt build the URL string gets an %20 injected into it from nowhere... Here is how the string looks before I run Grunt: d3.json("json/wards-info/"+selectedValue+"-wards-data.json", function(error, newDatas) { newData = newDatas; newWardsData = newWardsDatas; drawMap(newData, newWardsData); }); Which computes to: http://localhost:8080/app/json/wards-info/liverpool-ward-data.json After I run Grunt build the computed URL string changes to: http://localhost:8080/dist/json/wards-info/liverpool%20-ward-data.json As you can see, it appears to be adding %20 between liverpool-ward Is this because of grunt, or due to something else?
has comment: http://stackoverflow.com/comment/47142799
has comment: http://stackoverflow.com/comment/47149217
upvote count: 1
possible better answer: http://stackoverflow.com/a/29491833
has answer: http://stackoverflow.com/a/29491833
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47142823
has comment: http://stackoverflow.com/comment/47142652
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/47150287
type: Question
accepted answer: http://stackoverflow.com/a/29491802
has title: Javascript URL string adding %20 (space) after running grunt
downvote count: 0
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/47142650
answer count: 3
score: 1
has comment: http://stackoverflow.com/comment/47142766
has answer: http://stackoverflow.com/a/29492199
favorite count: 0
has comment: http://stackoverflow.com/comment/47142953
has answer: http://stackoverflow.com/a/29491802
tagged with: d3.js

http://stackoverflow.com/q/29388065
upvote count: 1
has body: old demo Latest DEMO intermadiate issue On Hover iam calculating current height of the div and adding 50px through jquery. on MouseOut current height is not applying for example: currentHeight = 20px (this height will be dynamic) AddHeight = 50px so the div will be 70px on mousehover when i mouseOut currentHeight should be same i.e., 20px (this height will be dynamic) JS CODE : txt__mouse__hover : function(){ $(".itemMasTxt").hover(function () { currentHeight = $(this).height(); addHeight = 50; $(this).animate({ height:(currentHeight + addHeight) }, 200); }, function () { alert(" --" + currentHeight) $(this).animate({ height:(currentHeight) }, 200); });
has comment: http://stackoverflow.com/comment/46988112
has answer: http://stackoverflow.com/a/29388292
type: Question
has answer: http://stackoverflow.com/a/29388332
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: 1
tagged with: css
has title: Mouse Out Orange Div "CurrentHeight" is not applying
has comment: http://stackoverflow.com/comment/46954196
type: UnansweredQuestion

http://stackoverflow.com/comment/47074473
has text: Your answer to this question which has multiple duplicates is just a code block with no explanation. Would you be able to elaborate / explain further what you've posted?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29454697
type: Comment

http://stackoverflow.com/q/29431141
has comment: http://stackoverflow.com/comment/47031769
has comment: http://stackoverflow.com/comment/47031841
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47031798
has title: How to cache image requested with AJAX?
type: UnansweredQuestion
upvote count: 1
has body: I'm creating a simple photo viewer for a project I'm working on. When user views an image it's being requested with AJAX and injected to the DOM. This works fine, however I am struggling to get the cache flag working properly. Every time the image changes, it's being requested AGAIN. How can I force the browser to cache the image? Ideally without using local storage or server-side solution. EDIT: Maybe I am being unclear. Let's say there are 5 images in total in the gallery and the user has already seen all 5 of them but wants to see them again - that's when the browser will download them again instead using the cached version. It can be easily seen in the network panel. Images are being loaded twice. Here's my code: $.ajax( { url: imgUrl, type: 'GET', cache: true, success: function() { $slide.prepend( '&lt;img src="' + imgUrl + '" /&gt;' ); } } );
tagged with: image
tagged with: caching
type: Question
has answer: http://stackoverflow.com/a/29431551
downvote count: 0
has comment: http://stackoverflow.com/comment/47031680
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 1

http://stackoverflow.com/q/29440871
has answer: http://stackoverflow.com/a/29441090
possible better answer: http://stackoverflow.com/a/29441064
score: 0
accepted answer: http://stackoverflow.com/a/29441090
has answer: http://stackoverflow.com/a/29441064
tagged with: javascript
tagged with: jquery
has body: Im trying to add a modal to my website that appears when the Name field of a form is left empty, to notify the user. What I have so far is: &lt;div id="myModal-winner" class="modal fade"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt; &lt;h4 class="modal-title"&gt;There is a Problem!&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;p&gt;Please Enter Name of Winner.&lt;/p&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-info" data-dismiss="modal"&gt;Ok&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; The JS that should make the modal appear if Name is left empty: //when user clicks on the "submit" button form.submit({point: point}, function (event) { //prevent the default form behavior (which would refresh the page) event.preventDefault(); //form validation if( !$("input[name=name]", this).val() ) { $("#myModal-winner").modal('show'); } //put all form elements in a "data" object var data = { name: $("input[name=name]", this).val(), address: $("textarea[name=address]", this).val(), about: $("textarea[name=about]", this).val(), month: $("select[name=month]",this).val(), year: $("select[name=year]",this).val(), lat: event.data.point.overlay.getPosition().lat(), lon: event.data.point.overlay.getPosition().lng() }; trace(data) //send the results to the PHP script that adds the point to the database $.post("addwinner.php", data, tidy_maps.saveStopResponse, "json"); But the console returns: Uncaught TypeError: undefined is not a function, on the line: $("#myModal-winner").modal('show'); This is the form, with submit button: &lt;div class="winner-add"&gt; &lt;form class="form-horizontal winner-form" method="post" style="display: none" action="addwinner.php"&gt; &lt;h4&gt;Add Winner&lt;/h4&gt; &lt;img src="" &gt; &lt;fieldset&gt; &lt;label for="n…
has comment: http://stackoverflow.com/comment/47050325
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47050417
type: Question
tagged with: twitter-bootstrap
has title: Bootstrap Modal: Undefined
answer count: 2
has comment: http://stackoverflow.com/comment/47050369

http://stackoverflow.com/comment/47163692
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29502835
has text: Are you trying to make a form where a user fills out? As in... "What colour is your hair today?" user answers "hello pineapple" and moves on to the next question, or does this require some validation? In fact, I don't even think anyone can really help you since you don't even know what you are looking for exactly. At times like these, it might be best to just HIRE someone.
score: 0

http://stackoverflow.com/comment/94473798
type: QuestionComment
comment on: http://stackoverflow.com/q/29399610
score: 0
has text: A way to pass data from R to Javascript is via the [htmlwidgets package](http://www.htmlwidgets.org/). Many R packages for data visualisation (e.g. shiny, leaflet) use this mechanism. The [introduction for developers](http://www.htmlwidgets.org/develop_intro.html) is short and quite readable.
type: Comment

http://stackoverflow.com/comment/47086837
type: QuestionComment
has text: Use `script.onload`.
type: Comment
comment on: http://stackoverflow.com/q/29461529
score: 0

http://stackoverflow.com/q/29438752
has body: I can't get my jquery function to work even when I have two pieces of identical code. Here is the primary jquery function (i've removed the "<"). $(".spoiler").append(" Reveal Spoiler! "); $(".spoiler button").click(function() { $(this).remove(); }); This creates a button that is then removed when it is clicked. Now when I do this: $("#family-question").click(function(){ $("#answer-one").append(" Answer One "); $("#answer-two").append(" Answer Two "); $(".test").append(" Answer Three "); }); $(".test button").click(function() { $(this).remove(); }); This creates all the buttons. However if I click the button it isn't removed. In terms of the HTML code. first one is; Darth Vader is Luke Skywalker's Father! Noooooooooooo! The second one has an ID as well as a class; Answer Option one Why doesn't it work?
accepted answer: http://stackoverflow.com/a/29438777
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/29438777
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: click
favorite count: 0
duplicate of: http://stackoverflow.com/q/203198
has title: javascript click function doesn't work for ID and Class?

http://stackoverflow.com/a/29456221
upvote count: 3
score: 3
has body: You don't use string delimiters around a variable: $('#someid').val($('#someid').val() + someText);
downvote count: 0
answers question: http://stackoverflow.com/q/29456211
type: Answer

http://stackoverflow.com/comment/47413893
type: Comment
comment on: http://stackoverflow.com/a/29460824
score: 0
type: AnswerComment
has text: Thanks Matho!! I was running my code just locally on a browser when i tried with local host, it worked. :)

http://stackoverflow.com/q/29422269
answer count: 2
has title: Dynamic Options for AngularJS Directive
downvote count: 0
tagged with: javascript
has body: I am trying to pass dynamic variables into a directive that displays a time picker (pickadate.js: http://amsul.ca/pickadate.js/time/). However, I am struggling on how to get the options into the directive. I am scoured the internet, but see a multitude of approaches, and am confused on how best to construct this as it is not working. Here is my current code: Directive: // Pick a date directive used as pick-a-time on HTML element appDirectives.directive('pickATime', function() { return { // Restrict it to be an attribute in this case restrict: 'A', // responsible for registering DOM listeners as well as updating the DOM link: function(scope, element, attrs) { element.pickatime(scope.$eval(attrs.pickATime)); }, scope: { timeOptions: '=options' }, templateUrl: '../Templates/timeoptions.html' }; }); Directive Template: Min: {{timeOptions.startTime}} Max: {{customerInfo.endTime}} HTML: &lt;input type="text" placeholder="Start Time" id="timestart" pick-a-time options="timeRange" data-ng-model="itemtimestart" class="form-control" autocomplete="off"&gt; Controller to pass in dynamic values (stored in REST) // Query settings for variables to be used later in function appSettings.query(function(settings) { // Data is within an object of "value", so this pushes the server side array into a variable var setting = settings.value; // Foreach result, where setting is equal to active get the apporpriate variables angular.forEach(setting, function(settingvalue, settingkey) { if (settingvalue.Title == 'Active') { // Get work and non work durations as variables workDuration = settingvalue.Work_x0020_Day_x0020_Hours_x0020; nonWorkDuration = settingvalue.Non_x0020_Work_x0020_Day_x0020_H; // Get $scope variables to control time picker range var startHour = settingvalue.Work_x0020_Day_x0020_Start_x0020.split(":")[0]; var startMinute = settingvalue.Work_x0020_Day_x0020_Start_x0020.split(":")[1]; var startTime = '[' + startHour + ',' + startMinute + ']'; var endHour = settingvalue.Work_x002…
has answer: http://stackoverflow.com/a/29422964
favorite count: 0
linked to: http://stackoverflow.com/q/29681821
has answer: http://stackoverflow.com/a/29665076
tagged with: angularjs
upvote count: 2
linked to: http://stackoverflow.com/q/21813280
possible better answer: http://stackoverflow.com/a/29422964
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/29665076
type: Question

http://stackoverflow.com/comment/47031376
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29430903
type: QuestionComment
has text: I think assigning id's to divs will speed up your dom selection to some extend, for further speed use pure js. Compare at https://jsperf.com/

http://stackoverflow.com/comment/47082689
score: 1
has text: I don't think 'changing Javascript content' is an accurate qualification for this functionality.
comment on: http://stackoverflow.com/q/29459331
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47097146
type: Comment
has text: @BenjaminHoffman Glad it worked. You can accept my answer as "answer" (by clicking the checkmark). that will be the "same" as +1 :)
type: AnswerComment
comment on: http://stackoverflow.com/a/29384154
score: 0

http://stackoverflow.com/q/29474865
favorite count: 0
tagged with: datepicker
has body: I am currently using HTML 5 date type that pulls down a calendar for a person to select and arrival date. I want to be able to add two days to the departure calendar which is the next field over in my form. Dates are in format mm/dd/yyyy. To be a bit more clear if someone selects lets say 07/03/2015 from the arrival calendar form field, then I want the next departure field to have 07/05/2015 already in there for them. Hope that makes sense and Thank you for any help on this. Sure here is the code: Arrival Date * Departure Date *
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/29475695
possible better answer: http://stackoverflow.com/a/29475256
has comment: http://stackoverflow.com/comment/47153228
type: Question
has answer: http://stackoverflow.com/a/29475256
linked to: http://stackoverflow.com/q/3552461
has answer: http://stackoverflow.com/a/29475177
accepted answer: http://stackoverflow.com/a/29475177
tagged with: javascript
tagged with: jquery
score: -1
has title: Add 2 days from an arrival calendar to a departure calendar
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47111141
downvote count: 1
has comment: http://stackoverflow.com/comment/47110749

http://stackoverflow.com/comment/47012172
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29420168
score: 0
has text: Yes, it doesn't run the function.

http://stackoverflow.com/comment/47094956
score: 1
type: QuestionComment
has text: are you loading multiple versions of jQuery?
comment on: http://stackoverflow.com/q/29466134
type: Comment

http://stackoverflow.com/q/29498375
answer count: 1
tagged with: angularjs
upvote count: 3
accepted answer: http://stackoverflow.com/a/29519892
type: AnsweredQuestion
score: 3
tagged with: protractor
has body: I can't use browser.get() without receiving this error: Error: Angular could not be found on the page http://localhost:5000/#/login debug=timing&amp;saveLogs=true&amp;displayAll=true : angular never provided resumeBootstrap I can use browser.driver.get() but then I have issues with needing to write in specific waits and flaky tests. I've been reading up on this and I haven't found any suggestions that help. Here are some added details: The login page is part of the Angular app. ng-app is called in &lt;html&gt; (Protractor defaults to &lt;body&gt;, and I have tried setting rootElement to html but that made no difference) $timeout is used in the app, but switching every $timeout with $interval did nothing directConnect: true with chromeDriver, but I assume this shouldn't cause issue Using Angular 1.2.28 and Protractor 2.0 And here is the full error message: Using ChromeDriver directly... [launcher] Running 1 instances of WebDriver Error: Angular could not be found on the page http://localhost:5000/#/login?debug=timing&amp;saveLogs=true&amp;displayAll=true : angular never provided resumeBootstrap at /Users/brandenbyers/Projects/admin-ui/node_modules/grunt-protractor-runner/node_modules/protractor/lib/protractor.js:479:17 at [object Object].promise.ControlFlow.runInFrame_ (/Users/brandenbyers/Projects/admin-ui/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1877:20) at [object Object].promise.Callback_.goog.defineClass.notify (/Users/brandenbyers/Projects/admin-ui/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:2464:25) at [object Object].promise.Promise.notify_ (/Users/brandenbyers/Projects/admin-ui/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:563:12) at Array.forEach (native) at Object.goog.array.forEach (/Users/brandenbyers/Projects/admin-ui/node_modules/gru…
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29519892
has title: Why can't Protractor find Angular on an automatically initialized Angular site?

http://stackoverflow.com/comment/47092265
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29464425
score: 0
has text: Well, you can try it, just by iterating, say 10,000 times and counting how many of each one you get. Or you can see one of the [classic articles](http://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.html) or an [old SO post](http://stackoverflow.com/questions/962802/is-it-correct-to-use-javascript-array-sort-method-for-shuffling). It's not that it's difficult to explain, but it's a bit long for a comment!

http://stackoverflow.com/q/29525926
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47206617
downvote count: 0
has answer: http://stackoverflow.com/a/29526172
accepted answer: http://stackoverflow.com/a/29526172
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47206438
score: 1
has comment: http://stackoverflow.com/comment/47206445
has body: before i reinvent the wheel, i wanted to know if anyone already has written a js/jquery library that allows user to select multiple div elements by left clicking and holding the hot keys (just like in windows) Currently i have only this much http://jsfiddle.net/abarik/nv9hnusu/3/ - jsFiddle demo by abarik ----1---- ----2---- ----3---- ----4---- ----5---- ----6---- ctrlKeyfalsectrlKeyfalsectrlKeytruectrlKeytrue
has comment: http://stackoverflow.com/comment/47206588
has comment: http://stackoverflow.com/comment/47206393
has title: multiselect div using left click and hotkeys in javascript/jquery
type: Question
upvote count: 1
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/29442922
has comment: http://stackoverflow.com/comment/47053722
has body: This should work given it's the first nav element. var nav = document.getElementsByTagName('nav'); nav[0].addEventListener('click', function(e){ var body = document.getElementsByTagName('body'); body[0].style.backgroundColor = "some color value"; });
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29442852
accepted answer of: http://stackoverflow.com/q/29442852
has comment: http://stackoverflow.com/comment/47053618
type: Answer
score: 0

http://stackoverflow.com/comment/47140149
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29490424
has text: Could you please show your code? What did you try?
score: 0

http://stackoverflow.com/a/29422067
upvote count: 3
has body: Why is "one" not printed to the console? Because the first .next() invocation (that typically gets no arguments) does only advance the generator from the begin of the functin body code to the first yield expression (and returns the value that was yielded there). The value that was "passed in" is not accessible anywhere. Only the second .next(…) call then supplies the value that comes out of the yield expression, continuing the generator state unto the next yield or the end of the function. Also, is g the generator or is go the generator? g is the generator (which is also an iterator). go is a generator function that creates generators (like a constructor creates instances).
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29421919
type: Answer
has comment: http://stackoverflow.com/comment/47015845
accepted answer of: http://stackoverflow.com/q/29421919
score: 3

http://stackoverflow.com/a/29454317
has body: Try this. document.getElementById("sampleform1").click()
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29454230
has comment: http://stackoverflow.com/comment/47082192

http://stackoverflow.com/comment/47022157
has text: You can also use `if (i == 3) { return; }` to skip column 3, for instance.
comment on: http://stackoverflow.com/a/29424908
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29522605
tagged with: arrays
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47200113
downvote count: 3
has comment: http://stackoverflow.com/comment/47199729
has answer: http://stackoverflow.com/a/29522879
accepted answer: http://stackoverflow.com/a/29522879
has comment: http://stackoverflow.com/comment/47199862
favorite count: 0
has title: how to add only unique value into JavaScript array?
has body: how to add only unique value into JavaScript array? Here is array i defined, below code adds duplicate value into array, but i do NOT want to add the duplicate values if already exists in ary , any help? var ary = []; function setFavorite(name, value){ var obj = {}; obj[name] = value; ary.push(obj); .... .... FIDDLE HERE
has answer: http://stackoverflow.com/a/29522724
score: -3
has comment: http://stackoverflow.com/comment/47199760
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/47200068
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29522724

http://stackoverflow.com/q/29491681
tagged with: jquery
linked to: http://stackoverflow.com/q/7428831
favorite count: 0
tagged with: ajax
downvote count: 1
has answer: http://stackoverflow.com/a/29492042
accepted answer: http://stackoverflow.com/a/29492042
upvote count: 0
has title: Downloading a file with a different name to the stored name with ajax
has body: I follow what it's write here Downloading a file with a different name to the stored name . But i'm not sur too understand everything because it's don't work when i try do it with ajax. I signal that i use Smarty. This is my html code : // In $attache.id their is the id of the data i want to dowload in the database &lt;a href='javascript:uploadAttachFile({- $attache.id -});'&gt;&lt;img src='../tools/telecharger.gif' /&gt;&lt;/a&gt; This is my jQuery code : function uploadAttachFile(idAttache) { $.ajax({ //This permit me to go to the php function url: ajaxURL("attacheUpload"), type: "POST", data: { idAttache: idAttache }, success: function(data) { alert(data); } }) } This is my php code : //Permit to have the path and new title of the file $attacheEntite = Model_AttacheDB::getNameAndPathAttachFile(request('idAttache')); $file = 'path' . $attacheEntite['path']; if (file_exists($file)) { header('Content-disposition: application/force-download; filename="' .$attacheEntite['titre']. '"'); header("Content-Type: application/pdf"); header('Content-Transfer-Encoding: binary'); header("Content-Length: " . filesize($file)); header("Pragma: "); header("Expires: 0"); // upload the file to the user and quit ob_clean(); flush(); readfile($file); exit; } I know that it pass by my php code because the ajax reuest pass by succes and alert an incomprehensible code who is certainly the code of the pdf file when i read it.
has comment: http://stackoverflow.com/comment/47142912
tagged with: php
has comment: http://stackoverflow.com/comment/47142526
type: AnsweredQuestion
tagged with: smarty
has comment: http://stackoverflow.com/comment/47142505
score: -1
type: Question
answer count: 1
linked to: http://stackoverflow.com/q/1628260
tagged with: javascript

http://stackoverflow.com/a/29727801
has body: Alright so I ended up fixing this problem and as it turns out it had nothing to do with the HttpOnly flag. In the end it had to do with setting the persistance of the cookie in the wrong place. So the problem lied in the fact that when I used setcookie before setting the cookies to be persistent. To solve the problem I simply set the cookie to be persistent before calling the setcookie function. My apologies for assuming that the error lied with the HttpOnly flag, it was a big assumption that I should not have made.
answers question: http://stackoverflow.com/q/29518146
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/a/29439384
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29439337
has body: $('closeButton').click(function(){ window.close(); //only if you opened the window, and are the owner will this work! });

http://stackoverflow.com/q/29411338
tagged with: google-maps
downvote count: 0
tagged with: javascript
score: 1
duplicate of: http://stackoverflow.com/q/2419219
duplicate of: http://stackoverflow.com/q/11792916
favorite count: 0
has comment: http://stackoverflow.com/comment/46996770
type: Question
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/29412378
type: UnansweredQuestion
has body: I am using google maps to draw the path among various location which are stored in database. fiddle While passing 15 geopoints(anything more than 10) am getting status as OVER_QUERY_LIMIT. I understand that we need to give some milliseconds of time gap when we pass more than 10 geopoints per seconds. My question is HOW TO DO THAT..Where to add sleep() or setTimeout() or any other time delay code I've tried all,maximum all possibilities provided at SO but failed.As because they are just saying give some time gap between request but how to do that? Code Snippet: var markers = [ { "title": 'abc', "lat": '17.5061925', "lng": '78.5049901', "description": '1' }, { "title": 'abc', "lat": '17.50165', "lng": '78.5139204', "description": '2' }, . . . . . { "title": 'abc', "lat": '17.4166067', "lng": '78.4853992', "description": '15' } ]; var map; var mapOptions = { center: new google.maps.LatLng(markers[0].lat, markers[0].lng), zoom: 15 , mapTypeId: google.maps.MapTypeId.ROADMAP }; var path = new google.maps.MVCArray(); var service = new google.maps.DirectionsService(); var infoWindow = new google.maps.InfoWindow(); var map = new google.maps.Map(document.getElementById("map"), mapOptions); var poly = new google.maps.Polyline({ map: map, strokeColor: '#000000' }); var lat_lng = new Array(); for (var i = 0; i &lt;= markers.length-1; i++) { var src = new google.maps.LatLng(markers[i].lat, markers[i].lng); var des = new google.maps.LatLng(markers[i+1].lat, markers[i+1].lng); poly.setPath(path); 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{ if (status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT) { document.getElementById('status').innerHTML +="request failed:"+status+"&lt;br&gt;"; } } }); } }); RESULT MAP(OVER_QU…
linked to: http://stackoverflow.com/q/2419219
has title: How to handle OVER_QUERY_LIMIT
linked to: http://stackoverflow.com/q/11792916

global
type: Tag
tags question: http://stackoverflow.com/q/29514382
tag name: global
tags question: http://stackoverflow.com/q/29493121
tags question: http://stackoverflow.com/q/29498957
tags question: http://stackoverflow.com/q/29406509

http://stackoverflow.com/q/29477587
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47115975
tagged with: jquery
has comment: http://stackoverflow.com/comment/47116156
has title: jQuery on click fires twice
score: 0
has comment: http://stackoverflow.com/comment/47116916
upvote count: 1
answer count: 1
favorite count: 0
has body: Whe using jQuery .on('click', ...) the function is executed twice: $(document).ready(function () { $('#collapsible-menu li a').click(function() { $('#collapsible-menu li').removeClass('active'); $(this).parent('li').addClass('active'); }); }); So what happens is that the menu item goes active for an instant and then class goes away. I have no clue why it's being fired twice. I don't want to use event.preventDefault() or event.preventPropagation() or return false because then clicking the link will lead nowhere. HTML: Expenses Types
has comment: http://stackoverflow.com/comment/47116045
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29477635

rgraph
type: Tag
tag name: rgraph
tags question: http://stackoverflow.com/q/29452027

http://stackoverflow.com/q/29379147
tagged with: javascript
tagged with: google-maps-api-3
answer count: 1
downvote count: 0
favorite count: 0
tagged with: cordova
has body: I'm developing an app whit phonegap (cordova). This app includes a google map with some markers. The app also has more pages as a list of comerces… The map shows correctly, but when I change the page, and back to the map page, sometimes the map is displaced and the info windows not open correctly. Is there any way to put a map and it appears correctly when changing pages? And I have also seen that the map consuming a lot internet data. Could someone make me a suggestion? I hope someone can help me!! Thanks, and excuse me for my bad english.
type: UnansweredQuestion
tagged with: android
score: 1
upvote count: 1
has title: Cordova problems with google map
type: Question
has answer: http://stackoverflow.com/a/29379560
tagged with: google-maps

http://stackoverflow.com/q/29428672
has answer: http://stackoverflow.com/a/29428885
has comment: http://stackoverflow.com/comment/47169540
has comment: http://stackoverflow.com/comment/47144690
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/47027640
has comment: http://stackoverflow.com/comment/47098112
has comment: http://stackoverflow.com/comment/47032797
has comment: http://stackoverflow.com/comment/47098030
has comment: http://stackoverflow.com/comment/47142574
type: AnsweredQuestion
tagged with: c#
has body: I have two projects; first one is a asp.net web project and the second one is embedded http server library project. Embedded http server project is taken from : embedded http server project I want to save a video file from user's local to user's shared storage. I'm getting and sending file from browser using ajax request. Embedded http server is supposed to get byte array and save video on client's shared storage. I have a problem that I spent days to solve but not yet found a solution. In Chrome it stuck on stream.CopyTo(streamReader);. In Firefox and IE it gives "Cross-Origin Request Blocked" error but Firefox saves file even it gives the error. Here is the ajax request code: $(document).ready(function () { function hashFile(file, chunkSize, callback) { var size = file.size; var offset = 0; var chunk = file.slice(offset, offset + chunkSize); SendChunk(chunk,0); var hashChunk = function () { var reader = new FileReader(); reader.onload = function (e) { offset += chunkSize; if (offset &lt; size) { chunk = file.slice(offset, offset + chunkSize); SendChunk(chunk,0); } else if (offset &gt; size){ offset -= chunkSize; var newchunkSize = size - offset; chunk = file.slice(offset, offset + newchunkSize); SendChunk(chunk,1); } }; reader.readAsArrayBuffer(chunk); }; function SendChunk(chunk,end){ if(end&gt;0) { var ajaxRequest = $.ajax({ type: "POST", url: "http://clientip:8080/savefileend", contentType: false, processData: false, data: chunk }); } else{ var ajaxRequest = $.ajax({ type: "POST", url: "http://clientip:8080/savefile", contentType: false, processData: false, data: chunk }); ajaxRequest.done(function (e) { hashChunk(); }); ajaxRequest.error(function (xhr) { console.log(e); hashChunk(); }); } } } function fileInputHandler(evt) { var files = evt.target.files; var chunkSize = 10485760; // bytes var start = window.performance ? performance.now() : Date.now(); // DEBUG var onHashFile = function (digest) { var end = window.performance ? performance.now() : Date.now(); …
has comment: http://stackoverflow.com/comment/47028105
possible better answer: http://stackoverflow.com/a/29428885
type: Question
has comment: http://stackoverflow.com/comment/47100149
has comment: http://stackoverflow.com/comment/47027726
has title: AJAX request Cross-Origin Request Blocked error
answer count: 2
has comment: http://stackoverflow.com/comment/47027870
has answer: http://stackoverflow.com/a/29556709
tagged with: cors
accepted answer: http://stackoverflow.com/a/29556709
tagged with: javascript

http://stackoverflow.com/a/29483150
answers question: http://stackoverflow.com/q/29483094
has body: You can use vanila script event handlers and the next sibling relationship between the elements like //get all the text input elements which are descendants of .item var els = document.querySelectorAll('.item input[type="text"]'); for (var i = 0; i &lt; els.length; i++) { //add click handler els[i].addEventListener('click', function() { //nextElementSibling is supported from IE9 this.nextElementSibling.click() //or //this.parentNode.querySelector('input[type="file"]').click() }) } &lt;div class="item"&gt; &lt;input type="text" /&gt; &lt;input type="file" /&gt; &lt;/div&gt; &lt;div class="item"&gt; &lt;input type="text" /&gt; &lt;input type="file" /&gt; &lt;/div&gt; nextElementSibling
accepted answer of: http://stackoverflow.com/q/29483094
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/29514437
has answer: http://stackoverflow.com/a/29514746
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47184445
tagged with: web-frontend
tagged with: wordpress
type: Question
has title: What is best practice for javascript import?
has body: Ok, lets think we are making a wordpress theme. We have a lot of javascript module like sliders or carousels or ajax loading elements or form controls etc. My main approach for this put the all javascript codes into the main.js files. In main.js i have a code something like this; $(".slider").startSlider(); And i import main.js to all pages. So if one of the pages has element which is class is "slider" they work perfectly. But i am curious about this is the true approach or not? If you not use any javascript module in your page still all javascript codes importing your page. Do you have any different approach?
tagged with: javascript
tagged with: jquery
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/29514534
favorite count: 0
has comment: http://stackoverflow.com/comment/47184989
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/q/29426826
score: 0
has title: Passing DateTime data from Django to Javascript
has answer: http://stackoverflow.com/a/29426878
answer count: 1
type: UnansweredQuestion
tagged with: django
tagged with: python
has body: I am trying to pass data (step_count_data) from Django to a JavaScript function. Here are the code: Django #somecode step_count_date.append(str(step_count_list[i].startTime.date())) context = {'step_count_date': json.dumps(step_count_date)} return render_to_response('patient-profile.html', context, context_instance=RequestContext(request)) Javascript: step_from_django = JSON.parse({{ step_count_date }}) console.log(step_from_django); However I got an error: Uncaught SyntaxError: Unexpected token &amp; and the error line is step_from_django = JSON.parse([&amp;quot;2015-03-19&amp;quot;, &amp;quot;2015-04-02&amp;quot;]) What I want is just the date without the &quot; wrap around. Any idea why and how can I fix this? Thanks
type: Question
tagged with: javascript

http://stackoverflow.com/comment/121826397
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29500923
has text: The `PersonRenderer` is missing `>` at `oRm.write("</ul");`
score: 0

http://stackoverflow.com/comment/47129232
type: Comment
comment on: http://stackoverflow.com/q/29484693
score: 1
has text: Use `$(this).attr('id')` or `this.id` or `event.target.id`
type: QuestionComment

http://stackoverflow.com/comment/47067313
type: AnswerComment
comment on: http://stackoverflow.com/a/29449202
type: Comment
score: 0
has text: This appears to have done something (at least the event is being triggered), however it is being triggered on the entire square block shape, whereas my SVG image is circular and I don't want users to click empty space and still have the app think they clicked the image. Is there a way to improve this method such that is behaves like in normal document? Sorry if the answer is in the specs, they are written so badly it's incomprehensible to someone new to the topic. If there is no way to improve it, I will accept this answer.

http://stackoverflow.com/comment/47110715
comment on: http://stackoverflow.com/a/29474282
has text: Can you print out + comment what grid.getSelectedRows() is returning to you?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46933428
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29375228
score: 0
has text: @Grundy He did this so that a resize event can be triggered at page load. So this might be what he wants: `$(window).resize(function() { navHeight(); }).resize();`

http://stackoverflow.com/comment/47081391
type: QuestionComment
comment on: http://stackoverflow.com/q/29458111
has text: Explain in detail whats not working in your approach
score: 0
type: Comment

http://stackoverflow.com/comment/70171032
has text: Can I assume that scripts loaded this way will only be loaded, and not executed until the regular request?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29475909
type: AnswerComment

http://stackoverflow.com/comment/47145649
comment on: http://stackoverflow.com/q/29489686
has text: Can you express your question in one sentence? Once you've done that, please use that for the title.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29504596
has answer: http://stackoverflow.com/a/29504630
has body: This is probably very simple to do in Javascript, but I don't know how to. Example: &lt;input type="textbox" id="txt"&gt; &lt;input type="button" id="btn"&gt; Say I want to click on btn and have it set focus on txt, how would I go about doing that? Thank you!
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29504630
has answer: http://stackoverflow.com/a/29504659
possible better answer: http://stackoverflow.com/a/29504659
has title: Set focus to one thing when clicking on another?
has answer: http://stackoverflow.com/a/29504610
answer count: 4
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29504688
type: Question

http://stackoverflow.com/comment/47089662
type: Comment
comment on: http://stackoverflow.com/a/29458194
has text: It will disaggregate entires which doesn't share the same value for `x`. Those which do share the same value for `x` will be stacked together. You need something more like an unique identifier if you want all entries to be plotted separately.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29523208
tagged with: javascript
has body: I've got a problem with my sticky header not sticky in the fullpage.js environment. I've got a site where I did get it to work but the way it worked can't be correct because it's full of errors and bad coded pieces. Now Question is do I look at the css part for the fixed position or does my problem finds itself in the javascript. Code: @CHARSET "ISO-8859-1"; /* Reset CSS * --------------------------------------- */ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre, form,fieldset,input,textarea,p,blockquote,th,td { padding: 0; margin: 0; } a{ text-decoration:none; } table { border-spacing: 0; } fieldset,img { border: 0; } address,caption,cite,code,dfn,em,strong,th,var { font-weight: normal; font-style: normal; } strong{ font-weight: bold; } ol,ul { list-style: none; margin:0; padding:0; } caption,th { text-align: left; } h1,h2,h3,h4,h5,h6 { font-weight: normal; font-size: 100%; margin:0; padding:0; color:#444; } q:before,q:after { content:''; } abbr,acronym { border: 0; } /* Custom CSS * --------------------------------------- */ body{ font-family: arial,helvetica; color: #333; color: rgba(0,0,0,0.5); } .wrap{ margin-left: auto; margin-right: auto; width: 960px; position: fixed; } h1{ font-size: 6em; } p{ font-size: 2em; } .intro p{ width: 50%; margin: 0 auto; font-size: 1.5em; } .section{ text-align:center; } /*StickyHeaderNavigationMenu*/ header{position:fixed;bottom:0;z-index:99900; width:100%; } .fixed{ position: fixed; bottom:0; left:0; width: 100%; z-index:10000; } .fixed-header { position:fixed; top:0px; left:0; width: 100%; } nav { width:100%; height:60px; background:#36A8B5; postion:fixed; z-index:10000; bottom:0px; left:0; } nav ul { list-style-type: none; margin: 0 auto; padding-left:0; text-align:center; width:100%; } nav ul li { display: inline-block; line-height: 60px; margin-left: 35px; } nav ul li a { text-decoration: none; color: #FFFFFF; } Schools Gallery About Us About Us Snorkeling Contact Fixed elements Create your own headers and footers We provi…
has comment: http://stackoverflow.com/comment/47243280
score: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: fullpage.js
tagged with: css
answer count: 0
upvote count: 2
has title: fullpage.js sticky header won't stick
has comment: http://stackoverflow.com/comment/47263992
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47201142
has comment: http://stackoverflow.com/comment/47283440
has comment: http://stackoverflow.com/comment/47206186

http://stackoverflow.com/q/29488620
score: 1
has answer: http://stackoverflow.com/a/29497910
tagged with: concurrency
upvote count: 1
answer count: 1
has body: Can I create more PhantomJS processes for each CPU or more than 1 webpage instance for each phantom process at a same time? For example, 1:1:1 means: 1 pc with 4 CPUs, I spawn 4 PhantomJS processes, and create 1 webpage in each of the processes at same time. It is a limit to concurrency. Is there a good way to prove that can I change the 1:1:1 ratio and which ratio is good? If the ratio of phantom:page is 1:n, do context switch race conditions occur and can this result in a PhantomJS error?
tagged with: javascript
favorite count: 0
has title: Can the ratio of cpu:phantom:page be more than 1:1:1
downvote count: 0
type: UnansweredQuestion
type: Question
tagged with: phantomjs
tagged with: performance

http://stackoverflow.com/comment/46968263
has text: Use `context.clearRect` -- it's optimized to be the fastest way of clearing the canvas in preparation for new content.
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29392272

http://stackoverflow.com/comment/47014701
comment on: http://stackoverflow.com/a/29421320
score: 0
type: Comment
type: AnswerComment
has text: On http://webcomponents.org/, you can download the un-minified version of the webcomponents polyfill (webcomponents.js). If you import this instead of the minified version, maybe the error could be narrowed down.

http://stackoverflow.com/comment/47000915
score: 0
type: Comment
has text: What is running on the pop up page? You are opening a pop up in a pop up?
type: AnswerComment
comment on: http://stackoverflow.com/a/29392512

http://stackoverflow.com/comment/46999693
score: 0
comment on: http://stackoverflow.com/q/29412312
type: Comment
type: QuestionComment
has text: Is there not a more elegant way of doing that?

http://stackoverflow.com/q/29383388
type: AnsweredQuestion
has title: How to search near by locations using latitudes and longitudes from Google maps
tagged with: javascript
score: 0
tagged with: google-maps
upvote count: 1
answer count: 1
downvote count: 1
tagged with: latitude-longitude
accepted answer: http://stackoverflow.com/a/29383692
favorite count: 0
tagged with: google-places
has answer: http://stackoverflow.com/a/29383692
type: Question
has body: I'm not sure how to put this question. My web app has number of user profiles with latitudes and longitudes of each user's location. They are obtained by Google maps. I need to put a query to Google maps API to search one user's location against all other users' locations to find out user's near by people in a selected region. Could anyone please give me a hint on how to achieve this using Google maps or any other mean.

http://stackoverflow.com/comment/46958526
comment on: http://stackoverflow.com/q/29390482
score: 0
type: QuestionComment
has text: So it is not showing nothing, even after page loads initially, correct?
type: Comment

http://stackoverflow.com/q/29432873
has body: What I am trying to do is load content via Ajax on a site. So suppose we have this as the main page example.com/blankpage (I have used htaccess to get rid of the .html part). Currently I have this working, I click a link on the page that directs to mysite.com/blankpage#PAGE1 and the Ajax script will load all the text from PAGE1.html and place it into a div on blankpage. Now here is what I am actually trying to do. Pretend I have another link on the page as such: mysite.com/blankpage?action=PAGE2. Clicking on the button works and it actually does load the contents of the file, however it only does so after loading a new page. It doesn't actually load PAGE2, it loads the blankpage and then replaces the contents of the div with the contents of PAGE2, which is what I want, but without a page load/refresh. For the past hour I have been trying to find an error in my Ajax loading script but then it occurred to me that it might be the hash tag. Do Ajax page loads NEED # or am I actually making a mistake somewhere. I can post the code if need be.
tagged with: javascript
has comment: http://stackoverflow.com/comment/47035495
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47035368
has answer: http://stackoverflow.com/a/29432951
type: Question
has title: Load content via Ajax WITHOUT a Hash

http://stackoverflow.com/a/29511358
type: Answer
score: 5
upvote count: 5
answers question: http://stackoverflow.com/q/29510910
accepted answer of: http://stackoverflow.com/q/29510910
type: AcceptedAnswer
downvote count: 0
has body: From the jQuery documentation on .css( propertyName ): Retrieval of shorthand CSS properties (e.g., margin, background, border), although functional with some browsers, is not guaranteed. It looks like in Firefox using window.getComputedStyle( element ), which I believe is used by jQuery under the hood to get .css('property')[1], returns a CSS2Properties collection where the background property is an empty string. But all the more specific background-related properties (like background-image, background-position etc) are fine. It's probably the same for other shorthand properties, for example font is an empty string while font-family, font-size etc. have values. You can fix it by cloning these properties one by one: http://jsfiddle.net/ohvuLqwe/5/ $(function () { // get a reference to original element var original = document.querySelector('.one'); // get the computed style var styleprops = getComputedStyle( original ); // create an object to hold the relevant properties var clonebg = {}; // iterate over the computed properties... for( var prop in styleprops ){ // and store them in the object if they are not empty and the name starts with "background" if( prop.indexOf('background') == 0 &amp;&amp; styleprops[prop] != "" ){ clonebg[ prop ] = styleprops[prop]; } } // use the jQuery .css({}) method to set all the cloned properties. $('.two').css(clonebg ); }); [1] https://github.com/jquery/jquery/blob/master/src/css/var/getStyles.js

http://stackoverflow.com/comment/47117905
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29478050
has text: what happens if you use $photo = $_POST['photo'];, and echo $photo .... in your php file?
score: 0

http://stackoverflow.com/comment/47122626
score: 0
has text: Here is the solution I came up with this afternoon.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29479496

http://stackoverflow.com/q/29424727
has body: I am trying to build up a form where user can request some post information including feature image. For uploading the image i have used wp_enqueue_media() which works nicely in all free themes locally but when i install it in main server(premium theme) i got below error through firebug-console. Please check the error screenshot: When i click on the error link it shows me the 'plupload.full.min.js' file which locates to wp-include/js/plupload/ folder. I don't understand actually why i am getting this error. I used below function to include wp_enqueue_media() through plugin folder: function add_my_scripts() { wp_enqueue_media(); } add_action('wp_enqueue_scripts', 'add_my_scripts'); I need your kind help to get rid of this issue. Thanks in advance.
answer count: 0
has comment: http://stackoverflow.com/comment/47020780
tagged with: wordpress
has comment: http://stackoverflow.com/comment/47021162
type: Question
tagged with: upload
tagged with: javascript
tagged with: jquery
tagged with: media
has comment: http://stackoverflow.com/comment/47021375
score: 0
has comment: http://stackoverflow.com/comment/47020873
has title: Wordpress - getting error for wp_enqueue_media()
type: UnansweredQuestion

http://stackoverflow.com/a/75582493
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29447715
has comment: http://stackoverflow.com/comment/133428330
has body: Easy way to fix footer at the bottom: import { StyleSheet, Text, View } from 'react-native' import React from 'react' const Footer = () => { return ( All rights reserved, 2022 ) } const styles = StyleSheet.create({ footer: { position: 'absolute', bottom: 0, left: 0, right: 0, backgroundColor: '#F4CE14', padding: 10, justifyContent: 'center', alignItems: 'center', }, }) export default Footer;
downvote count: 0
has comment: http://stackoverflow.com/comment/133428322

http://stackoverflow.com/q/29511113
linked to: http://stackoverflow.com/q/12501867
has answer: http://stackoverflow.com/a/29511259
has comment: http://stackoverflow.com/comment/47178732
type: Question
has comment: http://stackoverflow.com/comment/47178238
possible better answer: http://stackoverflow.com/a/29511254
has answer: http://stackoverflow.com/a/29511254
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29511281
accepted answer: http://stackoverflow.com/a/29511281
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has title: Adding events on dynamically created tags
has body: I'm creating some divs in my script with a certain class name in a loop. I want to add onclick event to every div and get their innerHTML by clicking on them. but with every click I get only the last div's innerHTML. here's my code : for(var i=0;i&lt;10;i++) { var itemRow = document.createElement("div"); itemRow.innerHTML = i; itemRow.onclick = function(){ return function(){ console.log(itemRow.innerHTML); //which now returns only the last div innerHTML }(); } } Thanks very much
type: AnsweredQuestion

http://stackoverflow.com/comment/46996872
comment on: http://stackoverflow.com/q/29411697
has text: @SlashG I am afraid there is no solution. I just can't "force" the user to set "High accuracy" mode.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29529836
type: AcceptedAnswer
downvote count: 0
has body: This should do: $("p").each(function(index) { $(this).delay(350*index).fadeOut(300); });
has comment: http://stackoverflow.com/comment/47213687
type: Answer
score: 3
answers question: http://stackoverflow.com/q/29529756
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29529756

http://stackoverflow.com/a/29465880
has body: What Can JavaScript Do? JavaScript can change HTML content. Click Me! Similar to what Reena posted, except the use of the parameter can make the function usable for other questions, too.
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29465553
answers question: http://stackoverflow.com/q/29465553
has comment: http://stackoverflow.com/comment/47100440

http://stackoverflow.com/a/29403435
has body: A proof-of-concept of the scheme laid out in the comments: create a new closure for each callback, let callback identify if it is active or not. function foreignAPIThatStartsACallback(callback) { setTimeout(callback, 1000); } var activeCallback; function wrapCallback(callback) { var args = Array.prototype.slice.call(arguments, 1); var that = this; var wrappedCallback = function() { if (wrappedCallback == activeCallback) { callback.apply(that, args); } } activeCallback = wrappedCallback; return wrappedCallback; } function myCallback(what, who) { console.log(who + " says " + what); } foreignAPIThatStartsACallback(wrapCallback(myCallback, "Hello", "Mario")); foreignAPIThatStartsACallback(wrapCallback(myCallback, "Goodbye", "Luigi")); // Mario is cancelled when Luigi gets started With multiple possible actives: function foreignAPIThatStartsACallback(callback) { setTimeout(callback, 1000); } var activeCallbacks = {}; function wrapCallback(callback) { if (!wrapCallback.count) wrapCallback.count = 0; wrapCallback.count++; var args = Array.prototype.slice.call(arguments, 1); var that = this; var wrappedCallback = function() { if (wrappedCallback.id in activeCallbacks) { cancelCallback(wrappedCallback); callback.apply(that, args); } } wrappedCallback.id = wrapCallback.count; activeCallbacks[wrapCallback.count] = true; return wrappedCallback; } function cancelCallback(wrappedCallback) { delete activeCallbacks[wrappedCallback.id]; } function myCallback(what, who) { console.log(who + " says " + what); } var marioCallback = wrapCallback(myCallback, "Hello", "Mario"); foreignAPIThatStartsACallback(marioCallback); var luigiCallback = wrapCallback(myCallback, "Goodbye", "Luigi"); foreignAPIThatStartsACallback(luigiCallback); var daisyCallback = wrapCallback(myCallback, "Mama?", "Peach"); foreignAPIThatStartsACallback(daisyCallback); cancelCallback(luigiCallback); // Mario and Daisy go off
upvote count: 3
has comment: http://stackoverflow.com/comment/46982393
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46982384
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29403229
score: 3
accepted answer of: http://stackoverflow.com/q/29403229

http://stackoverflow.com/q/29374270
has body: I'd like to make a GET request immediately after adding event listener as below. socket.on('event_of_my_api', function(data){ console.log('my api is working'); }) .then( $http.get('path/to/my/api') ); Where event_of_my_api is supposed to be called in my API as: ### in my api ### socket.emit('event_of_my_api', data); Please help me figure out how to do that. I expect a deferred promise is the solution of this.
has title: Success callback of socket.on() method
score: 0
tagged with: promise
has comment: http://stackoverflow.com/comment/46929400
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29377784
linked to: http://stackoverflow.com/q/29013899
tagged with: socket.io
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/47037129
comment on: http://stackoverflow.com/a/29433683
has text: jquery is indeed in my project, I tried your code but it didn't work, sadly.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47220508
comment on: http://stackoverflow.com/a/29511750
type: AnswerComment
score: 0
type: Comment
has text: I tride this, and it fails also. I think there might be a setting enforced by policy which is forcing some compatibility or disabling the override of the click. I tried adding this to the header: <add name="X-UA-Compatible" value="IE=Edge" /> as indicated here in another situation: http://stackoverflow.com/questions/25557299/internet-explorer-11-disable-display-intranet-sites-in-compatibility-view-via but even this fails.

http://stackoverflow.com/q/29445983
type: Question
possible better answer: http://stackoverflow.com/a/29446058
tagged with: javascript
has answer: http://stackoverflow.com/a/29446159
has comment: http://stackoverflow.com/comment/47059260
has comment: http://stackoverflow.com/comment/47062863
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/47061826
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29446159
has answer: http://stackoverflow.com/a/29446077
linked to: http://stackoverflow.com/q/15402242
tagged with: css
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47062794
has answer: http://stackoverflow.com/a/29446013
has title: jQuery search toggle
has comment: http://stackoverflow.com/comment/47058946
score: 1
has comment: http://stackoverflow.com/comment/47059278
upvote count: 1
has answer: http://stackoverflow.com/a/29446058
has body: on my website I have a div .toggle-search that if you click on it it expands to .search-expand where a search form is. This is the code in jQuery /* Toggle header search /* ------------------------------------ */ $('.toggle-search').click(function(){ $('.toggle-search').toggleClass('active'); $('.search-expand').fadeToggle(250); setTimeout(function(){ $('.search-expand input').focus(); }, 300); }); Now the only way to close the .search-expand is to click once again on the .toggle-search. But I want to change that it closes if you click anywhere else on the site. For an easier example I have the Hueman theme, and I'm talking about the top right corner search option. http://demo.alxmedia.se/hueman/ Thanks!

http://stackoverflow.com/comment/46934799
score: 1
has text: Here's a fiddle that demonstrates how the Page variable gets updated each time you change the text box (and lose focus) http://jsfiddle.net/xaq8rtx5/1/
type: AnswerComment
comment on: http://stackoverflow.com/a/29376779
type: Comment

http://stackoverflow.com/comment/47075903
type: Comment
comment on: http://stackoverflow.com/a/29455167
score: 0
type: AnswerComment
has text: Thats what i was asking: how do i know in my upload.js route (post) that files are uploaded before i start using body.parse? The code you have posted just writes in console that is done but how do i check that in upload.js file??? I have multer in app.js

http://stackoverflow.com/q/29498957
has body: I'm new to javascript, trying to understand global and local variables. I keep hearing "Avoid global variables". I have a bunch of string variables that are only used in one function, so it I should make them local, right? I never need to change there value, so I was wondering... Every time I call the function, does that mean all those variables get set again and again, to the same value. Does it take javascript any time or effort to set these variables over and over again? Is there are better way to handle variables that you know will never change value. Here's what I'm getting at... function test() { var a="the quick brown fox blah blah blah..."; var b="Hello world blah blah blah...."; var c... var d.... etc, etc.... &lt;more code goes here&gt; } To me it looks like every time I call test() all the variables get set again. If I put them outside the function wouldn't they only get set once? But that would make them global, right?
has answer: http://stackoverflow.com/a/29499044
score: 1
has comment: http://stackoverflow.com/comment/47156782
has answer: http://stackoverflow.com/a/29499012
tagged with: local
upvote count: 1
downvote count: 0
tagged with: javascript
tagged with: variables
favorite count: 0
answer count: 3
tagged with: global
tagged with: constants
type: UnansweredQuestion
has title: Javascript - Where to put Constants, Global or Local?
type: Question
has answer: http://stackoverflow.com/a/29499153

http://stackoverflow.com/q/29478571
has body: I'm trying to learn meteor and going through meteor tips, and the second line in the js file "PlayersList = new Mongo.Collection('players');" causes it to be unable to run. It says i have a duplicate file in the sub-directory, but i'm unsure how that is possible because the only three files i have in there are the leaderboard.css, leaderboard.html, and leaderboard.js. I'm unsure how to format to make this more readable, thanks for the help! here are the logs: C:\Users\jeffr_000\Documents\leaderboard&gt;meteor [C:\Users\jeffr_000\Documents\leaderboard] =&gt; Started proxy. =&gt; Started MongoDB. =&gt; Exited with code: 8 W20150406-12:20:14.063(-7)? (STDERR) W20150406-12:20:14.065(-7)? (STDERR) C:\Users\jeffr_000\AppData\Local\.meteor\pa ckages\meteor-tool\1.1.3\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules \fibers\future.js:245 W20150406-12:20:14.065(-7)? (STDERR) throw(ex); W20150406-12:20:14.066(-7)? (STDERR) ^ W20150406-12:20:14.066(-7)? (STDERR) Error: A method named '/member/insert' is a lready defined W20150406-12:20:14.066(-7)? (STDERR) at packages/ddp/livedata_server.js:1461 :1 W20150406-12:20:14.066(-7)? (STDERR) at Function._.each._.forEach (packages/ underscore/underscore.js:113:1) W20150406-12:20:14.066(-7)? (STDERR) at [object Object]._.extend.methods (pa ckages/ddp/livedata_server.js:1459:1) W20150406-12:20:14.067(-7)? (STDERR) at [object Object].Mongo.Collection._de fineMutationMethods (packages/mongo/collection.js:904:1) W20150406-12:20:14.067(-7)? (STDERR) at new Mongo.Collection (packages/mongo /collection.js:209:1) W20150406-12:20:14.067(-7)? (STDERR) at app\leaderboard.js:3:14 W20150406-12:20:14.067(-7)? (STDERR) at app\leaderboard.js:5:3 W20150406-12:20:14.068(-7)? (STDERR) at C:\Users\jeffr_000\Documents\leaderb oard\.meteor\local\build\programs\server\boot.js:222:10 W20150406-12:20:14.068(-7)? (STDERR) at Array.forEach (native) W20150406-12:20:14.068(-7)? (STDERR) at Function._.each._.forEach (C:\Users\ jeffr_000\AppData\Loc…
accepted answer: http://stackoverflow.com/a/29478676
has title: Unable to boot a meteor project with only two lines of code
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/29478676
tagged with: javascript
has comment: http://stackoverflow.com/comment/47117863
has comment: http://stackoverflow.com/comment/47118050
answer count: 1
tagged with: meteor

http://stackoverflow.com/a/29432337
has comment: http://stackoverflow.com/comment/47034739
has body: as you told me better css I've made a quick fiddle for you. Of course you need to polish the style but the "working" is there. css just: .container { height:30px; background-color:green; color:#fff; } .container &gt; ul {position:relative;} .container &gt; ul li { display:inline-block; margin-right:30px; } .container &gt; ul &gt;li &gt; ul { position:absolute; left:0; background-color:blue; top:0px; z-index:-1; } .container &gt; ul &gt; li:hover &gt; ul { top:30px; -webkit-transition: all 0.4s ease; -moz-transition: all 0.4s ease; -ms-transition: all 0.4s ease; -o-transition: all 0.4s ease; transition: all 0.4s ease; } edited: I change the aproach and insteed of makign the transition with height I've use just top. check it out
downvote count: 0
answers question: http://stackoverflow.com/q/29432010
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47034221

http://stackoverflow.com/a/29383594
score: 0
has body: Some server-side promise libraries like q and bluebird would clean up your code substantially and eliminate the mess of callback hell.
type: Answer
answers question: http://stackoverflow.com/q/29383452

http://stackoverflow.com/a/29503128
has comment: http://stackoverflow.com/comment/47164109
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29503025
has body: This will set the width accordingly to all images in the page, so adjust the query in $("img") to match only the desired images. var sizes = ["100%", "70%", "30%"]; $("img").each(function (idx, elem) { elem.width = sizes[idx % sizes.length]; });

http://stackoverflow.com/a/29504249
type: Answer
has body: .text will overwrite previous text which looks like you got one users only try this. $(document).ready(function(){ for(var i = 0; i &lt; users.length; i++) { var $currentUser = $('&lt;li class="user"&gt;&lt;/li&gt;'); $currentUser.text(users[i]); $currentUser.appendTo('.userList'); } });
answers question: http://stackoverflow.com/q/29504196
score: 0
has comment: http://stackoverflow.com/comment/47166009

http://stackoverflow.com/q/29400046
downvote count: 1
has title: console.log not working Mac OS X
favorite count: 0
upvote count: 0
linked to: http://stackoverflow.com/q/609316
tagged with: console.log
type: AnsweredQuestion
has body: I have searched and searched and am unable to get a simple console.log in javascript or HTML to write to the Eclipse console. Running the javascript in Google and checking the console works. Just can't figure out how to get it to work in Eclipse. I am using the following on Mac OS X Eclipse Java EE IDE for Web Developers. Version: Luna Service Release 2 (4.4.2) Build id: 20150219-0600
tagged with: eclipse
type: Question
accepted answer: http://stackoverflow.com/a/29400197
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46976167
answer count: 1
has answer: http://stackoverflow.com/a/29400197

http://stackoverflow.com/comment/47155586
has text: Sorry, I had got interrupted and didn't get the section showing the problem done. See my edit
type: Comment
comment on: http://stackoverflow.com/q/29497624
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46952927
score: 0
has text: Certainly I can, but I have a lot of such places and I don't want to call some code each time I generate the markup. Solution should be more generic.
type: QuestionComment
comment on: http://stackoverflow.com/q/29386536
type: Comment

http://stackoverflow.com/comment/47044330
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29437415
has text: No hacks, plain and straightforward. Maybe I will post the answer in case it can be useful for someone.
type: AnswerComment

http://stackoverflow.com/comment/46951343
score: 0
comment on: http://stackoverflow.com/a/29386434
type: Comment
has text: Did you change `cols=4` to `cols=5`?
type: AnswerComment

http://stackoverflow.com/comment/47022412
type: AnswerComment
comment on: http://stackoverflow.com/a/29425588
has text: @Barmar FAQ answer
score: 0
type: Comment

http://stackoverflow.com/q/29399293
score: 3
tagged with: google-chrome-extension
accepted answer: http://stackoverflow.com/a/29402903
has answer: http://stackoverflow.com/a/39398865
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/39398865
tagged with: google-chrome
downvote count: 1
type: Question
has title: Checking whether data already exists in chrome.storage.sync
tagged with: javascript
has answer: http://stackoverflow.com/a/29402903
upvote count: 4
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/40707016
has body: I have a function that gets data from chrome.storage and loads it into an array, everything works fine if I save an empty array into chrome.storage using a line of code then taking it out before using the extension as a user would. The problem is that a user couldn't do that, if I start the extension for the first time without doing this then it looks like chrome passes back undefined into the variable which causes this error: "Uncaught TypeError: Cannot read property '8' of undefined" at this line: if (SavedReminders[i][8] == "Full") { I'm not entirely sure what exactly is going on, but I guess that if there's a way to check if the data exists already in chrome.storage or a way of saving an empty array just the first time the user opens the extension that would fix it. Here's my Load function: function LoadFromFile() { reminds = {} chrome.storage.sync.get({ reminds: [] }, function (result) { SavedReminders = result.reminds }); } and save function: function SaveToFile() { reminds={} chrome.storage.sync.set({reminds:SavedReminders }, function () { console.log(SavedReminders, reminds); }); } any help would be appreciated, thanks.

http://stackoverflow.com/comment/46975075
type: QuestionComment
comment on: http://stackoverflow.com/q/29399493
score: 0
has text: do yourself a favor and store some of those boolean expressions as variables. `var isUS = $("#option:selected").text() === 'UNITED STATES'); if(isUS && ...)`
type: Comment

http://stackoverflow.com/q/29478850
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47118545
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29480445
has body: I'm having 2 weird issues with my popovers shown here in fiddle After I have selected a day (in fullcalendar) and the popover shows, I click the day again to hide the popover, then I click again in the same day to show again, but no popover!. It's after I click to show, hide, then click to show again that I'm having issues. When I click on an eventLimitClick event inside a day (April 20th in fiddle), then click on the day (April 20th). The popover hides after I click the day, but then doesn't show any popover for the day like it should. Here is some of the logic, but please refer to the fiddle link above for working code. var $calPopOver; $('#fullcalendar').fullCalendar({ header: { left: 'prev,next', //today', center: 'title', right: '' }, defaultView: 'month', editable: true, allDaySlot: false, selectable: true, eventLimit: 1, events: function(start, end, timezone, callback) { $.ajax({ url: '/ManageSpaces/GetDiaryEvents/', dataType: 'json', data: { start: start.format(), end: end.format(), id: $("#HiddenYogaSpaceId").val() }, success: function(doc) { var events = []; $(doc).each(function() { events.push({ title: "1 Event", //$(this).attr('title'), start: $(this).attr('start') // will be parsed }); }); callback(events); } }); }, eventLimitText: function(numberOfEvents) { return numberOfEvents + " Events"; }, eventLimitClick: function(cellInfo, jsEvent) { $(cellInfo.dayEl).popover({ html: true, placement: 'bottom', container: 'body', title: function() { return $("#events-popover-head").html(); }, content: function() { return $("#events-popover-content").html(); } }); //$(cellInfo.dayEl).popover('toggle'); if ($calPopOver) { $calPopOver.popover('destroy'); } $calPopOver = $(cellInfo.dayEl).popover('show'); }, eventClick: function(calEvent, jsEvent, view) { //function (data, event, view) { //var s = cellInfo.segs; $("#eventDetails.collapse").collapse('toggle'); if ($calPopOver) $calPopOver.popover('destroy'); }, dayClick: function(data, event, view) { $dayClickedDate =…
score: 1
upvote count: 1
type: Question
has title: Logic to show Bootstrap popover acting abnormally
tagged with: javascript
tagged with: fullcalendar
has comment: http://stackoverflow.com/comment/47118739
answer count: 1
downvote count: 0

http://stackoverflow.com/q/29374148
has comment: http://stackoverflow.com/comment/46929495
has comment: http://stackoverflow.com/comment/46928961
type: Question
has comment: http://stackoverflow.com/comment/46928861
has comment: http://stackoverflow.com/comment/46928999
tagged with: javascript
has comment: http://stackoverflow.com/comment/46928970
tagged with: scope
score: 0
has title: Is it possible to use an undeclared variable in another variable
answer count: 1
has body: I have always wondered this and every now and again it pops up. var name = document.title; var user = document.getElementsByClassName("class-name")[0].children[j].getElementsByTagName("a")[0].innerHTML; var someArr = []; for (var j = 0; j &lt; document.getElementsByClassName("class-name")[0].children.length; j++) { if (user == name) { someArr.push(user) }; }; alert(someArr); Now this is all made up (obviously) but see how the variable "user" is checking for children[j], well if I were to try use this code, it would come up with an error along the lines of "Cannot read property 'getElementsByTagName' of undefined". Now my question is: Is there a way to allow this code to work without giving an error message and not executing. I would use this for clean code in the if loop, like all variables are used for. This wouldn't be the only instance of the "user" variable being used either so it is very useful. Thanks in advance, Daniel.
has comment: http://stackoverflow.com/comment/46928847
tagged with: var
has answer: http://stackoverflow.com/a/29374284
accepted answer: http://stackoverflow.com/a/29374284
type: AnsweredQuestion

http://stackoverflow.com/comment/79539255
score: 1
comment on: http://stackoverflow.com/a/46263541
type: AnswerComment
type: Comment
has text: This is a valid use of weakmap as long as the memoization cache is meant to be **memory-sensitive**, not persistent throughout the obj/function life. If the "memoization cache" is meant to be persistent throughout the obj/function life, then weakmap is the wrong choice: Use [any of the 6 default javascript encapsulation techniques](https://stackoverflow.com/questions/29413222/what-are-the-actual-uses-of-es6-weakmap/40241741#comment79535070_29416340) instead.

http://stackoverflow.com/comment/47216281
has text: I'm asking if `var request = new XMLHttpRequest();` does not create completely new (and probably empty) instance of `XMLHttpRequest()` which has nothing to do with the `XMLHttpRequest()` that was used during loading my page? If yes then @ epascarello answer wont work. I was also not successful with `window` object.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29481490
type: AnswerComment

http://stackoverflow.com/q/29417554
tagged with: jquery
favorite count: 0
tagged with: measure
tagged with: time
has comment: http://stackoverflow.com/comment/50021411
has body: I have a simple quiz form with several inputs and selects, and I need to measure the time it took the contestant to write/choose an answer. This is what I'm trying, but it reports incorrect time: $('input, select').on('focus', function(event) { el = $(this); name = el.attr('name'); // console.log(name); a = performance.now(); a_value = el.val(); console.log(name + ' focused.'); $(el).on('input select cut copy paste', function(event) { console.log('el: ' + el); b_value = el.val(); if (a_value != b_value) { b = performance.now(); if (name in times) { console.log('exists'); times[name] = times[name] + (b - a); } else { times[name] = b - a; } } }); $(el).on('blur', function(event) { alert(times); }); }); JS Bin option1 option2
upvote count: 4
has title: Measuring time for input
answer count: 4
has answer: http://stackoverflow.com/a/31098949
possible better answer: http://stackoverflow.com/a/30998468
has comment: http://stackoverflow.com/comment/50021666
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/50028435
score: 3
has answer: http://stackoverflow.com/a/31000973
has answer: http://stackoverflow.com/a/30998468
type: Question
linked to: http://stackoverflow.com/q/6626044
has answer: http://stackoverflow.com/a/31001738
accepted answer: http://stackoverflow.com/a/31001738
downvote count: 1
has comment: http://stackoverflow.com/comment/50021975
tagged with: javascript

http://stackoverflow.com/comment/47194600
comment on: http://stackoverflow.com/q/29519017
has text: Is it possible that in the two cases where it has failed, the people submitting the numbers didn't have javascript enabled? If you've designed your site to operate nicely, you'll support such users, but that would also stop both the validation and formatting code from running before the form is submitted.
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/q/29424407
type: Question
has body: How do I print what I actually see on Chrome? The print preview looks to be lacking the font, shaded alternate row coloring and font size. Here is the chrome output "Chrome" Here is the print previw "Print Preview" The HTML behind this page: http://textuploader.com/xc9t
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29424446
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: google-chrome
has title: Big difference between chrome view vs print preview

http://stackoverflow.com/q/29526537
type: Question
downvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/29526650
tagged with: css
has answer: http://stackoverflow.com/a/29526586
possible better answer: http://stackoverflow.com/a/29526650
upvote count: 3
has comment: http://stackoverflow.com/comment/47207551
linked to: http://stackoverflow.com/q/2044642
has title: Display the source code line number of an html tag onClick in Javascript
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29526586
has comment: http://stackoverflow.com/comment/47207537
has comment: http://stackoverflow.com/comment/47207765
has comment: http://stackoverflow.com/comment/47208125
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47207577
has comment: http://stackoverflow.com/comment/47207821
has body: I want to record the source code line number for an HTML tag when I click on it. For example, if there are two tags, recording the tag alone will not help me differenciate between them. Here is an example. Two "H1" tags: When I click on the first, I want to know the source code line number: If I could know that the second H1 was line number 74 (for example), I could know that the first and second H1 tags are not the same when recorded in the database.

http://stackoverflow.com/comment/46929393
comment on: http://stackoverflow.com/q/29373864
has text: using ajax `complete` method with the `200` is redundant. just use the `done` method instead. also the `complete` method is deprecated.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/101687831
comment on: http://stackoverflow.com/a/29463433
score: 4
type: Comment
has text: Does anyone know how to get Typescript to recognize the global FB? I've installed facebook-js-sdk as a dev dependency and added it to my list of eslint globals, but it still doesn't recognize FB.
type: AnswerComment

http://stackoverflow.com/comment/47002613
has text: also, I'm not sure you are listening to the correct event. You say you have a tab in a tabpanel with a "Close" label ?
type: QuestionComment
comment on: http://stackoverflow.com/q/29413697
score: 0
type: Comment

http://stackoverflow.com/comment/47165354
score: 1
has text: You didn't escape the quotes, try: el.innerHTML = " {{world}} "
comment on: http://stackoverflow.com/q/29503828
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29382711
has comment: http://stackoverflow.com/comment/46944494
upvote count: 1
has body: I am working on video site, It has a features of drag and drop and create playlist and many others. I want to remember the dragged items on the page refresh. Any help, Ideas???? Please help
answer count: 1
favorite count: 0
has title: Remember Playlist on Refresh
has comment: http://stackoverflow.com/comment/46944611
accepted answer: http://stackoverflow.com/a/29382764
tagged with: php
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29382764
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/47011582
has text: checked 5 times , tried both \ and / for separators , checked name , checked directory , in the end i copy pasted it. STILL not working. ON chrome , does this tell u anything ?
comment on: http://stackoverflow.com/q/29419727
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29415053
upvote count: 4
has answer: http://stackoverflow.com/a/29437069
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/69847086
tagged with: js-amd
tagged with: ace-editor
tagged with: requirejs
has body: We have a large javascript application that is entirely namespaced. We use require.js to load everything (require lives on the namespace) We then use grunt to compile the 100+/- js files, including libraries into one minified file. I am able to load ace.js with define(['ace/ace'], function (ace) {.... I am able to create an editor such as var editor = ace.edit("editor"); I am not sure however to load the mode and theme. When I try something like.. editor.setTheme("ace/theme/monokai"); editor.getSession().setMode("ace/mode/javascript"); The request tries to find the file at the web root. mysite.com/theme-monokai.js However those files need to be compiled with the rest and put into the one big minified file. I imagine I need to include the theme and mode in my define statement, however I have tried that, and while I can get at a theme object such as define(['ace/mode-javascript'], function (mode_js) { console.log('mode loaded just fine') console.log(mode_js) ... However I don't have any luck trying to pass the object into the setTheme and setMode functions. editor.setTheme(ace_theme); editor.getSession().setMode(mode_js); The end result of all of this is that I have a ace editor working but no highlighting or theme. Line numbering works, tabbing works. I am not sure if these things are in the main ace.js or if it is successfully loading its dependencies and just not able to load or not able to map the theme/mode paths to how they are loaded. Is there a way to set the theme and mode defaults with a config? this may help. Does anyone have any idea what I am missing? Thanks.
type: Question
has title: Can not load Ace.js editor mode and themes (namespaces project & AMD require.js & grunt
tagged with: javascript
score: 4
tagged with: grunt-contrib-requirejs

http://stackoverflow.com/a/29643848
has body: As @WizKid said, a simple answer is that you just cannot embed any javascript in facebook story.
answers question: http://stackoverflow.com/q/29435806
score: 0
type: Answer

http://stackoverflow.com/q/29497624
has comment: http://stackoverflow.com/comment/47155246
has comment: http://stackoverflow.com/comment/47154249
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/47154629
has comment: http://stackoverflow.com/comment/47154663
has comment: http://stackoverflow.com/comment/47154062
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47154842
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29498561
has comment: http://stackoverflow.com/comment/47154695
has comment: http://stackoverflow.com/comment/47154741
score: -1
has comment: http://stackoverflow.com/comment/47155586
has comment: http://stackoverflow.com/comment/47154656
has answer: http://stackoverflow.com/a/29499215
possible better answer: http://stackoverflow.com/a/29498561
answer count: 2
has body: For part of the site I'm working on, I have a set of sidebars that can pull out. To have them hide when the users are done with them, I've set up a div with a click event (see below) so that whenever the user clicks somewhere outside of the sidebar, the sidebar closes. The problem that I'm running into, however, is that the click event handler is grabbing the event, running its method, and then the click event seems to stop. I've tried using return true and a few other things I've found around here and the internet, but the click event just seems to die. $('.clickaway').click(function() { $('body').removeClass(drawerClasses.join(' ')); return true; }); EDIT: Here is a fiddle with an example: https://jsfiddle.net/2g7zehtn/1/ The goal is to have the drawer out and still be able to click the button to change the color of the text.
downvote count: 1
accepted answer: http://stackoverflow.com/a/29499215
has comment: http://stackoverflow.com/comment/47155104
has comment: http://stackoverflow.com/comment/47154417
has title: Click Propagation failing in Jquery
tagged with: javascript
linked to: http://stackoverflow.com/q/1403615
has comment: http://stackoverflow.com/comment/47154425

http://stackoverflow.com/a/29469769
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29469708
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You should check whether the session has set in the index.php and if it was set then you should redirect the user to home.php else to remain same in the index.php So, In your index.php you should have this code if(isset($_SESSION['user'])) { header("Location: home.php"); } else { #Ask for credentials using your form } Note : I am using $_SESSION['user'] you should the name that you are using.
answers question: http://stackoverflow.com/q/29469708

http://stackoverflow.com/q/29407197
has comment: http://stackoverflow.com/comment/46988931
tagged with: javascript
tagged with: jquery
score: -1
has body: I'm trying to hide an element by using their id in javascript on changing value of a datepicker field using onChange="functionName()" event and onSelect event. But function is not triggered by both both events. Here is my code , Please find out what is error here - Java script in head section - &lt;script type="text/jscript"&gt; function check_date() { var date1 =document.getElementById('date1').value; var date2 =document.getElementById('date2').value; var style1 = date1 == date2 ? 'block' : 'none'; document.getElementById('day_name_div').style.display = style1; } &lt;/script&gt; HTML Code is here in Body Section - &lt;form name="profile" action="send_mail.php" id="leavemail" method="post" onSubmit="return validateLeave()"&gt; &lt;table width="50%" style="margin-left:5%" border="0" cellpadding="1" cellspacing="0" id="form"&gt; &lt;tr&gt; &lt;td&gt;Leave From&lt;/td&gt; &lt;td&gt;:&lt;/td&gt; &lt;td&gt; &lt;input class="tcal" name="date1" id="date1" onChange="check_date()" value="&lt;?php echo date("Y-m-d"); ?&gt;" required readonly/&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Leave To&lt;/td&gt; &lt;td&gt;:&lt;/td&gt; &lt;td&gt; &lt;input class="tcal" name="date2" id="date2" onChange="check_date()" value="&lt;?php echo date("Y-m-d"); ?&gt;" required readonly/&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt; &lt;tr id="day_name_div"&gt; &lt;td&gt;Day&lt;/td&gt; &lt;td&gt;:&lt;/td&gt; &lt;td&gt; Full &lt;input type="radio" name="day" id="day" value="full" /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Half &lt;input type="radio" name="day" id="day" value="half" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Type&lt;/td&gt; &lt;td&gt;:&lt;/td&gt; &lt;td&gt; &lt;select name="msg" id="msg" style="width:145px"&gt; &lt;option value="0"&gt;Please Select&lt;/option&gt; &lt;option&gt;Sick Leave&lt;/option&gt; &lt;option&gt;Casual L…
has answer: http://stackoverflow.com/a/29407560
has answer: http://stackoverflow.com/a/37131072
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47210825
has comment: http://stackoverflow.com/comment/46988887
linked to: http://stackoverflow.com/q/14332972
favorite count: 0
has comment: http://stackoverflow.com/comment/46989087
type: UnansweredQuestion
downvote count: 2
tagged with: datepicker
linked to: http://stackoverflow.com/q/3600680
has comment: http://stackoverflow.com/comment/46989244
upvote count: 1
has comment: http://stackoverflow.com/comment/46988643
has title: onChange and onSelect event is not triggering by a datepicker field
type: Question
has comment: http://stackoverflow.com/comment/46989294
has comment: http://stackoverflow.com/comment/46989061

http://stackoverflow.com/a/29514671
score: 0
answers question: http://stackoverflow.com/q/29513898
type: Answer
accepted answer of: http://stackoverflow.com/q/29513898
type: AcceptedAnswer
has body: Use getElementById for id hawkernum Change this portion in Javascript. if (!str || str.trim().length &lt;= 0) { document.getElementById("hawkernum").value=""; return; } And declare input type for &lt;input type="text" id="hawkernum" value="&lt;?php echo $data['hawkerid'];?&gt;" name="hawkername" /&gt;

http://stackoverflow.com/comment/51392396
comment on: http://stackoverflow.com/a/31727190
type: AnswerComment
score: 1
type: Comment
has text: Additionally, when done on the front end the interpolation can be performed lazily - if the user does not zoom in, there is no need to perform the interpolation.

http://stackoverflow.com/q/29485832
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/29485898
has answer: http://stackoverflow.com/a/29485961
has body: I want to create a function which returns the maximum number from an array, but it keeps returning NaN. How can I prevent NaN and return the wanted result ? var thenum = [5,3,678,213]; function max(num){ console.log(Math.max(num)); } max(thenum);
answer count: 4
has answer: http://stackoverflow.com/a/29485866
accepted answer: http://stackoverflow.com/a/29485866
duplicate of: http://stackoverflow.com/q/32647149
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14034180
type: Question
has answer: http://stackoverflow.com/a/29485898
linked to: http://stackoverflow.com/q/32647149
score: 4
upvote count: 4
has title: How to prevent Math.max() return NaN?
has answer: http://stackoverflow.com/a/29485926
downvote count: 0

http://stackoverflow.com/q/29404183
tagged with: ajax
tagged with: python
upvote count: 2
has title: Sending JSON with AJAX to Flask Syntax Error
has comment: http://stackoverflow.com/comment/46983841
has answer: http://stackoverflow.com/a/29404304
has comment: http://stackoverflow.com/comment/46983954
score: 2
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/29404304
type: Question
has comment: http://stackoverflow.com/comment/46983745
has body: url: '/upload', type: 'POST', data: JSON.stringify(pdata), contentType: "application/json; charset=utf-8", dataType: "text", is what I'm using to POST the JSON and it is sending it with the double quotes needed but in flask content = request.get_json() gives me content with the double quotes swapped with single quotes for example {"S":[],"R":[]} goes to {'S':[],'R':[]} it is something I'm doing wrong or do I need to somehow convert this back to two quotes if I want to send this to a javascript program?
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: flask
favorite count: 0

http://stackoverflow.com/q/29434002
has body: EDIT: Here is the full HTML. It was too long for me to paste directly here. I didn't create this page, I just have to clean up the problems with it. I'm trying to run a function from inside $(document).ready, because I need the DOM to have finished loading before my function runs since I'm binding buttons. This is what I have in my script: jQuery(function($) { alert('foo'); SI.regionSelector.init(); }); I also tried: $(document).ready(function(){ alert('foo'); SI.regionSelecter.init(); }); but the alert never happens. I've stepped through with the debugger in Chrome. I hit jQuery(function($), I don't get any errors (in fact the console shows what jQuery is defined as, so I know I have jQuery on my page), then the debugger jumps to the end of the jQuery function, but it simply never goes to the alert. Here is the full script: var SI = SI || {}; SI.regionSelector = { settings: {}, regions: [], init: function() { jQuery('a').click(function(e){ e.preventDefault(); }); // Start the DOMSelection tool when a region is clicked jQuery('#region-selector .region').click(function(){ targetRegion = jQuery(this); SetupDOMSelection(); }); // When saving, pull the values stored by the DOMSelection tool // and stuff them into hidden fields so they can be picked up on // the back end. jQuery('#region-selector .save').click(function(){ jQuery('#site_ingestor_region_selector .btn.region').each(function(){ var values = {}; values.innerHTML = jQuery(this).data('innerHTML'); values.xpath = jQuery(this).data('xpath'); var id = jQuery(this).attr('id'); var $hiddenInput = jQuery('input[name="'+id.replace('btn', 'form-region')+'"]'); $hiddenInput.val(JSON.stringify(values)); }); }); jQuery('.btn.edit').click(function() { jQuery('#site_ingestor_html_editor').css('display', 'block'); jQuery('body').css('overflow', 'hidden'); window.scrollTo(0, 0); }); jQuery('.btn.cancel').click(function() { jQuery('#site_ingestor_html_editor').css('display', 'none'); jQuery('body').css('overflow', 'scroll'); }…
favorite count: 0
type: Question
tagged with: onload
has comment: http://stackoverflow.com/comment/47037413
upvote count: 2
score: 0
downvote count: 2
has title: $(document).ready and jQuery(function($) not working; jQuery is defined, but script isn't entering .ready function
tagged with: document
has comment: http://stackoverflow.com/comment/47037759
answer count: 1
tagged with: ready
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47038063
tagged with: jquery
has comment: http://stackoverflow.com/comment/47037603
has comment: http://stackoverflow.com/comment/47037431
has comment: http://stackoverflow.com/comment/47037408
has comment: http://stackoverflow.com/comment/47107046
has comment: http://stackoverflow.com/comment/47106936
has answer: http://stackoverflow.com/a/29434057

http://stackoverflow.com/comment/47162882
has text: i dont think javascript can open terminal because of security policies but you can use node.js to excute javascript from command line/ terminal
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29502380

http://stackoverflow.com/comment/46936453
type: Comment
has text: Adding `()` would be incorrect. And `defer` isn't really going to change anything.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29378066

http://stackoverflow.com/q/29413480
linked to: http://stackoverflow.com/q/24865338
has answer: http://stackoverflow.com/a/29413986
accepted answer: http://stackoverflow.com/a/29413986
has body: I recently spent over 4 hours before figuring out why my ng-model directive used in combination with ng-options was not correctly binding to the property within my controller. The element was being properly initialized - receiving a value from the controller (parent) scope. But the child scope was not correctly updating the parent scope. After checking out the following questions and plunkers, I was able to develop a "work around" for this issue: Helpful stackoverflow question 1 Helpful stackoverflow question 2 Basic Plunker I found that the property I was binding to in my element was binding to a property of the same name within a child scope of the controller - therefore not the value was not reflected as expected in the controller's scope. After changing to The value in selectedAsset was correctly binding to the property in the controller's scope (as seen in the ng-change event handler). The entire context of my element is the following: ... Do I have any other options in this scenario other than purposefully binding to the parent scope? If I had multiple child scopes (nested ng-if statements), would I need to alter the ng-model to bind to $parent.$parent.$parent....selectedAsset in order to update the value in my controllers scope? Are there any "best practices" on this topic?
type: AnsweredQuestion
tagged with: angular-ngmodel
score: 1
linked to: http://stackoverflow.com/q/24390240
type: Question
upvote count: 1
has title: AngularJs Avoiding Scoping Issues
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: angularjs
tagged with: data-binding
downvote count: 0

http://stackoverflow.com/q/29477655
answer count: 1
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2429045
has answer: http://stackoverflow.com/a/29477935
tagged with: iframe
has body: The idea is to load a webpage in iframe ( for example wikipedia.com ) and that each link of that page that is clicked must create a new div with the content of the link in it. Its like you are surfing, going from page to page but you will keep each page you see stuck in one page. So at the end of your surf, you will have all the history of the page visited. I have a prototype of this, which is very…. wack but it stimulate the thing. You can check the prototype here . In order to make this prototype work like it should be , you can only click yellow background link. To make this work i have creat name attribut for iframe and target attribut for links. The link has the same target as the name of the iframe. For example : hyperliens Of course this prototype just stimulate how it should look but its not the real way to make it. Here are all the problem : 1) I have to manually add the « target » attribut to all the link which is not possible because the idea is to load any website coming from a different domain name. ( like wikipedia, bbc etc… ). More over, in this prototype i have save the page ( wikipedia) and upload them to make it work so its local content. which is not good for my case. 2) I know that the same-origin policy doesn’t allow the communication between parent page and child iframe ( with different domain name ). According to me if i want to set that all the tag link show their content in a new div , i have to communicate with the child iframe. So i’m wondering how i’m supposed to do… I need the easiest way because i’m ok with html/css but i’m newbie with js…. I was wondering if it would be easier if i use a chrome extension, like injecting js with background.js api. I also heard the postMessage solution in order to communicate with iframe even if they have different domain name. But I don't know if this solution is ok for this case. I’m waiting for your answer :)
has title: All link in iframe (different domain) must open in a new div
type: Question
tagged with: target
tagged with: javascript
score: 0
tagged with: google-chrome-extension

charts
tags question: http://stackoverflow.com/q/29522839
tags question: http://stackoverflow.com/q/29432654
tags question: http://stackoverflow.com/q/29487587
tags question: http://stackoverflow.com/q/29474615
tags question: http://stackoverflow.com/q/29393430
tags question: http://stackoverflow.com/q/29405334
tags question: http://stackoverflow.com/q/29441575
tags question: http://stackoverflow.com/q/29478605
tags question: http://stackoverflow.com/q/29518809
tags question: http://stackoverflow.com/q/29482900
tags question: http://stackoverflow.com/q/29529513
type: Tag
tags question: http://stackoverflow.com/q/29409613
tags question: http://stackoverflow.com/q/29497569
tags question: http://stackoverflow.com/q/29517216
tags question: http://stackoverflow.com/q/29512975
tags question: http://stackoverflow.com/q/29465911
tags question: http://stackoverflow.com/q/29421447
tags question: http://stackoverflow.com/q/29429361
tags question: http://stackoverflow.com/q/29420472
tags question: http://stackoverflow.com/q/29393377
tags question: http://stackoverflow.com/q/29511863
tags question: http://stackoverflow.com/q/29508035
tags question: http://stackoverflow.com/q/29466325
tag name: charts
tags question: http://stackoverflow.com/q/29418048
tags question: http://stackoverflow.com/q/29521627
tags question: http://stackoverflow.com/q/29501220
tags question: http://stackoverflow.com/q/29403036
tags question: http://stackoverflow.com/q/29486274
tags question: http://stackoverflow.com/q/29473074

http://stackoverflow.com/q/29411037
answer count: 2
tagged with: jquery
has title: Copy HTML data to another element using data-attributes
has answer: http://stackoverflow.com/a/29411211
possible better answer: http://stackoverflow.com/a/29411953
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: custom-data-attribute
type: Question
has answer: http://stackoverflow.com/a/29411953
has body: I'm currently working on building a webshop. Each product on the homepage is rendered automatically in a box using a "for" loop. I created a preview button on each product-box so visitors aren't send of the homepage when they want detailed information about a product. By clicking the preview button a popup should come up with the product name (and more information). Basically I want the dynamic text {{product.title}} be reproduced in the popup box of the corresponding product. What's the best way to manage this? Is this by using data-attributes? {% for product %} Quick View {{ product.title }} {% endfor %} {{ product.title }} // THIS IS WHERE THE AUTOMATED PRODUCT TITLE SHOULD BE DISPLAYED
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29411211
score: 0

http://stackoverflow.com/comment/46953792
type: Comment
comment on: http://stackoverflow.com/a/29386255
score: 0
type: AnswerComment
has text: I now have another problem, how do I get the IndexNo using the $_get method like: $IndexNo = $_GET['IndexNo']; as the URL is hidden? I want to use this to complete my query like: $sql = "SELECT * FROM student_information WHERE IndexNo='$IndexNo'";

http://stackoverflow.com/a/29572773
downvote count: 0
upvote count: 2
has body: So, I decided to go the path with silencing warnings in the base.js. For that I've investigated compiler sources (thanks to the authors it's open source) and I found out that flag description doesn't match its actual effect. The description says: A file containing warnings to suppress. Each line should be of the form &lt;file-name&gt;:&lt;line-number&gt;? &lt;warning-description&gt; But in fact this guard intercepts matching errors and converts them into warnings. Moreover, line numbers are completely ignored. I see no use of this flag with such behavior but I bet authors had a good reason to implement it this way. Anyways, I forked from the main branch and fixed flag's behavior. Now matched errors and warnings are actually suppressed (silenced). Line numbers are now considered in the matching. Syntax of the whitelist file is very similar to the error/warning output. For example if you get error (or warning) like this: ..\js\google\base.js:120: ERROR - could not determine the type of this expression if (goog.getObjectByName(namespace)) { ^ Then the relevant record in the whitelist file will be: ..\js\google\base.js:120 could not determine the type of this expression You may add content of multiline errors as comments preceding them with # but only first line will be used for matching. If this is what you need you may obtain the binary via one of the two ways: Get the patched sources and build the binary yourself: ihsoft/closure-compiler - Wiki Get the pre-built compiler binary: ihsoft/closure-compiler - Release v1.0-tuned
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29529993
accepted answer of: http://stackoverflow.com/q/29529993
type: AcceptedAnswer

http://stackoverflow.com/q/29463990
has comment: http://stackoverflow.com/comment/47091262
tagged with: datatable
has comment: http://stackoverflow.com/comment/47091071
answer count: 0
tagged with: twitter-bootstrap
tagged with: mysql
type: Question
has title: JQuery DataTable plugin not showing
tagged with: javascript
has comment: http://stackoverflow.com/comment/47091237
score: 0
has body: I have a bootstrap page with a table loaded from a MySQL db. The table shows but it doesn't show up with the desired format. The table is set up here. # Job Title Company Salary Location Date Posted <?php $result = mysqli_query($link,"Select * From Jobs"); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { ?> <?=$row['job_id']?> <?=$row['name']?> <?=$row['comp_name']?> <?=$row['pay']?> <?=$row['location']?> <?=$row['date_posted']?> <?php } ?> This is what i have in the header section The table displays data but the pagination setting in the table doesn't do anything when added. The Javascript I have to set up the table in the dataTable doesn't do anything either. I"m not sure what i'm missing. This is the source of the html table. The rest was omitted because this table has about 500 rows of data. Active Employment Listings # Job Title Company Salary Location Date Posted 1 VP Marketing Devify 22.38 222 Lillian Hill 2015-02-17 2 Administrative Skiba 10.92 3 Corscot Terrace 2015-02-03
has comment: http://stackoverflow.com/comment/47091693
tagged with: jquery
has comment: http://stackoverflow.com/comment/47091059
has comment: http://stackoverflow.com/comment/47091045
has comment: http://stackoverflow.com/comment/47091383
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47091551

http://stackoverflow.com/comment/47212160
type: QuestionComment
comment on: http://stackoverflow.com/q/29527450
has text: put the question up front, improved the wording, linkified jsfiddle
score: 0
type: Comment

http://stackoverflow.com/comment/47130073
type: AnswerComment
comment on: http://stackoverflow.com/a/29485225
score: 0
type: Comment
has text: tried above code but not working on first time key press

http://stackoverflow.com/a/29506188
type: Answer
answers question: http://stackoverflow.com/q/29505761
score: 0
has body: Use Jquery to handle the replacement instead: $(document).find('body').html(text);

http://stackoverflow.com/comment/47090725
type: QuestionComment
comment on: http://stackoverflow.com/q/29463275
score: 0
has text: Here is an example: http://jsfiddle.net/ys8oL94w/ Problem with that fiddle is, that I had to modify the 3rd party jquery code, which I can't modify in my real project.
type: Comment

http://stackoverflow.com/q/29438442
tagged with: polymer
tagged with: javascript
tagged with: web-component
has title: Polymer app-router problems
downvote count: 0
score: 1
favorite count: 0
type: UnansweredQuestion
has body: Hopefully somebody can help me better understanding using app-router with Polymer. I have the following files - index.html, app.html and updates.html. Everything is working as it should with the main layout appearing when I navigate to the root of the domain but nothing appears in the content area where I am trying to render the contents of the updates.html file using the app-router element. Any help is much appreciated index.html Example App app.html Example App updates.html UPDATES Updates appear here
answer count: 0
has comment: http://stackoverflow.com/comment/54704409
upvote count: 1
type: Question

http://stackoverflow.com/q/29528587
answer count: 1
downvote count: 1
has body: I am trying to start building node apps and having trouble with my instance. After working with require('http').get(...) for some time and having no success, I decided to try the example from the API docs as follows. var http=require('http') http.get("http://www.google.com/index.html", function(res) { console.log("Got response: " + res.statusCode); }).on('error', function(e) { console.log("Got error: " + e.message); }); http.get api, Nodejs.org and for every single time that I have tried I receive an error saying ECONNREFUSED More detailed error object below; Got error: { [Error: connect ECONNREFUSED] code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect' } ` I really don't know why this is and I get the same error message for every single host I try, even localhost/127.0.0.1, www.google.com, www.example.com uname -a Linux localhost 3.10.18 #1 SMP Fri Mar 20 20:43:59 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux node -v v0.6.12 npm -v 1.1.4
favorite count: 0
has answer: http://stackoverflow.com/a/29528716
type: UnansweredQuestion
tagged with: node.js
has title: Nodejs HTTP Request ERRCONNREFUSED
upvote count: 0
has comment: http://stackoverflow.com/comment/47211434
type: Question
has comment: http://stackoverflow.com/comment/47211439
tagged with: javascript
score: -1

http://stackoverflow.com/a/29482361
accepted answer of: http://stackoverflow.com/q/29482262
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29482262
score: 1
has body: You're using var ul = $('.lister ul') Go take a look where is your .lister and the child ul in your HTML I mean you probably want to target the needed DROPDOWN UL anchors using the right selector: $(".navbar.cf li ul li").on("click", "a", function(e){ e.preventDefault(); input.focus(); }); http://jsfiddle.net/jyrbepyz/5/
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/47196582
score: 0
has text: Spoke too soon, the problem with that answer is that its essentially a way of accomplishing a dynamic templateUrl, whereas I need to pull content from two templateUrl's one for the directive shell and another to transclude content within that shell... Though this may be a point in the right direction towards a solution
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29502837

http://stackoverflow.com/a/29529666
answers question: http://stackoverflow.com/q/29441004
accepted answer of: http://stackoverflow.com/q/29441004
has body: Open Thunderbird's error console and try to enter this: Components.classes['@mozilla.org/appshell/window-mediator;1']. getService(Components.interfaces.nsIWindowMediator). getMostRecentWindow("mail:3pane"). document.getElementById("tabmail"). switchToTab(0) For more details about tabmail see its sources - it pretty well commented - https://dxr.mozilla.org/comm-central/source/mail/base/content/tabmail.xml
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1

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

http://stackoverflow.com/q/29433079
upvote count: 0
answer count: 1
favorite count: 0
has title: how can we play youtube videos in dailymotion player new beta version
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29486565
downvote count: 1
tagged with: dailymotion-api
type: Question
has body: So far this is what I have: adding player js &lt;script src="http://api.dmcdn.net/all.js"&gt;&lt;/script&gt; &lt;script&gt; DM.init({ apiKey: 'my app key', status: true, // check login status cookie: true // enable cookies to allow the server to access the session }); // Append a div in the DOM, you may use a real &lt;div&gt; tag var div = document.createElement('div'); document.body.appendChild(div); var videos = 'xdn8vw'; // this is the video id from dailymotions site now i want to play the any youtube video var player = DM.player(div, {video: videos }); &lt;/script&gt; so i need the player to play this video 'https://youtu.be/hXI8RQYC36Q?list=PLFgquLnL59akA2PflFpeQG9L01VFg90wS'
tagged with: javascript
score: -1

http://stackoverflow.com/a/29388096
answers question: http://stackoverflow.com/q/29387737
score: -1
has body: You mean that display the value of variable on your browser? Just use this code: console.dir(t); And you can see the result on console panel.
has comment: http://stackoverflow.com/comment/46954162
downvote count: 1
type: Answer
upvote count: 0

http://stackoverflow.com/q/29528734
tagged with: jquery
has answer: http://stackoverflow.com/a/29529101
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29529101
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
downvote count: 0
type: Question
has title: how to reuse a form and jquery ajax call in multiple sections of a document?
score: 3
tagged with: javascript
upvote count: 3
answer count: 1
has body: I am working on jquery dialog email attachment. I created a separate form to upload file that uses formdata object. I want to reuse the form and its related ajax call in different dialogs in the same php page(reason: need email attachment functionality in other dialogs). How can i achieve this? Jquery Ajax call: $('#attchform').submit(function(event) { $.ajax({ url: 'uploadfile.php', type: 'POST', data: new FormData(this), processData: false, contentType: false, success: function(data) { document.getElementById("fileToUpload").disabled = true; $("#loadimg").html(data); } }); event.preventDefault(); }); Html form: &lt;form id="attchform" method="post" enctype="multipart/form-data"&gt; &lt;input type="file" name="fileToUpload" id="fileToUpload"&gt; &lt;input type="submit" value="Attach" name="submit"&gt; &lt;/form&gt; &lt;div id="loadimg"&gt;&lt;/div&gt;

http://stackoverflow.com/a/29483681
score: 0
has body: The argument being passed to the prepend method is resolved one before the method is called; i.e. '' + outlineCount++ + '. ' is resolved to: '0. ' which is then prepend to every element matching the CSS selector '.page-template-page-outline .entry-content > h2'. You would need to iterate over each element returned for your method to work, e.g. $('.page-template-page-outline .entry-content > h2').each(function ( index, element ) { element.prepend('' + ++outlineCount + '. '); });
type: Answer
answers question: http://stackoverflow.com/q/29483546

http://stackoverflow.com/q/29404641
tagged with: ios
tagged with: javascript
type: UnansweredQuestion
tagged with: objective-c
tagged with: uiwebview
has answer: http://stackoverflow.com/a/29405469
type: Question
has title: How to execute long javascript from stringByEvaluatingJavaScriptFromString: method in objective C?
score: 0
answer count: 1
has body: I wanted to get all the values that user's typed in the input field of a webpage. I tried this code: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { NSString *javaScript = @"var e = document.getElementsByTagName('input')for(var e in elements){if(e.type == 'text'){e.value}}"; NSString *html = [myWebView stringByEvaluatingJavaScriptFromString:javaScript]; NSLog(@"test of html: %@",html); return YES; } Seems like it's not working: If I know the id though: javaScript = @"document.getElementById('lst-ib').value"; NSString *html = [myWebView stringByEvaluatingJavaScriptFromString:javaScript]; It will work.

http://stackoverflow.com/q/29450253
tagged with: jquery
tagged with: ajax
possible better answer: http://stackoverflow.com/a/29450493
has body: I have been trying to post Array and Form data together but seems like I am getting JavaScript errors. When I tried to post Only array data without adding form data it works fine. I am having a Dropdown Select Box and few CheckBoxes. I wanted to post SelectBox data and CheckBox data together, so I had saved the CheckBox data's into array since it is a multi Select CheckBox. In the below code i need to resolve issue with this data: datasel+"&id="+$("#member_id").val(), //Error in this line only. To be Fixed!! Here is the Complete code PHP code to catch this data is if( isset( $_POST['selector'] ) ) { $id=$_POST['id']; $data=$_POST['selector']; for ( $i=0; $i < count( $data ); $i++ ) { //Some SQL query } } Any help would be appreciated. Thanks :)
favorite count: 0
accepted answer: http://stackoverflow.com/a/29450466
upvote count: 1
tagged with: php
type: AnsweredQuestion
score: 1
type: Question
answer count: 2
has title: Issue while posting Array and Form data together through jQuery Ajax
has answer: http://stackoverflow.com/a/29450466
has answer: http://stackoverflow.com/a/29450493
tagged with: arrays
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/29477550
has body: I use this script to retrieve new contents for a page each hour. (function worker() { $.ajax({ url: 'ajax/test.html', success: function(data) { $('.result').html(data); }, complete: function() { setTimeout(worker, 3600000); } }); })(); It loads the content every 60 minutes but what I really whant is to load the new contents at the beginning of each hour (i.e. at 8:00 and then again at 9:00). If I first load the page at the beginning of an hour my code is usefull but if I first load it during an hour (for example at 7:45) it reload contents at 8:45 and so on. How can I improve my code to say that the first time the reload should happen after 15 minutes and then at each hour? How do I change setTimeout function to achieve my goal? I have found a piece of code that can be close to my goal but I'm stucking my head on how to integrate it in my function: function refreshAt(hours, minutes, seconds) { var now = new Date(); var then = new Date(); if(now.getHours() &gt; hours || (now.getHours() == hours &amp;&amp; now.getMinutes() &gt; minutes) || now.getHours() == hours &amp;&amp; now.getMinutes() == minutes &amp;&amp; now.getSeconds() &gt;= seconds) { then.setDate(now.getDate() + 1); } then.setHours(hours); then.setMinutes(minutes); then.setSeconds(seconds); var timeout = (then.getTime() - now.getTime()); setTimeout(function() { window.location.reload(true); }, timeout); }
has answer: http://stackoverflow.com/a/29478088
has title: set timeout for the first execution
accepted answer: http://stackoverflow.com/a/29477871
has comment: http://stackoverflow.com/comment/47115999
has answer: http://stackoverflow.com/a/29477825
has answer: http://stackoverflow.com/a/29493131
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/47153038
has answer: http://stackoverflow.com/a/29477791
has answer: http://stackoverflow.com/a/29478012
score: 0
has answer: http://stackoverflow.com/a/29477871
has comment: http://stackoverflow.com/comment/47116109
tagged with: javascript
answer count: 6
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29478012

http://stackoverflow.com/a/29511574
type: Answer
has comment: http://stackoverflow.com/comment/47180605
upvote count: 4
has comment: http://stackoverflow.com/comment/47179650
accepted answer of: http://stackoverflow.com/q/29511435
has body: you should add a transition to your declaration. CSS Transitions allows property changes in CSS values to occur smoothly over a specified duration. For example; div { height: 30px; width: 30px; background: lightgray; position: relative; } div:before, div:after { content: ""; position: absolute; height: 100%; width: 0; border-left: 2px solid black; left: 50%; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%); transition: all 0.8s; } div:hover:before { -webkit-transform: translateX(-50%) rotate(45deg); -moz-transform: translateX(-50%) rotate(45deg); -ms-transform: translateX(-50%) rotate(45deg); transform: translateX(-50%) rotate(45deg); } div:hover:after { -webkit-transform: translateX(-50%) rotate(-45deg); -moz-transform: translateX(-50%) rotate(-45deg); -ms-transform: translateX(-50%) rotate(-45deg); transform: translateX(-50%) rotate(-45deg); } hover this gray box To add this instead of a 'hover' (i.e. make it clickable), you could use a class styling instead, and toggle this with javascript/jquery: $(document).ready(function() { $('div').click(function() { $('div').toggleClass("opened"); }); }); div { height: 30px; width: 30px; background: lightgray; position: relative; cursor: pointer; } div:before, div:after { content: ""; position: absolute; height: 100%; width: 0; border-left: 2px solid black; left: 50%; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%); transition: all 0.8s; } .opened:before { -webkit-transform: translateX(-50%) rotate(45deg); -moz-transform: translateX(-50%) rotate(45deg); -ms-transform: translateX(-50%) rotate(45deg); transform: translateX(-50%) rotate(45deg); } .opened:after { -webkit-transform: translateX(-50%) rotate(-45deg); -moz-transform: translateX(-50%) rotate(-45deg); -ms-transform: translateX(-50%) rotate(-45deg); transform: translateX(-50%) rotate(-45deg); } click thi…
answers question: http://stackoverflow.com/q/29511435
score: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/47076489
has text: What is the structure of the returned json?
type: Comment
comment on: http://stackoverflow.com/a/29451017
score: 0
type: AnswerComment

http://stackoverflow.com/comment/137772671
score: 1
comment on: http://stackoverflow.com/a/29425793
has text: @mplungjan, feel free to suggest an edit--the original answer was posted almost a decade ago
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29488281
has body: is this issue same here ? Remove header and footer from window.print() or you just didn't uncheck to not include header and footer on your browser ?
type: Answer
answers question: http://stackoverflow.com/q/29488131
upvote count: 1
has comment: http://stackoverflow.com/comment/47136098
has comment: http://stackoverflow.com/comment/47135828
downvote count: 0
score: 1

http://stackoverflow.com/q/29509899
tagged with: angularjs
tagged with: symfony
tagged with: requirejs
has title: RequireJS in symfony
possible better answer: http://stackoverflow.com/a/29510807
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29510807
answer count: 2
has answer: http://stackoverflow.com/a/29520324
upvote count: 1
accepted answer: http://stackoverflow.com/a/29520324
has body: i'm a new developer on symfony2 framework and i'm getting some difficulties in fact : i'm trying to integrate a full front open source application which is developed with AngularJS (angularjs-Quizzler). But when i'm integrating the project i didn't know where to put some files. for example : i got a JavaScript file which use other JavaScript files: head.js( { require : "./vendor/requirejs/require.js", size: "80196" }, { underscore : "./vendor/underscore/underscore.js", size: "43568" }, { angular : "./vendor/angular/angular.js", size: "551057" }, { ngRoute : "./vendor/angular-route/angular-route.js", size: "30052" }, { ngSanitize : "./vendor/angular-sanitize/angular-sanitize.js", size: "19990" } ) so i'm getting this in my browser console : http://localhost/RSS/web/vendor/underscore/underscore.js Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/RSS/web/vendor/requirejs/require.js Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/RSS/web/vendor/angular/angular.js Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/RSS/web/vendor/angular-sanitize/angular-sanitize.js Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/RSS/web/vendor/angular-route/angular-route.js Failed to load resource: the server responded with a status of 404 (Not Found) i've tried hearsay RequireJs Bundle but it seems complicated to use, there is probably a softer solution. thank you
favorite count: 0

http://stackoverflow.com/comment/47076858
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29448844
has text: I think this soln can be useable to simulate mouse click however would require a skilled JS dev (which I'm not) to automate user click http://www.objectpartners.com/2013/08/21/triggering-a-youtube-video-from-clicking-a-button-image-and-replacing-when-ended/#comment-10255
type: Comment

http://stackoverflow.com/q/29514382
has title: Global functions in javascript
has answer: http://stackoverflow.com/a/29514683
has answer: http://stackoverflow.com/a/69856625
score: 31
has comment: http://stackoverflow.com/comment/47184338
has comment: http://stackoverflow.com/comment/47184805
type: Question
has answer: http://stackoverflow.com/a/29514545
has comment: http://stackoverflow.com/comment/47184369
has body: I'm new to js and trying to understand global and private functions. I understand global and local variables. But if I have an html named test.html and a 2 js files named test1.js and test2.js. Now I include the test1.js and test2.js in test.html and call the functions written in test2.js inside test1.js and test.html. The functions that I have written in test2.js are in this form function abc(){...} function pqr(){...} etc. are these above functions global? If they are , how can I not make them global and still access them in test1.js and test.html? As I have read global functions or global variables are bad right?
tagged with: function
has answer: http://stackoverflow.com/a/44717183
tagged with: javascript
has answer: http://stackoverflow.com/a/64837355
upvote count: 31
answer count: 7
has comment: http://stackoverflow.com/comment/47184516
linked to: http://stackoverflow.com/q/17776940
has answer: http://stackoverflow.com/a/59027086
tagged with: global
favorite count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/47184437
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47184359
linked to: http://stackoverflow.com/q/762011
has answer: http://stackoverflow.com/a/29514841

http://stackoverflow.com/a/29516577
accepted answer of: http://stackoverflow.com/q/29516472
has comment: http://stackoverflow.com/comment/47188740
answers question: http://stackoverflow.com/q/29516472
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: There are no regular expressions here, you're using the 'attribute starts with' selector. That said, the issue you're getting is because the selector will select a group of elements, not a singular one as your original code did. Because of that, you need to loop over them. Try this: $("[id^='id_title']").each(function() { var lang = this.id.split('_').pop(); if ($.trim($(this).val())) { $('#tab_id_title_' + lang).css('background', 'green').css('color', 'yellow'); } }); Example fiddle
upvote count: 1
score: 1

http://stackoverflow.com/comment/46949699
score: 0
comment on: http://stackoverflow.com/q/29385718
type: Comment
type: QuestionComment
has text: You cannot read dics content by JavaScript, JavaScript is browser only, unless you are using some kind of nodeJS, but that will work as a Backend app. Cookies are the only exeption to this rule. Or you could doenload file content via Ajax... but that has little sence.

http://stackoverflow.com/comment/47181935
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29513030
score: 0
has text: You shouldn't need to parse the JSON data as jQuery will do that automatially. Try `data = data.response` instead and see what happens. Perhaps add `dataType: 'JSON'` as an option if it complains.

http://stackoverflow.com/a/29474297
score: 2
answers question: http://stackoverflow.com/q/29473605
upvote count: 3
has comment: http://stackoverflow.com/comment/47110281
has comment: http://stackoverflow.com/comment/47109898
type: Answer
has body: Here is a much better way to trigger a click on keypress. $(window).keydown(function (e) { if ( e.which === 50 ) { $("#myButton").click(); } }); Demo: http://jsfiddle.net/bc7r3vq1/1/ By the way, keycode 50 is the number 2
has comment: http://stackoverflow.com/comment/47110686
downvote count: 1

http://stackoverflow.com/q/29461017
has comment: http://stackoverflow.com/comment/47085896
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29461085
score: -4
upvote count: 1
has comment: http://stackoverflow.com/comment/47085849
type: Question
has answer: http://stackoverflow.com/a/29461088
downvote count: 5
has title: Why is my While loop not working?
possible better answer: http://stackoverflow.com/a/29461088
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/47085828
favorite count: 0
has body: I'm trying to make a game that gives you the chance to critical hit , normal hit or hit something. Now I think it has to do with the variable within the if/else. This is my code: var chance = parseInt(Math.random() * 10); var hpDummy = 10; while ( hpDummy &gt;=1) { if(chance &gt;= 5 &amp;&amp; chance &lt;7) { alert("You throw a punch at the dummy! You graze it's nose dealing 1 damage"); var hpDummy = hpDummy -1; } else if (chance &gt;=7) { alert("You throw a punch at the dummy! You directly hit its jaw dealing 2 damage ! AMAZING shot ! "); var hpDummy = hpDummy -2; } else { alert("You completely miss the dummy almost hitting Welt !"); var hpDummy = hpDummy -0; } }
has comment: http://stackoverflow.com/comment/47085846
has answer: http://stackoverflow.com/a/29461085

http://stackoverflow.com/q/29500300
has title: Bootstrap collapse button not working on android
score: 0
linked to: http://stackoverflow.com/q/17178606
answer count: 1
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: android
has body: I have been trying to look aroung for a solution to this problem. My web page works great on the desktop, but when I load the file onto my phone for testing the collapse button doesn't funtion. The phone knows that it is a button, but the information behind the button doesn't shoe. Here is the code for the button. Toggle navigation I am using the most recent version of bootstrap. Any thoughts? Thanks for the help.
has answer: http://stackoverflow.com/a/29500593
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/47196565
score: 0
type: Comment
type: QuestionComment
has text: @ Jon P, when I test using $("#Form-Submit").submit() I'm still not getting anything, also when I use the console.log for $("#Form-Submit").serialize() all I end up getting is "LOG: ". I also Edited question to show full index.asp.
comment on: http://stackoverflow.com/q/29502494

http://stackoverflow.com/q/29442866
has comment: http://stackoverflow.com/comment/47055063
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29443048
answer count: 2
has comment: http://stackoverflow.com/comment/47054738
has title: Inserting img in a div using another div's background image as a src in JS
upvote count: 0
favorite count: 0
has body: there. How can I change my JS code in order to have only one image in my hidden_div? Here is my code. Best regards.
possible better answer: http://stackoverflow.com/a/29442966
accepted answer: http://stackoverflow.com/a/29443048
has answer: http://stackoverflow.com/a/29442966
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47054122
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47055161

http://stackoverflow.com/comment/46944566
comment on: http://stackoverflow.com/a/29382372
type: Comment
has text: I see, thank you, I can't believe I did not think of doing that to be honest.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47134493
type: Comment
has text: good, I also tried variant like this, so I'll stop on it, thank you
score: 0
comment on: http://stackoverflow.com/a/29487590
type: AnswerComment

http://stackoverflow.com/comment/46964579
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29393922
has text: I would like to create my own filter. here i tried to create a `capitalize`, which will capitalize the first letter alone

http://stackoverflow.com/comment/47098348
comment on: http://stackoverflow.com/q/29467990
type: Comment
has text: Yup, indeed it should. Strangely, when I print the source as above, nothing has changed.
type: QuestionComment
score: 0

http://stackoverflow.com/a/29475662
accepted answer of: http://stackoverflow.com/q/29473426
has comment: http://stackoverflow.com/comment/62617385
has comment: http://stackoverflow.com/comment/52772143
answers question: http://stackoverflow.com/q/29473426
type: Answer
has comment: http://stackoverflow.com/comment/111817711
has comment: http://stackoverflow.com/comment/47145768
has comment: http://stackoverflow.com/comment/47140524
score: 104
has comment: http://stackoverflow.com/comment/47132956
has comment: http://stackoverflow.com/comment/111817459
has comment: http://stackoverflow.com/comment/62631263
upvote count: 104
has comment: http://stackoverflow.com/comment/52762465
has comment: http://stackoverflow.com/comment/47137062
type: AcceptedAnswer
downvote count: 0
has body: // This does not work, since the Promise returned by `json()` is never fulfilled return Promise.reject(resp.json()); Well, the resp.json promise will be fulfilled, only Promise.reject doesn't wait for it and immediately rejects with a promise. I'll assume that you rather want to do the following: fetch(url).then((resp) =&gt; { let json = resp.json(); // there's always a body if (resp.status &gt;= 200 &amp;&amp; resp.status &lt; 300) { return json; } else { return json.then(Promise.reject.bind(Promise)); } }) (or, written explicitly) return json.then(err =&gt; {throw err;});

http://stackoverflow.com/a/29436480
type: Answer
answers question: http://stackoverflow.com/q/29435827
score: 0
has body: You use EL document.getElementById("${user.name}"); It write in you HTML render document.getElementById("demo"); ... ... ... ... &lt;form:input type="textarea" id="demo" .../&gt;

http://stackoverflow.com/comment/47204901
has text: `setTimeout` is not a jQuery function. Also, you can write that as `setTimeout($(".hidden").hide, 2000)`
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29483946
type: AnswerComment

http://stackoverflow.com/a/29450080
has comment: http://stackoverflow.com/comment/47076109
accepted answer of: http://stackoverflow.com/q/29447715
has body: Off the top of my head you could do this with a ScrollView. Your top-level container could be a flex container, inside that have a ScrollView at the top and your footer at the bottom. Then inside the ScrollView just put the rest of your app as normal.
downvote count: 1
score: 236
has comment: http://stackoverflow.com/comment/113129025
has comment: http://stackoverflow.com/comment/97058342
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29447715
upvote count: 237
type: Answer

http://stackoverflow.com/comment/47004974
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29415595
type: AnswerComment
has text: Yeah it is pretty cool as well! but what form should I insert in it? Does HTML form support email sending as well? I thought it was for login and password stuff only..

http://stackoverflow.com/a/29439825
answers question: http://stackoverflow.com/q/29439739
has body: Javascript uses $&amp; as the placeholder for the entire match, not $0 $number is only used as the placeholder for capture groups in parentheses. See MDN. var re = /Ticket-([0-9]*?(?=-)-[0-9]*)/; var str = 'ASD Ticket-492-367 - Make my day.'; t = str.replace(re,'&lt;a href="http://myworld/ticket/$1"&gt;$&amp;&lt;/a&gt;') document.getElementById('result').innerHTML = t; &lt;div id="result"&gt;&lt;/div&gt;
accepted answer of: http://stackoverflow.com/q/29439739
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47048309
has comment: http://stackoverflow.com/comment/47048624
upvote count: 5
type: Answer
downvote count: 0
score: 5
has comment: http://stackoverflow.com/comment/47048351

http://stackoverflow.com/comment/47179282
type: QuestionComment
comment on: http://stackoverflow.com/q/29511561
score: 0
has text: http://pastebin.com/QAjPVSfd
type: Comment

http://stackoverflow.com/a/29376779
has comment: http://stackoverflow.com/comment/46934268
has comment: http://stackoverflow.com/comment/46934222
answers question: http://stackoverflow.com/q/29375944
has comment: http://stackoverflow.com/comment/46934237
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46934799
has comment: http://stackoverflow.com/comment/46934145
accepted answer of: http://stackoverflow.com/q/29375944
has comment: http://stackoverflow.com/comment/46934214
has body: html: Search! viewmodel (approx): var viewmodel = function() { var page = ko.observable(); var selectPage = function() { // just use page() here instead of passing it as a parameter }; return { page: page, selectPage: selectPage } }
type: AcceptedAnswer

http://stackoverflow.com/comment/47146958
has text: I'm not sure whether Greasemonkey can make local log files; I'm familiar with it but only a little.
comment on: http://stackoverflow.com/q/29493485
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/29464463
answers question: http://stackoverflow.com/q/29434642
has body: Put before like this: bootstrap.min.js requires jquery.min.js to run first before it.
score: 0
type: Answer

http://stackoverflow.com/a/29412809
has comment: http://stackoverflow.com/comment/47000919
has comment: http://stackoverflow.com/comment/46998718
answers question: http://stackoverflow.com/q/29412646
has body: You can first get the div wrapper with id=test and then load the first child element inside that wrapper with the code below and then you can add the class 'red' to that element/button. var wrapper = document.getElementById("test"); var firstButton = wrapper.childNodes[1]; // if the button doesn't have a red class, set it if(firstButton.className.indexOf('red') == -1) { firstButton.className = firstButton.className + ' red'; } or go with the query selector var firstButton = document.querySelector('#test button:first-child'); if(firstButton &amp;&amp; firstButton.className.indexOf('red') == -1) { firstButton.className = firstButton.className + ' red'; }
type: Answer
accepted answer of: http://stackoverflow.com/q/29412646
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/a/29470755
score: 0
type: Answer
has body: This is a quite complex problem to solve in JS/jQuery alone. I suggest taking a look at the CSS implementation of position: sticky, however, it’s not something that is widely supported by browsers. (But in my experience it’s the best technique to solve this. And it works on iOS, which is a big plus.) Here’s information about browser support: http://caniuse.com/#feat=css-sticky And here’s a polyfill for the other browsers: https://github.com/filamentgroup/fixed-sticky (with demos) Update: Here’s a proof of concept (works in Firefox and Safari): http://jsfiddle.net/2s1w6cbL/2/
has comment: http://stackoverflow.com/comment/47104482
has comment: http://stackoverflow.com/comment/47104592
answers question: http://stackoverflow.com/q/29467515

http://stackoverflow.com/comment/47009905
has text: I feel like it might be a driver issue. However, the only download on the ASUS support page is their "ASUS Sync" application. I have installed that and it works. http://support.asus.com/download.aspx?SLanguage=en&m=ASUS+Transformer+Pad+TF300T&os=8
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29418970

http://stackoverflow.com/a/31584332
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/29422118
downvote count: 0
has body: You made a scene, created a camera and created a renderer, but you're missing two important things: adding something to render, and actually rendering it. After your last line, add var cube = new THREE.Mesh( new THREE.CubeGeometry( 1,1,1 ), new THREE.MeshNormalMaterial() ); scene.add( cube ); camera.position.set( 2,2,2 ); camera.lookAt( cube.position ); renderer.render( scene, camera ); That will create a cube on the origin ( 0,0,0 ), with size 1 unit; place the camera a bit away from it and pointed at the cube; and then call the renderer to render the cube.
type: Answer

http://stackoverflow.com/a/29487523
answers question: http://stackoverflow.com/q/29485061
has body: I have found this answer from the stackoverflow while I was facing same issue. bootstrap() will call the AngularJS compiler for you, just like ng-app. // Make module Foo and store $controllerProvider in a global var controllerProvider = null; angular.module('Foo', [], function($controllerProvider) { controllerProvider = $controllerProvider; }); // Bootstrap Foo angular.bootstrap($('body'), ['Foo']); // .. time passes .. // Load javascript file with Ctrl controller angular.module('Foo').controller('Ctrl', function($scope, $rootScope) { $scope.msg = "It works! rootScope is " + $rootScope.$id + ", should be " + $('body').scope().$id; }); // Load html file with content that uses Ctrl controller $('&lt;div id="ctrl" ng-controller="Ctrl" ng-bind="msg"&gt;').appendTo('body'); // Register Ctrl controller manually // If you can reference the controller function directly, just run: // $controllerProvider.register(controllerName, controllerFunction); // Note: I haven't found a way to get $controllerProvider at this stage // so I keep a reference from when I ran my module config function registerController(moduleName, controllerName) { // Here I cannot get the controller function directly so I // need to loop through the module's _invokeQueue to get it var queue = angular.module(moduleName)._invokeQueue; for(var i=0;i&lt;queue.length;i++) { var call = queue[i]; if(call[0] == "$controllerProvider" &amp;&amp; call[1] == "register" &amp;&amp; call[2][0] == controllerName) { controllerProvider.register(controllerName, call[2][1]); } } } registerController("Foo", "Ctrl"); // compile the new element $('body').injector().invoke(function($compile, $rootScope) { $compile($('#ctrl'))($rootScope); $rootScope.$apply(); }); Hope it will help you
score: 0
type: Answer

http://stackoverflow.com/q/29440820
has body: I am creating an audio bar visualizer with the Web API and I want the bars to only show ~ 40Hz to ~10kHz. The only thing I found was the frequency domain but that doesn't provide me with what I'm looking for (AnalyserNode.fftSize). Is there a way to only visualize that frequency? Here's my code: .controller('PlayerCtrl', function(PlayerService, $scope){ $scope.title = PlayerService.songName; $scope.art = PlayerService.songArt; $scope.url = PlayerService.songUrl + '?client_id=54970813fe2081a104a874f0f870bcfe'; if (! window.AudioContext) { if (! window.webkitAudioContext) { alert('no audiocontext found, update your browser yo'); } window.AudioContext = window.webkitAudioContext; } var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var analyser = audioCtx.createAnalyser(); analyser.minDecibels = -60; analyser.maxDecibels = 0; analyser.smoothingTimeConstant = 0.85; var audioBuffer; var sourceNode; var javascriptNode; var canvas = document.querySelector('.visualizer'); var canvasCtx = canvas.getContext("2d"); var intendedWidth = document.querySelector('.now-playing').clientWidth; canvas.setAttribute('width',intendedWidth); var visualSelect = document.getElementById("visual"); var drawVisual; setupAudioNodes(); loadSound($scope.url); //music file function loadSound(url) { var request = new XMLHttpRequest(); request.open('GET', url, true); request.responseType = 'arraybuffer'; request.onload = function() { audioCtx.decodeAudioData(request.response, function(buffer) { playSound(buffer); }, function(error){ console.log(error) }); }; request.send(); } function playSound(buffer) { sourceNode.buffer = buffer; sourceNode.start(0); $(".content").show(); $("#hue").hide(); } function setupAudioNodes() { console.log('audio nodes') javascriptNode = audioCtx.createScriptProcessor(2048, 1, 1); javascriptNode.connect(audioCtx.destination); sourceNode = audioCtx.createBufferSource(); sourceNode.connect(analyser); analyser.connect(javascriptNode); sourceNode.connect(…
type: Question
has title: Frequency Cutoff Using AnalyserNode
tagged with: javascript
tagged with: webkit
answer count: 3
tagged with: webkitaudiocontext
downvote count: 0
tagged with: web-audio-api
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: audiocontext
has answer: http://stackoverflow.com/a/64156960
has answer: http://stackoverflow.com/a/29448755
score: 2
has answer: http://stackoverflow.com/a/64865716

inject
tags question: http://stackoverflow.com/q/29500646
tag name: inject
tags question: http://stackoverflow.com/q/29452548
type: Tag

http://stackoverflow.com/q/29429482
has answer: http://stackoverflow.com/a/29454694
has body: I created a dropdown inside a column of angularJS UI grid. Infact I took the same example as there in UI grid tutorial.ref:http://ui-grid.info/docs/#/tutorial/201_editable . Here I modified to apply my own template(partial.html) for editableCelltemplate . When I change the drop down value, it's not captured. app.js http://plnkr.co/edit/UMsOeeETHxbMMdZQry90?p=preview var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit', 'addressFormatter']); angular.module('addressFormatter', []).filter('address', function () { return function (input) { return input.street + ', ' + input.city + ', ' + input.state + ', ' + input.zip; }; }); app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { $scope.gridOptions = { }; $scope.editDropdownOptionsArrayValue = [{id:1, gender:'male'}, {id:1, gender:'male'} ]; $scope.gridOptions.columnDefs = [ { name: 'id', enableCellEdit: false, width: '10%' }, { name: 'name', displayName: 'Name (editable)', width: '20%' }, { name: 'age', displayName: 'Age' , type: 'number', width: '10%' }, { name: 'gender', displayName: 'Gender', editableCellTemplate: 'partial.html', width: '20%', cellFilter: 'mapGender', editDropdownValueLabel: 'gender', editDropdownOptionsArray: $scope.editDropdownOptionsArrayValue}, { name: 'registered', displayName: 'Registered' , type: 'date', cellFilter: 'date:"yyyy-MM-dd"', width: '20%' }, { name: 'address', displayName: 'Address', type: 'object', cellFilter: 'address', width: '30%' }, { name: 'address.city', displayName: 'Address (even rows editable)', width: '20%', cellEditableCondition: function($scope){ return $scope.rowRenderIndex%2 } }, { name: 'isActive', displayName: 'Active', type: 'boolean', width: '10%' }, { name: 'pet', displayName: 'Pet', width: '20%', editableCellTemplate: 'ui-grid/dropdownEditor', editDropdownRowEntityOptionsArrayPath: 'foo.bar[0].options', editDropdownIdLabel: 'value' } ]; $scope.msg = {}; $scope.gridOptions.onRegisterApi = function(gridApi){ //set gridApi on sc…
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
tagged with: angularjs
favorite count: 0
score: 2
tagged with: angular-ui-grid
has title: select dropdown in angularjs UI grid column not working for external editcellTemplate
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/47013133
type: AnswerComment
type: Comment
has text: I am linking jquery. I have other things on that page that require jquery, and those work. It's not the jquery.
comment on: http://stackoverflow.com/a/29419819
score: 0

http://stackoverflow.com/a/29472551
answers question: http://stackoverflow.com/q/29472243
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47194133
has body: One way is with an extra, deep watch (don't know CS, code will be in JS): $scope.$watch( function() { return { var1: $scope.var1, var2: $scope.var2, var3: $scope.var3, var4: $scope.var4 }; }, function(newval) { callEvent(); }, true // deep watch ); Note that again the event will be fired once per digest cycle! Another way would be to use a flag - it will need to be reset with a timeout (ugly): var flag = false; $scope.$watch('var1', function(newval) { // Do something callEventOnce(); }); // same for var2, 3, 4 function callEventOnce() { if( !flag ) { flag = true; $timeout(function() { flag = false; }); callEvent(); } } One way to escape the ugliness of the timeout is to make the controller listen to the event and then reset the flag. E.g., if the callEvent() is implemented as: // HYPOTHETICAL IMPLEMENTATION OF callEvent() function callEvent() { $rootScope.$broadcast('my_event'); } Add this to the controller: $scope.$on('my_event', function() { flag = false; });
type: Answer
has comment: http://stackoverflow.com/comment/47192559
score: 1

http://stackoverflow.com/comment/47051303
type: Comment
comment on: http://stackoverflow.com/a/29441219
score: 0
type: AnswerComment
has text: No argument there. No problem though. It's becomes helpful when working with a large scale application.

http://stackoverflow.com/q/29391727
has answer: http://stackoverflow.com/a/29410756
tagged with: javascript
has answer: http://stackoverflow.com/a/29424424
tagged with: struts2
has body: I have the following codes in a jsp page in my Struts2 project <s:iterator value="rateCardDetailsList" status="listStatusAmount"> <option value="<s:property value='#listStatusAmount.index'/>"><s:property value="rechargeAmount"/> </s:iterator> and a corresponding script for this $(document).ready(function() { $("#amountSelect").change(function(){ var v= $("#amountSelect").val(); var r= "<s:property value='rateCardDetailsList["+ v +"].mobileRate'/>"; alert(r); }); }); where rateCardDetailsList is an array of a particular bean(Object) which contain the variable mobileRate. But I'm getting null at the position of r whil alerting (alert(r);). On inspecting the element it was as following $(document).ready(function() { $("#amountSelect").change(function(){ var v= $("#amountSelect").val(); var r= ""; alert(r); }); }); Instead of the variable v if I direcly give the index I'm getting the value i.e var r= "<s:property value='rateCardDetailsList[1].mobileRate'/>"; alert(r); does gives a value in the alert. What coud be the reason?
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/46961758
tagged with: jsp
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29410756
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/29424424
has title: javascript not working on struts html tag
type: Question

http://stackoverflow.com/a/29467182
has body: If you want a general approach to matching against a list of regular expressions then some version of Avinash Raj's answer will work. Based on the fact that you are specifying certain domains, you might want to match any valid email address using the regex here, and if it matches then check if the domain is a preferred one. There are a number of different ways you could do that of course. Here's just a simple example, splitting on the @ and using jQuery.inArray() to check if the domain is preferred. var preferredDomains = ["gmail.com", "yahoo.com", "live.com"]; function isValid(inputVal) { var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; return re.test(inputVal) &amp;&amp; $.inArray(inputVal.split('@')[1], preferredDomains) &gt; -1; } The advantage here is that the underlying regex doesn't change, just the much easier to read/maintain list of domains. You could tweak this to capture the domain in a group, instead of using split().
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29466887
downvote count: 0

http://stackoverflow.com/comment/47025957
type: Comment
comment on: http://stackoverflow.com/q/29427695
has text: ` `
score: 0
type: QuestionComment

http://stackoverflow.com/q/29518544
has comment: http://stackoverflow.com/comment/47192204
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29518777
tagged with: line-breaks
has body: I have a question: I have a QR Code Scanner which gets a VCard. Im getting back the following String: BEGIN:VCARD VERSION:2.1 FN:John Doe N:doe;john END:VCARD The problem is the following: When putting this Information (via Javascript) in a textarea or just dump it to an alert winow, the information has breaks in between, looking like this: BEGIN:VCARD VERSION:2.1 FN:John Doe . . . But when putting this information into a paragraph (&lt;p&gt;&lt;/p&gt;), it has no breaks in it and it's just a plain string. The question is now, can I put those breaks into the paragraph as well or can I insert another sign or anything else in between the attributes? I thought about just splitting the string on blanks, but it's not working because e.g. FN itself contains blanks as wel... Thanks for your help. Edit: Unfortunatelly, all 3 advices don't work.. What I have now is the following: function writeqrcodecontent(){ var textfeld = document.getElementById("inhaltvonqrcode"); var wert = $.scriptcam.getBarCode(); //wert.split('\n').join('&lt;br/&gt;'); //wert.replace("\n", "&lt;br&gt;"); //wert.replace(/\n/g,'&lt;br&gt;'); textfeld.innerHTML = wert; textfeld.style.display="block"; } But as said, all three commented out lines do not work, everything is still displayed in one line. The paragraph is defined with: &lt;p id="inhaltvonqrcode" style="display:none; clear:both;"&gt;&lt;/p I understand your ideas but I don't understand why it's not working... By the way, what I also tried is something like wert.split('\n').join('#'); to see, if it's really the break or it's just not working, but this doesn't work as well, so the text just seems to have no \n in it.. EDIT 2 It's working now, I neeeded to do both steps in one step, so not var wert = $.scriptcam.getBarCode(); wert.split('\n').join('&lt;br/&gt;'); but var wert = ($.scriptcam.getBarCode()).split('\n').join('&lt;br/&gt;'); Thanks for your help!
has title: Javascript - break in textarea but not in paragraph
upvote count: 1
has answer: http://stackoverflow.com/a/29518634
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29519409
tagged with: qr-code
tagged with: javascript
tagged with: vcf-vcard
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/14217101
has comment: http://stackoverflow.com/comment/47192525
favorite count: 0

http://stackoverflow.com/q/29403919
score: 6
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/29403953
has comment: http://stackoverflow.com/comment/46984511
linked to: http://stackoverflow.com/q/8698726
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29403953
answer count: 1
downvote count: 0
favorite count: 0
has title: Two ways of constructing an object in Javascript
has body: function Person(age,name){ this.name = name; this.age = age; this.speak = function(){...} } function Person(age,name){ var p = {} p.name = name; p.age = age; p.speak = function(){...} return p; } The only difference I see is that using the first one you must call with new to let the language know its constructing a new object, is it essentially just constructing an object where 'this' refers to the new object being created?? i.e same as doing this. { age: 12, name: "mark", speak: function(){...} } where as the second returns an object so you can just write Person(12,"mark") instead of new Person(12,"mark") So I guess my question is, is there anything wrong with using the second version and are the differences I stated correct and are they the only differences between the two?
tagged with: constructor
has comment: http://stackoverflow.com/comment/46985057
upvote count: 6
type: AnsweredQuestion

http://stackoverflow.com/comment/47081637
comment on: http://stackoverflow.com/a/29458201
score: 0
type: AnswerComment
has text: @RedderLopez, it is obvious that you are not debuging or looking at right thing to fix, instead of looking into graph, see if that value is set or not!
type: Comment

http://stackoverflow.com/a/29385066
downvote count: 0
has comment: http://stackoverflow.com/comment/46948404
has body: You can rather use .closest() for traversing to closest tr parent. IF tr elements are not siblings of each other: pass that object to method .index() on tr collection: $('tr').index($(this).closest('tr')); IF tr elements are siblings of each other: $(this).closest("tr").index()
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46948373
type: Answer
answers question: http://stackoverflow.com/q/29385054
score: 2
accepted answer of: http://stackoverflow.com/q/29385054

http://stackoverflow.com/q/29504606
upvote count: 1
has comment: http://stackoverflow.com/comment/47166747
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/30064546
has comment: http://stackoverflow.com/comment/47166960
score: 1
has body: Is it possible to check the function call stack when running a JavaScript app remotely? (Not using a browser/Google developer tools). For example, I'd like to check the function call stack of the app run on a TV or a Mobile/Tablet device. I currently use jsconsole.com to look at console logs remotely. Is there a library that I could add to my JavaScript app to monitor the call stack? Thank you
type: Question
has comment: http://stackoverflow.com/comment/47166652
tagged with: javascript
accepted answer: http://stackoverflow.com/a/30064546
has title: How to check function call stack of JavaScript app remotely?
linked to: http://stackoverflow.com/q/12944290
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47167018
tagged with: remote-debugging

http://stackoverflow.com/comment/47003555
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29415598
has text: There is jquery ui accordion for this purpose [link](https://jqueryui.com/accordion/)
type: Comment

http://stackoverflow.com/a/29416036
upvote count: 1
has comment: http://stackoverflow.com/comment/47004596
has body: The second background declaration will overwrite the first. What you're looking for is background-image and background-color.
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47004562
has comment: http://stackoverflow.com/comment/47004638
answers question: http://stackoverflow.com/q/29415950
has comment: http://stackoverflow.com/comment/47004380

http://stackoverflow.com/q/29443901
type: Question
answer count: 1
tagged with: javascript
has body: I'm porting iOS PhoneGap project to android. However, ng-click event in OnsenUI does not fire on Android simulator. Here is an example code. module.controller('LCtrl', function($scope) { $scope.login = function() { // doesn't work!!! // some process... }; ons.ready(function() { // works }); }); And also, sliding-menu on OnsenUI doesn't work. I have no idea to solve these problems. If you have any idea, please tell me how to solve them. Thanks.
tagged with: onsen-ui
score: 0
tagged with: android
has comment: http://stackoverflow.com/comment/47092222
tagged with: cordova
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29599734
has title: ng-click event in OnsenUI does not fire on Android simulator

http://stackoverflow.com/comment/47042276
type: AnswerComment
comment on: http://stackoverflow.com/a/29435748
type: Comment
score: 1
has text: Thanks for taking the time to post this! Really helpful!

http://stackoverflow.com/a/29381333
answers question: http://stackoverflow.com/q/29381262
has comment: http://stackoverflow.com/comment/46942221
has body: You're missing a closing brace } before your second else if statement, and you have an extra one near the end of your code. Fixed code : 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 { return "paper wins"; } } else if(choice1 === "paper") { if (choice2 === "rock") { return "paper wins"; } else { return "scissors wins"; } } }
score: 0
type: Answer

http://stackoverflow.com/comment/47011613
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29409102
has text: And the pattern attribute is still bound to the element even even when it evaluates to false.

http://stackoverflow.com/q/29473716
type: Question
has title: X-Editable _POST method
score: 0
upvote count: 1
downvote count: 1
has body: I'm using X-Editable and I want to pass a simple value to other page using the _post method and I receive this error: Notice: Undefined index: first_name in ... Here my code: this is a simple html page that have this code: BILL GATES Here my javascript code: $(document).ready(function() { //toggle `popup` / `inline` mode $.fn.editable.defaults.mode = 'popup'; //-------------------------------------------------------------------------------------------- //First Name $('#first_name').editable({ validate: function(value) { //Not Empty if($.trim(value) == '') return 'The First Name is required'; //More than 3 and less than 20 if($.trim(value.length) <4) return 'The First Name must be more than 3 and less than 20 characters'; //Less than 20 if($.trim(value.length) >20) return 'The First Name must be more than 3 and less than 20 characters'; } }); And here I want to capture the value in the php code: $first_name = $_POST['first_name']; echo $first_name." "; and I receive this: Notice: Undefined index: first_name in ... Please any advice or suggestion? Regards...
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/29942130
tagged with: twitter-bootstrap-3
type: UnansweredQuestion

http://stackoverflow.com/q/29402351
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29402578
type: UnansweredQuestion
has title: Underscore each to update collection
has body: Trying to update below collections using underscore but the last win (READ_ONLY become false) overwrite all the previous updates. Any idea how to fix it please? _.each(availabilities, function(availability, availIndex) { _.each(availability.POINTS, function(point, availPointIndex) { if(availIndex == 0) { point.READ_ONLY = true; } else { point.READ_ONLY = false; } }); });
tagged with: underscore.js
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46980345

http://stackoverflow.com/comment/46972309
score: 0
has text: @Maximus Empirically, it appears that [yes, that is the case](https://jsfiddle.net/1ccucyhj/1/), but I don't know if there's anything official on that. Promises/A+ guarantees that [`.then` callbacks are called in the order they were registered](http://stackoverflow.com/questions/16550356/q-promise-are-callbacks-invoked-in-the-same-order-as-registered), and one could presume that this would extend to `$q.all()`, but again, I don't know of anything official.
type: AnswerComment
comment on: http://stackoverflow.com/a/29395983
type: Comment

http://stackoverflow.com/a/29490189
score: 2
has comment: http://stackoverflow.com/comment/47144962
answers question: http://stackoverflow.com/q/29490077
has comment: http://stackoverflow.com/comment/47139730
downvote count: 0
has body: Try this: window.onbeforeunload = function() { $('body').mousemove(function() { $('body').unbind("mousemove"); ajaxCall(); }); return "Are you sure? All work will lost! Cancel to upload the work"; };
type: Answer
has comment: http://stackoverflow.com/comment/47139401
upvote count: 2

http://stackoverflow.com/comment/46950298
comment on: http://stackoverflow.com/a/29385884
score: 0
type: AnswerComment
has text: @Konrad Your code is fine, but in your fiddle you are linking the js "on load", meaning your function is defined after the DOM creation. There is an option in that dropdown to place the js in the head section (which is what Ramkumar has done).
type: Comment

http://stackoverflow.com/a/29483614
upvote count: 5
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29482489
has body: HTML pages used as part of Google Chrome extensions always have a Content Security Policy set which prohibits inline scripts, both in attributes (e.g. onclick) and inline &lt;script&gt; tags. You will need to define these scripts in a separate Javascript file and bind event handlers in that script, e.g. &lt;script src="nosidebar.js"&gt;&lt;/script&gt; and in that file: function enableBtn() { ... } function disableBtn() { ... } document.getElementById("btn1").addEventListener("click", enableBtn); document.getElementById("btn2").addEventListener("click", disableBtn); For more information on Content Security Policy and how it relates to Chrome extensions, please refer to: https://developer.chrome.com/extensions/contentSecurityPolicy
answers question: http://stackoverflow.com/q/29482489
score: 5
type: AcceptedAnswer

http://stackoverflow.com/q/29404468
tagged with: angularjs
type: Question
has title: Angular unable to recognize my controller
has answer: http://stackoverflow.com/a/29404534
has answer: http://stackoverflow.com/a/29404498
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/29404522
possible better answer: http://stackoverflow.com/a/29404498
has body: I have a project where homeapp.js contains the angular.module dependencies: var HomeApp = angular.module('HomeApp', [ 'ngRoute', 'ngCookies', 'HomeControllers', 'metadataControllers', 'MyControllers', 'ScheduleControllers' ]); HomeApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/schedules', { templateUrl: 'pages/list_schedule.html', controller: 'ScheduleControllers' }); and in a ScheduleController.js, I have: angular.module('ScheduleControllers', []).controller('PhoneListCrl', function($scope) { $scope.phones = [ {'name': 'Nexus S', 'snippet': 'Fast just got faster with Nexus S.'}, {'name': 'Motorola XOOM with Wi-Fi', 'snippet': 'The Next, Next Generation tablet.'}, {'name': 'MOTOROLA XOOM', 'snippet': 'The Next, Next Generation tablet.'} ]; }); this is basically the code snippet from the angular tutorial. In the index.html, I have: ... List Schedule ... which then directs to this the schedules.html with only the follow codes: {{phones}} However when the html is opened from browser, it shows {{phones}} straight, without being able to show the full json object. The console says https://docs.angularjs.org/error/ng/areq?p0=ScheduleControllers&p1=not%20a 1.#QNAN0unction%2C%20got%20undefined Which doesn't really make sense to me, but I guess it is saying ScheduleControllers is undefined. EDIT: In angluar's tutorial, the app.js says: var phonecatApp = angular.module('phonecatApp', [ 'ngRoute', 'phonecatAnimations', 'phonecatControllers', 'phonecatFilters', 'phonecatServices' ]); and then in controllers.js, it has: var phonecatControllers = angular.module('phonecatControllers', []); phonecatControllers.controller('PhoneListCtrl', ['$scope', 'Phone', function($scope, Phone) { $scope.phones = Phone.query(); $scope.orderProp = 'age'; }]); Looks like I am almost doing exactly what the tutorial does, but why it doesn't work for me?
accepted answer: http://stackoverflow.com/a/29404522
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0

http://stackoverflow.com/a/29455917
has comment: http://stackoverflow.com/comment/47136870
has body: The workaround for this is using self-invoked functions: nextID = "#content-" + dataElement.elementBack; (function(nextID) { something.on("change", function (e) { $(nextID).css({left: 0, position:'fixed', zindex: -1}); }); })(nextID); Functions create new scopes in JavaScript, and since you give nextID as argument, nextID gets scoped and it'll be captured and available when the change event is triggered. This is because JavaScript doesn't create scopes for any other language construct excepting functions. For example, a for like for(var i = 0; i &lt; 10; i++) {} won't create an scope and once the loop end, i is available in current scope and it will contain 10. I suggest you to take a look at let keyword part of next version of ECMA-Script (ECMA-Script 6) which will let us create block-scoped variables.
has comment: http://stackoverflow.com/comment/47090704
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/47090798
downvote count: 0
has comment: http://stackoverflow.com/comment/47129732
has comment: http://stackoverflow.com/comment/47809465
has comment: http://stackoverflow.com/comment/47810951
answers question: http://stackoverflow.com/q/29455877
score: 4
has comment: http://stackoverflow.com/comment/47097796
accepted answer of: http://stackoverflow.com/q/29455877
type: AcceptedAnswer

http://stackoverflow.com/comment/47102775
has text: @SofusGraae something like http://jsfiddle.net/arunpjohny/y0w62u3z/1/
comment on: http://stackoverflow.com/q/29470240
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47185427
comment on: http://stackoverflow.com/a/29514545
type: AnswerComment
type: Comment
has text: @MarkoGrešak Ok, thank you for correcting me, I won't delete my comments as it would lead to confusion in the thread, but I upvoted your reaction, so others see your comment first.
score: 0

http://stackoverflow.com/a/29423295
upvote count: 2
has body: The problem is in your if. When you want to compare the value of the input you do the .val() function. Like this : if ($('#best-programmer').val() === 'Brendon') If you do .val('something'), the value in the input is changed. As you can see in your fiddle, if you first type : Jonathan, and then submit, the value of the input changes to Brendon.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29423262
score: 2

http://stackoverflow.com/comment/47060468
has text: You'll need some javascript to make the checkboxes appear/disappear without re-loading the page, there isn't another way. The code in the tutoiral just removes the contents of the ` ` tag, and the re-populates it with new ` `s. It would be quite easy to make tiny changes to the Javascript so that it removes the ` ` then adds new ` `s.
score: 0
comment on: http://stackoverflow.com/q/29446793
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/139813570
type: Comment
type: AnswerComment
has text: Doesn't the `1000` make it a 1 sec delay before calling `debugger`? </nit>
comment on: http://stackoverflow.com/a/71586074
score: 0

http://stackoverflow.com/comment/47034253
score: 0
type: AnswerComment
has text: If I understand correctly, you need a slide up/down of the sub menus??
type: Comment
comment on: http://stackoverflow.com/a/29432314

http://stackoverflow.com/comment/47272299
type: AnswerComment
has text: Yeah thanks I checked it and I understand,But when I use "tr" in the above code it is not working.
comment on: http://stackoverflow.com/a/29514900
type: Comment
score: 0

http://stackoverflow.com/q/29475323
upvote count: 3
has answer: http://stackoverflow.com/a/29475365
has answer: http://stackoverflow.com/a/29475721
type: Question
has comment: http://stackoverflow.com/comment/47136774
tagged with: function
has answer: http://stackoverflow.com/a/29475431
tagged with: javascript
has answer: http://stackoverflow.com/a/29475500
tagged with: inline
downvote count: 0
has body: var el = document.getElementsByClassName("elements"); // this element contains more than 1 DOMs. el.onclick = function() { console.log("target name should be here")}; So I don't want to have inline JS, I want to fire function when it click to a specific DOM that has same class to any other elements. Could anyone help please?
has answer: http://stackoverflow.com/a/29475466
favorite count: 0
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47111502
has title: call function with className.onclick JS
score: 3
tagged with: onclick

http://stackoverflow.com/comment/47113916
has text: @JhonDree Well, the AngularJS and Q codebases don't seem to have the word "unfinished" anywhere in them, so the error doesn't seem to be coming from either of those. What is `that.cont`?
comment on: http://stackoverflow.com/a/29469936
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47213750
has text: should not this: $('.fname', row).val() ==> $('.fname'+ row).val() ?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29529905
type: QuestionComment

http://stackoverflow.com/q/29484070
has title: How do I allow web browsers to remember form fields that are not sent in a standard way?
tagged with: forms
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29484140
type: UnansweredQuestion
has body: The following code almost works flawlessly. function post_form() { http=new XMLHttpRequest(); http.onreadystatechange=function() { if (http.readyState==4 &amp;&amp; http.status==200) some_div.innerHTML=http.responseText; }; http.open("POST", some_action_url, false); http.setRequestHeader("Content-type","application/x-www-form-urlencoded"); http.send(my_form_query(some_form_element)); } Almost, except, when the client reloads the page they have to re-enter their name again because the browser isn't auto completing form fields. So my question is, how do I allow web browsers to remember form fields that are not sent in a standard way?
has comment: http://stackoverflow.com/comment/47128261

tampermonkey
tags question: http://stackoverflow.com/q/29478166
type: Tag
tags question: http://stackoverflow.com/q/29462151
tags question: http://stackoverflow.com/q/29503258
tag name: tampermonkey

http://stackoverflow.com/comment/47179824
has text: i tried this but it's not working...i've included the code in the description please check it.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29486702

http://stackoverflow.com/comment/58713982
type: AnswerComment
score: 0
type: Comment
has text: I'm having a similar issue but after including the polyfill, the Promise never seems to resolve, here's a gist: https://gist.github.com/Kikketer/1646eccdaff76944b358 Anyone have a clue why the Promise would never run it's '.then' ?
comment on: http://stackoverflow.com/a/31166888

http://stackoverflow.com/comment/47035697
has text: kuldeep.kamboj: yea i do when i copy/paste it to the other img's it also copies the img...
score: 0
comment on: http://stackoverflow.com/q/29432699
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46938425
type: Comment
comment on: http://stackoverflow.com/q/29379035
score: 0
has text: I was unable to find a forum and their Help and Support page only has about 5 Q&A's per subject with no link that I could find that allow for questions to be asked. There is a feedback link but that doesn't seem to be an appropriate avenue. Could you guide me into the right direction of where to ask my question?
type: QuestionComment

http://stackoverflow.com/a/61748061
type: Answer
has body: Why don't you just https://date-fns.org/v2.13.0/docs/eachMonthOfInterval ?? // Each month between 6 February 2014 and 10 August 2014: var result = eachMonthOfInterval({ start: new Date(2014, 1, 6), end: new Date(2014, 7, 10) }) //=&gt; [ // Sat Feb 01 2014 00:00:00, // Sat Mar 01 2014 00:00:00, // Tue Apr 01 2014 00:00:00, // Thu May 01 2014 00:00:00, // Sun Jun 01 2014 00:00:00, // Tue Jul 01 2014 00:00:00, // Fri Aug 01 2014 00:00:00 // ]
score: 0
answers question: http://stackoverflow.com/q/29466944

oauth
tags question: http://stackoverflow.com/q/29466415
tags question: http://stackoverflow.com/q/29522523
tag name: oauth
tags question: http://stackoverflow.com/q/29438870
type: Tag
tags question: http://stackoverflow.com/q/29459015
tags question: http://stackoverflow.com/q/29405395

http://stackoverflow.com/a/29409102
downvote count: 0
answers question: http://stackoverflow.com/q/29383671
type: Answer
has comment: http://stackoverflow.com/comment/47007574
upvote count: 1
has comment: http://stackoverflow.com/comment/47049062
score: 1
has body: I don't get what the point is. In which case would you need to bind an attribute conditionnaly with another value that true ? In all HTML attributes, either you need to specify a value, or it is a conditionnaly attribute (ex : hidden="true") that you should remove from the dom, because some browser will not read the value (ex : hidden="false" may be hidden in some browser)
has comment: http://stackoverflow.com/comment/47011613

http://stackoverflow.com/q/29452139
score: -3
has comment: http://stackoverflow.com/comment/47069883
upvote count: 0
has title: Use function only once
type: Question
has comment: http://stackoverflow.com/comment/47069879
tagged with: javascript
has answer: http://stackoverflow.com/a/29452165
has comment: http://stackoverflow.com/comment/47069876
answer count: 2
downvote count: 3
has answer: http://stackoverflow.com/a/29452502
favorite count: 0
type: UnansweredQuestion
has body: Quick question here. I tried to make this function work only once but it keeps getting called. How am I supposed to tell it to stop working after it executed the first time? function axis_y_superior_inferior() { if ((y_actual &lt;= y_final) &amp;&amp; (y_actual &gt;= y_final)) { var slop = (y_actual) / (x_actual); var crossing_point = ((y_actual - y_final)/slop) + x_actual; if ((slop &gt; (x_origen - dimension_x)) &amp;&amp; (crossing_point &lt; x_final)) { y_actual = y_final - y_actual; y_actual = y_final + y_actual; vectory = 0 - vectory; document.getElementById("block").style.display = "none"; } } }

sorting
tags question: http://stackoverflow.com/q/29451228
tags question: http://stackoverflow.com/q/29480252
tags question: http://stackoverflow.com/q/29496041
tags question: http://stackoverflow.com/q/29410586
tags question: http://stackoverflow.com/q/29513992
tags question: http://stackoverflow.com/q/29464731
tags question: http://stackoverflow.com/q/29386198
tags question: http://stackoverflow.com/q/29463645
type: Tag
tags question: http://stackoverflow.com/q/29392251
tags question: http://stackoverflow.com/q/29427928
tags question: http://stackoverflow.com/q/29393587
tags question: http://stackoverflow.com/q/29407964
tag name: sorting
tags question: http://stackoverflow.com/q/29396903
tags question: http://stackoverflow.com/q/29444351
tags question: http://stackoverflow.com/q/29471848
tags question: http://stackoverflow.com/q/29467650
tags question: http://stackoverflow.com/q/29414350
tags question: http://stackoverflow.com/q/29391263
tags question: http://stackoverflow.com/q/29455928

http://stackoverflow.com/q/29439082
downvote count: 0
accepted answer: http://stackoverflow.com/a/29439446
tagged with: javascript
has comment: http://stackoverflow.com/comment/47047441
tagged with: xpages
has body: I have a simple label: &lt;xp:label value="My Label " id="label2" style="width:350.0px"&gt; &lt;xp:eventHandler event="onclick" submit="false"&gt; &lt;xp:this.script&gt; &lt;![CDATA[xxxxxxxxxx;]]&gt; &lt;/xp:this.script&gt; &lt;/xp:eventHandler&gt; &lt;/xp:label&gt; So I need onclick event execute when I click either on label text or on white space next to label text. This code works only when I click on label text "My Label" either I add a style size or whitespase itself to the label value.
favorite count: 0
has comment: http://stackoverflow.com/comment/47047389
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: xPages label onclick event doesn't work on white spaces
score: 1
type: Question
upvote count: 1
has answer: http://stackoverflow.com/a/29439446
answer count: 1

http://stackoverflow.com/q/29520328
tagged with: jquery
has comment: http://stackoverflow.com/comment/47195923
favorite count: 0
accepted answer: http://stackoverflow.com/a/29520862
type: Question
has body: SO i have a ajax post that gets a lot of destinations from my database. I iterate through them and adds a marker on my map for each one of them. I also add a click event for each one of them so i will be able to click on them but the click event gets the last marker created as input so it doesn't matter which one of them i press i will always get the same marker in my click event. Here is my code: success: function (data) { for (destination in data) { var latlng = { lat: data[destination].Latitude, lng: data[destination].Longitude } console.log(data[destination].Id); console.log(data[destination]); var marker = new google.maps.Marker({ map: map, postion: new google.maps.LatLng(latlng.lat, latlng.lng), }); marker.set("id", data[destination].Id); marker.setIcon( /** {google.maps.Icon} */({ url: '/Content/Markers/green_MarkerX.png', size: new google.maps.Size(71, 71), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(17, 34), scaledSize: new google.maps.Size(35, 35) })); marker.setPosition(latlng); marker.setVisible(true); google.maps.event.addListener(marker, 'click', function () { console.log("MARKER"); console.log(marker); console.log("MarkerID"); console.log(marker.get('id')); }); } }, so the console.log(marker.get('id')); is always the same and the console.log(marker) is always the same marker. How do i get the listener to add the specific marker?
upvote count: 2
score: 0
downvote count: 2
has answer: http://stackoverflow.com/a/29520862
has comment: http://stackoverflow.com/comment/47196052
tagged with: javascript
tagged with: google-maps-api-3
has title: google maps dynamically created marker click event uses same marker
tagged with: google-maps
type: AnsweredQuestion
answer count: 1

http://stackoverflow.com/a/29414276
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29414215
has comment: http://stackoverflow.com/comment/47003469
downvote count: 0
has comment: http://stackoverflow.com/comment/47018499
has body: The promise does not block. Code execution continues concurrently.

http://stackoverflow.com/a/29493990
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/47146922
answers question: http://stackoverflow.com/q/29493384
upvote count: 1
downvote count: 1
has body: The real error here is that you are trying to add an event listener to a DOM object that doesn't exist on the page, which is why the error states you can't set that property on null.
has comment: http://stackoverflow.com/comment/47147179

http://stackoverflow.com/comment/47024530
comment on: http://stackoverflow.com/q/29426779
type: Comment
has text: Arrays don't contain variables, they have properties that contain values. Posting some code (even not working code or pseudo code) will help in deciphering what you are trying to achieve.
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46965775
type: AnswerComment
has text: You were. Thanks for the clarity Sukanya
comment on: http://stackoverflow.com/a/29394214
type: Comment
score: 0

http://stackoverflow.com/q/29481980
has body: I'm trying to build a working external panel but am having some issues. Here's the HTML: My Page My Profile Recent Activities FAQ Terms and Use Full Site About Us Contact Us Privacy Policy menu Home content About us menu About us About us Home footer menu My Profile About us Profiles I'm testing this in Chrome and I'm getting: Uncaught TypeError: undefined is not a function The code was taken from different sources but seems to be a typical example of loading an external panel. How do I correct the "undefined function" error?
has title: jQuery Mobile Undefined is not a function
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29482002
tagged with: javascript
tagged with: jquery
score: -1
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/29441097
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47050780
has comment: http://stackoverflow.com/comment/47050624
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/47050545
has title: Get value from text file in javascript
has comment: http://stackoverflow.com/comment/47050611
answer count: 1
tagged with: javascript
tagged with: variables
has comment: http://stackoverflow.com/comment/47050602
has body: I have a javascript variable which I display on my html website, I also have a .txt file which gets a payment value from a .php script. These values are displayed like this 12345 in the .txt file, every amount is raised by 1, so first the .txt file gets 1 then 2 then 3 etc. Now my question is, how do I get the last value from the .txt file and turn my variable value into the value I get, by the last value of the .txt file I mean if the current values in the file is 12345 then the last value is 5, then I want to change the variable in my Javascript to that value 5. My javascript/html script with the variable and display inside. &lt;div class="newValue"&gt; Current value: $&lt;span id="newValueVariable"&gt;&lt;/span&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; var newValueVariable= 1; document.getElementById("newValueVariable").innerHTML = newValueVariable; &lt;/script&gt;
tagged with: get
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47050856
has comment: http://stackoverflow.com/comment/47050578
favorite count: 0
has answer: http://stackoverflow.com/a/29441196
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47050631

http://stackoverflow.com/q/29409891
tagged with: javascript
score: 0
tagged with: javascriptcore
answer count: 1
tagged with: cocoa
has body: Right now my javascript looks like this : testStackData.addOrUpdateHeader("username", "vikas test", 1); testStackData.addOrUpdateHeader("testHeader", testStackData.priorResults.responseBody.cars[0].name, 1); testStackData.addOrUpdateVariable("carNameTest", "variable updated from pre script", 1); testStackData.stepError.haveError = false; return testStackData Now I need to create an Objective-C function addOrUpdateHeader or addOrUpdateVariable as mentioned in javascript. But I am confused as how to call these functions.
has comment: http://stackoverflow.com/comment/46998547
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46995180
linked to: http://stackoverflow.com/q/92471
type: Question
has title: How to call a objective c code from javascript in cocoa
has answer: http://stackoverflow.com/a/29821358
accepted answer: http://stackoverflow.com/a/29821358

http://stackoverflow.com/a/29424908
has comment: http://stackoverflow.com/comment/111466403
has comment: http://stackoverflow.com/comment/47022342
has comment: http://stackoverflow.com/comment/111466664
has comment: http://stackoverflow.com/comment/111466871
has comment: http://stackoverflow.com/comment/47022125
has comment: http://stackoverflow.com/comment/47022459
upvote count: 1
has comment: http://stackoverflow.com/comment/47022110
has comment: http://stackoverflow.com/comment/111466863
has comment: http://stackoverflow.com/comment/47022095
has comment: http://stackoverflow.com/comment/47022145
has body: Use json_encode() on the PHP side to encode the fetched results: $results = $query->fetch(PDO::FETCH_NUM); echo json_encode($results); Then to display the results, turn the JSON array into a row of the table. $.ajax({ type : 'post', url : 'compare.php', //query data : 'post_id='+ ele_id, // passing id via ajax dataType: "json", success : function(data){ var row = " "; $.each(data, function(i, val) { row += " " + val + " "; }); row += " "; $("#tableID").append(row); } }); If you only want to display selected columns, have PHP return an associative array: $results = $query->fetch(PDO::FETCH_ASSOC); echo json_encode($results); and extract the columns you want: $.ajax({ type : 'post', url : 'compare.php', //query data : 'post_id='+ ele_id, // passing id via ajax dataType: "json", success : function(data){ var row = " "; row += " " + data.id + " "; row += " " + data.provider_num + " "; row += " " + data['291_cost_of_non_mcr_bad_debts'] + " "; row += " "; $("#tableID").append(row); } });
has comment: http://stackoverflow.com/comment/111466717
has comment: http://stackoverflow.com/comment/111466723
has comment: http://stackoverflow.com/comment/47022122
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47022477
has comment: http://stackoverflow.com/comment/47022103
downvote count: 0
has comment: http://stackoverflow.com/comment/111466905
score: 1
has comment: http://stackoverflow.com/comment/47022293
has comment: http://stackoverflow.com/comment/111466681
has comment: http://stackoverflow.com/comment/47022157
has comment: http://stackoverflow.com/comment/111466586
accepted answer of: http://stackoverflow.com/q/29424844
has comment: http://stackoverflow.com/comment/47022541
type: Answer
has comment: http://stackoverflow.com/comment/111466182
has comment: http://stackoverflow.com/comment/111466879
answers question: http://stackoverflow.com/q/29424844

http://stackoverflow.com/q/29480157
has answer: http://stackoverflow.com/a/29480199
linked to: http://stackoverflow.com/q/750486
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47121259
linked to: http://stackoverflow.com/q/105034
has comment: http://stackoverflow.com/comment/47121063
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29480258
tagged with: javascript
has comment: http://stackoverflow.com/comment/47121244
has title: Creating unique id in for loop
has comment: http://stackoverflow.com/comment/47121134
has comment: http://stackoverflow.com/comment/47121356
has body: I should mention that this will be going into a database so it truly needs to be unique. I need to define the id before it enters the database no questions asked. for (var i = 0; i &lt; obj.length; i++) { var id = Date.now(); console.log(id); } The problem is, this is the output: 1428356251606 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 1428356251607 ... I was thinking of using Math.random() but it might in the name of all the Norse gods actually hit the same number twice. Any idea of how to make this truly unique while sustaining the speed of the for loop?
accepted answer: http://stackoverflow.com/a/29480199
has comment: http://stackoverflow.com/comment/47121180
possible better answer: http://stackoverflow.com/a/29480207
has answer: http://stackoverflow.com/a/29480207
has comment: http://stackoverflow.com/comment/47121122
has comment: http://stackoverflow.com/comment/47121205
has comment: http://stackoverflow.com/comment/47121126

http://stackoverflow.com/comment/47181861
score: 0
has text: It looks like you may be running into a cross-domain security issue. You may want to look into [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS), this [article](http://stackoverflow.com/questions/10093053/add-header-in-ajax-request-with-jquery), maybe [this](http://stackoverflow.com/questions/298745/how-do-i-send-a-cross-domain-post-request-via-javascript) and also [this](http://stackoverflow.com/questions/2558977/ajax-cross-domain-call). These articles explain it a lot more than I can fit in this little comment :)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29510765

http://stackoverflow.com/q/29452576
downvote count: 0
score: 1
type: Question
tagged with: angularjs-routing
has comment: http://stackoverflow.com/comment/47073353
has comment: http://stackoverflow.com/comment/47071122
tagged with: javascript
has comment: http://stackoverflow.com/comment/47071119
upvote count: 1
has comment: http://stackoverflow.com/comment/47073356
favorite count: 0
tagged with: angularjs
answer count: 0
linked to: http://stackoverflow.com/q/26213627
type: UnansweredQuestion
has body: There are a couple questions floating around with the same error, and the common resolution was the angular.js version was out of sync with angular-route.js. I do not think this is the case with me. I'm trying to get a demo application running that someone else has written. I'm getting this error that is not leaving me any clues as to what is going wrong. Error: [$injector:unpr] Unknown provider: $templateRequestProvider &lt;- $templateRequest &lt;- $route &lt;- ngViewDirective http://errors.angularjs.org/1.2.28/$injector/unpr?p0=%24templateRequestProvider%20%3C-%20%24templateRequest%20%3C-%20%24route%20%3C-%20ngViewDirective at angular.js:78 at angular.js:3801 at Object.getService [as get] (angular.js:3929) at angular.js:3806 at getService (angular.js:3929) at Object.invoke (angular.js:3956) at angular.js:3807 at getService (angular.js:3929) at Object.invoke (angular.js:3956) at angular.js:5716 Is there anything I can do to debug this? The source code is here: https://github.com/DataTorrent/malhar-dashboard-webapp Basically, the routing and a controller is set up like this: 'use strict'; angular.module('app', [ 'ngRoute', 'ui.dashboard', 'btford.markdown' ]) .config(function ($routeProvider) { $routeProvider .when('/', { templateUrl: 'template/view.html', controller: 'DemoCtrl', title: 'simple', description: 'This is the simplest demo.' }) .when('/resize', { templateUrl: 'template/view.html', controller: 'ResizeDemoCtrl', title: 'resize', description: 'This demo showcases widget resizing.' }) .when('/custom-settings', { templateUrl: 'template/view.html', controller: 'CustomSettingsDemoCtrl', title: 'custom widget settings', description: 'This demo showcases overriding the widget settings dialog/modal ' + 'for the entire dashboard and for a specific widget. Click on the cog of each ' + 'widget to see the custom modal. \n"configurable widget" has "limit" option in the modal ' + 'that controls RandomDataModel.' }) .when('/explicit-saving', { templateUrl: 'template/vie…
has title: How to debug this AngularJS Error: [$injector:unpr] Unknown provider: $templateRequestProvider <- $templateRequest <- $route <- ngViewDirective

http://stackoverflow.com/comment/47013620
type: Comment
has text: Jinx @nevermind! Yours is even nicer.
type: QuestionComment
comment on: http://stackoverflow.com/q/29420879
score: 0

http://stackoverflow.com/comment/47020901
has text: @Barmar - and they won't be, but the OP writes that he wants `[{"name": name, "address":address}]` without the values, and that's probably because it's easier to access the JSON that way, but it shouldn't be JSON at all, it should be sent as a form/www-encoded etc.
comment on: http://stackoverflow.com/q/29424778
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29383677
answers question: http://stackoverflow.com/q/29383479
score: 0
type: Answer
has body: Just add layout name in route map. Router.map(function() { this.route('Iframe', {path: '/iframe',layoutTemplate:'Iframe'}); });

http://stackoverflow.com/comment/47172355
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29490074
has text: sorry i don't understand why you need more when you have a example where the incorrect behavior exists. Why add more logic that has nothing to do with the error? (but no its not in a iframe, copy the source i have in my question save it to a html file and open in IE11...)
type: AnswerComment

http://stackoverflow.com/a/29420466
has comment: http://stackoverflow.com/comment/47012704
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29420179
answers question: http://stackoverflow.com/q/29420179
type: AcceptedAnswer
downvote count: 0
has body: Force shield.value to int in every comparison, since you're using it as a numeric value. parseInt(shield.value, 10) example: else if (parseInt(t_value, 10) &lt; parseInt(shield.value, 10)) { t_value is unkown for us, it might not need parseInt, but I assume it does. Also exit is throwing a syntax error. Remove them all - not needed, does nothing.

http://stackoverflow.com/a/29434831
type: Answer
answers question: http://stackoverflow.com/q/29432661
has body: You could try collapse() function in bootstrap to hide and show accordion. Here's a working example. $(document).ready(function(){ $('a.searchContent').on('click', function(){ var q = $('input#input_search').val(); searchFunction(q.toLowerCase()); }); }); function searchFunction(s){ console.log(s); $('.collapse').each(function(){ var divText = $(this).text(); console.log(divText.toLowerCase(), s); if(divText.toLowerCase().indexOf(s) > -1){ $(this).collapse('show'); } if(divText.toLowerCase().indexOf(s) < -1){ $(this).collapse('hide'); } }); } Sample heading one Sample paragraph one, Abc, xyz Sample heading two Sample paragraph two, def, wxy Search!
score: 0

http://stackoverflow.com/comment/46962161
has text: charset=euc-jp ---- http://stackoverflow.com/questions/3598028/print-japanese-with-jquery does that work for you?despite utf-8 should be too.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29392655
score: 3

http://stackoverflow.com/a/29458471
score: 0
has comment: http://stackoverflow.com/comment/47081364
has comment: http://stackoverflow.com/comment/47081239
type: Answer
has body: If you try this, this should give you save value for your alert and Label, the value you are using for the Label is different than the value you are trying to use alert on. selectedDate = new Date(); alert(selectedDate); // Sun Apr 05 2015 16:36:07 GMT+0200 (CEST) var startDate = getDateFromDateAtHourOfDay(selectedDate, hour); alert(hour); // 8 alert(startDate); // Thu Mar 05 2015 08:00:00 GMT+0100 (CET) var startDateDesc = getDateDescriptionFromDate(startDate); alert(startDateDesc) // 05.01.2015 document.getElementById("datumLabel").innerHTML = startDateDesc; // 05.01.2015
answers question: http://stackoverflow.com/q/29458030

http://stackoverflow.com/q/29515735
has comment: http://stackoverflow.com/comment/47187140
linked to: http://stackoverflow.com/q/122102
linked to: http://stackoverflow.com/q/728360
has comment: http://stackoverflow.com/comment/47187606
has title: Assign node data to another variable jstree
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29516246
tagged with: jstree
has comment: http://stackoverflow.com/comment/47187862
has comment: http://stackoverflow.com/comment/47187171
has comment: http://stackoverflow.com/comment/47187221
type: Question
has body: I am trying to assign node data to a temporary variable within an context menu variable as addToTable:{ // The "aggregate" menu item label: "Show in table", "seperator_before": false, "seperator_after": true, action: function(obj) { tempNode = new Object(); tempNode.id = node.id; tempNode.original = node.original; //tempNode = jQuery_1_11('#ajax').jstree(true).get_node(node); node.original.metadata.repeatme = true; jQuery_1_11("#ajax").trigger("changed.jstree", {}); // or jQuery_1_11("#ajax").trigger("changed.jstree", node); // or jQuery_1_11("#ajax").trigger("changed.jstree", tempNode ); } }, after the trigger, if i use as follows tempNode.original.metadata.sort_no = 2; it also changes the "sort_no" attribute of original node. I don't want original node data to be changed. Thanks in advance.
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/a/29405310
has comment: http://stackoverflow.com/comment/46986247
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46986099
has comment: http://stackoverflow.com/comment/52725301
type: Answer
accepted answer of: http://stackoverflow.com/q/29405168
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29405168
has comment: http://stackoverflow.com/comment/46986473
has comment: http://stackoverflow.com/comment/46985625
has comment: http://stackoverflow.com/comment/52736710
has comment: http://stackoverflow.com/comment/46986127
has body: In javascript you are using Auto proxy. But in android you are using manual proxy Both have differences in their behavior. Like To call serverside method using auto proxy proxy.server.addSession(sessionId) To call serverside method using manual proxy proxy.invoke("addSession", sessionId) You can find more on this link
has comment: http://stackoverflow.com/comment/52715772
upvote count: 1

http://stackoverflow.com/comment/47206061
has text: Your syntax was wrong. `model.set({key:"foobar"}` will set the "key" property to "foobar" every single time. No memory leak. You would have to do `model.set(key, "foobar")` or ES6 `model.set({[key]: "foobar"})` to introduce the memory leak.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29525821
type: Comment

http://stackoverflow.com/a/29508132
has comment: http://stackoverflow.com/comment/47183204
type: Answer
score: 2
has body: Hmm, I usually have a single route, in your case /news which can receive 2 optional params: pageSize, pageNumber for your pagination purposes. If those params don't exists than you will offer the first 5 records. If those params are present than you will start providing the other 5 records and based on the calculated offset. router.get('/news/:pageSize?/:pageNumber?', function (req, res) { var language = 'RU'; var pageSize = req.params.pageSize || 5; var pageNumber = req.params.pageNumber || 1; var offset = (pageNumber - 1) * pageSize; // If no params are provided than the offset should be 0 connection.query(queries['news_list'], [language, +pageSize, +offset], function (err, rows) { res.json(rows); }); }); I am not familiar with optional params in express routes but I hope you get the main idea behind the approach. You can do ajax requests to load the extra records after the first 5 records are listed. I hope this shined a light on the approach.
has comment: http://stackoverflow.com/comment/47182567
answers question: http://stackoverflow.com/q/29507794
upvote count: 2
downvote count: 0

http://stackoverflow.com/a/29430892
type: Answer
answers question: http://stackoverflow.com/q/29430783
has body: You are posting to editDescription.PHP instead of editProductDes.php Change the following: xmlhttp.open("POST","editProductDes.php",true); You are also sending the data in your post under another name than you expect it to be in your PHP code (Description instead of newDescription) - change: xmlhttp.send("Name=" + name.value + "&amp;newDescription=" + Description.value);
has comment: http://stackoverflow.com/comment/47031238
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/29430783

http://stackoverflow.com/comment/47162246
has text: Did you consider giving each column a `name`, then using `by.name()` to grab the specific column after you have the first row (from `.get(0)`)?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29501976

http://stackoverflow.com/q/29439337
has comment: http://stackoverflow.com/comment/47047433
type: Question
duplicate of: http://stackoverflow.com/q/19761241
tagged with: javascript
has body: I have two pages(index.html and main.html). this is index.html body tags: main page and in main page I have a button that when click on that button I want close this window but this function not work! How I can do this? and in console give this warning: Scripts may close only the windows that were opened by it.
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/47047424
has comment: http://stackoverflow.com/comment/47047392
has comment: http://stackoverflow.com/comment/47047523
tagged with: jquery
has answer: http://stackoverflow.com/a/29439384
type: UnansweredQuestion
has title: Use window.close for closing window
has answer: http://stackoverflow.com/a/29439377
linked to: http://stackoverflow.com/q/19761241

http://stackoverflow.com/q/29514802
type: Question
has comment: http://stackoverflow.com/comment/47185205
tagged with: javascript
has comment: http://stackoverflow.com/comment/47226228
tagged with: angularjs-ng-model
score: 0
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/47185136
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47225602
answer count: 0
type: UnansweredQuestion
has body: I'm working on a backend for a personality quiz where the user can send inn names for the different personalities, some questions, and alternative answers to the questions. The user will (hopefully) also be able to set up how many points each character shall gather from the different alternatives of an answer. There's some arrays inside of arrays involved, and objects in arrays. My problem appear when setting up the form for sending in the different points for the alternaitive answers. I get a "Cannot read property of undefined" when I try to log the points to the console. Heres the code: points test
has title: AngularJS : Cannot read property of undefined in ng-repeat using ng-model

http://stackoverflow.com/comment/47350100
type: AnswerComment
comment on: http://stackoverflow.com/a/29473260
score: 0
type: Comment
has text: yes sure, fiddles that you created is not working and when i click on buttons nothing happend

http://stackoverflow.com/q/29373979
answer count: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46929667
score: 0
tagged with: cordova
has title: Phonegap Local Storage - File API
type: UnansweredQuestion
tagged with: android
tagged with: local-storage
has body: my app is not able to write files to the local storage. I followed the API documentation. My code is: /* * * Device Ready * */ document.addEventListener("deviceready", onDeviceReady, false); //Crodova is ready function onDeviceReady() { // Now safe to use device APIs //Load the main html on startup loadContent("main.html"); //Prepare to laod the seetings and history file window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, failFS); } /* * * The File Storage * */ could, know all old GPS positions function gotFS() { fileSystem.root.getFile("readme.txt", {create: true, exclusive: false}, gotFileEntry, fail); } function failFS(error) { console.log(error.code); } function gotFileEntry(fileEntry) { fileEntry.createWriter(gotFileWriter, fail); } function gotFileWriter(writer) { writer.onwriteend = function(evt) { console.log("contents of file now 'some sample text'"); writer.truncate(11); writer.onwriteend = function(evt) { console.log("contents of file now 'some sample'"); writer.seek(4); writer.write(" different text"); writer.onwriteend = function(evt){ console.log("contents of file now 'some different text'"); } }; }; writer.write("some sample text"); } I am using the android emulator and with logcat I get the following output: [linux@linux ~]$ adb logcat *:S CordovaLog:D --------- beginning of /dev/log/system --------- beginning of /dev/log/main D/CordovaLog( 1101): file:///android_asset/www/js/index.js: Line 164 : code: 3 D/CordovaLog( 1101): message: Timeout expired D/CordovaLog( 1101): file:///android_asset/www/js/index.js: Line 164 : code: 3 D/CordovaLog( 1101): message: Timeout expired D/CordovaLog( 1101): file:///android_asset/www/js/index.js: Line 164 : code: 3 D/CordovaLog( 1101): message: Timeout expired D/CordovaLog( 1101): file:///android_asset/www/js/index.js: Line 164 : code: 3 D/CordovaLog( 1101): message: Timeout expired D/CordovaLog( 1101): file:///android_asset/www/js/index.js: Line 164 : code: 3 D/CordovaLog( 1101): message: Timeout expired…
has comment: http://stackoverflow.com/comment/46928507

http://stackoverflow.com/comment/47172458
has text: hi it is not working for me can is their any changes i have to modify
type: Comment
comment on: http://stackoverflow.com/a/29507496
score: 0
type: AnswerComment

http://stackoverflow.com/q/29466684
tagged with: matter.js
has title: Disabling gravity in Matter.js
answer count: 3
downvote count: 0
score: 30
favorite count: 0
has answer: http://stackoverflow.com/a/29786060
upvote count: 30
type: AnsweredQuestion
has body: Is there any way to disable gravity in Matter.js? I want my objects (bodies) to keep their physical abilities (like reaction to collision, restitution, friction etc), but I'd like to prevent the reaction to device's gyro and orientation change.
type: Question
possible better answer: http://stackoverflow.com/a/29786060
has answer: http://stackoverflow.com/a/76320912
has answer: http://stackoverflow.com/a/66875817
accepted answer: http://stackoverflow.com/a/76320912
linked to: http://stackoverflow.com/q/28079138
tagged with: javascript

http://stackoverflow.com/a/29406775
upvote count: 4
downvote count: 0
score: 4
type: Answer
answers question: http://stackoverflow.com/q/29406617
has body: Try this. Why aren't you using bootstrap datepicker?

http://stackoverflow.com/q/29385478
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: validation
type: UnansweredQuestion
has body: I currently have jquery form validation plugged in to my page, I currently have an issue trying to validate the state dropdown, how the view is built is like this. User chooses country which then fires back to controller and returns states linked to that country and builds the states dropdown. before choosing a country the state dropdown has a selected value of 0 and the text for that is "Please choose a state" from my understanding Jquery form validation will see that 0 and assume its a value, instead in my case this is not a value i need the user to choose a greater value of 0. so when the user presses submit, if the states selected value is 0 I need to display error message otherwise carry on. This is currently what I have $('#myForm').validate({ // initialize the plugin rules: { "UserDetails.SelectedCountry": "required", "UserDetails.SelectedState": { required: function (element) { var value = $("#UserDetails_SelectedState").val() == 0; if (value) { // If the value is true I need to return false to make it required alert("here"); return false; } else { // Otherwise value is greater then 0 ok to carry on, return true; } } } "UserDetails.Postcode": "required" }, messages: { "UserDetails.SelectedCountry": "Please choose your country", "UserDetails.SelectedState": "Please choose your state", "UserDetails.Postcode": "Please enter your postcode", } }); Would someone please be able to tell/show how to validate against 0. ** Update ** I've been battling with this on and off today, as you can see from my jquery markup if it true I then return false I see the alert message "here" but the field does not highlight in red, nor is the error message "Please choose your state" shown, can someone thing of the top of there head what it could be?
has answer: http://stackoverflow.com/a/29385798
has title: Jquery formvalidation required field if value is 0

http://stackoverflow.com/comment/47248389
type: Comment
type: QuestionComment
has text: Breadcrumb note: I had a continuous build integration tool that was masking improvements / improved effects / further developments of my JSX source.
score: 0
comment on: http://stackoverflow.com/q/29523562

http://stackoverflow.com/a/29439782
has body: Well, I solved my own problem, but it's inelegant since it does not start at 24:00:00 but at 23:59:59. But it's a start. I'll post it here in case it helps anyone &lt;script type="text/javascript"&gt; var count = 86400; var counter = setInterval(timer, 1000); function timer() { count = count - 1; if (count == -1) { clearInterval(counter); return; } var seconds = count % 60; var minutes = Math.floor(count / 60); var hours = Math.floor(minutes / 60); minutes %= 60; hours %= 60; document.getElementById("timer").innerHTML = hours + ":" + minutes + ":" + seconds; // watch for spelling } &lt;/script&gt; &lt;span id='timer'&gt;&lt;/span&gt;
answers question: http://stackoverflow.com/q/29407685
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29407685
type: Answer

http://stackoverflow.com/comment/46932017
score: 0
has text: @Mackan, yep, but i guess OP simple not call `get_spotify` in his code
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29375228

http://stackoverflow.com/q/29455656
downvote count: 0
answer count: 1
score: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29457418
linked to: http://stackoverflow.com/q/16527452
has title: Highchart multiple threshold colors
upvote count: 1
type: Question
tagged with: highcharts
tagged with: javascript
has comment: http://stackoverflow.com/comment/47134712
has body: I'm taking a look at this Highcharts fiddler: http://jsfiddle.net/YWVHx/97/ I'd like to do a very similar chart but it's not working out how I want it to. My current fiddler is this: (see edit below!) The main functional differece is in the first fiddler, he's using a range, whereas I'm using just actual values (and timestamps). What's not working for me: The labels are jacked up. If I try to mouse over a point on mine it's way off; it seems to be 'stuck' on the left. If you try to mouse over you should see the same issue. I can't zoom in. On his chart you can't zoom in either, but on another chart I was messing around with, it seems like all I needed to do to add zooming was put in: chart: { zoomType: 'x' }, But that doesn't seem to be working here. The points are so big that the bottom part in green looks too 'blobby'. How can I just remove those point markers? In summary, how can I have this map have just lines with no blobs, with zooming, and labels that follow your mouse? EDIT: I have a new version, where the labels work and the blobbiness is removed. However the zoom still doesn't work. How can I enable the zoom? http://jsfiddle.net/qprmjm67/

http://stackoverflow.com/q/29380703
has body: Using WOW.js, is it possible to start an animation when X% of the element is visible rather than using an offset value? For example I have an element with a width and height of 300px, and if I set X% to 50% the animation will start when the user has scrolled enough so that 150px of element is on screen.
tagged with: css
type: AnsweredQuestion
has title: WOW.js start animation when element is 60% in screen
accepted answer: http://stackoverflow.com/a/29381335
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29381335
score: 0
answer count: 1

http://stackoverflow.com/comment/47127805
comment on: http://stackoverflow.com/q/29483526
score: 0
type: Comment
type: QuestionComment
has text: @Vikrant and I just wanted to know wether it is possible with html5 canvas and will it be a risky process ?

http://stackoverflow.com/q/29429361
has body: This is something about the ExtJs5 charts.I have trouble changing the bar chart's labels. Codes is as below: Ext.create('Ext.chart.CartesianChart', { store: { fields: ['pet', 'households', 'total'], data: [{ pet: {name:'Cats'}, households: 38, total: 93 }] }, axes: [{ type: 'numeric', position: 'left' }, { type: 'category', position: 'bottom' }], series: [{ type: 'bar', xField: 'pet', yField: 'households', label:{ field:'pet', renderer:function(pet){ return 'Dear '+pet.name; } } }] }); You must have noticed that the field 'pet' is an object instead of a string. The renderer in the series label returns the value I want it to be,but the label is still [object Object]!
answer count: 1
score: 0
has answer: http://stackoverflow.com/a/29436143
tagged with: charts
tagged with: javascript
tagged with: extjs
has title: How to change the label of bar chart in Extjs5?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29436143
tagged with: extjs5
type: Question

http://stackoverflow.com/comment/47126312
type: AnswerComment
score: 0
type: Comment
has text: Is the third solution inferior to the other two in any way? In terms of cross-browser and cross-platform compatibility? If not, I'll just stick with it.
comment on: http://stackoverflow.com/a/29482765

http://stackoverflow.com/a/29505104
downvote count: 0
type: Answer
upvote count: 1
has body: I don't know that I'm doing a good job of exactly addressing your question since I'm not doing it with angular, but I think you might find this contribution helpful so I'll share it. I first found a reference to solving this task by reading the post and trying examples at Reading files in JavaScript using the File APIs on html5rocks.com. I recently worked on a project with this specific task and have a fully worked out demo for handling the upload of multiple files. You could trim it down to suit your needs for just one file, but here is all the code and a snippet to try it out in: var totalDocumentCount = 0; var totalDocumentsProcessed = 0; var mapDocuments = {}; //a new object, maybe used as associative array function parseXML(evt, file) { var key = file.name; var value = evt.target.result; //you could store a reference to each document in an associative array mapDocuments[key] = value; if (++totalDocumentsProcessed === totalDocumentCount) { //do something after the last file is uploaded } } //handles more than one file, but also works for a single file function onFilesSelected(event) { var files = event.target.files; // FileList object totalDocumentCount = files.length; for (var i = 0, f; f = files[i]; i++) { var fileReader = new FileReader(); fileReader.onloadend = (function (file) { //returns asynchronous, so i wrap in a closure return function (evt) { parseXML(evt, file) } })(f); fileReader.readAsText(f); } } document.getElementById('files').addEventListener('change', onFilesSelected, false); &lt;input type="file" id="files" name="files[]" multiple /&gt;
score: 1
answers question: http://stackoverflow.com/q/29503445

trace
tag name: trace
type: Tag
tags question: http://stackoverflow.com/q/29525244

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/29501208
tags question: http://stackoverflow.com/q/29523366
tags question: http://stackoverflow.com/q/29381681
tags question: http://stackoverflow.com/q/29397308
tags question: http://stackoverflow.com/q/29512655
tags question: http://stackoverflow.com/q/29389670
tags question: http://stackoverflow.com/q/29415782
tags question: http://stackoverflow.com/q/29405501
tags question: http://stackoverflow.com/q/29459500
tags question: http://stackoverflow.com/q/29477766
tags question: http://stackoverflow.com/q/29383605
tags question: http://stackoverflow.com/q/29474721
tags question: http://stackoverflow.com/q/29401160
tags question: http://stackoverflow.com/q/29413426
tags question: http://stackoverflow.com/q/29473526
tags question: http://stackoverflow.com/q/29423257
tags question: http://stackoverflow.com/q/29464381
tags question: http://stackoverflow.com/q/29480427
tags question: http://stackoverflow.com/q/29442824
tags question: http://stackoverflow.com/q/29464906
tags question: http://stackoverflow.com/q/29503856
tags question: http://stackoverflow.com/q/29410908
tags question: http://stackoverflow.com/q/29522743
tags question: http://stackoverflow.com/q/29401175
tags question: http://stackoverflow.com/q/29402962
tags question: http://stackoverflow.com/q/29442236
tags question: http://stackoverflow.com/q/29419739
tags question: http://stackoverflow.com/q/29394953
tags question: http://stackoverflow.com/q/29428324
tags question: http://stackoverflow.com/q/29442676
tags question: http://stackoverflow.com/q/29528390
tags question: http://stackoverflow.com/q/29469683
tags question: http://stackoverflow.com/q/29407513
tags question: http://stackoverflow.com/q/29452646
tags question: http://stackoverflow.com/q/29503413
tags question: http://stackoverflow.com/q/29416529
tags question: http://stackoverflow.com/q/29520105
tags question: http://stackoverflow.com/q/29522448
tags question: http://stackoverflow.com/q/29491761
tags question: http://stackoverflow.com/q/29419258
tags question: http://stackoverflow.com/q/29440470
tags question: http://stackoverflow.com/q/29523845
tags question: http://stackoverflow.com/q/29395263
tags question: http://stackoverflow.com/q/29424778
tags question: http://stackoverflow.com/q/29473721
tags question: http://stackoverflow.com/q/29403535
tags question: http://stackoverflow.com/q/29506979
tags question: http://stackoverflow.com/q/29436019
tags question: http://stackoverflow.com/q/29415819
tags question: http://stackoverflow.com/q/29462721
tags question: http://stackoverflow.com/q/29400898
tags question: http://stackoverflow.com/q/29421984
tags question: http://stackoverflow.com/q/29527855
tags question: http://stackoverflow.com/q/29450546
tags question: http://stackoverflow.com/q/29521627
tags question: http://stackoverflow.com/q/29389990
tags question: http://stackoverflow.com/q/29403460
tags question: http://stackoverflow.com/q/29508692
tags question: http://stackoverflow.com/q/29408986
tags question: http://stackoverflow.com/q/29495388
type: Tag
tags question: http://stackoverflow.com/q/29489188
tags question: http://stackoverflow.com/q/29490490
tags question: http://stackoverflow.com/q/29396934
tags question: http://stackoverflow.com/q/29426482
tags question: http://stackoverflow.com/q/29523004
tags question: http://stackoverflow.com/q/29517411
tags question: http://stackoverflow.com/q/29454135
tags question: http://stackoverflow.com/q/29473453
tags question: http://stackoverflow.com/q/29452398
tags question: http://stackoverflow.com/q/29428280
tags question: http://stackoverflow.com/q/29456063
tags question: http://stackoverflow.com/q/29501888
tags question: http://stackoverflow.com/q/29457475
tags question: http://stackoverflow.com/q/29381735
tags question: http://stackoverflow.com/q/29464454
tags question: http://stackoverflow.com/q/29523028
tags question: http://stackoverflow.com/q/29479733
tags question: http://stackoverflow.com/q/29511468
tags question: http://stackoverflow.com/q/29494077

http://stackoverflow.com/comment/46998716
comment on: http://stackoverflow.com/q/29412687
has text: Not difficult, but if you don't know anything about CSS, I'd read a book or tutorial. Do you know how to use bootstrap yet? If not, that'd be your first step. The above would be like a form group, and add an icon to the right portion. Then define a custom class for the icon portion, and define it in your css.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47058311
type: AnswerComment
score: 0
has text: Could use some explanation
type: Comment
comment on: http://stackoverflow.com/a/29445064

http://stackoverflow.com/q/29382685
has body: I am lost on how to use require.js within the HTML tag of an "ons-button" html tag item (login.html). I am able to use it successfully as long as I embed the code inside my require statement (index.html). Is there no way to use it directly in an html file that isn't html. I have tried using but then I do not know how to access the functions "returned" by require.js. Any help or direction would be great. Background: I am pretty new to require.js. I have got it working somewhat, but still having a major problem. I have a login cordova app that is launched with loginMain.html, but I like to keep my code organized and in different files when possible. So the main page for this cordova app is login.html. I am trying to access functions store in auth.js. The files are available in this zip: http://www.filedropper.com/requirejsquestion Code I believe is relevant: loginMain.html (not working) login.html (not working) Log In Sign in with Google I also tried this (loginMain.html) in the auth.js (believed to be correct) define(function(require) { //initialize OAuth OAuth.initialize('MYKEY'); return { //MORE FUNCTIONS googleReq: function() { token = "none"; OAuth.popup('google', { cache: true }) .done(function(result) { //use result.access_token in your API request //or use result.get|post|put|del|patch|me methods (see below) token = result.access_token; return token; }) .fail(function (err) { //handle error with err return token; }); } //MORE FUNCTIONS }; });
has title: Using Require.js in a Cordova HTML ons-page
tagged with: javascript
type: UnansweredQuestion
answer count: 0
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: requirejs
tagged with: cordova
upvote count: 1

http://stackoverflow.com/comment/46985366
has text: Values are coming properly , But it is not considering as ID
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29405077
type: Comment

http://stackoverflow.com/a/29390766
has comment: http://stackoverflow.com/comment/46959115
accepted answer of: http://stackoverflow.com/q/29390563
has comment: http://stackoverflow.com/comment/46962030
answers question: http://stackoverflow.com/q/29390563
type: Answer
has comment: http://stackoverflow.com/comment/46960790
has comment: http://stackoverflow.com/comment/46961003
has comment: http://stackoverflow.com/comment/46960023
has comment: http://stackoverflow.com/comment/46961767
has body: In your PHP script you would likely need to do something like this: $where = ''; if (isset($_POST['query'])) { $queryVar = $_POST['query']; $where = " WHERE `onomasia` LIKE '$queryVar%' " } $query = "SELECT onomasia FROM oikismoi_covered $where LIMIT 3"; Please bear in mind that this particular query is open to MySql Injection attacks and should be sanitized beforehand, Or use prepared statements with PDO which would be much better. In your combo definition you should apply the typeAhead and typeAheadDelay configs These configs should help: typeAhead: true, typeAheadDelay: 200, queryMode: 'remote', queryParam: 'query' // this is the parameter name passed back to PHP This link should also help with some more details.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46958784
has comment: http://stackoverflow.com/comment/46958624
has comment: http://stackoverflow.com/comment/46961677
has comment: http://stackoverflow.com/comment/46961396
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46959217
has comment: http://stackoverflow.com/comment/46961290
has comment: http://stackoverflow.com/comment/46960557
upvote count: 1
has comment: http://stackoverflow.com/comment/46958687

http://stackoverflow.com/q/29529612
has title: post-increment operator with shorthand assignment
tagged with: javascript
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/47213060
has comment: http://stackoverflow.com/comment/47213044
has comment: http://stackoverflow.com/comment/47213021
favorite count: 0
has body: I have a simply array and counter: var data = [1]; var i = 0; The shortcut assignment produces 2: data[i++] *= 2 // 2 I was expecting 3. data[i++] is multipled with 2, so 1 * 2 is 2, and then that is assigned to data[i++], which now becomes 2, and then after statement evaluated the side effect of ++ causes i to be 3. The following also gives me unexpected result. It produces NaN oddly enough. var data [1]; var i = 0; data[i++] = data[i++] * 2; // NaN I was expecting 3 again. data[i++] first evaluates to 1, and then is multipled with 2, and then that 2 value is assigned to i in data[i++], which is then incremented after statement completes, causing it to be 3. What am I missing here?
possible better answer: http://stackoverflow.com/a/29529667
has answer: http://stackoverflow.com/a/29529667
has answer: http://stackoverflow.com/a/29529651
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29529651
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/comment/47081116
score: 0
type: Comment
type: QuestionComment
has text: Perhaps it doesn't work as CSS doesn't work as you think it does.
comment on: http://stackoverflow.com/q/29458496

http://stackoverflow.com/comment/46930077
type: QuestionComment
has text: Seems like port option is now automatic and not hardcoded to 5000. You can configure the port with JASMINE_SERVER_MIRROR_PORT env variable (it's bad named in some places). Wonder if there's a way to get the ip and port in wich the mirror is running the test in runtime.
score: 1
comment on: http://stackoverflow.com/q/29373851
type: Comment

http://stackoverflow.com/a/29467709
score: 1
downvote count: 0
has body: I believe you're confused by the result because it is in line with what you're expecting. That is, in the end, you expect susan's age to be set to 35, because you called the setAge() function to do so, and you called it using susan. But that is not really what is going on. Actually what's happening is more along the lines of... you define a global function, setAge() - you could invoke this without susan. Doing so would invoke it in the global context, which would add a property window.age if it didn't already exist. you define a global object, susan. Really this is in the global context, so now you have window.susan (object), and window.setAge (function). you define a property on susan called setAge, assigning it a value of the function you defined in step 1. The name of this property on susan could be anything. It is just an alias for some value, and in this case you have made it an alias for a function, which happens to go by the same name. you retrieve susan's setAge property value, which is a function, and execute it, passing it 35 as a parameter - ultimately the global function setAge() is executed in the scope of susan (meaning this in setAge() is essentially replaced with susan when setAge() is executed) To alleviate some confusion, try changing susan.setAge = setAge; to susan.AgeSetter = setAge; You'll now get a javascript error if you try to call susan.setAge(35); because it was not defined. The object susan doesn't have a property setAge, but rather a property AgeSetter. And when you call susan.AgeSetter(35) everything works again. I think the way you're expecting this to work is more along the lines of the utility methods call and apply. Using call or apply, your global function setAge() would not change, nor would susan, except susan would have no property setAge(). Instead you could invoke setAge(), forcing the context to be susan, using either call or apply (for now you just need to know they're basically the same but you invoke call with explicit para…
type: Answer
answers question: http://stackoverflow.com/q/29467032
upvote count: 1

constraints
type: Tag
tags question: http://stackoverflow.com/q/29518786
tag name: constraints

http://stackoverflow.com/comment/47182865
comment on: http://stackoverflow.com/a/29513571
has text: isn't possible to use jsonstore synch feature without using jsonstore ?
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/47213324
score: 0
comment on: http://stackoverflow.com/a/29529761
type: AnswerComment
has text: This returns a new object in place of the old one, if OP decides to add more elements to the object, this won't work as properly without back and forth editing
type: Comment

http://stackoverflow.com/q/29513305
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/47182993
has comment: http://stackoverflow.com/comment/47182777
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/6117814
tagged with: ajax
has title: How to Increasing/Decreasing PHP variable value and reload function via ajax
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47183804
has body: I have a function which specifies date depending on a variable ex. $modification = "+1 Week" function calendar($modification){ $month = array("Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"); $date = new DateTime(date('Y-m-d')); $date-&gt;modify($modification); $year = $date-&gt;format('o'); $week = $date-&gt;format('W'); $fulldate = $date-&gt;format('c'); $valEnc = 'W'; $monthNum = $date-&gt;format('n'); $modDate = date('Y-m-d',strtotime($fulldate)); $mMon = date('n', mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week")), date("Y") )); $mTue = date('n', mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week"))+1, date("Y") )); $mWed = date('n', mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week"))+2, date("Y") )); $mThu = date('n', mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week"))+3, date("Y") )); $mFri = date('n', mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week"))+4, date("Y") )); $mSat = date('n', mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week"))+5, date("Y") )); $mSun = date('n', mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week"))+6, date("Y") )); $dayMonth = compact("mMon","mTue","mWed","mThu","mFri","mSat","mSun"); $mon = date('j',mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week")), date("Y"))); $tue = date('j',mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week"))+1, date("Y"))); $wed = date('j',mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week"))+2, date("Y"))); $thu = date('j',mktime(0, 0, 0, date('m', strtotime("$modDate")), date("d", strtotime("$year$valEnc$week"))+3, date("Y"))); $fri = date('j',mktime(0, 0, 0…
has answer: http://stackoverflow.com/a/29518901

http://stackoverflow.com/comment/47205317
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29524969
type: AnswerComment
has text: Sweet. Glad I could help. Be sure to check out the other two answers as well as they show a great way to interact with the callback.

http://stackoverflow.com/q/29477695
tagged with: d3.js
score: 0
has title: How to get axis to display correctly on grid based (heat map) chart with d3
type: Question
accepted answer: http://stackoverflow.com/a/29478238
answer count: 1
tagged with: javascript
has body: I'm trying to display axis for a grid based chart (heat map) to display correctly. I can get them into the right alignment (centered with each grid whether it be row or column), but they are on top of the grid where I want to have them displayed outside of the grids. Here's what I have so far: http://jsbin.com/hihepo/8
has answer: http://stackoverflow.com/a/29478238
type: AnsweredQuestion

http://stackoverflow.com/comment/47208915
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29527168
type: Comment
has text: Now its running but unable to uncheck the other checkboxes.

http://stackoverflow.com/a/29374968
downvote count: 0
type: Answer
has body: If you modify an AngularJS model outside (from external JavaScript) - you should use $scope.$apply() to let AngularJS know that model has changed. In your example you use setTimeout() which is an async external js method. However if you use the AngularJS $timeout you wont need to call $scope.$apply().
answers question: http://stackoverflow.com/q/29374829
upvote count: 1
score: 1

http://stackoverflow.com/comment/47017743
score: 0
comment on: http://stackoverflow.com/q/29423017
type: Comment
type: QuestionComment
has text: Hrm, currently using WebAudioAPI to access the user microphone/get the Frequency level of input, was thinking that I could at the same time filter the input to only pick up above a certain HZ level or something similar

http://stackoverflow.com/q/29380956
answer count: 2
has body: I am trying to create an application that has a die, singular for dice, on the screen. When you click the die, it will roll and display a number. I also want to keep a running total of each roll. So far I have it to where each time the button is clicked, the image randomly changes. I'm confused about how to keep a running total of the rolls, however. Here is the code I have so far.
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29381006
has answer: http://stackoverflow.com/a/29381012
type: UnansweredQuestion
has title: Running total of single die - Javascript
type: Question

http://stackoverflow.com/comment/46997328
has text: Licensing prevents upgrade, I'll opt for using a div (remember having an issue when not using a button, but cant remember what it was... hopefully I'll be okay or it'll crop up again soon!) Thanks @A.Wolff
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29411630
score: 0

http://stackoverflow.com/a/29436212
has comment: http://stackoverflow.com/comment/47042534
has comment: http://stackoverflow.com/comment/47042343
has comment: http://stackoverflow.com/comment/47042483
has comment: http://stackoverflow.com/comment/47042456
type: Answer
has comment: http://stackoverflow.com/comment/47042062
has comment: http://stackoverflow.com/comment/47042052
answers question: http://stackoverflow.com/q/29436125
has comment: http://stackoverflow.com/comment/47041746
has comment: http://stackoverflow.com/comment/47042000
score: 0
has comment: http://stackoverflow.com/comment/47042419
has comment: http://stackoverflow.com/comment/47042843
has comment: http://stackoverflow.com/comment/47041566
has comment: http://stackoverflow.com/comment/47042048
has comment: http://stackoverflow.com/comment/47041399
has comment: http://stackoverflow.com/comment/47041628
has comment: http://stackoverflow.com/comment/47041604
has comment: http://stackoverflow.com/comment/47041975
has comment: http://stackoverflow.com/comment/47042143
has body: You have to use .text() - cos it functions
has comment: http://stackoverflow.com/comment/47041837
has comment: http://stackoverflow.com/comment/47042493

http://stackoverflow.com/q/29481085
has title: Matching a socket.io socket with an express.js session
has comment: http://stackoverflow.com/comment/47123309
type: Question
downvote count: 0
tagged with: javascript
tagged with: express
favorite count: 0
tagged with: real-time
tagged with: node.js
has body: I'm trying to hookup a front-end server to our notification service, and then the front-end server to the browser. The notification service is realtime, and includes the recipients user id in the sent notification data. I'm not having problems with the notification service sending the data and the front-end server receiving it. And I can have it connect and disconnect to the browser just fine, like this: io.on('connection', function (socket) { console.log('connected'); socket.on('disconnect', function () { console.log('disconnected'); }); }); I need to now know what user is signed in to the front-end server so I know which user/socket to send the notification to. We can get this data from our express session if I put the connection listener in a middleware function like so: var allClients = {}; function useSocket (req, res, next) { io.on('connection', function (socket) { allClients[req.session.userId] = socket; socket.on('disconnect', function () { console.log('disconnected'); allClients[req.session.userId].removeAllListeners(); // we were also suggested things like socket.close() which did not help }); }); next(); } app.get('*', useSocket, function (req, res){ res.render('../views/index'); }); except the code above creates a new connection on every browser refresh, so a user gets a dupe notification for as many times as any browser has connected. This is my code that talks to the notification service: var notificationServiceSocket = require('socket.io-client').connect(notificationServiceUrl); notificationServiceSocket.on('notification', function (data) { // data.user_id is the intended recipient }); How can I determine which socket is related to the recipient without creating infinite connections?
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: socket.io
score: 2

http://stackoverflow.com/q/29446627
linked to: http://stackoverflow.com/q/29449076
type: Question
has answer: http://stackoverflow.com/a/29446689
tagged with: javascript
upvote count: 2
answer count: 2
has title: How to use jQuery in order to parse json and output it as a list into HTML?
downvote count: 0
tagged with: jquery
has body: I'm new to JS and Jquery. I need to show result which are return from the server in json. I have a json array with the result which can be accessed through data["json"] variable. Each result in array has a link and title. I want to be able to show each pair on a single line as a part of some list in the HTML. Structure should be like: title: [title] , link: URL title: [title] , link: URL and so on. I've tried using the following JS function without success( took it from here ) I think I didn't understood the function currectly therefore: If you can also explain me the meaning of the part of the $.("list >ul) and the section of function(index, element) => what are the values the index and element getting and why? function DisplayListItems(list) { alert("in display:" + list["json"]); $.each(list["json"], function(index, element) { var itemHTML = ["&lt;li&gt;", "&lt;div&gt;", "&lt;div&gt;", element.link, "&lt;/div&gt;", "&lt;div&gt;", element.title, "&lt;/div&gt;", "&lt;/div&gt;", "&lt;/li&gt;"].join('\n'); $(".list &gt; ul").append(itemHTML); } } Example Json result which the client should handle: [{"link":"http:\/\/en.wikipedia.org\/wiki\/Balloon","title":"Balloon - Wikipedia, the free encyclopedia"},{"link":"http:\/\/www.balloons.com\/","title":"Balloons.com - Wholesale Balloon Distributor"},{"link":"http:\/\/www.partycity.com\/category\/balloons.do","title":"Party Balloons, Helium Balloons &amp; Balloon Accessories - Party City"},{"link":"http:\/\/clashofclans.wikia.com\/wiki\/Balloon","title":"Balloon - Clash of Clans Wiki"},{"link":"http:\/\/www.balloon-juice.com\/","title":"Balloon Juice"},{"link":"http:\/\/www.balloonfiesta.com\/","title":"The Albuquerque International Balloon Fiesta - Welcome to the ..."},{"link":"http:\/\/www.youtube.com\/watch?v=belCJJjut1A","title":"\"The Balloon Show\" for learning colors -- children's educational video"},{"link":"http:\/\/www.google.com\/loon\/","title":"Loon for All \u2013 Project Loon \u2013 Google"},{"link":"http:\/\/w…
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/29446920
tagged with: php
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29446920
accepted answer: http://stackoverflow.com/a/29446689

http://stackoverflow.com/comment/47201207
type: Comment
type: QuestionComment
score: 1
has text: Ok, I take back what I said. You can make this 10 times faster if you add `if( prime === 2 ) break;` inside the inner loop. http://jsfiddle.net/reumzot5/
comment on: http://stackoverflow.com/q/29523220

http://stackoverflow.com/q/29386334
type: UnansweredQuestion
has body: I am new to javascript and am stuck, so need help! By using javascript I am copying a tr using clone method. All is fine but when new tr is created it takes the val that are copied from first tr, so I want to reset the val of new tr. Here is my script function addtr(){ var newElement = $("#bills &gt; tr").first().clone(); newElement.removeClass("hide").appendTo("#bills").find("input[type='text']").val(""); newElement.find(".amount").val(""); newElement.find(".amount_span").html(""); registerOnChange();
downvote count: 1
type: Question
tagged with: clone
score: -1
has comment: http://stackoverflow.com/comment/46953420
has answer: http://stackoverflow.com/a/29386469
upvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46950979
favorite count: 0
has comment: http://stackoverflow.com/comment/46950935
has title: Reset val of new tr created using javascript

http://stackoverflow.com/comment/47024813
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29411594
has text: I'm not seeing any errors with respect to that. May be setup a jsfiddle to emulate. Try this http://jsfiddle.net/mohamedrias/o4kr7wbn/
type: AnswerComment

http://stackoverflow.com/a/29455211
type: Answer
has comment: http://stackoverflow.com/comment/103488231
downvote count: 0
score: 7
has body: you should consider using browserify, which allows you to require modules in the browser by building all the dependencies. so basically you code like you would do in server side http://browserify.org
upvote count: 7
accepted answer of: http://stackoverflow.com/q/29455120
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29455120
has comment: http://stackoverflow.com/comment/71580430

http://stackoverflow.com/q/29477117
tagged with: select
has comment: http://stackoverflow.com/comment/47115415
has comment: http://stackoverflow.com/comment/47115436
type: Question
has answer: http://stackoverflow.com/a/29477817
has answer: http://stackoverflow.com/a/29477255
has answer: http://stackoverflow.com/a/29477338
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47115307
has title: How to Show an Alert when Option is Selected
score: 0
has body: I'm trying to alert visitors about a minimum amount, and I just reached the point where I can show the alert, but for all changes... The point is that I want only to show the alert when the user clicks on option value = 1. Here's what I've got (missing the IF clause): 0 A 30 PÇS 30 A 50 PÇS 50 A 100 PÇS
answer count: 3
possible better answer: http://stackoverflow.com/a/29477338
has comment: http://stackoverflow.com/comment/47115358
has comment: http://stackoverflow.com/comment/47115225
tagged with: php
linked to: http://stackoverflow.com/q/6925146
has comment: http://stackoverflow.com/comment/47115102
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47115145
accepted answer: http://stackoverflow.com/a/29477817

http://stackoverflow.com/comment/46977293
type: Comment
comment on: http://stackoverflow.com/q/29399093
has text: @Beki you should probably update the question with this aspect of it as it is not clear that you need this for PDF as-is.
score: 0
type: QuestionComment

http://stackoverflow.com/a/29378733
answers question: http://stackoverflow.com/q/29378692
type: Answer
has comment: http://stackoverflow.com/comment/46937546
has body: Why don't you just do this? var mongoose = require( 'mongoose' ); ... "Schema" : new mongoose.Schema({ Instead of: exports.mongoose.Schema // I'm not sure where you got `exports.mongoose` from. Also you don't have to use the .js when requiring like: var templates = require( './data/inc' ); Edit I believe you can't do it like PHP. Also the requires are cached so no need to worry about re requiring.
score: 0

http://stackoverflow.com/comment/47068141
has text: the get method return json data,but this works only for s.name , I need to bind more than element
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29451017
score: 0

http://stackoverflow.com/comment/47166578
type: QuestionComment
has text: It's unclear what you want?
score: 0
comment on: http://stackoverflow.com/q/29492552
type: Comment

http://stackoverflow.com/a/29620933
type: Answer
has comment: http://stackoverflow.com/comment/47427231
has comment: http://stackoverflow.com/comment/47389372
answers question: http://stackoverflow.com/q/29487733
has comment: http://stackoverflow.com/comment/47427508
has comment: http://stackoverflow.com/comment/47390010
has comment: http://stackoverflow.com/comment/47388543
has comment: http://stackoverflow.com/comment/47389211
has comment: http://stackoverflow.com/comment/47420152
has body: I think I understand what you need. your modal depends on id so you can use it directly like &lt;a data-toggle="modal" data-id="@item.desktop_info_id" title="Add this item" class="desktop_id" href="#@item.desktop_info_id"&gt;&lt;i title="Actions" class="fa fa-th"&gt;&lt;/i&gt;&lt;/a&gt; NOTE: here in href="#@item.desktop_info_id" used dynamic id Also set same id for modal: id="@item.desktop_info_id" &lt;div class="modal fade" id="@item.desktop_info_id" tabindex="-1" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt; &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt; &lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel1"&gt;Actions&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;input type="text" name="idd" id="idd" value=""/&gt; @Html.Action("Transaction", "Desktop", new {id=item.desktop_info_id}) &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button"class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; UPDATE Here fiddle with sample, and all seems work: dotnetfiddle
score: 0
has comment: http://stackoverflow.com/comment/47390619

http://stackoverflow.com/q/29408083
answer count: 1
linked to: http://stackoverflow.com/q/2921206
tagged with: onbeforeunload
favorite count: 0
tagged with: angularjs
has title: Fire onbeforeunload confirm alert for external sites only
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29408149
upvote count: 2
score: 1
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/73845256
accepted answer: http://stackoverflow.com/a/29408149
has body: I am using window.onbeforeunload method to show confirm message if user leaves website. window.onbeforeunload = function(e) { return textMsg; }; But I need this to be fired only if user navigates to external web-site or closes window. So how to cancel this confirm message for all XHR inside same domain and form submit etc?
linked to: http://stackoverflow.com/q/8013429

http://stackoverflow.com/q/29469547
score: 0
has answer: http://stackoverflow.com/a/29507738
accepted answer: http://stackoverflow.com/a/29507738
has body: I need to convert this sql query to IndexedDB syntax. "SELECT * FROM article WHERE userid=100 AND date_created &gt; '2015-1-15 18:00:00'" I'm thinking about these two solutions. userid index var articles = []; objectStore.index('userid').openCursor(100).onsuccess = function(e){ var cursor = e.target.result; if(cursor){ var article = cursor.value; if(new Date(article.date_created) &gt; new Date('2015-1-15 18:00:00')){ articles.push(article); } cursor.continue(); }esle{ console.log('done'); } }; date_created index var articles = []; objectStore.index('date_created').openCursor(IDBKeyRange.lowerBound('2015-1-15 18:00:00')).onsuccess = function(e){ var cursor = e.target.result; if(cursor){ var article = cursor.value; if(article.userid === 100){ articles.push(article); } cursor.continue(); }esle{ console.log('done'); } }; How can I write a similar query with a compound index on userid and date_created?
type: AnsweredQuestion
tagged with: indexeddb
has title: IDBKeyRange.only and IDBKeyRange.lowerBound together in one query
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/29446067
score: 0
answers question: http://stackoverflow.com/q/29445908
has comment: http://stackoverflow.com/comment/47059199
has comment: http://stackoverflow.com/comment/47059134
has body: Best way is to store all your promises in an array and use Q.all() or the async equivalent which I think is the same to run a function after everything is complete
type: Answer

http://stackoverflow.com/comment/47231210
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29518070
score: 1
has text: Thanks, it solve my problem, please add it as an answer and I would be glad to accept it. Many thanks!

http://stackoverflow.com/q/29459143
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
tagged with: onclick
has answer: http://stackoverflow.com/a/29459286
accepted answer: http://stackoverflow.com/a/29459286
has body: Suppose I want to do the following: when clicking a 'div', change to another location (as if it was ...) and then do something. I have tried with this code: Title where ident is the identifier of an object in the new location href='...' and togglebox is a function defined in the script. But it seems that the browser tries to accomplish togglebox('#ident') before changing the location, so the output is not the expected one. For instance, if I try Title then a 5 appears instantaneously before changing the location, while I expect the browser first changing the location and then showing 5. Is there any solution to this reversal-order solution? Any suggestion is welcome
type: Question
has title: onclick: do something after changing location
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47082370
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/47082292

http://stackoverflow.com/comment/46970414
score: 0
type: Comment
type: QuestionComment
has text: Have you overridden `parseFloat`? This will not work by default... `parseFloat('.team.points')`
comment on: http://stackoverflow.com/q/29397090

http://stackoverflow.com/a/29438304
has comment: http://stackoverflow.com/comment/47045620
has comment: http://stackoverflow.com/comment/47045878
has comment: http://stackoverflow.com/comment/47045427
downvote count: 0
has comment: http://stackoverflow.com/comment/47045775
has body: Per Disaster Faster's request, the issue encountered was simply that the browser was not going to the desired location of the page. The form data was successfully submitted and correct page was loaded. The solution to his issue was modifying the form's action attribute to include the location information (similar to adding location information to an anchor). Original: &lt;form action="nonadmin_user_profile.php" method="post"&gt; New: &lt;form action="nonadmin_user_profile.php#tabs-5" method="post"&gt; Original Post: The window.location = window.location redirect should include the location information. JSFiddle: http://jsfiddle.net/6dqcmh9d/ If you click the button first, it'll report the URL with the location information because it hasn't been added to the URL. Then click the link and re-click the button. You'll receive the URL with the location information added. If you want just the location information, you can use window.location.hash, but this will only produce the location on the page, not the URL of the page. The problem you'll run into will be with the form submission. To submit a form without changing the page, you'll either have to submit the form to a new window (add target="_blank" to the form) or implement AJAX. In either case, we'd need a little more of your code to help with integrating it properly.
has comment: http://stackoverflow.com/comment/47045494
answers question: http://stackoverflow.com/q/29438221
has comment: http://stackoverflow.com/comment/47046153
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29438221
score: 1
has comment: http://stackoverflow.com/comment/47046002
type: AcceptedAnswer

http://stackoverflow.com/comment/47022122
has text: Another option is to have PHP create the HTML for the ` `. There are many ways to do this, they're all pretty straightforward.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29424908
type: AnswerComment

http://stackoverflow.com/a/29493799
answers question: http://stackoverflow.com/q/29493558
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/29493558
has body: Doh. The handleAs argument according to the Dojo docs: The content handler to process the response payload with. In other words, setting handleAs to "text" solved the problem.

http://stackoverflow.com/a/29490775
answers question: http://stackoverflow.com/q/29490579
score: 0
type: Answer
has body: Put it as innerHTML in some element (if I get understood what you wana do): function writeText(){ document.getElementById("ph").innerHTML = "First: Second Text Third Text Forth. "; } write it

http://stackoverflow.com/q/29375066
upvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: twitter-bootstrap
has title: bootstrap tooltip usage, in search field
type: UnansweredQuestion
has body: I have 2 search fields, ( choose a place ) ( number of people) and a button Search, if the choose a place is not choosen and the search is clicked the bootstrap tooltip should say Please choose a place, But I cannot for some reason accomplish this task and need help . This is my code for the search field and button . Choose a Place Helsinki Lapland Number of People 1 2 3 4 5 6 7 8 9 10 10+ And this is my script Of course the tooltip is not showing on the choose a place when the Search button is clicked, and the script is also not working.
has answer: http://stackoverflow.com/a/29375136
tagged with: twitter-bootstrap-tooltip
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/19470347
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/29375896
linked to: http://stackoverflow.com/q/13414244

http://stackoverflow.com/a/29452823
answers question: http://stackoverflow.com/q/29452692
score: 1
has comment: http://stackoverflow.com/comment/47072888
upvote count: 1
has comment: http://stackoverflow.com/comment/47161519
has comment: http://stackoverflow.com/comment/47076379
type: AcceptedAnswer
downvote count: 0
has body: Your (Scrambled-eggs) audio file is returning 206 and showing the following: "Range:bytes=0- " The audio is fine when loaded independently (200 response) but it doesn't look for the Range header. For your loadedmetadata event to fire, the range header needs to be complete. You need to ensure that the content-range header is being set wherever the audio is being served from for the stream to work. This will cause both the issues. If you can provide some details on your server config I could give you a better answer.
has comment: http://stackoverflow.com/comment/47072936
has comment: http://stackoverflow.com/comment/47071364
has comment: http://stackoverflow.com/comment/47090372
type: Answer
has comment: http://stackoverflow.com/comment/47072945
accepted answer of: http://stackoverflow.com/q/29452692
has comment: http://stackoverflow.com/comment/47104325

http://stackoverflow.com/q/29486174
upvote count: 1
linked to: http://stackoverflow.com/q/18446359
tagged with: paypal
type: Question
tagged with: javascript
answer count: 2
tagged with: validation
has body: I am using angular-credit-cards to create a credit card form. The credit card number has the following setup: Credit Card Number {{donationForm.ccNumber.$ccEagerType}} When this form is submitted, it calls a function that creates a Paypal payment. Paypal payments need a credit card type. angular-credit-cards determines the credit card type dynamically based on the input that the cc-number directive is a part of and stores it in the input's $ccEagerType. However, how do I get this data from the input and hand it to the controller? I tried the following: But donationForm.ccNumber.$ccEagerType is not being binded to credit_card.type. Thanks in advance.
downvote count: 0
has title: How to get Angular Input Directive Data to Pass to Controller
favorite count: 0
has answer: http://stackoverflow.com/a/29486334
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29486334
possible better answer: http://stackoverflow.com/a/29486414
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29486414
score: 1

http://stackoverflow.com/a/29493950
answers question: http://stackoverflow.com/q/29492778
has body: Your tableSquare should be var tableSquare = function(num_rows, num_bombs){ this.numRows = num_rows; this.numBombs = num_bombs; this.positions = new Array(this.numRows); for (var i = 0; i &lt; this.numRows; i++) { this.positions[i] = new Array(this.numRows); } this.inRange = function(i,j, range){ if (i&gt;=0 &amp;&amp; i&lt;= range-1 &amp;&amp; j&gt;=0 &amp;&amp; j&lt;=range-1) return true; return false; }; }; and then u should create an object of tableSquare to do yr operations. var objectOne= new tableSquare(4,4) you can call inRange() as follows objectOne.inRange(1,2,3) Learn javascript here : 1 ) http://eloquentjavascript.net/ 2.) https://stackoverflow.com/tags/javascript/info
has comment: http://stackoverflow.com/comment/47172457
score: 0
has comment: http://stackoverflow.com/comment/47153639
type: Answer
has comment: http://stackoverflow.com/comment/47275312

http://stackoverflow.com/q/29451245
score: 3
has body: I'm new at Play Framework and making my first project with it. I added jQuery and bootstrap.js to my main.scala.html: &lt;script src="@routes.Assets.at("javascripts/jquery-2.1.3.min.js")"&gt;&lt;/script&gt; &lt;script src="@routes.Assets.at("javascripts/bootstrap/bootstrap.js")"&gt;&lt;/script&gt; When I run my application in a browser, I get the compilation error: Missing semicolon in \app\assets\javascripts\jquery-2.1.3.min.js:2 You can see the screenshot here: http://oi61.tinypic.com/2lllklx.jpg The same problem if I add only a bootstrap js, minified version or separate js files. I don't change those files, I add them in the form they were originally - downloaded from jQuery/Bootstrap websites. I tried to add semicolons manually, but there are hundreds of them missing. I don't think that's a good idea. Maybe I should change some settings in the Play application?
tagged with: javascript
has answer: http://stackoverflow.com/a/29464838
tagged with: playframework
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Play framework: Missing semicolon error in jQuery/Bootstrap JS
upvote count: 3
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: scala
type: Question
has comment: http://stackoverflow.com/comment/47077155

http://stackoverflow.com/comment/46931046
has text: @IsmaelMiguel nothing.. but as i type get_spotify i get this: http://prntscr.com/6nscpb
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29375228

http://stackoverflow.com/q/29393746
tagged with: macos
answer count: 0
tagged with: pkgbuild
upvote count: 3
type: UnansweredQuestion
tagged with: installation-path
type: Question
score: 3
has body: We have an application which installs to a custom folder and now we have to create an installer for an application extension (plugin). The installer of the host application was created with a cross-platform tool, which permits the user to choose the installation folder and even it permits to install multiple versions on the same system. The host application is not just an "app", as in case of many Mac programs, but a directory which contains several files + an "app". The plugin installer should: 1. be pkgbuild/productbuild based, because we doesn't want to use cross-platform installer because it is Java based and we had troubles with it 2. query all installed host applications with CFBundleIdentifier and choose one to install 3. install the content of the payload to the directory of the chosen host application I managed to find solutions for the first two requirements, but I don't know how to proceed with the third. Is there any solution to change the installation path from the Distribution.xml? I played with choice.customLocation attribute, but I didn't managed to modify from JavaScript. Is there any "elegant" solution for it? Thanks.
downvote count: 0
tagged with: javascript
has title: How do I change the installation path in an OS X installer built with pkgbuild/productbuild?
favorite count: 0
tagged with: productbuild

http://stackoverflow.com/a/29429614
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29428740
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29428740
type: Answer
has body: I've found the solution by myself (maybe there are some better ways to do this), all I had to do is to manually create and bootstrap the angular module and set the variable I wanted to pass in the rootscope. Suppose to have an ember template like &lt;script type="text/x-handlebars" data-template-name="index"&gt; &lt;div ng-app="myapp"&gt; &lt;div somedirective="model"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/script&gt; in the view do: App.IndexView = Ember.View.extend({ didInsertElement: function() { model = this.get('controller.model'); angular.module('myapp', []) .directive('somedirective', function() { return { template: 'test {{ model[0] }} test' }; }).run(function($rootScope){ $rootScope.model = model; }); angular.bootstrap(this.element, ['myapp']); } }); When destroying the root element of the view angular should be automatically destroyed without memory leaks

http://stackoverflow.com/q/29503754
type: AnsweredQuestion
has body: Below is a simplified version of what I want to do. I want to save the value that I get from mssql.query and retrieve it OUTSIDE of the mssql.query function. I am using the variable "total" to do so. var total; mssql.query("EXEC getMeetingInfo ?", [meetingID], { success: function(results1) { console.log(results1); total = results1; }, error: function(err) { console.log("error is: " + err); response.send(statusCodes.OK, { message : err }); } }); response.send(statusCodes.OK, total ); //does not work
type: Question
tagged with: function
has title: Receiving a variable from mssql.query in javascript
tagged with: javascript
has answer: http://stackoverflow.com/a/29503783
score: 0
tagged with: azure
tagged with: sql
answer count: 1
accepted answer: http://stackoverflow.com/a/29503783

http://stackoverflow.com/q/29439759
has title: React Native: <Text> won't render if placed inside <TouchableHighlight>
has answer: http://stackoverflow.com/a/29452531
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29462563
accepted answer: http://stackoverflow.com/a/29462563
type: Question
tagged with: react-native
has comment: http://stackoverflow.com/comment/47049359
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/47061753
possible better answer: http://stackoverflow.com/a/29452531
has comment: http://stackoverflow.com/comment/47057411
has body: In the following code: 'use strict'; var React = require('react-native'), { AppRegistry, StyleSheet, Text, View, Component, NavigatorIOS } = React, styles = StyleSheet.create({ container: { padding: 30, marginTop: 65, alignItems: 'center' }, button: { height: 36, flex: 1, flexDirection: 'row', backgroundColor: '#48BBEC', borderColor: '#48BBEC', borderWidth: 1, borderRadius: 8, marginBottom: 10, alignSelf: 'stretch', justifyContent: 'center' }, buttonText: { fontSize: 18, color: 'white', alignSelf: 'center' }, text: { color: 'black', backgroundColor: 'white', fontSize: 30, margin: 80 } }) class Login extends Component { render() { return ( /* */ Login with Google /* */ ) } } module.exports = Login The Login gets rendered only when the surrounding is commented out. What am I doing wrong?

http://stackoverflow.com/comment/47191802
has text: The problem is that the last JSON you posted is [not valid](http://jsonlint.com). There are two `"` which break it. Until you post code on how you create the posted string, it is difficult to help you
comment on: http://stackoverflow.com/q/29518301
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/29482364
accepted answer: http://stackoverflow.com/a/29482769
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: bootstrap dismiss modal and display another modal
possible better answer: http://stackoverflow.com/a/29482710
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: Having a bit of a problem with using Bootstraps modal, I have a login form which uses a modal (when pressed the login form will appear) If the user does not have an account, they can press "sign up" I would like the login modal to be dismissed and the sign up modal to appear I have this working, the login form is dismissed when sign up is clicked, but when the sign up modal is shown, you cannot scroll up or down on the sign up modal, (you can scroll up or down on the login modal) sorry for the long explanation, the jsfiddle below is my code, Don't have an account? Sign up This is the code which dismisses the login modal and shows the sign up modal. I know that the modal is dismissed via data-dismiss="modal" (so the page thinks the modal is closed and scrolls through the web page) however I do not know how to find a way around this. http://jsfiddle.net/5v4nejsz/ The lorem ipsum is there to show the example of the scrolling. The first form is the login modal and the second form is the sign up Thank you for the help!
tagged with: css
tagged with: twitter-bootstrap-3
upvote count: 2
has answer: http://stackoverflow.com/a/29482710
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29482769

http://stackoverflow.com/q/29471705
tagged with: date
answer count: 2
has answer: http://stackoverflow.com/a/29471738
upvote count: 0
tagged with: arrays
has title: How can I treat a date string as a formatted array [YEAR,MONTH,DAY]?
favorite count: 0
has body: I have element that stores a date as a string like this 2015,4,06 How can I convert it to array like this? [2015,4,06] I have a script that accept the date as array [YEAR,MONTH,DAY] but I can't figure how to convert the string format into array accepted format with [] wrapping the date. I have tried new Date( .. ) but that's not what I am trying to do, I am looking for a way to make the string read as array [YEAR,MONTH,DAY] How can I do that? I tried: JSON.parse, toArray, etc but I am sure all that stuff is invalid methods. am I missing something so simple? Thank you!
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29471743
has comment: http://stackoverflow.com/comment/47104788
downvote count: 1
type: Question
tagged with: split
tagged with: javascript
score: -1

http://stackoverflow.com/q/29515179
has comment: http://stackoverflow.com/comment/47185826
has comment: http://stackoverflow.com/comment/47186834
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47186035
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29515868
type: UnansweredQuestion
has title: Broken images, jumbotron don't show background
tagged with: css
has comment: http://stackoverflow.com/comment/47185912
has comment: http://stackoverflow.com/comment/47186026
has comment: http://stackoverflow.com/comment/47186046
has comment: http://stackoverflow.com/comment/47186135
has body: I have no idea why images don't show properly when I upload code to the server... Locally it works. Image from jumbotron (with absolute path): .jumbotron { background-image:url('http://rabatowe.pl/zdjecia/jumbotron/dalia.jpg'); height: 550px; background-repeat: no-repeat; background-size: cover; color: white; } And images from flexslider (with relative path): Click: site with these problems index.html zdjecia // pictures 2.2 kwiaty // flowers aksamitka_drobno -> 1.jpg 2.jpg 3.jpg aksamitka_wielko -> 1.jpg 2.jpg 3.jpg jumbotron -> dalia.jpg css
type: Question

http://stackoverflow.com/a/29527598
has comment: http://stackoverflow.com/comment/47231055
score: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/47209981
type: Answer
has comment: http://stackoverflow.com/comment/47215291
has comment: http://stackoverflow.com/comment/47247299
answers question: http://stackoverflow.com/q/29474144
has comment: http://stackoverflow.com/comment/47209917
has body: Typical use of a typedef looks like this: /** @typedef {function():string} */ var SomeFunctionType; /** @param {SomeFunctionType} x This is a function */ function useFunction(x) { ... } The question is lacking some detail and I expect you actually want a @type declaration to type a value, rather than creating a type name: /** @type {function():string} */ var someFunction = getFunctionFromSomewhere(); someFunction(); An overview of the jsdoc annotation can be found here: https://developers.google.com/closure/compiler/docs/js-for-compiler
upvote count: 5

http://stackoverflow.com/comment/47136599
type: AnswerComment
type: Comment
has text: 'div 4th li, 8th li, 12th li' - what this means, sorry? The code/example from original question isn't close to this... however - for 'google images' functionality - you need just one thing -> get image src and show it in big 'expanded' div (i think you are over-complicating this). :)
comment on: http://stackoverflow.com/a/29488499
score: 0

http://stackoverflow.com/q/29498688
score: 0
has comment: http://stackoverflow.com/comment/47156436
has comment: http://stackoverflow.com/comment/47158136
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47245721
has body: The list below is what I'm trying to get to work. So, lets say I enter whole numbers in each group giving me a total at the end, then the total on top auto populates with those totals. Then the percentages at the bottom also auto populates based on the formula added (Men, Woman, Gender for African divide by Total on top). I keep getting error messages because I think it's to many for the calculation fields. Total: __________ Total Men________ Woman________ African Hisp Asian. Italian White Unknown TOTAL MEN ______ ______ _____ ____ ______ ______ ______ WOMEN _______ ______ _____ ____ ______ ______ ______ UNKNOWN GENDER ______ _____ _____ _____ _____ ______ ______ Approximate ethnic and racial breakdown of the applicant pool: African Hisp Asian Amer. Ind Italian White Unknown TOTAL _____% _____% ____% _____% _________% _______% ________%
has title: Fillable PDF form that requires multiple calculations
answer count: 0
has comment: http://stackoverflow.com/comment/47157723
type: Question
has comment: http://stackoverflow.com/comment/47156250
tagged with: javascript

http://stackoverflow.com/comment/55200795
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29491910
has text: What exactly are you using that requires 100k sockets per second? Just curious :)

http://stackoverflow.com/comment/47250506
type: Comment
comment on: http://stackoverflow.com/q/29526178
type: QuestionComment
score: 1
has text: Firebug won't show the models object because the model is a server-side model, and doesn't exist on the client.

http://stackoverflow.com/q/29491540
upvote count: 1
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/1484506
has answer: http://stackoverflow.com/a/29491884
score: 1
has comment: http://stackoverflow.com/comment/47142325
type: Question
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47142625
linked to: http://stackoverflow.com/q/13833463
tagged with: javascript
linked to: http://stackoverflow.com/q/1484506
tagged with: colors
has body: I want to randomly generate a color hex code with Javascript. This color needs to be light enough to place black font on it. What is the best way to ensure a light color is being generated? Will it help to limit letters in the following function? function getRandomColor() { var letters = '0123456789ABCDEF'.split(''), color = '#'; for(var i = 0; i &lt; 6; i++ ) { color += letters[Math.floor(Math.random() * 16)]; } return color; }
favorite count: 0
possible better answer: http://stackoverflow.com/a/29491884
has answer: http://stackoverflow.com/a/29491676
accepted answer: http://stackoverflow.com/a/29491676
has title: How to get random light color

http://stackoverflow.com/comment/47075281
type: QuestionComment
has text: Do exist somethng like z-index in css? Will prioritize an element only in child elements? planet layer - child layer - child layer - child layer (move this layer always visible on top, only in layer planet)
score: 0
comment on: http://stackoverflow.com/q/29393109
type: Comment

css
tags question: http://stackoverflow.com/q/29376858
tags question: http://stackoverflow.com/q/29430753
tags question: http://stackoverflow.com/q/29482189
tags question: http://stackoverflow.com/q/29528863
tags question: http://stackoverflow.com/q/29435198
tags question: http://stackoverflow.com/q/29431377
tags question: http://stackoverflow.com/q/29413092
tags question: http://stackoverflow.com/q/29479064
tags question: http://stackoverflow.com/q/29404174
tags question: http://stackoverflow.com/q/29377583
tags question: http://stackoverflow.com/q/29527883
tags question: http://stackoverflow.com/q/29511032
tags question: http://stackoverflow.com/q/29469959
tags question: http://stackoverflow.com/q/29430922
tags question: http://stackoverflow.com/q/29473829
tags question: http://stackoverflow.com/q/29466017
tags question: http://stackoverflow.com/q/29482262
tags question: http://stackoverflow.com/q/29470563
tags question: http://stackoverflow.com/q/29525149
tags question: http://stackoverflow.com/q/29503115
tags question: http://stackoverflow.com/q/29397130
tags question: http://stackoverflow.com/q/29495574
tags question: http://stackoverflow.com/q/29524609
tags question: http://stackoverflow.com/q/29394797
tags question: http://stackoverflow.com/q/29404908
tags question: http://stackoverflow.com/q/29398363
tags question: http://stackoverflow.com/q/29387513
tags question: http://stackoverflow.com/q/29481901
tags question: http://stackoverflow.com/q/29505174
tags question: http://stackoverflow.com/q/29421137
tags question: http://stackoverflow.com/q/29376219
tags question: http://stackoverflow.com/q/29409873
tags question: http://stackoverflow.com/q/29476187
tags question: http://stackoverflow.com/q/29447537
tags question: http://stackoverflow.com/q/29474121
tags question: http://stackoverflow.com/q/29489988
tags question: http://stackoverflow.com/q/29500931
tags question: http://stackoverflow.com/q/29527373
tags question: http://stackoverflow.com/q/29379522
tags question: http://stackoverflow.com/q/29380703
tags question: http://stackoverflow.com/q/29403395
tags question: http://stackoverflow.com/q/29403522
tags question: http://stackoverflow.com/q/29485842
tags question: http://stackoverflow.com/q/29467254
tags question: http://stackoverflow.com/q/29496648
tags question: http://stackoverflow.com/q/29523678
tags question: http://stackoverflow.com/q/29446711
tags question: http://stackoverflow.com/q/29519229
tags question: http://stackoverflow.com/q/29382239
tags question: http://stackoverflow.com/q/29470805
tags question: http://stackoverflow.com/q/29407262
tags question: http://stackoverflow.com/q/29428084
tags question: http://stackoverflow.com/q/29435869
tags question: http://stackoverflow.com/q/29426468
tags question: http://stackoverflow.com/q/29522995
tags question: http://stackoverflow.com/q/29455356
tags question: http://stackoverflow.com/q/29375188
tags question: http://stackoverflow.com/q/29376628
tags question: http://stackoverflow.com/q/29476672
tags question: http://stackoverflow.com/q/29423881
tags question: http://stackoverflow.com/q/29483526
tags question: http://stackoverflow.com/q/29413914
tags question: http://stackoverflow.com/q/29461054
tags question: http://stackoverflow.com/q/29387130
tags question: http://stackoverflow.com/q/29483766
tags question: http://stackoverflow.com/q/29434050
tags question: http://stackoverflow.com/q/29473143
tags question: http://stackoverflow.com/q/29454074
tags question: http://stackoverflow.com/q/29411569
tags question: http://stackoverflow.com/q/29387084
tags question: http://stackoverflow.com/q/29484221
tags question: http://stackoverflow.com/q/29473591
tags question: http://stackoverflow.com/q/29388844
tags question: http://stackoverflow.com/q/29497123
tags question: http://stackoverflow.com/q/29378679
tags question: http://stackoverflow.com/q/29479123
tags question: http://stackoverflow.com/q/29496190
tags question: http://stackoverflow.com/q/29411717
tags question: http://stackoverflow.com/q/29415897
tags question: http://stackoverflow.com/q/29387592

http://stackoverflow.com/comment/47213116
type: QuestionComment
comment on: http://stackoverflow.com/q/29524985
score: 0
type: Comment
has text: Firefox fires all those animation events.

http://stackoverflow.com/comment/47148181
comment on: http://stackoverflow.com/a/29377331
score: 0
type: Comment
has text: This is not a good place to ask. You may have more luck if you make a new question, with relevant code
type: AnswerComment

arrays
tags question: http://stackoverflow.com/q/29493072
tags question: http://stackoverflow.com/q/29439787
tags question: http://stackoverflow.com/q/29401890
tags question: http://stackoverflow.com/q/29416454
tags question: http://stackoverflow.com/q/29438104
tags question: http://stackoverflow.com/q/29442824
tags question: http://stackoverflow.com/q/29494034
tags question: http://stackoverflow.com/q/29528347
tags question: http://stackoverflow.com/q/29403071
tags question: http://stackoverflow.com/q/29514181
tags question: http://stackoverflow.com/q/29450537
tags question: http://stackoverflow.com/q/29398179
tags question: http://stackoverflow.com/q/29418831
tags question: http://stackoverflow.com/q/29376558
type: Tag
tags question: http://stackoverflow.com/q/29418588
tags question: http://stackoverflow.com/q/29407513
tags question: http://stackoverflow.com/q/29444104
tags question: http://stackoverflow.com/q/29528148
tags question: http://stackoverflow.com/q/29480130
tags question: http://stackoverflow.com/q/29432863
tags question: http://stackoverflow.com/q/29430353
tags question: http://stackoverflow.com/q/29382751
tags question: http://stackoverflow.com/q/29464197
tags question: http://stackoverflow.com/q/29389703
tags question: http://stackoverflow.com/q/29427990
tags question: http://stackoverflow.com/q/29398052
tags question: http://stackoverflow.com/q/29498158
tags question: http://stackoverflow.com/q/29436019
tags question: http://stackoverflow.com/q/29441395
tags question: http://stackoverflow.com/q/29430018
tags question: http://stackoverflow.com/q/29478278
tags question: http://stackoverflow.com/q/29462721
tags question: http://stackoverflow.com/q/29399279
tags question: http://stackoverflow.com/q/29393642
tags question: http://stackoverflow.com/q/29455191
tags question: http://stackoverflow.com/q/29458262
tags question: http://stackoverflow.com/q/29527855
tags question: http://stackoverflow.com/q/29473156
tags question: http://stackoverflow.com/q/29381681
tags question: http://stackoverflow.com/q/29407066
tags question: http://stackoverflow.com/q/29440144
tags question: http://stackoverflow.com/q/29387511
tags question: http://stackoverflow.com/q/29521140
tags question: http://stackoverflow.com/q/29448021
tags question: http://stackoverflow.com/q/29446197
tags question: http://stackoverflow.com/q/29415782
tags question: http://stackoverflow.com/q/29529787
tags question: http://stackoverflow.com/q/29483662
tags question: http://stackoverflow.com/q/29444081
tags question: http://stackoverflow.com/q/29436125
tags question: http://stackoverflow.com/q/29493457
tags question: http://stackoverflow.com/q/29443329
tags question: http://stackoverflow.com/q/29452758
tags question: http://stackoverflow.com/q/29379531
tags question: http://stackoverflow.com/q/29501448
tags question: http://stackoverflow.com/q/29515960
tags question: http://stackoverflow.com/q/29432600
tags question: http://stackoverflow.com/q/29418605
tags question: http://stackoverflow.com/q/29464535
tags question: http://stackoverflow.com/q/29476703
tags question: http://stackoverflow.com/q/29467340
tags question: http://stackoverflow.com/q/29443718
tags question: http://stackoverflow.com/q/29457475
tags question: http://stackoverflow.com/q/29383572
tags question: http://stackoverflow.com/q/29431225
tags question: http://stackoverflow.com/q/29482261
tags question: http://stackoverflow.com/q/29430567
tags question: http://stackoverflow.com/q/29396298
tags question: http://stackoverflow.com/q/29459515
tags question: http://stackoverflow.com/q/29402233
tags question: http://stackoverflow.com/q/29426756
tags question: http://stackoverflow.com/q/29471848
tags question: http://stackoverflow.com/q/29510154
tags question: http://stackoverflow.com/q/29454024
tags question: http://stackoverflow.com/q/29519811
tags question: http://stackoverflow.com/q/29503413
tags question: http://stackoverflow.com/q/29432148
tags question: http://stackoverflow.com/q/29479770
tags question: http://stackoverflow.com/q/29461337

http://stackoverflow.com/q/29425820
has answer: http://stackoverflow.com/a/29426053
has answer: http://stackoverflow.com/a/68550424
has comment: http://stackoverflow.com/comment/47034161
favorite count: 0
has answer: http://stackoverflow.com/a/29426078
has comment: http://stackoverflow.com/comment/47023039
has answer: http://stackoverflow.com/a/79104135
has answer: http://stackoverflow.com/a/29426684
upvote count: 16
linked to: http://stackoverflow.com/q/46496
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47023061
has answer: http://stackoverflow.com/a/29438693
has answer: http://stackoverflow.com/a/76602279
has comment: http://stackoverflow.com/comment/47023005
score: 16
has answer: http://stackoverflow.com/a/29432377
has title: Elegant way to find contiguous subarray within an array in JavaScript?
accepted answer: http://stackoverflow.com/a/29426078
type: Question
answer count: 8
has comment: http://stackoverflow.com/comment/47022924
has body: I wanted to write a function to find a contiguous subarray within a given array from a given starting index and return the index of the subarray within the array if it's found, and -1 if it's not found. This is similar to String.indexOf, but for arrays and subarrays instead of strings and substrings. This is my working code: var find_csa = function (arr, subarr, from_index) { if (typeof from_index === 'undefined') { from_index = 0; } var i, found, j; for (i = from_index; i &lt; 1 + (arr.length - subarr.length); ++i) { found = true; for (j = 0; j &lt; subarr.length; ++j) { if (arr[i + j] !== subarr[j]) { found = false; break; } } if (found) return i; } return -1; }; And these are my tests and their expected values: console.log(find_csa([1, 2, 3, 4, 5], [2, 3, 4]) === 1); console.log(find_csa([1, 2, 3, 4, 5], [5]) === 4); console.log(find_csa([1, 2, 3, 4, 5], [1, 3]) === -1); console.log(find_csa([1, 2, 3, 4, 5], [42]) === -1); console.log(find_csa([1, 2, 3, 4, 5], []) === 0); console.log(find_csa([3, 4, 3, 4, 3, 4], [3, 4, 3], 1) === 2); console.log(find_csa([6, 6, 6, 7], [6, 6, 7]) === 1); console.log(find_csa([12, 9, 16, 42, 7, 866, 3], [16, 42, 7, 866]) === 2); My code passes the tests, but as you can see, it uses a boolean value found in the inner loop which is just my messy, ad-hoc way of continuing an outer loop from a nested loop. is there a cleaner way of writing it? I looked into Array.prototype.findIndex but it is an experimental technology at the moment so I can't use it. I want a method that works in most browsers. I know there is a "polyfill" code snippet written on the Mozilla page, but that is even longer than my current code and it will be slower due to the function calls, so I'd rather avoid it. My primary goal for this function is performance (the subarrays will be very small, so I believe that using Boyer-Moore string search algorithm or tries is a tad overkill), and then my secondary goal is elegance of my implementation. With those two goals in m…
tagged with: arrays
linked to: http://stackoverflow.com/q/3081987
has comment: http://stackoverflow.com/comment/47041269
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29426053
has comment: http://stackoverflow.com/comment/47023008
downvote count: 0

http://stackoverflow.com/comment/46976992
score: 2
type: QuestionComment
has text: Error: SyntaxError: missing ) after condition;
comment on: http://stackoverflow.com/q/29400479
type: Comment

http://stackoverflow.com/comment/47042974
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29426763
has text: @bto.rdz I still think there's some debate regarding javascript being an object oriented language, but since that's irrelevant, i've modified the question. End of the day they are both function pointers correct?
score: 0

http://stackoverflow.com/a/29450749
type: Answer
has body: ASP.NET MVC model binder is not very well in deserializing complex types. You could do this in different ways: one way is to have a hidden element on the form with the name of the mising attribute in the model. the other way is to take one of the approaches available related to complex model bindings, for this take a look at these pages for complex model binding: http://erraticdev.blogspot.ca/2010/12/sending-complex-json-objects-to-aspnet.html How to post an array of complex objects with JSON, jQuery to ASP.NET MVC Controller?
answers question: http://stackoverflow.com/q/29449375
score: 0

http://stackoverflow.com/q/29448186
has answer: http://stackoverflow.com/a/29448206
type: Question
score: 0
tagged with: for-loop
has body: I was trying to run an example from MDN about for-loop in javaScript and for some reason it is not working. Here it is the code from MDN Loops and Iterations: Choose some music types, then click the button below: R&B Jazz Blues New Age Classical Opera I put it inside a html document and tried to run it. Then I got an error that the button, which I was trying to reach by id is not null, so I switched the places of the script and the html code. When I ran it again it did not work and in the Firefox console it was written that the selectObject parameter in the function is undefined. I think that howMany(document.selectForm.musicTypes) is undefined and the alert is not popping out. Does anyone have some suggestions why this might be?
tagged with: javascript
has answer: http://stackoverflow.com/a/29448212
answer count: 3
type: UnansweredQuestion
has title: JavaScript for-loop example from MDN not working
has answer: http://stackoverflow.com/a/29448249
has comment: http://stackoverflow.com/comment/47062800

http://stackoverflow.com/q/29432600
has answer: http://stackoverflow.com/a/29433312
type: Question
has comment: http://stackoverflow.com/comment/47035135
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/47035821
score: 0
has comment: http://stackoverflow.com/comment/47034782
has body: First time posting here, and first time creating a game in Javascript. I'm trying to create collision between two objects in my game, a bullet and an enemy, but for now, just trying to make something happen with just the bullet, when it reaches the top of the screen. When I press E, this happens: if (69 in keysDown &amp;&amp; timer == 0) //E { var newbullet = Object.create(bullet); newbullet.posx = ship.playerx; newbullet.posy = ship.playery; projectiles.push(newbullet); ship.shoot = true; } The bullet then moves upwards as it is stated in its update function. I'm running this function constantly in my game loop, which checks for collisions, and that looks like this: function Collision() { for (i = 0; i &lt;= projectiles.length; i++) { if (bullet.posy &lt; 0 ) { ctx.fillText("HIT" , 160, 340); ship.health -= 1; } } } but it doesn't work. I thought of substituting "bullet.posy" with "projectiles[i].posy, but it ends up saying that projectiles[i] is undefined. projectiles is a global array. var projectiles=[]; This is bullet: var bullet = { posx:0, posy:0, speed: 10, power: 2, draw: function() { ctx.fillStyle = "rgb(200,100,0)"; ctx.beginPath(); ctx.rect(((this.posx - 5)), (this.posy - 30), 10, 25); ctx.closePath(); ctx.fill(); }, setup: function(ax, ay) { this.posx = ax; this.posy = ay; }, update: function() { this.posy -= this.speed; } }; Any help or advice? Here is the link, if you wish to try it out E to shoot. Thank you.
answer count: 1
has comment: http://stackoverflow.com/comment/47035392
has comment: http://stackoverflow.com/comment/47035444
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47035231
has comment: http://stackoverflow.com/comment/47035622
has comment: http://stackoverflow.com/comment/47035252
tagged with: collision
has title: checking variable within array

http://stackoverflow.com/q/29479123
tagged with: jquery
has comment: http://stackoverflow.com/comment/47120111
has comment: http://stackoverflow.com/comment/47119231
has comment: http://stackoverflow.com/comment/47119773
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47120851
tagged with: css
has comment: http://stackoverflow.com/comment/47120557
answer count: 0
has title: The website resizes when the left property is changed
has comment: http://stackoverflow.com/comment/47120528
has body: I have a mobile navigation system implemented to my website, and it works perfectly on computers, however when I test the website on mobile devices it works as well however the website changes it size when the element is moved from left: -240px; to left: 0; My question Why is the website changing it's size and how to fix this issue? Here is my code: The meta tag: The body tag: The mobile navigation: Home The JavaScript $menuLeft = $('#main-template-navigation-mobile-container'); $nav_list = $('#main-template-mobile-expander'); $nav_list.click(function() { $('.mobile-nav-off').toggleClass('mobile-nav-on'); $menuLeft.toggleClass('mobile-navigation-right-push'); }); And the CSS: #main-template-header-mobile { display: none; z-index: 3000; } #main-template-navigation-mobile-container { position: fixed; width: 240px; height: 100%; overflow: hidden; } .mobile-navigation-right { left: -240px; } .mobile-navigation-right-push { left: 0; } .mobile-nav-off { position: relative; overflow-x: hidden; left: 0; } .mobile-nav-on { left: 240px; }
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/47119966
tagged with: javascript
score: 0

http://stackoverflow.com/q/29474615
tagged with: google-visualization
tagged with: javascript
score: 0
answer count: 1
has title: Format number on Y-axis of Google Chart
has answer: http://stackoverflow.com/a/29606908
type: UnansweredQuestion
has body: I have a web page that displays several Google Charts on a map - http://wa.water.usgs.gov/projects/puyallupgw/hydrographs.htm. On some of the charts, the numbers in the Y-axis have decimals. Can I format these numbers so that they all have the same number of decimal places? I am not able to post an image, but you can go to the web page and select 20N/03E-07Q02 from the dropdown menu. The numbers on the Y-axis are: 28.25 28.5 28.75 29 29.25 ... I'd like to format them so that they are: 28.25 28.50 28.75 29.00 29.25 Is that a possibility? I am creating these charts using the Image Charts (https://developers.google.com/chart/image/docs/gallery/line_charts).
type: Question
tagged with: charts

http://stackoverflow.com/q/29464293
has answer: http://stackoverflow.com/a/29464420
type: UnansweredQuestion
has title: How check a users name when accessing a route
tagged with: node.js
tagged with: authentication
type: Question
has comment: http://stackoverflow.com/comment/47091688
has body: Hi guys ive spent the last 3 hours trying to get this work so any help would be greatly appreciated. So i made an express webapp that has an admin page. I have the register and login done using passport and i can check if the user is logged in with the function var isAuthenticated = function (req, res, next) { // if user is authenticated in the session, call the next() to call the next request handler // Passport adds this method to request object. A middleware is allowed to add properties to // request and response objects if (req.isAuthenticated()) return next(); // if the user is not authenticated then redirect him to the login page res.redirect('/');} I when i click on the link for my admin route i want to check to see if the users username is equal to example and if it is allow it into the page. My code so far is var isAdmin = function (req, res, next) { if (req.session.username === 'example') { return next(); }else{ // if the user is not authenticated then redirect him to the login page res.redirect('/'); } and my route is router.get('/admin', isAdmin, function(req, res){ res.render('admin', { title : 'admin' }); }); I have both of these code snipets in my index route file. The problem that i am getting is that when i try to log in with the user called example it returns me to the login page. Any ideas how to fix?
has answer: http://stackoverflow.com/a/29464904
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/47091726
has comment: http://stackoverflow.com/comment/47091792

http://stackoverflow.com/comment/47179142
score: 0
type: Comment
type: QuestionComment
has text: @hindmost edited, sorry
comment on: http://stackoverflow.com/q/29511468

http://stackoverflow.com/a/30776665
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: I have forked the ui-select and enabled this functionality by adding a tag-on-blur='true' to the ui-select directive in your html. If you want you can use my repository while I wait for my pull request to be merged. https://github.com/mattmcardle/ui-select/tree/tag_on_blur If you were to use my fork and wanted to enable tagging on blur, your HTML code would look like this: &lt;h3&gt;Array of objects&lt;/h3&gt; &lt;ui-select multiple tagging tagging-label="new tag" tag-on-blur="true" ng-model="multipleDemo.selectedPeople" theme="select2" ng-disabled="disabled" style="width: 800px;"&gt; &lt;ui-select-match placeholder="Select person..."&gt;{{$item.name}} &amp;lt;{{$item.email}}&amp;gt;&lt;/ui-select-match&gt; &lt;ui-select-choices repeat="person in people | propsFilter: {name: $select.search, age: $select.search}"&gt; &lt;div ng-bind-html="person.name | highlight: $select.search"&gt;&lt;/div&gt; &lt;small&gt; email: {{person.email}} age: &lt;span ng-bind-html="''+person.age | highlight: $select.search"&gt;&lt;/span&gt; &lt;/small&gt; &lt;/ui-select-choices&gt; &lt;/ui-select&gt; &lt;p&gt;Selected: {{multipleDemo.selectedPeople}}&lt;/p&gt;
answers question: http://stackoverflow.com/q/29407098

http://stackoverflow.com/a/29471319
type: Answer
score: 3
upvote count: 3
has body: Refer to this link: http://ionicframework.com/docs/components/#striped-style-tabs. In order to make the header appears in top, there is a you could either remove the css style "position: abolute" of this class from the css file otherwise make it "position: inherit". This will solve the purpose.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29469876
accepted answer of: http://stackoverflow.com/q/29469876

http://stackoverflow.com/comment/47174908
type: Comment
comment on: http://stackoverflow.com/a/29505435
score: 0
has text: A web server uses User Agent to serve different web pages to different browsers. For example, a website could send mobile pages to mobile browsers and modern pages to modern browsers. When a browser connects to a website, it includes a User-Agent field in its HTTP header so that the web server can identify the browser. Same logic applies to Referrer header, it tells a web server about the address of the webpage that linked to the resource being requested. Jsoup might need to pretend as a browser when it connects to certain website. Mark this as answer if it works for you. Thanks!
type: AnswerComment

http://stackoverflow.com/a/29428303
has body: BTW https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia says: Note: This is a legacy API for backwards compatibility. Please see navigator.mediaDevices.getUserMedia for modern applications. So you'd better to use navigator.mediaDevices.getUserMedia (also) in your code.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47039529
answers question: http://stackoverflow.com/q/29428214
upvote count: 1
has comment: http://stackoverflow.com/comment/47090545
type: Answer

http://stackoverflow.com/comment/47097893
comment on: http://stackoverflow.com/a/29459125
score: 0
type: Comment
has text: Could also come from KnockoutJS as I know that Durandal is using Knockout for a lot of stuff.
type: AnswerComment

http://stackoverflow.com/a/29430375
type: Answer
downvote count: 0
score: 6
has body: I'm going to answer my own question as I went digging into the library code to see what it really does. Summary: The answer is you can use either of two methods and it will work as expected: 1) Pass in a random nonce of 96 bits in length and the library itself will add the 32 bit counter automatically and increment it with every keystream block generated. E.g. var nonce = CryptoJS.enc.Hex.parse('2301cd4ef785690a1b2c3dab'); // 12 Bytes var encryption = CryptoJS.AES.encrypt(plaintext, key, { iv: nonce, mode: CryptoJS.mode.CTR, padding: CryptoJS.pad.NoPadding }); 2) Pass in a random nonce of 96 bits in length and explicitly specify the 32 bit counter as well if you want to. You can even specify a counter like 00000009 if you want to start encrypting/decrypting from the 9th block. Below is an example starting from counter 0: var nonce = '2301cd4ef785690a1b2c3dab'; // 12 Bytes var counter = '00000000'; // 4 Bytes, start at counter 0 var nonceAndCounter = CryptoJS.enc.Hex.parse(nonce + counter); // 16 Bytes var encryption = CryptoJS.AES.encrypt(plaintext, key, { iv: nonceAndCounter, mode: CryptoJS.mode.CTR, padding: CryptoJS.pad.NoPadding }); Explanation: Using the code in the question with 32 bit counter of 00000000, the relevant code is in this file mode-ctr.js: /** * Counter block mode. */ CryptoJS.mode.CTR = (function () { var CTR = CryptoJS.lib.BlockCipherMode.extend(); var Encryptor = CTR.Encryptor = CTR.extend({ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher var blockSize = cipher.blockSize; var iv = this._iv; var counter = this._counter; // Generate keystream if (iv) { counter = this._counter = iv.slice(0); // Remove IV for subsequent blocks this._iv = undefined; } var keystream = counter.slice(0); cipher.encryptBlock(keystream, 0); // Increment counter counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 // Encrypt for (var i = 0; i &lt; blockSize; i++) { words[offset + i] ^= keystream[i]; } } }); CTR.Decryptor = Encryptor; r…
upvote count: 6
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29424027
has comment: http://stackoverflow.com/comment/47031504
has comment: http://stackoverflow.com/comment/77659001
has comment: http://stackoverflow.com/comment/47053646
accepted answer of: http://stackoverflow.com/q/29424027

http://stackoverflow.com/a/29457429
upvote count: 7
accepted answer of: http://stackoverflow.com/q/29432021
score: 7
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: There are already quite few github issues talking about the matter, you should simply specify your custom template: By overriding the template in the $templateCache Or by specifying a custom url for your template. Template could be &lt;div class="pagination" ng-if="pages.length &gt;= 2"&gt; &lt;ul class="pagination"&gt; &lt;li ng-if="currentPage &gt; 1"&gt; &lt;a ng-click="selectPage(1)"&gt;&amp;lt;&amp;lt;&lt;/a&gt; &lt;/li&gt; &lt;li ng-if="currentPage &gt; 1"&gt; &lt;a ng-click="selectPage(currentPage-1)"&gt;&amp;lt;&lt;/a&gt; &lt;/li&gt; &lt;li ng-repeat="page in pages" ng-class="{active: page==currentPage}"&gt;&lt;a ng-click="selectPage(page)"&gt;{{page}}&lt;/a&gt; &lt;/li&gt; &lt;li ng-if="currentPage &lt; numPages"&gt; &lt;a ng-click="selectPage(currentPage+1)"&gt;&gt;&lt;/a&gt; &lt;/li&gt; &lt;li ng-if="currentPage &lt; numPages"&gt; &lt;a ng-click="selectPage(numPages)"&gt;&gt;&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; running example
answers question: http://stackoverflow.com/q/29432021

http://stackoverflow.com/comment/47115927
comment on: http://stackoverflow.com/a/29472787
type: AnswerComment
score: 0
type: Comment
has text: @AnahitGhazaryan you added the code from the snnipet? the code was wrong in the snippet, i corrected just now.

http://stackoverflow.com/comment/48449377
type: AnswerComment
comment on: http://stackoverflow.com/a/30082225
type: Comment
has text: @muglio aaahhh, I see now. Yes, something odd about this Fiddle
score: 0

http://stackoverflow.com/q/29395140
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29395293
tagged with: css
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: I'm working on multiple arrays and occured to one problem. When I have only one question div generated I can add additional questions without problem, but if I add another question div, I can't add additional questions to neither of both windows(same applies to any other number too), error which is I get is newdiv[counterq] is undefined. Can anybody help me with this issue? Thanks! Also, how can I move div AddOption below created new one option input? I'm new at programming sorry if won't explain in correct terms. Thanks! Edit: Updated with new problem. Didn't wanted to create seperate topic. HTML : var counterq = 0; var limitq = 3; var countero = 0; var limito = 5; function AddContent(divName) { countero = 0; if (counterq == limitq) { alert("You have reached the limit of adding " + counterq + " inputs"); } else { var newdiv = new Array() newdiv[counterq] = document.createElement('div'); newdiv[counterq].className = "ContentWindow[" + counterq + "]"; newdiv[counterq].innerHTML = " Question " + (counterq + 1) + " "; if (countero == limito) { alert("You have reached the limit of adding " + countero + " options"); } else { newdiv[counterq].innerHTML += " Option " + (countero + 1) + " "; newdiv[counterq].innerHTML += " Option " + (countero + 2) + " "; document.getElementById(divName).appendChild(newdiv[counterq]); countero += 2; AddOption = function() { var counterq = 0; var limito = 5; if (countero == limito) { alert("You have reached the limit of adding " + countero + " options"); } else { newdiv[counterq].innerHTML += " Option " + (countero + 1) + " "; $("div[class*=ContentWindow]").css("height", "+=27"); countero++; } }; } $(".container").css("height", "+=344"); newdiv[counterq].innerHTML += " Add option "; counterq++; } } Add content
has title: Javascript dynamic array window with multiple answer options
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46966788

http://stackoverflow.com/comment/47018435
comment on: http://stackoverflow.com/a/29401804
type: Comment
type: AnswerComment
has text: @Shikkediel I really did not add the gradient on purpose I guess I had an older version of the OP fiddle (there seam to be quite a few of them :D)
score: 0

http://stackoverflow.com/q/29404363
answer count: 1
tagged with: jquery
has body: I do not know what I am doing wrong. For some reason I can not add this class to the #total-weight with JS. The CSS is fine because I have hard coded and is working. The sum is working perfect as well. /********** This is my HTML **************/ Grade (%) remaining (%) /******** This is my JS ***************/ 'use strict'; $(document).on('keyup', '.weight-value', function() { // the sum of weight (%) var sumWeight = 0; var totalWeight = 0; $('.weight-value').each(function(){ sumWeight += +$(this).val(); });// end of sum of weight (%) // populate weigth remaining totalWeight = $('#total-weight').val(100 - sumWeight); if(totalWeight < 0) { $('#total-weight').addClass('table-border'); } });// end document .on keyup
has answer: http://stackoverflow.com/a/29404387
accepted answer: http://stackoverflow.com/a/29404387
type: Question
has title: Add a class if var < 0 jquery
type: AnsweredQuestion
tagged with: addclass
tagged with: javascript
score: 0

http://stackoverflow.com/comment/47190828
type: Comment
has text: You may wish to provide a demo (JSFiddle etc), to show that it actually does what you think it does :)
score: 1
comment on: http://stackoverflow.com/a/29517502
type: AnswerComment

http://stackoverflow.com/comment/47026322
type: Comment
score: 0
has text: But you cannot deny that .html() has parameter string. we can write the code in many ways. But finally it must be String
type: AnswerComment
comment on: http://stackoverflow.com/a/29427917

http://stackoverflow.com/a/29441850
answers question: http://stackoverflow.com/q/29441774
downvote count: 0
upvote count: 6
type: Answer
score: 6
has body: You can use @keyframes for this. I don't know what your HTML looks like, but here's a little demo: .back { background:rgba(0,0,0,.95); display:block; height:500px; left:0; opacity:1; position:fixed; top:0; width:500px; } @keyframes back-change { from { background: rgba(133,133,133,.95) } to { background: rgba(0,0,0,.95) } } .back { animation: back-change 4s linear; } &lt;div class="back"&gt;&lt;/div&gt; I set it to change from light to dark over 4s in a linear pattern. You can change the duration or change the pattern to whatever you want (none, infinite, etc.). Notice that the name back-change that follows the @keyframes word is what you'll have to call in the the animation property later on. If you change the name in one spot, you'll have to change it in both. Here's a JSFiddle Example as well for messing around with on your own. You can also use CSS3 Transitions as well. These have been supported a little longer in web browsers. .back { background:rgba(0,0,0,.95); display:block; height:500px; left:0; opacity:1; position:fixed; top:0; width:500px; transition-property: background-color; transition-duration: 0.3s; } .back:hover { background-color: rgba(133,133,133,.95); } &lt;div class="back"&gt;&lt;/div&gt; Again, here's a JSFiddle Example for you to play with.

http://stackoverflow.com/comment/47033404
type: Comment
comment on: http://stackoverflow.com/q/29431798
has text: TypeError: $ is not a function $(document).ready(function () {
score: 0
type: QuestionComment

http://stackoverflow.com/q/29509140
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/29515887
tagged with: firefox
answer count: 1
downvote count: 0
tagged with: javascript
has title: Automating Wi-Fi Authorization with Firefox SDK
tagged with: wifi
tagged with: firefox-addon-sdk
has body: I'm trying to make a Firefox addon with the Firefox Add-on SDK and API, and I have some questions about their possibilities before I start using them. My college's Wi-Fi authorization expires every 30 minutes only to have fun pissing off their students. There are already some autofill addons available on many browsers but it's still destructing to move the mouse pointer onto the "Login" button and click it when there is one second left to turn in a midterm paper. I've heard my friends complaining like this for months and I myself think the thing is actually annoying sometimes, so I decided to develop a Firefox addon that takes charge of the job so that the authorization process will feel not even existing once the addon is activated. (I just want to impress my friends honestly.) For ease I would like to develop the addon within the Firefox add-on SDK. I found that my addon would be utilizing the page-mod, password and request APIs; page-mod to detect the Wi-Fi service's auto-redirection into their authorization page, password to fill in the page's form by a student ID and password stored in the individual Firefox browser, request to redirect the "Login Successful!" page into the originally given destination. So I guess it should be possible to achieve my goal with this SDK and APIs, but there are still some questions that I need to ask before I proceed: Is it possible to pass a callback function to page-mod::PageMod (not as a String or a URL to another JavaScript file)? If not, can it be done using the lower level API? Is it possible to actually redirect a page in a tab into another page only using high level APIs? Is it possible to remember the original destination's location (with the request method and contents) and call it in the process of page-mod::PageMod (in order to re-redirect out of the authorization page)? If not, can it be done using the lower level API? Is it possible to perform the addon's redirection function on inactive (background) tabs where the o…
favorite count: 0
has answer: http://stackoverflow.com/a/29515887

http://stackoverflow.com/comment/46941853
score: 1
has text: The resizeHandler function as you currently have it may not be calculating window width in time for loadImages to check it, which leads to the if statement being evaluated as "if undefined > 768". Here's a working fiddle for the resize: https://jsfiddle.net/qkguedu9/10/ It's not perfect - you should throttle the loadTheImages callback. I use _.debounce for that kind of thing but I think jQuery has an alternative.
comment on: http://stackoverflow.com/a/29378263
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29400259
has body: How can I know if grunt is running in verbose mode? Where is this configuration stored? I'm writing a grunt plugin for a library that already implements the concept of verbose. As I'm not planning to put grunt as a dependency, the library won't have access to something like: grunt.verbose from the grunt.log api. The communication is mostly based on events. I checked the source code of the log lib, but I was not able to find out how it is available on the grunt.registerMultiTask level. Any hint is welcome.
tagged with: javascript
tagged with: gruntjs
score: 2
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/29406935
favorite count: 0
type: Question
tagged with: node.js
upvote count: 2
has title: Check if grunt is running in verbose mode
answer count: 1
has answer: http://stackoverflow.com/a/29406935

http://stackoverflow.com/a/29411998
type: Answer
has body: Best practice for what you are asking is to use responsive design: http://responsivedesign.is/examples/playgrounds-and-sandboxes/lots-of-donuts for example: @media only screen and (min-width: 1300px) { #divId {width:1000px;}} @media screen and (max-width: 860px) {#divId {width:800px;} } @media screen and (max-width: 650px) { #divId {width:600px;}} @media screen and (max-width: 480px) { #divId {width:400px;}}
answers question: http://stackoverflow.com/q/29411569
score: 0
has comment: http://stackoverflow.com/comment/46996880

http://stackoverflow.com/comment/47075088
comment on: http://stackoverflow.com/a/29455030
has text: I think he thinks of another webpage or am I wrong?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29502314
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
has body: I'm learning Bacon.js and I'm very confused as to how I'm supposed to emit events. I have a super-simple example here of events in node.js var events = require('events') var eventEmitter = new events.EventEmitter() eventEmitter.on("add", function(data){ console.log(data+1) return data+1 }) eventEmitter.emit('add', 5) eventEmitter.emit('add', 3) setTimeout(function(){ eventEmitter.emit('add', 13) }, 1000) setTimeout(function(){ eventEmitter.emit('add', 10) }, 3000) I can't find one example of how something simple like this would be done with BaconJS and node. I tried this: var add = Bacon.fromEvent(eventEmitter, "add") add.onValue(function(data){ return data+1 }) add.map(5) add.map(3) add.map(13) add.map(10)
tagged with: events
has answer: http://stackoverflow.com/a/29503041
tagged with: node.js
favorite count: 0
tagged with: frp
downvote count: 1
has title: Emitting events with Bacon.js
type: AnsweredQuestion
tagged with: bacon.js
accepted answer: http://stackoverflow.com/a/29503041
score: -1

http://stackoverflow.com/comment/47240551
comment on: http://stackoverflow.com/a/29537250
score: 0
type: AnswerComment
type: Comment
has text: intro and outro. Thanks for that, I think it's the cleanest way to do what I'm looking for.

http://stackoverflow.com/comment/46970924
score: 0
type: Comment
has text: Spelling mistake: propAgation
type: AnswerComment
comment on: http://stackoverflow.com/a/29380623

http://stackoverflow.com/comment/47156140
has text: Just don't stringify, no?
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29498697

http://stackoverflow.com/a/29462365
has comment: http://stackoverflow.com/comment/47124267
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29462326
has body: You can try to match the date with a regular expression (this one ensures that it matches the format (DD/MM/YYYY or MM/DD/YYYY): if (date.match( /^\d{2}\/\d{2}\/\d{4}$/ )) { alert("Valid input!"); } else { alert("Wrong input!"); } This regular expression /^\d{2}\/\d{2}\/\d{4}$/ returns true if the string matches the following pattern: 2 digits Forward slash 2 digits Forward slash 4 digits Here's a JS Fiddle that shows it working. Here's another (more "Eloquent") solution (return a JavaScript Date through a function): function findDate(string) { var dateTime = /(\d{2})\/(\d{2})\/(\d{4})/; var match = dateTime.exec(string); return new Date(Number(match[3]), Number(match[2]) - 1, Number(match[1])); } alert(findDate("30-01-2003")); Also - I'd recommend reading Regular Expressions - Eloquent JavaScript
has comment: http://stackoverflow.com/comment/47108536
accepted answer of: http://stackoverflow.com/q/29462326
has comment: http://stackoverflow.com/comment/47089241
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/47105045
score: 1
has comment: http://stackoverflow.com/comment/47089712
has comment: http://stackoverflow.com/comment/47089506
has comment: http://stackoverflow.com/comment/47089745
has comment: http://stackoverflow.com/comment/47088738
has comment: http://stackoverflow.com/comment/47088839
has comment: http://stackoverflow.com/comment/47088713
downvote count: 0

http://stackoverflow.com/a/29441552
has body: This is the problem code: $( "#years a" ).click(function(e) { google.maps.event.trigger(map,'resize'); ctaLayer = new google.maps.KmlLayer(null); ctaLayer.setMap(null); year = $( this ).data('y') ; var ctaLayer = new google.maps.KmlLayer({ map: map, url: 'http://portfolio.amir-meshkin.com/_timeline/years/'+ year+'.kml' }); ctaLayer.setMap(map); //return false; e.preventDefault(); }); It creates a local version of ctaLayer (which is inaccessible outside of the function in which it is created) and adds it to the map. Remove the var from the declaration var ctaLayer = ... Working code snippet (from an updated version of your fiddle): var ctaLayer, map; $(document).ready(function() { Google = new google.maps.LatLng(41.875696, -87.624207); var mapOptions = { zoom: 2, center: Google }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); ctaLayer = new google.maps.KmlLayer({ url: 'http://portfolio.amir-meshkin.com/_timeline/years/0.kml', suppressInfoWindows: true, map: map }); ctaLayer.setMap(map); google.maps.event.addListener(ctaLayer, 'click', function(kmlEvent) { var text = kmlEvent.featureData.description; showInContentWindow(text); }); function showInContentWindow(text) { var sidediv = document.getElementById('history'); sidediv.innerHTML = text; } $("#years a").click(function(e) { google.maps.event.trigger(map, 'resize'); ctaLayer.setMap(null); //console.log( $( this ).data('y') ); year = $(this).data('y'); ctaLayer = new google.maps.KmlLayer({ map: map, url: 'http://portfolio.amir-meshkin.com/_timeline/years/' + year + '.kml' }); //return false; e.preventDefault(); }); }); html, body { height: 100%; margin: 0px; padding: 0; background: #000; } #map-canvas { height: 90%; } histor: 0 100 200 300
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47051980
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/29441303
has comment: http://stackoverflow.com/comment/47053521
answers question: http://stackoverflow.com/q/29441303

http://stackoverflow.com/q/29434035
has comment: http://stackoverflow.com/comment/47037921
has comment: http://stackoverflow.com/comment/47043856
has comment: http://stackoverflow.com/comment/47044671
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47044072
has comment: http://stackoverflow.com/comment/47042583
has comment: http://stackoverflow.com/comment/47038081
has title: Use ajax success return formatted data to populate easyUI form
tagged with: java
has comment: http://stackoverflow.com/comment/47038383
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has body: I am trying to use backend returned data to populate textboxes in the form. If I replace the "result" var with full raw data(eg.{ name:'myname', email:'mymail@gmail.com', subject:'subject', message:'message', language:'en' } it works... So it make wonder whether the returned data is not formatted properly or what? $.ajax({ type: "post", cache: false, contentType: 'application/x-www-form-urlencoded; charset=utf-8', url: "&lt;%=path%&gt;/storeRace", data:{ type:'query', venue:'&lt;%=race.getVenue()%&gt;', date:'&lt;%=race.getDate().toString()%&gt;', race_num:'&lt;%=race.getRaceNum()%&gt;' }, success:function(result){ if(result=="none"){ } else{ alert(result); $('#raceForm').form('clear'); $('#raceForm').form('load', result); } }, error:function(result){ $.messager.alert('Error',result,'error'); } });
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46960796
type: Comment
comment on: http://stackoverflow.com/a/29375504
type: AnswerComment
score: 0
has text: Running `gulp html` should actually do that judging from the Gulpfile of your generator

http://stackoverflow.com/comment/47080310
comment on: http://stackoverflow.com/q/29458094
type: QuestionComment
score: 2
has text: "without doing loopings". There is no way,
type: Comment

http://stackoverflow.com/q/29488362
has title: How to include gazon/gon in ActiveAdmin
tagged with: activeadmin
upvote count: 3
type: Question
has body: Im working on a Rails Project with ActiveAdmin and I want to use 'gem gon' to handle the sending of data in my javascripts file. The problem I encountered is that gon variable is not recognized in dashboard.rb of activeadmin. undefined local variable or method `gon' Here is my code so far as this railscast guide instructs: # creat gon variable gon.test = "hey there" render partial: 'graph/dashboard_graph.html.erb' #this is a partial I found this post but I have a different scenario. https://github.com/activeadmin/activeadmin/issues/2450 I also found this one with the same scenario but no clear solution: Active Admin: Including Javascript I have been trapped in this error for the whole day and been spending my time searching on how to properly include gon in ActiveAdmin but I could not find solution.Im hoping that you could give inputs. Thank You. Chkm8
tagged with: javascript
linked to: http://stackoverflow.com/q/10918213
answer count: 2
score: 3
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/35892950
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/59735120

http://stackoverflow.com/q/29498589
type: UnansweredQuestion
tagged with: angularjs-scope
type: Question
tagged with: angularjs-directive
tagged with: javascript
score: 0
tagged with: isolate-scope
has answer: http://stackoverflow.com/a/29498746
answer count: 1
has body: I'm trying to update some code in a small personal project which uses angular to conform to better practices, and I have heard that the future of Angular can be mimicked in a way by putting a lot of functionality into controllers of directives. I'm not sure how correct my understanding is but it seems like a clean way of organizing code. Anyways, to get to the point of my issue, I can't seem to get the isolate scope to work when I give my directive a controller. I've been googling my brains out trying to figure out what the issue is, and I saw many topics about it, but none which solved my issue. Here's a code fragment: angular.module('myCongresspersonApp') .directive('congressPersonPane', function () { var controller = [function() { }]; return { templateUrl: 'app/congressPersonPane/congressPersonPane.html', restrict: 'EA', scope: { congressPerson: '=info' }//, // controller: controller, // controllerAs: 'paneCtrl', // bindToController: true }; }); This is really just a way to test before I move functionality around, but when I uncomment those lines, I no longer have access to the isolate scope I pass in and all the data accessed through that is gone (it is an array object in a ng-repeat). I also have a similar problem in a directive which sits inside this directive. That problem makes me even more confused, as I can correctly use a method if I define it under the $scope, but when I use controllerAs, I cannot use that method. So I am pretty stumped as I pulled this implementation (to remove scope) from this website (mentioned by Lauren below) here's the code for that: 'use strict'; angular.module('myCongresspersonApp') .directive('voteRecord', function () { var controller = ['$scope', 'sunlightAPI', function ($scope, sunlightAPI) { var voteCtrl = this; voteCtrl.voteInfo = []; voteCtrl.test = 'Test'; voteCtrl.pageNumber = 1; voteCtrl.repId = ''; console.log('inside controller definition'); voteCtrl.getVotingRecord = function(repId) { console.log('inside method'); vot…
tagged with: angularjs
has title: Issues with controllers in Directives

http://stackoverflow.com/comment/47057431
type: QuestionComment
comment on: http://stackoverflow.com/q/29445014
has text: Post your HTML, or make a jsfiddle
score: 0
type: Comment

http://stackoverflow.com/a/29413986
has comment: http://stackoverflow.com/comment/47003909
has body: Put all variables inside some object i.e.: $scope.Model = { selectedAsset : 'mySelectedAsset1', selectedAsset2 : 'mySelectedAsset2', selectedAsset3 : 'mySelectedAsset3' } Then you can: &lt;div ng-repeat&gt; //new scope &lt;div ng-repeat&gt; // new scope &lt;input ng-model="Model.selectedAsset"&gt; This also lows your 'dependency' on $scope, defining such Model object will show everyone who is reading your code what model u have.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29413480
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29413480
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/29478166
answer count: 1
linked to: http://stackoverflow.com/q/11486256
has comment: http://stackoverflow.com/comment/47122235
has comment: http://stackoverflow.com/comment/47119398
has comment: http://stackoverflow.com/comment/47120356
tagged with: tampermonkey
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47118761
has comment: http://stackoverflow.com/comment/47218724
has title: How to delay an XMLHttpRequest in GreaseMonkey until the target page is finished loading
has comment: http://stackoverflow.com/comment/47117012
type: Question
tagged with: greasemonkey
tagged with: javascript
has body: This is a GreaseMonkey specific request. I'm trying to use the GM_xmlhttpRequest to make a GET request to a page (cross domain). The problem is, the target page fetches a lot of its content after the page has been loaded once (and until then it shows a progress bar for a few seconds) when opened in the browser (again through AJAX). I want to fetch the contents of this page only when everything has been loaded, so am simply looking for a way to add a few seconds delay in the request. Is it even possible? If yes, how can I do that? Edit: I think I'm not clear enough. I am calling a page like this: GM_xmlhttpRequest({ method: "GET", url: "http://example.com", onload: function(response) { if(response.responseText.length &gt; 0) { callBack(response.responseText); } }, onerror: function(response) { log("Error in fetching contents: " + response.responseText); } }); The page I'm actually using instead of example.com loads once but then delay loads its useful contents. but the response.responseText only contains the initial load HTML. Thanks!
tagged with: ajax
duplicate of: http://stackoverflow.com/q/11486256
has answer: http://stackoverflow.com/a/29478280
score: 0
has comment: http://stackoverflow.com/comment/47120718

http://stackoverflow.com/a/29379049
score: 0
answers question: http://stackoverflow.com/q/29378993
has body: This is the classic closure issue: The function you pass to click has an enduring reference to the i variable, not a copy of it as of when the function is created. So all of your clicks end up using the value of i when the click occurs (after the loop finishes). The usual solution is to use a builder function: do { $('.dot:nth-child('+ i +')').click(buildHandler(i)); i++; } while (i &lt;= number); function buildHandler(index) { return function(){ $('.inside').animate({ 'width' : (index*width)+'%' }, 500); }; } That said, in this case, you don't need different handler functions for each element; instead, just have one handler function that checks to see which child it's dealing with: $('.dot').click(function(){ var index = $(this).index(); $('.inside').animate({ 'width' : (index*width)+'%' }, 500); }); More: index
type: Answer

http://stackoverflow.com/comment/47028612
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29428922
has text: Strange behaviour. I tried to create a Fiddle, and it is working on phone o_O https://jsfiddle.net/vw0ogsca/. it might be a bad update (test is with v1.81)

web-frontend
tags question: http://stackoverflow.com/q/29514437
tag name: web-frontend
tags question: http://stackoverflow.com/q/29500596
type: Tag

http://stackoverflow.com/a/29629407
type: Answer
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29501448
has body: you can see Sedgewick's merge sort implementation: http://algs4.cs.princeton.edu/22mergesort/Merge.java.html he use copy of input array to maintain small arrays inside merge_sort function, so he does not have any overhead with array creation and pushing elements to it.

http://stackoverflow.com/comment/47145774
type: Comment
comment on: http://stackoverflow.com/a/29492478
score: 1
type: AnswerComment
has text: @SivaDotRender that is correct. Node.js is used to build a lot of front-end modules. You'll see a variety of closures for modules that end up being loaded in such a way. One resource you might find useful is [umdjs](https://github.com/umdjs/umd).

http://stackoverflow.com/q/29444104
type: Question
has comment: http://stackoverflow.com/comment/47055809
tagged with: arrays
tagged with: javascript
score: 0
tagged with: dynamic
answer count: 0
type: UnansweredQuestion
tagged with: local-storage
has body: I am creating a delete function for an offline web app without using jQuery. A delete button is created when a "task" is added. Originally it was for a check box but I think it looks better with a button. When a "task" is added, 7 arrays are created. One for the "subject", "type", "date", "instructor", "title", "description", and the delete button. for(var c = 0; c&lt;colCount; c++ ){ var addCell = row.insertCell(c); switch(c){ case 0: addCell.innerHTML = subjectClass; break; case 1: addCell.innerHTML = roomClass; break; case 2: addCell.innerHTML = instructorClass; break; case 3: addCell.innerHTML = dayClass; break; case 4: addCell.innerHTML = startTimeClass; break; case 5: addCell.innerHTML = endTimeClass; break; case 6: addCell.innerHTML = addCell.innerHTML + "&lt;input type='button' value='Delete' onclick='deleteRow('taskTable')'/&gt;"; break; And this is the code I had for the checkbox... I tried doing this but it does not seem to work. function deleteRow(taskTable){ var table = document.getElementById("taskTable"); var rowCount = table.rows.length; var subjectR = localStorage.getItem("subjectInfo"); var typeR = localStorage.getItem("typeInfo"); var dueDateR = localStorage.getItem("dueDateInfo"); var instructorR = localStorage.getItem("instructorInfo"); var titleR =localStorage.getItem("titleInfo"); var descriptionR =localStorage.getItem("descriptionInfo"); var subjectAll = JSON.parse(subjectR); var typeAll = JSON.parse(typeR); var dueDateAll = JSON.parse(dueDateR); var instructorAll = JSON.parse(instructorR); var titleAll = JSON.parse(titleR); var descriptionAll = JSON.parse(descriptionR); for(var c=1; c&lt;rowCount; c++){ var row = table.rows[c]; var arrayLength = subjectAll.length; table.deleteRow(c); var removeValue = arrayLength-c; subjectAll.splice(removeValue,1); typeAll.splice(removeValue,1); dueDateAll.splice(removeValue,1); instructorAll.splice(removeValue,1); titleAll.splice(removeValue,1); descriptionAll.splice(removeValue,1); localStorage.setItem("s…
has title: Deleting array elements when a button is clicked without using jQuery
has comment: http://stackoverflow.com/comment/47056035

http://stackoverflow.com/q/29385089
favorite count: 0
answer count: 0
downvote count: 0
type: UnansweredQuestion
type: Question
score: 1
upvote count: 1
has title: Accessing local network site giving 401
tagged with: javascript
tagged with: ajax
has body: I'm trying to create a plugin to check some values hosted on a local site. the auth on the page is done via Windows Authentication. so I was trying to create an xhr request, but that still gave me 401 // method 1 function get_information(link, callback) { var xhr = new XMLHttpRequest(); xhr.open("GET", link, true, "User","Password"); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { callback(xhr.responseText); } }; } same for an ajax request (with the webtoolkit.base64.js) // method 2 function make_basic_auth(user, password) { var tok = user + ':' + password; var hash = Base64.encode(tok); return "Basic " + hash; } function get_info2(url){ var auth = make_basic_auth('User','Password'); $.ajax({ url : url, method : 'GET', beforeSend : function(req) { req.setRequestHeader('Authorization', auth); } }); } So is it just impossible to fetch that data in via an extention, or am I doing something wrong?

http://stackoverflow.com/q/29435703
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/47045458
has body: I'm trying to load a bunch of SVG image files (I only have one right now, but I will have more) to make a kind of toolbar. So I set the data of my selection with objects that have the file name. Then I call enter(), then I try to call append() with a function to load a different SVG element depending on the data, but I just get errors there. From looking at the error it seems like d3 is assuming the argument to append was a string, but the documentation says you can pass it a function as well. Am I doing this correctly, or is there an easier way to load SVG files? (the actual function that loads the SVG might not work, I haven't gotten that to work yet, but that's not the immediate issue) toolbarBtns.selectAll('.toolbar-btn') .data([ { img: 'img/erase.svg', onclick: function() { clear(); update(); } } ]) .enter() .append(function(d) { var btn = null; d3.xml(d.img, 'image/svg+xml', function(xml) { btn = this.appendChild(xml.documentElement); }); while (!btn) ; console.log(btn); return btn; }) .attr('class', 'toolbar-btn') .attr('width', '40') .attr('height', '40') .attr('x', function(d, i) { return 5 + i * 40; }) .attr('y', '5') .on('mouseover', function() { d3.select(this).select('svg circle') .attr('fill', 'red'); }) .on('mouseout', function() { d3.select(this).select('svg circle') .attr('fill', 'none'); }) .on('click', function(d, i) { d.onclick.apply(this, [d, i]); });
upvote count: 2
tagged with: d3.js
type: UnansweredQuestion
score: 2
answer count: 0
has title: How to load svg files with d3?
type: Question
has comment: http://stackoverflow.com/comment/47045078
tagged with: javascript
has comment: http://stackoverflow.com/comment/47042316
downvote count: 0

http://stackoverflow.com/comment/47096128
score: 0
type: Comment
type: QuestionComment
has text: I try to use the API setMandatory(mandatory) but it doesnt work or i dont know how to use it. Appreciate the help. Thank you
comment on: http://stackoverflow.com/q/29466832

http://stackoverflow.com/q/29431085
possible better answer: http://stackoverflow.com/a/29431126
favorite count: 0
has answer: http://stackoverflow.com/a/29431126
tagged with: selenium-webdriver
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47031844
downvote count: 0
has title: Selenium not able to locate element in browser DOM
tagged with: selenium
type: Question
tagged with: javascript
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/29432061
tagged with: css-selectors
accepted answer: http://stackoverflow.com/a/29432061
has body: I have a tests suite where I must have to use css selectors. When I make a query through selenium driver.findElement(By.cssSelector("#credentials.errors")); OR if (driver instanceof JavascriptExecutor) { ((JavascriptExecutor) driver).executeScript("document. getElementById('credentials.errors');"); } OR If I search for #credentials.errors manually in browser csspath query It's simply not able to locate element but I can locate that element in browser console by making query document.getElementById('credentials.errors') My question is if element can located by JavaScript console then why not by selenium webdriver?
has answer: http://stackoverflow.com/a/29437841

http://stackoverflow.com/q/29424842
favorite count: 0
type: UnansweredQuestion
tagged with: router
has answer: http://stackoverflow.com/a/29425792
score: 2
has answer: http://stackoverflow.com/a/29425713
tagged with: iron-router
upvote count: 2
has body: I have a block of code wrapped in a meteor {{#if currentUser}} block as so: {{#if currentUser}} {{> step1}} {{else}} {{redirect}} {{/if}} {{#if currentUser}} {{> step2}} {{else}} {{redirect}} {{/if}} Setup: Step 1 of 2 Next Setup: Step 2 of 2 Previous Complete and a helper function redirect in my javascript like this: //setup redirects Template.setup.helpers({ redirect: function() { return Router.go('login'); } }); Template.setup2.helpers({ redirect: function() { return Router.go('login'); } }); However, when I visit the /setup or /setup2 pages they always redirect to the login page, even if a current user is logged in. What could be causing this? Appreciate any help. Thank You!
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47021033
answer count: 2
downvote count: 0
tagged with: jquery
tagged with: meteor
has title: Meteor {{#if currentUser}} not behaving as expected

http://stackoverflow.com/comment/46972465
comment on: http://stackoverflow.com/q/29398185
score: 0
type: Comment
type: QuestionComment
has text: never mind! just tell me if that is the correct way how to do it, if it not then please tell me!

http://stackoverflow.com/a/29470111
has comment: http://stackoverflow.com/comment/47102729
type: AcceptedAnswer
downvote count: 0
has body: Let the id of the &lt;img&gt; be "imageOne" as follows: &lt;img src="http://foo.bar/blah.jpg" id="imageOne" /&gt; Using javascript you can do the following: var imageElement = document.getElementById("imageOne"); var imageElementSrc = imageElement.src; imageElementSrc now holds the src of the imageElement. console.log(imageElementSrc) would print "http://foo.bar/blah.jpg" to the console. If you have only one &lt;img&gt; element as you have shown in your code, you could do var imageElement = document.getElementsByTagName("img")[0]; var imageElementSrc = imageElement.src; in order to get the src.
score: 1
has comment: http://stackoverflow.com/comment/47101979
answers question: http://stackoverflow.com/q/29470010
type: Answer
accepted answer of: http://stackoverflow.com/q/29470010
has comment: http://stackoverflow.com/comment/47102639
upvote count: 1
has comment: http://stackoverflow.com/comment/47101942

onfocus
tag name: onfocus
tags question: http://stackoverflow.com/q/29528937
tags question: http://stackoverflow.com/q/29377253
tags question: http://stackoverflow.com/q/29492453
tags question: http://stackoverflow.com/q/29523928
type: Tag

http://stackoverflow.com/comment/47101762
type: QuestionComment
has text: Have you checked this http://ionicframework.com/docs/components/#striped-style-tabs
comment on: http://stackoverflow.com/q/29469876
score: 0
type: Comment

http://stackoverflow.com/comment/47104754
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29471700
type: Comment
has text: Could you please add a var_dump of your $connection object?

http://stackoverflow.com/comment/52776135
type: AnswerComment
type: Comment
score: 28
comment on: http://stackoverflow.com/a/29514474
has text: `gulp-shell has been blacklisted`: What do you mean by that?

http://stackoverflow.com/comment/47739056
type: AnswerComment
has text: To this code work out correctly, you need to configure the time slots to show the label of time for the lines. If we put the length of the slots as 00:15:00, 00: 00: 30: 00, or 00:45:00 the labels the lines will not appear. You must add one second to the end of the slot duration: 00:15:01.
comment on: http://stackoverflow.com/a/29489668
score: 0
type: Comment

http://stackoverflow.com/comment/47027810
type: Comment
comment on: http://stackoverflow.com/a/29428851
type: AnswerComment
has text: And the "button"is the ID or the button name ? and why the url demo_test.txt ?
score: 0

http://stackoverflow.com/comment/47171557
comment on: http://stackoverflow.com/q/29507364
type: Comment
type: QuestionComment
has text: `$(" ")` is not a valid selector. use `$("option")` instead.
score: 0

http://stackoverflow.com/q/29418424
has title: How to create a thread pool in nodejs?
tagged with: node.js
has answer: http://stackoverflow.com/a/29418628
tagged with: multithreading
downvote count: 3
upvote count: 1
answer count: 1
has body: So out of curiosity, I was thinking of creating my own thread pool in nodejs from which I can run number of threads in parallelly? Been looking to webworker-threads and npool but not being to understand much from it.. Is it possible to create a thread pool in nodejs? Also how to execute number of threads from the pool created in parallel number of threads/chid_processes? Like is distributed system?
linked to: http://stackoverflow.com/q/18613023
tagged with: threadpool
tagged with: javascript
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/18613023
tagged with: child-process
favorite count: 0
type: Question
score: -2

http://stackoverflow.com/a/29507491
score: 0
has comment: http://stackoverflow.com/comment/47174205
type: Answer
has body: That error means you're calling a method that doesn't exist. I would install mongoose module again: npm install mongoose --save
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/78916008
answers question: http://stackoverflow.com/q/29506814

http://stackoverflow.com/q/29515117
has comment: http://stackoverflow.com/comment/47185806
answer count: 2
upvote count: 0
tagged with: jquery
favorite count: 0
score: -1
tagged with: attr
has answer: http://stackoverflow.com/a/29515324
has comment: http://stackoverflow.com/comment/47185708
type: AnsweredQuestion
has body: So I'm getting the data-id attribute like this: $(this).data("id") And now I need to put the result of the data-id somewhere else in my jQuery code. So I need the result to be printed here: selector: 'DATA-ID-RESULT', Can anyone shed any light - I'm not sure what to do
downvote count: 1
has answer: http://stackoverflow.com/a/29515373
has comment: http://stackoverflow.com/comment/47185813
type: Question
accepted answer: http://stackoverflow.com/a/29515324
has title: Get data-attribute and put it somewhere else? jQuery
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29515373

http://stackoverflow.com/a/29426421
type: Answer
answers question: http://stackoverflow.com/q/29401915
has body: Sorry I late. Test this code. Let me know if work for you. setTimeout(function(){ alert($('select').html()); $('select').html(' Value '); }, 1000) Original
score: 0

http://stackoverflow.com/a/29483265
upvote count: 2
answers question: http://stackoverflow.com/q/29467362
has body: The easy way: https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Services.jsm let observer = { observe: function() { dump("oh observing") } }; function startup(data, reason) { Services.obs.addObserver(observer, "*", false); observer.observe(); } My suggest is create a log file with the preferences; to output dump calls instead to a file, set browser.dom.window.dump.file to the file destination where the log should be created and restart the application. https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/Preference_reference/browser.dom.window.dump.file
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29467362

http://stackoverflow.com/q/29396210
tagged with: onload
has comment: http://stackoverflow.com/comment/47005646
tagged with: vbscript
type: Question
has comment: http://stackoverflow.com/comment/47005240
tagged with: hta
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/47005353
has answer: http://stackoverflow.com/a/29396774
has comment: http://stackoverflow.com/comment/46969005
tagged with: http://stackoverflow.com/tag/html
score: 1
has title: VBScript set value at onload
favorite count: 0
has comment: http://stackoverflow.com/comment/46969442
type: UnansweredQuestion
has body: I have an HTA with VBScript that has an element set to a variable, SN2: Set to print out to an HTML textbox: And this works well! However, I wanted to set the value to display in the textbox on onload To do this, I set my VBScript function to . And this works well, except there is another function I need to set to body onload So I was wondering if there was a way to set my document.getElementById("ComputerName").value = SN2 to onload in a different way. I know the way in javascript, like you can set document.getElementById("ComputerName").onload, but that doesn't seem to be working in VBScript. Can this be done in VBScript, and if so, how? I can't use javascript for my case. I'm referring specifically to this method (although I don't need any of that iframe stuff they have in this example). For some reason this JS way doesn't translate in VBScript. Thanks for any input!
upvote count: 1

http://stackoverflow.com/comment/47109929
has text: I'd have to see more details. There must be some difference in the boilerplate around the nav menu.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29441660

http://stackoverflow.com/comment/47186470
type: AnswerComment
has text: While resizing a web browser under 768px `bxSlider()` will be instantiated multiple times.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29515199

selenium
tags question: http://stackoverflow.com/q/29414772
tags question: http://stackoverflow.com/q/29390635
tags question: http://stackoverflow.com/q/29382656
tags question: http://stackoverflow.com/q/29467990
tags question: http://stackoverflow.com/q/29377734
tags question: http://stackoverflow.com/q/29380491
tags question: http://stackoverflow.com/q/29528620
tags question: http://stackoverflow.com/q/29402871
tags question: http://stackoverflow.com/q/29408841
tag name: selenium
tags question: http://stackoverflow.com/q/29438273
tags question: http://stackoverflow.com/q/29420070
tags question: http://stackoverflow.com/q/29374066
tags question: http://stackoverflow.com/q/29377730
type: Tag
tags question: http://stackoverflow.com/q/29517675
tags question: http://stackoverflow.com/q/29431085
tags question: http://stackoverflow.com/q/29458984
tags question: http://stackoverflow.com/q/29489701

http://stackoverflow.com/comment/47036922
type: Comment
type: QuestionComment
has text: Anyway you might wanted to ask how to stop an interval since this is your problem, but if you knew that you could have probably found it on google yourself.
score: 0
comment on: http://stackoverflow.com/q/29432361

http://stackoverflow.com/comment/47196033
type: AnswerComment
comment on: http://stackoverflow.com/a/29520472
type: Comment
score: 3
has text: Do you want to get marked as an answer? Because that's how you get marked as an answer.

http://stackoverflow.com/q/29440451
tagged with: javascript
has answer: http://stackoverflow.com/a/29440499
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/29440499
accepted answer: http://stackoverflow.com/a/29440574
tagged with: jquery
has title: jQuery How to get td cell value
has body: I am trying to get the value of invoice number when user clicks anywhere on a row Below is my table Invoices Invoice Number Invoice Total INV-Error_Test1 22.000000 USD INV-Error_Test2 22.000000 USD Below is the jQuery I have which gives the Invoice Number only if its clicked on Invoice Number field $("#invoiceList td").click(function (e) { var result = $(this).text(); console.log('invoice --->'+result); }); http://jsfiddle.net/5n62md3m/ Can someone help me get the invoice number when user clicks anywhere on the row.
has answer: http://stackoverflow.com/a/29440494
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29440574
type: Question

http://stackoverflow.com/q/29410449
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47001648
has comment: http://stackoverflow.com/comment/47005603
possible better answer: http://stackoverflow.com/a/29454666
tagged with: ng-grid
favorite count: 0
has answer: http://stackoverflow.com/a/29454666
has body: I am trying to render data in table form to front-end in angular and there i've used ng-grid and ui-grid so far. But they seems to be slowing down performance as there are lot more rows sometimes like 200+ per grid and more than 20 grids on single page. So the browser most of the times hangs up i just needed to show data no operation is needed to be performed on data. it just needs to be rendered. So anybody please help if you have any other idea to render this much data in grid form.
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47002216
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47027397
has answer: http://stackoverflow.com/a/29415890
has comment: http://stackoverflow.com/comment/46994866
has title: best way to render data in tables in angular
accepted answer: http://stackoverflow.com/a/29415890
type: Question
has comment: http://stackoverflow.com/comment/47027439
tagged with: performance
tagged with: javascript
score: 4
upvote count: 4

http://stackoverflow.com/q/29445908
score: 1
duplicate of: http://stackoverflow.com/q/28250680
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/47059978
favorite count: 0
linked to: http://stackoverflow.com/q/28250680
tagged with: asynchronous
has answer: http://stackoverflow.com/a/29446083
has answer: http://stackoverflow.com/a/29446067
tagged with: promise
has comment: http://stackoverflow.com/comment/47059953
has title: collecting data from multiple async functions(promises)
type: UnansweredQuestion
upvote count: 1
has body: Given a situation where you have to get data from multiple async functions or promises, what is the best way to collect and persist the data so it can be used after all are complete. An example situation would be multiple database queries which need to get rendered in a single page. I've come across the below code, which looks like a solid pattern to me, but being new to the async game am unsure. function complexQuery(objectId) { var results = {}; return firstQuery.get(objectId).then(function (result1) { results.result1 = result1; return secondQuery.find(); }) .then(function (result2) { results.result2 = result2; return thirdQuery.find(); }) .then(function (result3) { results.result3 = result3; return results; }); } complexQuery(objectId) .then(function (results) { //can use results.result1, results.result2, results.result3 res.render('dash', results); //example use }); What is the best way to handle this kind of situation? Edit for clarification: Must be in series, queries may require information from a preceding promise result.
tagged with: node.js

http://stackoverflow.com/q/29459500
has answer: http://stackoverflow.com/a/29462693
tagged with: javascript
has comment: http://stackoverflow.com/comment/47087517
has title: setState not triggering a re-render when data has been modified
answer count: 2
has comment: http://stackoverflow.com/comment/47087966
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47084967
score: 7
tagged with: setstate
tagged with: http://stackoverflow.com/tag/json
has body: Just started working with React, and it's been going relatively smooth up until this point. I have a list, that contains X pre-defined items, which means that the list is always rendered with a given amount of rows. This data is collected from a REST API, prior to the list rendering. The data contains variables relating to the list, as well as an array that contains each item within the list. I chose the easy route, so I populate every component with a single JSON object named 'data', that contains everything necessary. Rendering the list looks something like this: &lt;MyList data={data} /&gt; Then, in the getInitialState of MyList: dataInt: this.props.data.dataInt || 0, dataStr: this.props.data.dataStr || '', rows: this.props.data.rows || [] So I store my array of items (JSON) in the initial state of the list (parent), and when I choose to render the list, I first create all components (children) in an array, like this: var toRender = []; for(i = 0; i &lt; this.state.rows.length; i++) { toRender.push(&lt;ItemRow data={this.state.rows[i]} /&gt;); } and then I render like this: return ( &lt;div className="item-container"&gt; &lt;table className="item-table"&gt; {toRender} &lt;/table&gt; &lt;/div&gt; ); The render-function of MyItem look something like this: return ( &lt;tr&gt; &lt;td&gt;{this.state.dataFromItem}&lt;/td&gt; &lt;/tr&gt; ); Now, let's say I want to modify the child data from within the parent, with some new data I just got from the API. Same structure, just the value of one field/column has changed: i = indexOfItemToBeUpdated; var newRows = this.state.rows; newRows[i] = data; // New JSON object with same keys, different values. this.setState({ rows: newRows }); // Doesn't trigger re-render this.forceUpdate(); // Doesn't trigger re-render What am I doing wrong? At first I thought it was because I was wrapping the render function of MyItem in a , but since it renders perfectly fine on the initial render, I will assume that is an acceptable wrapper. After …
upvote count: 7
type: Question
tagged with: reactjs
has answer: http://stackoverflow.com/a/29787975

http://stackoverflow.com/comment/47186900
has text: possible duplicate of [Get the size of the screen, current web page and browser window](http://stackoverflow.com/questions/3437786/get-the-size-of-the-screen-current-web-page-and-browser-window)
score: 0
comment on: http://stackoverflow.com/q/29515624
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47084065
type: Comment
has text: You generally can't do that, when you can it's called XSS.
comment on: http://stackoverflow.com/q/29460146
score: 0
type: QuestionComment

http://stackoverflow.com/comment/47133394
score: 1
has text: After upgrading node to 0.12, I am also getting 100% CPU usage with watch... dont know what to do.. Searched for issues on grunt-contrib-watch but couldnt find anything that solves the problem...
type: QuestionComment
comment on: http://stackoverflow.com/q/29483259
type: Comment

http://stackoverflow.com/q/29467987
has title: Error while using async.parallel
has body: I am getting binding error while using async in node.js. The code in question: var async = require('async'); var fs = require('fs'); var path = require('path'); function ignoreWhiteSpaceJudge(outDesired, outGenerated){ var contentOutDesired = ""; var contentOutGenerated = ""; async.parallel([ function(outDesired, callback) { console.log(outDesired); fs.readFile(outDesired, 'utf8',function(error, data) { if (error) { return callback(error); } else { contentOutDesired = data; return callback(); } }); }, function(outGenerated, callback) { fs.readFile(outGenerated, 'utf8', function(error, data) { if (error) { return callback(error); } else { ontentOutGenerated = data; return callback(); } }); }], function(error){ if(error){ console.log(error); } else{ console.log(contentOutDesired); console.log(ontentOutGenerated); } }); } var pathToOutDesired = path.normalize('/home/repos/gabbar/testcases/outputs/output_1_1.out'); var pathToOutGenerated = path.normalize('/home/repos/gabbar/testcases/outputs/output_1_2.out'); ignoreWhiteSpaceJudge(pathToOutDesired, pathToOutGenerated); The error I am getting looks like this: [Function] fs.js:423 binding.open(pathModule._makeLong(path), ^ TypeError: path must be a string at Object.fs.open (fs.js:423:11) at Object.fs.readFile (fs.js:206:6) at async.parallel.fs.readFile.ontentOutGenerated (/home/repos/gabbar/validation/ignoreWhiteSpaceJudge.js:17:18) at /home/repos/gabbar/node_modules/async/lib/async.js:570:21 at /home/repos/gabbar/node_modules/async/lib/async.js:249:17 at /home/repos/gabbar/node_modules/async/lib/async.js:125:13 at Array.forEach (native) at _each (/home/repos/gabbar/node_modules/async/lib/async.js:46:24) at async.each (/home/repos/gabbar/node_modules/async/lib/async.js:124:9) at _asyncMap (/home/repos/gabbar/node_modules/async/lib/async.js:248:13) I am relatively new to node.js and trying to use async module for the first time. Could somebody help me in this regard?
upvote count: 1
has answer: http://stackoverflow.com/a/29468111
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29468111
type: Question
tagged with: async.js
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: fs
score: 1

http://stackoverflow.com/q/29392166
has title: How To Active Bootstrap Tab after Button Click in ASP.NET
score: 1
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I am working in asp.net and i use twitter bootstrap plugins. In my form i use a Tab. There are two option in Tab. #1 is Map and #2 is Address. Basically i submit a form and save the data into database when data is save then i want saved data shown in #2 Tab (Address Tab). I found many article in stackoverflow related it, but i not achieve this. Code:-ASP Map Address Loading Please Wait... <asp:DataList ID="dlAddress" runat="server" CellPadding="4" ForeColor="#333333" RepeatColumns="1" Width="100%"> </asp:DataList> Code:-Javascript $('#<%= btnSave.ClientID %>').click(function () { $('.nav-tabs > .active').next('li').find('a').trigger('click'); }); If i use HTML submit button then i able to active other tab but through this i can't save my data into database. So help me.
tagged with: asp.net
upvote count: 1
favorite count: 0
tagged with: tabs
has answer: http://stackoverflow.com/a/29392287
downvote count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/comment/53858197
type: AnswerComment
score: 2
comment on: http://stackoverflow.com/a/29454358
has text: The second way works fine and has the benefit that it yields the expected string for both HTML and SVG elements.
type: Comment

http://stackoverflow.com/comment/47076309
has text: What errors are you getting? What is not working?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29455789
type: QuestionComment

http://stackoverflow.com/comment/47206597
score: 0
type: AnswerComment
type: Comment
has text: can you please tell me how to create that effect which is happen after click on it like it takes to another portion but in slow motion
comment on: http://stackoverflow.com/a/29525290

http://stackoverflow.com/a/29376983
has comment: http://stackoverflow.com/comment/46934359
type: Answer
has comment: http://stackoverflow.com/comment/46934697
has comment: http://stackoverflow.com/comment/46935385
has comment: http://stackoverflow.com/comment/46934397
has body: You can use the .valueOf to do the trick: function myfunction(sum){ var accum = function(val) { sum += val; return accum; }; accum.valueOf = function() { return sum; }; return accum(0); }; var total = myfunction(1)(2)(3)(4); console.log(total); // 10 JSFiddle: http://jsfiddle.net/vdkwhxrL/ How it works: on every iteration you return a reference to the accumulator function. But when you request for the result - the .valueOf() is invoked, that returns a scalar value instead. Note that the result is still a function. Most importantly that means it is not copied on assignment: var copy = total var trueCopy = +total // explicit conversion to number console.log(copy) // 10 ; so far so good console.log(typeof copy) // function console.log(trueCopy) // 10 console.log(typeof trueCopy) // number console.log(total(5)) // 15 console.log(copy) // 15 too! console.log(trueCopy) // 10
answers question: http://stackoverflow.com/q/29376702
upvote count: 5
accepted answer of: http://stackoverflow.com/q/29376702
score: 5
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46934787
has comment: http://stackoverflow.com/comment/46935521

http://stackoverflow.com/a/29494213
accepted answer of: http://stackoverflow.com/q/29494133
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29494133
type: Answer
score: 3
downvote count: 0
has body: Like this: var row = {}; columns.forEach(function(column, index){ row[column.field] = order[index]; });
upvote count: 3

http://stackoverflow.com/comment/46963310
type: QuestionComment
comment on: http://stackoverflow.com/q/29393315
has text: Try: `PageStatistics.prototype.myFunctionName() { return this; }`
type: Comment
score: 0

http://stackoverflow.com/comment/47057411
score: 1
has text: This is weird. It works for me, but only if I add TouchableHighlight to the things I'm importing from React. But if that's not there then I get the red screen of death...
comment on: http://stackoverflow.com/q/29439759
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29487914
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/29508602
has title: Animate Each ng-repeat itineration
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29508602
has comment: http://stackoverflow.com/comment/47138935
has comment: http://stackoverflow.com/comment/47135142
has comment: http://stackoverflow.com/comment/47135280
upvote count: 1
tagged with: angularjs-ng-repeat
favorite count: 0
has comment: http://stackoverflow.com/comment/47138184
tagged with: ng-animate
tagged with: angularjs
tagged with: animation
has comment: http://stackoverflow.com/comment/47135254
type: AnsweredQuestion
has body: Hello I've been stuck on this all morning, I want to make an animation for each block that I generate with ng-repeat, I cant make it works here is the html: {{build._buildTypeId}} Edit I,ve changed the ng-animate to this: ng-animate="{enter: 'block-enter'}" style="transition-delay:500ms" and created the following rules in the css file: .block-enter { opacity:0; -webkit-transition-property: all; -webkit-transition-timing-function: ease-out; -webkit-transition-duration: 400ms; } .block-enter.block-enter-active { opacity: 1; } But still not working :(

http://stackoverflow.com/q/29523584
tagged with: javascript
score: 0
has body: part of myApp.js: .state('app.home', { url: "/home", views: { 'menuContent': { templateUrl: "templates/home.html" } } }) .state('app', { url: "/app", abstract: true, templateUrl: "templates/menu.html", controller: 'AppCtrl', resolve : { myCurrentUser : function(myCurrentUserServ) { return myCurrentUserServ.promiseToHaveMyCurrentUser(); } }, }) .state('app.list', { url: "/lists/:listId", views: { 'menuContent': { templateUrl: "templates/listDashboard.html", controller: 'listDashboardCtrl', resolve : { currentList : function(currentListServ, $stateParams) { return currentListServ.promiseToHaveList($stateParams.listId); } }, } } }) .state('app.createWordsList', { url: "/create-list", views: { 'menuContent': { templateUrl: "templates/createWordsList.html", controller: 'createWordsListCtrl' } } }); 'createWordsListCtrl' controller : .controller('createWordsListCtrl', function($scope,myCurrentUserServ , $ionicModal, $timeout,$firebaseAuth,$state,$q) { console.log("gg"); }); when I goes to app.createWordsList at the first time, the createWordsListCtrl is running , but if I change state (for example to 'app.home') and then return back, the createWordsListCtrl not run at all. it's happen to all states besides those with state params(aor example app.list).
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47228960
has comment: http://stackoverflow.com/comment/47226810
has comment: http://stackoverflow.com/comment/47209904
has title: angular controller called only in the first time the state load
type: Question

http://stackoverflow.com/q/29426520
type: UnansweredQuestion
has title: JavaScript and Java WebSocket SSL Connection Error
has answer: http://stackoverflow.com/a/30576788
upvote count: 1
type: Question
score: 1
tagged with: java
tagged with: ssl
tagged with: jquery-plugins
has body: I am writing a browser plugin for a webpage which runs over HTTPS. My backend is in Java, so creating a websocket between javascript and java. But the websocket is giving following error. WebSocket connection to 'wss://127.0.0.1:8080/' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR Can someone tell how to remove this error?
answer count: 1
downvote count: 0
tagged with: websocket
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/29496577
has body: You should use anchor in in your href location like this : location.href = "index.html#id"; and then get the id you want to scroll to like this : var hash = window.location.hash.substring(1); So how your code would look: $(".goTo").click(function() { window.location.href = "index.html#id"; } }); // Shorthand for document ready $(function() { // This will get you everything behind the anchor !! var hash = window.location.hash.substring(1); var tag = $("#"+hash+""); // Animation $('html,body').animate({scrollTop: tag.offset().top},'slow'); }); Not tested, and not sure if this will work for you, but at least it shows you the course of action.
has comment: http://stackoverflow.com/comment/47153669
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29496321
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29496321
type: Answer

http://stackoverflow.com/q/29521032
has answer: http://stackoverflow.com/a/29521639
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29521639
tagged with: three.js
has body: Can't find out what am I missing.... Debuging a sample code I found these lines and dump it to console to understand what is going wrong: var intPosition = new THREE.Vector3( Math.floor(result.point.x), 0, Math.floor(result.point.z) ); console.log(intPosition); brush.position = intPosition.clone().add(new THREE.Vector3(0.5, 0.5, 0.5) ); console.log(brush.position); but.......... the output is as follow (from firebug console): Object { x=0, y=0, z=10, more... } Object { x=0, y=0, z=0, more... } from three.js docs: .add ( v ) this Adds v to this vector. and here: add: function ( v1, v2 ) { this.x = v1.x + v2.x; this.y = v1.y + v2.y; this.z = v1.z + v2.z; return this; }, What's wrong? Is it the integer+float failling on js? EDIT NOTE: I don't know if it is relevant but this issue occurs on my current version (revision 71) of Three.js, working fine on older versions (r60 or lower).
has title: How to add two vectors on three.js?
type: AnsweredQuestion
type: Question
tagged with: javascript

http://stackoverflow.com/a/29504728
has comment: http://stackoverflow.com/comment/47167190
has body: while(running){ } This block is the reason, it will run forever, and it will run as soon as the child is made, so child process would forever be struck in that loop with no time to handle the next line process.send("Child stopped!"); or the process.on("message",...
has comment: http://stackoverflow.com/comment/47166914
has comment: http://stackoverflow.com/comment/47166880
score: 0
has comment: http://stackoverflow.com/comment/47166781
answers question: http://stackoverflow.com/q/29504609
type: Answer
has comment: http://stackoverflow.com/comment/47166948

http://stackoverflow.com/q/29394687
has comment: http://stackoverflow.com/comment/47036953
type: Question
tagged with: javascript
score: 0
has body: Say I have an amchart lineWithScrollAndZoom graph. I want to allow a user to change a bullet point location on the y-axis by letting them click the bullet point, then they can use a dropdown input or some other input form to allow them to change the y-axis value. The bullet point and corresponding lines would then change based on where the bullet point was moved. Is this even possible?
type: UnansweredQuestion
has title: Change amchart bullet placement using inputs
has comment: http://stackoverflow.com/comment/47000317
tagged with: amcharts
has comment: http://stackoverflow.com/comment/47180054
answer count: 0

http://stackoverflow.com/q/29492778
has comment: http://stackoverflow.com/comment/47151230
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47145845
has comment: http://stackoverflow.com/comment/47144762
score: 0
has comment: http://stackoverflow.com/comment/47145231
tagged with: methods
type: Question
tagged with: object
has body: I have an object with some properties. I want to create a method that returns if the position of an array is in range, but I didn't know how to create it. (I'm trying to make the Minesweeper in AngularJS so this code is inside a .factory) My code looks like: var tableSquare = function(num_rows, num_bombs){ this.numRows = num_rows; this.numBombs = num_bombs; this.positions = new Array(numRows); for (i = 0; i &lt; numRows; i++) { this.positions[i] = new Array(numRows); } }; Now I have a working function inRange (values must be >=0 and &lt; range of the array): var inRange = function(i,j, range){ if (i&gt;=0 &amp;&amp; i&lt;= range-1 &amp;&amp; j&gt;=0 &amp;&amp; j&lt;=range-1) return true; return false; }; So I can look if an element of my array is in range, I use it lik this (numBombs its a property from an object I had insert in each tableSquare.positions): if (inRange(i-1,j-1,this.numRows)) this.positions[i-1][j-1].numBombs += 1; //up left I want a method like: tableSquare.prototype.inRange = function(){ //I don't know how to read here i and j //in this.positions[i][j] }; So I may use this function making: if (this.positions[i-1][j-1].inRange()) this.positions[i-1][j-1].numBombs += 1; How can I create this inRange method? Thanks ;)
answer count: 2
has comment: http://stackoverflow.com/comment/47151508
has comment: http://stackoverflow.com/comment/47145717
tagged with: arrays
tagged with: javascript
has title: How to create a method to validate the range of an Array?
has answer: http://stackoverflow.com/a/29493950
has answer: http://stackoverflow.com/a/29562782
has comment: http://stackoverflow.com/comment/47146084
has comment: http://stackoverflow.com/comment/47144900
tagged with: angularjs

http://stackoverflow.com/comment/47074072
score: 0
has text: @DavidThomas Yes very true I checked and its working as per the comment, BTW I checked JS is pass by value so its not directly affecting the values..thx new to JS :) Have a great day :)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29454385

http://stackoverflow.com/q/29431649
has body: I have a javascript code, using which an iframe moves with mouse pointer. and when I slide mouse over another iframe (e.x youtube embed video), the iframe doesn't move with mouse while mouse pointer is on youtube video. what can be done? thanks &lt;script type="text/javascript"&gt; var opacity = 1; var time = 3500000; if (document.cookie.indexOf('visited=true') == -1) { (function openColorBox() { if ((document.getElementById) &amp;&amp; window.addEventListener || window.attachEvent) { var hairCol = "#ff0000"; var d = document; var my = -10; var mx = -10; var r; var vert = ""; var idx = document.getElementsByTagName('div').length; var thehairs = "&lt;iframe id='theiframe' scrolling='no' frameBorder='0' allowTransparency='true' src='b.html' style='margin: px 0px 0px px; position:fixed;width:200px;height:200px;overflow:hidden;border:0;opacity:" + opacity + ";filter:alpha(opacity=" + opacity * 100 + ");'&gt;&lt;/iframe&gt;"; document.write(thehairs); var like = document.getElementById("theiframe"); document.getElementsByTagName('body')[0].appendChild(like); var pix = "px"; var domWw = (typeof window.innerWidth == "number"); var domSy = (typeof window.pageYOffset == "number"); if (domWw) r = window; else { if (d.documentElement &amp;&amp; typeof d.documentElement.clientWidth == "number" &amp;&amp; d.documentElement.clientWidth != 0) r = d.documentElement; else { if (d.body &amp;&amp; typeof d.body.clientWidth == "number") r = d.body } } if (time != 0) { setTimeout(function() { document.getElementsByTagName('body')[0].removeChild(like); if (window.addEventListener) { document.removeEventListener("mousemove", mouse, false) } else if (window.attachEvent) { document.detachEvent("onmousemove", mouse) } }, time) } function scrl(yx) { var y, x; if (domSy) { y = r.pageYOffset; x = r.pageXOffset } else { y = r.scrollTop; x = r.scrollLeft } return (yx == 0) ? y : x } function mouse(e) { var msy = (domSy) ? window.pageYOffset : 0; if (!e) e = window.event; if (typeof e.pageY == 'nu…
has comment: http://stackoverflow.com/comment/47032734
has answer: http://stackoverflow.com/a/29434523
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47032749
has title: Overlay an iframe on another iframe
tagged with: video
downvote count: 0
score: 1
tagged with: iframe
tagged with: overlay
type: Question

http://stackoverflow.com/comment/47022168
type: QuestionComment
type: Comment
has text: please provide us with a fiddle with some working CSS as well . thanks
comment on: http://stackoverflow.com/q/29425463
score: 0

http://stackoverflow.com/comment/47122455
comment on: http://stackoverflow.com/q/29480730
has text: If you are calling a function, they need to be directly after handPrevClick
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47191237
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29517158
has text: use prop instead of attr and hight sholud be calculated

http://stackoverflow.com/q/29482682
has answer: http://stackoverflow.com/a/29482855
score: 0
answer count: 3
has body: How can I store the returned result into a variable without it being changed? I basically want the function to be only called once and be stored in the variable. Right now the var word changes its value each time I press the button. I want it to get the retired value from the read() function and keep the value the same for validation Here is my code: function read() { // var result gets a random line from a file var lines = result.split(", "); var randLineNum = Math.floor(Math.random() * lines.length); return lines[randLineNum]; } function Check(strParam){ var guessWord = strParam; var word = read(); if(guessWord != ""){ if(guessWord !== word){ console.log(word); // I am checking here for the word and it keeps changing } } } $('#button').on('click', function() { Check($('#txtbox').val()); });
has comment: http://stackoverflow.com/comment/47126011
tagged with: variables
tagged with: jquery
tagged with: return
tagged with: store
possible better answer: http://stackoverflow.com/a/29482773
has title: Store returned result to a variable
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47126025
has comment: http://stackoverflow.com/comment/47125926
has answer: http://stackoverflow.com/a/29482760
accepted answer: http://stackoverflow.com/a/29482760
type: Question
has comment: http://stackoverflow.com/comment/47125953
tagged with: javascript
has answer: http://stackoverflow.com/a/29482773

http://stackoverflow.com/comment/47019412
type: Comment
type: AnswerComment
has text: how is this different then just calling .click()? The reason I ask is because I have other click events in this .js file that are constructed with just the id then .click and they seem to work.
comment on: http://stackoverflow.com/a/29423703
score: 0

http://stackoverflow.com/a/29396954
answers question: http://stackoverflow.com/q/29396919
score: 4
has comment: http://stackoverflow.com/comment/46970478
has comment: http://stackoverflow.com/comment/46974313
has body: You didn't inject $rootScope in mainController capApp.controller('mainController', function($scope,$rootScope, $location) { $scope.user_id = $rootScope.cookieSet; // set global var }); Update: First create a service that acts like a bridge between controllers: 1) addCookie used to add cookieset. 2) getCookie used to get cookieset. capApp.factory('user', function() { var cookieSet; var addCookie = function(val) { cookieSet=val; } var getCookie = function(){ return cookieSet; } return { addCookie : addCookie, getCookie : getCookie }; }); capApp.controller('cookieCtrl', ['$scope', 'user', '$cookies', function($scope, user, $cookies) { // set variable for nav user.addCookie($cookies.user_id); }]); capApp.controller('mainController', function($scope, $location,user) { $scope.user_id =user.getCookie(); // set global var });
upvote count: 4
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46985892
has text: yes it works for this example, but I had used a simple example for illustrative purpose. My actual case has a complex UI with a complex VM
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29392426
type: AnswerComment

http://stackoverflow.com/a/29432037
downvote count: 0
answers question: http://stackoverflow.com/q/29431903
type: Answer
has body: In your ajax success message or error function defined in your ajax method you would want to receive back JSON data which will contain your specific error as determined by your Python backend. so in your python backend create a dictionary. import json returnValue = {'error': 'you messed up something'} ## serialize to json string return json.dumps(returnValue) Than in your ajax method data.error would equal "you messed up something" Depending on your web framework of choice (django, flask) the concept of handling the request and returning a dictionary as a json string would be similar.
upvote count: 1
has comment: http://stackoverflow.com/comment/47033734
score: 1
accepted answer of: http://stackoverflow.com/q/29431903
has comment: http://stackoverflow.com/comment/47033644
type: AcceptedAnswer

http://stackoverflow.com/comment/47128402
type: QuestionComment
comment on: http://stackoverflow.com/q/29484104
score: 0
has text: So "select" is faked?
type: Comment

http://stackoverflow.com/comment/47214185
type: AnswerComment
score: 0
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74785/discussion-between-gallaxhar-and-amit-joki).
comment on: http://stackoverflow.com/a/29530178

http://stackoverflow.com/comment/47008592
has text: @JonathanWood Look at the differing output of `$(myHtmlString).length`
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29418231
score: 0

http://stackoverflow.com/a/29410529
score: 0
type: Answer
has body: ` Email *Invalid email address Password * {{buttonText}} Invalid Email Address/Password.Please try again. `
answers question: http://stackoverflow.com/q/29409481

http://stackoverflow.com/q/29432030
tagged with: iframe
accepted answer: http://stackoverflow.com/a/29605081
has body: On my site I found that there are lots of beacon calls happening like this &lt;img src="http://ib.adnxs.com/getuid?http://cmap.an.ace.advertising.com/cfcm.ashx?providerId=1006&amp;amp;appnexus_uid=$UID" width="1" height="1" class=""&gt; &lt;img src="http://tags.bluekai.com/site/4470?id=TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; &lt;img src="http://dpm.demdex.net/ibs:dpid=416&amp;amp;dpuuid=TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; &lt;img src="http://s.thebrighttag.com/cs?tp=ao&amp;amp;aolid=TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; &lt;img src="http://d.turn.com/r/du/id/L2NzaWQvMS9tcGlkLzMwNTU3ODEz/mpuid/TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; &lt;img src="http://d.p-td.com/r/dt/id/L21rdC80L21waWQvMzMxNTMzNg/mpuid/TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; &lt;img src="http://e.nexac.com/e/aol_sync.xgi?na_exid=TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; &lt;img src="http://idsync.rlcdn.com/362408.gif?partner_uid=TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; &lt;img src="http://adadvisor.net/adscores/g.pixel?sid=9201883608&amp;amp;aid=TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; &lt;img src="http://p.acxiom-online.com/pixel/smt?pid=3034&amp;amp;t=3034&amp;amp;ot=pixel&amp;amp;uid=TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; &lt;img src="http://ckm-m.xp1.ru4.com/cx?_i=42102464&amp;amp;_u=TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; &lt;img src="http://d.agkn.com/pixel/2134/?dpids=131902&amp;amp;plaid=1&amp;amp;camid=03222013&amp;amp;partner_id=TA3672b770-d9d0-11e4-b9de-00163e82216c" width="1" height="1" class=""&gt; After digging it further I found this call an 1x1 pixel iframe with src http://cmap.uac.ace.advertising.com/um.ashx?site=852146&amp;rCode=1&amp;cb=4893281…
has comment: http://stackoverflow.com/comment/47116762
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/29503968
tagged with: javascript
has answer: http://stackoverflow.com/a/29503968
has title: Unknown beacon calls to ad servers
answer count: 3
has answer: http://stackoverflow.com/a/29605081
favorite count: 0
has answer: http://stackoverflow.com/a/29559159
tagged with: ads
score: 2
type: AnsweredQuestion
upvote count: 3

http://stackoverflow.com/a/29498801
score: 2
upvote count: 2
type: AcceptedAnswer
type: Answer
has body: Nothing is wrong with using the \t string literal - rather you're using the wrong MimeType enum, from the ContentService. DriveApp methods expect MimeType as a string. Try: fld.createFile(makeid() + ".tab", content, MimeType.CSV); Here's a snippet that shows the tab characters survive the file write when the MimeType is properly set: function myFunction() { var content = 'time' + "\t" + 'url' + "\t" + 'code_name' + "\t" + 'etcetera'; Logger.log("Initial TSV: " + JSON.stringify(content.split("\t"))); var newFile = DriveApp.createFile("Delete-me" + ".tab", content, MimeType.CSV); // Check our result, by reading back the file var blob = newFile.getBlob(); var docContent = blob.getDataAsString() Logger.log("Result TSV: " + JSON.stringify(docContent.split("\t"))); } Logs: [15-04-07 14:53:08:767 EDT] Initial TSV: ["time","url","code_name","etcetera"] [15-04-07 14:53:09:542 EDT] Result TSV: ["time","url","code_name","etcetera"]
accepted answer of: http://stackoverflow.com/q/29498324
downvote count: 0
answers question: http://stackoverflow.com/q/29498324

http://stackoverflow.com/comment/47023942
type: Comment
has text: The problem here is that i dont want any particular view to handle the nav bar categories. The "nav bar" is in the layout.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29426424

http://stackoverflow.com/comment/47019508
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29423767
type: Comment
has text: Tried the new code but still anything, well when i set the video up, a div like this goes inside the content:

http://stackoverflow.com/comment/47068340
has text: Try to remove form and submit button from partial view, and put these into main view. framework get confused while updating model from from formvaluecollections.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29449375
type: Comment

http://stackoverflow.com/comment/47250650
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29479351
score: 0
has text: So I assume your question is actually how to get the `Referer` request header of an XHR from within JavaScript, right?

http://stackoverflow.com/q/29399113
has body: I have this function that goes through each breadcrumb in a navbar and I want to change the styling of the breadcrumb depending what page they are on. Here is the basic HTML of the breadcrumb navbar Account Info Rate Questions Final I then call this function in Javascript: function WCBar(pagename, iframepagename, currentSet) { $('.bc_nav', $('#WCBar')).each(function () { iframepagename = $(this).find('input[id*="hdnPageName"]').attr('value'); var bcMain = $(this).find('div[id*="bc_main"]'); var lnkCrumb = $(this).find('a[id*="lnkCrumb"]'); if (pagename == iframepagename) { //bcMain.addClass("current span"); bcMain.attr("class", "current span"); currentSet = 1; // notify server $.ajax({ type: "POST", url: window.location.pathname + "/UpdateIFrameBreadcrumb", data: "{'pagename':'" + iframepagename + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { // alert(msg.d); }, error: function (msg) { // alert(msg.d); } }); } else { if (lnkCrumb[0].href.length > 1) { //&& currentSet == 0 //bcMain.attr("class", "bc_nav enabled span"); bcMain.removeClass("bc_nav"); bcMain.addClass("bc_nav enabled span"); } else { //bcMain.attr("class", "bc_nav a"); bcMain.removeClass(); bcMain.addClass("bc_nav a"); } } }); } When I mouse over bc_Main during a debugging session, context > className shows the proper class but trying to determine if bc_main has a class results in ?bcMain.hasClass('bc_nav'); false in Visual Studio's Immediate window. Furthermore, trying to determine what the values are in class gets me an undefined error. var x = bcMain.attr('class'); undefined No class is ever removed from bc_main, no matter if I try .removeClass() and leave it empty or try .removeClass('bc_nav'); I have checked to make sure nothing is defaulting elsewhere and can't find anything. Thanks for your help.
tagged with: jquery
has title: Unable to remove css class and add a new one
has comment: http://stackoverflow.com/comment/46974495
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: Question
has answer: http://stackoverflow.com/a/29399334
tagged with: javascript
has answer: http://stackoverflow.com/a/29399203
score: 0
answer count: 2

http://stackoverflow.com/q/29498102
has comment: http://stackoverflow.com/comment/47155700
has title: Angular ngSwitch hiding label element?
has body: I have some AngularJS code to dynamically create form elements based on an array with form details (input type, value, etc.) Here's the example code I have for a text input: As you can see, the top-level div is repeated for every form element in the array. The problem, is that when input.input_type equals "text", it doesn't show unless I remove the label tags! I've tried doing label tags without any attributes ( ... ) and it still doesn't show the input unless I remove them. This is pretty strange, does anyone have any ideas why it would do that? Thanks! EDIT: Now I've tried removing the input and putting text in ( Hello! ), and it shows up.....so it just doesn't allow inputs wrapped in a label element? o.O
has comment: http://stackoverflow.com/comment/47156447
tagged with: forms
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: angularjs-ng-repeat
has answer: http://stackoverflow.com/a/29501239
has comment: http://stackoverflow.com/comment/47156016
tagged with: angularjs
type: UnansweredQuestion
tagged with: input

http://stackoverflow.com/q/29430848
accepted answer: http://stackoverflow.com/a/29526091
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: email
favorite count: 0
has comment: http://stackoverflow.com/comment/47206075
type: AnsweredQuestion
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/29526091
type: Question
has title: Dynamic content with URL in email signature
downvote count: 0
tagged with: javascript
has body: I'm trying to put dynamic content with URL into my email signature. I wanted to do somethink like this: check out the newest post on my blog I tried to do something with JS and document.write in file on my server but it don't work. What I should do to do this?

http://stackoverflow.com/comment/47056585
comment on: http://stackoverflow.com/q/29444534
has text: it's impossible. since the code is on user's computer. They can of course edit it as they want.The only way to avoid this is use serverside code.
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/65900200
type: AnswerComment
score: 4
type: Comment
comment on: http://stackoverflow.com/a/29494642
has text: Just to complement: "As the second parameter determines the precision, and not just a single value to check, using day will check for year, month and day."

http://stackoverflow.com/comment/111466182
comment on: http://stackoverflow.com/a/29424908
score: 0
type: AnswerComment
type: Comment
has text: @Barmar answer is fine but can we put for loop for the row as I am having multiple rows with same id and I want to show all of them in table can you please say

http://stackoverflow.com/a/29489490
type: AcceptedAnswer
has body: Moving my comments to be an answer: You could always cache the $(".parallax-container__content") element in a variable so that it is not retrieving it on every time the scroll event is fired, and that goes for the opacity value too (unless that is dynamically changing depending on scroll_tp. Doing this might cause the script to speed up and help the jank that is happening If it is still really noticeable, then you could use feature detection to detect if CSS transforms are supported in the browser and user 'transform: translate' instead of changing the 'top' value. If it is not supported, then just revert back to changing the 'top'. Changing the 'top' causes a repaint in the browser while 'translate' does not. This repaint is quite expensive to the browser and can cause jank on certain machines. modernizr.com can help you out with feature detection, but it is potentially overkill for just helping out in the this situation. Have a look at this for detecting cetain styles are supported: http://lea.verou.me/2009/02/check-if-a-css-property-is-supported/ this is the easiest way to check (remember to account for vendor prefixes).
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29488192
answers question: http://stackoverflow.com/q/29488192
score: 1
upvote count: 1

http://stackoverflow.com/q/29468417
has body: I am building a template where there are large navigation buttons at the very top that, when clicked, make a corresponding page (an absolutely positioned DIV) slide out from underneath the button and fill the whole page via CSS transitions. I have a series of commands in a window resize function that keep everything in place/the right size if the window changes size. It is all working fine, except for a small issue where when the page is "out", if the browser window gets resized vertically, the CSS height transition triggers as opposed to the DIV snapping to the new height instantly (the DIV is 100% width and a dynamically calculated height the makes it fill the screen below the navigation buttons exactly). My solution to that was to add a line of code that would change the transition property to not include height BEFORE updating the height, then change it back immediately after. It seems to do nothing at all though. My code: window.addEventListener('resize', function(event){ bottomLoc = findBottom.getBoundingClientRect(); if (pageOut1 == false) { pageLoc1 = pageButton1.getBoundingClientRect(); //redefine location variable document.getElementById("page1").style.top = pageLoc1.top + 70 + "px"; //update closed page position document.getElementById("page1").style.left = pageLoc1.left + "px"; //update closed page position } else if (pageOut1 == true) { document.getElementById("page1").style.transition = "width 0.5s, left 0.5s"; //turn off height transition document.getElementById("page1").style.height = bottomLoc.bottom - 70 + "px"; //update height document.getElementById("page1").style.transition = "height 0.5s, width 0.5s, left 0.5s"; //turn height transition back on } }); The part that doesn't seem to be working is in the "else if" statement. Even though I take out the "height 0.5s" before the height update happens, it still does the transition. This is not exactly a huge, website breaking problem, but it does cause a scroll bar to randomly appear and disappear when…
answer count: 0
type: UnansweredQuestion
type: Question
tagged with: window-resize
tagged with: css-transitions
upvote count: 4
has comment: http://stackoverflow.com/comment/48913135
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
has title: Temporarily disable CSS transition on window resize?
tagged with: css

http://stackoverflow.com/comment/46954807
comment on: http://stackoverflow.com/q/29388396
score: 0
has text: You can use hash method like md5.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29502200
has comment: http://stackoverflow.com/comment/47162884
score: 0
has comment: http://stackoverflow.com/comment/47163351
has comment: http://stackoverflow.com/comment/47164022
has body: I'm new to Breeze and struggling with having the results of a breeze query linked to a knockout observable array and then the array not updating the view when populated. I found this questoin, which is a similar problem, but mine won't bind even the first time around. I did try some of the things suggested in that thread, though, with no luck. I've been working off of the Breeze.js ToDo demo (here). Using console.log, my data is coming from my query looking the same as the data from the demo code. The query is pulling a list of breweries from a table that I'm just trying, for now, to bind to a list (eventually a drop-down). Is there just some tiny thing I'm missing here? Thanks, in advance, for any help! View Model Code: viewModel = (function () { var self = this; self.breweries = ko.observableArray(); function getBreweries() { dataService().getBreweries().then(querySucceeded).fail(queryFailed); function querySucceeded(data) { self.breweries(data.results); } function queryFailed(error) { alert(error); } } getBreweries(); }); ko.applyBindings(viewModel); dataService Code (in a separate file, but data's coming out of it just fine): dataService = (function () { var serviceName = '/breeze/BeerMatch/'; //route to Breeze Web API Controller var manager = new breeze.EntityManager(serviceName); return { getBreweries: getBreweries }; function getBreweries() { var query = breeze.EntityQuery.from("Breweries"); return manager.executeQuery(query); } }); and, finally, front-end code to try and bind this list:
has comment: http://stackoverflow.com/comment/47191422
has comment: http://stackoverflow.com/comment/47163289
tagged with: breeze
has comment: http://stackoverflow.com/comment/47163786
tagged with: entity-framework
has comment: http://stackoverflow.com/comment/47164128
has title: Breeze.js query not updating knockout view at all
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/17150023
type: Question
has answer: http://stackoverflow.com/a/29518471
has comment: http://stackoverflow.com/comment/47163086
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/47163030
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/47163926

http://stackoverflow.com/a/29433815
type: Answer
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/47037490
has comment: http://stackoverflow.com/comment/47037614
has body: The syntax function foo(whatever) is evaluated before the runtime, so Idon't think your code is a valid syntax or will have the expected behaviour. You should better use an anonymous function like this: var attachFunction = function(a, b) { console.log(a); console.log(b); } el.addEventListener('click', attachFunction, false); el.removeEventListener('click', attachFunction, false); Please also note that an event listener (here attachFunction) can only have a single argument which is the event object.
score: 0
answers question: http://stackoverflow.com/q/29433765

http://stackoverflow.com/q/29433484
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29433683
type: AnsweredQuestion
tagged with: vimeo
possible better answer: http://stackoverflow.com/a/29433683
score: 1
has title: I can't seem to mute my vimeo iframe
tagged with: iframe
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29434669
tagged with: javascript
answer count: 2
downvote count: 0
has body: I searched across the internet, tried many things but it's still not working, I even straight up copied and pasted codes, put it online and it didn't work. So I'll ask you guys if you can help me this is the code: live preview : http://mrwhoohoo.nl/Testing/test.html
accepted answer: http://stackoverflow.com/a/29434669
favorite count: 0

http://stackoverflow.com/comment/47017581
has text: Razor code is parsed on the server before its sent to the client. In any case you should not be sending a model to a GET method (it creates an ugly query string, will throw an exception if the resulting query string exceeds the character limit and binding will fail if the model contains properties which are collections or complex objects. One option is to have 2 submit buttons in the form (with name/value attributes) and in the controller check which button was clicked and redirect as required.
type: Comment
comment on: http://stackoverflow.com/q/29420871
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46985632
type: AnswerComment
type: Comment
has text: @paxdiablo I'm very sensitive to persons that say that diacritics are "special" characters, but I do think a number is a number, and I don't think I would like to see a DB with heights in ten different digit formats. If someone wants to use the arabic-indic digits, he will use them with `[٠-٩]`. And then the point is that `\d` has different meaning in .NET and Javascript (unless you use an option in .NET to use the Ecmascript version of Regex)
comment on: http://stackoverflow.com/a/29405347
score: 0

http://stackoverflow.com/q/29432298
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29432928
tagged with: jquery-ui
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have a strange difficulty with JqueryUI Dialog. This code doesn't work where input name is "submit". It works with all other input name (ex : submit2). Is someone know why and how to solve this problem because I can't change input name for different cause ? There is something wrong in Jquery script and I don't find what. $(function () { var confirmdialog = $(' ').appendTo('body'); $("#dialog").dialog({ modal: true, bgiframe: true, width: 300, height: 200, autoOpen: false, title: 'Confirm' }); $('form.alert2 input[type=submit]').click(function (theINPUT) { theINPUT.preventDefault(); var theFORM = $(theINPUT.target).closest("form"); $('#dialog').html(' confirm ? '); $("#dialog").dialog('option', 'buttons', { "Confirm": function () { theFORM.submit(); }, "Cancel": function () { $(this).dialog("close"); } }); $("#dialog").dialog("open"); }); });
tagged with: jquery-ui-dialog
has title: JqueryUI dialog doesn't work with specific input name
has comment: http://stackoverflow.com/comment/47035373
score: 0

http://stackoverflow.com/comment/47203842
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29524688
has text: var xhr = (XMLHttpRequest) ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP");
score: 0

http://stackoverflow.com/q/29455692
has answer: http://stackoverflow.com/a/29455735
has answer: http://stackoverflow.com/a/29455733
tagged with: javascript
answer count: 2
upvote count: 1
has title: How does closure reify the data encapsulation?
favorite count: 0
has comment: http://stackoverflow.com/comment/134394758
has comment: http://stackoverflow.com/comment/134394687
has comment: http://stackoverflow.com/comment/47076353
downvote count: 0
has body: In traditional OOP language, we usually use private/public to implement data encapsulation. In Javascript, there is no private or public; someone told me, the data encapsulation can be implemented by using closure. I am wondering how and what's the behind logic?
type: UnansweredQuestion
score: 1
type: Question

http://stackoverflow.com/comment/47105863
type: Comment
has text: Would be nice if downvoters said why this was downvoted.
type: AnswerComment
comment on: http://stackoverflow.com/a/29472237
score: 0

firebase
tags question: http://stackoverflow.com/q/29377925
tags question: http://stackoverflow.com/q/29442937
tags question: http://stackoverflow.com/q/29461676
tags question: http://stackoverflow.com/q/29400873
tags question: http://stackoverflow.com/q/29480384
tags question: http://stackoverflow.com/q/29385749
tags question: http://stackoverflow.com/q/29515951
tags question: http://stackoverflow.com/q/29374013
tags question: http://stackoverflow.com/q/29462589
tags question: http://stackoverflow.com/q/29448698
tags question: http://stackoverflow.com/q/29387840
tags question: http://stackoverflow.com/q/29383867
type: Tag
tag name: firebase
tags question: http://stackoverflow.com/q/29476552
tags question: http://stackoverflow.com/q/29429529

http://stackoverflow.com/a/29517355
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29516971
score: 3
type: Answer
answers question: http://stackoverflow.com/q/29516971
upvote count: 3
has body: you are getting element 'rotator' before document is loaded so it doesn't exist. Try this: function start() { var rotator = document.getElementById('rotator'); var imageDir = 'C:\\Users\\Shady\\Downloads\\restaurant\\'; var delayInSeconds = 1; var images = ['food1.jpg', 'food2.jpg', 'food3.jpg', 'food4.jpg', 'food5.jpg', 'food6.jpg', 'food7.jpg', 'food8.jpg']; var num = 0; var changeImage = function() { var len = images.length; rotator.src = imageDir + images[num++]; if (num == len) { num = 0; } }; setInterval(changeImage, delayInSeconds * 1000); }; window.onload=function(){ start(); }

http://stackoverflow.com/a/29445640
has comment: http://stackoverflow.com/comment/47060021
has comment: http://stackoverflow.com/comment/47058864
has comment: http://stackoverflow.com/comment/47059820
has comment: http://stackoverflow.com/comment/47058897
has comment: http://stackoverflow.com/comment/47058940
has comment: http://stackoverflow.com/comment/47059586
has comment: http://stackoverflow.com/comment/47058814
accepted answer of: http://stackoverflow.com/q/29445561
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47059091
has comment: http://stackoverflow.com/comment/47059024
answers question: http://stackoverflow.com/q/29445561
has comment: http://stackoverflow.com/comment/47058842
type: Answer
has body: you can use like this , have a look. may be you need to include jquery library if you missed this update your code like this function showChoice(str,sel2) { if (str == "") { document.getElementById("txtHint").innerHTML = ""; return; } else { 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 && xmlhttp.status == 200) { document.getElementById("txtHint").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","getuser.php?q="+str+"&q2="+sel2,true); xmlhttp.send(); } } $(document).ready(function() { $('.select').change(function() { var sel1=$('#select1').val(); var sel2=$('#select2').val(); showChoice(sel1,sel2); }) }); html will look like this Select a departure point: London New Castle Select a departure point: London New Castle UPDATE here is jsfiddle link update2 getuser.php <? echo $q=$_GET['q']; echo $q2=$_GET['q2']; ?>
score: 0
has comment: http://stackoverflow.com/comment/47059775
has comment: http://stackoverflow.com/comment/47060192

http://stackoverflow.com/comment/119698782
comment on: http://stackoverflow.com/a/58555088
has text: Be careful while using startOf because it will update your actual date object.
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/29472879
answer count: 1
tagged with: jquery
has title: display 3rd drop down list based on 1st 2 dropdown ids
has body: I want to display an interrelated drop down list. When 1st dropdown ie Area list selected, related Sectors list will be populated in 2nd dropdown. Till this i am able to do it. But After 2nd dropdown ie Sector is selected i want to display the plots which will be based on both 'Area' and 'Sector'. This part i am not able to do it. I am able to display the plots based on 'Sector' only not the both Area and Sector. Here is my code Fetching Sectors function showItems(sel) { var cat_id = sel.options[sel.selectedIndex].value; $("#output1").html( "" ); $("#output2").html( "" ); if (cat_id.length > 0 ) { $.ajax({ type: "POST", url: "fetch_sectors.php", data: "cat_id="+cat_id, cache: false, beforeSend: function () { $('#output1').html(' '); }, success: function(html) { $("#output1").html( html ); } }); } } Fetching Plots (based only Sector only ) function showItemDet(sel) { var item_id = sel.options[sel.selectedIndex].value; $("#output2").html( "" ); if (item_id.length > 0 ) { $.ajax({ type: "POST", url: "fetch_plot.php", data: "item_id="+item_id, cache: false, beforeSend: function () { $('#output2').html(' '); }, success: function(html) { $("#output2").html( html ); } }); } } How can i do it?. ***EDIT**** i did something like this and in fetch_plots $area = ($_REQUEST["area"] <> "") ? trim( addslashes($_REQUEST["area"])) : ""; echo $area; $sector = ($_REQUEST["sector"] <> "") ? trim( addslashes($_REQUEST["sector"])) : ""; if ($item_id <> "" && $cat_id<>"") { $sql = "SELECT * FROM plots where area_id=".$area." AND sec_id=".$sector.""; echo $sql; $count = mysqli_num_rows( mysqli_query($con, $sql) ); if ($count > 0 ) { $query = mysqli_query($con, $sql); ?> Select Plot <?php while ($rs = mysqli_fetch_array($query)) { ?> <option value="<?php echo $rs["plot_id"]; ?>"><?php echo $rs["name"]; ?> <?php } ?> <?php } } ?>
has comment: http://stackoverflow.com/comment/47107051
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/47107572
score: 0
type: Question
has comment: http://stackoverflow.com/comment/47107014
has comment: http://stackoverflow.com/comment/47106947
tagged with: javascript
has answer: http://stackoverflow.com/a/29472962
has comment: http://stackoverflow.com/comment/47107064

http://stackoverflow.com/comment/47045634
comment on: http://stackoverflow.com/q/29438234
score: 0
type: Comment
type: QuestionComment
has text: well they'd have to refresh the page, in which case your server side scripts can generate the correct button

uikit
tag name: uikit
type: Tag
tags question: http://stackoverflow.com/q/29512128

http://stackoverflow.com/q/29374064
score: 4
answer count: 1
downvote count: 0
favorite count: 0
upvote count: 4
type: AnsweredQuestion
has body: I'm trying to use a Many-to-Many association between 2 models and I have to call .add() or .remove() twice for it to work properly: // User.js Model module.exports = { attributes: { connections: { collection: 'connection', via: 'users' } } } // Connection.js Model module.exports = { attributes: { users: { collection: 'user', via: 'connections' } } } This is the code I have in my UsersController.js: User.findById(req.params.user) .populate('connections') .exec(function(err, users) { if (err) return res.status(404).end(); // Not really a 404 but good for now var user = users[0]; user.connections.add(req.body.connection_id); user.save(function(err) { // In my tests err is null/undefined return res.status(204).end(); } }); I get a 204 back with no errors in the log or nothing else failed. When I check in my MongoDB database, the user's connections field is just an empty array. If I send the same request again, then I get a an error saying the connection_id already exists for that user. I look into the database, and now the connection appears in the user's connections field. It does the same thing when I remove a connection, I have to send it twice for it to take effect. Anyone have any ideas? Here are the module versions I'm using: Node.js version: 0.12.0 Sails.js version: 0.11.0 sails-mongo version: 0.10.5
tagged with: waterline
type: Question
tagged with: sails.js
has title: Sails.js / Waterline .add() and .remove() only works on second call
has answer: http://stackoverflow.com/a/29504698
accepted answer: http://stackoverflow.com/a/29504698
tagged with: javascript

http://stackoverflow.com/a/29510354
score: 0
has comment: http://stackoverflow.com/comment/47177150
answers question: http://stackoverflow.com/q/29508303
type: Answer
has body: Better approach to problem: https://groups.google.com/forum/#!topic/casperjs/bhA81OyHA7s Passing variables as options. Works like a charm My Final nodejs: var exec = require('child_process'), array = [ {url:"",regex:""} ]; for (var i = 0; i &lt; array.length; i++) { var url = array[i]["url"]; var regex = array[i]["regex"]; exec.exec('/usr/local/bin/casperjs casper2.js --url="'+url+'" --regex="'+regex+'" ' , function(err, stdout, stderr) { err &amp;&amp; console.log(err); stderr &amp;&amp; console.log(stderr.toString()); stdout &amp;&amp; console.log(stdout.toString()); }); }; In CasperJS w=casper.cli.get("url"), reg= casper.cli.get("regex"), rpart = reg.split("/"), r=new RegExp(rpart[1],rpart[2]); casper.start(w, function() { if (this.resourceExists(r)) { console.log("PASS\t" +r+ "\t"+ w); } else { console.log("FAIL\t" +r+ "\t"+ w); } }); casper.run();
has comment: http://stackoverflow.com/comment/47182511
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29508303

http://stackoverflow.com/comment/46987490
type: QuestionComment
comment on: http://stackoverflow.com/q/29398342
has text: You are calling function in "grid" object. Where is that grid object in your JS? I couldn't find it.
score: 0
type: Comment

http://stackoverflow.com/q/29495880
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29496212
has body: I'm loading bootstrap into my application via Meteor add xyz (not script tag), and the hidden packages file in my project director reads: meteor-platform autopublish insecure twbs:bootstrap iron:router bootstrap accounts-ui accounts-password jquery So I definitely have bootstrap working, but when I click on my Bootstrap dropdown menu, or even this 3rd party scrollable dropdown menu: http://www.bootply.com/86116 The dropdown button gets highlighted around the edges, but nothing drops down. What's going on here? I've seen similar posts, but they revolved around people loading multiple twbs compilers in the header. Is it possible that my two bootstrap packages are causing a collision?
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29496212
has title: Bootstrap dropdown doesnt work
tagged with: http://stackoverflow.com/tag/html
tagged with: meteor
favorite count: 0
upvote count: 2
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/47012649
comment on: http://stackoverflow.com/q/29420328
score: 2
has text: no. please everyone, stop enabling browser negligence or web cruft will never erode.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29578270
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29519173
has body: I finally managed to upload non-latin name file. Have to read it as binary and send as binary. HTML: &lt;input class="js-file" name="filename" type="file"&gt; And js //Handler in input $(document).on('change', '.js-file', function(event){ var file_name = $(this).attr('name'); var reader = new FileReader(); var f = event.target.files[0], nameArr = event.target.files[0]['name'].split('.'), extension = nameArr[nameArr.length-1]; //here we can check if extension is allowed reader.onload = function(e) { var contents = e.target.result; contents = contents.split('base64,')[1]; //we need only encoded part sendFileAsBinary(file_name, extension, contents); }; reader.readAsDataURL(f); }); And sender: function sendFileAsBinary(file_name, extension, img) { $.ajax({ url: '/ajax-upload-files/', type: 'POST', data: { name: file_name, img: img, extension: extension }, dataType: 'json', success: function(data){ }, complete: function(data) { } }) } And php code to decode image: $name = $this-&gt;_getParam('name'); $extension = $this-&gt;_getParam('extension'); $computedName = $name . '.' . $extension; $fileContent = base64_decode($this-&gt;_getParam('img')); file_put_contents($fileContent, $computedName);
type: Answer
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29519173

printing
tags question: http://stackoverflow.com/q/29421398
tag name: printing
tags question: http://stackoverflow.com/q/29526567
type: Tag
tags question: http://stackoverflow.com/q/29488131
tags question: http://stackoverflow.com/q/29482477

http://stackoverflow.com/comment/47155380
has text: Thanks for your quick response. Is there anyother way I can user some attribute in input element to show the text?
type: Comment
comment on: http://stackoverflow.com/a/29498218
score: 0
type: AnswerComment

http://stackoverflow.com/q/29508928
has body: Hello everyone I'm using this plugin http://www.jqueryscript.net/slider/Fullscreen-Horizontal-Page-Slider-with-jQuery-CSS3-HSlider.html and I want to have more than one slider on single page. Here is my code: height = $( window ).height() - 98; transalte = (height/2); $.each($('.gallery section'),function(i){ $(this).css({ position:"absolute", width:"100%", height: height+'px', left:i*100 +"%" }).addClass("section").attr("data-index", i+1); $(this).find(".img").css({ minWidth: "100%", minHeight: "100%", position:"absolute", zIndex:5 }) $(this).find("article").css({ position:"absolute", width:"100%", height: '100%', bottom:0, padding:42, zIndex:6, 'transform':'translateY(-'+(height+10)+'px)', 'color': 'white', }) }); I tried to reset i in each function but it doesn't works properly. It adds next data-index to section in another gallery. Is there any way to make multiple sliders using this plugin?
favorite count: 0
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/29509281
downvote count: 0
score: 1
has title: Multiple sliders on page
type: Question
has comment: http://stackoverflow.com/comment/47234634
tagged with: javascript
tagged with: jquery
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/29399956
answers question: http://stackoverflow.com/q/29399887
score: 0
type: AcceptedAnswer
has body: You're calling the functions when you assign the variables, not when you test disable_btn. If you want to wait, you have to define a new functions: function button_disable(button) { button.attr("disabled", true).css("background", "red"); } function button_enable(button) { button.removeAttr("disabled").css("background","green"); } (disable_btn ? button_enable : button_disable)(button_me);
type: Answer
accepted answer of: http://stackoverflow.com/q/29399887

http://stackoverflow.com/comment/47112093
score: 1
has text: Oh... I see! This makes sense. So another way to accomplish what I'm trying to do is evaluate the function in a different context and store the answer in the scope, after which Angular will pick up the change via dirty checking. Thanks!
comment on: http://stackoverflow.com/a/29475216
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29417698
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/47009406
has body: The problem is that the loop has to continue for the next item without rendering any error (Error occurs on 1st iteration when people[0] don't match the requested username). A working approach would be like this. app.get("/:username", function(req, res) { for (var i = 0; i &lt; people.length; i++) { if (people[i].username === req.params.username) { res.render("description.ejs", { pageTitle : "Profile", user : people[i] }); return; } } res.status(404).json("User not found."); });
score: 4
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29417560
has comment: http://stackoverflow.com/comment/47017715
answers question: http://stackoverflow.com/q/29417560

http://stackoverflow.com/comment/47549640
has text: Found the issue, it was unrelated to the OAuth process and a problem with the google apps domain permissions for the organization blocking access.
score: 0
comment on: http://stackoverflow.com/q/29522523
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47053430
score: 0
has text: @FewFlyBy check i update my answer with your input text-box selector
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29442714

http://stackoverflow.com/comment/47204130
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29524855
has text: word means separted by spaces i think @Sirko not sure

http://stackoverflow.com/a/45554140
has comment: http://stackoverflow.com/comment/87289535
downvote count: 0
upvote count: 10
type: Answer
has body: Since Protractor 4.0.0 you can now use expected conditions to know when your url changed. const EC = protractor.ExpectedConditions; browser.wait(EC.urlContains('my-url'), 5000); The asnwer I found comes from this one, I have no real credits for it. But just in case it help. Protractor- Generic wait for URL to change
answers question: http://stackoverflow.com/q/29397800
score: 10

http://stackoverflow.com/comment/47095055
comment on: http://stackoverflow.com/a/29465421
type: Comment
has text: Yep. It was recent to me. I noticed it was from 2009 when I was searching and didn't think it was the same paper at first. This is really interesting.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46937216
type: Comment
has text: Oh and I think it may be race condition but unsure?
comment on: http://stackoverflow.com/a/29378263
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47202951
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29523951
has text: Declarative? Oh that's fine. I just meant it is not [pure](https://en.wikipedia.org/wiki/Purely_functional)…

http://stackoverflow.com/comment/46949321
comment on: http://stackoverflow.com/a/29385405
score: 0
type: AnswerComment
has text: @Syd also look at this answer https://stackoverflow.com/questions/28593763/how-to-extract-pixel-information-from-png-using-javascript-getimagedata-alterna/28595070#28595070
type: Comment

http://stackoverflow.com/comment/46987948
score: 0
type: AnswerComment
type: Comment
has text: client side it self...after that I will post these values to server side in the form php file
comment on: http://stackoverflow.com/a/29406470

http://stackoverflow.com/q/29499563
has comment: http://stackoverflow.com/comment/47158751
upvote count: 2
answer count: 1
downvote count: 1
has title: Snap() method causes Uncaught TypeError
has answer: http://stackoverflow.com/a/29512549
has comment: http://stackoverflow.com/comment/47160474
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29512549
has body: I'm using Snapsvg (http://snapsvg.io/) and I'm getting a basic "Uncaught TypeError: undefined is not a function" on the line where var s = Snap("#svgout"); is defined. I know this means that the browser doesn't know what "Snap" is. My HTML is loading the snap.svg.js before I'm calling it in my script.js file. I'm starting to think this might be a bug. Any suggestions to debug or thoughts on what can be causing it? Below is my code: Framework Template <!--[if lt IE 9]> <![endif]--> Let's Begin ... //scripts.js file $(function(){ var s = Snap("#svgout"); //lets draw 2 rects at position 100,100 and then reposition them var r = s.rect(100,100,100,100,20,20).attr({ stroke: '#123456', 'strokeWidth': 20, fill: 'red', 'opacity': 0.2 }); var t = s.text(100,50,'Snap("#svg") should reference an svg element, not a div. Or create it by supplying width,height Snap(100,100)'); });
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47157879
score: 1
tagged with: undefined
favorite count: 0
tagged with: typeerror
type: Question

http://stackoverflow.com/q/29476017
tagged with: jquery
has comment: http://stackoverflow.com/comment/47114747
has comment: http://stackoverflow.com/comment/47114586
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47114781
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/47114202
has comment: http://stackoverflow.com/comment/47114512
has comment: http://stackoverflow.com/comment/47114063
tagged with: css
has body: I'm looking to insert an element in to the DOM inline with some text. In some cases, the text is justified, center aligned, etc. However, I would like whatever text that will be pushed around by this new element to tween into it's new position, rather than just jump to it. Example: The bars represent the parent width. El 1-5 here are justified. When I add El 6 to the DOM (potentially by having it already there, but changing it's display from none to inline-block), I would like El 1-5 to slide into their new position, rater than jump to it. Setting transition: left 0.2s ease-in-out; does not seem to do it. How is this accomplished? Here is a fiddle to make this easier to mess around with
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/47114133
tagged with: css-transitions
has answer: http://stackoverflow.com/a/29477074
type: Question
accepted answer: http://stackoverflow.com/a/29477074
has comment: http://stackoverflow.com/comment/47114007
has comment: http://stackoverflow.com/comment/47114495
has title: What property to transition to animate the space created when adding an element to the DOM?
tagged with: javascript

http://stackoverflow.com/a/29445985
score: 1
has body: The problem is that fetch returns an array with all the documents matching the selector. You must pick the first (and only) document from this array by writing fetch()[0] instead of fetch() (or use findOne instead of find and fetch.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29445915
downvote count: 0
answers question: http://stackoverflow.com/q/29445915
has comment: http://stackoverflow.com/comment/47058941
type: Answer
upvote count: 1

swfobject
tags question: http://stackoverflow.com/q/29401613
tags question: http://stackoverflow.com/q/29465167
tag name: swfobject
type: Tag

http://stackoverflow.com/a/29438693
answers question: http://stackoverflow.com/q/29425820
type: Answer
has comment: http://stackoverflow.com/comment/47048622
has comment: http://stackoverflow.com/comment/47047342
has comment: http://stackoverflow.com/comment/47064719
score: 1
downvote count: 0
has body: Reading initial discussion based on zerkms proposition, I was interested to try a solution using JSON.stringify, despite the unfavorable opinions. Then I finally got a solution, which passes all tests properly. Probably not the faster method, but surely the shortest one: var find_csa = function (arr, subarr, from_index) { var start=from_index|0, needle=JSON.stringify(subarr), matches=JSON.stringify(arr.slice(start)). match(new RegExp('^\\[(.*?),?'+ needle.substr(1,needle.length-2).replace(/([\[\]])/g,'\\$1') )); return !!matches?(matches[1].length?matches[1].split(',').length:0)+start:-1; } The above code accepts arrays of arrays, as suggested by Shashank, but fails to process items containing commas. So I developped another solution which also accepts commas (thanks to Steven Levithan for the elegant tip about while(str!=(str=str.replace(regexp,replacement)));). But it is only for fun, since: the code is not so short, now... Sigh! it probably consumes a lot of CPU time it doesn't properly work with empty items (they are ignored) I suspect (and didn't dig deeper :-) it might fail with complex objects as items Anyway, here is it: var find_csa = function (arr, subarr, from_index) { var start=from_index|0, commas=new RegExp('(?:(\')([^,\']+),([^\']+)\'|(")([^,"]+),([^"]+))"'), strip_commas='$1$2$3$1$4$5$6$4', haystack=JSON.stringify(arr.slice(start)), needle=JSON.stringify(subarr).replace(/^\[(.*)\]$/,'$1'); while(haystack!=(haystack=haystack.replace(commas,strip_commas))); while(needle!=(needle=needle.replace(commas,strip_commas))); matches=haystack.match(new RegExp('^\\[(.*?),?'+needle.replace(/([\[\]])/g,'\\$1'))); return !!matches?(matches[1].length?matches[1].split(',').length:0)+start:-1; }
upvote count: 1
has comment: http://stackoverflow.com/comment/47060886

http://stackoverflow.com/comment/47178140
type: QuestionComment
comment on: http://stackoverflow.com/q/29394462
score: 0
type: Comment
has text: @Matho I think so yeah. The modal could do a variety of things, but it is usually Add or Edit. So for the example code above it was for adding a note, so would contain a simple form for adding a note.

http://stackoverflow.com/a/29521411
answers question: http://stackoverflow.com/q/29519874
has comment: http://stackoverflow.com/comment/47198892
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/29519874
type: Answer
has body: There are a few ways to do something like this. You can checkout the Superscope option here: Supersonic Superscope This way you can bind data across views. From the docs: // In your main view controller angular .module('first') .controller('FirstController', function($scope, supersonic) { // initialize the variable in local scope $scope.message = null; // bind it to superscope supersonic.bind($scope, "message"); }); // And in your modal view controller angular .module('second') .controller('SecondController', function($scope, supersonic) { $scope.message = null; supersonic.bind($scope, "message"); }); There is also messaging which you can publish across channels and subscribe to the channels in different controllers. Publish Across Channels There is also localStorage if you are more comfortable with that. I'd recommend namespacing your localStorage objects in case other applications on the phone use the same object name since it would be shared. Check out that documentation and you will find multiple ways to accomplish what you need.

http://stackoverflow.com/comment/47101730
type: AnswerComment
comment on: http://stackoverflow.com/a/29469871
score: 0
type: Comment
has text: nice catch @LVarayut, its working in the plunker which you have given here check this [plunker](http://plnkr.co/edit/yvfXTiev5XIOIzFSRdJO?p=preview) I have implemented the same scenario in which I have applied for a drop-down list, but after adding the mouseover and mouseleave listener the option list is closing and the hover feature is not working, check line 56- 67

http://stackoverflow.com/comment/47246553
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29488070
has text: @IsadoraAlmeida Ok, I means what you says. your codes seem to work. so you have other questions?

http://stackoverflow.com/comment/47218727
has text: Pick a server-side language/framework and more than likely a database and enjoy.
score: 0
comment on: http://stackoverflow.com/q/29459715
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29423383
tagged with: angularjs
tagged with: angular-services
type: UnansweredQuestion
has body: How to create own service accessible globally that will call server by currentUser() only once on page load, if User is logged in then keep it and provide data to controllers or states until logout? Now I'm resolving many times in many states or controllers currentUser(), I found in docs: authparseresponse that it is possibility to make own service, but I don't know how to handle this in right way. e.g in ui-router I've two server calls, would be sufficient only when page is loaded: .state('login', { url: '/login', templateUrl: 'auth/_login.html', controller: 'AuthCtrl', onEnter: [ '$state', 'Auth', function($state, Auth) { Auth.currentUser().then(function() { $state.go('home'); }); } ] }) .state('dashboard', { url: '/dashboard', templateUrl: 'dashboard.html', onEnter: [ '$state', 'Auth', function($state, Auth) { Auth.currentUser().then(function(user) {}, function(err) { $state.go('home');// user not logged in }); } ] }) or each time next server call in NavController: app.controller('NavController', [ '$state', '$scope', 'Auth', function($state, $scope, Auth) { $scope.signedIn = Auth.isAuthenticated; $scope.logout = Auth.logout; // logout function Auth.currentUser().then(function(user) { $scope.user = user; }); $scope.$on('devise:login', function(e, user) { $scope.user = user; }); $scope.$on('devise:logout', function(e, user) { $scope.user = {}; $state.go("home"); }); } ]); I found similar question without answer: stackoverflow
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/29617788
tagged with: devise
has comment: http://stackoverflow.com/comment/47480307
type: Question
score: 20
has answer: http://stackoverflow.com/a/29664723
has comment: http://stackoverflow.com/comment/47480602
upvote count: 20
has title: How to keep globally current user until logout with angular_devise?
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/29074185
favorite count: 0
has comment: http://stackoverflow.com/comment/47483564
answer count: 5
has answer: http://stackoverflow.com/a/29426673
has answer: http://stackoverflow.com/a/29668509
has comment: http://stackoverflow.com/comment/47483498
has answer: http://stackoverflow.com/a/29672952

http://stackoverflow.com/comment/47145025
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29492597
has text: Check this [link](http://www.w3schools.com/jsref/event_onchange.asp) it might help you

http://stackoverflow.com/comment/47015829
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29421961
has text: New problem, the time displayed for timein and timeout is the same
score: 0

http://stackoverflow.com/a/29410584
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29397530
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47000755
type: Answer
has comment: http://stackoverflow.com/comment/47020563
answers question: http://stackoverflow.com/q/29397530
has body: It works that way because of CouchDB collation ordering. E.g. for numbers+letters, you'd have: [1, A] [1, B] [2, A] [2, B] etc.

http://stackoverflow.com/comment/47046309
has text: "the **second** one should be bigger than the **second** one". Please rephrase.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29438809
type: QuestionComment

http://stackoverflow.com/comment/47109563
has text: @Anton i tested on safari, please specify more what the problem is now, or open a new question
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29473486

http://stackoverflow.com/a/29442877
has comment: http://stackoverflow.com/comment/47055264
has comment: http://stackoverflow.com/comment/47055533
has comment: http://stackoverflow.com/comment/47054226
has comment: http://stackoverflow.com/comment/47054825
has comment: http://stackoverflow.com/comment/47067114
score: 5
has body: There is a working plunker, showing your scenario I've made few changes in your state definition: $stateProvider .state('app', { abstract: true, url: '/', template: '&lt;ui-view/&gt;' }) .state('app.login', { templateUrl: 'views/login.html', controller: 'LoginCtrl', controllerAs: 'login', url: '' }) We are using controller and controllerAs syntax .state('app.main', { url: 'room', templateUrl: 'views/layout.html' }) No absulte naming, we target our parent, relative is enough, more readable .state('app.main.foo', { url: '', views: { 'header': { templateUrl: 'partials/header.html', controller: 'HeaderCtrl', controllerAs: 'header', }, 'sidebar': { templateUrl: 'partials/sidebar.html', controller: 'SidebarCtrl', controllerAs: 'sidebar', }, 'main': { templateUrl: 'partials/main.html', controller: 'MainCtrl', controllerAs: 'main', } }, resolve: { isAuthenticated: ['Auth', function(Auth) { return Auth.isAuthenticated(); }] } }) main state is in our parent, do not redefine it .state('app.main.foo.bar', { url: '/:id', views: { 'mainOne': { templateUrl: 'partials/main-one.html', controller: 'MainOneCtrl', controllerAs: 'mainOne', }, 'mainTwo': { templateUrl: 'partials/main-two.html', controller: 'MainTwoCtrl', controllerAs: 'mainTwo', }, 'mainThreee': { templateUrl: 'partials/main-three.html', controller: 'MainThreeCtrl', controllerAs: 'mainThree', } } }); Check it here
upvote count: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29441976
answers question: http://stackoverflow.com/q/29441976
has comment: http://stackoverflow.com/comment/47054387
type: Answer

http://stackoverflow.com/q/29411733
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46996513
tagged with: communication
favorite count: 0
tagged with: tabs
type: UnansweredQuestion
has body: I'm designing this web-based production management software which includes customer, product and order databases. I'm trying to accomplish the following functionality. When the user wants to create new order to the system, there should be two ways to do that. 1st way. User can first navigate to the "search customers"-page and when he finds the right one, he can click a button "Make new order for this customer" or something like that. Then an "add order"-page opens with the information about the customer already in place. At this page, if the user clicks a button "Add products", a "search for products"-page should open in a new tab. Then the user could add products to the "add order"-page that is open in the background tab by clicking let's say "Add this product" button. When the user closes the "search product"-page the products would be there waiting at the "add order"-page. 2nd route. User can go directly to the "search for products"-page and when he clicks the same "Add this product" button, a kind of a blank "add order"-page should open to the background tab with the newly added product information. Then the user could again keep adding products until he's done. How should I try to accomplish this kind off a two-way interaction between the "add order"-page and "search for products"-page which is dependent on the initiator? Should I use cookies, ajax or some kind of parent, child relation and messing with window.opener? I have tried to achieve this the following way but it doesn't work. // code in the "search for products"-page var productGB; var destGB; function JsTakeProductToOrder(product) { // This is the function to be executed if (window.opener) { // when user clicks "Add this product..." productGB = product; destGB = window.opener; JsDeliverProduct(); } if (!window.opener) { productGB = product; if (typeof destGB == 'undefined') { destGB = window.open("addOrder.php"); } else { JsDeliverProduct(); } } } /*The function JsDeliverProducts here just basically a…
has comment: http://stackoverflow.com/comment/46996995
answer count: 0
score: 1
upvote count: 1
type: Question
has title: Communication between browser tabs, Javascript

http://stackoverflow.com/comment/47074800
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29454894
type: Comment
has text: That documentation page says `If you want to create an icon that isn't always visible, use a page action instead of a browser action.` This has left me with the only option of using a page action. I should also mention that this is running as a [background](https://developer.chrome.com/extensions/background_pages) script.

http://stackoverflow.com/q/29446713
has title: how to append the specific values in array?
possible better answer: http://stackoverflow.com/a/29446798
has body: This is my directive.I want to append the array specific array value in existing array localStorage.getItem('albumcomments') = "[{"id":1,"photocomment":"sdfsdfs"}]"; angular.module('albumlikeFeature',[]).directive('albumlikeFeature', ['$filter', '$route', function ($filter, $route) { return { restrict: 'E', scope: {}, templateUrl: 'app/components/album/albumlikefeature.html', link : function(scope, element, attrs) { scope.likeCount = 0; scope.unlikeCount = 0; scope.likeClick = function (dataid) { scope.likeCount += 1; if(JSON.parse(localStorage.getItem('albumcomments'))){ var newDataLike = []; angular.forEach(localStorage.getItem('albumcomments'), function(likeCount, item){ console.log('test'); newDataLike.push({id:item.id, photocomment:item.photocomment, like:likeCount}); }); console.log(newDataLike); localStorage.setItem('albumcomments',JSON.stringify(newDataLike)); } }; My expected output is [{"id":1,"photocomment":"test","like":"1","unlike":"1"} Now output is [{"like":"["},{"like":"{"},{"like":"\""},{"like":"i"},{"like":"d"},{"like":"\""},{"like":":"},{"like":"1"},{"like":","},{"like":"\""},{"like":"p"},{"like":"h"},{"like":"o"},{"like":"t"},{"like":"o"},{"like":"c"},{"like":"o"},{"like":"m"},{"like":"m"},{"like":"e"},{"like":"n"},{"like":"t"},{"like":"\""},{"like":":"},{"like":"\""},{"like":"s"},{"like":"d"},{"like":"f"},{"like":"s"},{"like":"d"},{"like":"f"},{"like":"s"},{"like":"\""},{"like":"}"},{"like":"]"}]
tagged with: arrays
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47060274
upvote count: 2
answer count: 3
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29454750
accepted answer: http://stackoverflow.com/a/29454750
tagged with: angularjs
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29446850
has answer: http://stackoverflow.com/a/29446798
type: Question

http://stackoverflow.com/q/29470010
tagged with: web-scraping
type: AnsweredQuestion
has title: How to get image src using javascript and xpath?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29470111
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29470347
has comment: http://stackoverflow.com/comment/47101665
possible better answer: http://stackoverflow.com/a/29470347
has body: How can I get image src using javascript and xpath? I tried document.evaluate, but still cannot get the result. I just don't understand how document.evaluate works so please if you could add explanation to the solution. Thanks &lt;html&gt; &lt;body&gt; &lt;div&gt; &lt;img src="img1.jpg"&gt; &lt;img src="img2.jpg"&gt; &lt;div&gt; &lt;img src="img-src-i-need.jpg"&gt; &lt;img src="img4.jpg"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;
tagged with: xpath
has answer: http://stackoverflow.com/a/29470111

http://stackoverflow.com/a/29506982
score: 0
has comment: http://stackoverflow.com/comment/47170814
type: Answer
has body: The first is good and working. for this: for ( i=0; i&lt;4; dr?(i++):(i--) ) Check jsFiddle here The Second one is NOT ok as for loop expects an identifier and instead got 'if'.
answers question: http://stackoverflow.com/q/29506603
has comment: http://stackoverflow.com/comment/47170915

http://stackoverflow.com/comment/46979326
score: 0
comment on: http://stackoverflow.com/a/29393981
type: Comment
type: AnswerComment
has text: where can I echo PHP message after the form has been submitted?

http://stackoverflow.com/comment/47160350
score: 0
type: AnswerComment
has text: not sure if OP will consider function expressions function statements (same?), but you make clear the only way to get the scope he asked for.
type: Comment
comment on: http://stackoverflow.com/a/29500935

http://stackoverflow.com/q/29376101
upvote count: 15
answer count: 2
has title: How can content-encoding be ignored
downvote count: 0
has comment: http://stackoverflow.com/comment/47701340
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29782596
has comment: http://stackoverflow.com/comment/46933052
tagged with: content-encoding
has comment: http://stackoverflow.com/comment/46934171
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29781717
has body: I have a device I need to download a file from. In certain cases, the file may have an incorrect content-encoding. Particularly, it may have a content-encoding of "gzip", when it is not gzipped, or compressed in any way. So, when the file is gzipped, it's simple to get the content using a basic ajax GET: $.ajax({ url: 'http://' + IP + '/test.txt', type: 'GET' }) .done(function(data) { alert(data); }); But this fails, as you might expect, when the content-encoding is wrong. To be clear, I'm not looking for a solution to bypass the ERR_CONTENT_DECODING_FAILED when simply navigating to the given url in a browser. I want to be able to load, for instance, a csv, into a string in javascript for further parsing. Can I GET the file, and force it to skip attempting decoding, or override the content-encoding of the response, or some such?
has comment: http://stackoverflow.com/comment/46933780
has comment: http://stackoverflow.com/comment/47759719
possible better answer: http://stackoverflow.com/a/29781717
type: Question
has answer: http://stackoverflow.com/a/29782596
has comment: http://stackoverflow.com/comment/46934933
tagged with: javascript
score: 15

http://stackoverflow.com/comment/47135498
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29487961
score: 0
has text: the return promise isn't helping at all since the first line of code in my factory isn't executing as well. I don't know what is happening when the factory is executed, but what I do know is that everything in my factory isn't being executed, apart from the "return" that I might have forgotten.

http://stackoverflow.com/q/29476908
has comment: http://stackoverflow.com/comment/47114974
downvote count: 0
has comment: http://stackoverflow.com/comment/47114718
has comment: http://stackoverflow.com/comment/47115016
score: 1
has comment: http://stackoverflow.com/comment/47115143
type: Question
has body: What I basically want to achieve is create some kind of delayedChange plugin to be able to call some action (such as ajax call to the server) only after some delay the last input change event was fired. At the moment I've came up with this (jsfiddle). I should see alert only in 5 seconds (5000 msec) the last text change had place but it fires immediately. (function ($) { var timer; $.fn.delayedChange = function (onchange, delay) { return this.each(function () { $(this).bind('change', function () { if (typeof onchange == 'function') { window.clearTimeout(timer); timer = window.setTimeout(onchange.call(this), delay); } }); }); } })(jQuery); $(document).ready(function(){ $('input').delayedChange(function(){ alert($(this).attr('id')); }, 5000); }); The weirdest is that this code actually worked for some time, and then it's functionality just vanished for no reason. Obviously there is some explanation but I can't see it for now. Are there some more certain ways to implement/improve such plugin?
tagged with: javascript
has comment: http://stackoverflow.com/comment/47114684
tagged with: onchange
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29477111
has comment: http://stackoverflow.com/comment/47114762
type: UnansweredQuestion
has title: Implement delayed jquery change event handler

http://stackoverflow.com/a/29496638
accepted answer of: http://stackoverflow.com/q/29496515
has comment: http://stackoverflow.com/comment/96470486
has comment: http://stackoverflow.com/comment/96933619
has body: Using path module of node.js: path.dirname('/this/is/a/path/to/a/file'); returns '/this/is/a/path/to/a'
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/96471217
score: 35
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/76135419
answers question: http://stackoverflow.com/q/29496515
upvote count: 36

http://stackoverflow.com/comment/47112914
type: QuestionComment
comment on: http://stackoverflow.com/q/29470441
score: 0
type: Comment
has text: as Ive read my own comment i realized that it cant be done(i think, maybe).. i wanted to know how is it that other street view have description on the linkscontrol..

http://stackoverflow.com/comment/47439531
has text: It's actually working surprisingly well for me. But there are still a few issues. First, you still calculate collision with the ground and borders (player.js, line 99) separately from calculating regular collisions (player.js, line 47). A possible change here is to move line 99-116 up to above line 77, then replace the bounce handling (Lines 104, 110, 115) simply to "collision = true;". This means that collision with an object will use the same code as collision with the ground and borders
type: Comment
comment on: http://stackoverflow.com/a/29461930
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47201830
type: Comment
has text: My bad. The concept is still the same regardless
score: 1
comment on: http://stackoverflow.com/a/29523629
type: AnswerComment

http://stackoverflow.com/a/29396694
score: 1
answers question: http://stackoverflow.com/q/29396425
has body: In the past i do publish like the one you have, but since i read this post from David Weldon page. I change my publish to something like this. Meteor.publish('cars', function() { var selector = {category: 'vehicle'}; var options = {limit: 10,fields: {memberPrice: false}}; return Products.find(selector,options); }); Based on the Publish function you have, the memberPrice option should be exclude here, try with this, here we are following the correct syntaxis of the Collection.find wich is collection.find([selector], [options]) and you have something like collection.find([selector],[selector],[options]).
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46971740
has comment: http://stackoverflow.com/comment/46969756
has comment: http://stackoverflow.com/comment/46969658
accepted answer of: http://stackoverflow.com/q/29396425
upvote count: 1

http://stackoverflow.com/q/29509510
has answer: http://stackoverflow.com/a/29510041
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/47175441
has title: Angularjs splice in loop
score: 0
accepted answer: http://stackoverflow.com/a/29510041
has comment: http://stackoverflow.com/comment/47176246
has answer: http://stackoverflow.com/a/29509967
tagged with: angularjs
has body: I am building this angularjs app, its my first one. So huge learning curve. I cant seem to to delete items as well as my search doesn't work. I managed to get column sorting and pagination to work though. I get no errors so i am not sure why the search and deleting of item row in table isnt working. I have tried using this: $scope.remove = function(client){ for(var i = $scope.clients.length - 1; i &gt;= 0; i--){ if($scope.clients[i].name == client.name){ $scope.clients.splice(i,1); } } } Working example: http://plnkr.co/edit/f2ozbP4JxrRSvRGJAmQi ANSWER, WORKING: Thanks @DTing $scope.remove = function(client){ $scope.filteredItems = $scope.filteredItems.filter(function(item) { return item.name !== client.name; }); $scope.groupToPages(); }
has comment: http://stackoverflow.com/comment/47175293
possible better answer: http://stackoverflow.com/a/29509967
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47175610
has comment: http://stackoverflow.com/comment/47175351
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/47175754

http://stackoverflow.com/comment/46975465
has text: breaks the `.hide()` function? are you defining them in the right order? you need to do `isUS` first. update your question with your new code.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29399493

http://stackoverflow.com/q/29526338
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47207121
has body: Recently I ran into a bug where someFunction was being called with the incorrect context. var args = [/* any number of values here */]; var someFunction = function(filter) { filter.set.apply(filter, args) }; Specifically, filter.set was called with a different context instead of filter. Is there a way to test that filter.set is being called with the context set as filter with Jasmine?
tagged with: jasmine
has comment: http://stackoverflow.com/comment/47207582
has title: How do I unit test that a method is called with the correct "this"?
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47207318
type: Question
has comment: http://stackoverflow.com/comment/47207429

http://stackoverflow.com/comment/47123708
comment on: http://stackoverflow.com/q/29481125
score: 0
type: Comment
type: QuestionComment
has text: one way to do it would be to move the success/error handlers out of the getMonitors function; and `return $http({ ...})`; then you could handle `.then(onSuccess, onError)` in the controller. but it is probably better to research and create your own promise wrapping the entire http req/rep

http://stackoverflow.com/comment/46971712
type: Comment
has text: I edited my code to your latest code but still when i click cancel, i catched this error: TypeError: prompt(...) is null...
comment on: http://stackoverflow.com/a/29397312
type: AnswerComment
score: 0

http://stackoverflow.com/a/29446098
type: Answer
has body: You have to rewrite your init. Attach event to parent and manipulate event.target.
answers question: http://stackoverflow.com/q/29445717
score: 0

http://stackoverflow.com/comment/47015703
has text: @dfsq I think that my issue is because of the timeout, see this plunker http://plnkr.co/edit/kzh7lJHHCZaOrqdbyPE2?p=preview
comment on: http://stackoverflow.com/q/29421464
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/47203061
type: Comment
has text: Nice, I was trying to remember the syntax. You beat me by a second before I was going to update to include this.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29524313

http://stackoverflow.com/comment/47081228
comment on: http://stackoverflow.com/q/29456720
score: 0
has text: please help people im pulling my hair out here.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29383939
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29633153
possible better answer: http://stackoverflow.com/a/29432256
has answer: http://stackoverflow.com/a/29432256
tagged with: media-source
favorite count: 0
tagged with: mpeg-dash
has title: Dynamically append and remove mpeg-dash segments from mediasource sourcebuffer
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/29633153
upvote count: 3
type: Question
has body: I am writing a simple mpeg-dash streaming player using HTML5 video element. I am creating MediaSource and attaching a SourceBuffer to it. Then I am appending dash fragments into this sourcebuffer and everything is working fine. Now, what I want to do is, I want to pre-fetch those segments dynamically depending upon current time of the media element. While doing this there are lot of doubts and which are not answered by MediaSource document. Is it possible to know how much data sourceBuffer can support at a time? If I have a very large video and append all the fragments into sourcebuffer, will it accommodate all fragments or cause errors or will slow down my browser? How to compute number of fragments in sourcebuffer? How to compute the presentation time or end time of the last segment in SourceBuffer? How do we remove only specific set of fragments from SourceBuffer and replace them with segments with other resolutions? (I want to do it to support adaptive resolution switching run time.) Thanks.
answer count: 2

http://stackoverflow.com/comment/46963447
comment on: http://stackoverflow.com/a/29393367
type: Comment
has text: oh! Could this be pass into the template html at all, so that I could in theory set the html title to that of the package name?
type: AnswerComment
score: 0

http://stackoverflow.com/a/29397861
has comment: http://stackoverflow.com/comment/46971879
has comment: http://stackoverflow.com/comment/46971824
downvote count: 0
has body: $(".indifferent").click(function(){ $(".input").toggle(); }); Each click on .indifferent will change it's display between showing and hiding.
score: 1
answers question: http://stackoverflow.com/q/29397714
type: Answer
upvote count: 1

http://stackoverflow.com/comment/47018534
score: 0
type: Comment
type: QuestionComment
has text: So, in other words, _nothing_ is working.
comment on: http://stackoverflow.com/q/29423501

http://stackoverflow.com/comment/60277542
has text: Does this thing actually works? because I've done the same an in "PageSpeed Suggestions " section I have the same number of suggestion - more, when i open "PageSpeed Insights" I have even more problems then before doing that. Only way that actually worked for me was to append a single style with this method above the other that I declare speciffic in head section
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29377379

http://stackoverflow.com/comment/47193318
has text: http://codepen.io/anon/pen/NPVZKa it works as expected to me. I guess you're trying this solution with a different markup
comment on: http://stackoverflow.com/a/29518828
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29406931
score: 0
tagged with: azure
has body: Repro: Open VS2013, File > New "Azure Cloud Service" Project > Add an "ASP.NET Web Role" (named as WebRole1) Select "Web Forms" template for the web role. Add jquery-1.11.1.min.js and a new WebForm1.aspx to the WebRole1 Project. Add the following code to the of WebForm1.aspx &lt;script src="jquery-1.11.1.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(function() { $.ajax({ type: "POST", url: "WebForm1.aspx/Foo", beforeSend: function (xhr) { xhr.setRequestHeader("Content-type", "application/json; charset=utf-8"); }, contentType: "application/json; charset=utf-8", dataType: "json", data: "{a: 'webmethod!'}", success: function(data) { alert(data.d); }, error: function() { alert("error"); } }); }); Add the following function to the WebForm1 class in WebForm1.aspx.cs [WebMethod()] public static string Foo(string a) { return a; } Set WebRole1 project as Startup Project and run. The browser alerts "undefined". But you can get "webmethod!" using plain ASP.NET WebForm project. What is wrong? I noticed that in url: "WebForm1.aspx/Foo": if you change the aspx part, the ajax fails; if you change the Foo part to whatever value, the ajax always succeed. This is unusual! In plain ASP.NET Web Form application, changing either part will result in "error"! If you create an Empty ASP.NET Web Role, the ajax will succeed!!! What is going on?
answer count: 1
tagged with: asp.net
tagged with: ajax
has answer: http://stackoverflow.com/a/29408635
has comment: http://stackoverflow.com/comment/46993175
type: UnansweredQuestion
tagged with: webmethod
has title: WebMethod not working in ASP.Net Web Role (Web Forms)?
type: Question
tagged with: javascript

http://stackoverflow.com/q/29488749
has title: TinyMCE pasted text from MSWord underlines all
type: AnsweredQuestion
score: 2
downvote count: 0
favorite count: 0
type: Question
tagged with: ms-word
has body: I have implemented TinyMCE v4.1.9 with my MVC application, and it works except for few issues. When I Copy and Paste normal text from MSWord, TinyMCE underlines all the pasted text. I want to preserve explicitly underlined text from MSWord. Paragraphs copied from Notepad, select all and add bullets will add only a single bullet point to all the text. Here is my configuration, any help is appreciated. plugins: 'paste', browser_spellcheck: true, valid_elements: "b/strong,i/em,u/span,br,ol,ul,li,p", force_br_newlines: true, force_p_newlines: true, forced_root_block: false, paste_word_valid_elements: "b/strong,i/em,u/span,br,ol,ul,li,p", paste_preprocess: function (pl, o) { //keep bold,italic,underline,lists,paragraphs o.content = strip_tags(o.content, '&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;br&gt;'); } strip_tags function is the same as in paste_preprocess tinymce issue
upvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/29845391
tagged with: copy-paste
linked to: http://stackoverflow.com/q/3520608
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29845391
tagged with: tinymce-4

http://stackoverflow.com/comment/47157139
has text: Yes missed that... Thanks
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29499155
type: Comment

http://stackoverflow.com/comment/47084365
has text: Yes till now you use this variable but on the PHP side so you need to shift it into the client side (JS). It will be harder to solve it via the comments :) What is your starting style and traffic value?
comment on: http://stackoverflow.com/a/29458776
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29389846
has comment: http://stackoverflow.com/comment/46995329
has body: Do you have any use for the return value from console.log (which is always undefined anyway iirc ) ? You might plan to override log or create your own console object, though (not recommended). More important, check for the presence of the console object and the log method, as some user agents have been known not to provide them: var lib = { out: function(args) { if (console &amp;&amp; console.log) { console.log(args); } }, outln: function(args) { if (console &amp;&amp; console.log) { console.log(args+"\n"); } } } Promoting robustness, test this way instead of once during your lib's initialization and setting a global ( you might even consider to add the test to your lib if you have a use case, eg. users/code tampering with the console object ).
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29389461
answers question: http://stackoverflow.com/q/29389461
type: Answer

http://stackoverflow.com/q/29468368
favorite count: 0
has comment: http://stackoverflow.com/comment/47098970
has answer: http://stackoverflow.com/a/29468625
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47098878
has answer: http://stackoverflow.com/a/29468605
tagged with: php
has comment: http://stackoverflow.com/comment/47099122
score: 1
has title: why is data not being passed from ajax to php
upvote count: 1
type: Question
has body: I am using the following form Update Description Product Name: New Description: Submit and the following javascript function function editDescription(){ xmlhttp = new XMLHttpRequest(); var name = document.getElementById("orginalName"); var Description = document.getElementById("newDescription"); var data_seen = false; // this is a flag to record whether any data has been seen. Used in the guard ofthe alert statement. if (name.value !="" && Description.value !=""){ data_seen = true; xmlhttp.open("POST","editDescription.PHP",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("Name=" + name.value + "&Description=" + Description.value); } if (!data_seen) { alert("please enter some data"); } } submitButton = document.getElementById("editDesButton"); submitButton.addEventListener("click", editDescription); and this small bit of php $Name = $_POST['Name']; $Description = $_POST['description']; if($Name !="" && $Description !=""){ $sql = "UPDATE PRODUCTS SET P_Description = '$Description' WHERE P_NAME = '$Name'"; $conn->exec($sql); If i run the form and use action="editDescription.php then the sql is run and the table is updated to how i want it but then when i run the javascript on the event when the button is clicked the values are not being passed in and i cannot see why, has anyone got any pointers?
answer count: 2
has comment: http://stackoverflow.com/comment/47098979
downvote count: 0
has comment: http://stackoverflow.com/comment/47098873
tagged with: javascript
has comment: http://stackoverflow.com/comment/47099699
has comment: http://stackoverflow.com/comment/47099114
has comment: http://stackoverflow.com/comment/47098950
has comment: http://stackoverflow.com/comment/47099038

http://stackoverflow.com/comment/47108333
has text: Thanks, but I get error: Uncaught SyntaxError: Unexpected token function. in this line: array.forEach(array[0], function(function(object) {
type: Comment
comment on: http://stackoverflow.com/a/29473209
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47114591
has text: If you read the first paragraph it explains what I'm trying to do... But I will try to explain it in more detail if that's what you wish. I am trying to separate numbers from any other character. And letters from characters such as **!@#$**. I will be using that information for a website, which I then will be multiplying and other things. It's simply for coding practices, as in practicing decoding something.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29476651

http://stackoverflow.com/q/29516319
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29516420
has answer: http://stackoverflow.com/a/29516419
has answer: http://stackoverflow.com/a/29517016
tagged with: animation
has answer: http://stackoverflow.com/a/29516450
answer count: 4
has body: here's my problem... I have this site: LINK, the fadein animation of both letters and imgs are stored in the CSS file, while the final fadeout animation is written in Javascript. After the fadeout I'd like to change the page's background color from grey to black with a fade animation as well, but I've literally no idea how to do that. If i set more delays the animations seems to not work. Can someone help me? EDIT: Here's the code of the whole index page: http://pastebin.com/wgSz8tEx
type: AnsweredQuestion
has title: More animations with delay
possible better answer: http://stackoverflow.com/a/29516419
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29516420

http://stackoverflow.com/q/29514300
has comment: http://stackoverflow.com/comment/47697666
downvote count: 0
type: UnansweredQuestion
tagged with: iframe
tagged with: node-webkit
linked to: http://stackoverflow.com/q/251420
has comment: http://stackoverflow.com/comment/47697506
score: 10
has answer: http://stackoverflow.com/a/29801913
has title: node webkit- catch iframe mouse events from parent window
has body: I'm trying to create a draggable iframe in my app. When the iframe is focused, all mouse events are triggered within the inner window object. I can't listen to those events within the iframe and trigger them myself, because it can be blocked by the iframe content js I can't create an unvisible layer above the iframe that will catch all the events and move them forward to the iframe, because bultin events can't be triggered by script (like css hover) can I catch those events in Node layer, without using webkit DOM?
type: Question
has answer: http://stackoverflow.com/a/29784153
has answer: http://stackoverflow.com/a/29862497
tagged with: javascript
favorite count: 0
answer count: 3
upvote count: 10
has comment: http://stackoverflow.com/comment/47700828
tagged with: node.js

http://stackoverflow.com/q/29480620
accepted answer: http://stackoverflow.com/a/29483900
tagged with: dhtml
tagged with: geography
has title: How to event listen and programatically highlight specific regions of my India map?
score: 0
type: Question
has body: I want the map of India and the list with text for the regions to listen to each other so that when the mouse pointer is hovering above a region then the corresponding region name gets underlined, and similarly if I hover over the name of the region to the left then the corresponding area on the map should be highlighted with the pink color. Can you help me? I can add code to listen for the hover event, but I'm not sure how to programmatically highlight the regions? I can listen for clicking on a region and clicking on a region name but how do I programatically highlight the corresponding region when selecting the text? &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt; &lt;meta charset=&quot;UTF-8&quot;&gt; &lt;meta name=&quot;keywords&quot; content=&quot;Houses Apartments, Vacation homes, Offices, Land, Flatmates,Paying Guest, Other real estate, Cars, Motorcycles, Accessories parts, Trucks, Other vehicles, Home Garden, Clothing, For Kids (Toys Clothes), Jewelry Watches, Hobbies, Sports Bicycles, Movies, Books Magazines, Pets, Tickets, Art Collectibles, Music Instruments, Computers Accessories, TV, Audio, Video, Cameras, Cellphones gadgets, Video games consoles, Job offers, Resumes, Services, Classes, Professional,Office equipment, Other, &quot;&gt; &lt;meta name=&quot;description&quot; content=&quot;Find jobs, cars, houses, mobile phones and properties for sale in your region conveniently. Find the best deal among {{count}} free ads online!&quot;&gt; &lt;title&gt;Free classifieds in India - Koolbusiness.com&lt;/title&gt; &lt;link href=&quot;/static/css/koolindex_in.css?0.238133053892&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;/static/js/jquery-1.10.2.min.js?0.238133053892&quot;&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; {% include &quot;kooltopbar.html&quot; %} &lt;script type='text/javascript' src=…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29483900
answer count: 1
tagged with: javascript
tagged with: event-handling
tagged with: dom-events

http://stackoverflow.com/q/29434164
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47037882
has answer: http://stackoverflow.com/a/29434221
has body: I have bootstrap tabs implementation when i click on title its not toggling and also when i click on tabs its redirecting to home page its not going into panel body , I spent alot of time but could not figure out the issue. Any help will be appreciated. So far tried code.... HTML <accordion close-others="false"> Process Rating Line of Business Ratings Compliance Ratings Create Inherent Risk Rating Inherent Risk Ratings Process Ratings THis is compliance
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
upvote count: 1
has title: Bootstrap toggle is not working?
score: 1
type: Question
has comment: http://stackoverflow.com/comment/47040855
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/47037980

http://stackoverflow.com/q/29396432
tagged with: jquery
has comment: http://stackoverflow.com/comment/46971034
favorite count: 0
score: -2
has title: Google maps being loaded multiple times?
has answer: http://stackoverflow.com/a/29400391
type: AnsweredQuestion
downvote count: 2
has body: In my page: http://sitesdemo.mghospedagem.com/ivam-entregas/3/33209.html I tried disabling a few javascript related to Google Maps, but Chrome Console is still pointing me the same errors, saying I have multiple instances of Google maps loaded. I'm getting errors like not calculating the shipping, or not being able to use the map, blah blah blah. Can anyone help me find what part of the javascript I have to edit to fix this? Here is the log: Failed to load resource: the server responded with a status of 404 (Not Found) main.js:61 Uncaught TypeError: undefined is not a function main.js:60 You have included the Google Maps API multiple times on this page. This may cause unexpected errors.main.js:60 yl 33209.html:9 Uncaught ReferenceError: J is not defined VM603:10 Uncaught TypeError: Cannot set property 'geometry' of undefined 33209.html:1 Uncaught ReferenceError: J is not defined 33209.html:9 Uncaught ReferenceError: J is not defined 33209.html:3 Uncaught ReferenceError: J is not defined 33209.html:6 Uncaught ReferenceError: J is not defined http://sitesdemo.mghospedagem.com/ivam-entregas/3/33209/css Failed to load resource: the server responded with a status of 404 (Not Found) Here the javascript file described on the log: https://jsfiddle.net/x24e2px2
type: Question
accepted answer: http://stackoverflow.com/a/29400391
tagged with: javascript
has comment: http://stackoverflow.com/comment/46976373
tagged with: google-maps
upvote count: 0
answer count: 1

http://stackoverflow.com/q/29384582
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: 18
has answer: http://stackoverflow.com/a/33290050
has comment: http://stackoverflow.com/comment/66021209
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/7790725
type: Question
has body: I would like to write something in the browser which records gestures on the trackpad. Since I wanted to be able to track all motion without having to worry about the pointer leaving the window, I first researched this problem and used the MDN Pointer Lock API demo as a starting point. But I notice when using this demo on a MacBook that if I lift my finger and start a new drag elsewhere on the trackpad, it ignores the distance my finger traveled in the air, it only counts the motion done while my finger is touching the trackpad. This is consistent with the way that the trackpad is used to move the mouse pointer in the operating system in general. But for my specific application, I want to have the absolute x and y of my finger on the trackpad. Would it be possible to build a variant of the demo linked above where the red dot corresponds to the absolute position of your finger? e.g., if you lifted your finger and then put it down in the upper left, the red dot would always jump to the upper left of the canvas? I'm aware of the javascript Touch Events API, which gives absolute coordinates when used on a tablet, but the demo does not register any trackpad input when run on the MacBook under Firefox (v36) or Chrome (v41). I have also read that it's possible to enable touch emulation in Chrome, though I could not find the checkbox to do that under my version (perhaps only special developer builds have this) and from reading about it, it seems like it's more of a mouse-to-touch translation so I'm doubtful that that emulation would have specific support for trackpads. Is there any way that getting the absolute x,y coordinates of a touch event on a MacBook trackpad is possible via HTML/Javascript?
tagged with: trackpad
upvote count: 18
tagged with: touch
downvote count: 0
answer count: 1
tagged with: javascript
has title: HTML5/Javascript - Is it possible to get the absolute coordinates of a touch event on a Macbook Trackpad in the browser?

http://stackoverflow.com/q/29444230
answer count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29444568
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29445545
tagged with: javascript
has body: I want to create a Quiz. For that I have multiple choice questions. I dont want to show all the questions on the same page at a time. I want that only one question should be displayed at a time and when button is clicked, question in next division should appear and previous question should hide. At last, when user submits the last question, it should take it to the results page that would be basic php. But how to do that show/hide part? I am a newbie in these. Please don't take me as a professional. here's my code. Next Next Next
score: 0
possible better answer: http://stackoverflow.com/a/29444290
has title: How to show one division on clicking button and hide another division at the same time?
tagged with: jquery
has answer: http://stackoverflow.com/a/29444290
has answer: http://stackoverflow.com/a/29444568
favorite count: 0
has answer: http://stackoverflow.com/a/29444834
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/q/29435313
has answer: http://stackoverflow.com/a/29438299
accepted answer: http://stackoverflow.com/a/29438299
type: Question
tagged with: reactjs
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/47041010
score: 0
has comment: http://stackoverflow.com/comment/47043236
has body: I'm toying around with ReactJS, and I'm using Gulp to concatenate my files. Because I can't easily determine the order of my files, and to not populate the global namespace I decided to namespace my application... e.g. App = App || {}; App.Dashboard = React.createClass({ render: function() { return ( My Dashboard ); } }); React.render( <App.Dashboard />, document.body ); This seems work fine, however the issue is that React.render() has to be after all of the files have loaded. To get around this, I did the following: File One: App = App || { ready: function() { React.render( <App.Dashboard />, document.body ); } }; $(function() { App.ready(); }); Other File: App.Dashboard = React.createClass({ render: function() { return ( My Dashboard ); } }); This works... but it just doesn't feel correct. Is there better way to go about this?
has title: ReactJS - Render top level component on load
type: AnsweredQuestion

http://stackoverflow.com/comment/47147391
score: 0
type: QuestionComment
type: Comment
has text: I saw your comment after I posted an answer. It's fixed now, thank you very much. When will we have a release?
comment on: http://stackoverflow.com/q/29478903

http://stackoverflow.com/comment/47241489
comment on: http://stackoverflow.com/q/29520560
score: 0
type: Comment
type: QuestionComment
has text: Is this a cross-origin request? This may be relevant as range is not a simple response header: http://stackoverflow.com/questions/5822985/cross-domain-resource-sharing-get-refused-to-get-unsafe-header-etag-from-re

http://stackoverflow.com/a/29422146
type: Answer
accepted answer of: http://stackoverflow.com/q/29421822
score: 0
has body: .css doesn't take a function as a third parameter. It does take a function as a second parameter with only a propertyName as the first: api.jquery.com/css. Try removing that function call and moving $('#meet').load() to just below the first .css call. You can chain the .css and .load functions as well. $(document).ready(function(){ $("#exec").click(function(){ $("#meet").load("execute.html").fadeIn('slow'); }); $("#events").click(function() { $('#meet').css('visibility','hidden').load("ev2.html", function() { $('#meet').css('visibility', 'visible'); }); }); });
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29421822

http://stackoverflow.com/comment/47038202
score: 0
has text: Yeah, works when I clear the cache. I would just like to know how it gets to the cache in the first place. I dont seem to find the place where it happens in the code.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29433978

http://stackoverflow.com/q/29516136
has body: There is a nested object like that: var conversation = { 'John': { 1: 'Test message 1', 2: 'Test message 2', 'Reply': { 3: 'Test message 3', 4: 'Test message 4' } }, 'Jack': { 5: 'Test message 5', 6: 'Test message 6' } }; I need to get all final values, so for that example, it is: Test message 1 Test message 2 Test message 3 Test message 4 Test message 5 Test message 6 How to iterate over the object? Is there any built-in function in jQuery or JavaScript?
has answer: http://stackoverflow.com/a/61610586
has title: how to print all values of a nested object
upvote count: 17
favorite count: 0
possible better answer: http://stackoverflow.com/a/29516258
answer count: 5
has answer: http://stackoverflow.com/a/79526150
has answer: http://stackoverflow.com/a/77275366
accepted answer: http://stackoverflow.com/a/29516227
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/8553539
score: 17
has answer: http://stackoverflow.com/a/29516227
has comment: http://stackoverflow.com/comment/47187701
has answer: http://stackoverflow.com/a/29516258
type: Question
linked to: http://stackoverflow.com/q/29478005
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47187705

http://stackoverflow.com/comment/47299055
type: AnswerComment
comment on: http://stackoverflow.com/a/29514900
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74990/discussion-between-kevin-andrid-and-lon-prosser).
score: 0

http://stackoverflow.com/comment/47058849
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29445776
score: 0
has text: https://jsfiddle.net/xo7metc8/1/

http://stackoverflow.com/comment/46955997
type: AnswerComment
has text: What transpiler did you use?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29377452

http://stackoverflow.com/a/29417831
has comment: http://stackoverflow.com/comment/47008044
has comment: http://stackoverflow.com/comment/47009432
has body: if you expect to work with JSON, why not first and foremost verify that's what you're working with? $.get(...) .success(function(data) { try { JSON.parse(data) } catch (e) { console.error("this isn't actually JSON"); } }) JSON cannot contain functions, nor function calls, so just asking the browser to see if it can be parsed should be enough to make it go "there is stuff in here that isn't real JSON data". The same goes for your PHP of course. Never build a string if you need a specific serialization. In this case, construct your key/map object the usual PHP way, and then use the built in json_encode function for converting that to a legal JSON serialization, instead.
type: Answer
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/47008405
answers question: http://stackoverflow.com/q/29417626
has comment: http://stackoverflow.com/comment/47008155
score: 0

http://stackoverflow.com/comment/47208259
type: Comment
type: QuestionComment
has text: a batch file can work with lots of nested escaping, but considering that chrome and node.js can both get a deep folder list, i wonder if a batch file is the best approach...
comment on: http://stackoverflow.com/q/29526272
score: 0

http://stackoverflow.com/comment/47114872
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29476313
has text: I do not know, but when I delete ` ` part, it looks fine.

http://stackoverflow.com/comment/47194619
has text: Right now both are animating together without any delay. I want some delay between caption and button
type: Comment
comment on: http://stackoverflow.com/a/29519513
score: 0
type: AnswerComment

myo
tag name: myo
type: Tag
tags question: http://stackoverflow.com/q/29418590

http://stackoverflow.com/comment/47003010
type: AnswerComment
has text: @GINCHER I think this looks cleaner and works better than before
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29414203

http://stackoverflow.com/q/29394462
has answer: http://stackoverflow.com/a/29615618
score: 3
has comment: http://stackoverflow.com/comment/47301825
has body: I want to load a state as a modal so that I can overlay a state without effecting any other states in my application. So for example if I have a link like: Add Note I want to then interrupt the state change using a directive: .directive('modal', ['$rootScope', '$state', '$http', '$compile', function($rootScope, $state, $http, $compile){ return { priority: 0, restrict: 'A', link: function(scope, el, attrs) { $rootScope.$on('$stateChangeStart', function (event, toState, toParams) { event.preventDefault(); }); el.click(function(e){ $http .get('URL HERE') .then(function(resp){ $(' ' + resp.data + ' ').appendTo('[ui-view=app]'); setTimeout(function(){ $('.wrapper').addClass('showModal'); },1); }); }); } } } ]) This successfully prevents the state change and loads the URL and appends it as a modal to the application. The problem is that it loads the entire application again... How can I load just the state? e.g. the template files and the adjoining controller. The state looks like: .state('notes.add', { parent: 'notes', url: '/add', views: { 'content': { templateUrl: 'partials/notes/add.html', controller: 'NotesAddCtrl' } } }) An example of how it should work using jQuery: http://dev.driz.co.uk/AngularModal See how I can access StateA and StateB loading via AJAX that uses the History API to change the URL to reflect the current state change. And regardless of whether I am on the index, StateA or StateB I can load StateA or StateB as a modal (even if I'm on that State already) and it doesn't change the url or the current content, it just overlays the state content. This is what I want to be able to do in AngularJS. Note. this example doesn't work with the browser back and forward buttons due to it being a quick example and not using the history api correctly.
has comment: http://stackoverflow.com/comment/47322515
has comment: http://stackoverflow.com/comment/47137281
has comment: http://stackoverflow.com/comment/47191875
type: Question
has comment: http://stackoverflow.com/comment/47178140
tagged with: javascript
linked to: http://stackoverflow.com/q/21883559
has comment: http://stackoverflow.com/comment/47135700
tagged with: jquery
has answer: http://stackoverflow.com/a/29590222
has comment: http://stackoverflow.com/comment/47134383
favorite count: 0
has comment: http://stackoverflow.com/comment/47137766
answer count: 3
linked to: http://stackoverflow.com/q/26220037
downvote count: 1
upvote count: 4
tagged with: angularjs
has answer: http://stackoverflow.com/a/29594519
has comment: http://stackoverflow.com/comment/47134979
has comment: http://stackoverflow.com/comment/47191520
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47187112
has comment: http://stackoverflow.com/comment/47135226
has comment: http://stackoverflow.com/comment/47319690
has comment: http://stackoverflow.com/comment/47135935
linked to: http://stackoverflow.com/q/26591335
has title: Loading state as a modal overlay in AngularJS

http://stackoverflow.com/a/29470608
accepted answer of: http://stackoverflow.com/q/29470444
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29470444
type: Answer
score: 0
has body: Please try with Environment.NewLine for VB.net as below: Dim value As String = "[First" + _ Environment.NewLine + _ "Second]" will return [First Second]

angular-amd
tag name: angular-amd
type: Tag
tags question: http://stackoverflow.com/q/29449393

http://stackoverflow.com/q/29393587
tagged with: arrays
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46965714
tagged with: sorting
has comment: http://stackoverflow.com/comment/46965345
favorite count: 0
has body: Javascript has arrays which use numeric indexes ["john", "Bob", "Joe"] and objects which can be used like associative arrays or "maps" that allow string keys for the object values {"john" : 28, "bob": 34, "joe" : 4}. In PHP it is easy to both A) sort by values (while maintaining the key) and B) test for the existence of a value in an associative array. $array = ["john" =&gt; 28, "bob" =&gt; 34, "joe" =&gt; 4]; asort($array); // ["joe" =&gt; 4, "john" =&gt; 28, "bob" =&gt; 34]; if(isset($array["will"])) { } How would you acheive this functionality in Javascript? This is a common need for things like weighted lists or sorted sets where you need to keep a single copy of a value in data structure (like a tag name) and also keep a weighted value. This is the best I've come up with so far: function getSortedKeys(obj) { var keys = Object.keys(obj); keys = keys.sort(function(a,b){return obj[a]-obj[b]}); var map = {}; for (var i = keys.length - 1; i &gt;= 0; i--) { map[keys[i]] = obj[keys[i]]; }; return map; } var list = {"john" : 28, "bob": 34, "joe" : 4}; list = getSortedKeys(list); if(list["will"]) { }
has comment: http://stackoverflow.com/comment/46964669
has answer: http://stackoverflow.com/a/48631649
linked to: http://stackoverflow.com/q/890807
has comment: http://stackoverflow.com/comment/46965395
score: 3
has comment: http://stackoverflow.com/comment/46964647
has answer: http://stackoverflow.com/a/74726619
has answer: http://stackoverflow.com/a/46267489
has comment: http://stackoverflow.com/comment/46965441
has comment: http://stackoverflow.com/comment/46964230
has comment: http://stackoverflow.com/comment/46964498
upvote count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/57006036
linked to: http://stackoverflow.com/q/5467129
tagged with: object
answer count: 8
has comment: http://stackoverflow.com/comment/46964179
has comment: http://stackoverflow.com/comment/46964409
has answer: http://stackoverflow.com/a/29394056
has title: How to implement a map or sorted-set in javascript
has answer: http://stackoverflow.com/a/29394249
type: Question
has comment: http://stackoverflow.com/comment/46964548
has comment: http://stackoverflow.com/comment/46964412
has answer: http://stackoverflow.com/a/29393894
has answer: http://stackoverflow.com/a/29403613
linked to: http://stackoverflow.com/q/1069666

http://stackoverflow.com/q/29448057
has comment: http://stackoverflow.com/comment/47062520
favorite count: 0
has answer: http://stackoverflow.com/a/29448137
has comment: http://stackoverflow.com/comment/47062509
type: UnansweredQuestion
has title: Undefined method in a javascript object
has comment: http://stackoverflow.com/comment/47062593
has answer: http://stackoverflow.com/a/29448176
has comment: http://stackoverflow.com/comment/47062602
downvote count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/47062676
type: Question
has comment: http://stackoverflow.com/comment/47062589
score: -2
has body: Here is my problem, I have the following StatCharac object : function StatCharac (initVal) { this.initVal = initVal; this.val = initVal; this.modifs = []; this.getVal = function() { var stat = this.val; for (var i =0; i &lt; this.modifs.length; i++) { stat = this.modifs[i](stat); } return stat; } } And when I try to access to the getVal method, the console says that this method is undefined. I have already defined a method the same way in another object and everything was fine. I also have tried to use the prototype attribute of StatCharac, but it doesn't work neither... What's wrong ? EDIT : When I say access to getVal it's this way : console.log('message : ' + character.hp.getVal); I tried to do it for other methods, and if the methods is recognised, its code is supposed to appear in the message. Here is where I use StatCharac : function Character (nameCharac, id, hp, spell, owner) { this.nameCharac = nameCharac; this.id = id; this.hp = new StatCharac(hp); this.power = new StatCharac(0); this.spell = spell; this.pos = -1; this.canMove = false; this.canPlay = false; this.owner = owner; } When I try to call getVal() I get the following error : Missing error handler on 'socket'. TypeError: Object # has no method 'getVal' at Socket. (blabla\app.js:237:55) ... FINAL EDIT : Ok I found where the problem was. Actually, I copy my characters from this array : var dbCharacters = []; for (var i = 0; i &lt; 44; i ++) { dbCharacters[i] = new Character('PersoYolo'+(i+1), i, 100, null); } In order to clone the characters (and not only get the reference) I use this function : function clone (o) { return JSON.parse(JSON.stringify(o)); } But after a test, it appears that this function clone only the attributes of the object o, and not its method. So now I have to found how to clone a whole object in JS.
tagged with: javascript
has answer: http://stackoverflow.com/a/29448164
answer count: 3

http://stackoverflow.com/comment/54757993
has text: OK, it took me way too long to understand what you're trying to do. You want to add Bootstrap classes into the CKEditor Styles dropdown and then combine them on elements in the document you're editing. Right? Bad news is, I don't think the Styles dropdown allows you to do that, as it's not multiselect. Only one style can be selected per block/object element, and maybe combined with inline element styles. You cannot have two styles on one ```` tag. This is by design.
comment on: http://stackoverflow.com/q/29510288
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/q/29451507
answer count: 2
has answer: http://stackoverflow.com/a/29451695
possible better answer: http://stackoverflow.com/a/29451836
has body: I have two fields in a form and I want to add a rule for them saying that id2 cannot have value less than id1 &lt;input type="text" id="id1"&gt; &lt;input type="text" id="id2"&gt; id1 : { number: true, min: 0 }, id2 : { number: true, min: 0 } Is there a way to set the rule for the jquery validator?
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29451695
tagged with: jquery
favorite count: 0
type: Question
has title: how to use jquery validator to determine value of one field is greater than another field?
upvote count: 3
has answer: http://stackoverflow.com/a/29451836

http://stackoverflow.com/a/29375841
downvote count: 0
has comment: http://stackoverflow.com/comment/83500639
type: Answer
score: 1
upvote count: 1
has body: Well the safest way to check if script is loaded is you can add a simple callback at end of script . Which if exist can be called with some data also to be passed. if(window.loaded){ window.loaded(params); } Once the script loads it will execute this method which you can declare in your parent script which will be called. Also you can trigger an event on body and listen on that event in other parent code.
answers question: http://stackoverflow.com/q/29375510

http://stackoverflow.com/comment/47103106
comment on: http://stackoverflow.com/q/29394442
score: 0
type: Comment
type: QuestionComment
has text: Good interprettor @ApoorvBambarde .

http://stackoverflow.com/q/29422270
favorite count: 0
has answer: http://stackoverflow.com/a/29422374
accepted answer: http://stackoverflow.com/a/29422374
type: AnsweredQuestion
upvote count: 5
has title: catching custom exception in js
type: Question
tagged with: try-catch
score: 5
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: exception
tagged with: custom-exceptions
tagged with: throw
has body: If I have following function ValidationException(nr, msg){ this.message = msg; this.name = "my exception"; this.number = nr; } function myFunction(dayOfWeek){ if(dayOfWeek &gt; 7){ throw new ValidationException(dayOfWeek, "7days only!"); } } Question is: How can I catch this particular exception in catch block?

http://stackoverflow.com/comment/47054182
score: 0
has text: best would be if you post the code it should seems working for him since he is new in PHP and Ajax. He will copy paste your code and would not have response in div. You can see.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29443261

http://stackoverflow.com/q/29515761
tagged with: absolute
type: Question
has answer: http://stackoverflow.com/a/56361209
has title: Find absolute max value in Javascript array
tagged with: math
score: 10
tagged with: javascript
upvote count: 10
has answer: http://stackoverflow.com/a/29515819
has body: I am looking for a nice way to find the maximum ABSOLUTE value of an array. My array is i.e. var array = [10,20,40,-30,-20,50,-60]; Then: Math.max.apply(null,array); Will result in '50'. But, actually, I want it to return '60'. The option is to create a second array using Math.abs, but actually I am wondering if the apply function can be combined, so it is one elegant solution.
answer count: 3
has answer: http://stackoverflow.com/a/29515841
tagged with: max
tagged with: arrays
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/29515841
accepted answer: http://stackoverflow.com/a/29515819
type: AnsweredQuestion

http://stackoverflow.com/q/29421602
tagged with: angularjs
type: UnansweredQuestion
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/32050861
tagged with: javascript
has answer: http://stackoverflow.com/a/29421847
has title: Angular highchart-ng installation
has body: i'm not able to use highcharts-ng in my angular app. https://github.com/dmitruk/highcharts-ng I have install it like that: bower install highcharts-ng And my index.js look like: 'use strict'; angular.module('highchartApp', [ 'ngAnimate', 'ngCookies', 'ngTouch', 'ngSanitize', 'ui.router', 'ui.bootstrap', 'highcharts-ng' ]) .config(function ($stateProvider, $urlRouterProvider) { $stateProvider .state('home', { url: '/', templateUrl: 'app/main/main.html', controller: 'MainCtrl' }); $urlRouterProvider.otherwise('/'); }) ; What am i missing? Because juste like this i'm getting this error.... Module 'highcharts-ng' is not available! You either misspelled the module name or blablabla Please forgive me if the solution is too easy.
answer count: 2
upvote count: 1
tagged with: highcharts
favorite count: 0

http://stackoverflow.com/comment/47039525
type: Comment
type: QuestionComment
has text: Indenting the code and adding empty lines between different if-then-else blocks makes it easier to read and understand.
comment on: http://stackoverflow.com/q/29434080
score: 0

http://stackoverflow.com/comment/112772983
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29460294
has text: The warning in the answer says "do not use in production". Actually I'd say "do not use AT ALL!". If you control both sites, you can use https://stackoverflow.com/a/29460207/2448440 - and it is even easier to use, because you don't have to URL encode your script!

http://stackoverflow.com/q/29511506
has comment: http://stackoverflow.com/comment/47186745
has comment: http://stackoverflow.com/comment/47231774
has comment: http://stackoverflow.com/comment/47222552
has answer: http://stackoverflow.com/a/29544342
accepted answer: http://stackoverflow.com/a/29544342
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47233479
type: Question
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
score: 0
tagged with: visualforce
answer count: 1
tagged with: salesforce
has body: I am using fullcalendar on a Visualforce page from Salesforce. I want to add a small button + on each day of the agendaDay, agendaWeek and Month views (at the top of the column, in the All day line). It works fine on Month and agendaDay views. But when it comes to the agendaWeek view, it works fine only if there are a few events in the all day line. If there are enough events to trigger the +3 more or +X more, events and + buttons are split, and the whole table is broken because it doubles the number of columns (7 columns with events only, and 7 columns with the button only). It seems there is a change occuring in the CSS of the table when this "+X more" appears, but I don't know how to detect it and adapt my code. This JSFiddle shows the problem. (see all-day events in agenda-view).
has title: Fullcalendar : columns are destroyed in agendaWeek view if some html is added and too many events are rendered

http://stackoverflow.com/comment/47033284
has text: You could also compare with `mapping.allowDom !== false` but I found the `!= null` more expressive to me. And it is also the same output you get from CoffeeScript's default arguments syntax.
comment on: http://stackoverflow.com/a/29423368
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47048491
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29439860
has text: Could you share the qrcode.js file or any reference? It looks like it is a scope issue.

http://stackoverflow.com/a/29473848
answers question: http://stackoverflow.com/q/29473749
score: 5
upvote count: 5
downvote count: 0
type: AcceptedAnswer
has body: Use .one() method. Attach a handler to an event for the elements. The handler is executed at most once per element per event type. $("#labelid").one("click",function() { if($("#inputid").val() === 'sometexthere') // remove the ; { $("#inputid").val(''); } }); The val('...')in if($("#inputid").val('sometexthere')) is assigning the value, and not comparing - $("#inputid").val() === '...' . Note : As j08691 suggests here if its just related to initial text/placeholder use &lt;input placeholder="sometexthere"/&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/29473749

http://stackoverflow.com/comment/47045280
type: Comment
comment on: http://stackoverflow.com/a/29438248
score: 0
type: AnswerComment
has text: You didn't explain the problem.

http://stackoverflow.com/comment/46969801
has text: @user2225593 - does this answer your question?
comment on: http://stackoverflow.com/a/29381251
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/29487527
has answer: http://stackoverflow.com/a/29487694
has answer: http://stackoverflow.com/a/29487651
answer count: 6
has body: In my json function, it will return a few value and i want to store it in global variable: function PrepareJsonFormat() { jQuery.getJSON( "/abc/xyz", { varA: jQuery("#qwerty").val() }, function (data) { if (data != null &amp;&amp; data != "") { $.each(data, function (i, val) { ==&gt; all the val.value i want to put in global variable }); } }); } After all the values are been stored in the global variables, i will click a button and use the values. How can i do this? Please help. Thank you.
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29487581
favorite count: 0
has answer: http://stackoverflow.com/a/29487673
has answer: http://stackoverflow.com/a/29487613
has title: How to create jquery global variable
tagged with: parsing
score: 2
upvote count: 2
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29487727

http://stackoverflow.com/comment/47028320
comment on: http://stackoverflow.com/a/29428107
type: AnswerComment
score: 0
has text: how about putting isolated controller for the grandParent and putting the getValue funtcion
type: Comment

http://stackoverflow.com/q/29512979
linked to: http://stackoverflow.com/q/15419022
has body: I want to submit two forms within a servlet,success of second form is not compulsory.whether the second submission successful or not first submission should succeed. first submit out.print(" "); out.print(" "); out.print(" "); out.print(" "); out.print(" "); out.print(" "); out.print(" "); out.print(" "); out.print(" "); second submit URL url = new URL(null, "url comes here", new sun.net.www.protocol.https.Handler()); HttpsURLConnection urlConn = (HttpsURLConnection) url.openConnection(); I want first one to be succeed in any case such as timeout exception of the second submit.
upvote count: 1
downvote count: 1
type: Question
tagged with: jakarta-ee
tagged with: java
tagged with: javascript
tagged with: forms
tagged with: servlets
score: 0
answer count: 1
has title: submit two forms within a servlet
has comment: http://stackoverflow.com/comment/47184151
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47182017
has answer: http://stackoverflow.com/a/29513326

http://stackoverflow.com/a/29528951
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/29528918
has body: You need to bind them to the select element not option 1 2
downvote count: 0

http://stackoverflow.com/comment/46933135
has text: need to look how you placed this controllers in html? or are they on different page?
comment on: http://stackoverflow.com/q/29376309
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/29420151
type: AnsweredQuestion
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29420292
score: 0
answer count: 2
has title: AngularJS - Using multiple forms
has answer: http://stackoverflow.com/a/29420505
accepted answer: http://stackoverflow.com/a/29420505
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47012304
has body: I'm pretty new to AngularJS, and in my inquisitive nature have attempted (and succeeded in most respects) in writing a news page, that allows users to comment on each article. What I'm totally unhappy with though is my use of classic Javascript to get the story from the forms dynamically; you can see that I'm creating input fields that I am using a GetElementById on. Is there anyway to tidy this up with the two way data binding? I originally did this, but my lack of knowledge meant that the model was bound to BOTH forms; what would the the 'Angular' way around this? Primarily I can see that the addComment function is just Javascript - I know I can do this more succinctly in JQuery, but don't want to. I've got it working with a single 'comment' just fine, but can't see how I would approach multiple. The second part is my form validation doesn't work. My guess is that my stab into it isn't great. var app = angular.module("ngStoryTime", []); var _stories = [ { Id: 1, Title: 'Man Falls Off The World!', Body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', Date: '7 March 2015', Images: [], Comments: [{ Body:'LOL!', Name:'Michael', Date:'1 April 2015' }, { Body:'Tis a shame that.', Name:'William', Date:'1 April 2015' }] }, { Id: 2, Title: 'Woman Eats Badger!', Body: 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum', Date: '8 March 2015', Images: [], Comments: [] } ]; app.controller('StoryController', function($scope){ $scope.pageTitle = 'Welcome to the StoryTime website!'; // Initialise the story, and blank Comment property here this.Stories = _stories; this.addComment = function(story){ // Is there a better way to do this?? var commentValue = document.getElementById('txtComment_' + story.Id); var nameValue = document.getElemen…
has answer: http://stackoverflow.com/a/29420292

xss
tags question: http://stackoverflow.com/q/29417626
tags question: http://stackoverflow.com/q/29470499
type: Tag
tags question: http://stackoverflow.com/q/29421703
tags question: http://stackoverflow.com/q/29527420
tag name: xss
tags question: http://stackoverflow.com/q/29410746

http://stackoverflow.com/comment/47111904
comment on: http://stackoverflow.com/a/29475456
type: Comment
has text: Ah this works fantastically! Could you explain the use of the ? & :...? Also, nice use of caching the length.
score: 0
type: AnswerComment

http://stackoverflow.com/a/29403652
score: 0
type: Answer
has body: This won't return anything: $('#price').val() // undefined #price is a td element. td elements don't have a value. It does, however, have text: $('#price').text() // the value you echo from PHP
answers question: http://stackoverflow.com/q/29403584

http://stackoverflow.com/q/29426882
has answer: http://stackoverflow.com/a/29426912
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47024459
favorite count: 0
possible better answer: http://stackoverflow.com/a/29426912
has answer: http://stackoverflow.com/a/29426909
has answer: http://stackoverflow.com/a/29427508
answer count: 4
score: -1
has body: function main() { console.log("document ready, Javascript running"); $(".openmenu_container").mouseover(function (){ console.log("mouseover triggered"); $(".sidebar").css("left","0px"); $(".openmenu_container").css("left","-200px");); //Uncaught SyntaxError: Unexpected token ) $(".sidebar").mouseleave(function (){ console.log("mouseleave triggered"); $(".sidebar").css("left","-200px"); $(".openmenu_container").css("left","40px");}); }} $(document).ready(main); I already have a functional sidebar on my website, using the .click() function. I want to make it so that mousing over the "open menu" button would be enough to open the menu, and that once the menu was opened, if the user moved their mouse out of the menu div, the menu would automatically close. An error message is the only thing logged to the console, meaning that my code doesn't even run. The error chrome gives me, "Uncaught SyntaxError: Unexpected token )" doesn't make any sense, since the second ')' is needed to complete the .mouseover(). What am I doing wrong? Do I need a second argument for .mouseover? JSFiddle: http://jsfiddle.net/dsghfnrd/2/
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29426909
has answer: http://stackoverflow.com/a/29427741
type: Question
has title: Jquery .mouseover error, doesn't trigger
upvote count: 0

http://stackoverflow.com/a/29388691
has body: Neither of your choices are correct. You first choice attempts to use return to return a value from an asynchronous callback. It is generally not possible, and RequireJS is no different. See this question and its answers for why it is that way. Your second choice puts a define inside a callback passed to require. This may work in some toy cases but in general this just won't work. (By "toy case" I mean proof-of-concepts where all conditions are under tight control. Such cases do not reflect the realities of real applications.) Linh Pham's suggestion is really your option here: define(["module", "B", "C"], function(module){ var A; return A; }); And if B depends on C and is not a AMD library, put a shim for it. In a comment you objected that you'd have to have "hundreds" of shims if you did this. You have a few options to avoid these shims: Do not load C with RequireJS. Load it with a script element before RequireJS is loaded on your page. Design your application to be started with just one module and require that your application be started by loading C before anything else: require(['C'], function () { require(['main']); }); main would be the module that starts your application. The disadvantage of this method is that if you are like me, eventually, you are going to forget to require C before you require main.
has comment: http://stackoverflow.com/comment/46985681
score: 5
has comment: http://stackoverflow.com/comment/46954891
type: AcceptedAnswer
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/46955165
has comment: http://stackoverflow.com/comment/46954973
has comment: http://stackoverflow.com/comment/46955059
accepted answer of: http://stackoverflow.com/q/29381928
type: Answer
answers question: http://stackoverflow.com/q/29381928

http://stackoverflow.com/a/29510456
has body: it seems like you need to set 'floating: false' http://jsfiddle.net/hx86zhob/1/ legend{ layout: 'vertical', align: 'right', verticalAlign: 'middle', floating: false }
upvote count: 10
type: Answer
has comment: http://stackoverflow.com/comment/47182810
answers question: http://stackoverflow.com/q/29510063
score: 9
has comment: http://stackoverflow.com/comment/47181943
has comment: http://stackoverflow.com/comment/61038089
downvote count: 1

http://stackoverflow.com/comment/47188631
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29516553
has text: `$parent.isFrench`, isFrench is on parent scope, if does not work just try ` {{$parent | json}} `, or basically open batrange and check the scopes parent child relationshio

http://stackoverflow.com/a/29515363
has comment: http://stackoverflow.com/comment/47188928
has body: In your answer, you mention you've used VB.Net code to help with the execution of your Insert code. You could further expand your usage of VB.Net in the code behind to help with the problem you are faced with. Here is an example which hopefully helps you: In your ASPX page, you could replace your form code with the following: <asp:Button runat="server" ID="btnInsertInto" Text="Insert" /> The submission of the form is now handled by the ASP Button (asp:Button) and is connected to an event in the code-behind file: Private Sub btnInsertInto_Click(sender As Object, e As EventArgs) Handles btnInsertInto.Click ' Handle button click code here.. End Sub Within the same code-behind class, you can make use of the Page_Load sub to handle your page initialization code: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then ' Page initialization code goes here.. End If End Sub So, the entire code-behind class looks like: Public Class WebForm1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then ' Page initialization code goes here.. End If End Sub Private Sub btnInsertInto_Click(sender As Object, e As EventArgs) Handles btnInsertInto.Click ' Handle button click code here.. End Sub End Class When I tested this before posting, I was able to refresh the page without the insert code being executed.
accepted answer of: http://stackoverflow.com/q/29514400
type: Answer
answers question: http://stackoverflow.com/q/29514400
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/47003626
has text: @BalajiViswanath - Yeah, it doesn't seem to add it, but it's there for other files. I've added more info to the post.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29414917

http://stackoverflow.com/q/29435306
type: Question
possible better answer: http://stackoverflow.com/a/29435358
has comment: http://stackoverflow.com/comment/47040210
answer count: 2
has answer: http://stackoverflow.com/a/29435358
tagged with: javascript
has title: How can I build a 'moment' function that works in a non-global locale?
has answer: http://stackoverflow.com/a/29435353
favorite count: 0
upvote count: 2
downvote count: 1
tagged with: momentjs
type: AnsweredQuestion
has body: With MomentJS, if necessary I can set a locale on a specific moment instance (rather than globally) using .locale (or .lang in older versions). How can I create a function equivalent to moment (all 42 signatures of it) that always works in a specific locale that's different from the global? I have a submodule within a web project that has to work with a custom locale. We don't want this locale used outside this particular submodule, but we want it used consistently within that submodule. So I basically want a moduleMoment (or whatever) that I can call just like moment, but which works in the custom locale. Is there any built-in way to do that? Note: I'm not talking about changing the locale of an existing instance, I'm talking about calling the moment function (in all its various different signatures) using a locale other than its global locale. So this won't work: var m = moment(args).locale(localeId); ...because the args will be processed in the global locale, and then the locale gets changed on the instance after the fact, which is too late.
has comment: http://stackoverflow.com/comment/47040259
score: 1
accepted answer: http://stackoverflow.com/a/29435353

http://stackoverflow.com/a/60021946
type: Answer
answers question: http://stackoverflow.com/q/29412865
has body: &lt;code&gt;$.ajax({ url: "//myapi.com/json", //this is problem dataType: "jsonp" }).done(function (data) { selectText('Id', data.country); }).fail(function (jqXHR, textStatus, errorThrown) { var defaultOption = 'US' selectDropdownByText('Id', defaultOption); console.log(errorThrown); });&lt;/code&gt; relative path is not good, &lt;code&gt;$.ajax({ url: "myapi.com/json", //this will work dataType: "jsonp" }).done(function (data) { selectText('Id', data.country); }).fail(function (jqXHR, textStatus, errorThrown) { var defaultOption = 'US' selectDropdownByText('Id', defaultOption); console.log(errorThrown); });&lt;/code&gt;
score: 0

http://stackoverflow.com/comment/47127439
comment on: http://stackoverflow.com/a/29482235
type: Comment
has text: @dandavis That's true. I suppose once the format has been validated, `eval` is relatively safe. It's easier to white list functions based on an object than a regex though, and as far as I'm aware, provided the eval is just `f(a)`, it's equivalent to calling `window[fn](a)` programmatically in terms of available scopes.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47131622
type: Comment
comment on: http://stackoverflow.com/a/29485768
has text: Can you tell me how can I get statusCode which is returned by the api? it will return 302 if username and pass is correct, otherwise not.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47000799
score: 4
type: Comment
has text: If you talk about the HTML spec you should link to the spec, not to W3schools which is completely unrelated.
comment on: http://stackoverflow.com/a/29414108
type: AnswerComment

http://stackoverflow.com/comment/52736710
has text: @AnikIslamABhi Android/iOS
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29405310
type: Comment

http://stackoverflow.com/comment/46946637
score: 0
type: AnswerComment
has text: Apparently `TouchSpin` is undefined.
type: Comment
comment on: http://stackoverflow.com/a/29383813

http://stackoverflow.com/q/29425224
has comment: http://stackoverflow.com/comment/47021852
answer count: 1
tagged with: asp.net
favorite count: 0
has title: Button does not work when I create it through .aspx.cs
type: UnansweredQuestion
score: 2
has answer: http://stackoverflow.com/a/29425253
downvote count: 0
has body: When I do that in the home.aspx file everything works great [time1]: titel1 [time2]: titel2 [time3]: titel3 But when I try to create the button through the home.aspx.cs, the button created but when I click it does not show id in the alert: home.aspx: <% tempFucntion(); %> home.aspx.cs: protected void tempFucntion() { Response.Write(" [time4]: titel4 "); } I do not know why this happens or how it can be fixed I'd like to get some help
type: Question
tagged with: c#
tagged with: javascript
upvote count: 2

http://stackoverflow.com/comment/47107629
comment on: http://stackoverflow.com/q/29473137
has text: [If you ONLY want to include a separate file, don't use Angular](http://stackoverflow.com/questions/8988855/include-another-html-file-in-a-html-file). If you do want to build a web app using Angular, [work through the tutorial first](https://docs.angularjs.org/tutorial) to learn how it works. It's a framework, not a library like jQuery, and requires a completely new way of thinking about your page and code.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29450559
has title: How to avoid unwanted key cast from number to string in Immutable.js
score: 5
linked to: http://stackoverflow.com/q/6066846
has body: I'm trying to use Immutable in a project with reactjs and flux. Let's say I have a .js file with the code console.log ( Immutable.Map({1: 2}).toString() ) I browserify this script and run it from the browser (Google Chrome), the result is: "Map { "1": 2 }" notice that the key, 1, is now a string, not a number. If I try the same code directly in the console of the site http://facebook.github.io/immutable-js/ I get the correct result: "Map { 1: 2 }" Why is this happening and what can I do to get the correct result (key as number) in my script? I'm using node v0.10.26, Browserify 5.12.0 and immutable 3.7.1
answer count: 1
downvote count: 0
favorite count: 0
tagged with: browserify
has answer: http://stackoverflow.com/a/29451436
tagged with: node.js
has comment: http://stackoverflow.com/comment/47068523
type: UnansweredQuestion
tagged with: immutable.js
type: Question
upvote count: 5
tagged with: javascript

http://stackoverflow.com/a/42712389
type: Answer
has body: This worked for me, image: { width: 200, height:220, resizeMode: 'cover' } You can also set your resizeMode: 'contain'. I defined the style for my network images as: &lt;Image source={{uri:rowData.banner_path}} style={{ width: 80, height: 80, marginRight: 10, marginBottom: 12, marginTop: 12}} /&gt; If you are using flex, use it in all the components of parent View, else it is redundant with height: 200, width: 220.
upvote count: 5
downvote count: 0
answers question: http://stackoverflow.com/q/29476165
score: 5

http://stackoverflow.com/comment/108616779
type: AnswerComment
has text: Hi @Shreyance Jain, I am also facing the same issue. But I am doing with Spring Mongo repository. what is db object here?
type: Comment
comment on: http://stackoverflow.com/a/29489430
score: 0

http://stackoverflow.com/comment/47119033
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/29479214
has text: `(1111111111111111).toString() === "1111111111111111"` and `(11111111111111111).toString() === "11111111111111112"`. `parseInt` expects a string, and `2` is an invalid binary digit.
type: Comment

http://stackoverflow.com/comment/47215168
type: Comment
has text: Hi Alan, These String are shown on screen as columns of a rich datatable. Where should i call the javascript method so that one of the rich column gets color coded
comment on: http://stackoverflow.com/a/29522033
score: 0
type: AnswerComment

http://stackoverflow.com/q/29462932
downvote count: 0
has body: I've been spending several long hours trying to figure out why my Chrome extension wasn't working as it should only to find that apparently the Google Chrome webstore does not allow extensions to do certain things while it's open. I've read this thread on SO, though it's 2 years old now and the solutions posted did not work for me: Chrome Extension Content Script on https://chrome.google.com/webstore/ I'm running Chrome version 41.0.2272.118 (64-bit) on OS X Yosemite. As one of the responses suggested, I've run the command open /Applications/Google\ Chrome.app --args --allow-scripting-gallery; but my extension's content script will not run in the webstore still. All I'm trying to do is communicate between the content script and background script using chrome.runtime.sendMessage and chrome.runtime.onMessage. Has Google decided to completely remove those capabilities or is there a new command now?
type: Question
upvote count: 2
tagged with: javascript
linked to: http://stackoverflow.com/q/11613371
has title: Is there a work-around for allowing content/background scripts to execute while open in the chrome web store?
tagged with: google-chrome-extension
answer count: 1
accepted answer: http://stackoverflow.com/a/29463108
favorite count: 0
has answer: http://stackoverflow.com/a/29463108
tagged with: google-chrome
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/47067387
has text: possible duplicate of [How to set the prototype of a JavaScript object that has already been instantiated?](http://stackoverflow.com/q/7015693/1048572)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29449886

http://stackoverflow.com/q/29455546
has body: I have little problem with D3 force diagram. I´m using prepared demo with grouping nodes by group name. This is demo I have problem with function network(), where are mapping links. In my dataset i have link which are connected in both directions, it means that between two nodes can be cycle. In this method are cycles removed. I´m totally lost how to repair this function. This is what i need: both direction links... Problematic code: // constructs the network to visualize function network(data, prev, index, expand) { expand = expand || {}; var gm = {}, // group map nm = {}, // node map lm = {}, // link map gn = {}, // previous group nodes gc = {}, // previous group centroids nodes = [], // output nodes links = []; // output links // process previous nodes for reuse or centroid calculation if (prev) { prev.nodes.forEach(function(n) { var i = index(n), o; if (n.size &gt; 0) { gn[i] = n; n.size = 0; } else { o = gc[i] || (gc[i] = {x:0,y:0,count:0}); o.x += n.x; o.y += n.y; o.count += 1; } }); } // determine nodes for (var k=0; k&lt;data.nodes.length; ++k) { var n = data.nodes[k], i = index(n), l = gm[i] || (gm[i]=gn[i]) || (gm[i]={group:i, size:0, nodes:[]}); if (expand[i]) { // the node should be directly visible nm[n.name] = nodes.length; nodes.push(n); if (gn[i]) { // place new nodes at cluster location (plus jitter) n.x = gn[i].x + Math.random(); n.y = gn[i].y + Math.random(); } } else { // the node is part of a collapsed cluster if (l.size == 0) { // if new cluster, add to set and position at centroid of leaf nodes nm[i] = nodes.length; nodes.push(l); if (gc[i]) { l.x = gc[i].x / gc[i].count; l.y = gc[i].y / gc[i].count; } } l.nodes.push(n); } // always count group size as we also use it to tweak the force graph strengths/distances l.size += 1; n.group_data = l; } for (i in gm) { gm[i].link_count = 0; } // determine links for (k=0; k&lt;data.links.length; ++k) { var e = data.links[k], u = index(e.source), v = index(e.target); if (u != v) { gm[u].link_count++; gm[v…
type: Question
tagged with: javascript
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
tagged with: force-layout
answer count: 0
score: 1
has title: D3 nodes group/bundle and cycles between nodes
upvote count: 1

http://stackoverflow.com/q/29387894
tagged with: ios
tagged with: javascript
has title: Getting an error:'No Button found with monkeyID "LOGIN" record
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: monkeytalk
has body: Getting an error:'No Button found with monkeyID "LOGIN" record in recorded script in one project button name was Login but in another project button name is change to LOGIN. So script is failed. is there any way to run Script with name conversion(Case insensitive).Please suggest me, Thanks in advance. Thanks, Arihant.
type: Question
tagged with: automation
tagged with: iphone
has answer: http://stackoverflow.com/a/31317411

http://stackoverflow.com/q/29479513
has comment: http://stackoverflow.com/comment/47120644
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29479854
has comment: http://stackoverflow.com/comment/47120106
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29489090
upvote count: 1
downvote count: 1
tagged with: node.js
score: 0
has body: So, I have the following file: var sys = require('sys'); var mustache = require('mustache'); var view = { title: "Joe", calc: function() { return 2 + 4; } }; var template = "{{title}} spends {{calc}}"; var html = mustache.to_html(template, view); sys.puts(html); when I run it with node nodejs mypage.js I get the following output: Joe spends 6 That is all great! My question now is, how would I access this through Nginx? So, for example http://example.com/mypage.js Edit Here is the Nginx config (Note I am using jsp instead of js since js is already taken as a file extension): server{ listen 80 default_server; server_name example.com; root /usr/share/nginx/html/example.com; location ~ \.jsp$ { fastcgi_pass unix:/tmp/nginx.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } Hitting the page gives me a 502 Bad Gateway
type: Question
answer count: 2
has title: How to access a node file from nginx
tagged with: nginx

http://stackoverflow.com/comment/47070524
type: QuestionComment
has text: What is the purpose of your `submit` handler containing nothing but `stopPropagation()`? As per [the docs](https://api.jquery.com/event.stoppropagation/), *"Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event."* ~ Since there are no "parent handlers" for your submit, the whole handler seems pointless and perhaps causing some weird IE bug. Also, as per [the FAQ](http://stackoverflow.com/help/how-to-ask), please edit your OP to include the relevant code; don't expect the reader to download files just to understand your question.
score: 0
comment on: http://stackoverflow.com/q/29438912
type: Comment

http://stackoverflow.com/q/29447071
tagged with: offline
tagged with: node.js
tagged with: npm
score: 12
type: UnansweredQuestion
has title: How to download the whole NPM repository for full offline development joy?
type: Question
upvote count: 12
has comment: http://stackoverflow.com/comment/47060815
has comment: http://stackoverflow.com/comment/47062260
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/30746551
favorite count: 0
has body: Recently I was on holiday with limited internet connectivity. I was developing an application in node.js when I suddenly needed some NPM packages. This put a severe halt in the development and I was forced to wait until I could go online to download said packages and continue development. Is it possible to mirror the whole npm registry locally on my computer? How to do that? It should be possible seeing as online mirrors of the main registry exists. Where do they gather all packages from?

http://stackoverflow.com/q/29472384
tagged with: forms
has comment: http://stackoverflow.com/comment/47106202
tagged with: javascript
has comment: http://stackoverflow.com/comment/47106097
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47106349
has answer: http://stackoverflow.com/a/29472545
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29472773
has comment: http://stackoverflow.com/comment/47106499
tagged with: angularjs
type: Question
answer count: 2
has title: Angular.js / Using ng-submit with form
has comment: http://stackoverflow.com/comment/47106049
has comment: http://stackoverflow.com/comment/47106466
has comment: http://stackoverflow.com/comment/47106322
has body: I have an HTML page with form block ... a ... ... b ... Expand Start When I click on start, and a or b are empties, message is shown: "Please fill out this field" (which it is the desire behavior) . But when I fill out this field, and click again, create() is not submitted and I get the following error: An invalid form control with name='' is not focusable. I try also in this way: ... Expand Start But then even if I click on Expand, create() is executed instead of expand(). I also try yo change ng-submit to ng-click, but then it doesn't validate that the fields is fill out. My purpose is that create() will NOT be executed if one of the fields is empty, and proper message will be shown.
score: 0
has comment: http://stackoverflow.com/comment/47106637
has comment: http://stackoverflow.com/comment/47106110
has comment: http://stackoverflow.com/comment/47106187

http://stackoverflow.com/q/29515487
type: AnsweredQuestion
tagged with: orientdb
has title: Embedding record from function in OrientDB
type: Question
has comment: http://stackoverflow.com/comment/47200606
accepted answer: http://stackoverflow.com/a/29526571
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/47186967
score: 0
has body: I'd like to embed a record into another one using a function in OrientDB. I have a class called Backup. Here's it's definition: create class Backup extends V create property Backup.dateTime datetime create property Backup.record embedded V What I want to do is to call an OrientDB function, passing it an arbitrary @rid, and it will make a backup of that record for me. Here's what I tried so far: //function createBackup(id) var gdb = orient.getGraphNoTx(); var rec = gdb.command("sql", "select from V where @rid = ?", [id]); var v = gdb.command("sql", "create vertex Backup set dateTime = ?, record = ?", [(new Date().getTime()), rec[0].getRecord().toJSON()]); ... Tried using rec[0], or rec[0].getRecord() instead, but function always throws an error at me. Any ideas?
has answer: http://stackoverflow.com/a/29526571
has comment: http://stackoverflow.com/comment/47194503

http://stackoverflow.com/comment/47036571
has text: Please check OP has mentioned that OP wants to revert back the text
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29433577

http://stackoverflow.com/q/29406718
has comment: http://stackoverflow.com/comment/46987803
answer count: 1
tagged with: javascript
has body: I am posting html content to the serverside and converting it to PDF and streaming the file back. But am not able to download the file using: var formData = new FormData(); formData.append("htmlContent", strHTML); var request = new XMLHttpRequest(); request.open("POST", "RenderHtmlAsPDF.jsp"); request.send(formData); Download works when I create a dynamic form and post the html content targeting it to an iframe. But I am limited by the amount of data I can send.
has title: How to download a file using XMLHttpRequest
type: UnansweredQuestion
tagged with: java
type: Question
score: 0
has answer: http://stackoverflow.com/a/29406894

http://stackoverflow.com/q/29466724
has body: I have 5 accordions and data under each accordion but wat i need is that the all the accordion has to be closed first and when i click the accordion then i need it to be opened. SUPPLIERS > BP > CHEVERON > CITGO > EXOON This is the code sample for the first accordion is there anyway to close the first accordion and open it only on click?
score: 0
has answer: http://stackoverflow.com/a/29467335
tagged with: accordionpane
answer count: 1
linked to: http://stackoverflow.com/q/16149923
tagged with: accordion
tagged with: twitter-bootstrap
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47095943
type: Question
accepted answer: http://stackoverflow.com/a/29467335
has title: how to set first accordion panel to close?
tagged with: javascript

http://stackoverflow.com/a/29464006
score: 0
answers question: http://stackoverflow.com/q/29463578
type: Answer
has body: The UIWebView seems not to have a big JavaScript interface to look for error reporting, but you should take a look at the Safari Web inspector and its ability to monitor any UIWebView app: https://developer.apple.com/library/prerelease/ios/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Introduction/Introduction.html However there seems to be a bit of extra work necessary to get it working with any iOS app (see Get Oriented: Webkit-based apps)

http://stackoverflow.com/comment/47063657
has text: really? it works for me. did you try print the ```res.locals``` in the controller? Maybe provide which version of Sails you're using would be helpful
type: Comment
comment on: http://stackoverflow.com/a/29426424
score: 0
type: AnswerComment

http://stackoverflow.com/q/29432193
has comment: http://stackoverflow.com/comment/47044493
type: Question
has comment: http://stackoverflow.com/comment/47035032
tagged with: updatepanel
has comment: http://stackoverflow.com/comment/47044489
tagged with: postback
has title: Run jQuery click event after postback using an update panel
score: 0
has comment: http://stackoverflow.com/comment/47033892
type: UnansweredQuestion
has body: I have a page that looks like below: Then the user select any of the add buttons and it expands as below: User can then if they wish enter a single value in Feb and press copy, this does the postback using an update panel and updates all the text boxes and updates the total, the problem is that I want the page to stay expanded as below after the postback But as the add using a click event in jQuery the box then closes and returns to look like the first picture. I presume I use something like: ScriptManager.RegisterStartupScript(Me, [GetType](), "myFunction", "myFunction();", True) The jQuery in question that is fired when the user presses ADD is as follows: $("#content .step_2 .addtrabox &gt; ul &gt; li .title_1 a.addbtn").click(function (e) { e.preventDefault(); $(this).parent().parent().find(".add_box").slideToggle(300); });
answer count: 0
tagged with: javascript
tagged with: jquery
tagged with: asp.net

http://stackoverflow.com/comment/46961056
comment on: http://stackoverflow.com/q/29390104
type: QuestionComment
score: 0
has text: where's your AJAX code?? Please provide your JS where the function `showUser()` is shown
type: Comment

http://stackoverflow.com/q/29529172
type: Question
has title: Kendo: How do I create a recursive hieiarchy in the TreeView?
tagged with: javascript
has answer: http://stackoverflow.com/a/29529561
answer count: 1
downvote count: 0
favorite count: 0
tagged with: kendo-ui
accepted answer: http://stackoverflow.com/a/29529561
tagged with: kendo-treeview
type: AnsweredQuestion
score: 3
upvote count: 3
has body: I am using Kendo UI and trying to figure out how to get the TreeView to display a recursive hierarchy. Firstly, here is my model (I am retrieving a list of these objects by OData): public class PageTreeItem { public Guid Id { get; set; } public string Name { get; set; } public bool IsEnabled { get; set; } public PageTreeItem[] SubPages { get; set; } } And here is my JavaScript: var PagesDS = new kendo.data.HierarchicalDataSource({ type: "odata", transport: { read: { url: "/odata/cms/PageTree", dataType: "json" } }, schema: { data: function (response) { return response.value; }, total: function (response) { return response.value.length; }, model: { id: "Id", children: "SubPages" } } }); PagesDS.read(); $("#treeview").kendoTreeView({ template: kendo.template($("#treeview-template").html()), dataSource: PagesDS, dataTextField: ["Name"] }); And finally, the markup: &lt;div id="treeview"&gt;&lt;/div&gt; &lt;script id="treeview-template" type="text/kendo-ui-template"&gt; &lt;a href="javascript:void(0)" onclick="viewModel.edit('#=item.Id#')"&gt;#= item.Name #&lt;/a&gt; &lt;/script&gt; I can only ever get the top-level items to display. Obviously, setting the "children" property in schema-> model is not working. How do I achieve what I want?

http://stackoverflow.com/comment/46965174
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29394153
score: 0
has text: You could leave them as separate, and then if you're using Wordpress or a CMS, use an SEO plugin to combine all your CSS and JS files into one file if you want to make it as streamlined as possible

http://stackoverflow.com/comment/47007786
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/29417834
type: Comment
has text: Put the ` ` tag right before the ` ` closing tag.

http://stackoverflow.com/comment/46935893
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29377104
has text: Alright CodeGodie, first I am trying to implement your codes in my project, I do get the output, but it do not show any country or cities, because I have a huge php files in my project and I get lost where to paste ur codes
type: AnswerComment

http://stackoverflow.com/q/29416329
has title: Where to find supported WebAPIs in each browser
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47005135
score: -1
has body: Short summary: Where can I find a list of which WebAPIs are supported by the different browsers ? WebAPIs link -> https://developer.mozilla.org/en-US/docs/Web/API. Only some functionality seems to work from the APIs and some doesnt seem to work at all (Ive seen the icons on the left side of each property that says its deprecated or not, but ive tried properties that also doesnt have any special mention about deprecation or not being standardized). Longer explaination: Im working with different WebAPIs just for experimentation and i was working with Navigator and NetworkInformation previously, but a lot of the properties in Navigator does not seem to work even though some of them should work according to MDN. When trying NetworkInformation.connection to get information I got a javascript error in google chrome saying that it didnt recognize something called "NetworkInformation". According to caniuse.com the Navigator.battery property should work but it doesnt display anything except "undefined" when i use this simple code: var battery = navigator.battery; console.log(battery.charging);
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29416512
has comment: http://stackoverflow.com/comment/47011217
has comment: http://stackoverflow.com/comment/47004918
downvote count: 1
accepted answer: http://stackoverflow.com/a/29416512
type: Question

http://stackoverflow.com/comment/47173573
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29507384
has text: in first date picker am trying to disable date and time since it is already current date
score: 0

http://stackoverflow.com/comment/46959207
type: AnswerComment
comment on: http://stackoverflow.com/a/29390473
score: 0
type: Comment
has text: @Snowman88.. i will appreciate if you pls accept my answer by checking the left check sigh

http://stackoverflow.com/comment/47127532
has text: atleast you can JSfiddle it here : https://jsfiddle.net/
score: 0
comment on: http://stackoverflow.com/q/29483526
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47120218
type: AnswerComment
has text: @JBWar put the code for Page 2 in a window.onload={} if function is defined on page 2
type: Comment
comment on: http://stackoverflow.com/a/29460294
score: 0

http://stackoverflow.com/comment/47094064
has text: Will clean that up. So you want with sorting or without that?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29465284

http://stackoverflow.com/comment/47071528
type: AnswerComment
has text: Where can I insert echo json_encode(array("success" => true, "user" => $user)); and echo json_encode(array("success" => false, "message" => 'Please, fill in all fields!')); ??? @John S
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29452991

http://stackoverflow.com/q/29402437
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46992364
has comment: http://stackoverflow.com/comment/46980441
has title: Problems with removing an element with javascript
has answer: http://stackoverflow.com/a/29402524
tagged with: events
possible better answer: http://stackoverflow.com/a/29402600
has answer: http://stackoverflow.com/a/29402600
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29402524
has body: I got a function that removes an element 1 second after you double click it, using the target Event and removeChild. As shown below: function remove(e) { var target = e.target; setTimeout(function(){ target.parentNode.removeChild(target); }, 1000); } document.addEventListener("dblclick", remove, false); It does work, you doubleclick the element (only one square in this case) and it disappears one second later. However, if you double click the space outside it (the body i suppose) then everything gets removed. jsfiddle for demonstration: https://jsfiddle.net/8ma5ayqj/ Is there a way to prevent this from happening, without referring to the shape directly? Like if there were a couple of different divs i wanted this to happen to.
tagged with: javascript

http://stackoverflow.com/comment/47187513
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29511636
has text: @serlingpa Can you post your code to [jsfiddle](http://jsfiddle.net/)? Then I can check what's wrong with your code.
type: AnswerComment

http://stackoverflow.com/comment/47023642
score: 0
has text: I'm thinking about the situation that two side-by-side peers can not quickly reconnect to each other when the network connection fails for a while . It's a real life issue that hopefully can be fixed in the future. Thanks for your valuable information.
type: Comment
comment on: http://stackoverflow.com/a/29418087
type: AnswerComment

http://stackoverflow.com/q/29418957
has answer: http://stackoverflow.com/a/29420801
accepted answer: http://stackoverflow.com/a/29420801
type: Question
has title: Is it possible to get a natural log of a big-integer instance?
tagged with: math
tagged with: javascript
has comment: http://stackoverflow.com/comment/47010102
score: 0
has body: I am using big-integer for JavaScript. var bigInt = require('big-integer') I have a bigInt instance: var ratherLargeNumber = bigInt(2).pow(2048) Can I get a (natural) log of it?
answer count: 1
has comment: http://stackoverflow.com/comment/47010019
has comment: http://stackoverflow.com/comment/47009946
tagged with: node.js
type: AnsweredQuestion
tagged with: biginteger

http://stackoverflow.com/comment/46967542
comment on: http://stackoverflow.com/a/29395503
has text: Duly noted, thanks! What's the correct approach now, do I delete the answer and put its contents into a comment?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46966167
type: AnswerComment
has text: Awesome, thank you! I had to look at the source of the example provided to get it exactly right, but it was skybox that i was looking for.
score: 0
comment on: http://stackoverflow.com/a/29393346
type: Comment

http://stackoverflow.com/q/29378497
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29378753
has title: How to add new button navbar view Mobile only (using bootstrap)
has body: I want to create new menu with new button view in screen Mobile like this https://i.sstatic.net/zMQjQ.png and this menu hide if screen not Mobile Toggle navigation Link Link Link Link Dropdown Action Another action Something else here Separated link One more separated link Link Link Link Link this code retrun https://i.sstatic.net/F0Eje.png This my answer is there a better way. i used class hidden. Toggle navigation Link Link Link Link Dropdown Action Another action Something else here Separated link One more separated link Facebook twitter Linkedin Skype GooglePlus Youtube Share Rss and add code javascript $(function() { if(($(window).width() <= 767)) { $(".navbar-social").removeClass('hidden'); } });
tagged with: javascript
has comment: http://stackoverflow.com/comment/46937657
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46937623
favorite count: 0
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29378753
tagged with: css
has comment: http://stackoverflow.com/comment/46937268
has comment: http://stackoverflow.com/comment/46937106
type: AnsweredQuestion
upvote count: 1

http://stackoverflow.com/q/29465810
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47094522
has comment: http://stackoverflow.com/comment/47094455
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/47094548
has comment: http://stackoverflow.com/comment/47094566
type: Question
has comment: http://stackoverflow.com/comment/47094510
tagged with: http://stackoverflow.com/tag/html
has title: JavaScript integer storing as undefined for some reason
has comment: http://stackoverflow.com/comment/47094816
score: 0
has answer: http://stackoverflow.com/a/29466208
upvote count: 1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/47094472
has body: basically I have a number stored within my javascript structure, something like the following: MyProgram.data.main.padding; console.log(MyProgram.data.main.padding); // will output the number, something like 34. However, I need to store that number in a struct I have set up in MyProgram.data.tests.main.padding; // this is a struct " {'width':0, 'padding':0, 'acceptable' //etc...} The problem is when I do this: MyProgram.data.tests.main.padding = MyProgram.data.main.padding; console.log(MyProgram.data.tests.main.padding); // shows undefined any ideas why I can't store the number? I really appreciate any help... Can someone load this example on jsfiddle please? I don't know how: http://jsfiddle.net/hdnj52Lp/2/ RESULT OUTPUT ON MY LOCAL TEST: 0) acceptable: true fontSize undefined padding: undefined function MyProgram() { var mp = this; this.main = { 'data' : { 'padding': 50, 'fontSize': 10, 'tests' : { 'padding':null, 'fontSize':null, 'results':new Array() } }, 'test' : function () { console.log('running'); var testResult = {'acceptable':false, 'fontSize':0, 'padding':0} //after some testing: var newComputedPadding = 100; var newComputedFontSize = 32; var acceptable = true; testResult.acceptable = acceptable; testResult.fontSize = newComputedFontSize; testResult.padding = newComputedPadding; mp.main.data.tests.results.push(testResult); mp.main.outputResults(); }, 'outputResults' : function () { for(var i = 0; i &lt; mp.main.data.tests.results.length; i++) { console.log( i + ') acceptable: ' + mp.main.data.tests.results[i].acceptable + ' fontSize ' + mp.main.data.tests.results.fontSize + ' paddingSides: ' + mp.main.data.tests.results.padding); } } } } var Load; if (window.attachEvent) { Load =function ( elem, event, handler ) { elem.attachEvent( 'on'+event, function load() { handler(); elem.detachEvent( 'on'+event, load ); }); }; } else { Load =function ( elem, event, handler ) { elem.addEventListener( event, function load() { handler(); elem.removeEventListener( event…
has comment: http://stackoverflow.com/comment/47095043

http://stackoverflow.com/comment/47032495
has text: Checkboxes in this situation it is more convenient to use
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29431543
score: 1

http://stackoverflow.com/q/29436101
has answer: http://stackoverflow.com/a/29436152
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29436152
has comment: http://stackoverflow.com/comment/47041316
favorite count: 0
has answer: http://stackoverflow.com/a/29436148
upvote count: 1
possible better answer: http://stackoverflow.com/a/29436148
has title: Incredibly Simple Password System Not Working
type: Question
has comment: http://stackoverflow.com/comment/47041239
tagged with: passwords
type: AnsweredQuestion
score: -2
has body: So I've got this simple code: SuM BUTtonsS DOe Please enter the password Shouldn't be too hard, right? The problem is it isn't working... Everywhere I've checked seems to say the only thing you have to do is getElementById, and that'll give you the contents of the text field. However, I just keep getting the "darn" alert. Any ideas? I know the function is being called... Perhaps input must be in the function?
downvote count: 3

http://stackoverflow.com/a/29374680
type: Answer
answers question: http://stackoverflow.com/q/29374198
has body: Plz updateas followes.I have modified it plz find $("#endOnDate").datepicker({ dateFormat: "mm/dd/yy", minDate: new Date()}); $("#startOnDate").datepicker({ dateFormat: "mm/dd/yy", minDate: new Date(), onSelect: function (dateText) { var actualDate = new Date(dateText); var newDate = new Date(actualDate.getFullYear(), actualDate.getMonth(), actualDate.getDate()+1); alert('fff'+newDate); $("#endOnDate").datepicker("option", "minDate", newDate); }});
score: 0

http://stackoverflow.com/a/29496945
score: 1
answers question: http://stackoverflow.com/q/29496891
upvote count: 1
type: Answer
downvote count: 0
has body: You need to give a function callback to your click event: $("p a#shuffle").click(shuffleTop);

http://stackoverflow.com/q/29436335
type: Question
answer count: 2
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/47041590
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29436388
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/47041591
has body: I'm teaching myself JS and html, so I think it might be a good idea to write a personal page. However, when I try to run my html file which includes a JS file, JS won't work. This is the head part where I included the JS file: Honeydukes I put all css files under a "css" folder and all js files are under a "js"folder. index.html is outside in the root directory. My js file looks like this: $(document).ready(function() { $('#map').mouseenter(function() { $(this).animate({ height: '+=20px', width: '+=20px' }); }); $('#map').mouseleave(function() { $(this).animate({ height: '-=20px', width: '-=20px' }); }); }); Am I missing something here? Can someone please take a look and enlighten me? Thanks!
accepted answer: http://stackoverflow.com/a/29436388
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29436469
has answer: http://stackoverflow.com/a/29436469
has title: JavaScript won't work when loaded in HTML

http://stackoverflow.com/a/29448130
downvote count: 1
score: 0
has body: What I've done here is actually adding a style to your element (you didn't had one). Also I've corrected a typo in your CSS. You've written "dsplay" instead of "display". However, this should work: var q = document.getElementById("q"); var qdisplay = q.style.display; window.onload = active(); function active() { if (qdisplay == "block") { window.alert("IT WORKS!!"); } } body { background: #c33f3f; } #q { font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace; margin-top: 300px; color: white; margin-left: 20px; display: block; } Establishing connection Checking the time Doing other stuff Locating cows This is the cleaned up version: var ps = document.getElementsByTagName("p"); for(var i = 0; i < ps.length; i++){ if(ps[i].className === "active"){ alert(ps[i] + " " + i + " is active"); } } body { background: #c33f3f; } p { font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace; } .active{ margin-top: 300px; color: white; margin-left: 20px; } Establishing connection Checking the time Doing other stuff Locating cows
answers question: http://stackoverflow.com/q/29447914
type: Answer
upvote count: 1

http://stackoverflow.com/comment/84179396
comment on: http://stackoverflow.com/a/29502982
has text: @VasiliyVanchuk no console.log is displayed.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/50664037
has text: not yet, all that I can do is navigate to the random port number every time to view the live update.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29482619

http://stackoverflow.com/comment/47208000
comment on: http://stackoverflow.com/a/29460294
score: 0
type: Comment
has text: I am not very familiar with window.onload . What is the syntax?
type: AnswerComment

http://stackoverflow.com/comment/47126332
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29482900
type: QuestionComment
has text: Maybe nvd3 doesn't like `datum`?

http://stackoverflow.com/q/29373925
has title: Setting colors of slices in highcharts piechart via jsx in React (passing data entries as array, not hash)
has body: I am having trouble setting specific colors for each slice of a pie chart. I am passing the data field as an array from a JSON file. Here is an example of the data: #JSON [ [ "A", 1, "#FFFFFF" ], [ "B", 2, "#A0F0F0" ], [ "C", 3, "#A0A0F0" ] ] Here is what setting a slice color using the standard PieChart format looks like without JSX: http://jsfiddle.net/rxfuscvq/ In my case, PieChart recognizes that the first line in each array is the name field and the second line is the y field but it does not recognize that my third line is the color field. I need to pass these values as an array, presumably because I am using PieCharts in a jsx wrapper: http://pastie.org/private/mhixvhkg1j5stgrflqlurg Nonetheless, how can I get PieCharts to recognize that the third line is for the color field? Edit: Please also see HighChartMixin which PieCharts uses to get HighCharts functionality: http://pastie.org/private/cj8zfsefg9w8u9minpt0ww
score: 0
has comment: http://stackoverflow.com/comment/46939655
has comment: http://stackoverflow.com/comment/46939582
has comment: http://stackoverflow.com/comment/46939269
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46940214
tagged with: reactjs
tagged with: highcharts
tagged with: arrays
has comment: http://stackoverflow.com/comment/46938994
answer count: 0
tagged with: javascript
type: Question

http://stackoverflow.com/tag/csv
tags question: http://stackoverflow.com/q/29503640
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/29498111
tags question: http://stackoverflow.com/q/29393064
tags question: http://stackoverflow.com/q/29385231
tags question: http://stackoverflow.com/q/29425276
tags question: http://stackoverflow.com/q/29458918

colorbox
tags question: http://stackoverflow.com/q/29424254
type: Tag
tags question: http://stackoverflow.com/q/29386842
tag name: colorbox

http://stackoverflow.com/comment/47039529
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29428303
has text: I have seen this code successfully implemented on other sites. For some reason, I have problems with it and the publishers of the site does not.

http://stackoverflow.com/comment/47167136
score: 0
type: Comment
type: QuestionComment
has text: @JonP ok,now I'll know for the next time. Thanks
comment on: http://stackoverflow.com/q/29503329

http://stackoverflow.com/q/29380452
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: sharepoint-online
type: UnansweredQuestion
upvote count: 1
has title: code wont work for SP online site page using SEWP
has body: This will work and execute properly if I use on SP 2013 on-prem site but not on SharePoint Online site. It will sometimes show up in edit mode online but disappears after I save it... I've used content and script editor. Any ideas?? &lt;script language = "javascript" src="http://code.highcharts.com/highcharts.js"&gt; &lt;script language = "javascript" src="http://code.highcharts.com/modules/exporting.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(function () { $('#container').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: 'Browser market shares at a specific website, 2014' }, tooltip: { pointFormat: '{series.name}: &lt;b&gt;{point.percentage:.1f}%&lt;/b&gt;' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, format: '&lt;b&gt;{point.name}&lt;/b&gt;: {point.percentage:.1f} %', style: { color: (Highcharts.theme &amp;&amp; Highcharts.theme.contrastTextColor) || 'black' } } } }, series: [{ type: 'pie', name: 'Browser share', data: [ ['Firefox', 45.0], ['IE', 26.8], { name: 'Chrome', y: 12.8, sliced: true, selected: true }, ['Safari', 8.5], ['Opera', 6.2], ['Others', 0.7] ] }] }); &lt;/script&gt;
tagged with: sharepoint-2013
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46949185
has answer: http://stackoverflow.com/a/29385435
has comment: http://stackoverflow.com/comment/46976529
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/29474144
type: UnansweredQuestion
tagged with: google-closure
type: Question
has comment: http://stackoverflow.com/comment/47209295
upvote count: 5
score: 5
tagged with: function
answer count: 1
downvote count: 0
tagged with: javascript
has body: I don't know how much of this (if any) is related to Google Closure or if it's all clean jsdoc, but I tried using @typedef to define a specific type of function like this; /** * @typedef {function(paramType0, paramType1):returnType} name.space.and.TypeName */ also tried /** * @typedef {function(paramType0, paramType1):returnType} */ name.space.and.TypeName; where param and return types are the reason I want to define this specification of function. My question is this; Why do validation tell me that the "Method is not of Function type". I know it's an option to use the type 'Function', but as far as I know, that won't allow me to define parameter and return types? Am I wrong on this as well? I would much appreciate some assistance on this in any case. Thanks.
favorite count: 0
has answer: http://stackoverflow.com/a/29527598
tagged with: jsdoc
tagged with: typedef
has title: Using @typedef to define a specific function type

http://stackoverflow.com/a/29414266
score: 3
has body: HTMLBars doesn't produce functions like Handlebars did. Handlebars was a string templating language: you compile a string to a template function, then run that function to produce a string. HTMLBars compiles a string into a template but the template doesn't produce a string, it produces DOM nodes. The simple answer is that you're not going to be able to do the same things with HTMLBars as you did with Handlebars. I suggest either adding another string templating library to your code (maybe Handlebars), or letting a view handle the HTMLBars template as seen in this question. And if you're curious, here's what an HTMLBars template object looks like after being compiled (gotten from a JSBin console dump): [object Object] { blockParams: 0, build: function build(dom) { var el0 = dom.createDocumentFragment(); var el1 = dom.createTextNode(""); dom.appendChild(el0, el1); var el1 = dom.createTextNode(""); dom.appendChild(el0, el1); return el0; }, cachedFragment: null, hasRendered: false, isHTMLBars: true, isMethod: false, isTop: true, render: function render(context, env, contextualElement) { var dom = env.dom; var hooks = env.hooks, content = hooks.content; dom.detectNamespace(contextualElement); var fragment; if (env.useFragmentCache &amp;&amp; dom.canClone) { if (this.cachedFragment === null) { fragment = this.build(dom); if (this.hasRendered) { this.cachedFragment = fragment; } else { this.hasRendered = true; } } if (this.cachedFragment) { fragment = dom.cloneNode(this.cachedFragment, true); } } else { fragment = this.build(dom); } if (this.cachedFragment) { dom.repairClonedNode(fragment,[0,1]); } var morph0 = dom.createMorphAt(fragment,0,1,contextualElement); content(env, morph0, context, "foo"); return fragment; } }
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29403103
accepted answer of: http://stackoverflow.com/q/29403103
type: Answer
upvote count: 3

http://stackoverflow.com/comment/46964557
type: Comment
comment on: http://stackoverflow.com/a/29393873
type: AnswerComment
has text: Yep, that's fixed it - other developer updated the code without telling me, reverting it back to a lowercase 'p'. Thanks for your help and astute eyes!
score: 0

http://stackoverflow.com/comment/47196789
type: Comment
comment on: http://stackoverflow.com/a/29498557
has text: Yes it used to work like that. But if you upgraded the parse sdk to version 1.4 which adds Parse.Session it stopped working for me. I don't know if it is a bug or not. I also had to build a 3rd party login, if you want check out the js code at https://github.com/felix-dumit/PFUser-Digits.
score: 0
type: AnswerComment

http://stackoverflow.com/a/29426864
answers question: http://stackoverflow.com/q/29426779
type: Answer
upvote count: 2
score: 1
downvote count: 1
has body: Arrays normally store their data under number indexes like 0 1, 2, n so no. Store your variables in an Object using keys and access your vars using that keys with something like: var data = {varName: var1, varName2: var2}; data['varName'] = //do your thing

http://stackoverflow.com/a/29402456
type: Answer
answers question: http://stackoverflow.com/q/29402002
has body: Try ng-src: &lt;img ng-src={{selectedActor.photo}}&gt; instead of &lt;img src={{selectedActor.photo}}&gt;
score: 0

http://stackoverflow.com/comment/47000105
has text: I tried with cdn. But overlay layer is placed up on the dialog box, so i can't select dialog box. I manually changed the overlay z-index from `949` to `0` in the developer Tool, then dragging is correct. Why overlay layer is placed top? Z-index of Dialog box is 950, but it's behind the overlay mask layer.
comment on: http://stackoverflow.com/q/29413322
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/29391810
has comment: http://stackoverflow.com/comment/46960776
has comment: http://stackoverflow.com/comment/46960636
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46960873
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29391868
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
score: 0
has body: I am trying to make the check boxes behave like radio buttons in my ASP .NET MVC Web Application. I have got about 20-30 check boxes grouped in two. For Example: &lt;input type="checkbox" id="@riggingType.RiggingTypeId 1" name="RiggingTypePlus" value="@riggingType.RiggingTypeId" checked="@riggingTypeIds.Contains(riggingType.RiggingTypeId)" /&gt; &lt;input type="checkbox" id="@riggingType.RiggingTypeId 2" name="RiggingTypeMinus" value="@riggingType.RiggingTypeId" checked="@riggingTypeIds.Contains(riggingType.RiggingTypeId)" /&gt; Goal: I want to make the check boxes to behave in such a way that if a Plus Check box is checked then the Minus is unchecked automatically and vice versa. I have written following code to try and achieve this functionality: $(":checkbox").change(function () { var inputs = $(this).parents("form").eq(0).find(":checkbox"); var idx = inputs.index(this); if (this.name.substring(this.name.length - 4, this.name.length) === "Plus") { // just trying to check if I am getting the right it // and I am getting the right id // alert(inputs[idx + 1].id); // But this does not work $("#" + inputs[idx + 1].id).prop('checked', false); } }); Am I doing something wrong here: $("#" + inputs[idx + 1].id).prop('checked', false); Any help will be appreciated. I know that I can use the radio buttons and group them by same name but I am rendering the elements in a loop so they all have the same name but different values and I don't want to name them differently because I am using this data on the server side... Is there a better way to do this? Answer: Got this working using the following: $(document).ready(function(){ $(":checkbox").on('click', function () { var $this = $(this); var inputs = $this.closest("form").find(":checkbox"); if ($this.attr('name').substring(this.name.length - 4, this.name.length) === "Plus" &amp;&amp; $this.attr('checked')) { $this.next().prop('checked', false); } else { $this.prev().prop('checked', false); } }); }); Fiddle Link
has comment: http://stackoverflow.com/comment/46960762
has answer: http://stackoverflow.com/a/29392417
has title: Check/Uncheck using jQuery not working
accepted answer: http://stackoverflow.com/a/29391868
has comment: http://stackoverflow.com/comment/46960757
possible better answer: http://stackoverflow.com/a/29392417
has comment: http://stackoverflow.com/comment/46960735
tagged with: razor

http://stackoverflow.com/q/29434427
score: -2
has answer: http://stackoverflow.com/a/29434806
tagged with: hyperlink
has body: New to Javascript. Here is the story: I need to create a dynamic link to redirect to one of the 6 different courses, depending on the options chosen by the user. This can be done via 3 dropdown menus or via 3 sets of checkboxes: img. 1: https://i.sstatic.net/ieNEq.png or img. 2: https://i.sstatic.net/8li5j.png I tried to combine codes from several examples from stackoverflow, but it's a mess... Any idea is highly appreciated. [edit 06.04.2015] Thanks for your suggestions, but the story is a little more complicated: The links are fixed, i.e. they are quite complicated to write it via a "generate" function (they are something like: base_url + id_1 + base_url_2 + id_2 + base_url_3) There are 6 different courses, each one with its own link: a) regular user - in English b) regular user - in German c) user with access to confidential data - in English d) user with access to confidential data - in German e) user manager - in English f) user manager - in German To select the proper course, you would need to meet criteria from more than one form. I think there should be a lot of "if" statements in place in order to select the proper course via the questions. Or the questions are not the correct ones...
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: drop-down-menu
favorite count: 0
has answer: http://stackoverflow.com/a/29471633
has title: JavaScript - dynamic link depending on multiple DropDown Selections or Checkboxes
tagged with: checkbox
type: UnansweredQuestion
downvote count: 2
type: Question

http://stackoverflow.com/comment/47137406
score: 0
type: Comment
has text: so, the bottom line is that I should approach this problem whit changing this images whit css background and jQuery, yes this is superb answer, tank you once again ~:)
type: AnswerComment
comment on: http://stackoverflow.com/a/29466273

sdp
tag name: sdp
tags question: http://stackoverflow.com/q/29390356
type: Tag
tags question: http://stackoverflow.com/q/29511602

http://stackoverflow.com/a/29483374
type: Answer
answers question: http://stackoverflow.com/q/29483343
downvote count: 0
score: 1
upvote count: 1
has body: You can do something like var link = $('a').filter(function () { return $(this).text() == "Accounts"; //will return: [Accounts] }); //link is a jQuery object that has a length property that tells how many dom elements are referred by this jQuery object if (link.length) { //show div as } else { //hide div }

http://stackoverflow.com/comment/46992644
comment on: http://stackoverflow.com/q/29409548
type: Comment
has text: You want a separation of html and js, right?
score: 0
type: QuestionComment

http://stackoverflow.com/q/29470198
tagged with: http://stackoverflow.com/tag/html
has body: I'm calling a function on ng-init and in that page I'm pushing a new page to the pageStack of navigator on a button click. And in the child page I'm popping the current page. Now I want to reload the parent page when the child page is removed from page stack. Here is the code: HTML Page 1 Push Page Page 2 Pop Page AngularJS module.controller('pageOneController', function(){ $scope.reload = function(){ console.log('Page one controller reloaded'); } }); Update one solution is to reload the app by using window.location.reload(true);
has title: AngularJS OnsenUI reload parent page on nav.popPage() in child page
possible better answer: http://stackoverflow.com/a/29664456
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29482859
has answer: http://stackoverflow.com/a/29664456
type: Question
has answer: http://stackoverflow.com/a/34007564
tagged with: javascript
score: 4
tagged with: onsen-ui
upvote count: 4
answer count: 3
downvote count: 0
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29482859

http://stackoverflow.com/a/36707772
score: 9
has body: In case you need every single item in the entire configuration file, you can use browser.getProcessedConfig() to do this. onPrepare: () =&gt; { browser.getProcessedConfig().then(console.log); // even `params` is in here }
has comment: http://stackoverflow.com/comment/62851389
type: Answer
upvote count: 9
downvote count: 0
answers question: http://stackoverflow.com/q/29406962

http://stackoverflow.com/comment/47164306
has text: That works fine for me. Can you show more code? http://jsfiddle.net/BloodyKnuckles/n9fjhLaj/
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29503193
score: 0

http://stackoverflow.com/q/29512972
tagged with: php
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/47182608
has title: Carry the row id of table
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/47183423
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: i am fetching followers list from instagram in an array that is stored in a session and then displaying the data in a tabular form User Name Name Profile Picture Add <? $followers=$_SESSION["followers"]; foreach ($followers['data'] as $data) {?> <? echo $data['username']; ?> <? echo $data['full_name']; ?> <a target = '_blank' href="<? echo $data['profile_picture']; ?>"><img name="image" src="<? echo $data['profile_picture']; ?>" width="40" height="40" alt="word" /> <?}?> i want that when the add button is clicked, the page should redirect to next page i.e a_add_vendor.php and also carry the values of that specific row to the next page. While dealing with database i could carry the id of that row something like this a_add_vendor.php?id=id, but here the data is not related to database so can anyone tell me how i can do so
has comment: http://stackoverflow.com/comment/47183549
has answer: http://stackoverflow.com/a/29513059
has answer: http://stackoverflow.com/a/29513393
type: UnansweredQuestion

http://stackoverflow.com/a/29436055
score: 1
upvote count: 1
type: Answer
has body: While you've already accepted an answer, I'd suggest changing your code to either the following (assuming the use of modern browsers): // creating a named function, // haystack: String, the string we're looking at, // needles: Array, containing the strings you want to see // if the haystack ends with: function endsIn(haystack, needles) { // using Array.prototype.some() to see if some/any // of the needles are found in the haystack, returning true // if the assessment within the function returns at least one // true/truthy value: return needles.some(function(needle) { // using String.prototype.endsWith() to see if the supplied // string (needle) is found in the haystack string, // endsWith() returns a Boolean true if the haystack does // end with the needle, false otherwise: return haystack.endsWith(needle); }); } // creating an array of the elements, using Array.prototype.slice() // and Function.prototype.call(), along with document.querySelectorAll() // to retrieve the nodeList of elements to be converted to an array: var listItems = Array.prototype.slice.call(document.querySelectorAll('li'), 0); // iterating over that array of elements: listItems.forEach(function(li) { // the first argument to the anonymous function (here 'li', but the // name is irrelevant) is the array-element over which we're iterating. // here we set the borderColor to green (if the text of the does // end with either 'index.htm' or 'index.html', so the function returns // true) or to red if the string does not end in those strings (and the // function returns false): li.style.borderColor = endsIn(li.textContent, ['index.htm', 'index.html']) ? 'green' : 'red'; // logging the text to the console, and an appropriate message // (based on an imperfect understanding of your question), rather than // multiple alerts (which are just annoying, diagnostically): console.log(li.textContent, " - ", endsIn(li.textContent, ['index.htm', 'index.html']) ? "Well done!" : "Where's the 'index.html'?"); }); funct…
answers question: http://stackoverflow.com/q/29434780
downvote count: 0

http://stackoverflow.com/comment/47092585
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29464122
has text: And if `name2` is something like `"driver1"`, `$(name2)` won't select anything.
score: 0

http://stackoverflow.com/a/29511093
downvote count: 0
has body: Browser Javascript doesn't have access to user's file system. Server Javascript (like node.js) may access to server's file system.
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29511009

http://stackoverflow.com/q/29504697
has comment: http://stackoverflow.com/comment/47174276
has comment: http://stackoverflow.com/comment/47203164
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47168004
has comment: http://stackoverflow.com/comment/47189702
answer count: 0
score: 0
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/47189766
tagged with: javascript
tagged with: linq
has title: Sequence contains no elements using string.equals
has body: When executing the following code I get the error message 'Sequence contains no elements': public PartialViewResult access (string usern, string passw) { string pw; var useraccess = (from check in myfirstDB.Users where check.Name.Equals(usern) select check).Single(); ... } However, if I insert a literal in place of the variable usern the code works as expected. I'm certain that the record exists in my table. I'm using jquery to call the controller like this: $('#access-form').click(function () { $.ajax({ url: '/home/access', contentType: 'application/html; charset=utf-8', type: 'GET', dataType: 'html' }) .success(function (result) { $('#access-field').html(result); }) .error(function (xhr, status) { alert(status); }) });
has comment: http://stackoverflow.com/comment/47189823
tagged with: jquery
has comment: http://stackoverflow.com/comment/47203142

http://stackoverflow.com/comment/47171650
comment on: http://stackoverflow.com/q/29501508
score: 0
type: Comment
type: QuestionComment
has text: Yes I run it in document.ready. One thing I tried to add if($(select).length>0) and now I don't see it anymore, but I'm not sure if it is fixed because this doesn't come up on every page refresh.

http://stackoverflow.com/q/29390629
has answer: http://stackoverflow.com/a/29407139
possible better answer: http://stackoverflow.com/a/31039360
upvote count: 2
answer count: 2
accepted answer: http://stackoverflow.com/a/29407139
has comment: http://stackoverflow.com/comment/46958989
has body: I'm new to meanjs, I just created a new module for adding products. These products are displayed in the home page. But the display in home page is not getting updated real time. I just added new product in one tab, and the products list in the other tab need to be refreshed to see the change. How can this be done at real time ? Edit: By updation I meant is, when ever a new record is been added to database, the product display should update in realtime. Now I need to refresh the page to see the newly added product. My code is Client $http.get('/latestproducts'). success(function(data, status, headers, config) { $scope.latestproducts = data; }) Server exports.getlatestProducts = function(req, res) { Product.find().sort('-created').populate('user', 'displayName').exec(function(err, products) { if (err) { return res.status(400).send({ message: errorHandler.getErrorMessage(err) }); } else { res.jsonp(products); } });
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: meanjs
type: Question
has title: Mean js - display updates in real time
has answer: http://stackoverflow.com/a/31039360

http://stackoverflow.com/q/29452828
has answer: http://stackoverflow.com/a/29453140
has body: I had a hard time constructing a query to find an answer to this-- I am interested if anybody has any input or an alternative to this scenario: I am performing a bunch of operations in succession on a variable. If one of these operations makes the variable meet a certain condition, I want to go ahead and skip the rest of the operations. How I have been doing this: while(true) { variable x; performOperation1(x); if( x meets conditions ) break; performOperation2(x); if( x meets conditions ) break; performOperation3(x); if( x meets conditions ) break; //...etc } I think this problem is language agnostic, but I tagged it JavaScript because that's where I'm facing the problem right now.
has answer: http://stackoverflow.com/a/29453711
type: Question
has answer: http://stackoverflow.com/a/29452873
tagged with: javascript
has title: Is using a while loop + break an acceptable way to "goto" the end of an operation?
score: 0
answer count: 4
has answer: http://stackoverflow.com/a/29452868
type: UnansweredQuestion
tagged with: design-patterns

http://stackoverflow.com/comment/47125672
type: AnswerComment
has text: Oh my That's beautiful! I'm using chrome and still getting the jerking on the way back down. Thank you so much Shikkediel ! This helps so much!
type: Comment
comment on: http://stackoverflow.com/a/29466789
score: 0

forms
tags question: http://stackoverflow.com/q/29382304
tags question: http://stackoverflow.com/q/29385577
tags question: http://stackoverflow.com/q/29509497
tags question: http://stackoverflow.com/q/29475933
tags question: http://stackoverflow.com/q/29403202
tags question: http://stackoverflow.com/q/29392221
tags question: http://stackoverflow.com/q/29435752
type: Tag
tags question: http://stackoverflow.com/q/29425025
tags question: http://stackoverflow.com/q/29377253
tags question: http://stackoverflow.com/q/29512057
tags question: http://stackoverflow.com/q/29434308
tags question: http://stackoverflow.com/q/29391920
tags question: http://stackoverflow.com/q/29420372
tags question: http://stackoverflow.com/q/29454024
tags question: http://stackoverflow.com/q/29440258
tags question: http://stackoverflow.com/q/29405659
tags question: http://stackoverflow.com/q/29382790
tags question: http://stackoverflow.com/q/29383164
tags question: http://stackoverflow.com/q/29529629
tags question: http://stackoverflow.com/q/29396167
tags question: http://stackoverflow.com/q/29509793
tags question: http://stackoverflow.com/q/29516829
tags question: http://stackoverflow.com/q/29451856
tags question: http://stackoverflow.com/q/29444600
tags question: http://stackoverflow.com/q/29425941
tags question: http://stackoverflow.com/q/29447542
tags question: http://stackoverflow.com/q/29461769
tags question: http://stackoverflow.com/q/29483794
tags question: http://stackoverflow.com/q/29497965
tags question: http://stackoverflow.com/q/29405470
tags question: http://stackoverflow.com/q/29472384
tags question: http://stackoverflow.com/q/29517560
tags question: http://stackoverflow.com/q/29521230
tags question: http://stackoverflow.com/q/29521844
tags question: http://stackoverflow.com/q/29454230
tags question: http://stackoverflow.com/q/29484827
tags question: http://stackoverflow.com/q/29480528
tags question: http://stackoverflow.com/q/29442357
tags question: http://stackoverflow.com/q/29387576
tags question: http://stackoverflow.com/q/29441889
tags question: http://stackoverflow.com/q/29379757
tags question: http://stackoverflow.com/q/29428788
tags question: http://stackoverflow.com/q/29499499
tags question: http://stackoverflow.com/q/29498102
tags question: http://stackoverflow.com/q/29505676
tags question: http://stackoverflow.com/q/29412218
tags question: http://stackoverflow.com/q/29421018
tags question: http://stackoverflow.com/q/29440777
tags question: http://stackoverflow.com/q/29439354
tags question: http://stackoverflow.com/q/29426034
tags question: http://stackoverflow.com/q/29404490
tags question: http://stackoverflow.com/q/29463359
tags question: http://stackoverflow.com/q/29420871
tags question: http://stackoverflow.com/q/29512979
tags question: http://stackoverflow.com/q/29390509
tags question: http://stackoverflow.com/q/29447698
tags question: http://stackoverflow.com/q/29501366
tags question: http://stackoverflow.com/q/29484070
tag name: forms
tags question: http://stackoverflow.com/q/29492597
tags question: http://stackoverflow.com/q/29476922
tags question: http://stackoverflow.com/q/29434068
tags question: http://stackoverflow.com/q/29380572
tags question: http://stackoverflow.com/q/29474452
tags question: http://stackoverflow.com/q/29528509
tags question: http://stackoverflow.com/q/29423501
tags question: http://stackoverflow.com/q/29472397
tags question: http://stackoverflow.com/q/29511011
tags question: http://stackoverflow.com/q/29374617
tags question: http://stackoverflow.com/q/29419642
tags question: http://stackoverflow.com/q/29525197

http://stackoverflow.com/a/29397634
has body: use the Array.filter method: var myarr = ["red", "green", "blue", "yellow"]; var result = myarr.filter(function (item) { return item !== "red"; }).join(""); console.log('result', result); https://jsfiddle.net/rpbL381g/
type: Answer
answers question: http://stackoverflow.com/q/29397455
upvote count: 2
score: 2
downvote count: 0

http://stackoverflow.com/comment/46963299
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29385435
has text: Tried it this morning and it still didn't fix the problem. Thank you though!
score: 0

http://stackoverflow.com/q/29450896
possible better answer: http://stackoverflow.com/a/29450984
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29450946
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/29450946
type: Question
has body: I am trying to replicate this simple example but for the life of me cannot get it to work. The first picture displays, but it doesn't ever change. Forgive me if this is basic, I am pretty new with javascript. Picute 1 Picute 2 Picute 3 Picute 4 Picute 5
linked to: http://stackoverflow.com/q/22254608
has answer: http://stackoverflow.com/a/29450984
has title: Changing image on dropdown javascript/jquery
answer count: 2

http://stackoverflow.com/comment/69099954
type: AnswerComment
has text: Your code definitely doesn't work. Your example has issues as well as your original code (`condition` vs `predicate`??) If you could post a working example on `codepen` or something that would help.
type: Comment
comment on: http://stackoverflow.com/a/29396005
score: 0

http://stackoverflow.com/comment/47086605
type: QuestionComment
score: 0
has text: Let me give it a try using a List.
comment on: http://stackoverflow.com/q/29461337
type: Comment

http://stackoverflow.com/q/29487516
has comment: http://stackoverflow.com/comment/47134674
score: 0
has comment: http://stackoverflow.com/comment/47134321
answer count: 3
has title: Get the Text inside the element
has answer: http://stackoverflow.com/a/29487608
has body: First Text Second Text This is my code, how to get the content inside the paragraph tag. [The tag may change to div or ul]. I need all the content inside the paragraph tag by javascript. The output should be : First Text Second Text Sorry I am new to javascript, searched but cant find answer for this relevant problem. Thanks
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29487630
has answer: http://stackoverflow.com/a/29487630
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29487635
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29487608
has comment: http://stackoverflow.com/comment/47134353
type: Question

http://stackoverflow.com/comment/47167925
type: Comment
comment on: http://stackoverflow.com/a/29505266
score: 0
has text: Put that in the top of the head section of the page.
type: AnswerComment

http://stackoverflow.com/a/29509090
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/47174848
has body: Using CSS3 you could try this: transform-origin:center center; This should set the center for transforms to the elements own center. I found this here.
answers question: http://stackoverflow.com/q/29509022
has comment: http://stackoverflow.com/comment/47175283
downvote count: 0
has comment: http://stackoverflow.com/comment/47175807
type: Answer

http://stackoverflow.com/a/29397253
answers question: http://stackoverflow.com/q/29396207
has comment: http://stackoverflow.com/comment/46970852
has comment: http://stackoverflow.com/comment/46971145
has body: The quick and easy way is to just reverse the array, use your duplicate removal function and then reverse it back: function unique(list) { var result = []; $.each(list, function(i, e) { if ($.inArray(e, result) == -1) { result.push(e); } }); return result; } var arr = ["aaa", "bbb", "ccc", "ddd", "eee", "bbb"]; console.log(unique(arr.reverse()).reverse()); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; There are likely ways to do this with better performance, but with a relatively small array this should be fine. You also mention that this is a string (though your function works on arrays). If it is a string, you will need to use split to break it into an array and then join after the duplicate removal to get it back to a string.
has comment: http://stackoverflow.com/comment/46970958
has comment: http://stackoverflow.com/comment/46970803
has comment: http://stackoverflow.com/comment/46970790
has comment: http://stackoverflow.com/comment/46970725
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46974327
accepted answer of: http://stackoverflow.com/q/29396207
upvote count: 2
type: Answer

http://stackoverflow.com/comment/47026812
has text: The directives have isolated scope which does not define the `getValue` function.
type: Comment
comment on: http://stackoverflow.com/a/29428107
score: 0
type: AnswerComment

http://stackoverflow.com/q/29475324
has body: I am using a flirty plugin on my website and it works perfectly except one thing: I want my month category to filter in the month order instead of alphabetical order. How is it possible to do? In other words: how can I change the sorting order for the filtrify plugin only for some categories? Example: http://test.fantazia-svit.com.ua/tours "Месяц" is the month in russian. UPD: @Seamus To initialize filtrify, I have this code: $(function() { $.filtrify("search", "placeHolder", { 'close': true, 'match': true, 'noresults': "Критериев нет", callback: function ( query, match, mismatch ) { $('.ft-label').parent() .find('li[data-count=0]').hide().end() .find(':not(li[data-count=0])').show().end(); } }); }); for the data I just show in html: some data ' UPD Since nobody knows the answer, I did it this way: I just show the data in this format: some data '
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/47111573
tagged with: jquery
has comment: http://stackoverflow.com/comment/47112601
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 2
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/52917860
has title: Proper filtrify month sorting
tagged with: javascript

http://stackoverflow.com/comment/47187409
has text: @Packer I would test it on JSFiddle if you made one'
comment on: http://stackoverflow.com/q/29515217
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47059339
type: AnswerComment
comment on: http://stackoverflow.com/a/29445969
type: Comment
has text: It will be more easier with jQuery, i create fiddle for u now
score: 0

http://stackoverflow.com/comment/47111109
comment on: http://stackoverflow.com/a/29400437
score: 0
type: AnswerComment
has text: For some reason the following code isn't working in IE 8
type: Comment

http://stackoverflow.com/a/29508339
has body: Your app shouldn't be working at all in production mode. This is because you have two files map.js and meteor.js In your meteor.js when you run onRendered you call initialize();. This method is variable scoped to the map.js file and not available outside of map.js due to file level variable scoping. To expose the initialize(); method you have to write it like this: initialize = function() { ... } Without the var keyword or without using function initialize() {.. It works on the browser because of the window dom event in map.js
type: Answer
has comment: http://stackoverflow.com/comment/47191420
answers question: http://stackoverflow.com/q/29504629
has comment: http://stackoverflow.com/comment/47191110
has comment: http://stackoverflow.com/comment/47194709
score: 0

http://stackoverflow.com/comment/47025562
has text: Is it any different from what we've suggested below? Also you didn't explain where is the error
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29427508
score: 0

http://stackoverflow.com/q/29383105
downvote count: 2
has body: I have here a register HTML form with some elements. I need to validate the elements on server side and client side and I will explain why. For example, in HTML form I have: <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> User name: Email: Password: I use PHP to check if the email and user already exists in the database. And I can use PHP to identify if the input fields are empty too. if (isset($_POST['submit'])) { $user_name = $_POST['user_name']; $user_email = $_POST['user_email']; $user_password = $_POST['user_password']; $exists = ""; $sql = "SELECT user_name from users WHERE user_name = '{$user_name}' LIMIT 1"; $stmt = $connection->prepare($sql); $stmt->execute(); $num = $stmt->rowCount(); if ($num == 1) { $exists .= "u"; } $sql = "SELECT user_email from users WHERE user_email = '{$user_email}' LIMIT 1"; $stmt = $connection->prepare($sql); $stmt->execute(); $num = $stmt->rowCount(); if ($num == 1) { $exists .= "e"; } if (empty($user_name) || empty($user_email) || empty($user_password)) { echo " "; } else if($exists == "u") { echo " "; } else if($exists == "e") { echo " "; } else if($exists == "ue") { echo " "; } else { //Here insert the values in database } } Looks perfect, except for one thing: when I click submit the page is refreshed and all the input fields values are cleaned. This is bad because the user will have to enter all informations again because something was wrong. I know that the reason for this is because I am validating the form after sending it with PHP. To overcome this problem I need to validate the fields before sending the form, logically using JavaScript in the client side. But how about the check in the database? I will need to use PHP for that. If I did not have to check the database I could use JavaScript only. I would have to mix the validations with JavaScript and PHP, I think for that I should use AJAX, but do not know how.
has comment: http://stackoverflow.com/comment/46967188
type: Question
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/29383770
has comment: http://stackoverflow.com/comment/46945086
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46945140
favorite count: 0
tagged with: ajax
has title: Validate form with PHP and JavaScript
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/q/29529279
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29538429
tagged with: coffeescript
has answer: http://stackoverflow.com/a/29538429
type: Question
has title: Reused part of code in Meteor JS
score: 1
upvote count: 2
answer count: 3
downvote count: 1
tagged with: javascript
tagged with: meteor
has answer: http://stackoverflow.com/a/30199238
favorite count: 0
has answer: http://stackoverflow.com/a/29529376
accepted answer: http://stackoverflow.com/a/29529376
has body: I have this code Template['product'].helpers( 'variant': -&gt; variant_value = Session.get('variant') if variant_value return variant_value else Session.set('variant',@lowest_variant()) 'isSelected': -&gt; if @variant() == opt1_name return true else return false I want to used variant method inside isSelected. The code above does not work. Any idea how to create a function so that it can be used to different helper methods?

http://stackoverflow.com/comment/47078251
type: Comment
comment on: http://stackoverflow.com/a/29455856
score: 0
type: AnswerComment
has text: Checked your jsBin demo. Copied it. Its not working on my PC.

http://stackoverflow.com/q/29450399
has answer: http://stackoverflow.com/a/57336346
has answer: http://stackoverflow.com/a/65060517
has answer: http://stackoverflow.com/a/42387857
has answer: http://stackoverflow.com/a/46740504
has answer: http://stackoverflow.com/a/52012896
has answer: http://stackoverflow.com/a/55093901
has answer: http://stackoverflow.com/a/71155341
has answer: http://stackoverflow.com/a/72412044
downvote count: 0
tagged with: string
favorite count: 0
has answer: http://stackoverflow.com/a/40742777
has answer: http://stackoverflow.com/a/44315126
has answer: http://stackoverflow.com/a/29450477
has comment: http://stackoverflow.com/comment/122152020
has answer: http://stackoverflow.com/a/49272115
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/74150443
answer count: 26
has answer: http://stackoverflow.com/a/29450463
has answer: http://stackoverflow.com/a/47683533
score: 11
has answer: http://stackoverflow.com/a/67251998
has answer: http://stackoverflow.com/a/53916455
has answer: http://stackoverflow.com/a/78629340
has answer: http://stackoverflow.com/a/58551080
upvote count: 11
has answer: http://stackoverflow.com/a/74402711
has answer: http://stackoverflow.com/a/53387363
has answer: http://stackoverflow.com/a/68917643
has answer: http://stackoverflow.com/a/61312613
has answer: http://stackoverflow.com/a/56508301
type: Question
has title: Counting number of vowels in a string with JavaScript
has answer: http://stackoverflow.com/a/65180665
has answer: http://stackoverflow.com/a/70718952
has body: I'm using basic JavaScript to count the number of vowels in a string. The below code works but I would like to have it cleaned up a bit. Would using .includes() help at all considering it is a string? I would like to use something like string.includes("a", "e", "i", "o", "u") if at all possible to clean up the conditional statement. Also, is it needed to convert the input into a string? function getVowels(str) { var vowelsCount = 0; //turn the input into a string var string = str.toString(); //loop through the string for (var i = 0; i &lt;= string.length - 1; i++) { //if a vowel, add to vowel count if (string.charAt(i) == "a" || string.charAt(i) == "e" || string.charAt(i) == "i" || string.charAt(i) == "o" || string.charAt(i) == "u") { vowelsCount += 1; } } return vowelsCount; }
tagged with: javascript

http://stackoverflow.com/comment/47144809
type: Comment
comment on: http://stackoverflow.com/a/29492794
score: 1
type: AnswerComment
has text: This isn't going to work. Your max here is a range

http://stackoverflow.com/comment/47164035
has text: I think it would be a good idea for you to put comments in your code or explain the source code. Allowing people to copy/paste source code without understanding it removes the point of helping someone. Understanding the answer is more important than getting the answer.
comment on: http://stackoverflow.com/a/29503063
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29492860
score: 0
answers question: http://stackoverflow.com/q/29492701
has body: That's pretty much as efficient as it gets. You could create a function which will at least clean up your code a bit: Taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random // Returns a random integer between min (included) and max (excluded) // Using Math.round() will give you a non-uniform distribution! function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; }
type: Answer

http://stackoverflow.com/comment/47156782
score: 0
comment on: http://stackoverflow.com/q/29498957
has text: When resolving a variable, javascript starts at the innermost scope and searches outwards.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47179890
has text: My contact action method return value is OK. This was not sent to ajax method's result.
score: 0
comment on: http://stackoverflow.com/q/29509198
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46955529
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29388955
has text: probably that script executes before your jquery is called i mean the script src for jquery is defined
type: Comment

http://stackoverflow.com/comment/47076471
score: 1
has text: But you can't really do much with it tough ;)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29447411

http://stackoverflow.com/q/29387678
has comment: http://stackoverflow.com/comment/46963589
answer count: 1
downvote count: 0
has title: Django cannot find the djangular/app.js file via the urls.py config. How to troubleshoot?
favorite count: 0
tagged with: django
tagged with: python
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29493192
score: 1
has body: I've spent a few days trying to figure this out and it's driving me up the wall. I'm limited on what I can copy and paste, so forgive the 'code brevity'. I also have a working version I developed and have uploaded it to GitHub. I'm developing a Django website that also uses AngularJS, so I'm using the djangular package, specifically the bit that lets me import Django variables into Angular. This is the section from GitHub: To use the AngularJS module that Djangular provides you, you'll need to add the djangular app to your projects URLs. urlpatterns = patterns('', ... url(r'^djangular/', include('djangular.urls')), ... ) And I've placed this in my project/urls.py file. I've done the same with my GitHub repository. When I reference that URL in my appName/app/index.html, I do so like this: &lt;script src="{% static 'djangular/app.js' %}"&gt;&lt;/script&gt; But that leads to a 500 response from the server as Angular produces the Module 'djangular' is not available! error. What should be happening is that the URL djangular/app.js in the script tag above, should redirect to urls.py inside the Djangular folder in the Python site-packages, which then points to DjangularModuleTemplateView.as_view(). This seems to work in my GitHub version, but not in the local version I have for some reason. If I have my script tag without the "{%static '...'%}" part I still get a 500, with the same error: &lt;script src="/djangular/app.js"&gt;&lt;/script&gt; What config could I possibly have overlooked that's causing the app not to find the right Djangular config? I've stared at both configurations so long my eyes are glazing over, and I'm struggling to find any differences. What else could it be? I'm more than happy to provide more details if needed to answer this question.
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29493192
has comment: http://stackoverflow.com/comment/46953919
tagged with: configuration
tagged with: djangular
tagged with: javascript

http://stackoverflow.com/q/29438234
tagged with: http://stackoverflow.com/tag/html
has title: Change buttons based on text jquery php
has comment: http://stackoverflow.com/comment/47045998
has answer: http://stackoverflow.com/a/29438507
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47045634
has answer: http://stackoverflow.com/a/29438659
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/47045619
tagged with: mysql
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/47045394
tagged with: javascript
tagged with: jquery
has body: Is it possible to change buttons based on the text in a td cell with jquery? I don't want to have two different buttons in a cell. Here's what it looks like right now in jsfiddle. (Sorry about the lack of jquery, I don't know how to approach it) I have three stages in my mysql table. The column process goes from waiting to processing to shipped. When it is process and waiting, btn_cancel is displayed. &lt;input type="submi" class="btn btn-danger" id="btn_cancel" name="cancel" value="Cancel Order"&gt; When it is shipped, btn_hidden is displayed. &lt;input type="submit" class="btn btn-danger" id="btn_hidden" name="hidden" value="Hide"&gt; How could I achieve this? Or if this is not possible what's the alternative?
has comment: http://stackoverflow.com/comment/47045327
has comment: http://stackoverflow.com/comment/47051637

http://stackoverflow.com/a/29454565
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29454285
score: 3
answers question: http://stackoverflow.com/q/29454285
upvote count: 3
type: AcceptedAnswer
has body: Haha, finally finished the demo! :P Well, let's go. If you need the iframe cover the whole page only when his button is fired, you can use jQuery to handle the click event. You need use the contents() to get the iframe content, then the find() to get the element that you want. Basically this: $("#iframe").contents().find("#iframe_button").click(function () { // Button fired! }) To the iframe cover all the page I wrote this CSS class: .iframe_cover { position:absolute; top:0; left:0; width:100% !important; height:100% !important; border:0; } So, when the button is fired, the iframe will have this class. Look: $("#iframe").contents().find("#iframe_button").click(function () { $("#iframe").addClass("iframe_cover"); }) Demo: http://rafaelalmeida.net78.net/exemplos/soen/29454285-iframe-button/

http://stackoverflow.com/q/29487025
type: UnansweredQuestion
tagged with: css
has body: Found a guide here to make a picture enlarge by click but it´s not quite working. When I click to enlarge the image the small ones stay in front. I put this in my html: css: #largeImgPanel { text-align: center; visibility: hidden; position: fixed; z-index: 100; top: 0; left: 0; width:100%; height:100%; background-color: rgba(100,100,100, 0.5);} javascript: function showImage(imgName) { document.getElementById('largeImg').src = imgName; showLargeImagePanel(); unselectAll(); } function showLargeImagePanel() { document.getElementById('largeImgPanel').style.visibility = 'visible'; } function unselectAll() { if(document.selection) document.selection.empty(); if(window.getSelection) window.getSelection().removeAllRanges(); } function hideMe(obj) { obj.style.visibility = 'hidden';} Am I supposed to do it differently when I have multiple pictures?
has comment: http://stackoverflow.com/comment/47133589
downvote count: 0
tagged with: image-enlarge
score: 1
has title: Making a picture enlarge on click. JavaScript, CSS and HTML
has answer: http://stackoverflow.com/a/30570969
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/29487084
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/comment/47026168
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29427898
has text: Edit your question and paste your code there instead of pasting in comments. And yes do take care of the formatting of the code!
type: Comment

http://stackoverflow.com/comment/47200195
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29522710
has text: thank you. but in this example I can't have images with different width... and I want they have same height, but not width. I think with background I cant have this, can i?

http://stackoverflow.com/q/29472426
tagged with: javascript
has answer: http://stackoverflow.com/a/29472497
tagged with: jquery
has title: find is not working to select data from dom in jquery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29472784
possible better answer: http://stackoverflow.com/a/29472497
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29472616
accepted answer: http://stackoverflow.com/a/29472784
has comment: http://stackoverflow.com/comment/47106297
type: Question
has answer: http://stackoverflow.com/a/29473252
score: 0
has body: what i need i need to access href from class events_links . html code &lt;div class="row flush frt" itemscope="" itemtype="http://schema.org/Event"&gt; &lt;div class="12u"&gt; &lt;div class="evntblk"&gt; &lt;a itemprop="url" class="events_links" href="/dailymail-ideal-homeshow"&gt; &lt;h2 class="lnh1" itemprop="name"&gt;Ideal Home Show - London&lt;/h2&gt; &lt;/a&gt; &lt;div style="display:block; float:right; width:auto; color:#7c7c7c;"&gt;&lt;a href="javascript:void(0);" class="favourate" title="Add to Favorites" id="fav8470" data-sess_id="8470" data-name="Ideal Home Show - London" data-city="London" data-country="United Kingdom" data-event_url="dailymail-ideal-homeshow"&gt;&lt;/a&gt;&lt;/div&gt; &lt;span itemprop="startDate" class="startdates" content="2015-03-20"&gt;20 Mar-06 Apr 2015&lt;/span&gt;&lt;span itemprop="endDate" class="enddates" content="2015-04-06"&gt;&lt;/span&gt;&lt;br&gt;&lt;span itemprop="location" itemscope="" itemtype="http://schema.org/Place"&gt;&lt;span itemprop="name" style="display:none"&gt;Olympia Exhibition Centre&lt;/span&gt;&lt;span itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress"&gt;&lt;span itemprop="addressLocality" class="eventcity"&gt;London&lt;/span&gt;, &lt;span itemprop="addressCountry" class="eventcountry"&gt;UK&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;p class="tal" style="overflow:hidden"&gt;The ZEE Asian Pavilions are a celebration of British Asian Culture, that encapsulates Asian food, Asian fashion,...&lt;br&gt;&lt;span style="background: none repeat scroll 0 0 #ECECEC; border-radius: 5px; color: #333333; display: inline-block; font-size: 0.8em;line-height: 13px; margin: 5px 2px 0 0 !important; padding: 5px 8px;"&gt;Home Furnishings &amp;amp; Home Textiles&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;div class="row flush footer"&gt;&lt;div class="12u"&gt;&lt;a class="button button-blue small"&gt;View Details&lt;/a&gt;&lt;/div&gt;&lt;/div&gt; js code $('.small').click(function() { alert("test"); window.…
answer count: 6
has answer: http://stackoverflow.com/a/29472528
has answer: http://stackoverflow.com/a/29472721

http://stackoverflow.com/comment/47129529
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29484859
type: AnswerComment
has text: still doesn't scroll over to the error message sir @Aravind Sivam

http://stackoverflow.com/comment/47542466
score: 0
comment on: http://stackoverflow.com/a/29691624
type: AnswerComment
has text: Adding another rule to negate another is still hacky, but it solves my problem without removing any existing CSS which is what I was looking for with this question.
type: Comment

http://stackoverflow.com/a/29684466
type: Answer
has body: Maybe d3 line.interpolate() is what you're looking for? More info: http://www.d3noob.org/2013/01/smoothing-out-lines-in-d3js.html
answers question: http://stackoverflow.com/q/29392414
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/47677526

http://stackoverflow.com/comment/47040035
type: Comment
comment on: http://stackoverflow.com/a/29419462
type: AnswerComment
score: 0
has text: I would probably start a new project from scratch and just put in the bare minimum necessary to get the datepicker working. Once you get it working in the new project, start bringing over pieces of your current project, little by little. If something breaks your datepicker, then you have found your culprit. Just my recommendation.

http://stackoverflow.com/q/29420977
score: 1
favorite count: 0
has body: This is my code: router.delete('/delete-:object', function(req, res) { var query; var id = req.body.id; switch (req.params.object) { case 'news' : query = queries['news_delete']; break; case 'member' : query = queries['member_delete']; break; case 'account' : query = queries['account_delete']; break; default : res.sendStatus(404); return; } connection.query(query, id); res.sendStatus(200); }); Is this approach considered as good practise, or should I create separate router.delete functions for all my routes? Please, explain why.
type: Question
has answer: http://stackoverflow.com/a/29421979
tagged with: node.js
answer count: 3
upvote count: 1
has title: Node.js parameterized route - good or bad practise?
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29421109
tagged with: express
has answer: http://stackoverflow.com/a/77588735
downvote count: 0

http://stackoverflow.com/a/29417048
type: Answer
has comment: http://stackoverflow.com/comment/47006204
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29416803
has body: Not sure to fully understand your question, but from what I've read, you want to create a new object when you click on a crayon, but if the crayon has already been clicked, it doesn't have to create the object. That sound like a job for $.data()! Basically, you simply check if the HTML node as a object in its data. In case it doesn't, you simply assign one. $('.crayon-toolbox').on('click', 'li', function(){ //I've used delegation here, need to target the LI itself for the data. var $this = $(this); var my_crayon = $this.data('crayon') || new Crayon(); $this.data('crayon', my_crayon); });
has comment: http://stackoverflow.com/comment/47006183
upvote count: 2

http://stackoverflow.com/a/29544244
type: Answer
answers question: http://stackoverflow.com/q/29388755
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29388755
score: 1
type: AcceptedAnswer
downvote count: 0
has body: maybe this js fiddle would help ? https://jsfiddle.net/9y2ptsbg/12/ var container = $("#container"), info = $("#info"); var j = 0; var colors = ['rgba(143, 146, 199, 0.49)', 'rgba(199, 143, 186, 0.49)', 'rgba(149, 199, 143, 0.49)', 'rgba(229, 86, 61, 0.49)', 'rgba(212, 229, 61, 0.49)', 'rgba(206, 61, 229, 0.49)', 'rgba(229, 157, 61, 0.49)', 'rgba(61, 165, 229, 0.49)', 'rgba(61, 229, 133, 0.49)', 'rgba(229, 61, 61, 0.49)', 'rgba(116, 61, 229, 0.49', 'rgba(218, 229, 61, 0.49)', 'rgba(21, 43, 157, 0.49)', 'rgba(153, 157, 21, 0.49)', 'rgba(199, 143, 186, 0.49)', 'rgba(149, 199, 143, 0.49)', 'rgba(229, 86, 61, 0.49)', 'rgba(212, 229, 61, 0.49)', 'rgba(206, 61, 229, 0.49)', 'rgba(229, 157, 61, 0.49)', 'rgba(61, 165, 229, 0.49)', 'rgba(61, 229, 133, 0.49)', 'rgba(229, 61, 61, 0.49)', 'rgba(116, 61, 229, 0.49', 'rgba(218, 229, 61, 0.49)', 'rgba(21, 43, 157, 0.49)', 'rgba(153, 157, 21, 0.49)', 'rgba(199, 143, 186, 0.49)', 'rgba(149, 199, 143, 0.49)'] var ary = ['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', '31', '32', '33', '34', '35', '36'], cursor = 0, attachDiv = function (_curr) { container.empty(); var j = 0; for (var i = _curr; i &lt; _curr + 8; i++) { container.append('&lt;div class = "blocks blocks' + i + '" style="left:' + (j * 25) + '%; background:' + colors[i] + ';"&gt;' + ary[i] + '&lt;/div&gt;'); j++; } }; var hasScrolled = false, locked = false, ticker = function () { if (hasScrolled &amp;&amp; !locked) { locked = true; var xz = container.scrollLeft(), maxScrollLeft = container.get(0).scrollWidth - container.get(0).clientWidth, middle = maxScrollLeft / 2; if (xz == 0) { cursor = Math.max(0, cursor - 4); } else if (xz == maxScrollLeft) { cursor = Math.min(cursor + 4, ary.length - 8) } attachDiv(cursor); container.scrollLeft(middle); info.text(cursor); locked = false; } hasScrolled = false; } setInterval(ticker, 250); container.on('scroll',…
has comment: http://stackoverflow.com/comment/118950022

http://stackoverflow.com/comment/47020864
score: 0
has text: And why do you stringify it to JSON, there's no good reason to do so ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29424778

http://stackoverflow.com/a/29466891
answers question: http://stackoverflow.com/q/29466859
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/47096245
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47096211
has body: its better to use data-* attribute provided by html5: $('select option').filter(':not(:first)').attr('data-level', function(i) { return $(this).index(); }) Bla Foo As you can see in the js code there is the use of attr() method of jQuery, and you can notice that it accepts a callback function to return the attribute value with some operation if needed. In this specific case we are using .index() of the option available in the given select and in the callback a return statement is necessary to apply the attribute.

http://stackoverflow.com/a/29434477
has body: 020 octal => 16 decimal 02 octal => 2 decimal 16 * 2 = 32. Example Convert the octal value to a base 8 (octal) string and then parse it in base 10 (decimal). var x = 020; // 16 (octal) var y = 02; // 2 (octal) document.body.innerHTML = x + ' x ' + y + ' = ' + x * y; // 32 document.body.innerHTML += '&lt;br /&gt;'; // {Separator} var x2 = parseInt(x.toString(8), 10); // 20 (decimal) var y2 = parseInt(y.toString(8), 10); // 2 (decimal) document.body.innerHTML += x2 + ' x ' + y2 + ' = ' + x2 * y2; // 40
has comment: http://stackoverflow.com/comment/47038344
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/47038219
type: Answer
upvote count: 6
answers question: http://stackoverflow.com/q/29434409

http://stackoverflow.com/a/29494004
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29493427
has comment: http://stackoverflow.com/comment/47148434
answers question: http://stackoverflow.com/q/29493427
has body: I added an ID to each picture a global variable for the currently shown image a function that will be called upon clicking a link and that will call your function slideImage JSFiddle: http://jsfiddle.net/p0gdopha/ //To store timeout id var timeoutId, currImg = 1; var slideImage = function( step ) { if ( step == undefined ) step = 1; //Clear timeout if any clearTimeout ( timeoutId ); //Get current image's index var indx = $('.item:visible').index('.item'); //If step == 0, we don't need to do any fadein our fadeout if ( step != 0 ) { //Fadeout this item $('.item:visible').fadeOut(); } //Increment for next item indx = indx + step ; //Check bounds for next item if ( indx >= $('.item').length ) { indx = 0; } else if ( indx < 0 ) { indx = $('.item').length - 1; } //If step == 0, we don't need to do any fadein our fadeout if ( step != 0 ) { //Fadein next item $('.item:eq(' + indx + ')').fadeIn(); currImg = $('.item:eq(' + indx + ')').attr('id'); } //Set Itmeout timeoutId = setTimeout ( slideImage, 5000 ); }; //Start sliding slideImage(0); //When clicked on prev $('#prev').click(function() { //slideImage with step = -1 slideImage (-1); }); //When clicked on next $('#next').click(function() { //slideImage with step = 1 slideImage (1); }); //When clicked on Pause $('#pause').click(function() { //Clear timeout clearTimeout ( timeoutId ); //Hide Pause and show Play $(this).hide(); $('#play').show(); }); //When clicked on Play $('#play').click(function() { //Start slide image slideImage(0); //Hide Play and show Pause $(this).hide(); $('#pause').show(); }); $('a').click(function(ev){ ev.preventDefault(); console.log(currImg + ' | ' + $(this).attr('href')); slideImage($(this).attr('href') - currImg); }); $(document).ready(function(){ var sliderwidth = 500; $('#navigation li').bind('click',function() { $('.slider').animate({left:"-" + sliderwidth * $(this).index() },1000); }); }); @font-face { src:url(../fonts/pacifico.woff); font-family: 'pacifico'; } @font-face { src:url(../fonts…
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47148082
type: Answer

http://stackoverflow.com/q/29423624
accepted answer: http://stackoverflow.com/a/29441454
score: 7
tagged with: javascript
has comment: http://stackoverflow.com/comment/47018801
has answer: http://stackoverflow.com/a/29441454
upvote count: 7
answer count: 1
has title: Javascript events: window.event vs argument reference (function)
favorite count: 0
linked to: http://stackoverflow.com/q/3493033
has body: What is the difference between: function test (e) { console.log("Event: ", e); } document.querySelector("button").onclick = test; Click! and: function test () { console.log("Event: ", event); // same as window.event } document.querySelector("button").onclick = test; Click! They seem to return the exact same object, even containing the same timeStamp value in milliseconds. I often see code using the first example, using e or evt, but what is wrong with the second example? I understand that event is the same as window.event, which is a global variable, but what is the purpose of using e if event does the same thing?
tagged with: events
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/47018815
tagged with: google-chrome
type: Question

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/29410044
tags question: http://stackoverflow.com/q/29520312
type: Tag
tags question: http://stackoverflow.com/q/29480620
tags question: http://stackoverflow.com/q/29478245
tags question: http://stackoverflow.com/q/29379535

http://stackoverflow.com/q/29422333
accepted answer: http://stackoverflow.com/a/29422517
has comment: http://stackoverflow.com/comment/47016317
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29422565
favorite count: 0
has body: My navigation highlights the section of the page the visitor is on and changes as they scroll by adding .active-nav to ANY href that points to that section of the page. I have an image sprite that points to #foo but I don't want .active-nav added to that anchor tag. I am having no luck implementing the :not selector. I fear I have spent too much time on this and cannot see the obvious answer. I would like to have the following code ignore an href tag if a specific class (.bar) already exists. Please advise. if ( windowpos &gt; $('#foo').offset().top) { $('nav li a').removeClass('active-nav'); $('a[href$="#foo"]').addClass('active-nav'); }
has comment: http://stackoverflow.com/comment/47016581
has comment: http://stackoverflow.com/comment/47016505
linked to: http://stackoverflow.com/q/8266662
tagged with: css
upvote count: 1
has answer: http://stackoverflow.com/a/29422565
has title: Do not add class if specific class exists
type: Question
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/47016464
has comment: http://stackoverflow.com/comment/47016407
answer count: 2
has answer: http://stackoverflow.com/a/29422517

http://stackoverflow.com/q/29410916
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29419062
type: AnsweredQuestion
score: 0
type: Question
accepted answer: http://stackoverflow.com/a/29419062
tagged with: javascript
has title: How to know whether what a user draws covers most of the canvas area?
tagged with: canvas
answer count: 1
tagged with: jquery
has body: I have a canvas, where user can write something, and it shows previously saved drawing. But we detected some of them are not using the total canvas area due to some factors. So my questions are: Can I detect the area where the user's drawn and make it larger by shredding the usused canvas spaces? Or, can I detect whether the user is using the full canvas area or say more than 60% of it? If yes, how? So that I can put an warning to the user. Thanks.

http://stackoverflow.com/q/29474779
has comment: http://stackoverflow.com/comment/47111114
has answer: http://stackoverflow.com/a/29474827
upvote count: 0
tagged with: textfield
score: -3
tagged with: php
possible better answer: http://stackoverflow.com/a/29474839
type: Question
type: AnsweredQuestion
has title: Making textfield greyed out/disabled after saving data to database (ajax/php)
downvote count: 3
has comment: http://stackoverflow.com/comment/47110625
has body: I have the following code: &lt;input type="text" value="name" id="name" /&gt; &lt;input type="button" id="button" value="Click Me" /&gt;&lt;/p&gt; &lt;script&gt; $( "#button" ).click(function() { var text = $("#name").val(); $.ajax({ url: 'page.php', type: "POST", data: { text: text }, success: function(response) { alert("inserted"); } }); }); &lt;/script&gt; and everything works fine now, but after clicking the button I get the popup msg (alert) saying the data was inserted. Instead of that I want to grey out the textfield - is it possible?
answer count: 3
has answer: http://stackoverflow.com/a/29474855
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29474839
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29474827

http://stackoverflow.com/comment/46942599
score: 0
type: Comment
type: QuestionComment
has text: You are looking for an object with the tag name link?
comment on: http://stackoverflow.com/q/29381503

http://stackoverflow.com/a/74603591
answers question: http://stackoverflow.com/q/29436074
downvote count: 0
upvote count: 2
has body: To change the icon, you can choose the icon from here https://materialdesignicons.com/ and then also change it in code as follow: /* I changed the icon to clock-outline, which I selected from https://materialdesignicons.com/ */ input[type="date"]::-webkit-calendar-picker-indicator { opacity: 1; display: block; background: 'mdi mdi-24px mdi-clock-outline' no-repeat; width: 24px; height: 24px; }
type: Answer
score: 2

http://stackoverflow.com/comment/47230362
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29445166
type: AnswerComment
has text: Thanks, I had to step away from the project for a few days...but your solution works. Only one minor quibble: the authoring software I use seems to be very sensitive to the use of quotation marks, so I found that I had to replace this: ('//*[@id="favela"]') with this: ("//*[@id='favela']").

http://stackoverflow.com/q/29460704
possible better answer: http://stackoverflow.com/a/29460771
favorite count: 0
has answer: http://stackoverflow.com/a/29460771
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29460824
upvote count: 3
type: Question
score: 3
answer count: 2
has answer: http://stackoverflow.com/a/29460824
has title: Simple AngularJS routing not working
has body: Home and About page have simple heading content which is not showing when running the page. Instead it is showing: Error: $injector:modulerr Module Error". How do I fix this? var app = angular.module('myApp', ['ngRoute']); app.config(function ($routeProvider) { $routeProvider. .when('/', { templateUrl : 'partial/home.html', }) .when('/about', { templateUrl: 'partial/about.html', }) otherwise({ redirectTo: '/'}) }); Home About
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/29492112
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/47143701
answers question: http://stackoverflow.com/q/29492052
upvote count: 5
has body: try with following code app.use('/', [validate, checkValid,respond]); OR var middleware = [validate, checkValid,respond]; app.use('/', middleware ); Need to placed all function in that series as your requirement of execution. Thanks
has comment: http://stackoverflow.com/comment/47143946
score: 5

http://stackoverflow.com/a/29517369
score: 0
answers question: http://stackoverflow.com/q/29517035
has comment: http://stackoverflow.com/comment/47190040
type: Answer
has body: It sounds like you may want try the focus listener instead of the on Blur listener. https://developer.mozilla.org/en-US/docs/Web/Events/focus The second element seems to work when I entered in values for all of the fields. It looks like it's checking the length of what was entered.

webbrowser-control
type: Tag
tags question: http://stackoverflow.com/q/29529615
tag name: webbrowser-control

http://stackoverflow.com/q/29398779
has answer: http://stackoverflow.com/a/29399370
type: AnsweredQuestion
score: 1
upvote count: 1
possible better answer: http://stackoverflow.com/a/29399370
type: Question
has body: Script: $('.removeVehicle').click(function() { var $this = $(this), $row = $(this).parent().parent(); alert($row.attr('data-vehicle-id')); if (confirm("Delete vehicle? ") == true) { $.post("removevehicle.php", {Id: $row.attr('data-vehicle-id')}); }; }); HTML/PHP: <?php while ($row = $products->fetch_assoc()) { ?> <tr data-vehicle-id="<?= $row['Vehicle_ID']?>"> <?= $row['VRM']; ?> <?= $row['Make']; ?> <?= $row['Model']; ?> <?= $row['Colour']; ?> <?= $row['Mileage']; ?> £<?= $row['Advertised_Price']; ?> <?= $row['Date_of_Registration']; ?> <?= $row['HPI_Status']; ?> Edit line Save line Start Sale <?php } ?> removevehicle php: <?php require 'config/init.php'; if (isset($_SESSION['myusername'])) { $mysqli = new mysqli($db['hostname'], $db['username'], $db['password'], $db['database']); if ($mysqli->connect_errno) { printf("Connect failed: %s\n", $mysqli->connect_error); exit(); } $queryStr = "DELETE FROM VEHICLE WHERE Vehicle_ID = '" . $_POST['Id'] . "'"; $query = $mysqli->query($queryStr); } Works up to the point of the alert with the vehicle ID (correct vehicle ID is alerted). Essentially all I need to do is delete the vehicle/record from the database - any better suggestions or how to get the current method working? Once I've got this working, I'll change the MySQLi query to counteract injection (it's not live yet).
accepted answer: http://stackoverflow.com/a/29399667
tagged with: javascript
has comment: http://stackoverflow.com/comment/46974156
answer count: 2
has comment: http://stackoverflow.com/comment/46973792
downvote count: 0
tagged with: jquery
has title: Button to delete record from database
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29399667
tagged with: php

http://stackoverflow.com/a/29398652
accepted answer of: http://stackoverflow.com/q/29398075
has comment: http://stackoverflow.com/comment/46992086
score: 1
answers question: http://stackoverflow.com/q/29398075
has comment: http://stackoverflow.com/comment/47088236
type: AcceptedAnswer
downvote count: 0
has body: You need to update individual series like this. chart2.series[0].update({ data:[-3.49 , 9.21 , 9.21 , 4.36 , 17.74 , null], color: '#588c7e', name:"A" },false); chart2.series[1].update({ data:[-1.47 , 6.89 , 6.89 , 7.06 , 12.95 , 12.45], color: '#f2e394', name:"B" }, false); chart2.series[2].update({ data:[-2.57 , 7.46, 7.46, 3.00, 19.45, null], color: '#f2ae72', name:"C" }, false); chart2.series[3].update({ data:[-3.42 , 8.46, 8.46, 16.50, 21.27, null], color: '#d96459', name:"D" }, false); chart2.series[4].update({ data:[-4.23, 6.31, 6.31, 5.49, 15.48, 14.81], color: '#8c4646', name:"E" }, true);
type: Answer
upvote count: 1

http://stackoverflow.com/comment/47490320
type: AnswerComment
comment on: http://stackoverflow.com/a/29665076
score: 0
type: Comment
has text: It returns this in the DOM and does not filter the time. min: , max:

http://stackoverflow.com/comment/47027135
type: QuestionComment
has text: If u sending large amount of data then you should Use `POST` instead of `GET` ..
score: 0
comment on: http://stackoverflow.com/q/29428219
type: Comment

http://stackoverflow.com/comment/47145867
type: QuestionComment
comment on: http://stackoverflow.com/q/29493384
has text: What is this a content Script or browser action/page action?
score: 0
type: Comment

http://stackoverflow.com/a/29409019
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29408744
has body: use var rv_p =document.getElementById("rangeValue-p").value; instead of var rv_p =document.getElementById("rangeValue-p");

blob
tags question: http://stackoverflow.com/q/29415006
type: Tag
tag name: blob
tags question: http://stackoverflow.com/q/29467924
tags question: http://stackoverflow.com/q/29432355
tags question: http://stackoverflow.com/q/29428839
tags question: http://stackoverflow.com/q/29454982

http://stackoverflow.com/a/53780970
answers question: http://stackoverflow.com/q/29443804
downvote count: 0
upvote count: 2
type: Answer
has body: First make sure you set loggingPrefs to { 'browser' : 'ALL' } in your nightwatch configuration otherwise you won't see entries in the browser console that were written with console.log. My nightwatch.conf.js looks something like: desiredCapabilities: { browserName: 'chrome', handlesAlerts: true, loggingPrefs: { 'browser': 'ALL' } } Next, like the others have said you just have to use the built-in getLog function on the client. e.g. browser.getLog('browser', function(logEntriesArray) { console.log('Log length: ' + logEntriesArray.length); logEntriesArray.forEach(function(log) { console.log('[' + log.level + '] ' + log.timestamp + ' : ' + log.message); }); });
score: 2

http://stackoverflow.com/a/29435093
answers question: http://stackoverflow.com/q/29434977
has body: there are three possible workarouds. add a flag when the window is modal, when it's valorized you can: 1)enlarnge your last td or div width (i don't know how you are doing it) 2)you can add some spacing with &amp;nbsp 3)you can add another td or div after the last column.
score: 0
type: Answer

http://stackoverflow.com/comment/47076310
type: Comment
comment on: http://stackoverflow.com/a/29455735
score: 2
has text: I mean `Object.defineProperty(this, "prop", { get: function() { return privateProp; } });` and then you access the value as a regular variable/property `test.pop`.
type: AnswerComment

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/29528840
type: Tag

http://stackoverflow.com/comment/47090820
comment on: http://stackoverflow.com/q/29463570
has text: @yazaki solved one of my problems, the other was that I literally wasn't calling the method under test in my second unit test. I'm an idiot.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/67464831
type: Answer
has body: this is my solution and it worked in all the browsers. The link to the same in jsfiddle is https://jsfiddle.net/krishnatcs1859/aey8Lhz7/3/. Once you are in jsfiddle link, click on run. You should see the pdf downloaded to ur machine
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29406060
downvote count: 0

http://stackoverflow.com/comment/46989676
score: 0
comment on: http://stackoverflow.com/q/29397909
type: Comment
has text: Yes, it works. And function returning correctly.
type: QuestionComment

http://stackoverflow.com/a/29408513
upvote count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46990875
accepted answer of: http://stackoverflow.com/q/29408451
type: AcceptedAnswer
has body: _panelInner will hold the value returned by the _getPanelInner function while _page will hold a reference to the _getPage function. This means that the function would be able to be called in one of the following ways: option._page() this._getPage() Both of these function calls would execute the same function but that function is not called automatically (according to the code that is displayed).
has comment: http://stackoverflow.com/comment/46990772
type: Answer
answers question: http://stackoverflow.com/q/29408451
has comment: http://stackoverflow.com/comment/46990814
has comment: http://stackoverflow.com/comment/46990847
score: 3

http://stackoverflow.com/q/29498158
has body: I have the following code verifying that my text boxes are not null, which is working great. What else would I have to add to also verify they are not whitespace or contain ANY integers? function verifyDados() { function nullCheck() { var x = $(".dadosDoTutor"); var i; for (i = 0; i &lt; x.length; i++) if (x[i].value === '') { return 0; } } if (nullCheck() === 0) { alert ('Você ainda não tenham completado o preenchimento da tabela Dados do Tutor. Faz favor, verifique que você respondeu a cada pergunta e submeter mais uma vez.'); } Note: for the whitespace issue, I tried adapting some "str = jQuery.trim(str);" type solutions that I found trying to research this topic, but couldn't get them either travel through my array, or work for an unknown reason. thanks for any help
type: Question
has answer: http://stackoverflow.com/a/29501563
tagged with: null
tagged with: validation
has answer: http://stackoverflow.com/a/29498411
tagged with: arrays
tagged with: javascript
score: 0
answer count: 3
has title: How do you verify input is not null, whitespace or integer?
has answer: http://stackoverflow.com/a/29498222
accepted answer: http://stackoverflow.com/a/29498222
possible better answer: http://stackoverflow.com/a/29498411
type: AnsweredQuestion
tagged with: whitespace

http://stackoverflow.com/q/29381115
type: AnsweredQuestion
tagged with: getelementsbyclassname
has answer: http://stackoverflow.com/a/29381818
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: show-hide
favorite count: 0
accepted answer: http://stackoverflow.com/a/29381818
tagged with: getelementbyid
has body: I have seen previous questions about trying to use classes instead of ids for hide show in JavaScript. However, I haven't really found any definitive answers. I need to use a class because I have an FAQ section where I am inputting questions and hide / showing the answers. Here's my code using ids: &lt;script type="text/javascript"&gt; function toggle() { var ele = document.getElementById("toggleText"); var text = document.getElementById("displayText"); if(ele.style.display == "block") { ele.style.display = "none"; text.innerHTML = text() + " show"; } else { ele.style.display = "block"; text.innerHTML = text() + " hide"; } } &lt;/script&gt; How do I change this JavaScript to use classes? I tried changing getElementById to getElementByClassName, but I don't know why that didn't work.
upvote count: 2
has title: Hide show in JavaScript using classes instead of ids
score: 2

object-literal
tag name: object-literal
tags question: http://stackoverflow.com/q/29491267
type: Tag

http://stackoverflow.com/q/29424494
type: Question
upvote count: 1
tagged with: javascript
answer count: 1
favorite count: 0
has body: I'm calling a REST API for updating my database entries in sails. Therefore i have a function which iterates over an JSON Array and calls for each entry another function which saves the values into a database. function getData(){ for(index in apiJson){ saveData(apiJSON[index]); } } In the saveData function I use the .findOrCreate functionality from waterline. If there is not such an entry a new one is created. This all works pretty fine. But now i want to append the id from the new created entry (Table: match) to an array (matches) in another table (Table: team). There i getting some failures because of the asynchronous behavior of JavaScript. My implementation (in short) looks like the following: Match.findOrCreate({..},{..}).exec(function(err,match){ ... //if match was just created in db if(newMatch){ Team.findOrCreate({apiID: someTeamID}), { ... ..., matches: [] } ).exec(function(err,team){ team.matches.push(someID); team.save(function(err,s){ ... }); }); } }); Since JavaScript executes this code asynchronously i get duplicate entries of teams in my model Team. Also my array matches in model Team does not correspond to my values in the other model Match. How can i sort of serialize the database write accesses to prevent this behavior? Is there a possibility to let the loop run in parallel but the database updates in serial?
type: UnansweredQuestion
has title: Parallel write access in Waterline
tagged with: node.js
tagged with: sails.js
downvote count: 0
has answer: http://stackoverflow.com/a/29426156
score: 1
tagged with: waterline

http://stackoverflow.com/a/29424876
has comment: http://stackoverflow.com/comment/47021209
type: Answer
answers question: http://stackoverflow.com/q/29424778
has comment: http://stackoverflow.com/comment/47028838
score: 2
has comment: http://stackoverflow.com/comment/47021547
downvote count: 0
has comment: http://stackoverflow.com/comment/47021152
has comment: http://stackoverflow.com/comment/47029861
has comment: http://stackoverflow.com/comment/47025446
upvote count: 2
has body: You need to build a new object with each pair of key / value: $("#myForm").submit(function(e){ e.preventDefault(); var res = {}; $.each($('#myForm').serializeArray(), function() { res[this.name] = this.value; }); alert( JSON.stringify(res) ); }); Name Address Note: My code returns: {name: "name", address: "address"} But you said you wanted an array: [{name: "name", address: "address"}] If so, wrap res with square brackets: alert( JSON.stringify( [res] ) );

http://stackoverflow.com/q/29380811
has body: I'm finding with chrome that even if I select the body tag (or any tag, for that matter) and press option + right-arrow, some of the nodes are not expanding and I'm having to manually expand the remaining nodes which is quite time consuming. Any suggestions would be greatly appreciated!
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/29390733
accepted answer: http://stackoverflow.com/a/29390733
favorite count: 0
tagged with: frontend
type: AnsweredQuestion
score: 1
has title: Is there a way to expand the entire dom tree using any browser's developer tools?
tagged with: google-chrome-devtools
upvote count: 1
type: Question
tagged with: firefox
downvote count: 0

http://stackoverflow.com/comment/47132978
type: QuestionComment
has text: @T.J.Crowder: yes in a browser (Internet explorer)
score: 0
comment on: http://stackoverflow.com/q/29486775
type: Comment

http://stackoverflow.com/comment/47013218
has text: Angular doesn't know about the new elements. I suggest to follow @Sam's advice and do everything in Angular.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29418798
type: Comment

http://stackoverflow.com/comment/47177853
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29510425
has text: I want to search for several different types (name, id, sku), I can not use the same method that I look for each type in the corresponding column in my database, right?

http://stackoverflow.com/comment/47089929
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29463139
type: AnswerComment
has text: Added jsFiddle that demonstrates using `.call(this)`.

http://stackoverflow.com/comment/47197567
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29521451
has text: Thank you, this is it. basics I never started from. :(
type: AnswerComment

http://stackoverflow.com/q/29431735
type: Question
score: -1
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/29441132
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/47035886
has body: I have a google map which calculates a route from point A to point B using the standard Directions API with google maps. On this Map I have custom markers which I obtain from a database. I want to know which of these markers intersect with the selected route. I have created a fiddle with all the necessary code segments, but the map does not seem to generate in JSFiddle :( http://jsfiddle.net/Fumunchu/94kLnrr7/2/ Here is my JavaScript to generate the map and add the markers var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var map; var lati = -33.9149861; var longi = 18.6560594; var markers; function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var chicago = new google.maps.LatLng(lati, longi); var mapOptions = { zoom: 9, center: chicago }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); directionsDisplay.setMap(map); markers = $.getJSON("http://secure.transcommercial.co.za/API/Toll", function (data) { for (var i = 0; i &lt; ko.toJS(data).length; i++) { new google.maps.Marker({ animation: google.maps.Animation.DROP, position: new google.maps.LatLng(ko.toJS(data)[i].TollLatitude, ko.toJS(data)[i].TollLongitude), map: map, icon: "http://maps.google.com/mapfiles/ms/icons/blue-dot.png" }); } }); if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function (position) { initialLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); map.setCenter(initialLocation); }); } } function calcRoute() { var start = document.getElementById('start').value; var end = document.getElementById('end').value; var request = { origin: start, destination: end, 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); Any advice would be greatly …
type: AnsweredQuestion
has title: Google Maps Directions APIv3 with custom Markers
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/29441132
has comment: http://stackoverflow.com/comment/47035499

http://stackoverflow.com/a/29490716
has body: This is object, not an array but you can go through it using for loop var obj = { "28": { "controllerID": "28", "DateDiff": "147", "CycleTime": "-52" }, "30": { "controllerID": "30", "DateDiff": "117", "CycleTime": "-59" }, "37": { "controllerID": "37", "DateDiff": "71", "CycleTime": "-56" }, "40": { "controllerID": "40", "DateDiff": "59", "CycleTime": "-56" } }; for (var key in obj) { console.log(obj[key]); }
downvote count: 0
answers question: http://stackoverflow.com/q/29490490
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/29491412
downvote count: 0
has comment: http://stackoverflow.com/comment/61246691
accepted answer of: http://stackoverflow.com/q/29491079
has body: Update: 1.0 Onwards Supports redirectTo out of the box. https://ui-router.github.io/ng1/docs/latest/interfaces/state.statedeclaration.html#redirectto I created an example here. This solution comes from a nice "Comment" to an an issue with redirection using .when() (https://stackoverflow.com/a/27131114/1679310) and really cool solution for it (by Chris T, but the original post was by yahyaKacem) https://github.com/angular-ui/ui-router/issues/1584#issuecomment-75137373 So firstly let's extend main with redirection setting: $stateProvider .state('main', { url: '/main', templateUrl: 'main.html', redirectTo: 'main.street', }) And add only this few lines into run app.run(['$rootScope', '$state', function($rootScope, $state) { $rootScope.$on('$stateChangeStart', function(evt, to, params) { if (to.redirectTo) { evt.preventDefault(); $state.go(to.redirectTo, params, {location: 'replace'}) } }); }]); This way we can adjust any of our states with its default redirection...Check it here EDIT: Added option from comment by @Alec to preserve the browser history.
answers question: http://stackoverflow.com/q/29491079
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/78687657
has comment: http://stackoverflow.com/comment/57777782
score: 173
type: Answer
upvote count: 173
has comment: http://stackoverflow.com/comment/61791358

http://stackoverflow.com/q/29458258
type: UnansweredQuestion
tagged with: node.js
has answer: http://stackoverflow.com/a/29458283
type: Question
tagged with: mongodb
tagged with: javascript
score: 0
answer count: 1
has title: Mongodb terminal command working, not working correctly in node js
has body: Hello i have devised the following query in the terminal for my mongodb database. db.champions.find().sort({wins: -1}).pretty() This correctly outputs in decesnding order according to wins I have the following code in node js Champion.find().sort({wins: -1}).exec(function (err, ChampionData) { if (err) return console.error(err); res.json(ChampionData) }); The response is sent to a controller which outputs the information via angular to a html doc. But it doesn't output in the ordered format i specified (by wins decending) Can any node js / mongodb guru's please tell me where im going wrong. Thanks!

http://stackoverflow.com/comment/47098294
comment on: http://stackoverflow.com/q/29468073
score: 0
type: Comment
type: QuestionComment
has text: @paisaimp Check Bootstrap Modal Window.

http://stackoverflow.com/comment/47150542
type: AnswerComment
has text: Updated. I thought the `i` in `for(var i in obj1)` was an index, but it is the name of the property name.
type: Comment
comment on: http://stackoverflow.com/a/29495677
score: 0

http://stackoverflow.com/comment/47052666
comment on: http://stackoverflow.com/q/29442311
has text: I'm just spitballing here, but you could read certain input and when executing whatever mechanism you use to add the text to your chat box, you could do an ajax request for an image and append that instead. Perhaps you could load up all the images with the page and use those.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47180848
score: 0
comment on: http://stackoverflow.com/q/29495561
type: Comment
type: QuestionComment
has text: That's not related to classic ASP, which is using **server side** vbscript. Tag removed.

http://stackoverflow.com/comment/47114269
score: 0
comment on: http://stackoverflow.com/q/29475966
type: Comment
type: QuestionComment
has text: What's with the `(number)` format? `"count": (20)` is invalid json so it's hard to tell what you are working with exactly or even why that format exists

http://stackoverflow.com/q/29376219
has body: I am using Leaflat to display a map, I want it to fill the remaining space, for that I wanted to use the flex boxes, but the map is not even displayed, it is only displaey if I define it a height in px. JavaScript var map = L.map('map').setView([51.505, -0.09], 13); L.tileLayer('https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'Map data &amp;copy; &lt;a href="http://openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt; contributors, ' + '&lt;a href="http://creativecommons.org/licenses/by-sa/2.0/"&gt;CC-BY-SA&lt;/a&gt;, ' + 'Imagery © &lt;a href="http://mapbox.com"&gt;Mapbox&lt;/a&gt;', id: 'examples.map-i875mjb7' }).addTo(map); CSS body { padding: 0 !important; margin: 0 !important; height: 100% !important; display: flex !important; flex-flow: column wrap !important; height: 100% !important; } #content { width: 100%; height: 100%; } .content-box {} .content-box .run {} .content-box .run.data { order: 1; flex: 0 1 auto; } .content-box .run.data &gt; h1 { text-align: center; } .content-box .run.map { order: 2; flex: 1 1 auto; width: 100%; } HTML &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;title&gt;App&lt;/title&gt; &lt;script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"&gt;&lt;/script&gt; &lt;link href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" rel="stylesheet" /&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="app"&gt; &lt;div id="content" class="content-box"&gt; &lt;div class="run data"&gt; &lt;p&gt;Some content&lt;/p&gt; &lt;p&gt;....&lt;/p&gt; &lt;/div&gt; &lt;div class="run map" id="map"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; I have tried several things from similar questions here on stackoverflow but none of them could solve my problem. If I add position: fixed; to #content in my css file and add height: 100%; to .content-box .run-map I the map is sized correctly at the first moment, but then after clicking comething it glitches and no longer correctly…
tagged with: css
tagged with: cordova
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29398626
tagged with: flexbox
tagged with: javascript
has title: Phonegap -Leaflat map fill up remaining site
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29374589
tagged with: node.js
has title: Call function in JS file from Node.js
accepted answer: http://stackoverflow.com/a/29374780
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29374753
score: 1
has body: What I am trying to do is when index.html sends a message back to the server, I want to call a function in app.js called changeButton() that will update a header color on index.html. Here is my node.js file: var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); var express=require('express'); var tools = require('./assets/js/app.js'); app.use(express.static(__dirname + '/assets')); app.get('/', function(req, res){ res.sendFile(__dirname + '/index.html'); }); io.on('connection', function(socket){ socket.on('chat message', function(msg){ console.log('message: ' + msg); if(msg == "color") { socket.emit("changeButton"); //working now } }); }); http.listen(3000, function(){ console.log('listening on localhost:3000'); }); app.js is in assets/js folder. function getMessage() { $('form').unbind('submit').bind('submit', function(){ socket.emit('chat message', $('#m').val()); $('#m').val(''); return false; }); } function changeButton() { $('#status').css("background-color", "red"); } Here is index.html Node Test Send WORKING NOW! THANKS!!!
type: Question
possible better answer: http://stackoverflow.com/a/29374753
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29374780
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/79534896
has text: Fundamentally, the purpose of weak map is a memory-sensitive cache. While it can be used to extend objects from the outside, **that is an undeeded lousy hack and is definitely not its proper purpose**.
type: Comment
comment on: http://stackoverflow.com/a/29416340
score: 1
type: AnswerComment

http://stackoverflow.com/q/29423889
answer count: 1
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 1
has title: check box validation javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/47019596
has body: I need to validate the selection of at least one check box on a table. I am not using an alert because I already have a class on CSS that highlights in red the inputs, selects and other elements if they are not filled out. This is my JS: var btnRegister= document.querySelector('#btnRegisterRegObr'); btnRegister.addEventListener('click', function () { var bError= false; //I am initializing this boolean variable so that it also shows an error //message on the screen if the user has not selected any option at all... var elementCheckRegObr = document.querySelector('#checkRegObr'); if (elementCheckRegObr.checked==false){ bError=true; elementCheckRegObr.classList.add('error'); //This part of the code brings the error I have //previously created on CSs if the checkbox is not checked } else{ elementCheckRegObr.classList.remove('error'); } }); The button on HTML has the right id on the HTML: id="btnRegisterRegObr. I was looking at some codes here and people were validating using the .checked==false However this does not seem to work for mine. As a matter of fact, I first thought I needed to use the syntax of if (elementCheckRegObr.checked=="") but that one does not seem to work either. I dont have problems validating inputs, selects nor radio buttons, but I am not sure if I am doing it on the right way with the check boxes. Any help or advice would be greatly apprecciate it :)
has comment: http://stackoverflow.com/comment/47020799
type: Question
has answer: http://stackoverflow.com/a/29424155
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29424155
tagged with: validation

http://stackoverflow.com/comment/47058613
type: Comment
comment on: http://stackoverflow.com/q/29445775
has text: You mean all attributes that exist on an element, or all attributes that hypothetically *could* exist on an element?
score: 0
type: QuestionComment

http://stackoverflow.com/q/29373456
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
has title: Appending the innerhtml of
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29373520
has body: I'm trying to change a table cell with the current datetime but I can't seem to figure it out. Here's the example: http://jsfiddle.net/mkjckt3b/ $(document).ready( $("#date").html("Date of Report: " + currentDateNow()); ); function currentDateNow(){ var newDate = new Date(); return newDate; } Any help would be appreciated. Thank you!
accepted answer: http://stackoverflow.com/a/29373492
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29373492
score: 0
upvote count: 1
possible better answer: http://stackoverflow.com/a/29373520

http://stackoverflow.com/comment/47183951
type: Comment
type: QuestionComment
has text: surely not, that question talks about alert in **Code Behind**, and mine question is about alert in class file! please read it carefully
comment on: http://stackoverflow.com/q/29513750
score: 0

http://stackoverflow.com/comment/47094848
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29429865
type: Comment
has text: var form = $(' ' + ' ' ' ' ' '); $('body').append(form); form.submit(); } }); } qeury:select query returns username, password

http://stackoverflow.com/a/29514877
downvote count: 0
answers question: http://stackoverflow.com/q/29514408
type: Answer
has body: You can add another character prior to the one you want with css and position it absolutely. Then cut the line off half way (the ".4em" might change depending on the font family). .reddot span.j:before, .reddot span.i:before{ content:'j'; position:absolute; color:red; height:.4em; overflow:hidden; } .reddot span.i:before{ content:'i'; } Here's some JavaScript to wrap your text in spans: var items = document.getElementsByClassName('reddot'); for (var i in items){ items[i].innerHTML = items[i].innerHTML.replace(/([ij])/g, '$1'); } See it in action here: http://jsfiddle.net/653st8kb/
upvote count: 1
score: 1

http://stackoverflow.com/q/29399279
accepted answer: http://stackoverflow.com/a/29400437
favorite count: 0
has comment: http://stackoverflow.com/comment/46976063
has comment: http://stackoverflow.com/comment/46975413
possible better answer: http://stackoverflow.com/a/29399369
has answer: http://stackoverflow.com/a/29399369
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46976747
has answer: http://stackoverflow.com/a/29400437
has comment: http://stackoverflow.com/comment/46974824
has title: I would like to use JQuery to validate a form unsing .inArray() and .val()
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/46975300
linked to: http://stackoverflow.com/q/18867599
tagged with: arrays
downvote count: 0
has body: The script below is suppose to insert a message using .insertAfter() if a user doesn't type in an @ symbol within a field . This script also displays an error message if the user types in a value that matches a value from the invalidEmailAddresses array. For some reason only the second part of this script executes. If a user types in an @ symbol they get a message but if the user types in an address similar to test@yahoo.com a message doesn't display. Not sure if i organized the code correctly. $(document).ready(function(){ $("input[name='emailAddress']").blur(function(){ // Actual Email Validation function var hasError = false; var emailaddressVal = $("input[name='emailAddress']").val(); var invalidEmailAddresses = ['goddady.com', 'aol.com', 'yahoo.com', 'yahoo.fr']; if ($.inArray(emailaddressVal,invalidEmailAddresses) > 0) { $( "The email provided is not from a business related domain. Please use an appropriate email address instead." ).insertAfter( "input[name='emailAddress']" ); } else { $ ('#emailMessage').css('display','none'); } if ($("input[name='emailAddress']").val().indexOf('@') > -1) { $ ('#emailMessage').css('display','none'); } else { $( "The email provided does not contain an @ symbol" ).insertAfter( "input[name='emailAddress']" ); } if(hasError == true) { return false; } }); });
tagged with: jquery

http://stackoverflow.com/q/29410284
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29512506
has title: Facebook Embed video events?
tagged with: facebook
score: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29512506
has body: is it possible to get events from Facebook video JavaScript api? i couldn't find a way to do it here: https://developers.facebook.com/docs/plugins/embedded-video-player
type: Question
answer count: 1

http://stackoverflow.com/q/29478712
tagged with: browser
has answer: http://stackoverflow.com/a/29547081
answer count: 1
downvote count: 0
has title: Markdown mode codemirror creating
favorite count: 0
has body: anyone can help me to create new mode to codemirror? I need to put this part {&gt;1&lt;} of {&gt;1&lt;}![title](site) invisible (into span with specific class) How I can do that? I tryed something like that: CodeMirror.defineSimpleMode("imageID", { start: [ {regex: /(?:\{\&gt;([^&lt;]*)\&lt;\})/gmi, token: "imageID"} ] }); but it doesn't work... any ideas why?
tagged with: mode
tagged with: regex
tagged with: codemirror
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29547081
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47138116
tagged with: javascript

http://stackoverflow.com/comment/46986649
comment on: http://stackoverflow.com/q/29394636
score: 0
type: Comment
type: QuestionComment
has text: @A.Wolff Yes! I want only last selected value. User can select multiple values in any order so I want last or recently selected one. `this.value` returns only last value for all selected values array and `console.log(django.jQuery(this).val());` returns array

http://stackoverflow.com/comment/47103007
comment on: http://stackoverflow.com/q/29470100
has text: You can paste your `html,css and js` into fiddle, save it and give us the link so that we can try editing your code and achieve what you want. **[Visit here](http://doc.jsfiddle.net/tutorial.html)** for more info. Link to **jsfiddle** is **[this](https://jsfiddle.net/)**
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29381317
answer count: 1
tagged with: text-files
favorite count: 0
type: UnansweredQuestion
has body: I have a txt file that I will add value to later on by a .php script, but for now I am looking for a way to get the latest value from a txt file by using javascript, so lets say the lates value has been added and it is 3, I then wan't javascript to get that value and turn the variable in the script into that value. example of how the txt file will look. 1 2 3 and then because 3 is the lates value added, the javascript variable will get that and turn it into a variable. So let's say my javascript file looks like this &lt;script type="text/javascript"&gt; var nrValue= 1; document.getElementById("nrValue").innerHTML = nrValue; document.getElementByID("nrValue").value = nrValue; &lt;/script&gt; I then wan't the javascript function to turn the nrValue into the latest updated value from the txt file.
tagged with: text
has title: Get value from txt file
has answer: http://stackoverflow.com/a/29381594
score: 1
tagged with: file
upvote count: 1
type: Question
tagged with: javascript
tagged with: variables
downvote count: 0

http://stackoverflow.com/comment/46955541
type: AnswerComment
type: Comment
has text: Yes you could add more and it woud work, but that's really not the way you want to learn css if you want to improve
comment on: http://stackoverflow.com/a/29388959
score: 0

http://stackoverflow.com/comment/47008155
comment on: http://stackoverflow.com/a/29417831
has text: Any "actually-has-a-spec" object serialization like JSON, HTML, XML, etc. Don't build those as strings, build them as structured object and then tell them to serialize themselves (if they can), or use a serialization API call. Even if you bypass the GET, you want to take that user data, and run it through a `JSON.parse`, so you can tell whether or not the data is actually plain JSON datatypes (objects, arrays, strings, numbers - no functions, no function calls)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47122838
comment on: http://stackoverflow.com/q/29480962
has text: demo link is now invalid
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29397767
has title: SCEditor BBcode to HTML parsing
has body: Does anyone know which method or how to use the API in SCEditor so that it parses an input BBcode into HTML, instead of just parsing the textarea? I am aware of SBBCodeParser, but I require the thing to be done in JS instead of PHP.
tagged with: bbcode
type: Question
has answer: http://stackoverflow.com/a/30414899
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/29428885
answers question: http://stackoverflow.com/q/29428672
type: Answer
has body: May be this problem is on the client side browser. For example, Google Chrome is blocked cross-origin by default. To allow it you may use plugin: https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi
score: 0
has comment: http://stackoverflow.com/comment/47027862

http://stackoverflow.com/q/29426637
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29426720
tagged with: cookies
score: 1
upvote count: 1
type: Question
has body: i found this javascript that allow you to chose an option and once you click the go button. It will redirect you to another site. I have try modify this so i can use it with a button instead of a radio but it doesn't seem to work. Can any 1 help me out ?? Thank you very much. here the code: Baseball Basketball Soccer Fencing
tagged with: javascript
has title: Change Javascript cookies redirection
has comment: http://stackoverflow.com/comment/47024096
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47024645

http://stackoverflow.com/comment/47013875
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29421018
has text: where is the problem? you don't get that 1 in post after submitting this form?

http://stackoverflow.com/q/29513731
possible better answer: http://stackoverflow.com/a/29513936
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
accepted answer: http://stackoverflow.com/a/29517937
has answer: http://stackoverflow.com/a/29513936
favorite count: 0
upvote count: 2
tagged with: twitter-bootstrap
tagged with: css
has title: Inline option elements inside Select using bootstrap
has comment: http://stackoverflow.com/comment/47183191
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47183243
has body: I want inline Select option elements because there is alot of data and it would be nicer if option elements are inline with width of select element. Since I am using multiselect bootstrap plugin, al Select elements are converted to lists. What I have: And this is whant I want to achieve My question is can I inline Select option elements using bootstrap? This is original HTML CODE: Cheese Tomatoes Mozzarella Mushrooms Pepperoni Onions And after bootstrap does his magic, as output I got this: None selected Select all Cheese Tomatoes Mozzarella Mushrooms Pepperoni Onions
has answer: http://stackoverflow.com/a/29517937
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29514230
answer count: 3

http://stackoverflow.com/q/29410586
has body: I have used underscore.js sortBy collection but it creating for sorting json with specific key. type of key can be number,text or date. var arr = [ {"NodeName)":"Drama"}, {"NodeName":"Song"}, {"NodeName":"Jokes"}, {"NodeName":"movie "}, {"NodeName":"music"}, {"NodeName":"Main"}, {"NodeName)":"Random"}, {"NodeName":"Silent"}, {"NodeName":"travel"}, {"NodeName":"udefined"}]; var testSortBy = _.chain(arr).sortBy("NodeName").value(); result show the below: Jokes Main Silent Song movie music travel udefined Drama Random but the result should be like the following: Drama Jokes moive music Main Random Silent Song travel udefined i guess the issue can be uppercase and lower case issue. how can i avoid this issue?
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: sorting
type: Question
has comment: http://stackoverflow.com/comment/47022720
favorite count: 0
score: -1
has title: Underscore.js sortBy results wrong order
downvote count: 2
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/46994563
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/46994428
has answer: http://stackoverflow.com/a/29412176

http://stackoverflow.com/q/29387831
has answer: http://stackoverflow.com/a/29388115
type: Question
has title: Bootstrap modal not opening when coming to the page from an internal link
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29533923
possible better answer: http://stackoverflow.com/a/29387871
has body: I couldn't come up with a better title, sorry! The homepage of my Rails 4 app is a grid of images that open a modal on click, everything works fine when I load the website for the first time. If go to the profile page and then press the Home button on the navbar or the "Back to Home" on my profile the modals don't come up anymore, clicking on the thumbnails just adds the '#' to the URL without anything happening. The only thing that the two links have in common is that both of them are a 'link_to root_path', but I can't see how that could break the modals. My bootstrap gems: gem 'bootstrap-sass' gem 'font-awesome-rails' Here's my modal partial (I also tried to just past the code in my index without rendering a partial but same issue) × Heading Close Here's my js function $(function() { $('.pop').click(function(){ $('.modal-image').empty(); $('.modal-infos').empty(); var title = $(this).attr("title"); var price = $(this).attr("price"); var location = $(this).attr("location"); var heading = [title, " (", price, "€)"].join('') $('.modal-title').html(heading); $($(this).parents('div').html()).appendTo('.modal-image'); var infos = [" Location: ", location, " Price: ",price,"€ "].join('') $(infos).appendTo('.modal-infos'); $('#myModal').modal({show:true}); }); });
has answer: http://stackoverflow.com/a/29387871
has comment: http://stackoverflow.com/comment/46955818
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47136441
accepted answer: http://stackoverflow.com/a/29533923
tagged with: twitter-bootstrap
tagged with: ruby-on-rails

http://stackoverflow.com/q/29447200
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47061671
has answer: http://stackoverflow.com/a/29447233
has answer: http://stackoverflow.com/a/29447680
answer count: 4
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: How to hide a div when input radio radio selected javascript angularjs
downvote count: 1
has answer: http://stackoverflow.com/a/29447288
score: -1
type: Question
has answer: http://stackoverflow.com/a/29447485
upvote count: 0
has body: I want to hide a div when a radio button is selected. Adhoc Weekly Please choose an option Book Now In my code, if a radio button is selected, I want the div class = product-noselected-message to be hidden. This is wht i have on my javascript at the moment $scope.getReservationDetails = function(size, packageSlot) { var service_option; if($('input[name=service_option]:checked')) { service_option = $('input[name=service_option]:checked').val(); } if (service_option!= null) { $rootScope.date = new Date(); console.log($rootScope.date); $rootScope.singlePackageSlot = packageSlot; $rootScope.locationName = $scope.cleaningServiceLocation.name; modalInstance = $modal.open({ templateUrl: 'views/cleaning_services/register_event.html', controller: 'CleaningServicesCancelCtrl', size: size }); } else { $('.product-noselected-message').html('Please select an option'); } $('#service_option').on('checked', function() { $('.product-noselected-message').addClass('hidden'); }); But it is not working wht do i do? http://plnkr.co/edit/GVYuI47TKlAVqkVDUDOq

http://stackoverflow.com/q/29402104
tagged with: css
has title: Polymer doesn't allow to style inner elements and propagate events in Chrome
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: google-chrome
has body: I've started using Polymer in these weeks. I'm attempting to create a paper-submit element which includes a button and a paper-button, which, once pressed, triggers a hidden button's click event. This works fine in Firefox: the paper-button gets styled correctly (using a class) and the click event triggers the button's click event and the containing form triggers the submit one. On Chrome though, the paper-button ignores the style I've set (see example: no background color change) and it seems to stop propagating the button's click event. The result is an unstyled paper-button which triggers nothing. This is the source: CSS style, linked in the main page: paper-button.blue { color: #FFFFFF; background-color: #2196F3; } paper-submit polymer element: Note: I've tried inserting a simple button inside the paper-input element to test if it was something related to the JavaScript's click function, but it's not: same result. This is how I call the element: Click me! The element is inside a form with some mandatory fields: on Firefox they trigger the error, on Chrome nothing happens. May you please help me?
has answer: http://stackoverflow.com/a/29418274
score: 1
type: Question
tagged with: polymer
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: dom-events
has answer: http://stackoverflow.com/a/29406561

http://stackoverflow.com/comment/47188606
has text: First, thank you. I corrected the syntax error. But still, the result is not what I expected. From [this tutorial](https://www.customd.com/articles/13/checking-if-an-element-is-visible-on-screen-using-jquery), _"Passing true to the 'visible' method, will tell the plugin to return true if ANY part of the element is visible on the users screen."_. **I am passing `true` to the `visible()` function, but still** as you can see in [your JSFiddle](http://jsfiddle.net/w7eowzcq/25/), it only **seems to return true when the entire `.firstPage` element becomes visible**. =s
comment on: http://stackoverflow.com/a/29516540
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46973843
type: Comment
comment on: http://stackoverflow.com/a/29398623
score: 0
type: AnswerComment
has text: I dont know where you want to add it , but you can do it like that. https://jsfiddle.net/nkvyjhj3/ You can also use another button or whatever you want

http://stackoverflow.com/q/29498069
tagged with: loaddata
tagged with: openlayers-3
has comment: http://stackoverflow.com/comment/47201346
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: I'm trying to load geojson data with openlayers 3. It's a lot of date, so I want to transfer just the data needed. I archived this by passing resulution and extent of the current view to the webservice. This is my code so far: var vectorSource = new ol.source.ServerVector({ format: new ol.format.GeoJSON(), loader: function(extent, resolution, projection) { var url = 'data.json?e=' + extent.join(',') + '&amp;r=' + resolution; $.ajax({ url: url, success: function(data) { vectorSource.addFeatures(vectorSource.readFeatures(data)); } }); }, projection: 'EPSG:3857', strategy: ol.loadingstrategy.bbox }); var vector = new ol.layer.Vector({ source: vectorSource }); var map = new ol.Map({ layers: [vector], target: 'map', view: new ol.View({ center: [0, 0], zoom: 0 }) }); But my code only calls the webservice once. Which loading strategy do I have to use to call the webservice everytime the extent (and/or the resulution) changes?
linked to: http://stackoverflow.com/q/10346788
has title: openlayers loading strategy geojson with different resolutions
has answer: http://stackoverflow.com/a/29672094
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: geojson
type: Question
accepted answer: http://stackoverflow.com/a/29672094

http://stackoverflow.com/comment/47160306
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29497423
has text: Hey there, sorry about that ill be sure to make things clear next time
score: 0

http://stackoverflow.com/comment/46962147
type: Comment
comment on: http://stackoverflow.com/q/29392481
score: 1
type: QuestionComment
has text: make isArray to false

http://stackoverflow.com/a/29398158
score: 4
upvote count: 4
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29398052
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29398052
type: Answer
has body: In ES6 there will be a findIndex method which will do just what you want here. You'll probably need to shim it, though. var arr = [['Account 1', 122.00], ['Account 2', 342.33], ['Account 3', 103.32]] var index = arr.findIndex(function(item) { return item[0] == 'Account 2'; }) // 1

http://stackoverflow.com/comment/46948084
type: QuestionComment
comment on: http://stackoverflow.com/q/29384916
has text: From a brief test, that code appears to work. Whatever the problem it, it does't seem to be demonstrated by the code you've shared so far.
score: 0
type: Comment

http://stackoverflow.com/comment/47174948
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29508823
type: AnswerComment
has text: Thanks, ID-1428394433116 for one module and ID-1428467596813 for another module. So expected result is: path 1: test path 2 path 2: test path 1

http://stackoverflow.com/a/29441236
has comment: http://stackoverflow.com/comment/47053391
answers question: http://stackoverflow.com/q/29441173
has comment: http://stackoverflow.com/comment/47071471
downvote count: 0
has comment: http://stackoverflow.com/comment/130539266
has comment: http://stackoverflow.com/comment/47050786
type: Answer
score: 11
upvote count: 11
has body: I found an answer which simultaneously feels kludgy and elegant. var foo = { alpha: true, beta: false, gamma: true }; _.invert(foo, true).true // yields -&gt; ["alpha", "gamma"]

http://stackoverflow.com/q/29381048
accepted answer: http://stackoverflow.com/a/29381220
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46941699
type: AnsweredQuestion
downvote count: 2
has title: Change the position of a list item when clicked
has answer: http://stackoverflow.com/a/29381220
has body: On what algorithm can solve the following problem? I need to when you click on one of the menu block received class active and got up in the middle. 1 2 3 4 5 ul li { float: left; list-style: none; background: red; margin-left: 20px; display: block; padding: 20px; } .active { background: orange; } Fiddle
type: Question
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/46941741
upvote count: 0

http://stackoverflow.com/a/29482827
answers question: http://stackoverflow.com/q/29468830
score: 1
has body: What happens? Any errors? Also, you might try jumping into the project chat and asking in there: https://gitter.im/AmpersandJS/AmpersandJS
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/29399005
has comment: http://stackoverflow.com/comment/47003181
tagged with: iphone
has answer: http://stackoverflow.com/a/29510561
upvote count: 0
tagged with: ios
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: appcelerator
has title: avoid suspending app in titanium appcelerator
type: UnansweredQuestion
tagged with: titanium
has body: I am doing a GPS, and the minute the screen is locked, I would not bloquera, be difficult to do? Since the application is finished , i guess I should modify the file tiapp.xml , several applications but do not find examples of how to do it Thank You
downvote count: 1
type: Question
score: -1

http://stackoverflow.com/q/29466567
has comment: http://stackoverflow.com/comment/47095760
has comment: http://stackoverflow.com/comment/47096383
accepted answer: http://stackoverflow.com/a/29466810
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47095795
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29466774
has answer: http://stackoverflow.com/a/29466774
has body: $(document).ready(function () { $("#pause").click(function () { $(this).hide(); $("#play").show(); $("#aa").stop(true, false); audioTag1.pause(); }); $("#play").click(function () { $(this).hide(); $("#pause").show(); animateaa(); }); }); html The above code I have used for the functionality pause and play, which is working fine. Now I need to achieve the same by placing those buttons one on top of the other, so that whenever ever I click one button then that button should be hidden and the other should be visible, but from the above code the buttons can be kept at a same place but the functionality is not working. Please do suggest.
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/47095647
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29466810
favorite count: 0
has title: Positioning of pause and play buttons in jquery
has answer: http://stackoverflow.com/a/29466758
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47096103
has comment: http://stackoverflow.com/comment/47095955
tagged with: css

http://stackoverflow.com/q/29425732
tagged with: javascript
has body: I am japanese. I'm sorry, but I'm not good at English! I am creating web editer(like wordpress) using html5 contenteditable attribute. Press enter in the elements that have adapted the contenteditable , you can create a div tag. Character of the div tag is I want to determine whether not the case whether it is a empty . I wrote this codes. &lt;div class="c-contenteditable" contenteditable="true" id="js-editable"&gt;&lt;/div&gt; //In this case, console.log is all charactor in this element. I want to single line words, not all. $('#js-editable').on('keyup', function(e) { var $this = $(this); var text = $this.text(); if ($this.text() == '') { console.log('no words'); }else{ console.log(text); } }); //In this case, keyup t`enter code here`rigger is not run. $('#js-editable div').on('keyup', function(e) { var $this = $(this); var text = $this.text(); if ($this.text() == '') { console.log('no words'); }else{ console.log(text); } }); //In this case, keyup trigger is not run. $('#js-editable').find('div').on('keyup', function(e) { var $this = $(this); var text = $this.text(); if ($this.text() == '') { console.log('no words'); }else{ console.log(text); } }); The How might be able to get a string in div tags generated when you press the enter in contenteditable attribute?
downvote count: 0
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/47022693
has comment: http://stackoverflow.com/comment/47022602
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
upvote count: 1
type: Question
has title: how to get character of contenteditable in the attribute

http://stackoverflow.com/comment/47033811
has text: Please post some of the code that you have tried.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29432147

laravel
tags question: http://stackoverflow.com/q/29495116
tag name: laravel
tags question: http://stackoverflow.com/q/29461791
tags question: http://stackoverflow.com/q/29401144
type: Tag
tags question: http://stackoverflow.com/q/29496887
tags question: http://stackoverflow.com/q/29504217
tags question: http://stackoverflow.com/q/29446197

http://stackoverflow.com/comment/46975732
type: Comment
score: 2
comment on: http://stackoverflow.com/q/29399802
has text: Debugging is your friend. `console.log` your variables and see what their types are, and if theres something funky going on in the inputs
type: QuestionComment

oauth-1.0a
tag name: oauth-1.0a
tags question: http://stackoverflow.com/q/29444481
type: Tag

http://stackoverflow.com/comment/47058157
has text: sorry not in controller i want to call in my view page ? and also i need to increment the value
comment on: http://stackoverflow.com/q/29445467
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29436999
has body: I have a problem: I use jQuery using requirejs to draw circles. I added the gaussianblur filter for drawing. But after this no circle is visible. This is the interesting part of my code: define(['jquery'], function($) { var canvas = $(document.createElementNS('http://www.w3.org/2000/svg', 'svg')); canvas.attr({ 'version': '1.1', 'width': 1000, 'height': 500 }); $('body').append(canvas); Interesting part: :::: $('svg').append("&lt;defs&gt;&lt;/defs&gt;"); $('defs').append("&lt;filter id=\x27f1\x27 x=\x270\x27 y=\x270\x27&gt;&lt;/filter&gt;"); $('filter').append("&lt;feGaussianBlur stdDeviation=\x2715\x27 /&gt;"); ::::: require(['Circle'],function(Circle){ for( i = 0; i &lt; zahlen.length; i+=2){ var circ = new Circle(zahlen[i],zahlen[i+1]); circ.draw(canvas); } }); }); And in my circle.js: draw: function(canvas) { canvas = canvas instanceof jQuery ? $(canvas) : canvas; this.circle = $(document.createElementNS('http://www.w3.org/2000/svg', 'circle')); this.circle.attr({ filter: "url(#f1)", stroke:"green", fill: this.color }); I think it should work like this. If I delete the line "filter: "url(#f1)" the circles are visible and everything is fine (but I want this filter). Can you spot a mistake I made? Thanks in advance
has comment: http://stackoverflow.com/comment/47045076
type: Question
tagged with: javascript
has title: SVG using jQuery, gaussian filter does not work
tagged with: filter
has comment: http://stackoverflow.com/comment/47043306
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47048901
has answer: http://stackoverflow.com/a/29446612
score: 0
has comment: http://stackoverflow.com/comment/47043585

http://stackoverflow.com/q/29437513
answer count: 1
has body: I am having trouble getting my labelPoints done before finishing the rest of my code. I know this is some sort of deferred/callback issue that I am not understanding and have not been able to find many examples of how to do this with the esri javascript api. Basically I am using centroids where I can to create a click point from an address search, but on odd shaped polygons I need to use labelPoints to ensure the point is actually in the polygon. The executeQueries() works fine in the if, but in the else it doesn't run correctly as the executeQueries() happens before the labelPoints are retrieved. I tried adding .on("label-points-complete") to fire the executeQueries() but that doesn't appear to be helping. Just trying to get the geometry from the labelPoint before I execute the rest. I have tried this 1000 ways with no success. Thanks for any tips. function symbolizeFoundFeatures(featureSet) { //If we get a result set if (featureSet.features.length &gt; 0) { //Highlight the feature var polygonJson = { "rings": featureSet.features[0].geometry.rings, "spatialReference": map.spatialReference }; var selectedGeometry = featureSet.features[0].geometry; searchedGraphic = map.graphics.add(new esri.Graphic(new esri.geometry.Polygon(polygonJson), new esri.symbol.SimpleFillSymbol( esri.symbol.SimpleLineSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new esri.Color([0, 0, 0, 1]), 1), new esri.Color([255, 0, 0, 0.2])) )); selectedCentroid = searchedGraphic.geometry.getExtent().getCenter(); var markerSymbol = map.graphics.add(new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 10, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 1), new Color([0, 255, 0, 0.25]) )); var searchedGraphicPoint = new Graphic(selectedCentroid, markerSymbol); //the if here runs everything perfectly if (searchedGraphic.geometry.contains(selectedCentroid)) { useThisPointToInitiateClick = selectedCentroid; executeFromSearchedPoin…
has title: letting deferred finish in esri javascript api before proceeding with code - labelPoints
tagged with: javascript
tagged with: esri
has answer: http://stackoverflow.com/a/29437656
type: AnsweredQuestion
tagged with: deferred
type: Question
accepted answer: http://stackoverflow.com/a/29437656
score: 0

http://stackoverflow.com/q/29494510
tagged with: mozilla
type: Question
has comment: http://stackoverflow.com/comment/47148550
has title: Mozilla doesn't trigger video tage events after attach video src
has body: I have a problem with Mozilla, I need to fit video dimension to spread on whole div, I tried onloadedmetadata and onloadeddata and other events. all the previous events works perfect on chrome. If i use scaleToFill manually from Mozilla console, it works This is the code navigator.getUserMedia(constraints, handleUserMedia, handleUserMediaError); function handleUserMedia(stream) { localVideo = document.getElementById('localVideo'); sendButton.onclick = sendData localStream = stream; attachMediaStream(localVideo, stream); localVideo.onloadedmetadata = function (e) { scaleToFill(localVideo); } function scaleToFill(videoTag) { var $video = $(videoTag), videoRatio = videoTag.videoWidth / videoTag.videoHeight, tagRatio = $video.width() / $video.height(); if (videoRatio &lt; tagRatio) { $video.css('-webkit-transform', 'scaleX(' + tagRatio / videoRatio + ')') $video.css('-moz-transform', 'scaleX(' + tagRatio / videoRatio + ')') } else if (tagRatio &lt; videoRatio) { $video.css('-webkit-transform', 'scaleY(' + videoRatio / tagRatio + ')') $video.css('-moz-transform', 'scaleY(' + videoRatio / tagRatio + ')') } } Thanks.
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47148691
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: google-chrome
tagged with: video
has answer: http://stackoverflow.com/a/29495744

http://stackoverflow.com/comment/47024637
type: Comment
score: 0
type: AnswerComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74391/discussion-between-javahater-and-soul).
comment on: http://stackoverflow.com/a/29426646

http://stackoverflow.com/a/41705718
has body: Just in case someone else lands in this, it would be worth it to know that this can be done rather easily with the help of Angular ngHide and ngShow directives. Any embellishments such as icons, styles, animations, etc can be added to it, yet the functionality is pretty straight forward if you do it this way: Here is your template for one single menu tier (toggle item and submenu items) Trigger {{item.title}} And here is what it could possibly be the most simple controller you'll ever see, although this would be better if it was in it's own json file ;) .controller('ListBottomSheetCtrl', function($scope) { $scope.data = [{ title: 'Home', icon: 'home', link: '/page1/' }, { title: 'Email us', icon: 'envelope', link: '/page2/' }, { title: 'Profile', icon: 'user', link: '/page3/' }, { title: 'Print', icon: 'print', link: '/page4/' }, ]; }) You may find it working here See! Easy! No need to go all crazy, easy does it in programming. For the sale of maintainability ;)
downvote count: 0
answers question: http://stackoverflow.com/q/29397130
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/46993891
has text: This could help you: http://www.codelixir.com/android-webview-interfacing-between-java-and-javascript-tutorial/
comment on: http://stackoverflow.com/a/29408611
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47064924
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29448779
type: Comment
has text: That might be browser issue. Which one are you using ? I'm on chrome here

http://stackoverflow.com/comment/47154757
comment on: http://stackoverflow.com/a/29441660
score: 0
has text: also this is the [link](http://www.o4c.org/donate) to the old version and this is the [link](http://www.o4c.org/donate.php) to the new as you can see if you resize your window the new version ruins the mobile menu, that is fully working on the old.
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/47208464
has text: @charlietfl, Hiding all elements on a page except for one or two has been done done successfully by a lot of people, regardless of the number of elements that are being hidden in each case. Just Google it. There is some other reason why it doesn't work. Anyway, thank you for your replies.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29525608

http://stackoverflow.com/q/29484126
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29484220
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am trying to make the something like this. But somehow I am not able to make it same. What I have tried I am able to create replica of this but issue is that the button are fixed. Is that possible by putting left property in CSS ? If any can guide me with this then it would be great. Thanks. ( function($) { var map = new google.maps.Map(document.getElementById('new_map_canvas'), { zoom: 4, center: new google.maps.LatLng(57.658339,-102.918287), mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControl: false, streetViewControl: false, panControl: false, zoomControlOptions: { position: google.maps.ControlPosition.LEFT_BOTTOM } }); $("#store_").click(function(){ //$(".side_window_content").show("slide", { direction: "left" }, 1000 ); $(".side_window_content").slideToggle(); }); } )(jQuery); #new_map_canvas{ border:5px solid; } #store_, #direction_{ position:absolute; z-index:5; -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); -ms-transform: rotate(90deg); -o-transform: rotate(90deg); transform: rotate(90deg); } .side_window, .side_window_content{ position:absolute; z-index:6; } .side_window_content{ width:300px; height:660px; background:white; display:none; } .side_window{ }
has comment: http://stackoverflow.com/comment/47169562
has comment: http://stackoverflow.com/comment/47128415
possible better answer: http://stackoverflow.com/a/29484177
has answer: http://stackoverflow.com/a/29484177
has comment: http://stackoverflow.com/comment/47128449
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47169527
accepted answer: http://stackoverflow.com/a/29484220
has comment: http://stackoverflow.com/comment/47128547
favorite count: 0
linked to: http://stackoverflow.com/q/14470081
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29484448
has title: Open sidebar window with jQuery

http://stackoverflow.com/comment/47102044
type: QuestionComment
comment on: http://stackoverflow.com/q/29470231
has text: Doesn't `angular.element` take a native JS element or a string of HTML and wrap it in jQuery? I don't think it's a selector engine ?
score: 0
type: Comment

http://stackoverflow.com/q/29429054
possible better answer: http://stackoverflow.com/a/29429169
score: 0
has answer: http://stackoverflow.com/a/29429169
has comment: http://stackoverflow.com/comment/47028147
has answer: http://stackoverflow.com/a/29429120
has comment: http://stackoverflow.com/comment/47028234
has title: How to pass json data to .js files
has comment: http://stackoverflow.com/comment/47028265
has body: i got a problem here . I have this code to create the json data in locations.php &lt;?php $locations = array( array('2479 Murphy Court', "Minneapolis, MN 55402", "$36,000", 48.87, 2.29, "property-detail.html", "assets/img/properties/property-01.jpg", "assets/img/property-types/apartment.png"), array('3398 Lodgeville Road', "Golden Valley, MN 55427", "$28,000", 48.866876, 2.309639, "property-detail.html", "assets/img/properties/property-02.jpg", "assets/img/property-types/apartment.png") ); ?&gt; &lt;script type="text/javascript"&gt; var locations = "&lt;?= json_encode($locations) ?&gt;"; &lt;/script&gt; I want to pass the json to locations.js . Which it will called by another .js file with getScript function. I tried to call the locations.php but its not working, so i create locations.js to test and it works Not working $.getScript("assets/php/locations.php", function(){ Working $.getScript("assets/js/locations.js", function(){ locations.js var locations = [ ['2479 Murphy Court', "Minneapolis, MN 55402", "$36,000", 48.87, 2.29, "property-detail.html", "assets/img/properties/property-01.jpg", "assets/img/property-types/apartment.png"], ['3398 Lodgeville Road', "Golden Valley, MN 55427", "$28,000", 48.866876, 2.309639, "property-detail.html", "assets/img/properties/property-02.jpg", "assets/img/property-types/apartment.png"], ]; Can anyone help me? Thank you. Sorry for bad english and maybe hard to understand
tagged with: php
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/29429120
answer count: 2
has comment: http://stackoverflow.com/comment/47028334
has comment: http://stackoverflow.com/comment/47028199
tagged with: javascript

http://stackoverflow.com/q/29417485
type: Question
score: 0
answer count: 1
tagged with: javascript
has title: Adding a timeout for a callback within a promise and rejecting
has comment: http://stackoverflow.com/comment/47007852
has body: I'm converting socket.io's emit function to a promise like this. var io = require("socket.io-client") var Promise = require("bluebird") var _ = require("underscore") io.emitAsync = function(event, payload){ return new Promise(function (resolve, reject) { return io.emit(event, payload, function(){ var args = _.toArray(arguments) if(args[0]) reject(new Error(args[0])) resolve.apply(null, args) }) }) } I couldn't use promiseify because the io.emit callback doesn't return a node-style callback signature. The first argument can't be an error object. So the plan is to pass a string error message, the promise above will reject if the first argument is truthy. This is all fine and dandy, here's the problem. If you don't return a callback in your socket.on then this promise above will never resolve or reject anything. So what I need is a timeout this callback, if nothing comes back within an allotted period of time then it will reject(new Error("timeout")). Thing is I have no clue how to do that. Ideally I can set the seconds to wait within the function above, or if know there's no callback for a given event I'd want to resolve, so ideally it's a parameter of emitAsync itself. Thoughts?
accepted answer: http://stackoverflow.com/a/29417874
tagged with: node.js
tagged with: bluebird
has comment: http://stackoverflow.com/comment/47007713
linked to: http://stackoverflow.com/q/20915608
has answer: http://stackoverflow.com/a/29417874
tagged with: socket.io
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47007637

http://stackoverflow.com/comment/46982804
type: AnswerComment
has text: Thank you very much I'm not familiar with the first set of code but the second one makes sense to me
comment on: http://stackoverflow.com/a/29381884
score: 0
type: Comment

http://stackoverflow.com/q/29458482
has comment: http://stackoverflow.com/comment/47081176
has comment: http://stackoverflow.com/comment/47095457
score: -1
accepted answer: http://stackoverflow.com/a/29460052
type: AnsweredQuestion
tagged with: d3.js
has title: Dendrogram: figue.js (clustering) output to fit visualization
downvote count: 1
type: Question
tagged with: javascript
tagged with: hierarchical-clustering
has answer: http://stackoverflow.com/a/29460052
has comment: http://stackoverflow.com/comment/47081207
upvote count: 0
has comment: http://stackoverflow.com/comment/47083915
tagged with: cluster-analysis
answer count: 1
has comment: http://stackoverflow.com/comment/47082035
favorite count: 0
has comment: http://stackoverflow.com/comment/47086664
has body: It seems that machine learning via JavaScript is in it's infancy as there are hardly any libraries which fit each other calculation wise and visualization wise. I am using figue.js library and wish to output the result via the following: http://www.meccanismocomplesso.org/en/dendrogramma-d3-parte1/ http://www.meccanismocomplesso.org/en/dendrogramma-d3-parte2/ http://www.meccanismocomplesso.org/en/dendrogramma-d3-parte3/ This is what it requires: { "name": "root", "y" : 0, "children": [ { "name": "parent A", "y" : 30, "children": [ {"name": "child A1", "y" : 100}, {"name": "child A2", "y" : 100}, {"name": "child A3", "y" : 100} ] },{ "name": "parent B", "y" : 76, "children": [ {"name": "child B1", "y" : 100}, {"name": "child B2", "y" : 100} // &lt;--- number at the end is the ultrametric distance ] } ] } This is what figue.js is giving me(of course it's different, all of the developers do this...): { "label": -1, "left": { "label": "Point 1", "left": null, "right": null, "dist": 0, "centroid": [ 13.0406203, 55.606759100000005 ], "size": 1, "depth": 0 }, "right": { "label": -1, "left": { "label": -1, "left": { "label": -1, "left": { "label": "Point 2", "left": null, "right": null, "dist": 0, "centroid": [ 13.0403852, 55.6066934 ], "size": 1, "depth": 0 }, "right": { "label": "Point 5", "left": null, "right": null, "dist": 0, "centroid": [ 13.0404121, 55.6066418 ], "size": 1, "depth": 0 }, "dist": 0.00005819080683319214, "centroid": [ 13.04039865, 55.606667599999994 ], "size": 2, "depth": 1 }, "right": { "label": "Point 3", "left": null, "right": null, "dist": 0, "centroid": [ 13.0404818, 55.606629700000006 ], "size": 1, "depth": 0 }, "dist": 0.00007074249076717127, // &lt;--- ultrametric distance "centroid": [ 13.040426366666667, 55.60665496666667 ], "size": 3, "depth": 2 }, "right": { "label": "Point 4", "left": null, "right": null, "dist": 0, "centroid": [ 13.0405408, 55.6066934 ], "size": 1, "depth": 0 }, "dist": 0.00008682562985036432, "centroid": [ 13.04045497500…

http://stackoverflow.com/comment/47132208
type: AnswerComment
type: Comment
has text: i cannot comment. i do not have the reputation for tat.,
comment on: http://stackoverflow.com/a/29471549
score: 0

http://stackoverflow.com/q/29416551
tagged with: javascript
favorite count: 0
has title: Cannot access attribute real value in Angular Directive template function
score: 0
has answer: http://stackoverflow.com/a/29420792
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29420792
upvote count: 1
downvote count: 1
type: AnsweredQuestion
type: Question
tagged with: angularjs-directive
has body: I've been looking for a time now and could not find any question/issue related to this, so I'm going to ask here if anyone could help me it would be greatly appreciated. I am creating a directive for a tag (I want the number to be dynamic and with angular there is no way on doing something like so I've created a directive with a template as a function as follows: angular.module("myModule").directive("myHeader", ["translateFilter", function (translateFilter) { "use strict"; return { restrict: "E", scope: true, template: function(element, attrs) { var html = "", title = translateFilter(attrs.title); console.log(attrs); //Here i can see that attrs.size is "3" console.log(attrs.size); // I get {{hsize}} instead html += "&lt;h" + attrs.size + "&gt;"; html += "&lt;a href=" + attrs.url + " title=" + title + "&gt;"; html += "&lt;i class='fa fa-" + attrs.icon + "'&gt;&lt;/i&gt;"; html += title; html += "&lt;/a&gt;"; html += "&lt;/h" + attrs.size + "&gt;"; return html; } }; }]); And i'm using this directive inside another directive as follows: &lt;my-header url="{{url}}" icon="{{icon}}" title="{{title}}" size="{{hsize}}"&gt;&lt;/my-header&gt; Where {{hsize}} is "3". Anyone could point me out why am i getting {{hsize}} when i do console.log(attrs.size); but when i do console.log(attrs); I can clearly see that its value is "3"? In my directive I have already tried all possible combinations for the scope attribute.
answer count: 1

http://stackoverflow.com/comment/47157723
score: 0
comment on: http://stackoverflow.com/q/29498688
has text: @Rosa FYI, Java != JavaScript. They are two completely different languages.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29509762
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29504705
has body: Thanks everyone for trying to help me with my question. After doing several console.log() in attempt to try and figure out the logic behind the code. I was able to figure it out. the var window_top = $(window).scrollTop(); is initially 0 when the page load and no scrolling is done. when the page is being scrolled, the value increases. The initial value of var div_top = $("#sticky-anchor").offset().top; is the height from the &lt;div id="sticky"&gt; to the top. The statement if (window_top &gt; div_top) return true when the sticky div offset the top.
downvote count: 0

togglebutton
tags question: http://stackoverflow.com/q/29381503
tag name: togglebutton
type: Tag

http://stackoverflow.com/comment/47530018
type: Comment
comment on: http://stackoverflow.com/a/29608465
has text: so it is possible that google took it down anytime after 20th? yes,exactly. i haven't found anything like google chart and commercially free. as far as i found, jqplot is god enough for simple matters, but still does not meet my requirement either. specifically: showing information when hover a spot in line chart.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29527385
score: 142
has answer: http://stackoverflow.com/a/39832684
downvote count: 0
upvote count: 142
has answer: http://stackoverflow.com/a/31838774
has comment: http://stackoverflow.com/comment/47217793
has answer: http://stackoverflow.com/a/55394971
has answer: http://stackoverflow.com/a/41644112
favorite count: 0
has answer: http://stackoverflow.com/a/63113437
accepted answer: http://stackoverflow.com/a/31838774
has answer: http://stackoverflow.com/a/39316999
has comment: http://stackoverflow.com/comment/47210027
possible better answer: http://stackoverflow.com/a/29533459
has answer: http://stackoverflow.com/a/44116397
has answer: http://stackoverflow.com/a/29533459
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/42238030
linked to: http://stackoverflow.com/q/35455502
has answer: http://stackoverflow.com/a/49564098
type: Question
tagged with: reactjs
has answer: http://stackoverflow.com/a/75363477
has body: I am trying to find the best way to remove an element from an array in the state of a component. Since I should not modify the this.state variable directly, is there a better way (more concise) to remove an element from an array than what I have here?: onRemovePerson: function(index) { this.setState(prevState =&gt; { // pass callback in setState to avoid race condition let newData = prevState.data.slice() //copy array from prevState newData.splice(index, 1) // remove element return {data: newData} // update state }) }, Thank you. updated This has been updated to use the callback in setState. This should be done when referencing the current state while updating it.
tagged with: javascript
has title: Removing element from array in component state
answer count: 11

http://stackoverflow.com/comment/47127861
type: Comment
comment on: http://stackoverflow.com/q/29483716
type: QuestionComment
score: 1
has text: another nice tool to debug json: http://jsonformatter.curiousconcept.com/

http://stackoverflow.com/comment/47112210
score: 0
has text: Have you tried to have the background and square as different objects?
comment on: http://stackoverflow.com/q/29475314
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29480988
accepted answer: http://stackoverflow.com/a/29514584
type: AnsweredQuestion
has body: Is it possible to validate that an input is an image url? I tried the following naive approach: validations.img = { identifier: 'img', rules: [{ type: 'url', prompt: 'not a valid URL' }, { type: "contains[.png, .jpg, .jpeg, .gif, .tiff, .tif]", prompt: 'not image' }] }; But it looks like contains is doing an AND operation. Can I make it do an OR?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29514584
score: 0
has title: semantic-ui form validation: image url
answer count: 1
tagged with: semantic-ui

http://stackoverflow.com/a/29493225
answers question: http://stackoverflow.com/q/29493126
downvote count: 0
upvote count: 2
type: Answer
score: 2
has body: Use _.reduce _.reduce(obj, function(total, element) { total.aa = total.aa + element.aa; total.bb = total.bb + element.bb; return total; }, { aa: 0, bb: 0})

http://stackoverflow.com/q/29430732
has body: I have a HTML content like &lt;Table style="width=100px;"&gt; &lt;tr&gt; &lt;td&gt; KEY1:Value1 Key2:Value2 &lt;/td&gt; &lt;tr&gt; &lt;Table&gt; Now if my td content is longer than the TD width, it should show like Key1: value1 Key2: value2 Note: this should be applicable only if the content length is higher than the TD width Also, this is needed for IE6
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47031147
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29430823
upvote count: 1
downvote count: 1
type: Question
has title: HTML table content: how to show part of content in new line if the line is lengthy
accepted answer: http://stackoverflow.com/a/29430823
has comment: http://stackoverflow.com/comment/47030972

http://stackoverflow.com/comment/47091198
type: Comment
score: 0
has text: Hi mkaminsky, thank you. I opened each one of them and searched the keyword "events-group", but none of them contains this key word. So I think maybe I can use the Grid system in bootstrap to do this job? Your css also works, but I just don't want to maintain the css by myself.
comment on: http://stackoverflow.com/a/29463928
type: AnswerComment

http://stackoverflow.com/comment/47151230
type: QuestionComment
comment on: http://stackoverflow.com/q/29492778
score: 0
has text: Tiago, can't insert inRange in may cell objetc becouse if its out of range inRange is undefined
type: Comment

http://stackoverflow.com/comment/47093320
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29464911
has text: so what do you want to be displayed?
score: 0

http://stackoverflow.com/comment/46936802
type: Comment
has text: Think of it as a grid, leave your cells alone and just worry about moving the data. Eg: if 4 is removed shift 5s data to where 4's element is.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29378259

http://stackoverflow.com/comment/47083611
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29459707
type: Comment
has text: Thanks NYTom but I don't want to include another lib to my project if is not completly neccessary :)

http://stackoverflow.com/comment/46981231
score: 0
has text: google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker);
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29401125

http://stackoverflow.com/q/29376558
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29377423
type: Question
tagged with: ecmascript-6
has body: I'm currently learning JS and ES6 in particular. I'm having trouble understanding why my code with class constructor and arrow functions doesn't work without a few changes. Here is where I started, an ES6 module exporting this flux-like dispatcher object. // RiotControl dispatcher formatted as ES6 module. // https://github.com/jimsparkman/RiotControl var dispatcher = { stores: [], addStore: function(store) { this.stores.push(store); } }; ['on','one','off','trigger'].forEach(function(api){ dispatcher[api] = function() { var args = [].slice.call(arguments); this.stores.forEach(function(el){ el[api].apply(null, args); }); }; }); export default dispatcher I wanted to make a class out of this code and originally ended up with: // RiotControl dispatcher formatted as ES6 class module. // https://github.com/jimsparkman/RiotControl export default class { constructor() { this.stores = [] this.addStore = store =&gt; { this.stores.push(store); } ['on','one','off','trigger'].forEach(fn =&gt; { this[fn] = () =&gt; { var args = [].slice.call(arguments) this.stores.forEach(function(el){ el[fn].apply(null, args) }) } }) } } For reasons unknown to me, this doesn't work. The first .forEach(...) results in Uncaught TypeError: Cannot read property 'forEach' of undefined, as if the array is not defined. var args = [].slice.call(arguments) results in args being a zero length array instead of actually, umm, having the arguments. To get the code working, I changed it to this: // RiotControl dispatcher formatted as ES6 class module. // https://github.com/jimsparkman/RiotControl export default class { constructor() { this.stores = [] this.addStore = store =&gt; { this.stores.push(store); } var api = ['on','one','off','trigger'] api.forEach(fn =&gt; { this[fn] = function() { var args = [].slice.call(arguments) this.stores.forEach(function(el){ el[fn].apply(null, args) }) } }) } } Thus, the errors were fixed by declaring an array and calling .forEach on that and using a regular callback functio…
has title: Explain effect of ES6 class constructor and arrow functions
tagged with: arrays
tagged with: javascript
tagged with: class
answer count: 1
has comment: http://stackoverflow.com/comment/46935745
downvote count: 0
has comment: http://stackoverflow.com/comment/46933697
favorite count: 0
upvote count: 2
tagged with: module
accepted answer: http://stackoverflow.com/a/29377423

http://stackoverflow.com/comment/46994077
has text: `LexicalEnvironment` will have more than one `scope` based on the context.
score: 2
comment on: http://stackoverflow.com/a/29410327
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/65237505
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29397164
has text: Did you find any solution to this issue?
score: 0

http://stackoverflow.com/a/29452850
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/47071316
has comment: http://stackoverflow.com/comment/47071311
has comment: http://stackoverflow.com/comment/47071284
accepted answer of: http://stackoverflow.com/q/29452837
answers question: http://stackoverflow.com/q/29452837
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47071388
type: Answer
has body: You should use the following: $li.find("a").data('status', 'Downloaded'); If you must use setAttribute, then go with attr(): $li.find("a").attr('data-status', 'Downloaded');

http://stackoverflow.com/q/29487100
tagged with: jquery
score: 0
answer count: 3
has body: I have a slide show that some Items and images come to my slideshow by jquery animate, This is my code: $("#item-1").animate({left:100},1000,function(){ $("#item-2").animate({left:250},2000, function(){ //I want below Item come with a long delay, I mean a delay after #item-2 $("#item-3").animate({left:100},1250) }) }); How to make a delay?
has comment: http://stackoverflow.com/comment/47133618
favorite count: 0
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29487193
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47134037
has comment: http://stackoverflow.com/comment/47133686
has answer: http://stackoverflow.com/a/29487190
has answer: http://stackoverflow.com/a/29487474
accepted answer: http://stackoverflow.com/a/29487190
type: Question
possible better answer: http://stackoverflow.com/a/29487474
tagged with: jquery-animate
has comment: http://stackoverflow.com/comment/47133582
has title: How to delay after one element animation?
tagged with: slideshow
tagged with: javascript

http://stackoverflow.com/q/29377045
answer count: 1
has comment: http://stackoverflow.com/comment/46937241
type: UnansweredQuestion
tagged with: three.js
type: Question
has comment: http://stackoverflow.com/comment/47067739
tagged with: javascript
has comment: http://stackoverflow.com/comment/46935867
has body: I'm trying to arrange 10 spheres in a ring. This is the calculation I have put together so far, but it is not working var bubbleGeo = new THREE.SphereGeometry(300, 20, 20); var bubbleMat = new THREE.MeshLambertMaterial( { color: 0x888888 } ); var numBubbles = 10; var bubbleMesh; var bubbles = []; var startX = 0; var startY = 500; var spacing = 80 * Math.sin( angle ); for (var i=0; i&lt;numBubbles; i++) { bubbleMesh = new THREE.Mesh(bubbleGeo, bubbleMat); console.log("bubble" + i); var angle = 360/numBubbles*i*Math.PI/180; bubbleMesh.position.set((startX + Math.cos(angle)*bubbleR) + spacing, (startY + Math.sin(angle)*bubbleR) + spacing, 100 ); scene.add(bubbleMesh); bubbles.push(bubbleMesh); } I don't really know much about math. If any folks are there who do see where I have went wrong, any help would be greatly appreicated. Thanks!
score: 0
has answer: http://stackoverflow.com/a/29450990
has title: calculation to arrange spheres in a ring

http://stackoverflow.com/a/29379432
type: AcceptedAnswer
has body: var md = {}; md[date_mplayer] = date_mplayer; localStorage.setItem('date_mplayer', JSON.stringify(md));
type: Answer
accepted answer of: http://stackoverflow.com/q/29379408
downvote count: 0
answers question: http://stackoverflow.com/q/29379408
score: 1
upvote count: 1

http://stackoverflow.com/q/29499952
tagged with: html-table
tagged with: cell
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/47158480
favorite count: 0
has comment: http://stackoverflow.com/comment/47158493
has comment: http://stackoverflow.com/comment/47158594
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 6
has title: Is there a way to hide a data cell based on a specific value using just HTML/CSS?
score: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29500232
accepted answer: http://stackoverflow.com/a/29500232
has body: For example I have this code: Test Values $100 Initial value Is there a way to hide the cells that are equal to $0 using HTML/CSS only? Let's say instead of $0 I have a variable called fee that can be a variety of values: $0, $20, $100, etc. For example: Is there a way to check what value it is and if it is found to be $0 can I then hide it? My CSS is: table{ border-width: 1px; border-style: solid; border-collapse: separate; width: 400px; } #test{ empty-cells: show; margin-bottom: 20px; } tr, th, td{ border-width:1px; border-style: solid; } .results { display: none; // I want this to only display none when fees = $0 }
type: Question

http://stackoverflow.com/q/29381952
has title: How to plot points on a map projection in D3.js and filter the data using range sliders?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29382211
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46943287
favorite count: 0
has comment: http://stackoverflow.com/comment/46943308
tagged with: d3.js
type: UnansweredQuestion
tagged with: data-visualization
has body: Here is the current status of the code I'm trying to work with. http://jaskirat.me/uploads/DataVis/map_projection/ The points are mapped to the earthquakes which occurred in past month. I want the slider on the top to filter the points based on range of dates. How would I do that? Following is the function that creates the points. function createPoints() { svg.selectAll(".symbol") .data(centroid.features.sort(function(d) { return d.properties.mag; })) .enter().append("path") .attr("fill", "rgba(0, 140, 200, 0.5)") //INTERACTION .on("mouseover", function(d, i) { d3.select(this) .attr("fill", "red"); // Tooltip var tooltipX = parseFloat(d3.select(this).attr("x")) + 10; var tooltipY = parseFloat(d3.select(this).attr("y")) + 10; svg.append("text") .attr("fill", "rgba(0, 140, 200, 1)") .attr("x", 100) .attr("y", height - 200) .text("PLACE : " + d.properties.place) .attr("id", "tooltip") .append("tspan") .attr("x", 100) .attr("dy", 20) .text("LAT : " + d.geometry.coordinates[0]) .append("tspan") .attr("x", 100) .attr("dy", 20) .text("LON : " + d.geometry.coordinates[1]); }) .on("mouseout", function(d) { d3.select(this) .attr("fill", "rgba(0, 140, 200, 0.5)") d3.select("#tooltip").remove(); }) .attr("d", path.pointRadius(function(d) { // XY Coordinates calculated by .pointRadius return radius(d.properties.mag); })); }
score: 1
upvote count: 1
tagged with: geojson

http://stackoverflow.com/a/29479918
has comment: http://stackoverflow.com/comment/47121628
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/47121067
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/29479875
has comment: http://stackoverflow.com/comment/47120590
has comment: http://stackoverflow.com/comment/47120731
has body: You need to check the value of the input like so var input = document.getElementById("inputID"); var value = input.value; The code will always be ran straight away because it has no event handler. You could add a button which triggers it document.getElementById('button').addEventListener('click', function () { var input = document.getElementById("inputID"); if (input.value === 'start') { // Do something } }); Or if you prefer on the forms submit event: document.getElementById('testForm').addEventListener('submit', function () { var input = document.getElementById("inputID"); if (input.value === 'start') { // Do something } });

http://stackoverflow.com/q/29398185
favorite count: 0
linked to: http://stackoverflow.com/q/11907053
has body: Hi I want to shorten this: document.write(""). Instead i made my function: function myFunc() { document.write() } and I want that ill be able to modify it like this: myFunc("hello world") but it did not work.
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/46972358
has comment: http://stackoverflow.com/comment/46972443
has comment: http://stackoverflow.com/comment/46972534
type: Question
has title: How to make a function for: document.write(" ")
tagged with: function
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/46975857
has comment: http://stackoverflow.com/comment/46972345
has comment: http://stackoverflow.com/comment/46972407
has comment: http://stackoverflow.com/comment/46972598
tagged with: javascript
tagged with: document.write
has comment: http://stackoverflow.com/comment/46972440
has answer: http://stackoverflow.com/a/29398275
has comment: http://stackoverflow.com/comment/46972465
answer count: 1
linked to: http://stackoverflow.com/q/4539253

http://stackoverflow.com/comment/46982017
type: QuestionComment
has text: `this` is window, not the closeMessageBox html node
comment on: http://stackoverflow.com/q/29402883
score: 0
type: Comment

http://stackoverflow.com/comment/47049253
type: QuestionComment
comment on: http://stackoverflow.com/q/29436570
score: 0
has text: I retracted my close vote because I think the last sentence of the question can be answered appropriately for this forum (see my answer).
type: Comment

http://stackoverflow.com/q/29452149
has answer: http://stackoverflow.com/a/29452231
type: Question
has title: jQuery Profanity filter not updating while typing
has answer: http://stackoverflow.com/a/34836709
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: profanity
possible better answer: http://stackoverflow.com/a/29452231
has body: I would like to dynamically filter bad words using this profanity filter. The api will change "ass" to "***" in the given example, only if the text was there before page load. I would like it to change recognized bad words as they are typed, to prevent someone from sending a naughty messages through a my contact form. Here is what i've got so far: I would think that the 'onkeypress' attribute would force the script to check for updated textarea values, but that is not the case. Help appreciated!
has answer: http://stackoverflow.com/a/29452277
accepted answer: http://stackoverflow.com/a/29452277
answer count: 4
type: AnsweredQuestion
tagged with: dynamic
has comment: http://stackoverflow.com/comment/47070009
has answer: http://stackoverflow.com/a/30946115

http://stackoverflow.com/q/29451588
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29451755
tagged with: http://stackoverflow.com/tag/json
has title: search json value for the first img tag in a string using javascript or angularjs specific filter
upvote count: 2
has answer: http://stackoverflow.com/a/35949785
answer count: 2
has comment: http://stackoverflow.com/comment/47069045
has body: Working on an angular project and came across a situation where one of the endpoints doesnt exactly return an easily useable image object.. Say you have a json object in the console which returns something like: __cdata: "Some random text here and &lt;img src="image.jpg"&gt;" How would you go about searching the __cdata value for that first img tag and storing that src? I guess this technically doesn't have to be an angular specific solution either, but curious if one exists. Thanks
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
score: 2
possible better answer: http://stackoverflow.com/a/35949785
accepted answer: http://stackoverflow.com/a/29451755
type: Question

http://stackoverflow.com/a/45473181
type: Answer
downvote count: 0
score: 3
has body: Here is my solution function download() { TheResourceService.get({ xId: $stateParams.xId }, function(result) { var sheetName = 'first_sheet'; var wopts = { bookType: 'xlsx', bookSST: true, type: 'binary' }; var fileName = "the_excel_file.xlsx"; var columns = ['id', 'name', 'point']; var data = [ [1, 'Kyle', 20], [2, 'Allen', 32], [3, 'Chris', 18], [4, 'Tim', 11] ]; var wb = XLSX.utils.book_new(); var ws = uigrid_to_sheet(data, columns); ws['!ref'] = XLSX.utils.encode_range({ s: { c: 0, r: 0 }, e: { c: 3, r: 1 + data.length + 1 } }); ws['C6'] = { f: 'SUM(C2:C5)' }; ws['B6'] = { v: 'Total' }; XLSX.utils.book_append_sheet(wb, ws, sheetName); var wbout = XLSX.write(wb, wopts); saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), fileName); }) } function uigrid_to_sheet(data, columns) { var o = [], oo = [], i = 0, j = 0; /* column headers */ for (j = 0; j &lt; columns.length; ++j) oo.push((columns[j])); o.push(oo); /* table data */ for (i = 0; i &lt; data.length; ++i) { oo = []; for (j = 0; j &lt; data[i].length; ++j) oo.push((data[i][j])); o.push(oo); } /* aoa_to_sheet converts an array of arrays into a worksheet object */ return XLSX.utils.aoa_to_sheet(o); } function s2ab(s) { if (typeof ArrayBuffer !== 'undefined') { var buf = new ArrayBuffer(s.length); var view = new Uint8Array(buf); for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) &amp; 0xFF; return buf; } else { var buf = new Array(s.length); for (var i = 0; i != s.length; ++i) buf[i] = s.charCodeAt(i) &amp; 0xFF; return buf; } }
upvote count: 3
answers question: http://stackoverflow.com/q/29520596

http://stackoverflow.com/q/29387588
tagged with: autocomplete
has answer: http://stackoverflow.com/a/29390062
accepted answer: http://stackoverflow.com/a/29390062
tagged with: javascript
tagged with: jquery
score: 0
has body: I have an "autocomplete" text field and I want that once an option is selected from this autocomplete list, the user will have to click on the "go to page" button to go to that particular link. But I dont know how to link the URL with the onclick event. Anyone can help me? CURRENT CODE Form Select Number Thanks for your help
answer count: 1
type: AnsweredQuestion
has title: How to connect button (onclick event) with jQuery autocomplete
tagged with: onclick
type: Question
tagged with: href

http://stackoverflow.com/q/29410140
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: I wrote a jQuery code that have all the pages code in one html file and I wanted to add a slider in the left side that will show the pages on. It works in the home page but it's not working for the other pages? Nevertheless the code is similar. I don't know what to change or add to make working for all of the pages. My HTML header: WELCOME And here is the home page slider (the one that works): Page 1 Page 2 Page 3 Welcome to the home page Here is the code for the slider for the one of the pages (It didn't work): Page 1 Page 2 Page 3 Welcome to the home page
tagged with: css
has title: Slider is not working in jQuery
upvote count: 0
has comment: http://stackoverflow.com/comment/46993656
type: Question
has comment: http://stackoverflow.com/comment/46999594
has comment: http://stackoverflow.com/comment/46994354
has answer: http://stackoverflow.com/a/29410189
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/46993617
tagged with: http://stackoverflow.com/tag/html
downvote count: 1

http://stackoverflow.com/q/29459935
score: 4
has comment: http://stackoverflow.com/comment/47109243
has body: What is the right URL to retrieve posts by meta_query with the WP-REST-API? The custom field I want to use can contain multiple values, I tried this for custom field which only can contain a single value and this works. wp-json/posts?format=json&amp;filter[meta_key]=content_type&amp;filter[meta_value]=2 But I can't get it work with a custom field which can contain multiple values (array/object). Anyone?
has comment: http://stackoverflow.com/comment/47148311
downvote count: 0
answer count: 1
favorite count: 0
tagged with: wp-api
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47083918
upvote count: 4
tagged with: advanced-custom-fields
tagged with: wordpress
type: Question
has title: Retrieve posts by custom field with WP-REST-API in Javascript
has answer: http://stackoverflow.com/a/48707510
tagged with: javascript

http://stackoverflow.com/comment/47238596
type: QuestionComment
comment on: http://stackoverflow.com/q/29525143
has text: I added `console.log('user is:' + request.user);` and I get `I2015-04-09T16:00:30.984Z] user is:null`
score: 0
type: Comment

protractor
tags question: http://stackoverflow.com/q/29420070
tags question: http://stackoverflow.com/q/29402871
tags question: http://stackoverflow.com/q/29475553
tags question: http://stackoverflow.com/q/29406962
tags question: http://stackoverflow.com/q/29428821
tags question: http://stackoverflow.com/q/29424911
tag name: protractor
tags question: http://stackoverflow.com/q/29397800
tags question: http://stackoverflow.com/q/29386420
tags question: http://stackoverflow.com/q/29396338
tags question: http://stackoverflow.com/q/29468377
tags question: http://stackoverflow.com/q/29501976
tags question: http://stackoverflow.com/q/29498375
tags question: http://stackoverflow.com/q/29378315
tags question: http://stackoverflow.com/q/29526030
tags question: http://stackoverflow.com/q/29485754
tags question: http://stackoverflow.com/q/29486747
type: Tag
tags question: http://stackoverflow.com/q/29477460
tags question: http://stackoverflow.com/q/29379129
tags question: http://stackoverflow.com/q/29497906
tags question: http://stackoverflow.com/q/29382656
tags question: http://stackoverflow.com/q/29478905
tags question: http://stackoverflow.com/q/29377734
tags question: http://stackoverflow.com/q/29436504
tags question: http://stackoverflow.com/q/29407750

http://stackoverflow.com/a/29446914
type: AcceptedAnswer
type: Answer
has body: This should work. It's a bit convoluted and there is likely an easier way, but it works fine. JSFiddle: https://jsfiddle.net/spybhhxc/ var tabdown = false; var tdown = false; $(document).keydown(function(e) { if(e.which == 9) { tabdown = true; } if(e.which === 84) { tdown = true; } if(tabdown &amp;&amp; tdown) { //do your thing } }); $(document).keyup(function(e) { if(e.which == 9) { tabdown = false; } if(e.which === 84) { tdown = false; } }); This presents a problem though, as once you press tab, the document is unfocused as the tab key navigates to elements in a browser. You would be much better off using something like alt or ctrl which don't interact with the browser.
accepted answer of: http://stackoverflow.com/q/29446787
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29446787
upvote count: 1

http://stackoverflow.com/comment/47081615
type: Comment
has text: If you used the exact same code as you posted here, it shouldn't be possible (well, unless your system date is off) :)
comment on: http://stackoverflow.com/a/29458129
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47156250
comment on: http://stackoverflow.com/q/29498688
type: Comment
type: QuestionComment
score: 0
has text: More specifics? Is this PDF? JavaScript? Both? Share any problem code and error messages.

http://stackoverflow.com/comment/47206120
comment on: http://stackoverflow.com/q/29525770
type: Comment
has text: why would you make the li display inline and not inline-block?
score: 1
type: QuestionComment

http://stackoverflow.com/q/29524002
has comment: http://stackoverflow.com/comment/47202727
has comment: http://stackoverflow.com/comment/47203072
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47202414
has body: I'm writing an asp.net site in VB, and am trying to integrate in webcam functionality via javascript. I'm using webcam.js (found here: https://github.com/jhuckaby/webcamjs). When I created a new project for testing this out and working out the kinks, it worked fine. However, when I attempted to integrate it into my main project, the video does not load and I'm left with a blank screen. I can confirm that it does work in the side project in IE, firefox, and chrome, yet works in none of them after integrating it in my main project. The integration process was not complicated, it was mainly just copy and paste and adding the requisite references. I at first was getting problems of it not recognizing 'Webcam' but that went away after I coded in the exact location of the webcam.js file (I understand that this will be a problem later, but I'm more worried about getting it working in debug mode for now so it's fine). My code is as follows: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebcamPart.aspx.vb" Inherits="IMHmfgb_VerJon.WebCamPart" %> <asp:ScriptManager EnablePageMethods="true" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <asp:Label ID="Label1" runat="server" Font-Size="12"></asp:Label> <asp:Button ID="Button2" runat="server" OnClientClick="showCam();return false" Text="Show Cam" /><asp:Button ID="Button1" runat="server" OnClientClick="take_snapshot();return false" Text="Scan" /> </asp:UpdatePanel> <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="500"> <asp:Image ImageUrl="~\Pictures\Loading.gif" runat="server" ImageAlign="Middle" /> </asp:UpdateProgress> I don't believe that the code above is the problem because, as stated above, it all works fine by itself. This leads me to believe that there is some setting or piece of code somewhere in my main project that is interfering with loading the video, but I have no idea where to look or what to look for.
has title: ASP.NET Webcam Display
has comment: http://stackoverflow.com/comment/47203433
has comment: http://stackoverflow.com/comment/47202903
tagged with: webcam
has answer: http://stackoverflow.com/a/29561240
type: Question
has comment: http://stackoverflow.com/comment/47203334
has comment: http://stackoverflow.com/comment/47229082
has comment: http://stackoverflow.com/comment/47228536
tagged with: javascript
linked to: http://stackoverflow.com/q/22777854
has comment: http://stackoverflow.com/comment/47202864
has comment: http://stackoverflow.com/comment/47203118
has comment: http://stackoverflow.com/comment/47229409
score: 0
tagged with: webcam.js
answer count: 1
has comment: http://stackoverflow.com/comment/47203170
tagged with: asp.net

http://stackoverflow.com/comment/47148987
comment on: http://stackoverflow.com/a/29494913
score: 1
type: AnswerComment
has text: then do you really need it as a child of its parent? Couldn't you put this element higher in your DOM?
type: Comment

http://stackoverflow.com/comment/47167899
type: Comment
comment on: http://stackoverflow.com/q/29505354
score: 0
type: QuestionComment
has text: SystemJS has a build tool, you can also leave them as is and rely on HTTP/2 multiplexing.

http://stackoverflow.com/a/69468953
score: 0
type: Answer
has body: For anyone using Angular and ng2-charts, here is my solution. Chart setup was left out for brevity. import { Component, OnInit, ViewChild, ChangeDetectorRef, AfterViewInit } from '@angular/core'; import { BaseChartDirective } from 'ng2-charts'; import { GenericLineChart } from './generic-line-chart'; @Component({ selector: 'app-stats-chart', templateUrl: './stats-chart.component.html', styleUrls: ['./stats-chart.component.scss'] }) export class StatsChartComponent implements OnInit, AfterViewInit { @ViewChild(BaseChartDirective, { static: true }) chartDirective: BaseChartDirective; constructor(private changeDetectorRef: ChangeDetectorRef) { } ngOnInit() { // ...setup chart } ngAfterViewInit() { // set gradient const gradient = this.chartDirective.chart.ctx.createLinearGradient(0, 0, 0, 400); gradient.addColorStop(0, 'rgba(30, 214, 254, .3)'); gradient.addColorStop(1, 'rgba(0,0,0,0)'); this.chart.lineChartData[0].backgroundColor = gradient; this.changeDetectorRef.detectChanges(); } }
answers question: http://stackoverflow.com/q/29447579

http://stackoverflow.com/comment/47708495
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29547065
has text: can you please modify the fiddle according to this scenerio.? Thanks.
score: 0

http://stackoverflow.com/a/29480626
accepted answer of: http://stackoverflow.com/q/29480130
upvote count: 1
answers question: http://stackoverflow.com/q/29480130
type: AcceptedAnswer
has body: Demo: http://jsfiddle.net/uyko2ahx/ Depending on your needs, you can use simple array, or object, with key:value pair: arr=[]; $( ".result" ).each(function( index ) { key=$( this ).prop('id'); value=$(this).val(); arr.push(key+':'+value); }); console.log(arr); obj={}; $( ".result" ).each(function( index ) { key=$( this ).prop('id'); value=$(this).val(); obj[key]=value; }); console.log(obj);
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/47122089
score: 1

http://stackoverflow.com/comment/47116708
type: Comment
type: QuestionComment
score: 0
has text: So, I went ahead and added a class="drop" to my selectors. And, there are a couple of other non-related select boxes on the page making the class association the only option. I then tried all your answers and WPFRookie's answer was the only one that worked. Thank you everyone :)
comment on: http://stackoverflow.com/q/29462076

http://stackoverflow.com/a/43906442
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29421409
has body: How about a map of all the files in a folder? // { // './image1.png': 'data:image/png;base64,iVBORw0KGgoAAAANS', // './image2.png': 'data:image/png;base64,iVBP7aCASUUASf892', // } Do this: const allFiles = (ctx =&gt; { let keys = ctx.keys(); let values = keys.map(ctx); return keys.reduce((o, k, i) =&gt; { o[k] = values[i]; return o; }, {}); })(require.context('./path/to/folder', true, /.*/));
has comment: http://stackoverflow.com/comment/77600605
score: 12
upvote count: 12

http://stackoverflow.com/q/29390644
type: UnansweredQuestion
has body: I run many Mocha tests that look like this : it('should fail blabla', function () { return &lt;functionThatReturnsAPromise&gt;() .then(function () { assert(false); }, function (err) { assert.strictEqual(err.message, 'Foobar is undefined'); assert.strictEqual(err.code, 'EUNDEFINEDFOOBAR'); }); }); The only things that vary among my tests are the function, the code and the message. I wanted to factorize the code like this: function shouldBeRejected(promise, code, message) { return promise .then(function () { assert(false); }, function (err) { assert.strictEqual(err.code, code); assert.strictEqual(err.message, message); }); } (...) it('should fail blabla', function () { return shouldBeRejected(&lt;functionThatReturnsAPromise&gt;(), 'EUNDEFINEDFOOBAR', 'Foobar is undefined'); }); It works but when some tests failed, all my backtraces reference the shouldBeRejected function and so, I'm losing all information about the real test that failed. Is there a way to get a more "intelligent" backtrace pointing to the shouldBeRejected calls that indirectly raise the error? Maybe with a captureStackTrace somewhere?
type: Question
tagged with: mocha.js
upvote count: 2
tagged with: javascript
favorite count: 0
tagged with: exception
score: 2
has title: Mocha test factorization and backtrace
answer count: 0
downvote count: 0

http://stackoverflow.com/comment/47161253
score: 0
type: Comment
has text: @Abdedaim Is there any chance you could give us a full HTML page's code that reproduces the problem? You can paste it on [pastebin](http://pastebin.com/), so we can look at it and see what's wrong.
comment on: http://stackoverflow.com/a/29500834
type: AnswerComment

http://stackoverflow.com/comment/47183438
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29512560
type: QuestionComment
has text: Also, you don't have to call `btoa` on the SVG source. Just remove `;base64` from the URL prefix, and you can specify the rest of the URL in plain text.

http://stackoverflow.com/q/29509887
tagged with: ace-editor
has comment: http://stackoverflow.com/comment/47175957
type: Question
has answer: http://stackoverflow.com/a/29519324
tagged with: javascript
score: 0
has title: Ace Editor and entity encoding/decoding
answer count: 1
accepted answer: http://stackoverflow.com/a/29519324
has body: I have searched across entire SO. for similar or exact topic and I couldn't find *(or didn't saw) topic on issue that's bothering me. If this is duplicate, and solution already exists, accept my apologies. Currently I am working on cms application that uses both codemirror and ace editor, either this one or that one, and that depends on user/operator preference which one is going to be fired up once when particular document is loaded. With codemirror, I have no issues at all. Everything works as expected. Codemirror is loading files via php's file_get_contents() directly into textarea, while ace is loading contents via ajax (current application nature demands so) and the issue that bothers me is actually one single operator/character which is : &amp; I have checked all the methods I wrote in the backend and there is no a single sanitize method or function or preg or whatever.. which I implemented. The only thing being sanitized by me personally, on backend side is textarea tag, which is being wrapped within comment, and unwrapped again upon saving to file as php/html. Ace is -aggressively- converting &amp; character to &amp;amp; entity all the time, no matter what I try, no matter which selected "mode" is chosen (HTML,CSS,PHP, JS... you name it) and I don't want such behavior, I want loaded code to remain intact, on doc/file load/open and doc/file save/write, unless, normally, user doesn't edit or convert those characters manually by hand while editing. In fact, &lt; and > are "doing fine" .. ace is not "afraid of 'em", there is no automatic conversion to &amp;lt; and to &amp;gt; - just &amp;. I spent a lot of time on ace api pages, and found nothing (or didn't looked very good), no particular "setThisThat.option: boolean", etc.. that could solve this little issue. If that matters, I am using ace min-noconflict (modes and themes as well, minified) version 5 days old since this very day. I know that automatic conversion of "problematic characters" is there for a reas…
type: AnsweredQuestion
tagged with: editor

http://stackoverflow.com/comment/47199256
comment on: http://stackoverflow.com/a/29522104
score: 1
has text: @BenAston: Yes, "function statement" is not an ECMAScript term. I think it was dubbed by mozilla. See http://kangax.github.io/nfe/#function-statements for more information.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46981794
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29403179
type: Comment
has text: Perfect thanks, this is even better than what I was trying to do :)

http://stackoverflow.com/comment/47135951
comment on: http://stackoverflow.com/q/29486199
score: 0
type: Comment
type: QuestionComment
has text: where is this error? browser or at server? Update your question with complete information.

http://stackoverflow.com/q/29505088
has comment: http://stackoverflow.com/comment/47167390
has comment: http://stackoverflow.com/comment/47167586
has title: Node.js display variable as HTML
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29505246
upvote count: 2
has comment: http://stackoverflow.com/comment/47167425
tagged with: node.js
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29505246
has body: I'm working on trying to display a Node.js variable as HTML. I currently have this in my app.js which uses Express. Package.json "dependencies": { "body-parser": "~1.12.0", "cookie-parser": "~1.3.4", "debug": "~2.1.1", "express": "~4.12.2", "ejs": "~2.1.3", "hbs": "~2.9.0", "morgan": "~1.5.1", "serve-favicon": "~2.2.0" } App.js var app = express(); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'hbs'); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use('/', routes); app.use('/users', users); app.post('/calc', function(req, res) { res.render('calc', { title: 'Calc'}); var v3 = (req.body.value1 * req.body.value2); console.log(v3); }); Within handlebars, I'm just simply seeing if I can see the value rendered, but I'm not able to. calc.hbs &lt;h2&gt;&lt;%= v3 %&gt;&lt;/h2&gt; and {{v3}} displays nothing. What am I missing? WORKING SNIPPET app.post('/calc', function(req, res) { var v3 = (req.body.value1 * req.body.value2); res.render('calc', { title: 'Calc', v3: v3}); //Pass the local variables into objects to render console.log(v3); });
type: Question
has comment: http://stackoverflow.com/comment/47167499
tagged with: javascript
tagged with: express

http://stackoverflow.com/q/29383619
answer count: 1
has answer: http://stackoverflow.com/a/29399277
tagged with: javascript
favorite count: 0
tagged with: extjs
tagged with: extjs4
tagged with: combobox
has body: I have combos in extjs application that comob box ID(valueField) HTML encode(because that have special chars) how can i override every combo getValue method return decode HTML value Note: i override text-field setValue using bellow method Ext.override(Ext.form.field.Base, { transformRawValue: function(val) { val = Ext.util.Format.htmlDecode(val); return this.callParent([val]); } });
downvote count: 0
type: UnansweredQuestion
has title: Override every Combo getValue Field using common method?
score: 1
tagged with: overriding
type: Question
upvote count: 1

http://stackoverflow.com/comment/47132570
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29486401
has text: the call of your function in setInterval should be done like this setInterval(move, 1000).

alert
tags question: http://stackoverflow.com/q/29408106
tags question: http://stackoverflow.com/q/29431903
tags question: http://stackoverflow.com/q/29424599
tags question: http://stackoverflow.com/q/29465242
type: Tag
tags question: http://stackoverflow.com/q/29443577
tags question: http://stackoverflow.com/q/29528650
tags question: http://stackoverflow.com/q/29421584
tag name: alert
tags question: http://stackoverflow.com/q/29493281

http://stackoverflow.com/comment/46930884
score: 0
type: AnswerComment
has text: @Frayt well what minifier are you using? Personally I would consider it a bug if copying a function reference to a `window` property didn't make it "live", but your minifier may require that you explicitly tell it (via a special comment or something) that a function shouldn't be treated as dead code.
type: Comment
comment on: http://stackoverflow.com/a/29374940

http://stackoverflow.com/q/29410322
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29411862
tagged with: target
tagged with: internet-explorer-10
score: -1
type: Question
has comment: http://stackoverflow.com/comment/46995531
upvote count: 0
linked to: http://stackoverflow.com/q/2158921
has body: I have a problem with event.currentTarget on IE 10. I have two divs on the website. One div contains img which size is on full screen. Second div is smaller and placed on the first div. Smaller cointains nothing. It has only width, height, top, left attributes. When i trigger currentTarget on click, it doesnt see the smaller div but only the bigger one. Even when i click right mouse button and choose option check element it only find the bigger div. This situation is fixed when I set for example background-color to the smaller div. This situation takes place only on IE10. Is this a known issue?
has comment: http://stackoverflow.com/comment/46995471
has comment: http://stackoverflow.com/comment/46996367
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29411862
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has title: IE10 currentTarget javascript
has comment: http://stackoverflow.com/comment/46995884
downvote count: 1

http://stackoverflow.com/comment/47178601
comment on: http://stackoverflow.com/q/29511305
score: 0
has text: yes.. I already did.. but its not working.. It doesn't even hide the fieldset
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29529494
type: Answer
has body: If you use jQuery, you may want to deal with text() instead of innerHTML().
downvote count: 1
upvote count: 0
has comment: http://stackoverflow.com/comment/47212815
score: -1
has comment: http://stackoverflow.com/comment/47212820
has comment: http://stackoverflow.com/comment/47212800
answers question: http://stackoverflow.com/q/29529472

http://stackoverflow.com/q/29432122
has answer: http://stackoverflow.com/a/29432165
accepted answer: http://stackoverflow.com/a/29432820
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47033782
possible better answer: http://stackoverflow.com/a/29432165
has answer: http://stackoverflow.com/a/29432822
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has body: I'm sending a specific value through url and after that my page get refreshes. The URL value is dynamic.Whenever URL sets I want to show div which is already hidden. &lt;button id="show_id" onclick="location.href='opdcasepaperreport.php?patient_nm='+document.getElementById('patient_id').value;" &gt; View Report &lt;/button&gt; When user clicks on View Report , report div will be displayed. I tried following 2 coding methods: $( document ).ready(function() { $("#show_id").click(function() { $('#main').toggle(); }); }); and $(document).ready(function () { if(window.location.href.indexOf("?patient_nm")) { //alert("your url contains "); //show code; } }); in 1st case because of page refresh div get visible and un visible again. Is there any solution for this like in php if(isset(---)){//do this;}
score: 1
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29432820
answer count: 3
has title: How to hide and show div if url is set to specific value using jquery/javascript?
has comment: http://stackoverflow.com/comment/47033894
downvote count: 0

http://stackoverflow.com/comment/77981978
type: Comment
comment on: http://stackoverflow.com/a/29505900
score: 0
type: AnswerComment
has text: @PoPo the above code is working. If you've any problem different than this, then post a Question I will surely try to help you.

http://stackoverflow.com/q/29452336
has comment: http://stackoverflow.com/comment/47070271
has comment: http://stackoverflow.com/comment/47070543
tagged with: http-response-codes
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47070427
score: 0
has comment: http://stackoverflow.com/comment/47070364
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
tagged with: xmlhttprequest
answer count: 0
has comment: http://stackoverflow.com/comment/47070468
type: UnansweredQuestion
has body: I hope i'm not being docile and missing something simple here but i'm stumped, I need to check the response of a HTTP stream from the DI.fm audio streaming servers using Javascript for a chrome extension (Attempting to open a HTTP audio stream with a key is the ONLY 100% way to know if a key is valid for premium audio). My intent is to validate a listen key (listen_key) and on 403 or 401 error, failover to a different URL. The on error is fine and I can handle that using normal on error listeners, but the issue is that I'm using XMLHttp - So when a key is VALID, the stream begins to buffer without limit, Since it is receiving a HTTP stream. I can't find a way to drop out at this point and do a callback saying 200 OK :) I don't want to have to set a timeout and failover if no errors within that time, as I want to be 100% certain that the error is Unauthorised. The unauthorised fallback will trigger a whole load of status variable changes for other things on the app. I need to get the response being 200 and drop out as soon as that is confirmed. Any other error (no data etc.) already falls back to a 3rd function which tries to reload the URL x number of times. The element i'm getting this 200 status from can also be grabbed by loading the URL in an audio tag and then destroying the element if that's the only way to do it. Just not sure how to go about it best. Your help is much appreciated :) Phil.
has title: Check for 200 Response of an XMLHTTP 'Stream' with Javascript
has comment: http://stackoverflow.com/comment/47070512

http://stackoverflow.com/comment/47154642
type: Comment
comment on: http://stackoverflow.com/q/29497604
score: 0
has text: node-webkit (well, now officially NW.js) has access to any node.js module. Therefore, Express might work. I'm not sure, but you could do something similar to this: http://expressjs.com/guide/routing.html
type: QuestionComment

http://stackoverflow.com/q/29517081
has answer: http://stackoverflow.com/a/29518065
has body: I am looking for a way to create a tooltip which changes its value based on the section the mouse is hovering over. For example: When mouseover "A", the tooltip displays "1". When mouseover "B", the tooltip displays "2". So far I have implemented a tooltip which appends a fixed string. But this will show the same string for all sections. I have used the following code: &lt;!DOCTYPE html&gt; &lt;meta charset="utf-8"&gt; &lt;head&gt; &lt;script type="text/javascript" src = "http://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;style&gt; body { font: 14px sans - serif; } .chord path { fill - opacity: .70; stroke: #000; stroke-width: .3px; } div.tooltip { position: absolute; text-align: center; width: 60px; height: 12px; padding: 8px; font: 10px sans-serif; background: #ddd; border: solid 1px #aaa; border - radius: 3px; pointer - events: none; } &lt;/style&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; d3.tsv('Intercompany.csv', function(err, data) { // Loading Intercompany.csv into matrix var matrix = [], companies = d3.keys(data[0]).slice(1); data.forEach(function(row) { var mrow = []; companies.forEach(function(c) { mrow.push(Number(row[c])); }); matrix.push(mrow); }); var chord = d3.layout.chord() .padding(0.05) .sortGroups(d3.descending) .sortSubgroups(d3.descending) .sortChords(d3.descending) .matrix(matrix); var width = 1000, height = 600, innerRadius = Math.min(width, height) * 0.35, outerRadius = innerRadius * 1.06; var fill = d3.scale.ordinal() .domain(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"]) .range(["#4D689F", "#81BC00", "#00A1DE", "#72C7E7", "#3C8A2E", "#BDD203", "#DDDDDD", "#BCBCBC", "#9A9A9A", "#575757", "#313131", "#002776"]); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height) .append("g") .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")"); var div = d3.select("body").append("div") .attr("class", "tooltip") .style("opacity", 1e-6); function mouseover() { div.…
has comment: http://stackoverflow.com/comment/47189798
tagged with: d3.js
has title: d3.js dynamic Tooltip for Chord diagram
has comment: http://stackoverflow.com/comment/47189714
type: UnansweredQuestion
type: Question
tagged with: tooltip
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/102881073
type: QuestionComment
has text: or just vuejs ;)
comment on: http://stackoverflow.com/q/29447073
score: 0
type: Comment

http://stackoverflow.com/q/29403584
has answer: http://stackoverflow.com/a/29403652
answer count: 3
has title: Jquery keyup() function not work properly
tagged with: jquery
type: UnansweredQuestion
has body: I'm a beggainer lavel in programming. What is the problem I can not find out. when I change the number. it's not working as I want. html: <?php echo $food ;?> <?php echo $price ;?> 50 X jQuery: $('#num').keyup(function(){ var price = parseInt($('#price').val()); var num = parseInt($('#num').val()); price = price * num; $('#total').html(price); });
tagged with: php
has answer: http://stackoverflow.com/a/29403637
has answer: http://stackoverflow.com/a/29403664
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46982554
score: 0

http://stackoverflow.com/comment/47092336
comment on: http://stackoverflow.com/q/29460197
score: 0
type: QuestionComment
type: Comment
has text: @adeneo And if you don't have any IE users... http://caniuse.com/#feat=eventsource

http://stackoverflow.com/a/29406421
has comment: http://stackoverflow.com/comment/46987647
score: 5
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46987609
accepted answer of: http://stackoverflow.com/q/29406371
answers question: http://stackoverflow.com/q/29406371
type: Answer
has comment: http://stackoverflow.com/comment/47010787
has comment: http://stackoverflow.com/comment/46987756
has comment: http://stackoverflow.com/comment/46987666
has comment: http://stackoverflow.com/comment/47010717
has comment: http://stackoverflow.com/comment/46987714
has comment: http://stackoverflow.com/comment/46987852
has body: You are ORing your conditions when you need to AND them. if(typeof elemData !== 'undefined' || typeof rich[elemData.value] !== 'undefined') { Should be: if(typeof elemData !== 'undefined' &amp;&amp; typeof rich[elemData.value] !== 'undefined') {
upvote count: 5

http://stackoverflow.com/comment/47050952
type: Comment
score: 0
has text: @markE. Good point. If the final intent is to export the sketch as a raster, then I would still edit it in vector (SVG), and in the end just slap the SVG image on the canvas and let the browser render it, as described at http://getcontext.net/read/svg-images-on-a-html5-canvas .
type: AnswerComment
comment on: http://stackoverflow.com/a/29440431

http://stackoverflow.com/q/29416639
type: Question
accepted answer: http://stackoverflow.com/a/29636700
has comment: http://stackoverflow.com/comment/47006162
has comment: http://stackoverflow.com/comment/47007268
score: -2
has comment: http://stackoverflow.com/comment/47007892
has comment: http://stackoverflow.com/comment/47008130
has comment: http://stackoverflow.com/comment/47005777
has comment: http://stackoverflow.com/comment/47025614
linked to: http://stackoverflow.com/q/18310394
downvote count: 2
has comment: http://stackoverflow.com/comment/47006199
has comment: http://stackoverflow.com/comment/47007152
has comment: http://stackoverflow.com/comment/47005827
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47006366
tagged with: ajax
has comment: http://stackoverflow.com/comment/47005578
tagged with: node.js
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/47005478
has title: How do i connect and do the ajax with get or post method?
linked to: http://stackoverflow.com/q/3102819
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/47007077
has body: I have this JQuery code but its not getting success always giving following: XMLHttpRequest cannot load http://localhost:8080/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8383' is therefore not allowed access. (17:21:10:896 | error, javascript) at win_1.html Error: undefined (17:21:10:902) at win_1.html:18 Debugging session with browser was closed. index.html: response here: fill me in nodejs-server.js: var http = require('http'); var util = require('util') http.createServer(function (req, res) { console.log('Request received: '); util.log(util.inspect(req)) // this line helps you inspect the request so you can see whether the data is in the url (GET) or the req body (POST) util.log('Request recieved: \nmethod: ' + req.method + '\nurl: ' + req.url) // this line logs just the method and url res.writeHead(200, { 'Content-Type': 'text/plain' }); req.on('data', function (chunk) { console.log('GOT DATA!'); }); res.end('callback(\'{\"msg\": \"OK\"}\')'); }).listen(8080); console.log('Server running on port 8080');
has answer: http://stackoverflow.com/a/29636700

http://stackoverflow.com/comment/46968780
has text: I asked you to update the question, not post it in a comment.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29395293

http://stackoverflow.com/a/29446360
has comment: http://stackoverflow.com/comment/47061163
has comment: http://stackoverflow.com/comment/47059792
upvote count: 2
has comment: http://stackoverflow.com/comment/47061518
score: 2
accepted answer of: http://stackoverflow.com/q/29446200
answers question: http://stackoverflow.com/q/29446200
has comment: http://stackoverflow.com/comment/47062825
has body: I would take a modular approach. Create a function that calls editable with default properties, which are extended with properties specific to each element. Something like this: function setup(obj, options) { var defaults= { type: 'text', placement: 'right', params: { controller:'detail', cid:ayb.component.id, CSRF:ayb.CSRF }, url: 'index.php', pk: function(){return $('#id').val();}, validate: function(value) { if($.trim(value) == '') { return 'This field is required'; } } } obj.editable($.extend(true, defaults, options)); } //setup setup($('#phone'), { title: 'Phone Number', inputclass: 'phone', params: { task: 'savePhone' } } ); setup($('#fax'), { title: 'Fax Number', inputclass: 'phone', params: { task: 'saveFax' } } ); To avoid using a named function, do it like this: var defaults= { type: 'text', placement: 'right', params: { controller:'detail', cid:ayb.component.id, CSRF:ayb.CSRF }, url: 'index.php', pk: function(){return $('#id').val();}, validate: function(value) { if($.trim(value) == '') { return 'This field is required'; } } } $('#phone').editable($.extend(true, {}, defaults, { title: 'Phone Number', inputclass: 'phone', params: { task: 'savePhone' } })); $('#fax').editable($.extend(true, {}, defaults, { title: 'Fax Number', inputclass: 'phone', params: { task: 'saveFax' } }));
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47059626
has comment: http://stackoverflow.com/comment/47063683
type: Answer
has comment: http://stackoverflow.com/comment/47062784

http://stackoverflow.com/comment/47034620
type: QuestionComment
has text: No, no, just [edit] it into your question please
type: Comment
comment on: http://stackoverflow.com/q/29414582
score: 0

http://stackoverflow.com/comment/47287695
type: Comment
comment on: http://stackoverflow.com/a/29568824
type: AnswerComment
has text: The hierarchy is as follows main-lib / (main.js | api.js | message.js) Should I just have `import api` then ?
score: 0

http://stackoverflow.com/a/54227843
type: Answer
has body: The scrollTop approach did not work for my use case. This is what worked: browser.execute(function() { document.querySelector('#hierarchy_p').scrollIntoView(); }); This is using webdriver.io v4.14.0 testing in Chrome.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29385175
upvote count: 1

http://stackoverflow.com/comment/47213844
comment on: http://stackoverflow.com/a/29529690
type: AnswerComment
type: Comment
has text: WOW! The fiddle works great! However, when I put it into my code, it STILL shows up blank! UGH!! I'll have to hack on it outside this thread but *massive* thanks to you for such a speedy/thorough solution!
score: 0

http://stackoverflow.com/a/29484394
has body: I cannot reply the issue, I have Firefox 37.0, Firefox Dev Edition 39.0a2 (2015-04-06) and Google 44.0.2358.0 canary (64-bit) and It works similar (With Desktop and Responsive tools). My suggest, read and learn in the MDN and Jquery. https://developer.mozilla.org/en-US/ https://api.jquery.com/scrollTop/
score: 0
has comment: http://stackoverflow.com/comment/47196911
type: Answer
has comment: http://stackoverflow.com/comment/47168068
answers question: http://stackoverflow.com/q/29452205
has comment: http://stackoverflow.com/comment/47157873

http://stackoverflow.com/a/38582257
has comment: http://stackoverflow.com/comment/76839273
answers question: http://stackoverflow.com/q/29487133
downvote count: 3
has comment: http://stackoverflow.com/comment/79327164
has body: No, Facebook doesn’t support it. Yes, JavaScript supports it. If the fbq call fails for some reason it will not return undefined, so simply verify a smooth execution. function callback() { console.log('fn:callback'); } if ( typeof fbq('track', 'AddToCart', { content_name: 'Really Fast Running Shoes', content_category: 'Apparel &amp; Accessories &gt; Shoes', content_ids: ['1234'], content_type: 'product', value: 4.99, currency: 'USD' } ) === 'undefined') callback();
has comment: http://stackoverflow.com/comment/79350500
score: 0
type: Answer
upvote count: 3

http://stackoverflow.com/comment/47122426
type: AnswerComment
score: 0
has text: I've updated the code above in my answer with how you want it to work. I've also updated the JS Fiddle.
type: Comment
comment on: http://stackoverflow.com/a/29464236

http://stackoverflow.com/comment/47136283
has text: Yes, you can. http://www.jssor.com/demos-jquery/thumbnail-navigator-with-arrows.source.html
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29413848
type: Comment

http://stackoverflow.com/comment/47196083
comment on: http://stackoverflow.com/a/29519337
has text: No matter what I change, it still doesn't seem to do what I need it to do.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29429865
score: 0
has comment: http://stackoverflow.com/comment/47034569
has comment: http://stackoverflow.com/comment/47094857
has comment: http://stackoverflow.com/comment/47031694
has comment: http://stackoverflow.com/comment/47094848
has comment: http://stackoverflow.com/comment/47031029
has body: Try to add header() function to specify response manually
type: Answer
has comment: http://stackoverflow.com/comment/47094942
has comment: http://stackoverflow.com/comment/47094846
has comment: http://stackoverflow.com/comment/47033298
answers question: http://stackoverflow.com/q/29429142
has comment: http://stackoverflow.com/comment/47034769
has comment: http://stackoverflow.com/comment/47094804
has comment: http://stackoverflow.com/comment/47032269
has comment: http://stackoverflow.com/comment/47032842

http://stackoverflow.com/comment/47204522
has text: Unfortunately, this did not disable the radio button.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29524969

http://stackoverflow.com/comment/47105663
type: QuestionComment
has text: There is no JS error ?
comment on: http://stackoverflow.com/q/29472203
score: 0
type: Comment

http://stackoverflow.com/comment/47052138
type: Comment
comment on: http://stackoverflow.com/a/29441900
score: 0
type: AnswerComment
has text: Thanks, this was simple to integrate

http://stackoverflow.com/comment/47031133
comment on: http://stackoverflow.com/q/29430788
score: 0
type: Comment
type: QuestionComment
has text: `this` is not referring to `document.getElementById('js-currentPage')`

http://stackoverflow.com/a/29382325
has comment: http://stackoverflow.com/comment/46943906
score: 3
upvote count: 3
downvote count: 0
has body: In your case, since the value of the input element and the the sufix of the div are the same, so you could just use that to add the li $('input').change(function () { var value = this.value; if ($.inArray(value, ['1', '2', '3']) &gt; -1) { $('&lt;li /&gt;', { text: value }).appendTo('#d' + value + ' ul') } }) Demo: Fiddle Also note that you are adding the li to a ul element not it a div
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29382244
answers question: http://stackoverflow.com/q/29382244
type: Answer

http://stackoverflow.com/q/29455528
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29455564
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29455562
has comment: http://stackoverflow.com/comment/47075959
type: Question
has answer: http://stackoverflow.com/a/67613599
has body: I've been running into a weird problem repeatedly in JavaScript now. I can't seem to delay setInterval longer. A small example of what happens: var loop; var count; loop = setInterval(start, 30); function start() { //Some code delay(); //Some more code } function delay() { setTimeout(function () { count++; //Animation code if (count &lt;= 1000) delay(); }, 100); } Now what I want to do is, execute 'some code' part, do nothing while the 'animation code' executes, and then execute 'some more code' part. What is happening is that the 'some more code' part and the delay function is getting executed simultaneously. I have tried clearInterval(loop) before calling the delay function and restarting it after the delay function completes it's execution, but the 'some more code' seems to get executed once anyways. How can I get around this problem? Please give a detailed explanation with an example.
upvote count: 5
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/29455628
tagged with: canvas
has answer: http://stackoverflow.com/a/29460839
has answer: http://stackoverflow.com/a/29455562
downvote count: 0
tagged with: delay
tagged with: setinterval
favorite count: 0
has answer: http://stackoverflow.com/a/29455564
has comment: http://stackoverflow.com/comment/47075885
has title: How to delay setInterval in Javascript?
has answer: http://stackoverflow.com/a/29455604
score: 5

http://stackoverflow.com/a/32626557
answers question: http://stackoverflow.com/q/29529772
score: 0
has body: Using a data-hook attribute instead of an id or class attribute I have been able to solve this issue. So, in your template change replace div(id="mapholder") with div(data-hook="mapholder"). Furthermore, use the following select statement: d3.select(this.queryByHook("#mapholder")) Summing up: Template div(data-hook="mapholder") Code d3.select(this.queryByHook("#mapholder"))`
type: Answer

http://stackoverflow.com/comment/47070680
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29452481
has text: Any js errors in console? Did you use a DOM ready event? Reference to `$body`? `index` is a global? Empty selector perhaps => html?

http://stackoverflow.com/a/29441382
answers question: http://stackoverflow.com/q/29441173
has comment: http://stackoverflow.com/comment/60498525
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29441173
type: Answer
has body: var foo = { alpha: true, beta: false, gamma: true }; var t1 = _.keys(_.pick(foo, _.identity)); console.log(t1); var t2 = _(foo).pick(_.identity).keys().value(); console.log(t2); Edit: As noted by @backdesk, _.pick no longer works for lodash 4 because _.pickBy was split out. var foo = { alpha: true, beta: false, gamma: true }; var t1 = _.keys(_.pickBy(foo, _.identity)); console.log(t1); var t2 = _(foo).pickBy(_.identity).keys().value(); console.log(t2); // _.pickBy defaults to _.identity var t3 = _.keys(_.pickBy(foo)); console.log(t3); var t4 = _(foo).pickBy().keys().value(); console.log(t4);
score: 23
upvote count: 23
has comment: http://stackoverflow.com/comment/60330045

http://stackoverflow.com/comment/47075864
score: 0
type: AnswerComment
type: Comment
has text: @James123 Is there no model defined by the partial (_EditPhoneNBR)? Like `@model Model.MemberPhone`
comment on: http://stackoverflow.com/a/29455295

http://stackoverflow.com/comment/65570907
comment on: http://stackoverflow.com/a/29478932
type: Comment
score: 2
has text: If you are using Chai expectations, it has a `.eventually` method to resolve a promise and get the value from inside it. `expect(page.clientRowName.getText()).to.eventually.equal("ABC")`
type: AnswerComment

http://stackoverflow.com/q/29493496
possible better answer: http://stackoverflow.com/a/29571563
accepted answer: http://stackoverflow.com/a/29691624
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29585244
has comment: http://stackoverflow.com/comment/47524381
type: Question
tagged with: tinymce-4
score: 12
has comment: http://stackoverflow.com/comment/47284785
has comment: http://stackoverflow.com/comment/47286595
has comment: http://stackoverflow.com/comment/47631749
upvote count: 12
has answer: http://stackoverflow.com/a/29699419
tagged with: firefox
has comment: http://stackoverflow.com/comment/47285199
has answer: http://stackoverflow.com/a/29688236
downvote count: 0
has body: This is an issue on Firefox and IE so far that I've tested; the problem does not exist on Chrome. I'm including two TinyMCE editors on a page with one partially off-screen to start. When I select the color picker dropdown option from the toolbar on the first TinyMCE instance, the dropdown appears where it should. But if I scroll down and select the color picker dropdown in the second instance, that dropdown appears way below the editor and typically off the page. You can see this in action here: http://jsfiddle.net/nm6wtca3/ Without removing the html, body CSS, what can I do to have the color picker always appear in the correct position? I've traced the problem down to setting CSS on the html, body elements. html, body { width: 100%; height: 100%; overflow-x: hidden; } The dropdown div has CSS applied to it that is auto-calculated by TinyMCE. It looks something like this: z-index: 65535; left: 641.467px; top: 633px; width: 162px; height: 105px; How it appears in FF (sometimes way worse): How it appears in Chrome (how it should look):
tagged with: javascript
tagged with: tinymce
has answer: http://stackoverflow.com/a/29691624
has comment: http://stackoverflow.com/comment/47524661
tagged with: css
has answer: http://stackoverflow.com/a/29571563
favorite count: 0
has title: TinyMCE color picker dropdown appears off-screen
answer count: 5
has comment: http://stackoverflow.com/comment/47284996

http://stackoverflow.com/q/29509272
has comment: http://stackoverflow.com/comment/47174857
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: Is it possible to replace an image with another one selected by the user on the fly via jQuery alone?
has answer: http://stackoverflow.com/a/29509357
score: 0
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has body: I'm having the user select an image and I want to change the one shown on the fly without having to rely on server-side scripts like PHP? Basically, I have an HTML that has something like the following: &lt;input type="file" id="file" name="file" /&gt; &lt;img id="imagedisplay" src="http://path/to/some/image.jpg" /&gt; Then on the jQuery side I have the following: $('#file').change(function(e){ alert($(this).val()); }); I was hoping to replace the imagedisplay's src with the one the user selects referenced locally to their system but $(this).val() only displays the file name so I won't be able to reference it as the source.
answer count: 1

http://stackoverflow.com/comment/47188750
score: 0
comment on: http://stackoverflow.com/q/29380266
has text: Thanks Mia, I used your idea with jQuery `matchMedia` and it works like that. Best.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29490581
tagged with: javascript
linked to: http://stackoverflow.com/q/29799687
favorite count: 0
has comment: http://stackoverflow.com/comment/47140322
answer count: 3
score: 48
has answer: http://stackoverflow.com/a/29490883
has answer: http://stackoverflow.com/a/29490703
upvote count: 48
has comment: http://stackoverflow.com/comment/47140392
possible better answer: http://stackoverflow.com/a/29490703
has title: React - State not updated
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29490883
has body: Here I try to set state.autocomplete to 'hello' and then print it, but state seems to be null. How can that be when I just updated the state using setState? data is set as a global variable. var data = { populate_at: ['web_start', 'web_end'], autocomplete_from: ['customer_name', 'customer_address'] }; var AutocompleteFromCheckboxes = React.createClass({ handleChange: function(e) { this.setState( { autocomplete_from: 'event.target.value' } ); console.log('autocompleteFrom state: ', this.state.autocomplete_from); // ^ =&gt; Uncaught TypeError: Cannot read property 'autocomplete_from' of null return 1; }, render: function() { var autocompleteFrom = this.props.autocomplete_from.map(function(value) { return ( &lt;label for={value}&gt; &lt;input type="checkbox" name={value} value="{value}" onChange={this.handleChange.bind(this)} ref="autocomplete-from"/&gt; {value} &lt;/label&gt; ); }, this); return ( &lt;div className="autocomplete-from"&gt; {autocompleteFrom} &lt;/div&gt; ); } }); var DynamicForm = React.createClass({ getInitialState: function() { return { name : null, populate_at : null, same_as : null, autocomplete_from : "not set", title : null }; }, saveAndContinue: function(e) { e.preventDefault(); var data = { name : this.refs.name.getDOMNode().value, }; console.log('data: ' + data.name); }, render: function() { return ( &lt;AutocompleteFromCheckboxes autocomplete_from={this.props.data.autocomplete_from} /&gt; ); } }); var mountpoint = document.getElementById('dynamic-form'); if ( mountpoint ) { React.render(&lt;DynamicForm data={data} /&gt;, mountpoint); } });
type: Question
tagged with: reactjs
has answer: http://stackoverflow.com/a/52881877
downvote count: 0

http://stackoverflow.com/comment/47136995
score: 0
comment on: http://stackoverflow.com/q/29487008
type: Comment
type: QuestionComment
has text: No,I needed jquery transition, not css3

google-chrome-extension
tags question: http://stackoverflow.com/q/29440835
tags question: http://stackoverflow.com/q/29487816
tags question: http://stackoverflow.com/q/29470282
tags question: http://stackoverflow.com/q/29459397
tags question: http://stackoverflow.com/q/29458111
tags question: http://stackoverflow.com/q/29524068
tags question: http://stackoverflow.com/q/29503441
tags question: http://stackoverflow.com/q/29466639
tags question: http://stackoverflow.com/q/29424495
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/29462932
tags question: http://stackoverflow.com/q/29399293
tags question: http://stackoverflow.com/q/29429550
tags question: http://stackoverflow.com/q/29433744
tags question: http://stackoverflow.com/q/29407601
type: Tag
tags question: http://stackoverflow.com/q/29412317
tags question: http://stackoverflow.com/q/29473605
tags question: http://stackoverflow.com/q/29492296
tags question: http://stackoverflow.com/q/29375223
tags question: http://stackoverflow.com/q/29416290
tags question: http://stackoverflow.com/q/29452548
tags question: http://stackoverflow.com/q/29454860
tags question: http://stackoverflow.com/q/29477655
tags question: http://stackoverflow.com/q/29377234
tags question: http://stackoverflow.com/q/29441055
tags question: http://stackoverflow.com/q/29387979
tags question: http://stackoverflow.com/q/29454005
tags question: http://stackoverflow.com/q/29482489
tags question: http://stackoverflow.com/q/29452336
tags question: http://stackoverflow.com/q/29452245
tags question: http://stackoverflow.com/q/29393189

http://stackoverflow.com/comment/47075551
comment on: http://stackoverflow.com/q/29455197
type: Comment
has text: @Touffy - thanks - did not know that. changed into `then()`
score: 0
type: QuestionComment

http://stackoverflow.com/a/29399277
has body: In 4.x+, overrides have a different syntax. Ext.define("App.overrides.form.ComboBox",{ override: 'Ext.form.ComboBox', getValue: function () { return Ext.util.Format.htmlDecode(this.value); } });
type: Answer
answers question: http://stackoverflow.com/q/29383619
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/47207674
type: Comment
comment on: http://stackoverflow.com/a/29525316
has text: Also, the reason I recommended the fixed length mime type field is so that you don't have to send another message signaling the length of that field in the array. You could also use some sort of signal character to specify that the mime type message has ended. <CRLF> a.k.a. new line is a common one.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29513030
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/47182298
has title: AJAX with .change() not working?
has comment: http://stackoverflow.com/comment/47181935
has answer: http://stackoverflow.com/a/29532994
has comment: http://stackoverflow.com/comment/47182428
has comment: http://stackoverflow.com/comment/47182377
has comment: http://stackoverflow.com/comment/47182011
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47182217
has comment: http://stackoverflow.com/comment/47184192
has comment: http://stackoverflow.com/comment/47182131
accepted answer: http://stackoverflow.com/a/29532994
has body: I have 2 drop down menus. One of them shows the provinces in the country, and when one of the provinces selected, the second one should show the districts of the selected province. The code below works properly and the drop down shows the provinces: $(document).ready(function () { $.ajax({ url: "http://blabla.com/dev/provinces" }).then(function (data) { var data = JSON.parse(data)["response"]; var dropdown = $("#province"); data.forEach(function (province) { dropdown.append(" " + province["p_name"] + " ") }); }) }); However other drop down does not show the districts of the selected province by using the code below: $("#province").change(function () { $.ajax({ url: "http://blabla.com/districts?province=["+ $(this).val()+"]" }).then(function (data) { var data = JSON.parse(data)["response"]; var dropdown = $("#district"); data.forEach(function (district) { dropdown.append(" " + district["d_name"] + " ") }); }) }); Second code give the following error on console: "Uncaught SyntaxError: Unexpected token A" What is the problem with the second one? Thanks. EDIT: HTML of the drop down menus' are like these: Province District
has comment: http://stackoverflow.com/comment/47182076
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/47182844
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29473519
tagged with: modal-dialog
has title: jQuery call modal from PHP script
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29473666
has answer: http://stackoverflow.com/a/29473666
accepted answer: http://stackoverflow.com/a/29473771
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47108506
has comment: http://stackoverflow.com/comment/47108336
has body: I am creating a login script that checks if the user exists in the table. In the event that the user doesn't exist, I want to use jquery to open a modal window letting the user know there was an error. &lt;?php include("../include/database.php"); if(isset($_GET['loginSubmit'])) // form submit button { // form username and password values $username = strip_tags(mysqli_real_escape_string($dbc, trim($_GET['username']))); $password = strip_tags(mysqli_real_escape_string($dbc, trim(md5($_GET['password'])))); // set query $select = "SELECT username, fullname, userlevel, `password` FROM users WHERE username = '".$username."'"; // run query $query = mysqli_query($dbc, $select); // get the results $row = mysqli_fetch_array($query); // set the results to variables to be used in sessions $dbusername = htmlentities(stripslashes($row['username'])); $dbfullname = htmlentities(stripslashes($row['fullname'])); $dbuserlevel = htmlentities(stripslashes($row['userlevel'])); $dbpassword = htmlentities(stripslashes($row['password'])); // check if the database password matches the user password if($dbpassword == $password) { // if yes, set the sessions and direct to main page $_SESSION['username'] = $username; $_SESSION['fullname'] = $dbfullname; $_SESSION['userlevel'] = $dbuserlevel; header("Location:main.html"); } else { // if no match, this is where I want the javascript to show the modal echo ("&lt;script language='javascript'&gt; $('#errLoginModal').modal('show'); // this is jquery and I know it's incorrect window.location.href='index.php' &lt;/script&gt;"); } ?&gt; I am still trying to get better with JavaScript, jQuery, and PHP. With Stack Overflow, I have been getter getting better. I want the PHP script to use JavaScript/jQuery to fire a modal window when the username/password check fails. I am not even sure if this is the best method. I know the code above is incorrect. I mean it doesn't show the modal window for one. On the other hand, I can add an alert, and it fires the aler…
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29473771
score: 0
answer count: 2

http://stackoverflow.com/comment/47126930
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29460824
has text: If your application only contains the code that you showed in your first post, the issue could be that you haven't installed the node package of ng-route. Did you use yeoman to generate the project? In order to help you i need you to update a plnkr. I recommend you to use [ui-router](https://github.com/angular-ui/ui-router) instead of ngRoute [here is an simple example using ui-router](http://plnkr.co/edit/JVB5Jg?p=info)

http://stackoverflow.com/q/29428746
has answer: http://stackoverflow.com/a/29428778
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29428778
has title: Add delay of 5 seconds in JavaScript code befor clicking next button
has body: I am executing this JavaScript which is kind of self explanatory (I think). There are around 100 buttons on a page with class button and I want them to click one by one. It's working fine. But I want to add a delay of 5 seconds before this clicks next button. var mybtn = document.getElementsByClassName('.button'); for( var i=0; i&lt;100; i++ ) { mybtn[i].click(); }
answer count: 4
type: AnsweredQuestion
score: 2
upvote count: 2
possible better answer: http://stackoverflow.com/a/29428792
has answer: http://stackoverflow.com/a/29428792
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/29428791
has answer: http://stackoverflow.com/a/29429557
tagged with: javascript
tagged with: click

http://stackoverflow.com/a/29442438
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29442324
has comment: http://stackoverflow.com/comment/47052891
answers question: http://stackoverflow.com/q/29442324
has comment: http://stackoverflow.com/comment/47052848
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47054346
has body: Your replace regexp could be /^\$\{\s*|\s*}$/g In English, this says "remove both ${... at the beginning, or ...} at the end. It could be slightly easier to just grab all the strings, and transform them all at once, then filter out duplicates: function enumVars(txt) { return txt // Find all matches of form ${var} . match(/\$\{\s*[a-z$_][a-z0-9$_]*\s*}/gi) // Strip off ${ and }, yielding just variable name . map(function(v) { return v.replace( /^\$\{\s*|\s*}$/g, ''); }) // Filter out duplicates . filter(function(v, i, a) { return a.indexOf(v) === i; }); }
type: Answer
has comment: http://stackoverflow.com/comment/47053468

http://stackoverflow.com/q/29435752
type: Question
possible better answer: http://stackoverflow.com/a/29694371
has comment: http://stackoverflow.com/comment/47041136
has title: jQuery form, exist checking
tagged with: javascript
tagged with: jquery
answer count: 2
has comment: http://stackoverflow.com/comment/47041463
has body: So i am creating a simple form that checks whether or not the value that the user is inputting exists or not in my DB using jQuery. Everything up until now is working so far however i find myself stuck at this next part. To easily explain i will just show an example of what i am trying to achieve. For this example i will be "weeden" weeden has an ID of 255 in the company table of my database. If the user types in "weeden" into the client field To the right of the client field (on the web form), the text "weeden is unavailable" will appear what i would like to have happen instead is this: "ID 255 is unavailable" Here is the relevant code. HTML FORM Client: jQuery Function $.fn.existsChecker = function(){ return this.each(function(){ var interval; $(this).on('keyup', function(){ var self = $(this), selfType = self.data('type'), selfValue, feedback = $('.check-exists-feedback[data-type=' + selfType + ']'); if(interval === undefined){ interval = setInterval(function(){ if(selfValue !== self.val()){ selfValue = self.val(); if(selfValue.length >= 1){ $.ajax({ url: 'check.php', type: 'get', dataType: 'json', data: { type: selfType, value: selfValue }, success: function(data){ if(data.exists !== undefined){ if (data.exists === true){ feedback.text(selfValue + ' is already taken.'); }else { feedback.text(selfValue + ' is available'); } } }, error: function(){ } }); } } }, 1000); } }); }); }; Check.php $db= new PDO('mysql:host=host;dbname=mydb', 'user', 'pass'); if(isset($_GET['type'], $_GET['value'])){ $type = strtolower(trim($_GET['type'])); $value= trim($_GET['value']); $output = array('exists' => false); if(in_array($type, array('client') ) ){ switch($type){ case 'client': $check = $db->prepare(" SELECT COUNT(*) AS count FROM company WHERE name = :value "); break; $check->execute(array('value'=> $value)); $output['exists'] = $check->fetchObject()->count ? true: false; echo json_encode($output); Any help/suggestions would be greatly appreciated. I consider myself a beginne…
downvote count: 0
has comment: http://stackoverflow.com/comment/47040857
favorite count: 0
has answer: http://stackoverflow.com/a/29694371
upvote count: 2
tagged with: php
has answer: http://stackoverflow.com/a/29669667
accepted answer: http://stackoverflow.com/a/29669667
has comment: http://stackoverflow.com/comment/47041290
score: 2
type: AnsweredQuestion
tagged with: mysql
tagged with: forms

http://stackoverflow.com/comment/47171599
type: Comment
has text: No it doesn't, since URLs don't allow the URI Template placeholders (like curly braces)
type: QuestionComment
comment on: http://stackoverflow.com/q/29494608
score: 0

http://stackoverflow.com/q/29424289
has answer: http://stackoverflow.com/a/29424350
tagged with: css
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/47019921
type: Question
accepted answer: http://stackoverflow.com/a/29424350
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Keep custom css within a scope in angular
favorite count: 0
has body: I have a bit of a weird problem. I am creating a website with angular that displays pre-rendered html reports. I am using ng-include to display the html report. The problem is, the html report has it's own CSS style within the page and it is overwriting the CSS for the main website. I was wondering if there is any way to contain the CSS within the report scope or div? I need the custom CSS for the report scope too, deleting it is not an option. Thank you!
tagged with: angularjs
upvote count: 2

http://stackoverflow.com/a/29411846
accepted answer of: http://stackoverflow.com/q/29411717
type: Answer
score: 1
upvote count: 1
has body: Change document.body to element you want to click on. http://fiddle.jshell.net/rvepks5q/3/ You can also close opened popup if you open another one. http://fiddle.jshell.net/rvepks5q/5/
answers question: http://stackoverflow.com/q/29411717
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29375228
has answer: http://stackoverflow.com/a/29375300
has body: i'm trying to use this: https://github.com/derekmartinez18/Simple-Ajax-Spotify-Now-Playing and i have this very simple function that shows what i've listened to on spotify: function get_spotify() { $.ajax({ type: 'POST', url: 'spotify.php', data: { request: 'true' }, success: function(reply) { $('.now-playing').html("&lt;p&gt;" + reply + "&lt;/p&gt;"); } }); }; the problem is it's not triggering. but if i'm in the console and i type get_spotify() it does work and the result shows on the page. this piece of js is called in a .js file before the closing of the body tag like this: &lt;script type="text/javascript"&gt; function downloadJSAtOnload() { var element = document.createElement("script"); element.src = "js/build/production.min.js"; document.body.appendChild(element); } if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload", downloadJSAtOnload); else window.onload = downloadJSAtOnload; &lt;/script&gt; I tried adding this right after the function in the js file but nothing happens, i tried also a closure function or wrapped in a document ready function, but it just won't trigger. I can't get what the problem is :/ could you help?
has comment: http://stackoverflow.com/comment/46930953
has answer: http://stackoverflow.com/a/29376407
has comment: http://stackoverflow.com/comment/46931932
has comment: http://stackoverflow.com/comment/46931765
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46932314
has comment: http://stackoverflow.com/comment/46931995
has comment: http://stackoverflow.com/comment/46932804
has comment: http://stackoverflow.com/comment/46931204
has answer: http://stackoverflow.com/a/29375342
has answer: http://stackoverflow.com/a/29375358
has comment: http://stackoverflow.com/comment/46931182
type: Question
possible better answer: http://stackoverflow.com/a/29375300
has comment: http://stackoverflow.com/comment/46933278
has comment: http://stackoverflow.com/comment/46933451
has comment: http://stackoverflow.com/comment/46932384
score: 0
has comment: http://stackoverflow.com/comment/46930964
has comment: http://stackoverflow.com/comment/46932060
has comment: http://stackoverflow.com/comment/46931844
accepted answer: http://stackoverflow.com/a/29376407
has title: ajax function not triggering on page load
has comment: http://stackoverflow.com/comment/46933428
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46931873
has comment: http://stackoverflow.com/comment/46931046
has comment: http://stackoverflow.com/comment/46931385
has comment: http://stackoverflow.com/comment/46932017
tagged with: ajax
has comment: http://stackoverflow.com/comment/46931341

http://stackoverflow.com/comment/46957697
has text: javascript session and php session is both different things . you can not get local storeage value using PHP
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29390206
score: 0

http://stackoverflow.com/comment/47085622
type: AnswerComment
score: 0
type: Comment
has text: My mistake, I accidentally removed part of the answer on my last edit. I've fixed it now. However, this code will only work if you have a web server configured to serve the currentValueFile.txt file. If you don't have this set up, most browsers will block the xmlhttprequest. See this answer for more details: http://stackoverflow.com/questions/10752055/cross-origin-requests-are-only-supported-for-http-error-when-loading-a-local
comment on: http://stackoverflow.com/a/29452194

http://stackoverflow.com/a/29504631
has comment: http://stackoverflow.com/comment/47229779
has body: Update 6 error: The 2nd and 3rd brackets must be removed. this.submitOK = function(){ window.top.location.href = redirect; } } } Update 6 Delete if( redirect == '' ){ showThankYouMessage(); return; }; try{ if( parent ) {alert('parent');parent.location.href = redirect;} }catch(e){ alert('frame'); location.href = redirect; }; And replace with this one line: window.top.location.href = redirect;. this.submitOK = function(){ window.top.location.href = redirect; } Update 5 Remove previous alert and add two others a little further down, parent and frame. this.submitOK = function(){ if( redirect == '' ){ showThankYouMessage(); return; }; try{ if( parent ) {alert('parent');parent.location.href = redirect;} }catch(e){ alert('frame'); location.href = redirect; }; } Update 4 At form.lib.php line 2484 (may be different due to previous edits) Add the line alert('OK'); Then when the form is submitted, a message box 'OK' should pop up. this.submitOK = function(){ alert('OK'); if( redirect == '' ){ showThankYouMessage(); return; }; try{ if( parent ) parent.location.href = redirect; }catch(e){ location.href = redirect; }; } end of update 4 Update 3 In form.lib.php on Line 11 define( 'PHPFMG_REDIRECT', '' ); Must be: define( 'PHPFMG_REDIRECT', 'http://propertytaxdfw.com/thank-you-sign-up.html' ); end of update 3 Update 2 If you can find where this code is added. function PHPFMG( formID ){ var frmID = formID; var exts = { 'upload_control' : '', 'harmful_exts' : '.php, .html, .css, .js, .exe, .com, .bat, .vb, .vbs, scr, .inf, .reg, .lnk, .pif, .ade, .adp, .app, .bas, .chm, .cmd, .cpl, .crt, .csh, .fxp, .hlp, .hta, .ins, .isp, .jse, .ksh, .Lnk, .mda, .mdb, .mde, .mdt, .mdw, .mdz, .msc, .msi, .msp, .mst, .ops, .pcd, .prf, .prg, .pst, .scf, .scr, .sct, .shb, .shs, .url, .vbe, .wsc, .wsf, .wsh', 'harmful_errmsg': "File is potential harmful. Upload is not allowed.", 'allow_exts' : '.jpg, .gif, .png, .bmp', 'allow_errmsg': "Upload is not allowed. Please check your file type." }; var redirect …
answers question: http://stackoverflow.com/q/29504353
accepted answer of: http://stackoverflow.com/q/29504353
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/61466355
score: 0
type: Comment
has text: Shouldn't using https://github.com/webpack/karma-webpack with babel and having its configuration section in karma.conf.js as well as the `proprocessor: { './tests/**/*.js', : [ 'webpack' ] }` be enough? Why would I **also** have to add the polyfill manually, when webpack adds it in normal circumstances?
comment on: http://stackoverflow.com/a/31166888
type: AnswerComment

http://stackoverflow.com/comment/47012613
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29418878
has text: Yes, you do :) I would suggest first read up on directives from angularjs page. Then try and let me know what is not working.

gmail
type: Tag
tags question: http://stackoverflow.com/q/29504079
tag name: gmail

http://stackoverflow.com/a/29423346
answers question: http://stackoverflow.com/q/29423313
has body: Use string.toLowerCase() "HELLOOOooo".toLowerCase(); // hellooooo
score: 0
type: Answer

http://stackoverflow.com/q/29526278
has comment: http://stackoverflow.com/comment/47207094
upvote count: 1
possible better answer: http://stackoverflow.com/a/29526309
tagged with: php
downvote count: 1
has answer: http://stackoverflow.com/a/29526309
has comment: http://stackoverflow.com/comment/47207083
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29526592
tagged with: cookies
has comment: http://stackoverflow.com/comment/47207025
tagged with: caching
has title: Javascript - Issue with caching and cookies
type: Question
answer count: 2
has body: I am getting quite a frustrating issue with JavaScript and Cookies on cached pages. I got the following JS code: function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i&lt;ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) == 0) return c.substring(name.length,c.length); } return ""; } if (!getCookie("lang") == "{{Lang}}"){ document.reload(); } {{Lang}} is replaced with the very same cookie on the backend with PHP. $template = str_replace("{{Lang}}", $lang, $template); But that is not really relevant since that part works as intended. The issue is that when the user visits a cached page. The JS previously mentioned becomes function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i&lt;ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) == 0) return c.substring(name.length,c.length); } return ""; } if (!getCookie("lang") == "FR"){ document.reload(); } The issue is that the page does not refresh even though the Chrome Dev tools quite clearly say that the cookie lang is set to "EN", not "FR". Is there a method around this caching issue?
tagged with: javascript
has comment: http://stackoverflow.com/comment/47207135
has comment: http://stackoverflow.com/comment/47207144
favorite count: 0
accepted answer: http://stackoverflow.com/a/29526592
score: 0
has comment: http://stackoverflow.com/comment/47207214
has comment: http://stackoverflow.com/comment/47207220

http://stackoverflow.com/a/29424446
answers question: http://stackoverflow.com/q/29424407
has comment: http://stackoverflow.com/comment/47020607
has comment: http://stackoverflow.com/comment/47020214
downvote count: 0
type: Answer
has body: You can specify a css to use for print. Please take a look at media queries http://www.w3schools.com/CSS/css_mediatypes.asp
has comment: http://stackoverflow.com/comment/47020242
has comment: http://stackoverflow.com/comment/47020462
score: 2
upvote count: 2

http://stackoverflow.com/a/29529601
has comment: http://stackoverflow.com/comment/47213895
type: Answer
downvote count: 0
has body: The comments you have declared is an Object. Just change your declaration to an array , From: $scope.comments = {}; To: $scope.comments = []; EDIT: If you need to Push new Object, You need to make your Comments as Array of Object like this and push the new Object $scope.comments = { 1: {name:'',review:'',comment:'',uptime:'',gravatar:''} } $scope.comments.push({name:'rukshi', review:'test comment',comment:'yet another comment',uptime:'',gravatar:''});
accepted answer of: http://stackoverflow.com/q/29529574
has comment: http://stackoverflow.com/comment/47213152
answers question: http://stackoverflow.com/q/29529574
score: 10
upvote count: 10
type: AcceptedAnswer

http://stackoverflow.com/q/29510080
tagged with: datetime
has body: I'm looking for way to display/format date given in ISO format (with timezone). From API i got encoded date: "2015-04-17T06:00:00.000-05:00" and i want to display it in human readable format. When i use {{"2015-04-17T06:00:00.000-05:00" date: 'hh:mm'}} i got time converted to local timezone. I need only format it. A searched Internet, but only found only huge libs like moments.js or others. There did not found working answer here also... If there is no angularjs solution i can use pure javascript, but not found that one either. Thanks
type: UnansweredQuestion
has title: Angularjs display given ISO formatted date
tagged with: javascript
has answer: http://stackoverflow.com/a/29510469
tagged with: date
type: Question
score: 0
answer count: 1
tagged with: angularjs

http://stackoverflow.com/comment/46946046
score: 0
type: Comment
has text: This almost worked, I updated my code above to add the class i have in each (Didnt know this would cause a issue). when i use the itemSelector you stated, it grabs the next li but doesnt add the class that goes with the li
comment on: http://stackoverflow.com/a/29383601
type: AnswerComment

http://stackoverflow.com/comment/47179859
has text: for your requirement go with Accordion, and style your accordion tabs accordingly.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29511971
type: QuestionComment

http://stackoverflow.com/comment/47145994
comment on: http://stackoverflow.com/q/29493485
score: 1
has text: [This may be of interest.](http://en.wikipedia.org/wiki/Greasemonkey)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/66713723
type: Comment
comment on: http://stackoverflow.com/a/29487542
has text: I don't understand why he was downvoted on his own question. He posted his solution. Of course we all would have wanted something that works in every browser. His question was not specific on IE but that's what he wanted. We should encourage people to post their solution.I upvote him and I post a link on a shorter solution : http://forums.asp.net/t/1652038.aspx?How+can+we+force+a+link+to+open+a+URL+in+a+different+browser+
type: AnswerComment
score: 0

http://stackoverflow.com/comment/47001596
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29410484
has text: @ragebunny I've updated the code. Maybe this will work.
type: AnswerComment

http://stackoverflow.com/comment/47022125
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29424908
has text: Ok, that part makes sense then. Is there a way I can control the range of the i value for the iteration?

http://stackoverflow.com/a/29482235
has body: I'm a bit skeptical of allowing users to provide function names at all, but... Assume you have the function name in a variable and the value of arg in a variable. Boom: var myString = window[fn](arg); arg is already presumably in an argument, so that's simple enough. The next part is exatracting the function name. Just a bit of regex: var fn = /^([a-z0-9_]+)\(arg\)$/i.exec(str)[1]; if (fn &amp;&amp; typeof window[fn] === 'function') { window[fn](arg); } This does of course assume that the function is always in the global scope, but if it's not, you should be able to adjust accordingly for that. Also, my regex is just the first thing I came up with. It probably doesn't cover all possible function names. If you wanted to limit the string to just a certain set of functions (and you almost certainly should), that becomes quite easy as well once you have the function name: var allowedFunctions = {fn1: fn1, fn2: fn2, someOtherFunction: function() {} }, fn = /^([a-z0-9_]+)\(arg\)$/i.exec(str)[1]; if (fn &amp;&amp; allowedFunctions[fn]) { allowedFunctions[fn](arg); } else { // Hah, nice try. } (If arg isn't actually a variable name but is some kind of literal or perhaps an arbitrary expression, this gets a little more complicated and a lot less safe.)
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29482098
has comment: http://stackoverflow.com/comment/47127439
answers question: http://stackoverflow.com/q/29482098
has comment: http://stackoverflow.com/comment/47129957
has comment: http://stackoverflow.com/comment/47127396
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/47010047
comment on: http://stackoverflow.com/a/29418934
score: 0
type: AnswerComment
type: Comment
has text: Ok, in your "Dynamic" code, you load JQuery two times, may be that this poses problems. One time with ` ` and second time with ` `

http://stackoverflow.com/comment/46962666
type: Comment
comment on: http://stackoverflow.com/a/29381656
type: AnswerComment
has text: Ok, who else is going to say the same thing?
score: 0

http://stackoverflow.com/a/29442465
has comment: http://stackoverflow.com/comment/47066646
score: 6
answers question: http://stackoverflow.com/q/29441389
has comment: http://stackoverflow.com/comment/47065887
downvote count: 0
has body: All you have to do is add a mousedown event handler. In mousedown, push the mouse coordinates into the coordinates[] array. var canvas=document.getElementById("canvas"); var context=canvas.getContext("2d"); var cw=canvas.width; var ch=canvas.height; function reOffset(){ var BB=canvas.getBoundingClientRect(); offsetX=BB.left; offsetY=BB.top; } var offsetX,offsetY; reOffset(); window.onscroll=function(e){ reOffset(); } context.lineWidth=2; context.strokeStyle='blue'; var coordinates = []; var isDone=false; $('#done').click(function(){ isDone=true; }); $("#canvas").mousedown(function(e){handleMouseDown(e);}); function handleMouseDown(e){ if(isDone || coordinates.length>10){return;} // tell the browser we're handling this event e.preventDefault(); e.stopPropagation(); mouseX=parseInt(e.clientX-offsetX); mouseY=parseInt(e.clientY-offsetY); coordinates.push({x:mouseX,y:mouseY}); drawPolygon(); } function drawPolygon(){ context.clearRect(0,0,cw,ch); context.beginPath(); context.moveTo(coordinates[0].x, coordinates[0].y); for(index=1; index<coordinates.length;index++) { context.lineTo(coordinates[index].x, coordinates[index].y); } context.closePath(); context.stroke(); } body{ background-color: ivory; } #canvas{border:1px solid red;} Click to assign polygon vertices Click when done assigning points
type: Answer
upvote count: 6

http://stackoverflow.com/q/29438515
has answer: http://stackoverflow.com/a/29452543
has title: Uniformly-spaced histogram bins with dc.js?
type: Question
downvote count: 0
tagged with: javascript
score: 4
tagged with: dc.js
has body: Mike Bostock uses the following snippet to generate uniformly-spaced bins for a histogram: var data = d3.layout.histogram() .bins(x.ticks(20)) (values); source Is there any way to adapt this to a project that uses dc.js and crossfilter.js? Essentially, I want to dynamically generate the bins and then use the chart to filter on a particular attribute. Total newbie to this. Any guidance would be appreciated!
upvote count: 4
accepted answer: http://stackoverflow.com/a/29452543
tagged with: crossfilter
answer count: 1
favorite count: 0
tagged with: d3.js
type: AnsweredQuestion

http://stackoverflow.com/comment/47215639
comment on: http://stackoverflow.com/q/29529554
type: QuestionComment
has text: If it is just about the dimensions: [Get the size of the screen, current web page and browser window](http://stackoverflow.com/questions/3437786)
type: Comment
score: 0

http://stackoverflow.com/comment/47093300
type: QuestionComment
comment on: http://stackoverflow.com/q/29465207
has text: hi. in my fiddle, you can see that I checked off the bootstrap version. The fiddle is loading bootstrap. The snippet here on SO isn't working, SO forced me to insert code for any question that has a fiddle link in it.
score: 0
type: Comment

http://stackoverflow.com/comment/46950540
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/29386198
has text: What did you try already? there are a tons of questions like this one anyway! :P

http://stackoverflow.com/q/29524464
has body: I'm trying to make some kind of toolbar in JS as GreaseMonkey script and I need high contrast options. They are already implemented on few pages but I'm going to apply them to any website I'm visiting. I have buttons that apply high contrast and they work kinda good but I don't know how to resume default CSS. Every solution I found is good when used on my own page when I know DOM tree structure, classes, ids etc. but as I said, it's supposed to work on any page. What I use to make contrast is: var OA_whiteBlack_f = function(){ $("*").not("video").not("object").not("embed").css("cssText", "background: #000 !important; color: #fff !important;"); }; As you can see I added some .not to avoid changing players (what still doesn't work on youtube) Any ideas how I can restore stylesheet computet on page load?
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29524714
has title: Reloading CSS on not my page
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29524714
answer count: 1
tagged with: jquery

http://stackoverflow.com/a/29446430
upvote count: 8
type: AcceptedAnswer
has body: It should be something like this getInitialState: function() { return { items: [] }; }, renderArticleHeadline: function(article) { return ( &lt;li&gt; {article.headline} &lt;/li&gt; ); }, componentDidMount: function() { this.fetchFrontPageArticles().then(data =&gt; { this.setState({ items: data }); }); }, render: function() { var items = lodash.map(this.state.items, this.renderArticleHeadline); return ( &lt;div&gt; &lt;ul&gt; {items} &lt;/ul&gt; &lt;/div&gt; ); } P.S. read thinking in react
type: Answer
score: 8
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29446252
answers question: http://stackoverflow.com/q/29446252
has comment: http://stackoverflow.com/comment/78444167
has comment: http://stackoverflow.com/comment/47061146

http://stackoverflow.com/a/29411853
score: 7
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29411570
accepted answer of: http://stackoverflow.com/q/29411570
has body: You need to set the appropriate data context, using child templates for example : HTML {{> test text="Text1" a=1}} {{> test text="Text2" a=2}} {{text}} JS Template.test.events({ "click .test": function(event, template){ console.log(this.a); } });
has comment: http://stackoverflow.com/comment/52066470
type: Answer
has comment: http://stackoverflow.com/comment/52994455
upvote count: 7

http://stackoverflow.com/comment/47043021
type: Comment
comment on: http://stackoverflow.com/a/29436802
score: 0
has text: @Ethaan, I think the key to the best answer is not moment.js but rather that you specify an inequality like Curtis' answer. Throwing away information (like the time that the post was submitted) upon insert will accomplish his stated goal, but there is a way to keep that detail and still accomplish it by using an inequality comparison ($gte/$lt), IMHO.
type: AnswerComment

http://stackoverflow.com/q/29394636
tagged with: jquery
has body: I want to know last or recently selected option value for dropdown I have tried following code in django : &lt;script type="text/javascript"&gt; django.jQuery(document).ready(function(){ django.jQuery("#id_emuhibah_issue").on("click", function(e){ console.log(" click -------"); console.log(django.jQuery(this).val()); console.log(this.value); }); }); django.jQuery(document).ready(function(){ django.jQuery("#id_emuhibah_issue").on("change", function(e){ console.log(" chage -------"); console.log(django.jQuery(this).val()); console.log(this.value); }); }); &lt;/script&gt; seems there is no luck to find out last selected value Can anyone suggest solution for above case?
has comment: http://stackoverflow.com/comment/46966100
has title: multiple select get recently selected option value
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29411796
type: Question
has comment: http://stackoverflow.com/comment/46966051
answer count: 2
tagged with: django
score: 0
possible better answer: http://stackoverflow.com/a/29394897
has comment: http://stackoverflow.com/comment/46986649
accepted answer: http://stackoverflow.com/a/29411796
has answer: http://stackoverflow.com/a/29394897
tagged with: javascript

http://stackoverflow.com/a/29404566
accepted answer of: http://stackoverflow.com/q/29404532
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29404532
type: Answer
score: 2
upvote count: 2
has body: You can use lastIndexOf() to get the position of the last forward slash and then use substring() to get the url substring up to that point. var url = "http://127.0.0.1/vikum/symfony/web/index.php/messenger/getConversation"; var indexOfLastFwdSlash = url.lastIndexOf("/"); var shortUrl; if (indexOfLastFwdSlash === -1) { // no forward slash is found // Invalid URL } else { shortUrl = url.substring(0, indexOfLastFwdSlash + 1); // +1 to include the last '/' } Sample run: var url = ' http://127.0.0.1/vikum/symfony/web/index.php/messenger/getConversation'; var indexOfLastFwdSlash = url.lastIndexOf("/"); var shortUrl; if (indexOfLastFwdSlash == -1) { // Invalid URL } else { shortUrl = url.substring(0, indexOfLastFwdSlash + 1); // +1 to include the last '/' } alert(shortUrl); // alerts 'http://127.0.0.1/vikum/symfony/web/index.php/messenger/'

http://stackoverflow.com/comment/47136387
has text: The main difference is that you db call is asynchronous whereas the other one is synchronous.
comment on: http://stackoverflow.com/q/29482339
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/106626207
type: AnswerComment
has text: I used immutability-helper as Rich Warrior suggests, but what is the reason you are suggesting filter instead of splice?
type: Comment
comment on: http://stackoverflow.com/a/31838774
score: 0

http://stackoverflow.com/comment/47047866
comment on: http://stackoverflow.com/q/29439467
has text: You don't want to remove the `onclick="this.select()"`? You can scroll with the keyboard though. Home, End etc.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29459297
has answer: http://stackoverflow.com/a/29459511
has comment: http://stackoverflow.com/comment/47083358
score: 0
tagged with: assert
answer count: 2
has title: Unable to validate Error message using selenium
possible better answer: http://stackoverflow.com/a/29459511
has body: I am trying to validate the message which comes on the web page after performing an action (updating/creation of any records in the system.) The problem is the message disappear after 3-4 seconds, and hence I am unable to capture any changes in DOM(Javascript) Attached is the screenshot - I tried BrowserDriver.getBrowserDriver().getPageSource().contains("warning message here") with assertTrue() statement but its not working. please let me know the approach
has comment: http://stackoverflow.com/comment/47083772
has comment: http://stackoverflow.com/comment/47082586
has answer: http://stackoverflow.com/a/29460367
tagged with: selenium-webdriver
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47083586
has comment: http://stackoverflow.com/comment/47083767
has comment: http://stackoverflow.com/comment/47083628
type: Question
accepted answer: http://stackoverflow.com/a/29460367
tagged with: javascript
has comment: http://stackoverflow.com/comment/47083213
tagged with: dom

http://stackoverflow.com/comment/46969400
score: 1
has text: can't you add a class inside a media query such as used in the links I provided that targets just 6 and 6+, so add `.iphone6 {display:block};` - and then put that same class in the non-media query section as display:none - and then use javascript to say "if this class is display:block - then yadayada, else yadayada"??
comment on: http://stackoverflow.com/q/29380266
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29428170
type: Answer
answers question: http://stackoverflow.com/q/29428001
has comment: http://stackoverflow.com/comment/47027538
has comment: http://stackoverflow.com/comment/47027239
score: 0
has body: You'll have to include this: These files are the minified versions of what you have posted.

http://stackoverflow.com/comment/46937630
score: 0
comment on: http://stackoverflow.com/q/29378695
type: QuestionComment
type: Comment
has text: Im trying to get it done with popover, but i dont find to get it ON my image

http://stackoverflow.com/q/29504989
has comment: http://stackoverflow.com/comment/47167773
type: AnsweredQuestion
tagged with: numbers
linked to: http://stackoverflow.com/q/1458633
downvote count: 2
has comment: http://stackoverflow.com/comment/47167273
tagged with: floating-point
has comment: http://stackoverflow.com/comment/47167249
type: Question
score: 3
has answer: http://stackoverflow.com/a/77289122
upvote count: 5
tagged with: javascript
linked to: http://stackoverflow.com/q/588004
has comment: http://stackoverflow.com/comment/47167340
has body: So I have a Javascript script which adds small fractions together in a loop and its possible that it will add 0.2 to 0.1. Then that value is fed to another function but the issue is I need 0.3 to be fed exactly and not 0.30000000000000004. What is the simplest way to ensure the number is corrected and exact. Note that its possible to get 0.25+0.125 etc being added to simply rounding to 1 decimal won't fix the issue. It is also possible to have 0.2 + 0.10000000000000004 being added although this is very, very unlikely!
answer count: 2
has title: What is the best way to deal with floating point errors?
has comment: http://stackoverflow.com/comment/47167265
favorite count: 0
has comment: http://stackoverflow.com/comment/47167347
possible better answer: http://stackoverflow.com/a/77289122
has answer: http://stackoverflow.com/a/29505205
accepted answer: http://stackoverflow.com/a/29505205

http://stackoverflow.com/comment/46928040
comment on: http://stackoverflow.com/q/29373568
has text: Attempt 2 and 3 both seem to be cross origin calls, so your client needs to either generate headers for access or the server needs to accept connections from your client.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29503739
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has body: I am trying to submit a form using AJAX after the form is validated by Bootstrap Validator. It is not working for some reason. How can I get it to work? And how can I do the confirmation box before submitting the form? $('#accountUpdateForm form').bootstrapValidator({ femphasized texteedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { 'firstName': { validators: { notEmpty: {}, } }, 'lastName': { validators: { notEmpty: {}, } }, }, submitHandler: function(form) { alert("Submit Handler"); var frm = $('#accountUpdateForm'); frm.submit(function(ev) { $.ajax({ type: 'POST', url: frm.attr('action'), data: frm.serialize(), cache: false, success: function(data, textStatus, jqXHR) { alert('Changes saved'); } }); ev.preventDefault(); }); } });
has comment: http://stackoverflow.com/comment/47166080
has title: How to write submit handler on bootstrap validator?
type: Question
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/47166944
score: 0
has comment: http://stackoverflow.com/comment/47166455
answer count: 0
tagged with: jsp

http://stackoverflow.com/q/29415819
downvote count: 1
linked to: http://stackoverflow.com/q/5467129
has body: I have a json object of objects as below: { "166": { "name":{"name":"name","val":"matt","order":""}, "props":{"name":"props","val":"1","order":""} }, "147": { "name":{"name":"name","val":"chris","order":""}, "props":{"name":"props","val":"4","order":""} } } In JavaScript, how would I sort this object by the val property within the props object?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47003826
linked to: http://stackoverflow.com/q/1359761
has comment: http://stackoverflow.com/comment/47004208
tagged with: http://stackoverflow.com/tag/json
score: -1
accepted answer: http://stackoverflow.com/a/29416157
possible better answer: http://stackoverflow.com/a/29416201
type: Question
has title: Sorting a JSON object containing objects
has comment: http://stackoverflow.com/comment/47004122
has answer: http://stackoverflow.com/a/29416201
answer count: 2
upvote count: 0
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/47004036
has comment: http://stackoverflow.com/comment/47003819
favorite count: 0
has comment: http://stackoverflow.com/comment/47003869
has answer: http://stackoverflow.com/a/29416157
has comment: http://stackoverflow.com/comment/47003965

http://stackoverflow.com/q/29498426
favorite count: 0
type: Question
upvote count: 2
answer count: 3
tagged with: jstree
possible better answer: http://stackoverflow.com/a/29698936
has answer: http://stackoverflow.com/a/29698936
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29754187
has title: Loading Json as variable into jsTree
score: 2
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/29754187
tagged with: javascript
tagged with: jquery
has body: I am using jstree with Json. My problem is that I can provide the Json directly into jsTree data, but when I pass it as a variable it will print the entire Json string as the title of one node. below is nodes.json { "id": "ajson1", "parent": "#", "text": "Simple root node" }, { "id": "ajson2", "parent": "#", "text": "Root node 2" }, { "id": "ajson3", "parent": "ajson2", "text": "Child 1" }, { "id": "ajson4", "parent": "ajson2", "text": "Child 2" }, this code below works request = $.getJSON("nodes.json"); var data; request.complete(function() { data = request.responseText; console.log(data); $.jstree.defaults.core.themes.responsive = true; $('#tree').jstree({ plugins: ["checkbox", "sort", "types", "wholerow", "search"], "types": { "file": { "icon": "jstree-file" } }, 'core': { 'data': [{ "id": "ajson1", "parent": "#", "text": "Simple root node" }, { "id": "ajson2", "parent": "#", "text": "Root node 2" }, { "id": "ajson3", "parent": "ajson2", "text": "Child 1" }, { "id": "ajson4", "parent": "ajson2", "text": "Child 2" }, ] } }); }); But this below does not work request = $.getJSON("nodes.json"); var data; request.complete(function() { data = request.responseText; console.log(data); $.jstree.defaults.core.themes.responsive = true; $('#tree').jstree({ plugins: ["checkbox", "sort", "types", "wholerow", "search"], "types": { "file": { "icon": "jstree-file" } }, 'core': { 'data': [data] } }); }); also if you would like to see the code execute I had it hosted on my domain. http://www.jordanmclemore.com/projects/jstree/test/visual/current.html
has answer: http://stackoverflow.com/a/29699118

http://stackoverflow.com/comment/47032812
comment on: http://stackoverflow.com/q/29431692
has text: possible duplicate of [div onmouseout does not work as expected](http://stackoverflow.com/questions/9094071/div-onmouseout-does-not-work-as-expected)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29432039
score: -1
has body: The only high profile implementation of the event loop model I can name, other than so-called "reactive" systems that came later, is the JavaScript runtime. Was there much prior art of the event-loop architectural model before the implementation of the JavaScript runtime in web browsers? What other software systems used this architectural model around the time of its original implementation in Netscape?
has comment: http://stackoverflow.com/comment/47033600
downvote count: 1
type: AnsweredQuestion
tagged with: event-loop
has title: JavaScript runtime event loop prior art
has answer: http://stackoverflow.com/a/29432155
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/29432155

http://stackoverflow.com/comment/48188788
comment on: http://stackoverflow.com/q/29406617
score: 0
type: Comment
type: QuestionComment
has text: possible duplicate of [Implementing jQuery DatePicker in Bootstrap modal](http://stackoverflow.com/questions/21059598/implementing-jquery-datepicker-in-bootstrap-modal)

http://stackoverflow.com/comment/47145263
type: Comment
type: QuestionComment
has text: $('#qr-number') is the JobID parsed from the scanned QR code and $('#Sample') is where the partial view is loaded from the AJAX call
comment on: http://stackoverflow.com/q/29492900
score: 0

http://stackoverflow.com/comment/47068287
type: QuestionComment
comment on: http://stackoverflow.com/q/29450671
score: 0
has text: Let me quess, mme? ;P
type: Comment

http://stackoverflow.com/comment/47160925
score: 1
has text: Using invalid markup, `` can't be a direct child of ` `
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29501232

http://stackoverflow.com/a/29446041
score: 2
has body: This is a hacky way of making this work: To avoid loading images when they throw 404 error or when the images are invalid, This must be inside your controller. This function checks whether the image URL is valid/invalid. $scope.imageExists = function(image, object, index) { var img = new Image(); img.onload = function() { object[index] = true; $scope.$apply(); }; img.onerror = function() { return false; }; img.src = image; }; Now in View: I'm initiating an object called img={}; in the ng-repeat. Then initializing the value for that index in ng-repeat to $scope.imageExists function. Inside that function, on success of that image load, am setting img[index]= true. DEMO So applying it to your code: Place the $scope.imageExists code from above to your controller.
downvote count: 0
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29445787
type: Answer
accepted answer of: http://stackoverflow.com/q/29445787

http://stackoverflow.com/a/29485220
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29484600
has body: You are getting the events.result data starting from index 0. You need to start the for loop with something called event.resultIndex. resultIndex attribute: The resultIndex must be set to the lowest index in the "results" array that has changed. [source] recognition.onresult = function (event) { //console.log(event); var final = ""; var interim = ""; for (var i = event.resultIndex; i &lt; event.results.length; ++i) { if (event.results[i].final) { final += event.results[i][0].transcript; } else { interim += event.results[i][0].transcript; } } Fiddle Demo
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29484600
type: AcceptedAnswer

http://stackoverflow.com/q/29389665
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
tagged with: createjs
score: 0
has title: How can I use tweenJS make bitmap move to some points
has answer: http://stackoverflow.com/a/29396828
accepted answer: http://stackoverflow.com/a/29396828
tagged with: tween.js
has body: I meet the question is like this: I want make the bitmap move to some points, which be stored in an array. How can I use the tweenJS to get this? I try the first method is this: var points = [{x:0, y:0}, {x:100, y:100},{x:200, y:200}]; //The points come from the other method, and data like the points. for( var i=0; i &lt; points.length; i++ ) { createjs.Tween.get( target ) .to( { x: points[i].x, y: points[i].y }, 600, createjs.Ease.easeIn); } Running the code, my target only move to the first point.So I give up. Then I try the second method : var str = 'createjs.Tween.get( target )'; for( var i=0; i &lt; points.length; i++ ) { str += '.to( { x: points[' + i + '].x, y: points[' + i + '].y }, 600, createjs.Ease.easeIn)' } eval( str ); It works perfect, but I worry about the "eval" , not so safe. Can you give me some tips ? Big hug.

http://stackoverflow.com/comment/47235018
has text: That last Codepen seemed to do the trick! If you want to edit your answer with the updated code I will mark your answer as the correct one. Thank you so much for the help with this!
type: AnswerComment
comment on: http://stackoverflow.com/a/29524091
score: 0
type: Comment

http://stackoverflow.com/q/29505138
favorite count: 0
has answer: http://stackoverflow.com/a/29505580
has answer: http://stackoverflow.com/a/29505158
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29506073
upvote count: 3
type: Question
possible better answer: http://stackoverflow.com/a/29506073
has title: How can I sum up number from JSON?
accepted answer: http://stackoverflow.com/a/29505158
tagged with: javascript
score: 3
has answer: http://stackoverflow.com/a/29505222
has body: I have this following example of JSON. I want to sum up 'numberOfPoint' corresponding to 'Name' to get the total number of points. In this case, name A has total number of point 6, name B has total number of point 2, and name C has total number of point 2. { "data": [ { "id": { "year": 2015, "Name": "A" }, "numberOfPoint": 2 }, { "id": { "year": 2014, "Name": "A" }, "numberOfPoint": 2 }, { "id": { "year": 2014, "Name": "B" }, "numberOfPoint": 2 }, { "id": { "year": 2014, "Name": "C" }, "numberOfPoint": 2 }, { "id": { "year": 2013, "Name": "A" }, "numberOfPoint": 2 }] } How can I sum up the numberOfPoint for each name? A pure JavaScript or jQuery solution is fine.
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/47095912
score: 1
has text: `data` is a `Buffer`: https://nodejs.org/api/buffer.html, https://nodejs.org/api/fs.html#fs_fs_readfile_filename_options_callback
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29466738

http://stackoverflow.com/a/29506586
has comment: http://stackoverflow.com/comment/47169992
has body: One way to do it is to put both pages on the same url, then use Javascript to hide/show each part of the page. This would be similar to a lightbox. You can read more here: http://www.w3schools.com/jsref/prop_style_visibility.asp Or even easier, using jQuery here: https://api.jquery.com/hide/ , and https://api.jquery.com/show/
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29506496

http://stackoverflow.com/q/29422805
has body: I have such JSON [ {"replacement": "str1", "destination": "dir1"}, {"replacement": "str2", "destination": "dir2"}, {"replacement": "str3", "destination": "dir3"}, {"replacement": "str4", "destination": "dir4"} ] and quite simple gulp task var replace = require('gulp-replace'); gulp.task('mytask', function() { return gulp.src('myfile.txt') .pipe(replace(/foo(.{3})/g, replacement)) // take `replacement` from json .pipe(gulp.dest(destination)); // take `destination` from json }); I need run this stuff in loop. I need either call this task from the default task several times with different params or implement loop inside the mytask task.
has title: Gulp task with loop
tagged with: node.js
answer count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/22968516
duplicate of: http://stackoverflow.com/q/22968516
downvote count: 0
tagged with: javascript
tagged with: gulp
favorite count: 0

http://stackoverflow.com/a/29402854
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29402233
has body: There are a few problems with your script: this.a = array.slice(key); doesn't seem to make any sense? this.a = array.push(value); sets a to the length of the array if(this.a.length === 1) this.a = []; - not sure against what infinite loop you're trying to protect here? this.a.forEach(build); sounds like a bad idea if you try to modify the array while you're looping over it. My approach would be much simpler - just use the array as a queue: this.a = [ //the array that reproduce the situation (seems to work) 'var o = {}', // I declare o as a global namespace 'o.a.b.c = "a string"', //I declare a value in o.a.b.c, too early 'o.a.b = {}', //I declare o.a.b, but o.a doesn't exist 'o.a = {}', //I declare o.a, too late ]; while (this.a.length) { var value = this.a.shift(); try { (null, eval)(value); } catch(error) { if (error instanceof SyntaxError) break; this.a.push(value); } }
has comment: http://stackoverflow.com/comment/46981238
answers question: http://stackoverflow.com/q/29402233
type: Answer
has comment: http://stackoverflow.com/comment/46981308
has comment: http://stackoverflow.com/comment/46981253
has comment: http://stackoverflow.com/comment/46981164
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46981178

http://stackoverflow.com/q/29484221
tagged with: jquery
score: 0
answer count: 2
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: resizing element with jquery breaks 100% height
tagged with: css
has body: I have a sidebar that has this css: background:#164272; position:absolute; left:0px; top:70px; width:250px; height:100%; And with jquery im showing a table that by default was hidden and is only shown when clicking an element. But when i show the element on smaller sized screens it pretty much breaks the 100% height. here's an image How can i prevent it from breaking the 100%? Thank you
has comment: http://stackoverflow.com/comment/47128559
has answer: http://stackoverflow.com/a/29484305
has answer: http://stackoverflow.com/a/29484441
has comment: http://stackoverflow.com/comment/47128491
type: Question
tagged with: javascript

http://stackoverflow.com/comment/47020603
type: AnswerComment
comment on: http://stackoverflow.com/a/29421503
score: 0
type: Comment
has text: OK, now I am getting an error that states is not defined

http://stackoverflow.com/comment/47042242
comment on: http://stackoverflow.com/q/29436522
has text: Unless I'm not understanding, http://jsfiddle.net/1dt2ay14/4/ seems to work for me.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29382881
has answer: http://stackoverflow.com/a/29383790
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has title: jquery dynamic dependent select from multidimensional array
tagged with: multidimensional-array
has answer: http://stackoverflow.com/a/29383141
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I am trying to have to have a form with two drop down select options that are populated from arrays. The first select has only one array, however depending on the selection, I want to populate the second with a specific multidimensional array. I am able to do them individually, but I am unable to pass the array name from the first selection to the function to populate the second. I am pretty new to javascript and jQuery 1.11.0 and would appreciate any assistance. Here is the code I am working with. select name="aircraftList" id="aircraftList" onchange="showAircraft(this.selectedIndex)" select name="configWBList" id="configWBList" // values for AIRCRAFT // tnumber, acmodel, maxwt, f1arm, m1arm, r1arm, littarm, bag1max, fuel1kgmax, /////////////////////////////////////////////////////////// var aircraft = [ ["Select Aircraft", "", "", "", "", "", "", "", "", ""], ['N901AH', "Agusta A109E", 3000, 1585, 2455, 3200, 5300, 3200, 150, 480], ['N902AH', "Agusta A109E", 3000, 1585, 2455, 3200, 5300, 3200, 150, 480], ['N903AH', "Agusta A109E", 3000, 1585, 2455, 3200, 5300, 3200, 150, 480], ['N904AH', "Agusta A109E", 3000, 1585, 2455, 3200, 5300, 3200, 150, 480], ['N905AH', "Agusta A109E", 3000, 1585, 2455, 3200, 5300, 3200, 150, 480], ['N907AH', "Agusta A109E", 3000, 1585, 2455, 3200, 5300, 3200, 150, 480] ]; // values for AC N901AH /////////////////////////////////////////////////////////// var N901AH = [ ["Select a Configuration", "Select Config", "Select Config"], ["6 PAX STANDARD SEATS OFFSHORE", 2205.61, 3485.69], ["DUAL CONTROLS INSTALLED", 2207.81, 3483.76], ["VIP SEATS INSTALLED", 2212.11, 3483.75], ["VIP SEATS, DUAL CONTROLS INSTALLED", 2214.31, 3481.83], ["ONE LITTER KIT INSTALLED", 2213.91, 3483.50], ["ONE LITTER, DUAL CONTROLS INSTALLED", 2216.11, 3481.58], ["6 PAX STANDARD SEATS, VESTS REMOVED", 2196.81, 3489.83], ["VIP SEATS INSTALLED, VEST REMOVED", 2203.31, 3487.87], ["ONE LITTER INSTALLED, VESTS REMOVED", 2207.31, 3487.02], ["TWO LITTER INSTALLED", 2222.21, 34…
type: Question
has comment: http://stackoverflow.com/comment/46944739
possible better answer: http://stackoverflow.com/a/29383790
accepted answer: http://stackoverflow.com/a/29383141
has comment: http://stackoverflow.com/comment/46969640

http://stackoverflow.com/comment/47187995
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29516296
has text: I'm confused? What you want me to provide. I'm not really providing an answer. But this would not look good in a comment. He doesn't have to accept my answer. Someone may give him an answer directly to his question.
type: Comment

http://stackoverflow.com/q/29399093
possible better answer: http://stackoverflow.com/a/29399155
has comment: http://stackoverflow.com/comment/46977236
has comment: http://stackoverflow.com/comment/46975615
has body: How do I use drawImage() to output full size images on a 300px X 380px canvas regardless of the source image size? Example: 1). If there is a image of 75px X 95px I want to be able to draw it to fit a 300px X 380px canvas. 2). If there is a image of 1500px X 1900px I want to be able to draw it to fit a 300px X 380px canvas. var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); var img=document.getElementById("myPic"); ctx.drawImage(img,10,10); What options are available to prevent any quality loss?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46976526
linked to: http://stackoverflow.com/q/21961839
type: Question
upvote count: 4
answer count: 2
tagged with: canvas
has comment: http://stackoverflow.com/comment/46976483
downvote count: 0
has comment: http://stackoverflow.com/comment/46976674
has comment: http://stackoverflow.com/comment/46977293
tagged with: javascript
has answer: http://stackoverflow.com/a/29400487
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29399155
accepted answer: http://stackoverflow.com/a/29400487
has comment: http://stackoverflow.com/comment/46976385
favorite count: 0
score: 4
has title: Using drawImage() to output fixed size images on a canvas?

http://stackoverflow.com/q/29526234
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47209742
type: UnansweredQuestion
has title: NodeJS + AngularJS + File Upload - connect-busboy doesn't call callback
tagged with: node.js
has body: Sources here I try implementing an NodeJS Server taking file-uplods using connect-busboy from AngularJS using angular-file-upload for later Analysis. My Problem is that the callback req.busboy.on('file', function (args...){}); will not be called... So I can't continue developing because I Need the file-Contents :) Anyone got an Idea? Sources here
type: Question
has comment: http://stackoverflow.com/comment/47208707
tagged with: javascript
has comment: http://stackoverflow.com/comment/47221613
has comment: http://stackoverflow.com/comment/47221030
score: 0
has answer: http://stackoverflow.com/a/29549364
has comment: http://stackoverflow.com/comment/47215189
answer count: 1

http://stackoverflow.com/comment/47141403
score: 1
type: AnswerComment
type: Comment
has text: i have added some code, should be easy to understand. but i suggest reading the blogpost i added, it offers a lot of useful information about the whole login process.
comment on: http://stackoverflow.com/a/29490886

http://stackoverflow.com/a/29389961
answers question: http://stackoverflow.com/q/29380360
score: 0
type: Answer
has body: instead of using regex to match a number field, why not just use the number type and provide min/max? &lt;input type="number" min="1" max="99" step="1" data-bind="value : $root.rootData.Page" class="form-control" /&gt; Regex could be used in combination with number type as a fallback, since FF support for the number type is lacking: &lt;input type="number" min="1" max="99" step="1" pattern="^[1-9][0-9]?$" data-bind="value : $root.rootData.Page" class="form-control" /&gt;

http://stackoverflow.com/q/29379798
tagged with: mmenu
type: Question
tagged with: javascript
tagged with: jquery
has title: How to hook into MMenu event?
score: 2
downvote count: 0
answer count: 1
tagged with: events
favorite count: 0
has body: I've successfully added a Search facility for the MMenu jquery plugin. It's working great except for one thing: When the Search For textbox appears, I want to set focus to it. So far I've accomplished this by adding an 'onmouseover' event handler to the parent of the textbox which is the 'ul' representing the "page" currently visibly. It kind of works but is kludgy because the user needs to move the cursor over the designated area. On a mobile device, I doubt it would work at all I'm looking for a way to hook into MMenu's event handler that opens the page that the Search textbox is on. Here's an example of the HTML code I'm dealing with: Search for: Might anyone know how to do this? Robert W.
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/62469372

http://stackoverflow.com/a/29471829
has comment: http://stackoverflow.com/comment/47105178
downvote count: 0
has comment: http://stackoverflow.com/comment/47105233
type: Answer
answers question: http://stackoverflow.com/q/29471320
has comment: http://stackoverflow.com/comment/47108942
score: 1
upvote count: 1
has body: I have tested up your code in a plunker, and guess what? Its working for me. Can you please confirm it, or send me more info, i'm glad if i could help. Plunker var app = angular.module('plunker', []); app.service("MyService", function($http){ this.api = function(obj){ return $http.post("http://jsonplaceholder.typicode.com/posts", obj).success(function(data){ //process data in various ways here console.log(data); var returnObj = { complete: true, data: data }; return returnObj; }); } }); app.controller('MainCtrl', function($scope,MyService) { $scope.data = 'World'; MyService.api({oi: true}).success(function(data){ $scope.data = data }); }); Update: I have misunderstood your question. You want to process the data in the callback to manipulate it in your action. Your code dont work because success() actually returns a promise, but it dont change it, it returns the original one. The one to go for is the then(), which is chainable and returns the modified version of the promise. I've made changes to the plunker to reflect my new vision of the scenario. Here is the new code. Thanks for your time. var app = angular.module('plunker', []); app.service("MyService", function($http){ this.api = function(obj){ return $http.post("http://jsonplaceholder.typicode.com/posts", obj).then(function(data){ //process data in various ways here console.log(data); var returnObj = { complete: true, data: data }; return returnObj; }); } }); app.controller('MainCtrl', function($scope,MyService) { $scope.data = 'World'; MyService.api({oi: true}).then(function(data){ $scope.data = data }); }); New Plunker

http://stackoverflow.com/q/29445994
tagged with: css
accepted answer: http://stackoverflow.com/a/29446086
score: 0
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/11805352
tagged with: javascript
has answer: http://stackoverflow.com/a/29446068
answer count: 2
has answer: http://stackoverflow.com/a/29446086
possible better answer: http://stackoverflow.com/a/29446068
has body: I have the following simple markup: &lt;div id="container"&gt; &lt;textarea id="content" /&gt; &lt;/div&gt; I need to set the min-width of the div is large enough to wrap the entire textarea when we start to re-sizing the textarea. How can I do that? I hope this is a very typicall problem but I just haven't come across that. JS or pure CSS?
has title: Auto re-sizing div with text-area
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29529554
linked to: http://stackoverflow.com/q/3437786
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29531116
has title: How to multiply screen resolution by 80% then use in code
type: Question
answer count: 1
has body: My content I know it's brief, but hope it explains what I'm looking for. Much help is greatly appreciated. Thank You! :)
score: 0
has comment: http://stackoverflow.com/comment/47215639
accepted answer: http://stackoverflow.com/a/29531116
linked to: http://stackoverflow.com/q/1917576
tagged with: screen-resolution

http://stackoverflow.com/a/29432762
answers question: http://stackoverflow.com/q/29432585
score: -3
type: Answer
has body: If you alert showing profile id is '1' then change the code as below. here i change the != to !==. For more information please Click here &lt;script type="text/javascript"&gt; Ext.onReady(function() { var profile = ${profilId}; alert(typeof profile.toString() + profile); alert(typeof "1" + "1"); if (profile.toString() !== "1" || profile.toString() !== "2") { alert("pas manager"); App.removeOption(Ext.getElementById("site.country.zone.region.code")); App.populateTargetListForWorkflow("", Ext.getElementById("site.country.zone.region.code"), "region"); } else { alert("manager"); Ext.getElementById("site.country.zone.region.code").options[0].value = "EUATEST"; } }); &lt;/script&gt;
downvote count: 3
upvote count: 0

http://stackoverflow.com/comment/53079842
comment on: http://stackoverflow.com/a/30082225
score: 0
type: Comment
has text: So I'm just having the same issue I think. I've tried this solution and it's logging entirely different values on different zoom levels. I'd like to get the same x and y values related to the original size of the image. Do you guys know how to do that?
type: AnswerComment

http://stackoverflow.com/comment/46939462
score: 0
type: Comment
type: QuestionComment
has text: @Mutant: No I don't get any errors
comment on: http://stackoverflow.com/q/29379584

http://stackoverflow.com/a/29498557
upvote count: 6
has comment: http://stackoverflow.com/comment/47173190
downvote count: 0
score: 6
has body: That won't work because the user is not logged in when you fetch him via cloud code. For getSessionToken to work you need to already have a logged in user. Because, otherwise how would CloudCode know which session of your user you want to get? (if he is logged in multiple devices) Also your code is returning the first user in the database, is that realy what you want? Either way, you need to log the user in via cloud code and then return the session token. However I had some trouble doing that without the password (just by calling user.logIn(), it should work so give it a try) so the only solution I found was to change the password of the user and then log him in. Why do you need to fetch the user's session token? If you don't mind changing the user's password you can do something like: var password; //create new random passowrd query.first({useMasterKey: true}).then(function(user){ user.set("password", password); return user.save(); }).then(function(user){ return Parse.User.logIn(user.get("username"), password); }).then(function(user){ return user.getSessionToken(); });
has comment: http://stackoverflow.com/comment/47196789
accepted answer of: http://stackoverflow.com/q/29489008
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29489008
has comment: http://stackoverflow.com/comment/49250726
type: Answer

http://stackoverflow.com/q/29493726
tagged with: parsing
type: UnansweredQuestion
tagged with: node.js
tagged with: interpreter
has title: Web based debugging library for JS
tagged with: javascript-debugger
type: Question
has body: I am trying to make a web(Javascript) based JS interpreter and debugger for tutorial purposes. I am running the program on a nodejs server. The interpreter part is simply done by running the command "node file.js" on a child_process.exec(). Can anyone suggest a good way to implement the debugger? If the user sets a breakpoint the program would run till that point and would show the values of the variable that have already been declared or changed till that point of execution. I tried to do this using the uglify-js module. I run the UglifyJS.minify(&lt;file.js&gt;[,{options}]) to extract the variables used in the code and echo them out in the console. I already came up with the following code for this purpose but I was looking for some available open source solution. Does anyone know about any library available for this purpose? File: parser.js var UglifyJS = require("uglify-js"); var exec = require('child_process').exec; var fs = require('fs'); var allcode = new Object(); allcode.code = ""; allcode.vars = ""; var output = new Object(); output.data = ""; //THE BREAKPOINT MENTIONED BY USER var tillLine = 3; var i = 0; var done = 0; var filesuffix = "temp301"; var fileout = "output.log"; var child = Array(); var notAllowed = Array("console","log","eval"); fs.writeFileSync("./"+fileout, ""); fs.readFileSync('./demo.js').toString().split('\n').every(function (line) { allcode.code += line + "\n"; output.data[i] = ""; allcode.vars = ""; fs.writeFileSync("./"+filesuffix+".js", allcode.code); i++; //ADD CODE ONLY UPTO THE MENTIONED LINE if(i&gt;tillLine) { return false; } else { return true; } }); //GET THE LIST OF USED VARIABLES var minified = UglifyJS.minify("./"+filesuffix+".js",{outSourceMap: "out.js.map"}); var map = JSON.parse(minified.map); map.names.forEach(function(variable){ if(notAllowed.indexOf(variable) == -1) { allcode.vars += "console.log('Value of "+variable+" is ' + "+variable+");\n"; } }); fs.appendFileSync("./"+filesuffix+".js", allcode.vars); //EXECUTE TH…
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29495273
answer count: 1

http://stackoverflow.com/q/29494869
has answer: http://stackoverflow.com/a/29495144
has comment: http://stackoverflow.com/comment/47149218
has answer: http://stackoverflow.com/a/29494913
has body: I'm working on setting up a floating action button, like in Google's new Material Design. This is the jQuery I'm using right now: $(document).ready(function () { var doc = $(document).height(); var height = $(window).height(); var offset = height - 20 ; console.log(doc); console.log(height); console.log(offset); $("#floating_nav_container").css("top",""+ offset +"px"); }); I want to be able to detect the height of the viewport and have my action button display 20px above the bottom. My "floating_nav_container" is an absolute positioned div within a bootstrap "col-md-6" parent div that I've set a fixed height for testing purposes of 900px. Sometimes the $(document).height() gets the 900 right, and other times it doesn't; the $(window).height is always the same as the document one. My doctype is: &lt;!DOCTYPE html&gt; which I've read on here is the usual fix when these two methods return the same value. EDIT: I'm trying to accomplish this within a 3 column layout. The "floating_nav_container" is only applicable to the middle column. Setting it's CSS to fixed position with a bottom of 20px doesn't work because depending on the viewport size the action button might show on the third column or outside of the columns altogether. If the "floating_nav_container" is set as fixed with the code set for it to be a child of the middle column it behaves the same as if it was set up at the top of the DOM. I've opted for having it absolutely positioned within the middle column because then no matter how the browser is re-sized it stays within the parent container. The problem is when the page runs beyond the height of the viewport the button is gone. My hope is to find a way to calculate the height and have it dynamically determine what the offset from the bottom of the viewport should be for any device.
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29498646
has comment: http://stackoverflow.com/comment/47148873
tagged with: http://stackoverflow.com/tag/html
has title: $(document).height and $(window).height both return the same value - proper doctype in use
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29495552
score: 0
type: Question
has answer: http://stackoverflow.com/a/29498646
possible better answer: http://stackoverflow.com/a/29495144
tagged with: javascript

http://stackoverflow.com/q/29440632
has answer: http://stackoverflow.com/a/29440696
duplicate of: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/104627679
upvote count: 56
accepted answer: http://stackoverflow.com/a/29440659
type: AnsweredQuestion
score: 56
has comment: http://stackoverflow.com/comment/62720333
has comment: http://stackoverflow.com/comment/47049893
type: Question
has comment: http://stackoverflow.com/comment/47055927
tagged with: javascript
has answer: http://stackoverflow.com/a/29440659
answer count: 2
has body: I am obviously misunderstanding something about either the way js promises are resolved or about the semantics of "return." I am being called by a function that expects me to be synchronous - to return a value. Calculating that value requires some asynchronous code (specifically, the ForEach method on a dstore Collection What I'm trying to accomplish is approximately this, but this does not work in that the function mySynchronousFunction has no return value. function mySynchronousFunction() { var accumulator = {}; var myPromise = doAsynchronousThingThatSideEffectsAccumulator(); // Now my caller is expecting the value of accumulator. myPromise.then(function() {return accumulator;}) } I understand that JS has to allow for single-threaded implementations, so that it's not cool to block, but there must be some pattern for gluing asynchronous to synchronous code, that I've just missed.
downvote count: 0
tagged with: asynchronous
has title: How to block for a javascript promise and return the resolved result?
favorite count: 0
linked to: http://stackoverflow.com/q/14220321
tagged with: deferred
tagged with: promise
possible better answer: http://stackoverflow.com/a/29440696

http://stackoverflow.com/a/29501777
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29501534
accepted answer of: http://stackoverflow.com/q/29501534
type: AcceptedAnswer
downvote count: 0
has body: As @dandavis pointed out in the comment, the proper way to reference the argument in javascript is to put it in a quote: test.tpl: from html: {{arg}} Output: from script some value Without the quotation mark, what JavaScript actually sees is a string followed by a variable called some value, which is not cannot be concatenated with a string literal. This is how my original code looks like to the browser: window.alert("from script " + some value); which is wrong.
type: Answer

http://stackoverflow.com/comment/47046863
comment on: http://stackoverflow.com/q/29433978
has text: Yes, then everything will update the way it should. So are the Browsers automatically caching?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46944740
type: Comment
has text: I see, maybe I should do that, I just didn't want to have to rely on that, but yeah I guess it is the best solution.
type: AnswerComment
comment on: http://stackoverflow.com/a/29382372
score: 0

http://stackoverflow.com/q/29396021
has answer: http://stackoverflow.com/a/29396171
type: UnansweredQuestion
tagged with: php
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: PHP/Ajax/jquery/JSON - Take a part from echo text back as a variable after Ajax Post
score: 0
answer count: 2
has body: I'm working on a simple Ajax post method and here is my code: &lt;script type="text/javascript"&gt; jQuery(document).ready(function($) { $(window).scroll(function() { if($(window).scrollTop() + $(window).height() == $(document).height()) { var nextUrl = "&lt;?PHP echo $nexturl;?&gt;"; $('#Loading').show(); $.ajax({ url: 'ajax.php', type: 'POST', dataType: 'html', data: { next_url: nextUrl }, }).done(function ( html ) { $('#LoadedResults').html( html ); $('#Loading').hide(); }); } }); }); &lt;/script&gt; This code is sending post data to ajax.php: &lt;?PHP function callInstagram($url) { $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL =&gt; $url, CURLOPT_RETURNTRANSFER =&gt; true, CURLOPT_SSL_VERIFYPEER =&gt; false, CURLOPT_SSL_VERIFYHOST =&gt; 2 )); $result = curl_exec($ch); curl_close($ch); return $result; } $client_id = "1e0f576fbdb44e299924a93cace24507"; $Next_URL = $_POST["next_url"]; $url = $Next_URL; $inst_stream = callInstagram($url); $results = json_decode($inst_stream, true); $maxid = $results['pagination']['next_max_id']; $nexturl = $results['pagination']['next_url']; //Now parse through the $results array to display your results... echo json_encode(array( 'next_url_link' =&gt; $nexturl )); The ajax.php is echoing result as: {"next_url_link":"https:\/\/api.instagram.com\/v1\/tags\/sweden\/media\/recent?count=24&amp;client_id=1e0f576fbdb44e299924a93cace24507&amp;max_tag_id=1427904820688670"} I was looking here and there and i think there is some method with json with which i can get the result of next_url_link. So guys, how can i get back the result printed for next_url_link and set is active jQuery/JavaScript variable ? For example: var NextUrlLink = data.next_url_link; Is it possible somehome ? Should i create two .ajax post methods or how, i have no idea ? Thanks in advance!
has answer: http://stackoverflow.com/a/29396170

http://stackoverflow.com/comment/47041628
comment on: http://stackoverflow.com/a/29436212
type: AnswerComment
score: 0
type: Comment
has text: currently its set to parseInt so returns Nan instead of the value of the associated number input

http://stackoverflow.com/q/29512436
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I have problem with SemanticUI modal panel module, I have set everything up, but I do not know what should I do to make onDeny/onApprove events fire. Other events as onShow and onVisible are firing properly without any problems. Also, the closable flag is set to false, but I still see close button. My jquery listener is defined like this: $('#btnReset').click(function(){ $('#confirmModalPanel') .modal({ closable : false, onShow: function(){console.log('onShow');}, onVisible: function(){console.log('onVisible');}, onDeny: function(){console.log('onDeny');}, onApprove: function(){console.log('onApprove');} }) .modal('show'); }); Here is jsfiddle link.
tagged with: semantic-ui
tagged with: http://stackoverflow.com/tag/html
score: 2
downvote count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29512906
accepted answer: http://stackoverflow.com/a/29512906
type: Question
upvote count: 2
has title: SemanticUI modal not onDeny/onApprove events not firing

http://stackoverflow.com/q/29377169
has comment: http://stackoverflow.com/comment/46942087
type: Question
linked to: http://stackoverflow.com/q/15552487
has answer: http://stackoverflow.com/a/29379168
tagged with: google-maps
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: google-maps-api-3
score: 0
accepted answer: http://stackoverflow.com/a/29379168
type: AnsweredQuestion
has title: Multimarker and infoboxes for every marker
has comment: http://stackoverflow.com/comment/46935768
has comment: http://stackoverflow.com/comment/46936382
has body: I try to make a custom infobox. If I run for one marker, it works, but if I try from an imgUr (the array has got coordinates, name and other attributes for every marker) which have more than one marker I can't make it work. It shows only the first one marker and none else and no infobox. Here is the code: for (i = 0; i &lt; imgAr.length; i++) { var location = new google.maps.LatLng(imgAr[i].coords.coordinates[1], imgAr[i].coords.coordinates[0]); var marker = new google.maps.Marker({ position : location, map : map, icon : "icons/coffee1.png" , animation : google.maps.Animation.DROP, infoboxIndex : i // &lt;--- That's the extra attribute }); var content = "&lt;h5&gt; Name:" + imgAr[i].name + "&lt;br&gt; Description:" + imgAr[i].description + "&lt;br&gt;&lt;img src='" + imgAr[i].image + "' width='100px' height='100px'/&gt; &lt;h5&gt;"; var var_infobox_props = { content: content, disableAutoPan: false, maxWidth: 0, pixelOffset: new google.maps.Size(-10, 0), zIndex: null, boxClass: "myInfobox", closeBoxMargin: "2px", closeBoxURL: "icons/close.png", infoBoxClearance: new google.maps.Size(1, 1), visible: true, pane: "floatPane", enableEventPropagation: false }; var var_infobox = new InfoBox(var_infobox_props); google.maps.event.addListener(marker, 'mouseover', function(event) { map.panTo(event.latLng); map.setZoom(16); infocoffee[this.infoboxIndex].open(map, this); } ); // Save infobox in array infocoffee.push(var_infobox); // Save marker in array markers.push(marker); } markers.setMap(map); What is not working? How can I fix it?
upvote count: 1
downvote count: 1

http://stackoverflow.com/a/46679965
downvote count: 0
score: 38
type: Answer
has body: Note: For those people who is using newer version (v2.7.0) of Chart.js, find out that is not working while you're copy-paste @bviale's answer back to your code base; Some property names has changed: fillColor -&gt; backgroundColor strokeColor -&gt; borderColor pointColor -&gt; pointBackgroundColor pointStrokeColor -&gt; pointBorderColor You will need to update those property names to make it work. Reference: https://github.com/chartjs/Chart.js/blob/master/docs/charts/line.md#dataset-properties
answers question: http://stackoverflow.com/q/29447579
upvote count: 38

http://stackoverflow.com/a/29515781
has comment: http://stackoverflow.com/comment/47187239
type: Answer
answers question: http://stackoverflow.com/q/29515624
score: 0
has body: If you are using jquery you could do function resize(){ if($(window).width() &lt; '600'){ $('body').css('background','#000'); } else{ $('body').css('background','#fff'); } }; $(document).ready(resize); $(window).resize(resize);
has comment: http://stackoverflow.com/comment/47186861

http://stackoverflow.com/q/29487678
answer count: 1
tagged with: javascript
score: 0
tagged with: ember.js
accepted answer: http://stackoverflow.com/a/29490050
has body: I am still a little fuzzy on how to use this helper in my particular situation. I am pulling a random object out of an array of objects and displaying them on button click. Each object has 3 props: word, language, trans. When the object is rendered I would really like it to display as follows Word langauge translation I have it centered when it renders but all in one line. Here is the code for my helper: Ember.Handlebars.helper('randomize', function(myArray, options) { var random = myArray[Math.floor(Math.random() * myArray.length)]; return random.word + random.language + random.trans; }); So my dumb question is how to I include a line break when it renders?
has comment: http://stackoverflow.com/comment/47136140
has comment: http://stackoverflow.com/comment/47177091
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29490050
type: Question
has title: Newline in Ember handlebars helper?

http://stackoverflow.com/comment/46973648
type: Comment
comment on: http://stackoverflow.com/a/29398359
score: 0
type: AnswerComment
has text: true wrote it too fast

http://stackoverflow.com/a/29404259
type: Answer
has body: You need a parent element with the position property not set to static, i.e. to either relative, absolute, or fixed. The dropdown is using an absolute position with top:100%, so if there is no parent item with a position set, then it will use the window element as its reference, hence why it opens at the bottom of the page. Just set the immediate parent of the &lt;ul&gt; to have the position set. Check out the updated jsfiddle.
answers question: http://stackoverflow.com/q/29404174
score: 0

http://stackoverflow.com/q/29421477
tagged with: jsp
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/29421700
accepted answer: http://stackoverflow.com/a/29421700
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29421661
type: Question
has answer: http://stackoverflow.com/a/29421661
has body: I tried finding solution to this problem but I couldnt find the right article Invoices Invoice Number Invoice Total INV-Error_Test1 22.000000 USD td>INV-Error_Test2 22.000000 USD Select a Invoice from the left to view Error Details Invoice Headers Invoice Number Matter Number Invoice Total Invoice Tax Total Invoice Net Total <%= invoiceNumber%> CC_MAT_1221 22.000000 USD 22.000000 USD 22.000000 USD File Error : The file does not contain any record delimiters or is in an unsupported format Invoice Line Items Line Item Number Line Item Date Unit Cost Number of Units Line Item Total Task Code Expense Code Timekeeper ID Line Item Description 2 20150304 2 2 6 E2 <%= invoiceNumber%> Line : 2 Invoice does not foot Reported = (22.0)Calculated (18.0) 3 20150306 3 3 12 T3 Here is the jsfiddle link http://jsfiddle.net/5n62md3m/ I was able to get the invoice number from invoiceList div as below $("#invoiceList a").click(function (e) { console.log('invoice --->'+$(this).text()); }); But am not sure how to send this to invoiceNumber in invoiceErrors div Could anyone please help me out?
has title: jQuery Pass td onclick value to other table
answer count: 2

http://stackoverflow.com/comment/46974512
type: Comment
type: QuestionComment
has text: It is working. Other functions might have error and stopping it to execute. F12 and See errors in console.
comment on: http://stackoverflow.com/q/29399243
score: 0

http://stackoverflow.com/a/29438543
answers question: http://stackoverflow.com/q/29437754
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29437754
has body: Your textarea elements (the new ones) have the same "name" and "id" attributes, so they break any javascript logic (id must be unique). $(document).ready(function() { var nTextEditor = 3; function addTextarea() { nTextEditor++; var className = "text_area_" + nTextEditor; $('#myForm').append(' '); tinymce.init({selector:'textarea'}); } $('#addmore').click( function () { addTextarea(); } ); }); I made a working example at jsfiddle for you to see: JSFiddle

http://stackoverflow.com/comment/47077935
type: Comment
comment on: http://stackoverflow.com/a/29456744
score: 0
type: AnswerComment
has text: Thanks. I'll use Asp.Net and MSSQL.

http://stackoverflow.com/a/29418519
downvote count: 0
has comment: http://stackoverflow.com/comment/47011871
score: 4
has body: I created a video tutorial on how to run SSJS from Client Side JavaScript using Remote Services. It's extremely powerful and allows you to pass parameters and return various objects back to CSJS for processing. Click here to watch this video tutorial on NotesIn9.com
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/29418079

http://stackoverflow.com/q/29462297
has comment: http://stackoverflow.com/comment/47088759
linked to: http://stackoverflow.com/q/11271704
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29462345
tagged with: javascript
tagged with: jquery
score: 0
has title: Move a DIV under a another DIV via DRAGGABLE?(CSS, JQuery)
has body: I have two different images that i stack up on each other. .image-1 is the background image, .image-2 is the foreground image. I want it like this because the foreground image is a PNG-File which contains a whole inside. When you look through that whole you see a part of the background image. I want to be capable to move the the background image via draggable in JQuery. This does not work because i can not touch the background layer because it is covered with the foreground layer. This is my sourcecode: CSS .image-1 { z-index: 0; position: absolute; background-image: url("image_1.png"); width: 400px; height: 400px; background-repeat: no-repeat; background-position: center; } .image-2 { z-index: 1; position: absolute; background-image: url("image_2.png"); width: 400px; height: 400px; background-repeat: no-repeat; background-position: center; } HTML &lt;div class="image-1"&gt;&lt;/div&gt; &lt;div class="image-2"&gt;&lt;/div&gt; JQuery $(".image-1").draggable({}); How can i access the background div via draggable but still keep the image that i move in the background? EDITED: I tried it like this: $("#image-2").mousedown(function(event) { $("#image-1").draggable({ }); }); but it did not work.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has answer: http://stackoverflow.com/a/29462345

http://stackoverflow.com/a/29465315
has body: Follow the steps to this gem https://github.com/kossnocorp/jquery.turbolinks but instead of moving down //= require turbolinks just remove it entirely.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29465289
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/29465289

http://stackoverflow.com/comment/46937634
score: 1
has text: You will not be able to load this resource with AJAX, as there is no CORS.
comment on: http://stackoverflow.com/q/29378773
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47180816
type: Comment
comment on: http://stackoverflow.com/a/29512052
score: 0
type: AnswerComment
has text: The question's asking about the *max* and *min* date. What does the displayed datetime have to do with anything?

http://stackoverflow.com/comment/47192884
has text: IMHO there's no way this deserves an upvote. Technically it works, but it's a symptom of sloppy coding when `this.id` works perfectly well without needing (at least) two function calls.
comment on: http://stackoverflow.com/a/29518838
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46943061
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29381734
has text: Try initializing the reactive var with an empty array rather than with a string. I don't know if that's the only problem, but it's certainly an issue.

http://stackoverflow.com/a/29461466
has comment: http://stackoverflow.com/comment/47089023
has comment: http://stackoverflow.com/comment/47089066
has comment: http://stackoverflow.com/comment/47086827
score: 0
has comment: http://stackoverflow.com/comment/47086737
has comment: http://stackoverflow.com/comment/47086700
type: Answer
has comment: http://stackoverflow.com/comment/47089007
answers question: http://stackoverflow.com/q/29461405
has body: else if(($foodcheck).width =&lt; '0px'){ this code throw error "&lt;=" not "=&lt;" if everything with the html is ok and you have element with id="f" this will fix it ! also $foodcheck).width must be $foodcheck).width() &lt;= 0 number not string like your example

http://stackoverflow.com/a/29466071
upvote count: 1
has comment: http://stackoverflow.com/comment/47137793
has comment: http://stackoverflow.com/comment/47097237
type: AcceptedAnswer
downvote count: 0
has body: $('logo pull-left').fadeOut('slow'); Here logo is not an tag element. You must specify .logo if its CSS class or #logo if its CSS ID. Similarly for logo_h__img , pull-left as well. You must specify whether it's class. So your corrected code will be like below: Update based on your CODE In your code, both logo and pull-left classes are in same dom element. SO you must use .logo.pull-left $(function(){ $(window).scroll(function(){ if($(this).scrollTop() &gt; 100) { $('.logo.pull-left').fadeOut('slow'); $('.logo_h.logo_h__img') .css({'width':'216px','height':'73px'}) .attr('src','http://....1.png'); } if($(this).scrollTop() &lt; 100) { $('.logo.pull-left').fadeIn('fast'); $('.logo_h.logo_h__img') .css({'width':'216px','height':'73px'}) .attr('src','http://...2.png'); } }); });
type: Answer
answers question: http://stackoverflow.com/q/29466017
has comment: http://stackoverflow.com/comment/47096985
has comment: http://stackoverflow.com/comment/47096851
has comment: http://stackoverflow.com/comment/47098222
accepted answer of: http://stackoverflow.com/q/29466017
score: 1

http://stackoverflow.com/comment/47211626
type: Comment
has text: I would say it's an answer to the question, just not a very complete answer. It would be useful as a starting point, if not for the second answer, which is much more complete.
comment on: http://stackoverflow.com/a/29527395
type: AnswerComment
score: 0

http://stackoverflow.com/comment/47033789
type: Comment
comment on: http://stackoverflow.com/a/29430882
score: 0
type: AnswerComment
has text: I figured it out right after asking my question. Thank you for the help once again.

http://stackoverflow.com/q/29511527
type: UnansweredQuestion
tagged with: javascript
tagged with: jquery
type: Question
has body: I want to fix .top div to top. and .bottom div to bottom like shown in the image. and I need this scroll only whenever overflows. JS Bin The standard Lorem Ipsum passage, used since the 1500s "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?" 1914 translation by H. Rackham "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how t…
has title: Fixing two div top and bottom on all screen size and overflow scroll
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 0
has answer: http://stackoverflow.com/a/29511634
answer count: 1

http://stackoverflow.com/comment/47070271
has text: http://prem1.di.fm:80/clubdubstep_hi
comment on: http://stackoverflow.com/q/29452336
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46991863
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29395266
has text: Ah OK yes, the option has changed slightly to "Require App Secret", and when ticked to Yes it still works. It must be using the app secret in the FacebookSession::setDefaultApplication(Appid, AppSecret). Is there still a case to use the check in step 2) ? This still doesn't seem to use the appsecret_proof (which is a hash of the app_secret and access token) though. Am I overthinking this or am I secure in my current setup?

http://stackoverflow.com/q/29400793
tagged with: http://stackoverflow.com/tag/html
has body: So my select box is generated from mysql (php), this means that I am unable to insert a "value" (as far as I know) like this: light blue My select box is generated like this: ?php if (mysql_num_rows($result)!=0) { echo ' Please Select '; while ($test = mysql_fetch_array( $result )) { echo ' '.$test['am_task'].' '; } echo ' '; } ?> The reason for using the "value" is so that I am able to automatically change the colour of the selected option from the select box. Is there a way I can do this? I have two options: holiday TBC These are defined inside of the MySQL and I know they're not going away. So I would like "holiday" green, and then "TBC" orange. Any other value generated from the select box I would like blue. Is this possible, not sure if I am well out of my depth or not? I already have the code for changing the colour which is located inside of here: HTML - changing color in text area from an option inside of a select box generated from mysql
has comment: http://stackoverflow.com/comment/46977500
type: UnansweredQuestion
score: -4
tagged with: php
tagged with: mysql
has comment: http://stackoverflow.com/comment/46977616
type: Question
answer count: 2
downvote count: 4
linked to: http://stackoverflow.com/q/29399075
upvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29400953
favorite count: 0
has answer: http://stackoverflow.com/a/29401079
has comment: http://stackoverflow.com/comment/46977523
has title: HTML - using mysql/php to generate a select box. how can I change the "value" of the generated select box options?

http://stackoverflow.com/a/29491717
answers question: http://stackoverflow.com/q/29491317
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Can you please try this Afisati

http://stackoverflow.com/comment/47195435
has text: @Francisc correct me if im wrong, as i understand `a` and `b` is passed by `sort` and they are objects from following indexes of array like 1-2, 2-3 e.t.c, this function must return for `sort` `-value` `+value` or `0`. As i understand `sort` will iterate over all the indexes, but HOW he will change the position of the element. Moving by one step in direction according to returned by func in sort value? Ain't it going to be more effective to manually loop through and splice out and in as I already KNOW in which place those objects must be.
comment on: http://stackoverflow.com/q/29519811
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47018908
comment on: http://stackoverflow.com/a/29423430
has text: Yes very true jsHint will bother you about that one, but sometimes you want that effect from your code. It's just one thing that makes JS that sweet.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29415369
accepted answer of: http://stackoverflow.com/q/29415263
score: 2
answers question: http://stackoverflow.com/q/29415263
upvote count: 2
has comment: http://stackoverflow.com/comment/47013735
has body: THREE.MeshBasicMaterial() is not affected by light. Change it to THREE.MeshLambertMaterial() or THREE.MeshPhongMaterial() EDIT: In addition THREE.PointLight() does not affect THREE.MeshBasicMaterial() as per http://threejs.org/docs/#Reference/Lights/PointLight. As per the PointLight() and the interaction with MeshLambertMaterial() you have an error in your code: The lines light1.position.set = new THREE.Vector3(0, -120, 150); light2.position.set = new THREE.Vector3(0, 120, 150); should be light1.position.set (0, -120, 150); light2.position.set (0, 120, 150);
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47222917
type: Answer

http://stackoverflow.com/comment/46960012
type: QuestionComment
has text: Is this webstorm 10?
score: 0
comment on: http://stackoverflow.com/q/29391481
type: Comment

http://stackoverflow.com/a/29490956
accepted answer of: http://stackoverflow.com/q/29469476
type: Answer
score: 1
has body: Try this code. $scope.grid= function (targetElement) { var $div = $("&lt;div style='height:200px' &gt; Sample code &lt;/div&gt;"); $(targetElement).append($div); angular.element(targetElement).injector().invoke(function($compile) { var scope = angular.element($div).scope(); $compile($div)(scope); }); }
upvote count: 1
answers question: http://stackoverflow.com/q/29469476
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29480207
upvote count: 2
answers question: http://stackoverflow.com/q/29480157
has body: How about var id = Date.now(); for (var i = 0; i &lt; obj.length; i++) { console.log(id+i); }
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/a/29476208
downvote count: 0
has comment: http://stackoverflow.com/comment/47145767
type: Answer
score: 3
has body: As has already been pointed out, you need different top and left coordinates. Otherwise, all circles will lie along a diagonal line. You then need a way of determining if two circles are touching (or are within a given "margin" of each other). You can do this by determining the center (origin) of the circles and applying the distance formula: If the distance is greater than the sum of the radii plus the margin, then the circles are okay. Here's the code for that: function touching(margin) { var result= false; $('.tag').each(function() { var t1= $(this), t1radius= t1.width()/2, t1x= t1.offset().left + t1radius, t1y= t1.offset().top + t1radius; $('.tag').not(t1).each(function() { var t2= $(this); t2radius= t2.width()/2, t2x= t2.offset().left + t2radius, t2y= t2.offset().top + t2radius, dist= Math.sqrt((t2x-t1x)*(t2x-t1x) + (t2y-t1y)*(t2y-t1y)); if(t1radius &amp;&amp; t2radius &amp;&amp; dist&lt;t1radius+t2radius+margin) { result= true; } }) }); return result; } //touching In the following code, the circles are placed randomly within their container until they're not "touching" within 20px of each other. Background colors are assigned randomly. The font size is a function of the circle size: $('.tag').each(function(idx) { do { var container= $(this).parent(), diam= Math.round(Math.random() * 75 + 50), top = Math.round(Math.random() * (container.height() - diam)), left= Math.round(Math.random() * (container.width() - diam)), bg= '#'+(Math.random()*128+32&lt;&lt;0).toString(16)+(Math.random()*128+32&lt;&lt;0).toString(16)+(Math.random()*128+32&lt;&lt;0).toString(16); $(this) .css({ top : top, left : left, width : diam, font : diam/5+'px verdana', lineHeight : diam+'px', background : bg }) .html('tag '+(idx+1)); } while(touching(20)); }); Fiddle
answers question: http://stackoverflow.com/q/29473829
upvote count: 3

http://stackoverflow.com/comment/47063736
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29446991
has text: Is there a way to convert materials?

http://stackoverflow.com/comment/47626700
type: Comment
has text: I managed to resolve half of the problem. The (partial) wanted behavior is [this](https://jsfiddle.net/DTcHh/6846/). Now the problem is that when I scroll up, I want the div to remember the last bottom position. And then when I hit the top, do the same thing.
comment on: http://stackoverflow.com/a/29433709
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46960101
score: 0
type: AnswerComment
has text: I'm not sure you can get that list without some tweaks. Take a look at this question which has a nice solution for storing the modules. http://stackoverflow.com/questions/24889783/angularjs-get-list-of-all-registered-modules
type: Comment
comment on: http://stackoverflow.com/a/29391389

http://stackoverflow.com/q/29419294
linked to: http://stackoverflow.com/q/24559234
upvote count: 2
type: UnansweredQuestion
downvote count: 2
has body: I am making UI end-to-end tests and before the tests are started, we want to build the data required by the test. To do that, we use CasperJS and the waitForResource() function. We want to wait until the resource has been created in the database. Like wait for http GET response status switch from 404 to 200 (or 201). It's an API REST. The code: casper.waitForResource(urls.rootBE + 'ratecards/default?api_key=' + user.apiKey + '&amp;company=' + organization.id, function(resource) { utils.dump(resource); }); This doesn't work. Do you have an idea how to do this?
has title: Casperjs waitForResource
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/36276945
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/47039116
has comment: http://stackoverflow.com/comment/47028305
linked to: http://stackoverflow.com/q/24555370
favorite count: 0
has answer: http://stackoverflow.com/a/29794316
has answer: http://stackoverflow.com/a/41993301
tagged with: casperjs

http://stackoverflow.com/comment/47178961
has text: Xanatos is right. The encoding is incorrect. Try changing the encoding format...
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29511373
type: Comment

http://stackoverflow.com/q/29428166
upvote count: 3
has title: custom calendar using javascript
type: Question
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/30443990
tagged with: javascript
has answer: http://stackoverflow.com/a/30443817
has comment: http://stackoverflow.com/comment/47026956
favorite count: 0
has body: I want to create a calendar with date picker using java script of my own design without using any j-query library. I found one code and i created calendar with that but i am not to find how to five next and previous month button in calendar and i want to highlight the current date. I also need to click on date to perform certain operations. How do it do it?? Please help me. This is my code // these are labels for the days of the week cal_days_labels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; // these are human-readable month name labels, in order cal_months_labels = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; // these are the days of the week for each month, in order cal_days_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; // this is the current date cal_current_date = new Date(); function Calendar(month, year) { this.month = (isNaN(month) || month == null) ? cal_current_date.getMonth() : month; this.year = (isNaN(year) || year == null) ? cal_current_date.getFullYear() : year; this.html = ''; } Calendar.prototype.generateHTML = function () { // get first day of month var firstDay = new Date(this.year, this.month, 1); var startingDay = firstDay.getDay(); // find number of days in month var monthLength = cal_days_in_month[this.month]; // compensate for leap year if (this.month == 1) { // February only! if ((this.year % 4 == 0 &amp;&amp; this.year % 100 != 0) || this.year % 400 == 0) { monthLength = 29; } } // do the header var monthName = cal_months_labels[this.month] var html = '&lt;table class="calendar-table"&gt;'; html += '&lt;tr&gt;&lt;th colspan="7"&gt;'; html += monthName + "&amp;nbsp;" + this.year; html += '&lt;/th&gt;&lt;/tr&gt;'; html += '&lt;tr class="calendar-header"&gt;'; for (var i = 0; i &lt;= 6; i++) { html += '&lt;td class="calendar-header-day"&gt;'; html += cal_days_labels[i]; html += '&lt;/td&gt;'; } html += '&lt;/tr&gt;&lt;tr&gt;'; // fill in the …
type: UnansweredQuestion
tagged with: calendar
score: 3

http://stackoverflow.com/comment/47201101
type: AnswerComment
has text: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackoverflow.com/rooms/74748/discussion-on-answer-by-juaroal-jquery-datatable-column-filter-select-dropdown).
score: 0
comment on: http://stackoverflow.com/a/29487952
type: Comment

http://stackoverflow.com/comment/47170202
has text: In that example when we click on the drop down there it will show all the parent and child lists . when we click on any of the child lists it needs to slide up and slide down. That is my requirement.
comment on: http://stackoverflow.com/q/29506553
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/47057982
type: QuestionComment
has text: @YuryTarabanko I have checked many posts and articles for pushstate and history.js but they all have very little documention and I dont know how to apply this to my code.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29445179

http://stackoverflow.com/a/29781717
upvote count: 2
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29376101
has body: In a modern browser-based environment, you can't alter the Accept-Encoding, thanks to the Same-Origin policy for HttpRequest: Link to Google's explanation For your brain-dead device, the best workaround is a server-side proxy that fetches the content and ignores the incorrect encoding, and then returns the results with a sane set of headers.

immutability
tags question: http://stackoverflow.com/q/29493072
tag name: immutability
type: Tag

http://stackoverflow.com/q/29373864
has title: Trying to understand DRY principles in Javascript
type: Question
possible better answer: http://stackoverflow.com/a/29393237
tagged with: performance
has answer: http://stackoverflow.com/a/29393237
has comment: http://stackoverflow.com/comment/46929393
tagged with: javascript
tagged with: jquery
upvote count: 2
has answer: http://stackoverflow.com/a/29374383
accepted answer: http://stackoverflow.com/a/29374383
favorite count: 0
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/46929536
has body: I am currently trying to sharpen my refactoring skills, I have a block of code that I have written that has two methods that are very similar, and I am trying to wrap my head around simplifying my bloated code, any suggestions would be welcome. As you can see the two methods are very similar, and the only real difference is the URL the POST to. authenticateA : function( e ) { var $this = $( e.target ).closest( '[data-fn]' ) , text = $this.text() , that = this; $this.text( 'Authenticating...' ).addClass("auth-button-disable") $.ajax({ type : 'POST', url : '/A_authentications/update/', data : { _method : 'PUT', sms_token : this.$el.find( '#sms-input' ).val() }, complete: function( xhr ) { if ( xhr.status === 200 ) that.relocate(); else { $this.text( text ).removeClass("auth-button-disable"); that.handleError( xhr.status ); } }, dataType : 'json' }); }, authenticateB : function( e ) { var $this = $( e.target ).closest( '[data-fn]' ) , text = $this.text() , that = this; $this.text( 'Authenticating...' ).addClass("auth-button-disable") $.ajax({ type : 'POST', url : '/B_authentications/', data : { otp : this.$el.find( '#B-input' ).val() }, complete: function( xhr ) { if ( xhr.status === 200 ) that.relocate(); else { $this.text( text ).removeClass("auth-button-disable"); that.handleError( xhr.status ) } }, dataType : 'json' }); } I call the methods as click functions in an events block: 'click [data-fn="authenticate-A"]' : 'authenticateA', 'click [data-fn="authenticate-B"]' : 'authenticateB' I think these could be refactored into one method or two slimmer methods, I'm just not sure where to start, thanks again in advance.
tagged with: dry
has comment: http://stackoverflow.com/comment/46963488
has answer: http://stackoverflow.com/a/29379477
answer count: 4
type: AnsweredQuestion
score: 2
linked to: http://stackoverflow.com/q/15821141
has answer: http://stackoverflow.com/a/29374317
downvote count: 0
has comment: http://stackoverflow.com/comment/46929114

http://stackoverflow.com/q/29392716
tagged with: tooltip
tagged with: javascript
type: Question
score: 0
answer count: 1
tagged with: kartograph
has answer: http://stackoverflow.com/a/29407854
has title: edit tooltip on a kartograph map
has body: I'm using kartograph on a map to adapt style/tooltip depending on data, so I follow this showcase : http://kartograph.org/showcase/choropleth/ map.addLayer('layer_0', { styles: { 'stroke-width': 0.7, fill: function(d) { return color(stars[d["nuts-id"]]? stars[d["nuts-id"]].total_stars: 0); }, stroke: function(d) { return color(stars[d["nuts-id"]]? stars[d["nuts-id"]].total_stars: 0).darker(); }, }, tooltips: function(d) { return [d["nuts-id"], stars[d["nuts-id"]]? stars[d["nuts-id"]].total_stars: 0]; } }); The map is good, now I want to edit it. For the style I did it successfully with : map.getLayer('layer_0').style('fill', function(d) { ... }); map.getLayer('layer_0').style('stroke', function(d) { ... }); But I don't manage to edit the tooltip function... I try this solution : https://github.com/kartograph/kartograph.js/wiki/Tooltips but I get a "map.tooltips is not defined" error...
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29407854

grunt-contrib-watch
tags question: http://stackoverflow.com/q/29483259
type: Tag
tag name: grunt-contrib-watch

http://stackoverflow.com/a/29446402
downvote count: 0
has body: You can use Array.indexOf and inverting the conditions such as... checking if individual data can be found inside the condition but also ignore the filter if there is nothing in it (by checking its length) as shown below... var matchingSet = peoples.filter(function(p) { return (filterObj.sex.length === 0 || filterObj.sex.indexOf(p.people.sex) !== -1) //peoples' sex must exists in the filter.sex or ignore it if filter not specified &amp;&amp; (filterObj.diet.length === 0 || filterObj.diet.indexOf(p.people.diet) !== -1); //and people's diet must exists in the filter.diet or ignore it if filter not specified }); Afterward, use Array.map to pull out just the favPlaces out of the matching set. var matchingPlaces = matchingSet.map(function(p) { return p.people.favPlaces; }); And finally, use Underscore (easier than making your own since I think there is no native JavaScript Array methods for this yet... to flatten out, extract unique values from the favPlaces arrays and sort it (as extra bonus): var flatten = _.chain(matchingPlaces) .flatten() .uniq() .sortBy(function(p) { return p; }) .value(); This will yield you the result that you are looking for. ["place1","place2","place3","place4"] Full example can be found at: http://jsfiddle.net/rdfyp5c9/2/ Note that in the example I removed the diet filter elements: var filterObj = { 'sex' : ['male'], 'diet': [] }; and it is correctly returning ["place1","place2","place4"] for result. You can definitely refine the filter at the matchingSet assignment line to check for say if filterObj.sex is not truthy and only perform the length check if it is array, etc. but to keep thing simple... this particular solution assume that if you don't want diet in filter, it is required to just pass empty array as diet...
accepted answer of: http://stackoverflow.com/q/29445881
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29445881
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/29436027
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Clean form when return back
type: Question
has answer: http://stackoverflow.com/a/29436070
score: 0
has answer: http://stackoverflow.com/a/29436179
has comment: http://stackoverflow.com/comment/47041288
possible better answer: http://stackoverflow.com/a/29436179
tagged with: javascript
has body: I would like to know if there is the possibility of going to clean up the fields of a form when you return back to the site by clicking on the back button of the browser. I have the problem that in the home of my site I have a form that leads to research in another page if the user presses the back button of the browser instead of the link I posted to get back, the previous form is loaded with data the previous search. Can I create a Javascript that even when you press back he manages to reload the form? I think there is a problem that the page on the back does not recharge the html code
accepted answer: http://stackoverflow.com/a/29436070
answer count: 2

http://stackoverflow.com/a/29458176
has comment: http://stackoverflow.com/comment/47080624
answers question: http://stackoverflow.com/q/29458037
has body: You can't do what you want in this way. This function: function fun1() { document.getElementById('2').src="b.html"; } is working IN IFRAME, and not in MAIN WINDOW. Try look at window.postMessage methods. UPDATE working with window.postMessage look like that: 1) in child window will be function function fun1() { window.postMessage(JSON.stringify({"id":2,"src":"b.html"}),'http://parent.window.com'); } 2) in parent window, you should listen for this event, so add on start of page: window.addEventListener("message", receiveMessage, false); function receiveMessage( event ) { if (event.origin !== "http://example.org:8080") return; try{ var data = JSON.parse(event.data); if( data.id != undefined &amp;&amp; data.src != undefined ){ document.getElementById(data.id).src = data.src; } } catch( exception ){ console.log( exception);} }
score: 0
type: Answer

http://stackoverflow.com/comment/47179512
score: 0
type: Comment
type: QuestionComment
has text: Move the spinner outside of `#ajax_loader`
comment on: http://stackoverflow.com/q/29511873

http://stackoverflow.com/comment/47145093
comment on: http://stackoverflow.com/q/29492597
has text: You could add a class to the divs and hide them using `document.getElementsByClassname()` (returns an array, you need to iterate over it).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29387950
has answer: http://stackoverflow.com/a/41115315
downvote count: 0
has comment: http://stackoverflow.com/comment/75893549
tagged with: javascript
answer count: 3
tagged with: node.js
favorite count: 0
has comment: http://stackoverflow.com/comment/46954177
has answer: http://stackoverflow.com/a/29497886
tagged with: google-chrome
has answer: http://stackoverflow.com/a/37823439
has body: Example console.time("Test"); for(var i=0; i <2500000; i +=1 ){ // loop around } console.timeEnd("Test"); The above code runs faster in nodejs than google chrome. Why node.js is faster than google chrome both are using chrome v8 engine Note Average speed Google Chrome - 1518.021ms Node.js - 4 ms Any idea about the difference execution speed?
upvote count: 17
type: Question
type: AnsweredQuestion
score: 17
has title: Performance of Google chrome vs nodejs (v8)?
possible better answer: http://stackoverflow.com/a/41115315
has comment: http://stackoverflow.com/comment/99483742
accepted answer: http://stackoverflow.com/a/29497886

http://stackoverflow.com/comment/47022353
comment on: http://stackoverflow.com/a/29425555
type: AnswerComment
has text: Ha, I'm not sure why I'm always getting `undefined`: `Uncaught TypeError: Cannot call method 'insertAdjacentHTML' of undefined` http://www.chineselearnonline.com/amember/member.php
score: 0
type: Comment

http://stackoverflow.com/comment/47110654
type: AnswerComment
has text: I found a solution from another stack overflow page [that should work fine](http://stackoverflow.com/questions/12134014/how-can-i-programmatically-open-the-file-picker-with-javascript). Accomanying JS fiddle here: http://jsfiddle.net/fEBFp/1/
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29473842

http://stackoverflow.com/q/29412947
answer count: 2
accepted answer: http://stackoverflow.com/a/29413881
downvote count: 0
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/29413881
possible better answer: http://stackoverflow.com/a/29415472
has body: I want my gruntfile.js to be naturally structured so that micro-tasks follow each other one by one. Suppose I have the following structure: grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), clean: { movedTyping: 'options...' }, copy: { typing: 'options...', lessVariables: 'options...', html: 'options...' }, less: { compile: 'options...' }, typescript: { compile: 'options...' } }); grunt.registerTask('build', [ // TYPESCRIPT 'typescript:compileSingle', 'copy:typing', 'clean:movedTyping', // LESS 'less:compile', 'copy:lessVariables', // HTML 'copy:html' ]); But I would like to achieve the other structure: grunt.registerTask('build', function () { // TYPESCRIPT grunt.task.run('typescript', 'options...'); grunt.task.run('copy', 'options...'); grunt.task.run('clean', 'options...'); // LESS grunt.task.run('less', 'options...'); grunt.task.run('copy', 'options...'); // HTML grunt.task.run('copy', 'options...'); }); How?
has answer: http://stackoverflow.com/a/29415472
type: Question
score: 3
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/47040111
has title: Register Grunt tasks without grunt.initConfig()

http://stackoverflow.com/comment/47028419
type: Comment
comment on: http://stackoverflow.com/q/29428922
type: QuestionComment
has text: After reading their doc, it doesn't seem there is any special configuration for devices. I would believe that this is a bug. I tryed on both safari & Chrome, nothing happend, only the link "scroll the content to x px".
score: 0

http://stackoverflow.com/q/29443336
has comment: http://stackoverflow.com/comment/47054412
linked to: http://stackoverflow.com/q/784929
has body: I see someone wrote Return || item in Javascript, what does this mean in a hacky form of code? https://youtu.be/RpQTPWvD6HA?t=38m47s
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47054386
has comment: http://stackoverflow.com/comment/47054393
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29443392
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29443392
has title: Return || item is a valid syntax?

http://stackoverflow.com/a/29561983
answers question: http://stackoverflow.com/q/29450537
type: Answer
has body: Wanted to post and answer my own question to help another beginner like me attempting to self teach with books and exercises at the end of chapters. The answers all of you provided at some point will be the way to go, however I wanted to maintain what was learned in each chapter. Gradually i hope to advance and want to understand the solutions and the topics. Thanks again. Here is the code that works for me. All that is missing is some data validation for positive integers. function simpleSquare() { myArray = new Array([document.getElementById("cell00"), document.getElementById("cell01"), document.getElementById("cell02")], [document.getElementById("cell10"), document.getElementById("cell11"), document.getElementById("cell12")], [document.getElementById("cell20"), document.getElementById("cell21"), document.getElementById("cell22")]); for(var rows = 0; rows &lt; 3; rows++) { for(var cols = 0; cols &lt; 3; cols++) { var nums = parseInt(prompt("Enter a number for row " + (rows + 1) + ", column " + (cols + 1) + ".")); myArray[rows][cols].innerHTML = nums; } } } function checkMagic() { var flag = true; var sumDiag1 = parseInt(myArray[0][0].innerHTML) + parseInt(myArray[1] [1].innerHTML) + parseInt(myArray[2][2].innerHTML); var sumDiag2 = parseInt(myArray[2][0].innerHTML) + parseInt(myArray[1] [1].innerHTML) + parseInt(myArray[1][2].innerHTML); if(sumDiag1 != sumDiag2) flag = false; //get sum of rows using for loop and check if they are the same for(var i = 0; i &lt; 3; i++) { var rowSum = parseInt(myArray[i][0].innerHTML) + parseInt(myArray[i] [1].innerHTML) + parseInt(myArray[i][2].innerHTML); if(rowSum != sumDiag1) //check if row is same as diagonal flag = false; } for(var j = 0; j &lt; 3; j++) { var colSum = parseInt(myArray[0][j].innerHTML) + parseInt(myArray[1] [j].innerHTML) + parseInt(myArray[2][j].innerHTML); if(colSum != sumDiag2) flag = false; } //output the results to table if(flag == false) document.getElementById("magic").innerHTML=("Sorry, your square is n…
score: 0

http://stackoverflow.com/a/29474922
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29455559
accepted answer of: http://stackoverflow.com/q/29455559
has body: You can't use literal notation to set the name of a key via the value of a variable. Try this way: var update = { "$set" : { } } update["$set"][articlePath] = { "value" : articleValue } db.mycollection.update({ "_id" : catId }, update, *callback*)

http://stackoverflow.com/q/29424911
favorite count: 0
type: AnsweredQuestion
has title: protractor executeScript weirdness with ElementArrayFinder
has answer: http://stackoverflow.com/a/29425008
score: 1
upvote count: 1
type: Question
has body: I have this declared in my Page Object: this.paginationPageNumberList = element.all(by.repeater("page in pages track by $index")); Running this inside a function of Page Object, its successful and prints 'no wrap': browser.executeScript('window.scrollTo(254,1600);'); this.paginationPageNumberList.get(0).then(function() { console.log("no wrap"); }); Running the same thing except with a then() gives me an error: browser.executeScript('window.scrollTo(254,1600);').then(function () { this.paginationPageNumberList.get(0).then(function() { console.log("wrap"); }); }); Failed: Cannot call method 'get' of undefined. Why?
tagged with: testing
tagged with: pageobjects
tagged with: protractor
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29425008
linked to: http://stackoverflow.com/q/3127429
answer count: 1
downvote count: 0
tagged with: end-to-end

http://stackoverflow.com/q/29492977
tagged with: code-signing
tagged with: firefox-addon
tagged with: cryptography
tagged with: digital-signature
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
type: Question
has body: I have below error While code signing for Firefox crypto control. Its a Java Script Application. psigntoolext_signArchiveFile(): xpsigntoolext_extractArchiveFile() failed - ex : [Exception... "Component returned failure code: 0x8052000b (NS_ERROR_FILE_CORRUPTED) [nsIZipReader.open]" nsresult: "0x8052000b (NS_ERROR_FILE_CORRUPTED)" location: "JS frame :: chrome://keymanager/content/tools/xpsigntoolext/XPSignToolFormSign.js :: getZipReaderForFile :: line 537" data: no
has title: Java Application Error while crypto control Code signing in firefox
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/29423849
upvote count: 1
has body: I'm a fairly new JavaScript programmer and I just downloaded Sublime Text 3. I tried to install node on it so that I can build with javascript but whenever I try and run a simple console.log("Hello World") on it with Ctrl+B, it doesn't display anything but just says [Finished in 0.2s] without actually logging anything to the console. My sublime build folder for Node is titled Node.sublime-build and contains this: { "cmd": ["node.exe", "${file}"], "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "working_dir": "${file_path}", "selector": "source.js", "variants": [ { "name": "Run", "cmd":["node.exe", "${file}"] } ] } I've searched everywhere for an answer but I just cant figure out why the results don't display. If you know what's wrong please let me know.
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31197904
has title: Why is my JavaScript builder that I set up with node.js in Sublime Text 3 not showing the build results?
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
type: Question
tagged with: sublimetext3
tagged with: node.js

http://stackoverflow.com/comment/47056341
type: QuestionComment
type: Comment
score: 1
has text: Well, maybe before doing something you should learn "base things" about how all these work? If you don't know how to include scripts and how they work, it's time to learn this. There are tons of books, online guides, seminars and so on.
comment on: http://stackoverflow.com/q/29444379

http://stackoverflow.com/comment/47202293
has text: have you tried selecting them like so : d3.selectAll("days.g"); ? Can you put a basic JSFiddle together so we can try stuff out ?
comment on: http://stackoverflow.com/q/29522454
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47168653
comment on: http://stackoverflow.com/q/29505723
has text: I would do one of two things if I were building this and it needed a preview function, 1) render preview server side and send images, or 2) send a low-poly/quality model for preview.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29514672
tagged with: google-maps
has title: Adding Google Maps to project and retrive locatons from database using ASP.NET
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29551190
tagged with: google-maps-api-3
tagged with: asp.net
tagged with: http://stackoverflow.com/tag/xml
has body: what i mean i have xml file retrieve the database i want it as xml file and has fields i want to display it on Google map like 'city,country,street,longitude,latitude' i want take values from this fields and display it on google map.i want to display this map at page load event.the problem i can not know how retrieve the data from xml file and pass it to map . This is code behind, void GetTableFromXMlData(string strResult) { CreateTable(); XmlDataDocument xmlDataDoc = new XmlDataDocument(); xmlDataDoc.LoadXml(strResult); foreach (XmlNode n in xmlDataDoc.DocumentElement.GetElementsByTagName("Property")) { DataRow dr = dtSearchResult.NewRow(); dr["HotelID"] = n.Attributes["IDHotel"].Value; dr["HotelName"] = n.Attributes["Hotelname"].Value; dr["MinRate"] = n.Attributes["MinRate"].Value; dr["MaxRate"] = n.Attributes["MaxRate"].Value; dr["StarCategory"] = n.Attributes["StarCategory"].Value; dr["ImageIdentifier"] = n.Attributes["ImageIdentifier"].Value; dr["VPhotoPath"] = strVirtualPath + n.Attributes["ImageIdentifier"].Value + "_Exterior.jpg"; if (n.HasChildNodes) { foreach (XmlNode childNode in n) { switch (childNode.Name) { case "GEOData":///-----&gt;&gt;&gt;&gt; here this the data i want to display it in a map. { dr["CountryCode"] = childNode.Attributes["CountryCode"].Value; dr["CityName"] = childNode.Attributes["City"].Value; dr["CityID"] = childNode.Attributes["IDCity"].Value; dr["Zip"] = childNode.Attributes["Zip"].Value; dr["Street"] = childNode.Attributes["Street"].Value; dr["Longitude"] = childNode.Attributes["Longitude"].Value; dr["Latitude"] = childNode.Attributes["Latitude"].Value; break; } case "Distances": { foreach (XmlNode cChildNode in childNode) { if (cChildNode.Attributes["Type"].Value == "1") dr["DistanceToCity"] = cChildNode.Attributes["Distance"].Value; else dr["DistanceToAirPort"] = cChildNode.Attributes["Distance"].Value; } break; } case "Descriptions": { dr["Descriptions"] = childNode.FirstChild.Attributes["Text"].Value; ((Label)FindControl("lblH…
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29521115

http://stackoverflow.com/a/29501256
has comment: http://stackoverflow.com/comment/47161044
has comment: http://stackoverflow.com/comment/47162055
answers question: http://stackoverflow.com/q/29501040
upvote count: 1
type: Answer
has body: You can solve this using recursive functions, try with something like this: function arraySum(arr) { var sum = 0; for (var i = 0; i &lt; arr.length; i++) { if (arr[i] === Math.round(arr[i])) { sum += arr[i]; } if (arr[i] instanceof Array) { sum += arraySum(arr[i]); //This will apply the same function to the current Array element which is an Array } } return sum; //To have the sum of the actual Array } var sumArr = [[[[[[[[[1]]]]]]]], 1]; console.log(arraySum(sumArr)); //now it returns 2
downvote count: 0
score: 1

http://stackoverflow.com/a/29508558
has comment: http://stackoverflow.com/comment/47177168
answers question: http://stackoverflow.com/q/29508303
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/47173852
downvote count: 0
score: 1
has body: When you call it like that: '/usr/local/bin/casperjs script.js "[\''+yourURL+'\',\''+yourRegex+'\']"' You could simply use a = JSON.parse(casper.cli.args[0]), w = a[0], r = new RegExp(a[1]); If casper.cli.args[0] is actually JSON, then it can be parsed as such. resourceExists() takes regular expressions only as RegExp objects. A better way if the data that you pass gets too long, then you should write the data to a temporary file with node.js' fs module and read it with PhantomJS' fs module, parsing it along the way.

http://stackoverflow.com/comment/47089766
comment on: http://stackoverflow.com/q/29461865
score: 0
has text: see this post, it should help http://stackoverflow.com/questions/14782408/xml-jquery-reading
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29472233
tagged with: ajax
has comment: http://stackoverflow.com/comment/47106128
has body: I'm trying to make an email poll where my users should rate the service they had. Something simple (see image below) I know how to do it using the syncronous way: &lt;form action= "myAction" method="post"&gt; ... &lt;input&gt;.... Anyway, each time I try to do something with javascript, gmail removes it: Example: &lt;script&gt; mymethod(){..} &lt;/script&gt; &lt;button onclick="mymethod"&gt; turns inspecting the mail into just: &lt;button &gt; Any reason?
upvote count: 1
tagged with: email
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47105849
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/29472383
downvote count: 0
score: 1
type: Question
has title: Trying to insert one ajax call inside an html email
tagged with: javascript

http://stackoverflow.com/a/29529844
has body: Try using the ng-style directive: https://docs.angularjs.org/api/ng/directive/ngStyle
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29529835
score: 1

http://stackoverflow.com/comment/47107323
type: Comment
has text: I am getting an error number is not a function on this line var titleCount = $('li.article_title').length();
type: AnswerComment
comment on: http://stackoverflow.com/a/29472865
score: 0

http://stackoverflow.com/comment/47178245
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29510885
has text: Thanks @nemesv It is working please post you answer i will accept and close this question
score: 0

http://stackoverflow.com/comment/47132227
type: Comment
type: QuestionComment
score: 3
has text: `data` is not instanceof `Array`?
comment on: http://stackoverflow.com/q/29486353

http://stackoverflow.com/q/29427196
tagged with: javascript
has comment: http://stackoverflow.com/comment/47025016
answer count: 1
favorite count: 0
duplicate of: http://stackoverflow.com/q/4547609
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29427214
upvote count: 0
accepted answer: http://stackoverflow.com/a/29427214
has comment: http://stackoverflow.com/comment/47025035
downvote count: 2
has title: Explode string without separators
type: Question
has body: I have a string like 12345 and I need to explode it to [1,2,3,4,5]. Normally, I would use split, but there are no separators in here. I could use substr (getting length, making loops), but I will probably have a lot of those strings, so it may not be good for performance. What can I do?
score: -2
has comment: http://stackoverflow.com/comment/47025152
linked to: http://stackoverflow.com/q/4547609

http://stackoverflow.com/q/29412312
has comment: http://stackoverflow.com/comment/46999380
tagged with: smarty
type: Question
has comment: http://stackoverflow.com/comment/46999365
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46999693
score: 0
has comment: http://stackoverflow.com/comment/47003875
has body: I have a smarty template that uses jQuery clones; i.e. a click on a button will call jQuery and jQuery will add a select field to a page. However, the select field is supposed to be dynamically populated within the smarty template. I have outlined below what i'm trying to achieve. addProject.php // Load supervisor list into an object and pass it to smarty $smarty-&gt;assign_by_ref('supervisor', $supervisor-&gt;results()); $smarty-&gt;display('superusers/addProject.tpl'); superusers/addProject.tpl &lt;div&gt; &lt;p class="add add-data add-another-supervisor2"&gt;&lt;i class="sprite plus2"&gt;&lt;/i&gt; &lt;span&gt;Add &lt;b class="hide"&gt;another&lt;/b&gt; supervsior&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;script src="js/cloneformcontrols.js"&gt;&lt;/script&gt; js/cloneformcontrols.js $("#main").on("click", ".add-data", function() { var mytarget = $(this).closest('.clonable').find('.clone:last'); var myparent = $(this).closest('.clonable'); var filename = "../smarty/templates/default/superusers/clones/add-supervisor.tpl"; var theCloneHtml = '&lt;div class="clone" id="cloneID' + formNameIncrement + '"&gt;'; var theCloneId = 'cloneID' + formNameIncrement; if ($(this).hasClass('add-another-supervisor2')) {filename = "../smarty/templates/default/superusers/clones/add-another-supervisor.tpl";} myparent.addClass('data-added'); mytarget.after($(theCloneHtml).load(filename, function() { $(this).hide().fadeIn('slow'); updateNameAttribute(theCloneId); // need to update the name atribute or validation won't work })); formNameIncrement++; }); clones/add-another-supervisor.tpl &lt;div class="standard-row add-admin-row input-row"&gt; &lt;label class="ib ib217"&gt; &lt;span class="plain-select"&gt; &lt;select class="inp" data-myname="supervisor[]" name="supervisor[]"&gt; &lt;option value=""&gt;Select one&lt;/option&gt; {section name="i" loop=$supervisor} &lt;option value="{$supervisor[i]-&gt;id}"&gt;{$supervisor[i]-&gt;name}&lt;/option&gt; {/section} &lt;/select&gt; &lt;/span&gt; …
tagged with: smarty2
answer count: 0
type: UnansweredQuestion
has title: Pass object from Smarty to jQuery

http://stackoverflow.com/a/29465028
downvote count: 0
answers question: http://stackoverflow.com/q/29463716
has body: To keep the regular expression simple, you could use the callback mechanism to keep track of the opening and closing parentheses: var t = 'Test test test (test). Test (test test) test test.'; // keep track of open state and last index var s = { open: false, index: 0 }; var res = t.replace(/\w+/g, function($0, index) { // update state for (var i = s.index; i &lt; index; ++i) { if (t[i]=='(' || t[i] == ')') { s.open = !s.open; // assume balanced parentheses } } s.index = index; // return first letter if outside of parentheses return s.open ? $0 : $0[0]; }); console.log(res);
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/47110369
upvote count: 1

http://stackoverflow.com/comment/46957958
type: QuestionComment
comment on: http://stackoverflow.com/q/29390206
has text: Not unless you deliberately send this value to the server with an ajax call or something. Client and server are two separated worlds that communicate through requests.
score: 0
type: Comment

http://stackoverflow.com/q/29486756
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29491047
tagged with: javascript
has title: Does there exist a documentation of the Javascript Liferay Service library? How is it possible to handle error cases?
tagged with: liferay
answer count: 1
downvote count: 0
favorite count: 0
has body: Liferay provides portlet developers Javascript code, which allows to call Liferay Services. When browsing the available API methods at /api/jsonws, a Javascript snippet is provided, which shows how this method can be called: Liferay.Service( '/method', { parameter: 'value' }, function(obj) { console.log(obj); } ); However, I can't find a real documentation of this feature. While this example perfectly shows how a Service method can be called, it doesn't show how one can handle error cases. When trying to find a documentation online, I also just found examples which showed how to call an API function, but not how to handle special cases, just like the above provided code.
tagged with: service
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29491047
score: 1
tagged with: liferay-service-builder

http://stackoverflow.com/q/29472202
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: ajax
has comment: http://stackoverflow.com/comment/47106060
has comment: http://stackoverflow.com/comment/47108012
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29473179
type: Question
answer count: 2
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/47108354
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29472323
has body: can any one help me please What Im trying to do is a phone app using HTML5, JQUERY, Json and PHP. I cannot use PHP pages in this as I will be packaging it with Phone Gap Cloud Compliler. I have tried using many scripts and suggestions that I have researched on the internet but cannot seem to get this to work. On the page I need to retrieve data from the database there are 6 text boxes or divs I wish to populate using a on page ajax request to a PHP processing page that gets the required data and forms it into a Json string, the following scripts will show where I am at presently. PHP Page:- this works as far as getting the data from the database and from the research I have done succssefully parces it into a Json format PHP Script ********************************************** &lt;?php include_once 'db_connect.php'; header("Content-Type: application/json"); //this will tell the browser to send a json object back to client not text/html (as default) session_start(); $return_arr = array(); $sql = "SELECT * FROM `autumnTerm`"; //query $result = mysqli_query($mysqli, $sql); while($row = mysqli_fetch_array($result)) { $row['term1start'] = date('d-m-y', strtotime($row['term1start'])); $row['term1finish'] = date('d-m-y', strtotime($row['term1finish'])); $row['term2start'] = date('d-m-y', strtotime($row['term2start'])); $row['term2finish'] = date('d-m-y', strtotime($row['term2finish'])); $row_array['term1start'] = $row['term1start']; $row_array['term1finish'] = $row['term1finish']; $row_array['term2start'] = $row['term2start']; $row_array['term2finish'] = $row['term2finish']; array_push($return_arr,$row_array); } echo json_encode($return_arr); ?&gt; this returns the following json :- [{"term1start":"01-04-15","term1finish":"02-04-15","term2start":"03-04-15","term2finish":"04-04-15"}] which I believe to be the right format. The Jquery:- &lt;script&gt; I think I am right in believing that document ready should run the jquery script on page load $(document).ready(function() { …
has comment: http://stackoverflow.com/comment/47107011
has comment: http://stackoverflow.com/comment/47108158
has title: Getting data from database on pageload jquery php
downvote count: 0

http://stackoverflow.com/comment/116082254
score: 0
comment on: http://stackoverflow.com/a/43133108
type: AnswerComment
type: Comment
has text: I have tested it on Edge Version 87.0.664.60 (Official build) (64-bit) and it works!. Regarding downloading large files, from UX point of view we see the download after a delay. What happens during this delay ? But what about the memory consuption at the browser level ?

http://stackoverflow.com/a/29444802
has body: you can have all form data together in serialized form like this. var formdata= $('#form_id').serialize(); also you can store one element at a time like this. in javascript var name =document.getElementById('name_id').value; var userName =document.getElementById('nameName').value; in jquery var name =$('#name_id').val(); var userName =$('#userName').val();
answers question: http://stackoverflow.com/q/29444748
type: Answer
score: 0

http://stackoverflow.com/comment/47177981
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29509967
has text: @dreamsynk : $watch is watching the reference of your object. If you assign your object to a new reference, angular wont see it, because your old reference is still there. You don't alter your array, you replace it by another.
type: AnswerComment

http://stackoverflow.com/comment/47085147
has text: Questions a bit confusing. You just want your material affected by lights?. I have a [blog post here](http://blog.2pha.com/experimenting-threejs-shaders-and-shadermaterial) in which I add my experiments with custom shaders. Maybe the last one will interest you as I added lights.
score: 2
comment on: http://stackoverflow.com/q/29456547
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29433122
downvote count: 0
has comment: http://stackoverflow.com/comment/47036803
type: Answer
score: 13
upvote count: 13
answers question: http://stackoverflow.com/q/29432863
has body: In this case, you can use the array of values as it is, with _.difference, like this console.log(_.difference(bar.foo, ['a', 'c'])); [ 'b' ]

http://stackoverflow.com/a/49910364
type: Answer
upvote count: 0
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/29432997
has body: You can try with JSON.stringify(data)
has comment: http://stackoverflow.com/comment/101106067

http://stackoverflow.com/comment/47108172
has text: @MarkoGrešak there's only a little bug: I tried it but once it reaches 1, then it does not decrease to 0 and keep displaying 1 instead of 0. how is that?
type: AnswerComment
comment on: http://stackoverflow.com/a/29473228
score: 0
type: Comment

http://stackoverflow.com/q/29467072
tagged with: asp.net-mvc-5
has comment: http://stackoverflow.com/comment/47096526
upvote count: 0
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29467094
favorite count: 0
score: -1
type: Question
answer count: 1
downvote count: 1
has title: Why is JS file showing 404 error by browser in my C# MVC project?
accepted answer: http://stackoverflow.com/a/29467094
has body: I am getting a 404 error for a JavaScript file that, as far as I can tell, is referenced correctly. Here is the error in Chrome console: I am referencing a JavaScript file ("~/Scripts/maps.js") in the CSHTML file as follows: The file is in the correct folder: I really don't know where I am going wrong - I have checked, checked and rechecked the path &amp; don't see what else what the problem could be.

http://stackoverflow.com/comment/47130350
type: AnswerComment
comment on: http://stackoverflow.com/a/29485225
score: 0
has text: using chrome,mozillla,IE9
type: Comment

http://stackoverflow.com/a/29404484
has body: You would need to add some JS to handle the click and then you can style using CSS. HTML: 1 2 3 4 5 JS: jQuery('#page_menus a').on('click', function() { if ($('a').hasClass('current')) { $('a').removeClass('current'); } $(this).addClass('current'); }); CSS: #page_menus a { cursor:pointer; color:black; background-color: #DBB7BA; border-radius: 8px; border-color: #860A18; padding-left: 6px; padding-right: 6px; } #page_menus a.current { background-color: #ccc; } Here is a working fiddle.
accepted answer of: http://stackoverflow.com/q/29404340
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46984291
score: 1
has comment: http://stackoverflow.com/comment/46984306
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46984169
has comment: http://stackoverflow.com/comment/46984116
answers question: http://stackoverflow.com/q/29404340

http://stackoverflow.com/comment/47451743
type: Comment
comment on: http://stackoverflow.com/a/29434990
score: 0
type: AnswerComment
has text: It's also possible to directly use the subscribe and unsubscribe methods of the LiveView.Connection class to use callbacks, if you are not partial to the use of then(), which is a Promise [http://modernjavascript.blogspot.com/2013/09/promise-patterns.html].

http://stackoverflow.com/q/29463491
has answer: http://stackoverflow.com/a/29464363
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47090368
tagged with: byte
has title: Payload bytes different from actual bytes
has comment: http://stackoverflow.com/comment/47090511
has body: I've got a problem where when the user sends image data, it's saved on the server corrupt. So, I essentially have this setup: - api . index.js - methods . users.js (I've cut out files that are unrelated to the problem) Outside of the API file, there is a server.js which initaites it whenever api.example.com is visisted. (Basically like a VirtualHost) That being said. Here is the problem: ./api/index.js (Points of problem) // All this essentiall does is get the get the whole payload as a buffer. req.on("data", function(chunk){ // Potential problem area. req.api.payload = ((req.api.payload) ? (Buffer.concat([req.api.payload, chunk])) : (chunk)); }); req.on("end", function(){ // Check if we're on api.example.com/users/ if (path[0].match(/^users$/i)) { methods.users(req, res); } }); I think the issue is somewhere when the payload. But... Just incase, I'll include the ./api/methods/users.js... (Only including parts where the problem could arise, since it's a big file) ./api/methods/users.js else if (req.method.match(/^POST$/i)) { if (!path[2] || path[2].match(/^(?:info|data)$/i)) { // ... (Everything that was here didn't apply to the image upload) } else if (path[2].match(/^(?:pic|picture|avatar)$/i)) { // Url matches api.example.com/users/&lt;user_id&gt;/pic var __base = "/home/user/web/hosts/resources/static/images/api/users/"; // Upload path // Another potential spot where the problem could be. fs.writeFile(__base + path[1] + ".png", req.api.payload, "binary", function(err){ if (err) res.api.end(err); res.api.end(req.api.payload.slice(0, 40)); // Testing }); } } Note that this is just for testing the uploading, I realize someone could upload other data, but this is local. It's simply for testing the uploaded data, for now. Another note, any variable that you don't see explicitly defined is not related to the problem, just no that: path: Url as array e.g. "/user/xero/info" -> ["user", "xero", "info"] req.api: A object created before hand (in the main server.js file). O…
tagged with: node.js
has comment: http://stackoverflow.com/comment/47090869
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/47090834
tagged with: corruption
score: 1
has comment: http://stackoverflow.com/comment/47090568
tagged with: http
type: Question
has comment: http://stackoverflow.com/comment/47090912
has comment: http://stackoverflow.com/comment/47090516
accepted answer: http://stackoverflow.com/a/29464363
tagged with: javascript
has comment: http://stackoverflow.com/comment/47091184
has comment: http://stackoverflow.com/comment/47090657
has comment: http://stackoverflow.com/comment/47091544
has comment: http://stackoverflow.com/comment/47091568

http://stackoverflow.com/a/29374998
score: 0
answers question: http://stackoverflow.com/q/29374829
type: Answer
has body: setTimeout(function(){}:-It is javascript function which is out of the scope of anuglar js you need to manually apply the digest cycle with the help of $scope.apply(); But instead you can use $timeout service which is more angular way.

http://stackoverflow.com/comment/46932102
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29375393
score: 1
has text: @Ross I updated the post with the relevant information from the source.

http://stackoverflow.com/a/29414515
score: 0
answers question: http://stackoverflow.com/q/29411964
type: Answer
has body: Have you tried listeners ? document.getElementById("menu-toggle").addEventListener("click", function (e){ // $("#menu-toggle").click(function(e) { console.log("menu clicked"); // e.preventDefault(); $("#wrapper").toggleClass("toggled"); //});;} );

http://stackoverflow.com/a/29493640
has comment: http://stackoverflow.com/comment/72492828
has comment: http://stackoverflow.com/comment/58659458
has body: Did you try to just call a function when this happens?
type: Answer
answers question: http://stackoverflow.com/q/29493426
has comment: http://stackoverflow.com/comment/49880016
accepted answer of: http://stackoverflow.com/q/29493426
downvote count: 1
score: 3
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/comment/47152582
has text: "A bit of discussion" - I can link to maybe 30 threads on esdiscuss or GitHub :) (not to mention your own help with cancellation in bluebird 3.0)
comment on: http://stackoverflow.com/a/29479435
type: AnswerComment
type: Comment
score: 3

http://stackoverflow.com/comment/47188530
score: 4
type: Comment
comment on: http://stackoverflow.com/a/29516570
has text: Promises are theoretically their own objects. they contain a result which can be accessed through the success function of the promise.
type: AnswerComment

http://stackoverflow.com/q/29429827
has body: I am very new to angularjs and googlemaps please help me out. My html file: {{myCurrentPosition}} Here i want to get value of my currentPosition from directive then pass or assign that value into my controller variable myCurrentLocation.then only i can able to show this value in my tag. My Controller : var OEMControllers=angular.module('myApp',[]); OEMControllers.controller('carLocationCtrl', ["$scope", "$rootScope", function ($scope, $rootScope) { $scope.isEditLocation = false; $scope.myCurrentLocation=''; $scope.saveCarLocation = function () { $scope.isEditLocation = true; }; $scope.editCarLocation = function () { $scope.isEditLocation = false; }; }]).directive('myMap', function() { var link = function(scope, element, attrs) { var map, infoWindow; var markers = []; // map config var mapOptions = { center: new google.maps.LatLng(50, 2), zoom: 4, mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: false }; // init the map function initMap() { if (map === void 0) { map = new google.maps.Map(element[0], mapOptions); } } // place a marker function setMarker(map, position) { var marker; var markerOptions = { position: position, center:position, map: map, icon: 'https://maps.google.com/mapfiles/ms/icons/green-dot.png' }; marker = new google.maps.Marker(markerOptions); markers.push(marker); // add marker to array //pan to marker.. console.log('marker.getPosition() :: '+marker.getPosition()); map.panTo(marker.getPosition()); map.setZoom(16); console.log('pan called'); //here i can able to get my currentPosition but how can i send this value to my controller ......... scope.myCurrentLocation=marker.getPosition(); console.log('output :: '+scope.myCurrentLocation); } // show the map and place some markers initMap(); getLocation(); var watchID=null; function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(onSuccess); /* var options = { timeout: 30000 }; watchID = navigator.geolocation.watchPosition(onSuccess, onError, options);*/ } else…
has answer: http://stackoverflow.com/a/29430201
type: Question
has title: Angularjs assign value into controller after getting output in directives
has answer: http://stackoverflow.com/a/29430396
tagged with: javascript
tagged with: google-maps-api-3
score: 0
answer count: 3
tagged with: angularjs
has answer: http://stackoverflow.com/a/29430211
type: UnansweredQuestion

http://stackoverflow.com/comment/46942105
comment on: http://stackoverflow.com/a/29379903
type: AnswerComment
score: 0
has text: @user2720108 weird, i'll check it out
type: Comment

http://stackoverflow.com/q/29451394
answer count: 3
possible better answer: http://stackoverflow.com/a/29451487
has answer: http://stackoverflow.com/a/29451487
has comment: http://stackoverflow.com/comment/47068711
accepted answer: http://stackoverflow.com/a/29451481
tagged with: each
has body: Building a simple weather app, I got it working with some sloppy vanilla JS. It's clearly something that should be written in jQuery. Converting it over, I've run into some trouble with the 4 day forecast section of the page. In pure JS, I just targeted ID's and fed in the values from the JSON object. Using jQuery, I'm trying to use $.each to iterate over what are now a series of classes, and inject the same values. I always end up getting the same series of values across the elements, which doesn't make any sense to me. When I log the values to the console, they appear to be iterating correctly. The forecast for each day shows up in the console, and in order. They are not showing up in the elements they are supposed to, even though the script appears to be iterating over the elements, but something is going wrong. In the pen you can find a couple other things I've tried, including constructing the HTML elements in the loop. $(document).ready(function(){ var url="http://api.wunderground."; $.getJSON(url,function(response){ var current = response.current_observation; var forecast = response.forecast.simpleforecast; $("#city").html(current.display_location.city + ","); $("#state").html(current.display_location.state); $("#weather").html(current.weather); $("#temp").html(current.feelslike_f + "\u00B0"); $("#lastUpdate").html(current.observation_time); $.each(forecast.forecastday, function(i){ var foreshort = forecast.forecastday[i]; $(".dayName:nth-of-type(" + i + "n)").text(foreshort.date.weekday); $(".cond:nth-of-type(" + i + "n)").text(foreshort.conditions); $(".hi:nth-of-type(" + i + "n)").text(foreshort.high.fahrenheit); $(".lo:nth-of-type(" + i + "n)").text(foreshort.low.fahrenheit); console.log(foreshort.date.weekday); console.log(foreshort.conditions); console.log(foreshort.high.fahrenheit); console.log(foreshort.low.fahrenheit); console.log(i); }); //end .each }); //end getJSON }); //end ready Here's the pen: http://codepen.io/marcussacco/pen/azQLxy
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47068594
has answer: http://stackoverflow.com/a/29451499
score: 0
type: Question
has title: $.each, for loop won't iterate over HTML elements one by one
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47068643
has answer: http://stackoverflow.com/a/29451481

http://stackoverflow.com/q/29415880
has answer: http://stackoverflow.com/a/29415991
tagged with: variables
has answer: http://stackoverflow.com/a/29425403
favorite count: 0
has comment: http://stackoverflow.com/comment/47007605
type: Question
possible better answer: http://stackoverflow.com/a/29415986
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/29415986
has comment: http://stackoverflow.com/comment/47006579
score: 4
tagged with: numbers
linked to: http://stackoverflow.com/q/12335885
has comment: http://stackoverflow.com/comment/47021641
accepted answer: http://stackoverflow.com/a/29425403
has title: Send variable value to .txt file through .php
downvote count: 1
has comment: http://stackoverflow.com/comment/47003972
has answer: http://stackoverflow.com/a/29416216
answer count: 4
has comment: http://stackoverflow.com/comment/47049043
has comment: http://stackoverflow.com/comment/47004598
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/47007323
has comment: http://stackoverflow.com/comment/47005758
has comment: http://stackoverflow.com/comment/47004184
type: AnsweredQuestion
has body: I have a script with a variable, this variable I am passing to a .php script and then from the .php script to a .txt file which then stores the number value from the variable, only problem is that when I pass the variable to the .txt file, instead of passing the number of the variable it just passes the name of it. Here are my scripts: php: &lt;?php $variableToPass= $_POST['variableToPass']; $filename = "textFilePass.txt"; $content = file_get_contents($filename); $content .= $variableToPass. PHP_EOL; file_put_contents($filename, $content); ?&gt; html: &lt;form id="payment-form" action="chargeCard.php" method="POST" name="payment-form"&gt; &lt;input type="text" name="amount" id="amount" /&gt; &lt;input type="hidden" id="variableToPass" name="variableToPass" value="variableToPass"/&gt; &lt;input type="image" src="butImg.png" id="Button" value="but" alt="but"/&gt; &lt;/form&gt; &lt;script type="text/javascript"&gt; var variableToPass= 1; document.getElementById("variableToPass").innerHTML = variableToPass; document.getElementByID("variableToPass").value = variableToPass; &lt;/script&gt;

http://stackoverflow.com/a/29484736
answers question: http://stackoverflow.com/q/29483662
has comment: http://stackoverflow.com/comment/47129815
accepted answer of: http://stackoverflow.com/q/29483662
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: I suppose this is what you need... try { String[] ids = request.getParameterValues("list"); StringBuilder sb = new StringBuilder(); for (String id : ids) { sb.append(" "+id); System.out.print(id); } Runtime.getRuntime().exec("pdftk" + sb.toString() + " cat output output.pdf"); } catch (Exception e) { System.out.println("PDF fail to merge"); }

http://stackoverflow.com/a/29439898
score: 1
upvote count: 1
has body: You can simply use three nested loops. For example like this: var products = [ ['M', 'L', 'XL'], ['red', 'green'], ['longsleve', 't-shirt'] ]; var table = document.querySelector('table'); for (var i = 0; i < products[0].length; i++) { for (var j = 0; j < products[1].length; j++) { for (var k = 0; k < products[2].length; k++) { table.insertAdjacentHTML('beforeend', [ ' ', ' ' + products[0][i] + ' ', ' ' + products[1][j] + ' ', ' ' + products[2][k] + ' ', ' ' ].join('')); } } } table {border-collapse: collapse;} table td {border: 1px #AAA solid; padding: 5px;}
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/47048693
answers question: http://stackoverflow.com/q/29439787

http://stackoverflow.com/q/29425962
has title: Display error message if user entered less than minimum length
accepted answer: http://stackoverflow.com/a/29426032
type: Question
tagged with: javascript
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29426032
has answer: http://stackoverflow.com/a/29426239
has comment: http://stackoverflow.com/comment/47023033
has comment: http://stackoverflow.com/comment/47023047
has comment: http://stackoverflow.com/comment/47050289
has comment: http://stackoverflow.com/comment/47026370
possible better answer: http://stackoverflow.com/a/29426239
type: AnsweredQuestion
has body: I want to display error message if user entered &lt; the minimum length here's my code.. &lt;!DOCTYPE&gt; &lt;HTML&gt; &lt;form name="form" action="action.php" method="post" onsubmit="return validate()"&gt; &lt;span&gt;Name&lt;/span&gt;&lt;br&gt; &lt;input type="text" name="firstName" id="firstName" maxlength="20"&gt; &amp;nbsp;&lt;label id="error"&gt;&lt;/label&gt;&amp;nbsp;&lt;label id="errorAlpha"&gt; &lt;/label&gt;&amp;nbsp;&lt;label id="errorMinOne"&gt;&lt;/label&gt; &lt;/HTML&gt; &lt;javascript&gt; function validate() { var valid = true; var alphabet =/^[a-zA-z ]+$/; if(firstName.value.match(alphabet) || firstName.value=="") { document.getElementById('errorAlpha').innerHTML=""; } else { document.getElementById('errorAlpha').innerHTML="*Invalid Name"; document.getElementById('errorMinOne').innerHTML=""; valid=false; } if(firstName.value.length&lt;2) { document.getElementById('errorMinOne').innerHTML="*Name is too short"; valid =false; } else { document.getElementById('errorMinOne').innerHTML=""; } } if(firstName.value=="" &amp;&amp; lastName.value=="") { document.getElementById('error').innerHTML="*Field is empty"; document.getElementById('errorTwo').innerHTML="*Field is empty"; document.getElementById('errorMinOne').innerHTML=""; valid = false; } if(firstName.value!="" &amp;&amp; lastName.value=="") { document.getElementById('error').innerHTML=""; document.getElementById('errorTwo').innerHTML="*Field is empty"; valid = false; } if(firstName.value=="" &amp;&amp; lastName.value!="") { document.getElementById('error').innerHTML="*Field is empty"; document.getElementById('errorTwo').innerHTML=""; valid = false; } if(firstName.value!="" &amp;&amp; lastName.value!="") { document.getElementById('error').innerHTML=""; document.getElementById('errorTwo').innerHTML=""; } &lt;/javascript&gt; the error is when i type 1 it display both *Invalid name and *Name is too short, I want it to display only *Invalid name.. please help thanks

http://stackoverflow.com/comment/46987612
has text: Can you please add actual result and expected result .
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29406478
type: Comment

http://stackoverflow.com/a/29516258
downvote count: 0
has comment: http://stackoverflow.com/comment/47188242
has body: jQuery has the each function which you could use, in addition to a bit of a recursion to plumb down into your object until you reach something you can print. var conversation = { 'John': { 1: 'Test message 1', 2: 'Test message 2', 'Reply': { 3: 'Test message 3', 4: 'Test message 4' } }, 'Jack': { 5: 'Test message 5', 6: 'Test message 6' } }; function iterate(obj) { if (typeof obj === 'string') { $('#log').append((obj + '&lt;br/&gt;')); } if (typeof obj === 'object') { $.each(obj, function(key, value) { iterate(value); }); } } iterate(conversation); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="log"&gt;&lt;/div&gt;
type: Answer
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29516136

http://stackoverflow.com/comment/97718126
type: Comment
has text: I had to use `backgroundColor` instead of `fillColor`
score: 23
comment on: http://stackoverflow.com/a/30101977
type: AnswerComment

http://stackoverflow.com/q/29417708
favorite count: 0
has body: I have latests CefGlue version (3.2272.2035) I need to save current page as PDF. I'd like to interact with my CEF somehow (JS/C#) and make it create PDF for me. I've tried to use javascript.window.print() for that purpose with no success, because, all i've got is such window. I've found OnPrintJob method in CefPrintHandler but I don't know what is the right way to call it + comments say: "Implement this interface to handle printing on Linux" and I need to handle printing to pdf on Windows environments (both x64/x86) Any code example would be appreciated. Thanks in advance for any help.
accepted answer: http://stackoverflow.com/a/30468827
tagged with: pdf-generation
tagged with: chromium-embedded
has comment: http://stackoverflow.com/comment/47086833
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/30468827
tagged with: cefglue
upvote count: 5
type: Question
tagged with: c#
score: 5
downvote count: 0
answer count: 1
tagged with: javascript
has title: CefGlue silent printing to PDF

http://stackoverflow.com/comment/47057501
has text: Yup, `this` refers to `Window`
type: Comment
comment on: http://stackoverflow.com/q/29445092
score: 0
type: QuestionComment

http://stackoverflow.com/q/29491089
has body: I have some check-box and one text-area, and a collect all the check-boxes value in a text-area and then insert it in database, when I select data from database, I just have data for the text-area not for check-boxes. the things that I want is: the check-boxes which i checked before must be checked when I view them. now how I can check if the value of check-box is exist in text-area then check the box? my code is here? Header Options Company Name Company Address Month Name Employee Ref No Designation Date of joining Company Name,Company Address,Month,Employee Ref No, the result which i expect is: but it gives me the following result: NOTE: I separate each value of check-box with a comma inside the text-area.
has answer: http://stackoverflow.com/a/29491254
has title: how to check the check-box if it's value is exist in a text-area
tagged with: checkbox
accepted answer: http://stackoverflow.com/a/29491360
possible better answer: http://stackoverflow.com/a/29491254
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47141401
type: Question
tagged with: textarea
tagged with: javascript
has answer: http://stackoverflow.com/a/29491321
has answer: http://stackoverflow.com/a/29491360
score: 0
answer count: 3

http://stackoverflow.com/comment/47035491
comment on: http://stackoverflow.com/q/29432997
has text: can you share that value.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29516372
answer count: 1
has body: It's known that deleteing a field from a JavaScript Object is a slow operation in V8 engine, compared to setting it to null, undefined or similar values: http://jsperf.com/delete-vs-undefined-vs-null However, the performance difference between different methods seems to be minimal: http://jsperf.com/using-delete-on-dataset. It's even marginally faster than some other methods. What's causing the inefficiency on "normal" Objects, and why doesn't it make any difference on dataset attributes?
accepted answer: http://stackoverflow.com/a/29534693
tagged with: dom
has title: delete inefficient on Object, but efficient on DOM Element's data attributes, compared to null-out?
type: AnsweredQuestion
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/29534693
tagged with: custom-data-attribute
score: 0
tagged with: v8

http://stackoverflow.com/comment/52687409
comment on: http://stackoverflow.com/a/29502496
score: 0
type: AnswerComment
type: Comment
has text: Man, @stovroz, you just saved tons of my time. Your code didn't work for me but made me understand my problem and solve it. Thank you.

http://stackoverflow.com/a/29404984
score: 0
type: Answer
has body: My ground rule: Minimize PHP and custom php functions. But, not everything can be achieved by using WordPress built in functions. So, choose what are really need. Can WordPress do it with its functions? If not, chalk it up to plain bad luck. Never calculate the same variable twice in a WordPress template. Never load a library twice in a WordPress template. Cache on the fly results of intense calculations by using $_SESSIONS If your gut says that something is inefficient, there is a better way to do it.
accepted answer of: http://stackoverflow.com/q/29403489
answers question: http://stackoverflow.com/q/29403489
type: AcceptedAnswer

http://stackoverflow.com/comment/47032085
has text: This has nothing to do with using ES6 class syntax.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29431195
type: QuestionComment

http://stackoverflow.com/q/29426763
upvote count: 4
has comment: http://stackoverflow.com/comment/47027959
accepted answer: http://stackoverflow.com/a/33638566
has comment: http://stackoverflow.com/comment/47047869
has body: When setting a JavaScript variable's properties to a function is there anything special going on besides setting a variable as a pointer to a function's code? Isn't this exactly what a C# delegate is? I know in JavaScript you can directly assign a function to a variable like so: var x = function() { return "Hello"; } In C# it's a little different: Func&lt;string&gt; x = () =&gt; { return "Hello"; }; However aren't these equivalent? Isn't directly assigning the function just sugar? Is JavaScript's concept of having "functions as objects" any different from languages such as C#?
tagged with: function
has comment: http://stackoverflow.com/comment/47024491
has comment: http://stackoverflow.com/comment/47048221
answer count: 1
has comment: http://stackoverflow.com/comment/47047875
has comment: http://stackoverflow.com/comment/47047721
has comment: http://stackoverflow.com/comment/47047372
favorite count: 0
has comment: http://stackoverflow.com/comment/47048088
linked to: http://stackoverflow.com/q/19843506
has comment: http://stackoverflow.com/comment/47047649
has comment: http://stackoverflow.com/comment/47047565
has comment: http://stackoverflow.com/comment/47042974
type: AnsweredQuestion
score: 2
tagged with: oop
has comment: http://stackoverflow.com/comment/47048160
has answer: http://stackoverflow.com/a/33638566
has comment: http://stackoverflow.com/comment/47046946
downvote count: 2
type: Question
tagged with: c#
tagged with: javascript
has comment: http://stackoverflow.com/comment/47048285
has title: Is there a difference between assigning a variable to a function in JavaScript vs. using a delegate in C#
has comment: http://stackoverflow.com/comment/47047611
has comment: http://stackoverflow.com/comment/47047987
has comment: http://stackoverflow.com/comment/47048144

http://stackoverflow.com/comment/47020746
type: QuestionComment
score: 1
has text: There already is a scroll function, the `window.scroll` function, which takes two arguments. Give your function another name and make sure it's in the right scope.
comment on: http://stackoverflow.com/q/29424703
type: Comment

http://stackoverflow.com/q/29394126
has title: Open several times multiple file input without losing earlier selected files
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: 6
tagged with: php
upvote count: 6
has answer: http://stackoverflow.com/a/29394725
has body: I have a multiple file input. I want my customers to choose multiple files when they click on 'Choose files' (I think it is done) and if they forget to select some files, I want my code to enable selecting new files (done) AND add that data to the data that they have selected before (couldn't solve it). How can I append the new files to the list? Just to give you the context: my goal after this is to send each file with AJAX to my PHP server. $("#upload-form").submit(function(e) { $('#displayFileNames').html(''); console.log('Currently in files.'); var files = $('#myFileInput')[0].files; for (var i = 0; i &lt; files.length; i++){ $('#displayFileNames').append(files[i].name + '&lt;/br&gt;'); console.log(files[i].name); } // Send data with AJAX. }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;form id='upload-form' action='' method='post' enctype='multipart/form-data'&gt; &lt;input id='myFileInput' class='file-input' type='file' name='file[]' multiple='multiple' /&gt; &lt;input type='submit' value="See what's in there" /&gt; &lt;/form&gt; &lt;div id="displayFileNames"&gt;&lt;/div&gt; Any help, hint is appreciated!
tagged with: multiple-file-upload
type: Question
has comment: http://stackoverflow.com/comment/46965907
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/47022513
comment on: http://stackoverflow.com/a/29425622
type: Comment
type: AnswerComment
has text: This is getting there, but I lose access to the ngModel element. If I exclude the scope in the directive, I can still access attr.ngModel, but if I INCLUDE the scope (with secondaryElem) I can't access or watch that ngModel anymore.
score: 0

http://stackoverflow.com/comment/47182720
comment on: http://stackoverflow.com/q/29513044
has text: can we have a look at app.dbQueryError too?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47005293
type: Comment
comment on: http://stackoverflow.com/a/29416281
has text: Code works great, but once the user presses send it removes properly but then the user can click the X and remove the last one now?
score: 0
type: AnswerComment

http://stackoverflow.com/a/29497922
score: 5
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47154932
has body: Looks like you are missing a closing bracket "]" at the very end . Should be: $('textarea[name="txtSupportDescription[]"]')
has comment: http://stackoverflow.com/comment/47154949
type: Answer
has comment: http://stackoverflow.com/comment/47154566
upvote count: 5
accepted answer of: http://stackoverflow.com/q/29497857
has comment: http://stackoverflow.com/comment/47154619
answers question: http://stackoverflow.com/q/29497857

http://stackoverflow.com/a/29626234
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/29440327
answers question: http://stackoverflow.com/q/29440327
type: AcceptedAnswer
downvote count: 0
has body: A point can be set to invisible by using color 'none'. Example: b = board.create('point', [1, 3], { color:'none', highlightStrokeColor:'none', highlightFillColor:'none'});
type: Answer

google-fusion-tables
type: Tag
tag name: google-fusion-tables
tags question: http://stackoverflow.com/q/29522523

http://stackoverflow.com/comment/47106716
has text: @torazaburo: indeed, but this problem can easily be solved with a non-word boundary: `(\w|\([^)]*\))\B\w*`
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29464030
score: 1

http://stackoverflow.com/comment/46945134
has text: call the function to pass button id and function to this button insert before insert the textbox..
comment on: http://stackoverflow.com/a/29383124
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29528840
has body: I have a Meteor app that I want to receive HTTP requests with, but I'm not sure how to set it up? Specifically I'm trying to receive data on my web app from text messages through Twilio. I've looked at a package called Iron Router, would that be the correct way to go about it? Thanks
tagged with: meteor
favorite count: 0
tagged with: twilio
tagged with: iron-router
type: UnansweredQuestion
has title: Meteor how to receive HTTP requests
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47213101
score: -1
linked to: http://stackoverflow.com/q/21691001
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/29535024
tagged with: javascript

http://stackoverflow.com/comment/46988939
comment on: http://stackoverflow.com/q/29406809
has text: You can try with js array as source. Just echo the results seperated by commas and then split them with js and assign it to an array. Refer that array as source. Like this: https://jqueryui.com/autocomplete/
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46953282
score: 0
has text: @ArunPJohny Wait what that actually worked, can you further elleborate why this is? It's making no sense to me.
comment on: http://stackoverflow.com/q/29387657
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47018986
type: QuestionComment
has text: the second parameter is a reference to a function, in your second example you are firing the function directly. `addEventListener("click", myFunc, false);` would work, the trick is passing a parameter through it.
score: 1
comment on: http://stackoverflow.com/q/29423797
type: Comment

http://stackoverflow.com/q/29505485
has title: Meteor error using npm package when deployed
tagged with: npm
accepted answer: http://stackoverflow.com/a/29525421
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29525421
type: Question
tagged with: javascript
has body: So I was attempting to print PDF's to the client using a NPM package called html-pdf, locally everything works beautifully. I used a round about way to do this, I use Meteor.call to call a server method that then takes the buffered output from the pdf and sticks it in a collection. I use an autosubscribe to listen for a new pdf with the current user id then use a package to save the pdf to the browser. important code pieces below: client/helpers.js Meteor.autosubscribe(function() { PdfsCollection.find().observe({ added: function(item){ var blob = new Blob([item.pdf], {type: 'application/pdf'}); console.log('new pdf found'); saveAs(blob, 'test.pdf'); PdfsCollection.remove({_id: item._id}); } }); }); client/templates/quotes/quotes.js: Template.QuotesEdit.events({ "click #pdf" : function(event, template) { var html = Blaze.toHTML(Blaze.With(template.data, function() { return Template.QuotePrint; })); Meteor.call('createPDF', html, Meteor.userId()); } }); server/pdf.js: Meteor.methods({ createPDF: function(html, userId) { var pdf = Meteor.npmRequire('html-pdf'); pdf.create(html).toBuffer(Meteor.bindEnvironment(function(err,buffer) { PdfsCollection.insert({userId: userId, pdf: buffer}); })); } }); The part that is causing the error is when I actually call pdf.create. There are two errors, in the server log I get this: [Wed Apr 08 2015 03:23:16 GMT+0000 (UTC)] WARNING events.js:72 throw er; // Unhandled 'error' event ^ [Wed Apr 08 2015 03:23:16 GMT+0000 (UTC)] WARNING Error: write EPIPE at errnoException (net.js:905:11) at Object.afterWrite (net.js:721:19) [Wed Apr 08 2015 03:23:16 GMT+0000 (UTC)] ERROR Application crashed with code: 8 [Wed Apr 08 2015 03:23:16 GMT+0000 (UTC)] NOTICE Starting application on port 9000 [Wed Apr 08 2015 03:23:16 GMT+0000 (UTC)] INFO STATUS running -&gt; starting [Wed Apr 08 2015 03:23:16 GMT+0000 (UTC)] INFO STATUS starting -&gt; running and in the browser console there is this: GET https://ddp--3484-metcrm.meteor.com/sockjs/info?cb=qtrpq640…
upvote count: 1
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
tagged with: meteor
favorite count: 0

http://stackoverflow.com/comment/127666365
type: Comment
comment on: http://stackoverflow.com/a/59404932
type: AnswerComment
score: 0
has text: Now we can define a generic anonymous function to unwrap the value. I got the `<T extends unknown>` trick from a related answer so TypeScript treats T as generic and knows the "definitely typed" value. The returned promise is fulfilled (resolved or rejected) and can be immediately chained with `.then()` to use the value. `const getPromiseValue = async <T extends unknown> (p: Promise<T>) => await p;`.

http://stackoverflow.com/comment/47090066
comment on: http://stackoverflow.com/q/29462699
score: 0
has text: How silly of me, meant to write that the code is mostly in ENGLISH not swedish.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47108017
has text: Why don't you put the angular script tag in the header instead of the body? I don't know if that would help your issue, but that is where you should include any javascript files.
comment on: http://stackoverflow.com/q/29473137
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29443648
has body: A solution that runs in linear time. var arrayOne; // Array containing objects of type myObject1 var arrayTwo; // Array containing objects of type myObject2 var tempObj = {}; // Transform arrayOne to help achieve a better performing code arrayOne.forEach(function(obj){ tempObj[obj.id] = obj; }); // Runs on linear time O(arrayTwo.length) arrayTwo.forEach(function(obj){ // Note, since I'm not adding any thing to the arrayTwo // I can modify it in this scope var match = tempObj[obj.id]; if(match){ // If a match is found obj.name = match.name; obj.role = match.role; } });
type: Answer
accepted answer of: http://stackoverflow.com/q/29443329
has comment: http://stackoverflow.com/comment/47081234
answers question: http://stackoverflow.com/q/29443329
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47074145
has comment: http://stackoverflow.com/comment/47079494
has comment: http://stackoverflow.com/comment/47068926
has comment: http://stackoverflow.com/comment/47068979
has comment: http://stackoverflow.com/comment/47070355
has comment: http://stackoverflow.com/comment/47055838
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47055816

http://stackoverflow.com/a/29383033
score: 1
upvote count: 1
has body: Checkboxes have an attribute Checked, you need to set that to true. test.setAttribute("checked", "true"); Or with the value attribute... test.setAttribute("value", "1");
answers question: http://stackoverflow.com/q/29383004
downvote count: 0
type: Answer

http://stackoverflow.com/q/29416448
upvote count: 5
has body: IE's smooth scrolling is causing my app behave strange (scroll events are fired with a small delay). Is there a way to completely disable smooth scrolling in IE11 using CSS or Javascript?
answer count: 2
score: 5
possible better answer: http://stackoverflow.com/a/55011222
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/30600160
has answer: http://stackoverflow.com/a/55011222
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/30600160
linked to: http://stackoverflow.com/q/21775234
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47005125
tagged with: internet-explorer
has title: How to disable smooth scrolling in IE11

http://stackoverflow.com/q/29529900
has comment: http://stackoverflow.com/comment/48865367
tagged with: internet-explorer
tagged with: internet-explorer-11
has comment: http://stackoverflow.com/comment/47213586
type: Question
upvote count: 4
tagged with: c#
has title: JavaScript Error in Internet Explorer 11
has comment: http://stackoverflow.com/comment/47215522
answer count: 1
downvote count: 0
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/47213614
has comment: http://stackoverflow.com/comment/47213645
has body: I have one form page that submits data to the database from a popup window.I added one disabled button js for the submitting data once.It does not work on ie11 but works for other browsers perfectly. &lt;script language="javascript" type="text/javascript"&gt; // disables the button specified and sets its style to a disabled "look". function disableButtonOnClick(oButton, sButtonText, sCssClass) { // set button to disabled so you can't click on it. oButton.disabled = true; // change the text of the button. oButton.value = sButtonText; // IE uses className for the css property. oButton.setAttribute('className', sCssClass); // Firefox, Safari use class for the css property. oButton.setAttribute('class', sCssClass); } &lt;/script&gt;
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/30388117

http://stackoverflow.com/comment/47164559
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29503380
type: Comment
has text: Thanks. I'm am actually more interested in how the list in the menu has a sliding effect.

http://stackoverflow.com/comment/46961135
type: Comment
comment on: http://stackoverflow.com/a/29391462
has text: Tx for the answer! What is this part "(src.match" ... and then "|| [, src][1]"? I am using Regex101 tester and replacing there. When done I copy values from "SUBSTITUTION" panel into my txt file.
score: 0
type: AnswerComment

http://stackoverflow.com/a/29485319
downvote count: 0
has comment: http://stackoverflow.com/comment/47130400
score: 2
has comment: http://stackoverflow.com/comment/47130240
answers question: http://stackoverflow.com/q/29485224
upvote count: 2
has body: Solution One: You can add a title attribute to your HTML tag: Solution Two: You could use css for this too (if you want to style the quote that is displayed): div.quote { display: none; border:1px solid #000; height:30px; width:290px; margin-left:10px; } img#jCaes:hover + div.quote { display: block; } Solution Three: There's really no need to use JavaScript for this; however, here's a JS solution as well: Additional HTML: Your quote here CSS: #popup { display:none; } JS var e = document.getElementById('jCaes'); e.onmouseover = function() { document.getElementById('popup').style.display = 'block'; } e.onmouseout = function() { document.getElementById('popup').style.display = 'none'; } Solution Four: Here's another solution if you can use jQuery: http://jsfiddle.net/9RxLM/
type: Answer

http://stackoverflow.com/q/29431360
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29431563
has comment: http://stackoverflow.com/comment/47053351
type: UnansweredQuestion
has body: Hello expert out there, var total1 = 123.44; //how do i round this up to 123.40? var total2 = 123.45; //this value stay (no changes) var total3 = 123.46; //how do i round this up to 123.50? What I'm trying to do is: total = totalfromdb; GST = total*6/100; //&lt;--- This value needed to round half even as mentioned above GSTadjust = ???????; //&lt;--- How do i get the total different from GST (round half even above)? grandtotal = parseInt(GST) + parseInt(total); //&lt;--- This value for mygrandtotal The question is in the code. How do i rounding up the .44 to .40 and .46 to .50 and/or get the different value eg: .44 to .40, the different value is -4 (to display on page). .46 to .50, the different value is +4 (to display on page). The value that i need to round half even might be 123.439999999996 or 123.45999999 I've edited my question as Matti Mehtonen suggest. Thank you in advance.
answer count: 4
tagged with: rounding
score: 1
tagged with: math
upvote count: 1
has title: Javascript: Round Half Even last 2 digits
type: Question
has answer: http://stackoverflow.com/a/29432180
has comment: http://stackoverflow.com/comment/47052988
has answer: http://stackoverflow.com/a/29431449
tagged with: javascript
has comment: http://stackoverflow.com/comment/47036623
has answer: http://stackoverflow.com/a/29431587

http://stackoverflow.com/comment/46953367
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29387698
type: Comment
has text: Do you have control of the string output? it may make things easier (although you might like regex :)) by just introducing a seperator such as a comma and then just split the string based on that

http://stackoverflow.com/q/29389031
downvote count: 0
tagged with: javascript
tagged with: ajax
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: Unable to call spring REST service My spring service @RequestMapping(value = "/MAS/authenticate", method = RequestMethod.POST) public ResponseEntity&lt;Map&lt;String, String&gt;&gt; authenticate(@RequestBody Subject subject) { Map&lt;String, String&gt; result = new HashMap&lt;String, String&gt;(); result.put("result_detail", "Invalid Password"); result.put("result", "failure"); HttpHeaders responseHeaders = new HttpHeaders(); responseHeaders.setContentType(MediaType.APPLICATION_JSON); responseHeaders.add("Access-Control-Allow-Origin", "*"); // also added header to allow cross domain request for any domain return new ResponseEntity&lt;Map&lt;String, String&gt;&gt;(result, responseHeaders, HttpStatus.OK); } My AJAX code $.ajax( { crossDomain: true, type: "POST", contentType: "application/json; charset=utf-8", async: false, url: "http://localhost:8080/SpringMVC/rest/MAS/authenticate", headers: {"Access-Control-Allow-Origin" : "*"}, data:{}, dataType: "json", //also tried "jsonp" success: function(data, status, jqXHR) { alert('success'); }, error: function(jqXHR, status) { alert('error'); } }); I am getting following error :( Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8080/SpringMVC/rest/MAS/authenticate. This can be fixed by moving the resource to the same domain or enabling CORS. i have also tried dataType: "jsonp". its append my body object into URL which make different URL and cannot hit my service URL then and got 404 error. My browser: firefox 36.0.4 How i can get rid from this error, any help?
favorite count: 0
possible better answer: http://stackoverflow.com/a/29389722
has answer: http://stackoverflow.com/a/46437359
tagged with: spring
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/30374858
score: 7
tagged with: java
accepted answer: http://stackoverflow.com/a/30374858
has title: Cross-Origin Request Blocked Spring REST service + AJAX
type: Question
has answer: http://stackoverflow.com/a/29389722
has comment: http://stackoverflow.com/comment/46957801
has comment: http://stackoverflow.com/comment/46956690
upvote count: 7

http://stackoverflow.com/a/29428786
score: 0
has body: [edit] I'm sorry I thought you wanted to do this with TideSDK, I'll let my answer in case you want to give another try to TideSDK [/edit] I'm not sure if it's what you're looking for but I will try to explain my case. I've an application which allow the user to save the state of his progress. To do this, I allow him to select a folder, enter a filename and write this file. When the user open the app, he can open the saved file, and get back his progress. So I assume this enhancement is similar of what you are looking for. In my case, I use the native File Select to allow the user to select a specific save (I'm using CoffeeScript) : Ti.UI.currentWindow.openFileChooserDialog(_fileSelected, { title: 'Select a file' path: Ti.Filesystem.getDocumentsDirectory().nativePath() multiple: false }) (related doc http://tidesdk.multipart.net/docs/user-dev/generated/#!/api/Ti.UI.UserWindow-method-openFileChooserDialog) When this step is done I will open the selected file : if !filePath? fileToLoad = Ti.Filesystem.getFile(scope.fileSelected.nativePath()) else fileToLoad = Ti.Filesystem.getFile(filePath) data = Ti.JSON.parse(fileToLoad.read()) (related doc http://tidesdk.multipart.net/docs/user-dev/generated/#!/api/Ti.Filesystem) Please note that those snippets are copy/paste from my project and they will not work without the rest of my code but I think it's enough to illustrate you how I manage to open a file, and read his content. In this case I'm using Ti.JSON.parse because there is only javascript object in these files but in your case you can just get the content. The openFileChooserDialog isn't mandatory, if you already know the file name, or if you get it from another way you can use Ti.Filesystem in your own way.
type: Answer
answers question: http://stackoverflow.com/q/29426302

http://stackoverflow.com/q/29488697
favorite count: 0
has title: Display the Latitude and Longitude of a searched address on my sites Google-Map using API
has comment: http://stackoverflow.com/comment/47138022
upvote count: 0
downvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29491735
accepted answer: http://stackoverflow.com/a/29491735
tagged with: javascript
score: -1
tagged with: google-maps-api-3
tagged with: google-maps
has body: I have a section on a website I am developing where the user can input their address into the Google Geocode Api and their homes location is displayed, once the map is displayed the marker cannot be moved neither does the right click bring up the "What's Here" option. What I am actually trying to get as well as the map view are the co-ordinates for that address ideally with the ability to allow the user to fine tune the marker to lets say the front entrance porch and have the Latitude and Longitude displayed either on the screen or inside of an input field. Thanks for looking at this for me, I know very little about Javascript programming and greatly appreciate any help that you can offer. Kind Regards Ian. The basic code I've used so far is below: &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;signed_in=true"&gt; &lt;/script&gt; &lt;script&gt; var geocoder; var map; function initialize() { geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(51.915892, -0.660751); var mapOptions = { zoom: 18, center: latlng } map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); } function codeAddress() { var address = document.getElementById('address').value; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); } else { alert('Geocode was not successful for the following reason: ' + status); } }); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt;
answer count: 1

http://stackoverflow.com/q/29412103
has answer: http://stackoverflow.com/a/29412451
tagged with: css
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29412360
type: Question
has comment: http://stackoverflow.com/comment/46997133
accepted answer: http://stackoverflow.com/a/29412360
has title: Menu isn't clickable with jQuery
has body: I'd like my Menu to be initially hidden on load and then clicking the text Menu reveals the Menu. Currently, the Menu is visible always. Why is this? Demo: http://jsfiddle.net/eoxug3cz/ $('nav.primary').prepend(' Menu '); $('nav.primary #menu-button').on('click', function(){ var menu = $(this).next('ul#menu-header'); if (menu.hasClass('open')) { menu.removeClass('open'); } else { menu.addClass('open'); } }); nav.columns ul { padding-left: 0px; } nav.primary { padding-top:0; text-align:left; float:left; margin-top:0; } nav.primary > ul { max-height: 0; overflow: hidden; -webkit-transition: max-height 0.35s ease-out; -moz-transition: max-height 0.35s ease-out; -ms-transition: max-height 0.35s ease-out; -o-transition: max-height 0.35s ease-out; transition: max-height 0.35s ease-out; } nav.primary > ul > li > ul { width: 100%; display: block; } nav.primary.align-right ul li a { text-align: left; } nav.primary > ul > li > ul > li { width: 100%; display: block; } nav.primary.align-right ul ul li a { text-align: left; } nav.primary > ul > li > ul > li > a { width: 100%; display: block; } nav.primary ul li ul li a { width: 100%; } nav.primary.align-center > ul { text-align: left; } nav.primary.align-center > ul > li { display: block; } nav.primary > ul.open { max-height: 1000px; border-top: 1px solid rgba(110, 110, 110, 0.25); } nav.primary ul { width: 100%; } nav.primary ul > li { float: none; width: 100%; } nav.primary ul li a { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: 100%; padding: 12px 20px; } nav.primary ul > li:after { display: none; } nav.primary ul li.has-sub > a:after, nav.primary ul li.has-sub > a:before, nav.primary ul li ul li.has-sub:after, nav.primary ul li ul li.has-sub:before { display: none; } nav.primary ul li ul, nav.primary ul li ul li ul, nav.primary ul li ul li:hover > ul, nav.primary.align-right ul li ul, nav.primary.align-right ul li ul li ul, nav.primary.align-right ul li ul li:hover > ul { left: 0…
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29412169
has answer: http://stackoverflow.com/a/29412169
has answer: http://stackoverflow.com/a/29412291
score: 0
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29506772
has answer: http://stackoverflow.com/a/29506913
tagged with: visual-studio-2013
type: UnansweredQuestion
upvote count: 1
tagged with: visual-studio
tagged with: typescript
has comment: http://stackoverflow.com/comment/47172944
score: 1
linked to: http://stackoverflow.com/q/29495592
type: Question
has body: I'm using VS 2013 Community Edition Update 4 with Web Essentials, and when I add a new typescript file and save it, the .js file is generated. But then when I try to add it to the index VS doesn't sense the .js to autocomplete the href attribut in the &lt;script&gt; tag. If I add it by hand it works, the app works, the .js was generated but it doesn't seem to be part of the project, but it's a bit annoying to me. Does anyone have a solution or something I'm missing ?
answer count: 2
has title: Visual Studio 2013 not finding javascript files compiled from typescript?
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/34937614

http://stackoverflow.com/q/29423607
possible better answer: http://stackoverflow.com/a/29423976
has answer: http://stackoverflow.com/a/29423976
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47019185
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/29423660
answer count: 2
has body: Hi I am trying to convert a data to json in javascript using Json.parse(data); and it keeps on saying SyntaxError: Unexpected token at Object.parse (native) at new t (eval at &lt;anonymous&gt; (https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js:2:14070), &lt;anonymous&gt;:1:54784) at Object.e [as invoke] (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:36:315) at $get.w.instance (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:75:451) at https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:58:476 at s (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:7:408) at A (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:58:459) at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:51:299) at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:51:316) at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:51:316) I am guessing that it is saying that there is a space somewhere, however I used a bunch of parser tools online and it said that the json is valid. Is there a more reliable Json parser that i can use in javascript or how can I make sure that my data is parsable Here is the string I am trying to convert [{"SessionToken":null,"ErrorMessage":null,"BusinessId":0,"CustomerId":0,"Name":null,"EMail":"","ContactId":"","KeyValueTags":null,"AccountId":"","FirstClickId":0,"LastClickId":0,"SFServerName":"","LeadId_Current":null,"Lead_Type":0,"TotalForms":1,"TotalSessions":2,"TotalCustomEvents":0,"TotalABTests":0,"PageViews":5,"LastVisit":"2015-03-29T07:44:17Z","TimeZoneOffset":"16:00:00","SessionsData":[{"WebSource":"Google AdWords","ReferralId":0,"SessionId":0,"UserId":"","Email":"","ContactUrl":null,"SessionDate":"2015-03-29T07:15:14Z","ClickType":"LC","ABTests":[],"CustomEvents":[],"HasForm":false,"Events":[{"EventType":"PageView","EventSource":"","EventTime":"2015-03-29T07:15:14Z","GMT_EventTime":"…
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: json.parse fails on unexpected token, when other parsers say it is valid
has comment: http://stackoverflow.com/comment/47019251
has answer: http://stackoverflow.com/a/29423660
upvote count: 1

http://stackoverflow.com/comment/46961977
score: 1
has text: `d{4}` is different from `\d{4}`
type: QuestionComment
comment on: http://stackoverflow.com/q/29392599
type: Comment

http://stackoverflow.com/a/35042111
score: 0
has body: Use confirm for ok and cancel prompt in your js - if (confirm('Approve?')) { //do something } else { //do something }
type: Answer
answers question: http://stackoverflow.com/q/29414441

http://stackoverflow.com/a/29496005
score: 0
has body: As suggested by @Barbara Laird, you should be using pagePiling.js to achieve that same effect.
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29417382
accepted answer of: http://stackoverflow.com/q/29417382

http://stackoverflow.com/comment/47079031
type: QuestionComment
has text: @firefoxuser_1 That's a great point. That version is on an older hard drive from my last computer. When I get home from work later I can dig it up and post it.
score: 0
comment on: http://stackoverflow.com/q/29442357
type: Comment

http://stackoverflow.com/q/29496558
type: Question
has answer: http://stackoverflow.com/a/29496792
accepted answer: http://stackoverflow.com/a/29496792
has body: For example, I have some ajax code in web page A that post something to page B whenever user visit page A. If the user isn't using browser to visit page A, is the ajax fired? (User maybe using ajax to post something to page A instead of using browser to visit, in this case, will the ajax code in page A be fired?) I know JavaScript runs on browser so I guess the answer is no.
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/47151942
has answer: http://stackoverflow.com/a/29496675
has title: Can ajax be fired when user don't use browser to visit the page?
possible better answer: http://stackoverflow.com/a/29496675
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47152189
has comment: http://stackoverflow.com/comment/47152156
tagged with: javascript
tagged with: ajax

http://stackoverflow.com/comment/46933660
has text: @DA. yep, added the jsbin link (maybe you were forgetting the ; needed after `width:100%` in the `secondarylevel-wrapper` definition?
type: Comment
comment on: http://stackoverflow.com/a/29376248
score: 0
type: AnswerComment

http://stackoverflow.com/a/30196610
answers question: http://stackoverflow.com/q/29511873
has body: So, after a long search, I came up with my own solution: This is the modal with the spinning wheel, or progress bar, or anything you want to. It is in a partial file called "_WaitModal" Please Wait I use @Html.Partial("_WaitModal") in the view to integrate it (but not show it). Then, when I want to show it, I use: $('#pleaseWaitDialog').modal(); and to hide it: $('#pleaseWaitDialog').modal('hide'); I hope this helps other people as well!
score: 20
has comment: http://stackoverflow.com/comment/98806755
upvote count: 20
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29511873

http://stackoverflow.com/comment/47153865
type: Comment
has text: have been basing it on this: https://github.com/greypants/gulp-starter/blob/master/gulp/config.js
comment on: http://stackoverflow.com/q/29478757
score: 0
type: QuestionComment

http://stackoverflow.com/comment/47166361
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29504447
score: 1
has text: You should look at using [cookies](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie) or [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)

http://stackoverflow.com/comment/50361900
type: Comment
comment on: http://stackoverflow.com/a/30993285
score: 0
has text: @igracia reducing the input resolution and frame rate helped a lot, no more crashes, can you please check on the `kurento-module-scaffold.sh` not creating dummy code in `src/server/implementation`
type: AnswerComment

http://stackoverflow.com/comment/47092835
score: 0
type: Comment
has text: that is the problem... is the script inside a dynamically loaded content?
type: QuestionComment
comment on: http://stackoverflow.com/q/29464911

http://stackoverflow.com/comment/47294544
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29502846
type: Comment
has text: It looks like you don't _quite_ understand how `ng-model` works. `ng-model` is used for two-way data-binding, which means binding user input in ` ` options like text, checkboxes, selects, etc. An `ng-model` on a ` ` doesn't make sense. Also, another thing to point out is that the `{{ }}` Angular format you are using is equivalent to using `ng-bind`, which is one-way binding from javascript code to the front-end view. The best solution for your situation is really just to use the loop index `i`. You can use the built-in `$index` if you really want to, but it's not really worth it

http://stackoverflow.com/a/29507352
has body: try this app.factory('SomeFactory',['$resource, $q', function($resource, $q){ var service = {}; //access_token only needs to be set once var access_token = null; getAccessToken = function() { var deferred = $q.defer(); if (access_token) { deferred.resolve(access_token); } else { $resource('/my/server/').then(function(result){ access_token = result; deferred.resolve(access_token); }); } return deferred.promise; } service.callThirdParty = function() { var deferred = $q.defer(); getAccessToken.then(function(access_token) { $resource('https://third.party/:token',{token: access_token}).then(function(result) { deferred.resolve(result); }) }) return deferred.promise; } return service; }]);
type: Answer
has comment: http://stackoverflow.com/comment/47197547
answers question: http://stackoverflow.com/q/29507000
score: 0

http://stackoverflow.com/q/29461840
type: Question
tagged with: javascript
has body: I have two files, a main file and a module file. Inside the module file, I export two functions, which return objects. In the main file, I am setting a variable to the return value of each method. However, each variable is set to the return value of the last method called. What am I doing wrong here? /* main file */ module.exports = function(robot) { var startingCharacter = require('./data/starting/character.json'), make = require('./includes/make.js'); return robot.respond(/dungeon me/i, function(msg) { var character = startingCharacter, weapon = make.weapon(0), armor = make.armor(0); console.log(weapon); // &lt;- returns value from make.armor(0) console.log(armor); // &lt;- returns value from make.armor(0) } }; /* module file */ var random = require('./random.js'); var baseStats = { 'equipped': 'true', 'attack': '0', 'damage': '0', 'defense': '0', 'health': '0', 'luck': '0', 'passivePower': {}, 'activePower': {} }; // Generate a weapon exports.weapon = function(level) { var weaponNames = require('../data/nouns/weapon_names.json'); var thisWeapon = {}; if (level === 0) { var adjNeg = require('../data/adjectives/negative.json'); thisWeapon = baseStats; thisWeapon.name = adjNeg[random(0, adjNeg.length)] + ' ' + weaponNames[random(0, weaponNames.length)]; thisWeapon.type = 'weapon'; } console.log(thisWeapon); // &lt;- returns correct value return thisWeapon; }; // Generate armor exports.armor = function(level) { var armorNames = require('../data/nouns/armor_names.json'); var thisArmor = {}; if (level === 0) { var adjNeg = require('../data/adjectives/negative.json'), animals = require('../data/nouns/animals.json'); var armorName = armorNames[random(0, armorNames.length)]; thisArmor = baseStats; if (armorName === 'Hide') { thisArmor.name = animals[random(0, animals.length)] + ' ' + armorName + ' armor'; } else { thisArmor.name = adjNeg[random(0, adjNeg.length)] + ' ' + armorName; } thisArmor.type = 'armor'; } console.log(thisArmor); // &lt;- returns correct value return…
score: 0
tagged with: hubot
has comment: http://stackoverflow.com/comment/47087551
answer count: 1
has comment: http://stackoverflow.com/comment/47087907
has title: Trouble assigning multiple nodejs exports return values to variables
tagged with: node.js
has comment: http://stackoverflow.com/comment/47088094
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/6089058
has answer: http://stackoverflow.com/a/29462241
accepted answer: http://stackoverflow.com/a/29462241

http://stackoverflow.com/comment/47136917
has text: @Terry Yes… you are absolutely right!
type: Comment
comment on: http://stackoverflow.com/q/29488192
score: 0
type: QuestionComment

http://stackoverflow.com/q/29512128
answer count: 3
has answer: http://stackoverflow.com/a/29512459
tagged with: angularjs
has answer: http://stackoverflow.com/a/29512495
type: UnansweredQuestion
has body: I need create a progressbar using uikit. According to uikit this is how it works: 40% Of course this is a static method. So i have created a function that calculates the percentage in angular: getPercentage: function() { var self = this; var done = this.downloadStatus.done.replace(/,/g, ""); var total = this.downloadStatus.total.replace(/,/g, ""); self.percentage = 0; if (parseInt(total) != 0) { self.percentage = (parseInt(done) / parseInt(total)) * 100; } return self.percentage; } The "style" of the bar determinates its width in the html.. is it possible using ng-style of angular to have a dynamic width? I tried with: 40% but not works. Thanks
tagged with: css
has title: ngStyle AngularJs put variable attribute
tagged with: uikit
has answer: http://stackoverflow.com/a/29512444
type: Question
tagged with: javascript
tagged with: progress-bar
score: 0

http://stackoverflow.com/q/29499102
has answer: http://stackoverflow.com/a/29499230
tagged with: if-statement
has answer: http://stackoverflow.com/a/29499361
tagged with: javascript
has body: I wonder why console says 'Cannot read property 'length' of undefined' when I combine two if conditions together? //After two if's combined by &amp;&amp;: for(n= 0, len=i.length; n&lt;len; n++) { if(typeof n[i] !== 'string' &amp;&amp; n[i].length &gt; longest.length) longest = n[i]; } // Before I combine two if's: for(n= 0, len=i.length; n&lt;len; n++) { if(typeof n[i] !== 'string') continue; if(n[i].length &gt; longest.length) longest = n[i]; }
tagged with: arrays
tagged with: operators
has comment: http://stackoverflow.com/comment/47157028
has answer: http://stackoverflow.com/a/29499225
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47156974
has title: if statement with && and .length
answer count: 4
score: 0
has comment: http://stackoverflow.com/comment/47157104
has answer: http://stackoverflow.com/a/29499461
type: Question

wordpress
tags question: http://stackoverflow.com/q/29525963
tags question: http://stackoverflow.com/q/29457403
tags question: http://stackoverflow.com/q/29382171
tags question: http://stackoverflow.com/q/29410761
tags question: http://stackoverflow.com/q/29501631
tags question: http://stackoverflow.com/q/29481393
tags question: http://stackoverflow.com/q/29517250
tags question: http://stackoverflow.com/q/29388929
tags question: http://stackoverflow.com/q/29445448
tags question: http://stackoverflow.com/q/29424727
tags question: http://stackoverflow.com/q/29530003
tags question: http://stackoverflow.com/q/29478103
tags question: http://stackoverflow.com/q/29453761
tags question: http://stackoverflow.com/q/29526678
tags question: http://stackoverflow.com/q/29429006
tags question: http://stackoverflow.com/q/29492674
tags question: http://stackoverflow.com/q/29505256
tags question: http://stackoverflow.com/q/29431798
tags question: http://stackoverflow.com/q/29504570
tags question: http://stackoverflow.com/q/29514437
tags question: http://stackoverflow.com/q/29503371
tags question: http://stackoverflow.com/q/29448626
tags question: http://stackoverflow.com/q/29486161
tags question: http://stackoverflow.com/q/29521963
tags question: http://stackoverflow.com/q/29490295
tags question: http://stackoverflow.com/q/29524525
tags question: http://stackoverflow.com/q/29439148
tags question: http://stackoverflow.com/q/29499750
tags question: http://stackoverflow.com/q/29463999
tags question: http://stackoverflow.com/q/29513436
tag name: wordpress
tags question: http://stackoverflow.com/q/29489555
tags question: http://stackoverflow.com/q/29475311
tags question: http://stackoverflow.com/q/29465085
tags question: http://stackoverflow.com/q/29497685
tags question: http://stackoverflow.com/q/29392626
tags question: http://stackoverflow.com/q/29525965
tags question: http://stackoverflow.com/q/29462902
tags question: http://stackoverflow.com/q/29459935
tags question: http://stackoverflow.com/q/29403489
tags question: http://stackoverflow.com/q/29460035
type: Tag
tags question: http://stackoverflow.com/q/29392017
tags question: http://stackoverflow.com/q/29432678

http://stackoverflow.com/q/29481393
has body: Outline- I am running a Wordpress v4 installation and have installed a chatroom plugin: https://github.com/wp-plugins/chat-room (full code below). I want to be able to highlight specific words that appear in chat when a user posts a message. For example, every time a user posts a message with the word "Dog" in it, it would have background colour so that it can be highlighted to everyone. As the HTML output from the plugin is plain HTML, the best solution I have found is the following working example: https://jsfiddle.net/4ny8adpg/2/. The Problem- When using the script from the jsfiddle above on the page where the chatroom is placed, it seems that the script either cannot find the words or cannot replace them. I do not understand why, as the HTML that is output from the chatroom scripts is plain HTML (exactly as shown in the jsfiddle). It's also worth noting that the script will find and replace words that are written into the HTML source on the same page. The Code- Below is the PHP, Javascript and example HTML output for the chat-room plugin. I did not write this plugin and the original author offers very very limited support. PHP: Class Chatroom { function __construct() { register_activation_hook( __FILE__, array( $this, 'activation_hook' ) ); register_deactivation_hook( __FILE__, array( $this, 'deactivation_hook' ) ); add_action( 'init', array( $this, 'register_post_types' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); add_action( 'save_post', array( $this, 'maybe_create_chatroom_log_file' ), 10, 2 ); add_action( 'wp_head', array( $this, 'define_javascript_variables' ) ); add_action( 'wp_ajax_check_updates', array( $this, 'ajax_check_updates_handler' ) ); add_action( 'wp_ajax_send_message', array( $this, 'ajax_send_message_handler' ) ); add_filter( 'the_content', array( $this, 'the_content_filter' ) ); } function activation_hook() { $this->register_post_types(); flush_rewrite_rules(); } function deactivation_hook() { flush_rewrite_rule…
answer count: 0
type: UnansweredQuestion
tagged with: wordpress
tagged with: php
has comment: http://stackoverflow.com/comment/47123592
has comment: http://stackoverflow.com/comment/47123413
has title: How do I add a background/highlight color to specific words in a Wordpress Chatroom plugin?
has comment: http://stackoverflow.com/comment/47164404
has comment: http://stackoverflow.com/comment/47196264
type: Question
tagged with: chatroom
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47209275
has comment: http://stackoverflow.com/comment/47151633

http://stackoverflow.com/q/29479197
score: 1
has body: There's a way to select a certain data in CSS like this: td[data-cell|="n"] { background-color: red; margin-top: 10px; ... } Where n - is a beginning of td's data-cell attribute. How to use this selector's combination in Javascript? Because JS's will recognize this likely as an array and return Error.
has comment: http://stackoverflow.com/comment/47119067
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
has title: An attribute value from CSS to Javascript
tagged with: css
has comment: http://stackoverflow.com/comment/47118941
has answer: http://stackoverflow.com/a/29479231
downvote count: 1

http://stackoverflow.com/comment/46952198
type: QuestionComment
has text: It's not so good solution because a lot of markup is generated by js, so it will not be handled on DOMContentLoaded event.
score: 0
comment on: http://stackoverflow.com/q/29386536
type: Comment

http://stackoverflow.com/q/29381657
has comment: http://stackoverflow.com/comment/46942862
has comment: http://stackoverflow.com/comment/46942910
has title: How can I hide an HTML table that shares a class element with a table I want to keep visible?
downvote count: 3
type: Question
has answer: http://stackoverflow.com/a/29381879
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46942852
has comment: http://stackoverflow.com/comment/46942843
answer count: 3
has answer: http://stackoverflow.com/a/29381855
has body: I have a table that I am trying to hide. It is generated by from automatic HTML that I cannot edit. I know I can hide the class table however there are other tables on the page and throughout the site that use the same class. Are there any methods anyone can think of to hide just this table? &lt;table class="table" style="width:100%;"&gt;
favorite count: 0
has comment: http://stackoverflow.com/comment/46942996
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: -3
has answer: http://stackoverflow.com/a/29382535

http://stackoverflow.com/comment/47042493
has text: u have empty elements in arrays - and its triggered erros
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29436212

http://stackoverflow.com/comment/46981514
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29403071
has text: I want to know if possible in one step.
score: 0

http://stackoverflow.com/a/30993285
has comment: http://stackoverflow.com/comment/50325800
downvote count: 0
has comment: http://stackoverflow.com/comment/50180669
has comment: http://stackoverflow.com/comment/50405817
has body: Finally, found documentation on their site itself. Hope this proves as good starting point for whose who stumble upon this post.
type: Answer
has comment: http://stackoverflow.com/comment/50187326
upvote count: 3
has comment: http://stackoverflow.com/comment/50331578
has comment: http://stackoverflow.com/comment/58869832
score: 3
has comment: http://stackoverflow.com/comment/50521169
has comment: http://stackoverflow.com/comment/50361900
answers question: http://stackoverflow.com/q/29384471
has comment: http://stackoverflow.com/comment/50380715
accepted answer of: http://stackoverflow.com/q/29384471
type: AcceptedAnswer

http://stackoverflow.com/comment/47064066
comment on: http://stackoverflow.com/q/29447468
score: 0
type: Comment
type: QuestionComment
has text: A meteor reset didnt changeed anything

http://stackoverflow.com/a/29509983
type: AcceptedAnswer
upvote count: 89
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29496054
score: 89
answers question: http://stackoverflow.com/q/29496054
has body: Ok so, I found the answer, I post it here for anyone who run into the same issue. An issue has been posted on Github here . It is necessary to add to the ListView the parameter automaticallyAdjustContentInsets={false}. Problem Solved.

http://stackoverflow.com/comment/46946206
type: Comment
type: QuestionComment
has text: Note that only one instance is created here, the second call to *scareMe* returns a reference to the same object created in the first call (via closure to *instance*), so *un1* and *un2* reference the same object, hence why `un1 === un2` is true.
comment on: http://stackoverflow.com/q/29383632
score: 0

http://stackoverflow.com/a/29421833
has comment: http://stackoverflow.com/comment/47015432
has comment: http://stackoverflow.com/comment/47015365
has comment: http://stackoverflow.com/comment/47015261
has comment: http://stackoverflow.com/comment/47015486
score: 0
answers question: http://stackoverflow.com/q/29421684
has body: I think your Insert query is not proper . Try this out : INSERT into power_play (user_id, p_play_type, date_of_play, set_value) VALUES ('$_SESSION[login_user]','1','$date','$set_value')");
has comment: http://stackoverflow.com/comment/47015540
type: Answer
has comment: http://stackoverflow.com/comment/47015673

http://stackoverflow.com/comment/46965060
has text: ok i have updated the query. What are you trying to achieve with this query as `like '%'` will return all rows for that field!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29392941
type: Comment

http://stackoverflow.com/comment/47111442
type: Comment
has text: I got this error when I forgot to add `module.exports = <ComponentName>;` to the end of my file. Unrelated to this question, but maybe helpful for someone else.
comment on: http://stackoverflow.com/a/29392450
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47044294
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29435891
has text: @KidDiamond it's kind of like doing `foo = 9; (function() { var foo = 5; return foo; })()` and expecting to return 9. There's just no sense in it :P. There *is* a `foo` that is 9, but you won't be referencing it.
score: 0

http://stackoverflow.com/a/29809243
answers question: http://stackoverflow.com/q/29422869
type: Answer
has body: I solved the problem by using an attribute for panel called disabled and setting it to true.
score: 0

http://stackoverflow.com/q/29470563
has body: I've just encountered a very weird issue. Basically, Safari seems to be applying transforms to elements after the page has been fully loaded (or sometimes once the window has been resized), which results in an ugly flash of unstyled content. I've already tried adding backface-visibility in hope that it will fix the issue, but to no avail. Here's the issue on CodePen: http://codepen.io/goodpixels/full/NPVdGy/ It works perfectly fine in Chrome and Firefox, yet in Safari it doesn't work until the window is redrawn. Any thoughts on how this can be fixed? I'm on a Mac.
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: safari
answer count: 0
linked to: http://stackoverflow.com/q/9471038
type: Question
tagged with: transform
has comment: http://stackoverflow.com/comment/52018667
tagged with: javascript
has title: CSS transforms not loading correctly in Safari
score: 0
has comment: http://stackoverflow.com/comment/47670756
has comment: http://stackoverflow.com/comment/47133134

http://stackoverflow.com/comment/47044571
comment on: http://stackoverflow.com/q/29435192
score: 0
has text: sorry, i can't get code to display right on here.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47172897
has text: show/hide Column is not suitable for me! I have whole new dataset with some new columns and i need to set this dataset of columns as new dataset. I tried to find something useful in Documentation, but without luck.
comment on: http://stackoverflow.com/a/29508156
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/29444035
has comment: http://stackoverflow.com/comment/47055869
has body: Your first example is parsed this way alert(('Array has ' + (arrays.length &gt; 0)) ? 'multiple':('single' + ' value')); given the operator precedence of + is much higher than that of ?:.
type: AcceptedAnswer
downvote count: 0
score: 14
accepted answer of: http://stackoverflow.com/q/29444009
type: Answer
answers question: http://stackoverflow.com/q/29444009
upvote count: 14

http://stackoverflow.com/q/29429571
has answer: http://stackoverflow.com/a/29429624
score: -3
has comment: http://stackoverflow.com/comment/47029051
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/47029795
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29431712
accepted answer: http://stackoverflow.com/a/29431712
tagged with: javascript
has comment: http://stackoverflow.com/comment/47034117
downvote count: 3
has body: As you can see from the picture, the background image does not scale according to the height of the divs it is covering. The divs are blocks. &lt;div style="/* background-size:100%; */background-image: url('http://www.infor.com/furniture/design2014/images/10x-technology.jpg'); margin-top: 50px; margin-bottom: 50px; padding-top: 50px; padding-bottom: 50px;"&gt; &lt;div style="margin-left: 9%; margin-right: 9%;"&gt; &lt;div class="block"&gt;
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
possible better answer: http://stackoverflow.com/a/29429624
has title: Background image does not scale to fit the divs inside

calendar
tags question: http://stackoverflow.com/q/29490212
tags question: http://stackoverflow.com/q/29421447
tags question: http://stackoverflow.com/q/29466204
tags question: http://stackoverflow.com/q/29529370
tags question: http://stackoverflow.com/q/29428166
tags question: http://stackoverflow.com/q/29456641
tag name: calendar
type: Tag

http://stackoverflow.com/q/29457901
has answer: http://stackoverflow.com/a/29458121
has comment: http://stackoverflow.com/comment/47081598
tagged with: javascript
has answer: http://stackoverflow.com/a/29458357
has body: I was wondering about the best way to structure an angular.js application. I believe that all directives download their respective templates via an ajax request. Therefore, is it better to enclose each distinct section of an SPA in a directive as an individual unit with its own template html and controller: Or is it better to reserve directives for DOM manipulation and embed all controllers inside the main html page: ... ... ... I was wondering what the advantages and disadvantages of each approach are, in terms of performance, best practices etc. Thanks in advance.
possible better answer: http://stackoverflow.com/a/29458121
has title: How to structure an angular.js app
answer count: 3
has answer: http://stackoverflow.com/a/29461034
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
tagged with: single-page-application
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29461034
score: 0
type: Question

http://stackoverflow.com/q/29409503
tagged with: keyboard-shortcuts
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46992762
has title: How do I make a desktop shortcut which links to a specific element of a webpage?
tagged with: shortcut
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46992823
answer count: 1
has answer: http://stackoverflow.com/a/29409750
has comment: http://stackoverflow.com/comment/46992864
tagged with: bookmarklet
has body: I'm trying to create a shortcut to a search bar on a website. After this shortcut has been created I am going to give it a keyboard shortcut. How do I focus on a specific element on a page when it is opened for the first time in a browser? I have researched bookmarklets, but I don't think they do what I want them to do. I also had a look at javascript, and I have a feeling I will need to use: document.findElementByName("").focus() Can anyone help? Thanks. EDIT: It's worth noting it is not my webpage. It is a public webpage.

http://stackoverflow.com/q/29507694
type: Question
has comment: http://stackoverflow.com/comment/47172109
upvote count: 0
has comment: http://stackoverflow.com/comment/47172129
has answer: http://stackoverflow.com/a/29507838
tagged with: javascript
has answer: http://stackoverflow.com/a/29507721
has title: How to hide a text using javascript?
possible better answer: http://stackoverflow.com/a/29507838
has comment: http://stackoverflow.com/comment/47172064
has answer: http://stackoverflow.com/a/29507844
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/29507937
accepted answer: http://stackoverflow.com/a/29507721
score: -3
has comment: http://stackoverflow.com/comment/47172371
has body: html code Sign in Hello javascript code $(document).ready(function(){ document.getElementById('signin').onclick = function () { document.getElementById('myDiv').style.display="none"; } });
type: AnsweredQuestion
downvote count: 3

http://stackoverflow.com/comment/47108386
score: 0
comment on: http://stackoverflow.com/a/29473179
type: Comment
has text: would i need to add all of these header statements to the php page or just one of them
type: AnswerComment

http://stackoverflow.com/a/29432164
upvote count: 1
type: Answer
has body: If responsetype is arraybuffer, then You will need to loop through in this way: if (this.xhr_.responseType == 'arraybuffer') { var ab = new Uint8Array(this.xhr_.response); for (var i = 0, buffer = ''; i &lt; ab.length; i++) { buffer += String.fromCharCode(payload[i]); } } Hope this will help you.
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29431168
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29431168
has comment: http://stackoverflow.com/comment/47033827

http://stackoverflow.com/a/29488880
has comment: http://stackoverflow.com/comment/47137275
has comment: http://stackoverflow.com/comment/47138993
answers question: http://stackoverflow.com/q/29487340
score: 0
has body: Is this the result you wanted ? If no, let me know, I work to a project similar to yours. http://jsfiddle.net/3a7pjeb9/14/ $(document).ready(function() { var expanded = false; $( ".container ul li" ).click(function(e) { if (expanded) { $( ".expanded" ).slideUp("slow").children().remove(); expanded = false; } else { $( ".expanded" ).slideDown("slow"); $(this).clone().appendTo('.expanded'); expanded= true; } }); });
type: Answer

http://stackoverflow.com/q/29382171
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
answer count: 0
tagged with: wordpress
upvote count: 1
has title: Setting up in-video ads with JWplayer wordpress plugin
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/70020246
has body: I've tried and tried to make this code work but with no success. &lt;script type="text/javascript"&gt; jwplayer().onReady(function() { var currentItem = jwplayer().getPlaylistItem().file + ‘?wmode=transparent’; jwplayer().load({file: currentItem}); var params = { ignore_swfobject: '1' }); &lt;/script&gt; &lt;script type="text/javascript"&gt; var exoOpts = { cat: '118', login: 'thelogin', idzone_300x250: '720635', idzone_468x60: '720635', idsite: '243347', pause: {}, postroll: {}, show_thumb: '1' }; &lt;/script&gt; &lt;script type="text/javascript" src="https://ads.exoclick.com/invideo.js"&gt;&lt;/script&gt; The ad appears when the video is on pause. It just makes the video disappear and there is no way back to the video other than reloading the page. I tried to put this code before the video in the post page to set wmode to transparent and the - var params = { ignore_swfobject: '1' }; As specified by the ad network. I'm pretty new to this.. Did I messed up something? Did added it in the wrong place? I put it in single-video.php. I use Wordpress self hosted. Can you help me with this? Thanks a lot
downvote count: 0
score: 1

http://stackoverflow.com/comment/46989029
comment on: http://stackoverflow.com/q/29407426
has text: why would anyone need this? what for?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29491839
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29491750
answers question: http://stackoverflow.com/q/29491750
type: Answer
score: 1
upvote count: 1
has body: You can use a delegated event handler for this job: $('body').on('change', 'input.change-handled', myJqueryFunction); be sure to give your inputs the change-handled class and have myJqueryFunction read the data-id attribute of the element that the event was called upon: function myJqueryFunction() { var dataId = $(this).attr('data-id'); }
type: AcceptedAnswer

http://stackoverflow.com/q/29391442
has title: jQuery/Ajax - Trying to create a POST method by Ajax and get response to HTML
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/29391517
has body: Guys i'm trying to create a simple HTML post method by Ajax. Here is my code: <?PHP function callInstagram($url) { $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => 2 )); $result = curl_exec($ch); curl_close($ch); return $result; } $tag = Mage::getStoreConfig('vivastags/vivasgroup/instagra_tag'); $client_id = "1e0f576fbdb44e299924a93cace24507"; $Next_URL = $_GET["nexturl"]; if($Next_URL == ""){ $url = 'https://api.instagram.com/v1/tags/'.$tag.'/media/recent?client_id='.$client_id.'&count=24'; } else { $url = $Next_URL; } $inst_stream = callInstagram($url); $results = json_decode($inst_stream, true); $maxid = $results['pagination']['next_max_id']; $nexturl = $results['pagination']['next_url']; //Now parse through the $results array to display your results... ?> <?PHP foreach($results['data'] as $item){ $image_link = $item['images']['thumbnail']['url']; $Profile_name = $item['user']['username']; $PostID = $item['id']; echo ' '.$Profile_name.' '; } $nextUrlEncoded = urlencode($nexturl); ?> <?PHP $nextUrlEncoded = urlencode($nexturl); ?> Load more Images! Note that i have included jQuery1.9.1 in my head tags. Here is my ajax.php: <?PHP function callInstagram($url) { $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => 2 )); $result = curl_exec($ch); curl_close($ch); return $result; } $tag = "bulgaria"; $client_id = "1e0f576fbdb44e299924a93cace24507"; $Next_URL = $_POST["next_url"]; $url = $Next_URL; $inst_stream = callInstagram($url); $results = json_decode($inst_stream, true); $maxid = $results['pagination']['next_max_id']; $nexturl = $results['pagination']['next_url']; //Now parse through the $results array to display your results... foreach($results['data'] as $item){ $image_link = $item['images']['thumbnail']['url']; $Profile_name = $item['user']['use…

http://stackoverflow.com/q/29432364
downvote count: 0
score: 1
tagged with: skrollr
has title: Skrollr js not scrolling down in mobile
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/30163881
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/30158470
accepted answer: http://stackoverflow.com/a/30158470
favorite count: 0
has body: I have a problem in Skrollr js. Its working great in web browser .Also in mobile. But the problem is when I tap on a menu or scroll down arrow its not scrolling. Please help.Link Thanks your your help
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/30163881

filter
tags question: http://stackoverflow.com/q/29528290
tags question: http://stackoverflow.com/q/29448504
tag name: filter
type: Tag
tags question: http://stackoverflow.com/q/29436999
tags question: http://stackoverflow.com/q/29387511
tags question: http://stackoverflow.com/q/29376281
tags question: http://stackoverflow.com/q/29527450

http://stackoverflow.com/comment/139139072
type: AnswerComment
comment on: http://stackoverflow.com/a/29481966
type: Comment
has text: For Vue 3 with composition API just: `nextTick(() => { ... your code ... })`. See: [nextTick()](https://vuejs.org/api/general.html#nexttick)
score: 0

http://stackoverflow.com/q/29521474
tagged with: javascript
has answer: http://stackoverflow.com/a/29522177
score: 0
has comment: http://stackoverflow.com/comment/47198085
answer count: 1
has title: Highcharts -- show axis labels on extreme edges
has body: At times the labels aren't showing up on the extreme edges of an axis. For example, in this picture I would always like a label at the top of the chart, like where that red circle is (as well as near the origin). Any ideas?
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29522177
tagged with: highcharts

http://stackoverflow.com/a/29404741
type: Answer
has comment: http://stackoverflow.com/comment/47000167
downvote count: 0
score: 9
accepted answer of: http://stackoverflow.com/q/29404568
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29404568
upvote count: 9
has body: You'll want to remove the invoking parenthesis after each use of onChangeFilter: $("#Division").on('click', onChangeFilter); // ^^ $("#Program").change(onChangeFilter); // ^^ This treats the function as any other (object) value, passing it as an argument to .on() and .change() for them to use and for the events to invoke when they've been triggered. Otherwise, with the parenthesis, the function is being called first and its return value is instead passed to .on() and .change(), similar to: var result1 = onChangeFilter(); $("#Division").on('click', result1); var result2 = onChangeFilter(); $("#Program").change(result2);

http://stackoverflow.com/a/29530062
has body: Maybe this... var a = &lt;condition a&gt;, b = &lt;condition b&gt;, c = &lt;condition c&gt;, doDoA = true; if (a) { if (b) { doB; doDoA = false; } else if (c) { doC; doDoA = false; } } if (doDoA) { doA }
answers question: http://stackoverflow.com/q/29529757
score: 0
type: Answer

http://stackoverflow.com/comment/47159246
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29499750
has text: You really should write it as an plugin to wp. It is really ease.

http://stackoverflow.com/comment/46957366
comment on: http://stackoverflow.com/a/29386560
has text: Thanks ! var re = /<div[^>]*?>(?:<(\S+)[^>]*?>[^<]*?<\/\1>)+<span[^]*?>([^<]*?)(?=<span )/g; It's work for me
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29432309
has comment: http://stackoverflow.com/comment/47034381
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/47034526
has body: Is it possible to tell whether an inherited object property was set to be undefined or doesn't exist at all? I have a formatting string with a property name in it, and an object that's expected to contain the property. I don't care if the property is the object's own or inherited, I need to know if it exists at all so I can use it, even if it was set as undefined, but if it doesn't exist at all, I need to throw an error. I know just how many times this subject has been danced around, and with so many opinions about using: if(prop in obj){ } and this one: obj.hasOwnProperty(prop) And while I clearly cannot use the second one, the first method seems unreliable when it comes to all possible property values. Is there a reliable way to check if a particular property exists either within object or inherited, even if its value was set to 0 or null or undefined?
has comment: http://stackoverflow.com/comment/47034145
has comment: http://stackoverflow.com/comment/47034472
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47034587
has title: Inherited property check
has answer: http://stackoverflow.com/a/29432526
has comment: http://stackoverflow.com/comment/47034657
linked to: http://stackoverflow.com/q/11040472
has comment: http://stackoverflow.com/comment/47034593
has comment: http://stackoverflow.com/comment/47034290
accepted answer: http://stackoverflow.com/a/29432526
type: AnsweredQuestion

http://stackoverflow.com/comment/47074036
has text: No, I think all methods that modify a string do so, and then return a new string; why are you opposed to creating a new variable? You could (inside the `for` loop: `odr.testkey2[key] = odr.testkey2[key].toUpperCase()` if you just don't want to create a new/temporary variable to throw away.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29454385

http://stackoverflow.com/q/29421398
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
linked to: http://stackoverflow.com/q/1234008
favorite count: 0
has answer: http://stackoverflow.com/a/30269380
accepted answer: http://stackoverflow.com/a/30269380
has body: Can you link printing a webpage to printing a PDF? Ideally, the PDF would be downloaded once the user uses the browser's print functionality (so a performance hit doesn't affect users who are not printing the website). I'm looking for a Javascript/CSS print media query solution.
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has title: Show PDF for Website Printing
tagged with: javascript
tagged with: printing
upvote count: 1

http://stackoverflow.com/comment/47090443
type: QuestionComment
has text: This is how you would organize it in a simplified example: http://jsfiddle.net/p6myjLza/1 Note that the custom event is simply a vehicle for working the event through the DOM; it needs to be dispatched against the element, which is `document.body` in your example. Here's another (slightly more complete) example: http://stackoverflow.com/a/12341715/451969
score: 1
comment on: http://stackoverflow.com/q/29463559
type: Comment

http://stackoverflow.com/a/29454208
has body: If it's your API you can simply do this. 1) Insert the following code into your API file(s) $authToken = "APItoken"; //variables if( !isset($_REQUEST["authToken"]) || $_REQUEST["authToken"] != $authToken ) die("Need auth token"); 2) You will now need to GET/POST/PUT the URL like this: http://www.yoursite.com/api1.php?authToken=APItoken&amp;nextParam=&amp;paramAfterThat= If this helped please mark it as the answer EDIT: Nevermind, read it wrong. Updating answer in a few minutes.
score: 0
answers question: http://stackoverflow.com/q/29453992
type: Answer

http://stackoverflow.com/a/42795117
score: 0
type: Answer
has body: This code work perfectly for me: &lt;script type="text/javascript"&gt; //&lt;![CDATA[ var map, infoWindow, intervalId; var customIcons = { restaurant: { icon: 'http://maps.gstatic.com/mapfiles/ridefinder-images/mm_20_blue.png' }, bar: { icon: 'http://maps.gstatic.com/mapfiles/ridefinder-images/mm_20_red.png' } }; function load() { map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(47.6145, -122.3418), zoom: 13, mapTypeId: 'roadmap' }); infoWindow = new google.maps.InfoWindow; // Trigger downloadUrl at an interval intervalId = setInterval(triggerDownload, 1000); } function bindInfoWindow(marker, map, infoWindow, html) { google.maps.event.addListener(marker, 'click', function () { infoWindow.setContent(html); infoWindow.open(map, marker); }); } function bindInfoWindow(marker, map, infoWindow, html) { google.maps.event.addListener(marker, 'click', function () { infoWindow.setContent(html); infoWindow.open(map, marker); }); } var markersArray = []; function clearOverlays() { for (var i = 0; i &lt; markersArray.length; i++ ) { markersArray[i].setMap(null); } } function triggerDownload() { clearOverlays(); // Change this depending on the name of your PHP file downloadUrl("poy.php", function (data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i &lt; markers.length; i++) { var name = markers[i].getAttribute("name"); var address = markers[i].getAttribute("address"); var type = markers[i].getAttribute("type"); var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var html = "&lt;b&gt;" + name + "&lt;/b&gt; &lt;br/&gt;" + address + "&lt;br/&gt;" + point; var icon = customIcons[type] || {}; var marker = new google.maps.Marker({ map: map, position: point, icon: icon.icon }); markersArray.push(marker); bindInfoWindow(marker, map, infoWindow, html); } }); } function downloadUrl(url, callback) { var request…
answers question: http://stackoverflow.com/q/29530104

http://stackoverflow.com/a/29430396
answers question: http://stackoverflow.com/q/29429827
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: I think your code it ok but in your html you have used wrong variable name like "myCurrentPosition" and i think it will work with "myCurrentLocation"

http://stackoverflow.com/q/29485875
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47137816
tagged with: durandal-2.0
has answer: http://stackoverflow.com/a/32257027
has title: cant able to pass a observable data while closing pop up
tagged with: knockout-2.0
type: Question
answer count: 1
has body: return{ // this code is in index.js addItem: function () { alert("working"); Newram.show().then(function (response) `***// Calling show functionin Newram.js***` { var c = response; } ); }} // In Newram.js while closing the popup i tried to send data to the **response** in index.js but empty string or undefined is showing var AddItem = function () { var self = this; self.Name = ko.observable('jo'), self.Price = ko.observable(100), self.Sales = ko.observable("good") self.data1= {name:self.Name() }; }; AddItem.prototype.closeDialog = function () { dialog.close(this, self.Name); }; I cant able to pass an observable data while closing a popup even i tried this code( dialog.close(this,ko.toJS(self.Name))).....cant able to get the data in response but if i pass a string it is available in the response
score: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/47135510

http://stackoverflow.com/comment/47079477
comment on: http://stackoverflow.com/q/29457539
type: Comment
type: QuestionComment
has text: Not yet apparently https://bugzilla.mozilla.org/show_bug.cgi?id=797262
score: 1

http://stackoverflow.com/q/29519811
linked to: http://stackoverflow.com/q/1129216
has comment: http://stackoverflow.com/comment/47195046
has comment: http://stackoverflow.com/comment/47200974
score: 1
favorite count: 0
type: Question
tagged with: dictionary
duplicate of: http://stackoverflow.com/q/1129216
has title: Sort array of objects according to key dictionary
answer count: 0
has comment: http://stackoverflow.com/comment/47194969
has comment: http://stackoverflow.com/comment/47201060
has comment: http://stackoverflow.com/comment/47195809
has comment: http://stackoverflow.com/comment/47200319
upvote count: 1
has comment: http://stackoverflow.com/comment/47194933
has comment: http://stackoverflow.com/comment/47195435
tagged with: arrays
downvote count: 0
has comment: http://stackoverflow.com/comment/47194833
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/47195031
has body: I hope, that I used terms right, I will explain anyway. So the idea is: Here is a 'dictionary' (it's an array of id's of DOM elements, but i suppose this doesn't matter) ['foo', 'evil', 'banana'] And here's an array of objects: [ {id: 'evil', data: 'somedata'}, {id: 'foo', data: 'dataagain?'}, {id: 'banana', data: 'somemoredata'} ] I think You already get it. I want to sort this array of objects in the way its id's will be in the same order as corresponding elements in 'dictionary'. As elegant and as fast as possible, obviously. jQuery or plain JavaScript. For the moment i can only think about splice trickery, like looking up for place of key and then splicing object out and back in to required place. To make myself completely clear, I want this array of objects at the end to look like this: [ {id: 'foo', data: 'dataagain?'}, {id: 'evil', data: 'somedata'}, {id: 'banana', data: 'somemoredata'} ]

http://stackoverflow.com/comment/47062602
score: 1
has text: Well, that's not a *call* to "getVal", it's just a reference to the function itself. What *exactly* is the error message you're getting?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29448057

http://stackoverflow.com/q/29413833
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29413963
has title: Screen resize function - Jquery
has answer: http://stackoverflow.com/a/29414015
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
type: UnansweredQuestion
has body: How can I make jquery do something if my screen width is less than 960 pixels I want to fire the width() - 140, if screen grater than 960px it should change width() - 340. If any other solution to achieve this always welcome. function resize() { if ($(window).width() &lt; 960) { $(".test").css({ width: $(window).width() - 140, height: $(window).height() - 140, }); } else () { $(".test").css({ width: $(window).width() - 340, height: $(window).height() - 40, }); } resize(); $(window).resize(function(){ resize(); }); .test { background: green; padding: 20px; } &lt;div class="test"&gt;&lt;/div&gt;
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29414426
has comment: http://stackoverflow.com/comment/47000677
has comment: http://stackoverflow.com/comment/47000506
has comment: http://stackoverflow.com/comment/47000577
type: Question
has comment: http://stackoverflow.com/comment/47000613
score: 0
has answer: http://stackoverflow.com/a/29414079

http://stackoverflow.com/a/29465985
score: 0
accepted answer of: http://stackoverflow.com/q/29465778
type: AcceptedAnswer
has body: You can extract your switch to a function that creates the element var create = function(field){ switch (field.type) { case 'options': return renderOptions(field.value, field.values[0].value, field); case 'text': return '&lt;input type="text" class="form-control" value="' + value + '"" ' + renderFieldMetaData(field, null, options) + ' class="span8" &gt;'; case 'text-area': return '&lt;textarea row="3" ' + renderFieldMetaData(field, null, options) + ' class="width-full" &gt;'+value+'&lt;/textarea&gt;'; case 'file': return '&lt;input type="file" value="' + value + '" ' + renderFieldMetaData(field, null, options) + ' &gt;'; default: return 'Normal Field' + field.type; } } and then you can alter your code to (assuming you are also using jquery) var element = create(field); if(field.type === "options" || field.type === "text" || field.type === "text-area" || field.type === "file"){ if(field.required){ element.attr('required',true); } if(field.readonly){ element.attr('readonly',true); } } var outer = $('&lt;div class="custom-form-right col-lg-10 col-md-10 col-sm-12 col-xs-12"&gt;&lt;/div&gt;'); outer.append(element);
answers question: http://stackoverflow.com/q/29465778
type: Answer

http://stackoverflow.com/comment/47012989
has text: This is a reasonable answer. I might promote to maintaining an array of promises over an array of results, but the end result should be the same.
type: AnswerComment
comment on: http://stackoverflow.com/a/29420368
score: 0
type: Comment

http://stackoverflow.com/a/29438195
upvote count: 1
has comment: http://stackoverflow.com/comment/62856170
answers question: http://stackoverflow.com/q/29426490
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47064689
type: Answer
has body: @Gnijuohz I have a Demo using highlight package. Here is the Source Code and the DEMO This is how i use it. Meteor-Version &lt; 1.1 Template.example.rendered = function(){ /* Higligth Configuration using https://highlightjs.org */ hljs.configure({ tabReplace: ' ', classPrefix: '', useBR:true }) $('pre code').each(function(i, block) { hljs.highlightBlock(block); }); } On new Meteor version (1.1). Template.example.onRendered(function(){ /* Higligth Configuration using https://highlightjs.org */ hljs.configure({ tabReplace: ' ', classPrefix: '', useBR:true }) $('pre code').each(function(i, block) { hljs.highlightBlock(block); }); })

http://stackoverflow.com/q/29485359
has comment: http://stackoverflow.com/comment/47130293
type: AnsweredQuestion
score: 2
tagged with: datatables
linked to: http://stackoverflow.com/q/7121716
has answer: http://stackoverflow.com/a/29485462
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/47130449
favorite count: 0
has title: JQuery cant find dynamicly created element
accepted answer: http://stackoverflow.com/a/29485546
type: Question
possible better answer: http://stackoverflow.com/a/29485462
has comment: http://stackoverflow.com/comment/47130377
has comment: http://stackoverflow.com/comment/47130322
has comment: http://stackoverflow.com/comment/47130501
has answer: http://stackoverflow.com/a/29485501
upvote count: 2
has answer: http://stackoverflow.com/a/29485682
has answer: http://stackoverflow.com/a/29485791
has answer: http://stackoverflow.com/a/29485546
answer count: 5
tagged with: javascript
has body: I want to insert html into dynamicly created table (Im using datatables). In document.ready() function, after initialising datatable i put $("div.menuContainer").html('&lt;select id="dropdownMenu1"&gt; &lt;/select&gt;'); and it doesnt work. But if i enter this line in browser console after loading page it works. What to do folks?

http://stackoverflow.com/a/29439373
score: 0
has body: you can do this with defining function $(document).ready(function(){ $( "#test1" ).click(function(){ $( this ).slideUp(); }); });
has comment: http://stackoverflow.com/comment/47047894
type: Answer
answers question: http://stackoverflow.com/q/29436040

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/29395480
tag name: google-oauth
tags question: http://stackoverflow.com/q/29444481

http://stackoverflow.com/q/29472534
tagged with: string
accepted answer: http://stackoverflow.com/a/29472601
possible better answer: http://stackoverflow.com/a/29472611
has answer: http://stackoverflow.com/a/29472611
tagged with: regex
type: AnsweredQuestion
has body: I'm using javascript to append a string to a variable (adding specific image size to a slider on mobile devices). Here's the line I'm using. var newsrc = src.substring(0, src.lastIndexOf(".")) + "-420x320" + src.substring(src.lastIndexOf(".")); However there are some cases where the image src has another size and in this case I would like to remove that size and add the one above. Example: Both http://domain.com/10001428289243jpg-700x703.jpg and http://domain.com/10001428289243jpg.jpg Needs to be: http://domain.com/10001428289243jpg-420x320.jpg What would you use in this case?
has answer: http://stackoverflow.com/a/29472924
type: Question
has answer: http://stackoverflow.com/a/29472601
has title: If string matches regex replace, if not add variable
tagged with: javascript
score: 0
answer count: 3

http://stackoverflow.com/a/29427039
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/29403168
answers question: http://stackoverflow.com/q/29403168
has body: The final result of what I'm trying to will have about 15 tables ontop of each other to create cascading rows (sort of) that expand and collapse. I managed to get it to work with an onload in the body tag but was having issues getting it to work with multiple functions at once. I resolved the issue by creating a new parent function for each tables respective function like this: <!-- function toggle_visibility(tbid,lnkid) { if (document.getElementsByTagName) { var tables = document.getElementsByTagName('table'); for (var i = 0; i < tables.length; i++) { if (tables[i].id == tbid){ var trs = tables[i].getElementsByTagName('tr'); for (var j = 2; j < trs.length; j+=1) { trs[j].bgcolor = '#CCCCCC'; if(trs[j].style.display == 'none') trs[j].style.display = ''; else trs[j].style.display = 'none'; } } } } var x = document.getElementById(lnkid); if (x.innerHTML == '[-] ') x.innerHTML = '[+] '; else x.innerHTML = '[-] '; } function start() { toggle_visibility('tbl3RD','lnk3RD'); toggle_visibility('tblW8','lnkW8'); } //--> a { color: #ff0000; } #exco { color: #ff0000; text-decoration: none; } #tbl3RD, #tblW8 { width: 100%; border: 1px solid #ff0000; border-bottom-width: 0px; cellspacing: 0px; border-spacing: 0px; } #dark { background-color: #242424; } #light { background-color: #8C8C8C; } #td75 { width: 75%; } #td25 { width: 25%; } #title { font-size: 110%; color: #FFFFFF; font-weight: bold; } #subtitle { color: #242424; font-weight: bold; } Test Title of the table. [-] Subtitle row that explains the content. Main content of the table. Title of the table. [-] Subtitle row that explains the content. Main content of the table.
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29431112
type: Answer
accepted answer of: http://stackoverflow.com/q/29430567
answers question: http://stackoverflow.com/q/29430567
has body: So you want to remove any entry in the array that has that id, then add the new object with that id. It seems like the simplest thing is to do those two things, in that order: array = _.filter(array, function(entry) { return entry.id != obj.id; }); array.push(obj); Live example: var array = [{"id": 1, "name": "amine"}, {"id": 2, "name": "aymen"}]; var obj = { "id": 1, "name": "youssef" }; array = _.filter(array, function(entry) { return entry.id != obj.id; }); array.push(obj); snippet.log(JSON.stringify(array)); If you don't like using _.filter, you could use _.find and then Array#splice: var index = _.find(array, function(entry) { return entry.id == obj.id; }); if (index !== undefined) { array.splice(index, 1); } array.push(obj); Live example: var array = [{ "id": 1, "name": "amine" }, { "id": 2, "name": "aymen" }]; var obj = { "id": 1, "name": "youssef" }; var index = _.find(array, function(entry) { return entry.id == obj.id; }); if (index !== undefined) { array.splice(index, 1); } array.push(obj); snippet.log(JSON.stringify(array));
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/47158561
comment on: http://stackoverflow.com/a/29499912
type: Comment
has text: My guess is that you haven't loaded jQuery when the page has loaded. See [their documentation](http://learn.jquery.com/using-jquery-core/document-ready/) for more info on that.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47070247
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29450813
score: 0
has text: I tried Firefox and it works fine. T am not sure why the debugger doesn't go to breakpoint in chrome. Thanks for the help.

http://stackoverflow.com/comment/47116536
comment on: http://stackoverflow.com/q/29477766
type: Comment
type: QuestionComment
has text: What *exactly* is the output you are trying to achieve? What is the input you are working with? It seems like you are possibly overcomplicating/overengineering this problem.
score: 1

http://stackoverflow.com/a/29445820
upvote count: 1
answers question: http://stackoverflow.com/q/29445775
has body: There's no automatic process that will give you that list, no. You'll need to get that information from the specification and maintain your own array, keeping it up to date as the specification evolves. The index provides a handy reference for them, and references the list of globals as well. And you'll want to allow for the fact that any element can have any number of data-* attributes.
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/comment/47052424
comment on: http://stackoverflow.com/q/29442167
score: 0
type: Comment
type: QuestionComment
has text: Hoisting doesn't affect scope as seen by you program; the semantics remain unchanged. The hoisted x is not the same variable as x in the outer scope even after hoisting.

http://stackoverflow.com/comment/47167648
type: AnswerComment
type: Comment
has text: Thanks for the input. I am purposely using `POST` because I'm calculating two variables on the index route. I've added additional app.js. If you want to view it again.
comment on: http://stackoverflow.com/a/29505246
score: 0

http://stackoverflow.com/q/29503856
has answer: http://stackoverflow.com/a/29521087
tagged with: javascript
tagged with: dstore
upvote count: 1
answer count: 1
favorite count: 0
tagged with: dojo
type: AnsweredQuestion
tagged with: dgrid
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/29521087
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: I'm writing an application where the resulting dgrid may have a different number of columns/column-widths depending on the input. Note the following two screenshots. The first one only has a few select fields, and the cells/data render nicely horizontally. the second query has many select fields, and as you can see renders undesirably as it attempts to fit all the cells into one screen cluttering the data. Note the dgrid is also sitting within a dijit BorderContainer. Screenshot 1 (Small SELECT fieldset, renders ok) Screenshot 2 (Large SELECT fieldset, renders undesirably There will be a number of issues to contend with here, but I guess my main question is: is there a css rule (or any other way - a dgrid function/event?) I can use to specify for the cells to expand to use the full width of the data within it without cutting it off (ie no overflow)? This would then need the grid to be displayed with a horizontal scrollbar. So I'd like the data to drive the width of the grid, rather than setting the width. I tried .dgrid-cell { white-space:nowrap; } but this seemed to be ignored. It almost seems like a span needs to be added inside of the cell, which would have the above css rule? Secondarily - the next issue will be determining in which cases I should apply the above rule, vs the cases where the data DOES fit in the screen. In those situations it may be best to just let the table use the 100% width as per the first screenshot. any input on this one? Thanks
has title: Configuring dgrid cells to display the full width of the data

http://stackoverflow.com/comment/47149851
type: QuestionComment
comment on: http://stackoverflow.com/q/29494944
has text: What does FIG-3 stand for / mean?
score: 0
type: Comment

asset-pipeline
tags question: http://stackoverflow.com/q/29502669
type: Tag
tag name: asset-pipeline

http://stackoverflow.com/comment/87289535
type: AnswerComment
comment on: http://stackoverflow.com/a/45554140
type: Comment
has text: This is the correct answer and a much more reliable way to check the URL.
score: 2

http://stackoverflow.com/a/33195136
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29449393
has body: I know its Try registering your controller after AppController class. ///&lt;reference path="./../typings/tsd.d.ts" /&gt; import App = require("../Start"); class AppController { public test: string = "tedast"; constructor(scope: ng.IScope) { } } App.application.app.register.controller("AppController",($scope: ng.IScope) =&gt; { $scope["vm"] = new AppController($scope); });

http://stackoverflow.com/a/29502322
type: Answer
has body: when you call function using new keyword this is returned unless returned value is specefied like your code: so var obj = new wrap("Hello"); will get the value of: { "value": "Hello" }; because it is passed as an argument so: obj.value=="hello" //true
answers question: http://stackoverflow.com/q/29502218
score: 0

http://stackoverflow.com/comment/47213060
type: QuestionComment
comment on: http://stackoverflow.com/q/29529612
has text: `i++` first returns `i`, and then adds 1 to `i`. So `data[i++]` first assigns `data[0]`, and then `i` becomes 1.
score: 0
type: Comment

http://stackoverflow.com/a/29413776
score: 2
downvote count: 0
has body: you colud combine two attributes to get the same what you need: alert( $('div').css('background-image') + ' ' + $('div').css('background-repeat') );
answers question: http://stackoverflow.com/q/29413620
upvote count: 2
type: Answer

http://stackoverflow.com/q/29413893
linked to: http://stackoverflow.com/q/6447045
answer count: 1
downvote count: 0
tagged with: carousel
has title: How can I tweak the dots behavior of slick.js ?
tagged with: slick.js
favorite count: 0
accepted answer: http://stackoverflow.com/a/29413992
tagged with: css
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has body: Situation On the right side of my UI, I have 3 divs and they're slidable. I use slick.js to achieve this. I really like it. I want to solve this and still maintenance to continue using it. Slick Settings (JS) $('.slide').slick({ slidesToShow: 3, slidesToScroll: 1, arrows: true, infinite: false, swipe: true, focusOnSelect:true, dots:true, }); Dots The dots are represent to the state of my div. As the start, the first dot will be highlight in black. If I click on the right arrow once, the position of the dot will move to the right one position as well, so on and so forth... Now I want to replace the dots UI, and give a selected/current div an orange border instead. Goal This is what I am trying to archive: I want my orange line to behave as a dot, and hightlight the first div initially, and so on ... What is the most elegant way to accomplish something like that ? I'm hoping for someone at least point me to the right direction. Here is how I create my UI : Fiddle
tagged with: javascript
has answer: http://stackoverflow.com/a/29413992
tagged with: jquery

http://stackoverflow.com/comment/47136377
score: 0
type: QuestionComment
has text: Tested, not catching my error: tester.assertNoErrorMessage();
comment on: http://stackoverflow.com/q/29488078
type: Comment

http://stackoverflow.com/a/29526932
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29526862
has body: HTML is rendered and Javascript is run on the client side (unless you're using something like Node, but I'd expect a tag for it in that case) and for that reason you cannot reliably deny access to specific users (if you had a reliable IP-region-to-country database) using those technologies alone. You will need a server-side component.
answers question: http://stackoverflow.com/q/29526862
score: 3
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47223243

http://stackoverflow.com/q/29411418
type: Question
has answer: http://stackoverflow.com/a/29411582
tagged with: javascript
linked to: http://stackoverflow.com/q/149055
linked to: http://stackoverflow.com/q/3753483
answer count: 3
upvote count: 0
linked to: http://stackoverflow.com/q/2901102
has answer: http://stackoverflow.com/a/29411688
duplicate of: http://stackoverflow.com/q/3753483
tagged with: number-formatting
favorite count: 0
has title: Format number using pure javascript
duplicate of: http://stackoverflow.com/q/2901102
has comment: http://stackoverflow.com/comment/46995836
type: UnansweredQuestion
score: -3
has body: I have written a code to calculate number of votes. I am getting the output as 138405, 150000 etc. I want these figures to be formatted like this 138,405. How do I achieve this using pure javascript?
has answer: http://stackoverflow.com/a/29411779
has comment: http://stackoverflow.com/comment/46995977
downvote count: 3

http://stackoverflow.com/comment/46991981
type: Comment
has text: Thanks for your reply .. But what i want is to pass string form WebAppInterface function and get its value in javascript
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29408611

http://stackoverflow.com/comment/47094300
type: Comment
type: QuestionComment
score: 0
has text: Browser console to be specific. To clarify, I discovered that the command works but the browser console just didn't return the right thing on the first entry. This question is essentially resolved.
comment on: http://stackoverflow.com/q/29455577

http://stackoverflow.com/comment/46964764
has text: actually there is `!( f(y){}( f(x){} ) );` or can be written as **`!( f(z) );`** where `z = f(y){}`, where `y = f(x){}`, so not really clear what for is the `!(z);`
type: Comment
comment on: http://stackoverflow.com/a/29393597
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47123515
has text: @artm Doh! Thanks for that. Unfortunately didn't sort the issue out. Still defaulting to the original marker symbol.
comment on: http://stackoverflow.com/q/29481167
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47035178
comment on: http://stackoverflow.com/q/29432799
score: 0
has text: got any codes to show?
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29406418
has answer: http://stackoverflow.com/a/29406638
accepted answer: http://stackoverflow.com/a/29406638
tagged with: javascript
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: meteor
favorite count: 0
has title: Whats wrong with my meteor routing?
has answer: http://stackoverflow.com/a/29423519
type: Question
has body: My simple form on http://localhost:3000/connectSubmit: connect_submit.js: Template.connectSubmit.events({ 'submit form': function(e) { Router.go('index'); } }); router.js: Router.configure({ layoutTemplate: 'layout', }); Router.map(function() { this.route('index', {path: '/'}) this.route('/connectSubmit') }); Index.html: Connect When i'm submitting form, url is: http://localhost:3000/connectSubmit? and no redirecting me to index page
possible better answer: http://stackoverflow.com/a/29423519
tagged with: iron-router
upvote count: 2
answer count: 2

http://stackoverflow.com/comment/46990570
has text: This fixed it, thanks. The issue I had with the callback not working actually ended up being due to IE caching a json get request, but this change at least helps get rid of any javascript errors.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29400033

http://stackoverflow.com/q/29416829
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29417321
has body: I have created the following plunker to show my problem: http://embed.plnkr.co/8b4GTlRwYGKjmbcjgNvT/preview Basically, when the value bound to an input exceeds the ng-max value, the binding is lost, which makes sense in a way but when I clear the input / model. The value is not cleared, any thoughts? Thanks, Ken
has title: Angular ng-max issue with bindings
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: angularjs
has answer: http://stackoverflow.com/a/29417321

http://stackoverflow.com/comment/47428357
comment on: http://stackoverflow.com/q/29420730
type: Comment
type: QuestionComment
has text: Did you fix the issue?? http://stackoverflow.com/questions/29643721/chosen-files-are-not-coming-up-in-my-assets-jquery-chosen-in-rails Please have a check here and see If you could help
score: 0

http://stackoverflow.com/comment/47061910
has text: @Bergi Agreed. In Java I would argue that a reason could be that it's the "only" way to allow an instance method to access a static method of the same class without specifying the class name (since `doFoo()` is equivalent to `this.doFoo()` which is instance access). Not that it couldn't be solved differently, but it's about the best argument I could come up with…
type: AnswerComment
comment on: http://stackoverflow.com/a/29447648
score: 0
type: Comment

http://stackoverflow.com/a/29469260
has comment: http://stackoverflow.com/comment/47100944
has comment: http://stackoverflow.com/comment/47100925
answers question: http://stackoverflow.com/q/29469100
has body: jsBin demo $(".checkbox-list").on("change", ":checkbox", function() { var $all = $(".checkbox-list").find(":checkbox"); var $first = $all.eq(0); if ($first.is(":checked")) { $all.not(this).prop("checked", false); } });
has comment: http://stackoverflow.com/comment/47100863
accepted answer of: http://stackoverflow.com/q/29469100
score: 5
type: AcceptedAnswer
downvote count: 0
upvote count: 5
type: Answer

http://stackoverflow.com/q/29454340
tagged with: http://stackoverflow.com/tag/svg
upvote count: 25
type: UnansweredQuestion
has title: Detecting classname of SVGAnimatedString
has body: I had a problem with a SVG map I was building, the functions triggered by onmouseover on g were not working. I used then window.onmouseover=function(e) { console.log(e.target.className); }; to see if there was any problem with the classname, and then discovered than instead of the classname I was using, the system was detecting SVGAnimatedString {animVal: "", baseVal: ""} Something that never happened to me before the hundreds of times I've used similar code. Any idea how can I get the actual classname of the g elements on mouseover? Thanks
has answer: http://stackoverflow.com/a/29454358
tagged with: javascript
type: Question
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/61318183
has comment: http://stackoverflow.com/comment/94344920
has comment: http://stackoverflow.com/comment/89022567
score: 25

http://stackoverflow.com/a/29389279
downvote count: 0
has comment: http://stackoverflow.com/comment/46956023
type: Answer
answers question: http://stackoverflow.com/q/29389153
has comment: http://stackoverflow.com/comment/46955895
upvote count: 1
has body: Inside your controller, use $interval instead of setInterval. $interval will trigger the $digest cycle automatically. SO you need not call the $scope.$apply manually. instead it will be implicitly called by $interval. Do remember to inject $interval in your controller as dependency as well. You must use $scope.$apply only when you outside of angular context. For example you're using jQuery to do some part, then you must let angular to know about the changes via $scope.$apply but when you're inside your controller, it's not required at all. angular.module('Book', []) .controller('MyController', function ($scope, $interval) { var updateClock = function() { $scope.clock = new Date(); }; $interval(function() { updateClock(); //not working when i call from here...? //$scope.$apply(updateClock); //it works! }, 1000); updateClock(); //it works in first time. }); Hello {{ clock }}
score: 1

http://stackoverflow.com/comment/47140609
type: Comment
type: QuestionComment
has text: Yup squiroid you were 100% right. Thanks I dont know how I didnt think of checking there. Anyway thanks again!
score: 0
comment on: http://stackoverflow.com/q/29490653

http://stackoverflow.com/q/29381734
has comment: http://stackoverflow.com/comment/46943199
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46943061
has answer: http://stackoverflow.com/a/29394889
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29384925
has answer: http://stackoverflow.com/a/29382029
type: Question
has body: I have a Meteor method that returns all user accounts on my application returnUsers: function(){ return Meteor.users.find().fetch(); } I'm using new ReactiveVar to pass the return value of the Meteor method into my template helper: Template.listViewTemplate.created = function (){ var self = this; self.myAsyncValue = new ReactiveVar("Waiting for response from serv er..."); Meteor.call('returnUsers', function (err, users) { if (err) console.log(err); else self.myAsyncValue.set(users); }); } Template.listViewTemplate.helpers({ userCollection: function(){ return Template.instance().myAsyncValue.get(); } }); But when I go to render the users into the view, I get a console error that reads {{#each}} currently only accepts arrays When I render without the #each iterator, using &lt;ul id='usersList'&gt; {{userCollection}} &lt;/ul&gt; the output on my web-page accurately reflects the number of users (2), but reads [object Object],[object Object] I'm pretty sure that there is some funkiness going on here because I'm using a global Meteor collection (Meteor.users.find().fetch(), as opposed to having defined my own collection), but I'm not sure how to get around it. I want to display a list of all users so the current user can click another user and share a document with them--not sure how to get around this.
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29382029
has comment: http://stackoverflow.com/comment/46943117
downvote count: 0
accepted answer: http://stackoverflow.com/a/29384925
has answer: http://stackoverflow.com/a/39400914
has comment: http://stackoverflow.com/comment/46943259
tagged with: meteor
has title: Passing array via ReactiveVar in Meteor
favorite count: 0
has comment: http://stackoverflow.com/comment/46943119
answer count: 4

http://stackoverflow.com/q/29452471
type: Question
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29452777
tagged with: jquery
has answer: http://stackoverflow.com/a/29452600
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29452600
tagged with: css
has title: Jquery Fade transition doesn't look right
type: AnsweredQuestion
score: 0
has body: I have a simple fade transition that hides the current div, while un-hiding the div below it. However the transition doesn't look right as when the fade is happening it briefly shows all the div's. I'm new to using jQuery so could anyone show me how i could polish this up a bit to make it look better when the fade transition takes place? p.s i know the jQuery could be coded better, but again I'm pretty new to jQuery so if anyone has a better way of coding this let me know. Thanks. HTML: Home DIV 1 CONTENT GOES HERE Click Me! Portfolio DIV 2 CONTENT GOES HERE Click Me! About DIV 3 CONTENT GOES HERE Click Me! Contact DIV 4 CONTENT GOES HERE Click Me! jQuery: $(document).ready(function(){ $("#buttonone").click(function(){ $("#home").fadeOut(); }); }); $(document).ready(function(){ $("#buttontwo").click(function(){ $("#portfolio").fadeOut(); }); }); $(document).ready(function(){ $("#buttonthree").click(function(){ $("#aboutfour").fadeOut(); }); }); $(document).ready(function(){ $("#buttonthree").click(function(){ $("#about").fadeOut(); }); }); $(function() { $('#portfolio').addClass('hidden').hide(); $('#buttonone').click(function() { if ($('#portfolio').hasClass('hidden')) { $('#portfolio').removeClass('hidden').fadeIn(1000); } }); }); $(function() { $('#about').addClass('hidden').hide(); $('#buttontwo').click(function() { if ($('#about').hasClass('hidden')) { $('#about').removeClass('hidden').fadeIn(1000); } }); }); $(function() { $('#contact').addClass('hidden').hide(); $('#buttonthree').click(function() { if ($('#contact').hasClass('hidden')) { $('#contact').removeClass('hidden').fadeIn(1000); } }); });
has answer: http://stackoverflow.com/a/29452777

http://stackoverflow.com/q/29441173
has answer: http://stackoverflow.com/a/36603964
has answer: http://stackoverflow.com/a/39577411
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/29441236
has title: Find properties of JS object with truthy values using lodash
upvote count: 15
has answer: http://stackoverflow.com/a/29441236
has answer: http://stackoverflow.com/a/59626922
has answer: http://stackoverflow.com/a/38849343
tagged with: javascript
has answer: http://stackoverflow.com/a/29441382
has body: Let's say I have an object like: var foo = { alpha: true, beta: false, gamma: true } I can use _.findKey to get one key with a true value, but I'd really like to get an array containing all keys with a true value. E.g. _.findAllKeys(foo, function(val) { return val; }); // yields -&gt; ["alpha", "gamma"] It's simple enough to write a function to do this, but it seems like such an obvious generalization of findKey that I feel I must just be missing it. Does lodash have such a function?
answer count: 7
favorite count: 0
has answer: http://stackoverflow.com/a/29441269
tagged with: lodash
score: 14
accepted answer: http://stackoverflow.com/a/29441382
type: AnsweredQuestion

http://stackoverflow.com/q/29484610
tagged with: asynchronous
tagged with: deferred
has answer: http://stackoverflow.com/a/29484663
has title: jQuery Deferred a loop with ajax call
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29484663
tagged with: javascript
score: 0
tagged with: jquery-deferred
has body: I currently have an application that depends on all data being retrieved then proceed with further code. There is a primary function "_update()" that contains a loop, this loop calls _getData(). I need "_update()" to set a variable to true when all data has been received. Here is what I have: DataCollection.prototype._update = function () { var _self = this; var _itemsResponded = 0; var itemData = []; if (_self._ready) { _self._ready = false; this.collection.forEach(function (item, index) { _self.apiData.id = item.id; var ajaxPromise = _self._getData(); ajaxPromise.done(function(data){ itemData[index] = data; _self._itemsResponded++; }); }) if (_self._itemsResponded === _self.collection.length) { _self._ready = true; console.log(itemData); console.log('done'); } } } DataCollection.prototype._getData = function () { var _self = this; var ajaxPromise = $.ajax({ url: 'ajax.php', data : _self.apiData, dataType: 'json' }); var dff = $.Deferred(); ajaxPromise.then(function(data) { dff.resolve(data); }, function(){ dff.reject(); }); return dff.promise(); } From my understanding, the _getData function is working correctly. It's the .forEach in _update that does not work as expected. I thought .forEach was synchronous?
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/47009767
has text: @epascarello .....file protocol. Is that the reason?
comment on: http://stackoverflow.com/q/29418785
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46972253
score: 0
comment on: http://stackoverflow.com/q/29397738
type: Comment
type: QuestionComment
has text: @nomistic take a look at the example I have given

http://stackoverflow.com/comment/46943878
has text: I dont understand why u need a form?
comment on: http://stackoverflow.com/q/29382304
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29515093
tagged with: video-streaming
tagged with: javascript
tagged with: html5-video
has answer: http://stackoverflow.com/a/29517909
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: HTML Video's status becomes pending after some times
accepted answer: http://stackoverflow.com/a/29517909
has body: I have an HTML page with a div that contains an HTMLVideo element in it, after 10 seconds, I remove the video and all the events attached to it, When removing the video I used jQuery .remove() on the video element. After removing the video, the div element will have no children nodes obviously. And after a few seconds (approx 5 seconds), I initiate the video again by creating video element and all the sources and then append it to the same div. This goes in a loop. This will work for about 5-10 minutes. After that, I notice that the video doesn't play anymore. I inspected the DOM Element in the developer tools and the video is there with the correct url. When I checked the "Network" tab, it was still requesting the video. When the video plays, it has "GET" status with response of "206 partial content". However when it doesn't play anymore, it only responds "(pending)", and when I access the video url directly in a new tab, it takes some times to load the video if not fails. But if I access it in other browser (IE/FF) the video URL will load the video immediately. I use Google Chrome for Windows I don't know what's going on here, but I think it's a Chrome issue? Can someone help me?
type: AnsweredQuestion
tagged with: google-chrome
type: Question

http://stackoverflow.com/q/29397185
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29397394
has title: Does JQuery have a "move" function? Or is there a more compact way of doing this?
has body: When using JQuery in conjunction with a content management system, I find myself often writing snippets of code such as $(document).ready(function() { var thishtml = $('#some-element')[0].outerHTML; $('#some-element').remove(); $('#hmpg-btm-box-holder').prepend(thishtml); }); Does JQuery have a functionality to accomplish that in a more compact fashion?
accepted answer: http://stackoverflow.com/a/29397352
has comment: http://stackoverflow.com/comment/46970511
has answer: http://stackoverflow.com/a/29397394
type: Question
has answer: http://stackoverflow.com/a/29397352
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29397279
score: 0
answer count: 3
tagged with: javascript

http://stackoverflow.com/q/29520259
downvote count: 0
has comment: http://stackoverflow.com/comment/47195339
possible better answer: http://stackoverflow.com/a/29520540
has answer: http://stackoverflow.com/a/29520532
has comment: http://stackoverflow.com/comment/47230706
has answer: http://stackoverflow.com/a/29520540
type: AnsweredQuestion
has body: I'm making a little game and I have a button to pause the game. How can I "pause" the game from doing any actions, but when clicking "resume" just to resume all actions as if nothing happened? Let's say I have some complex coding, so I can't just implement a small thing in one function: it really needs to cover all "busy" things. Thank you for your time! Pause button: function pauseGameBtn() { $("#pause").click(function() { if (pauseBtnClicked == true) { // ... } else { // ... } }); }
score: 1
tagged with: resume
type: Question
has comment: http://stackoverflow.com/comment/47195793
has title: jQuery: Pause button to pause all other actions
has comment: http://stackoverflow.com/comment/47195380
answer count: 2
upvote count: 1
tagged with: function
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29520532

http://stackoverflow.com/q/29435891
has comment: http://stackoverflow.com/comment/47044294
downvote count: 0
has comment: http://stackoverflow.com/comment/47041371
tagged with: javascript
favorite count: 0
has title: Differentiate between property and method with same name
has answer: http://stackoverflow.com/a/29436007
has body: If I have a variable named format and a method with the same name, how would I go about calling the variable, and the method? use strict; function Time() { this.format = 'x:y:z'; } Time.prototype = { format: function (format) { } }
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29436007
has answer: http://stackoverflow.com/a/29435958
score: 5
has comment: http://stackoverflow.com/comment/47040856
has comment: http://stackoverflow.com/comment/47044332
type: Question
has comment: http://stackoverflow.com/comment/47041311
has answer: http://stackoverflow.com/a/29435974
upvote count: 5
tagged with: naming
tagged with: prototype
has comment: http://stackoverflow.com/comment/47040818
accepted answer: http://stackoverflow.com/a/29435958
answer count: 3

http://stackoverflow.com/comment/47104299
type: Comment
type: QuestionComment
has text: please check your routes, for example running "rake routes" on command line or browse http://localhost:3000/rails/info/routes More info: http://guides.rubyonrails.org/routing.html#inspecting-and-testing-routes I think your route can be shorter like ends with: ...team/index/get_rule + pass your attributes in jQuery.ajax's data variable. More info: http://api.jquery.com/jquery.ajax/
comment on: http://stackoverflow.com/q/29471179
score: 0

http://stackoverflow.com/comment/47188185
comment on: http://stackoverflow.com/q/29516472
has text: What you're doing isn't regex, sorry to disappoint ;)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29418223
tagged with: javascript
tagged with: accessibility
has answer: http://stackoverflow.com/a/29438886
answer count: 2
downvote count: 0
score: 1
favorite count: 0
has title: Google Custom Search Accessibility
has comment: http://stackoverflow.com/comment/47050740
accepted answer: http://stackoverflow.com/a/29438886
has answer: http://stackoverflow.com/a/49948365
has comment: http://stackoverflow.com/comment/47020789
has comment: http://stackoverflow.com/comment/47045802
type: AnsweredQuestion
has body: When we include Google Custom Search capability on our website, we get automatic code returned from Google containing some Google branding - images - that do not have alt tags for accessibility. I couldn't find a solution other than to write my own JavaScript to add alt tags to these images. Here is my solution, but my question: is this something that we should or shouldn't do? I want to make sure all parts of the website pass accessibility tests. var x = document.getElementsByClassName("gsc-branding-img"); for (i = 0; i &lt; x.length; i++) { if(x[i].tagName == "IMG") { x[i].alt = ""; } }
tagged with: google-custom-search
possible better answer: http://stackoverflow.com/a/49948365
upvote count: 1
has comment: http://stackoverflow.com/comment/47008505
type: Question

http://stackoverflow.com/comment/46985027
score: 0
comment on: http://stackoverflow.com/a/29391981
type: Comment
has text: The links you provided are really helpful. My situation is similar to the "join function" except that I only want to make the next call if the returned result(in my case docs/docs1) is not empty.
type: AnswerComment

http://stackoverflow.com/a/29478591
downvote count: 0
answers question: http://stackoverflow.com/q/29478467
type: Answer
score: 1
upvote count: 1
has body: Executing $('.myElements') traverses the DOM and returns an array of all elements with class="myElements". When you pass $('.myElements') initially, you are only constructing that array the first time. The following proceeding times you are not passing any arguments. The real question here is why are .myElements not loaded when your script is loaded? Are they created dynamically? If not, your script should be wrapped in $(document).ready(function(){ // ... code here }) to wait for the full page to be loaded.

http://stackoverflow.com/comment/46958752
type: Comment
comment on: http://stackoverflow.com/q/29390720
score: 0
has text: @peterpeterson `on` creates a continuous event, while `one` creates an event that only triggers once, and then destroys itself.
type: QuestionComment

http://stackoverflow.com/comment/46982963
has text: It's usually not a good idea to use the `with` keyword, unless you have a specific use case for it. See [this article](http://www.2ality.com/2011/06/with-statement.html) for more information.
score: 1
comment on: http://stackoverflow.com/q/29403754
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29397865
tagged with: timer
has comment: http://stackoverflow.com/comment/46971855
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/mp3
type: Question
tagged with: javascript
tagged with: countdown
has answer: http://stackoverflow.com/a/29399703
accepted answer: http://stackoverflow.com/a/29399703
score: 0
has title: Creating a countdown timer script that instead of a specific date counts the duration of a sound file
answer count: 1
has comment: http://stackoverflow.com/comment/46975254
has body: I've created a sound installation for an exhibition. The sound file last for 24 hours. What I would like to do is to create a site just for this file. I want it to be as stark and simple as possible. A dark background and a white countdown that start once the file start's streaming and countdowns until the file ends. That's from hour 24 to 00:00. All the countdown scripts count to an specific date and rarely restart themselves. Is this even possible?

http://stackoverflow.com/comment/47134332
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29487344
has text: @Franky sorry this is my first question here and I was facing troubles adding the code. I did it if you can check it please?
score: 0

http://stackoverflow.com/comment/46947160
comment on: http://stackoverflow.com/q/29384371
score: 1
has text: Please don't circumnavigate the warning message. __Links to jsfiddle.net must be accompanied by code.__
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46927987
type: Comment
type: QuestionComment
has text: I've simplified it for you: https://jsfiddle.net/74t2jLcu/8/
comment on: http://stackoverflow.com/q/29373552
score: 0

http://stackoverflow.com/comment/47135674
type: Comment
has text: i tryed but when i try the page stuck on my php form
comment on: http://stackoverflow.com/a/29487819
score: 0
type: AnswerComment

http://stackoverflow.com/q/29472858
has comment: http://stackoverflow.com/comment/47108687
accepted answer: http://stackoverflow.com/a/29473065
has comment: http://stackoverflow.com/comment/47106845
type: AnsweredQuestion
tagged with: php
type: Question
score: 0
has answer: http://stackoverflow.com/a/29473065
answer count: 1
tagged with: javascript
has body: I'm working on my website, I want to include a script from an other folder. I got 3 folders Root: images js project &lt;-- files index.html If im working in a project, I want to include a js from the folder in js. How to do dis? &lt;script type="text/javascript" src="../js/script.js"&gt;&lt;/script&gt; ? How to import from a parent directory
has comment: http://stackoverflow.com/comment/47108604
tagged with: http://stackoverflow.com/tag/html
has title: Load in a script at a previous folder

http://stackoverflow.com/comment/47003332
type: AnswerComment
comment on: http://stackoverflow.com/a/29415455
type: Comment
has text: @squint: yes but in this context, it doesn't make any sense. Mathematically *a<b<c* means *b* is *sandwiched* between *a* and *c*.
score: 0

http://stackoverflow.com/comment/47117011
score: 0
type: Comment
type: QuestionComment
has text: Hiding options may not work on all browsers. And also, wrapping an option in a span leads to invalid markup! Use `url[3]` as array index is numeric.
comment on: http://stackoverflow.com/q/29477665

http://stackoverflow.com/q/29429724
has body: I want to count the number of refresh of a webpage through jquery or javascript. I made research on it but did not get the perfect answer. Can anyone help me, Please?
upvote count: 0
has title: how can we get number of refresh of a webpage through javascript or jquery cookies?
type: Question
score: -2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29429898
answer count: 3
linked to: http://stackoverflow.com/q/8013429
favorite count: 0
has answer: http://stackoverflow.com/a/29429949
accepted answer: http://stackoverflow.com/a/29429949
has answer: http://stackoverflow.com/a/29429749
downvote count: 2
has comment: http://stackoverflow.com/comment/47029274
has answer: http://stackoverflow.com/a/29429898
type: AnsweredQuestion

http://stackoverflow.com/q/29406652
score: 0
has body: I've never used UltraEdit before, so I'm having difficulty with it. I've looked at the documentation and didn't see anything helpful. As of right now, I'm just trying to look for a word in the current file that the user has open, and remove everything from the start of the file to the word. I've tried various functions of UltraEdit.activeDocument which is what I believe I need to be using, but none have worked. I've tried things like search goto but they all fail. I can't get it to search for anything in the file that the user has open. Any help with this or maybe a guide user guide for UltraEdit with javascript would be appreciated.
upvote count: 1
answer count: 1
downvote count: 1
tagged with: ultraedit
favorite count: 0
has answer: http://stackoverflow.com/a/29445497
type: UnansweredQuestion
has title: Search for Key Word in UltraEdit
type: Question
tagged with: javascript

http://stackoverflow.com/q/29458574
score: -1
has comment: http://stackoverflow.com/comment/47081477
answer count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
downvote count: 2
has body: how can i update angular model for the value entered by user in text area. i have to create text area dynamically. how can i update model of angular js when user press ok after giving the value function relation(event){ var display_area=document.getElementById("cart"); // '&lt;textarea maxlength="50" cols="18" rows="4" id="getRelation" style="border: solid 2px; "&gt;&lt;/textarea&gt;' var relation_wrapper=document.createElement("div"); relation_wrapper.style.border="solid,3px"; relation_wrapper.style.borderColor="black"; relation_wrapper.style.width="100px"; relation_wrapper.style.height="500px"; relation_wrapper.style.backgroundColor="red"; var lineBreak=document.createElement("br"); var get_relation_button=document.createElement("button"); var button_text=document.createTextNode("OK"); relation_wrapper.appendChild(document.createElement("TEXTAREA")); relation_wrapper.appendChild(lineBreak); get_relation_button.appendChild(button_text); relation_wrapper.appendChild(get_relation_button); display_area.appendChild(relation_wrapper); } this will create a textarea and a button now i want to update the value in angular model when user press the button . any idea how can i do that
has answer: http://stackoverflow.com/a/29458683
upvote count: 1
type: Question
has title: how to update ng-model for value entered in textarea that was created dynamicly
tagged with: javascript

http://stackoverflow.com/comment/47003965
has text: Chill out matey, ive edited it
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29415819
score: 0

http://stackoverflow.com/comment/47179639
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29500533
type: Comment
has text: Could not have asked for a better answer! Clear and complete. Thank you!

http://stackoverflow.com/a/64835962
has body: There are 2 ways where you can achieve this. Option 1 change the url as follows in your ajax call, url: @Url.Action("GetESN", "Home") Option 2 This is the best option if you want to avoid razor tag helpers. Right click on the project and select "Properties". In the properties, select the link called "Web". In the "Web" link find "Project Url" field. In the "Project Url", set a name to the project as following example. Example:- http://localhost:1851/TestApp/ Once setting a project name, select "Create Virtual Directory". In your ajax call, set the url as follows. Example:- url: "TestApp/Home/GetESN" Finally make sure to publish the project as the same name. Example:- TestApp
type: Answer
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29524971

http://stackoverflow.com/q/29499350
answer count: 0
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47158101
tagged with: meteor-autoform
has title: Getting error with summernote in meteor
type: Question
has comment: http://stackoverflow.com/comment/47157414
tagged with: javascript
tagged with: summernote
has comment: http://stackoverflow.com/comment/47176377
tagged with: meteor
has body: After following the README in the autoform summernote package, whenever I try to submit the form I get this error: Uncaught TypeError: undefined is not a function Clicking on the error shows this code: AutoForm.addInputType('summernote', { template: 'afSummernote', valueOut: function() { return this.code(); //This as the offending line (marked with an x) }}); I am not sure if I am doing something wrong or it is the package schema //Creating a new Collection Todos = new Mongo.Collection("Todos"); //Defining the schema Todos.attachSchema(new SimpleSchema({ name: { type:String, label: "Name", max:200 }, description: { type:String, label: "Description", autoform: { afFieldInput: { type: 'summernote' } } }, todo_type: { type: String, label: "Todo Type", allowedValues: ['normal', 'survey'], defaultValue: "normal", autoform: { type: "select", options: function () { return [ {label: "normal", value: "normal"}, {label: "survey", value: "survey"} ]; } } }, survey_questions: { type: [Number], label: "Survey Questions", optional: true, autoform: { type: "hidden" }, }, user_id:{ type: String, autoform: { type: "hidden", label: false }, autoValue: function(){ if (this.isInsert) { return Meteor.userId(); } else if (this.isUpsert) { return {$setOnInsert: Meteor.userId()}; } else { this.unset(); } }, denyUpdate:true }, last_modified: { type: Date, autoform: { type: "hidden", label: false }, autoValue: function () { if (this.isInsert) { return new Date; } else if (this.isUpsert) { return {$setOnInsert: new Date}; } else { this.unset(); } } }, created_at: { type: Date, autoform: { type: "hidden", label: false }, autoValue: function () { if (this.isInsert) { return new Date; } else if (this.isUpsert) { return {$setOnInsert: new Date}; } else { this.unset(); } }, denyUpdate: true } })); .html {{#autoForm collection="Todos" id="todo_create" type="insert"}} Add a Todo {{> afQuickField name='name'}} {{> afQuickField name='todo_type'}} {{> afFieldInput name='description'}} Add a Todo {{/aut…
has comment: http://stackoverflow.com/comment/47158938

http://stackoverflow.com/comment/47157195
score: 0
has text: thats so strange, could you send me a pic? I believe in you, but i want show to my boss.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29498575

http://stackoverflow.com/comment/47106663
type: Comment
has text: @AlexMan I have looked at your updated plunkr. I have seen this kind of problem before. You might need to use the [Bootstrap dropdowns enhancement plugin](http://behigh.github.io/bootstrap_dropdowns_enhancement/#inputs-noclose).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29469871

http://stackoverflow.com/comment/47114367
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29460771
has text: Thanks Lee!! Yea that syntax is gone but still have Error: $injector:modulerr Module Error".
type: Comment

http://stackoverflow.com/q/29493809
upvote count: 1
downvote count: 0
has body: I have a synchronized onBeforeAction method with meteor.js Router.onBeforeAction(function() { var self; self = this; authToken = Session.get('authToken'); if (!authToken) { this.redirect('login'); this.next(); } else { Meteor.call('validateAuthToken', authToken, function (error, result)) { if (result) { self.next(); } else { self.redirect('login'); self.next(); } } } }); I need to validate an authentication token stored in Session by invoking a server call. But this method always throws an exception when I am executing it. And I found out the reason is because the onBeforeAction call is terminated before the validateAuthToken call returns. And thus the self.next() won't take action. So I wonder what can I do to prevent the onBeforeAction call from stopping until the validateAuthToken returns the validated result and then proceed? I've tried a different implementation by wait on a session variable, but it seems the ready state is never set to true Router.onBeforeAction(function() { var authToken; authToken = Session.get('authToken'); if (!authToken) { this.redirect('login'); this.next(); } else { Meteor.call('validateAuthToken', authToken, function (error, result) { if (!error) { Session.set("tokenValidated", result); } }); this.wait(Meteor.subscribe('token', Session.get('tokenValidated'))); if (this.ready()) { if (!Session.get("tokenValidated")) { this.redirect('login'); this.next(); } else { this.next(); } } } });
tagged with: meteor
favorite count: 0
tagged with: iron-router
tagged with: frontend
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29494678
score: 1
has answer: http://stackoverflow.com/a/33473972
type: Question
tagged with: javascript
answer count: 2
has title: How to make onBeforeAction call wait until a function call inside finishes in meteor.js?

http://stackoverflow.com/comment/47172024
has text: It cant help. I want to hide this text after clicking the button.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29507721
type: Comment

http://stackoverflow.com/comment/63137780
type: QuestionComment
has text: For me only IE 11 works correctly
comment on: http://stackoverflow.com/q/29434401
score: 0
type: Comment

http://stackoverflow.com/q/29496222
tagged with: iframe
type: Question
linked to: http://stackoverflow.com/q/17153310
tagged with: javascript
has body: I am trying to implement a modal pop up window. The basic requirement is that I need to show an external page in a popup and the popup need to be a modal one. I tried an implementation following this article http://www.aspsnippets.com/Articles/JavaScript-windowopen-Display-Modal-Popup-Window.aspx And my implementation can be seen here: http://jsfiddle.net/geekays/8txau4v9/ The javascript code is here: var popUpObj; function showModalPopUp() { popUpObj = window.open("http://www.geekays.net/", "ModalPopUp", "toolbar=no," + "scrollbars=no," + "location=no," + "statusbar=no," + "menubar=no," + "resizable=0," + "width=950," + "height=600," + "left = 490," + "top=300"); LoadModalDiv(); popUpObj.focus(); } function LoadModalDiv() { var bcgDiv = document.getElementById("divBackground"); bcgDiv.style.display = "block"; } //To be called when the pop-up is closed. But how?? function HideModalDiv() { var bcgDiv = document.getElementById("divBackground"); bcgDiv.style.display = "none"; } And the HTML looks like this: Link is here: Click Here But it is not working as expected. And the main issue is that I cannot call close action for the pop-up as the content is external. I also tried using a local page with IFrame to load the external page. But using IFrame cause IE to show a security warning which is not welcome. I wanted to avoid the security warning. The warning can be suppressed using IE setting, but I have a large no of users and all of them might not like to change the default settings in their IE.
score: 0
tagged with: modal-dialog
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has title: Javascript modal popup to show external content
has answer: http://stackoverflow.com/a/29496503

http://stackoverflow.com/comment/47108012
comment on: http://stackoverflow.com/q/29472202
score: 0
type: QuestionComment
type: Comment
has text: @ M.Doyle that has resolved the crossdomain error ty

http://stackoverflow.com/comment/51573504
comment on: http://stackoverflow.com/a/29664456
type: AnswerComment
score: 0
type: Comment
has text: @RohitJain `refresh: true` is only in master branch at the moment. danjarvis' solution is supposed to avoid the flickering so it could help you.

http://stackoverflow.com/a/29477338
answers question: http://stackoverflow.com/q/29477117
score: 1
has body: Try this one 0 A 30 PÇS 30 A 50 PÇS 50 A 100 PÇS
has comment: http://stackoverflow.com/comment/47116640
upvote count: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/47208125
comment on: http://stackoverflow.com/q/29526537
type: Comment
type: QuestionComment
has text: quick question... what font is that?
score: 0

http://stackoverflow.com/q/29435025
score: -2
tagged with: javascript
has title: Update javascript every 3 seconds only if its new content
has comment: http://stackoverflow.com/comment/47039337
has answer: http://stackoverflow.com/a/29435254
has comment: http://stackoverflow.com/comment/47039451
answer count: 1
has comment: http://stackoverflow.com/comment/47039412
tagged with: jquery
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47039443
has body: I have a bootstrap themed ad in a panel. I have 3 progress bars that I want to update every 3 seconds. I have managed to update them with another pages content which is what I wanted to do. Now they are updating 24/7 and it is pretty annoying when it is flickering every 3 seconds and it stays the same. I was just wondering if there was a way to only update if the content from the other page has changed? EDIT: Is there any way of also making it update better? and not just flicker? Maybe fade in slow. Here is what I have tried so far.... &lt;script type="text/javascript"&gt; (function($) { $(document).ready(function() { $.ajaxSetup( { cache: false, beforeSend: function() { $('#nav_bar_top').hide(); $('#loading').show(); }, complete: function() { $('#loading').hide(); $('#nav_bar_top').show(); }, success: function() { $('#loading').hide(); $('#nav_bar_top').show(); } }); var $container = $("#nav_bar_top"); $container.load("http://mywebsite.com/assets/ajax/get_bar.php"); var refreshId = setInterval(function() { $container.load('http://mywebsite.com/assets/ajax/get_bar.php'); }, 3000); }); })(jQuery); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/47039304
tagged with: css
has comment: http://stackoverflow.com/comment/47039371
downvote count: 3
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47039367
has comment: http://stackoverflow.com/comment/47039430

http://stackoverflow.com/comment/47104292
has text: Make a query string and pass to the server..
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29471482

http://stackoverflow.com/comment/46972133
type: Comment
has text: @Quardah You only have yourself to thank — you have a well-formulated question with a specific problem statement and provided code samples that other people can work with. Only if other questions are of such quality as yours :)
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29392270

http://stackoverflow.com/q/29489229
tagged with: mongodb
answer count: 2
accepted answer: http://stackoverflow.com/a/29489430
downvote count: 0
favorite count: 0
has body: I have a collection of the structure as follows: collection name : "positions" Structure { "_id" : "vtQ3tFXg8THF3TNBc", "candidatesActions" : { "sourced" : [ ], }, "appFormObject" : { "name" : "✶ mandatory", "questions" : [ { "qusId" : "qs-585494", "type" : "simple", "qus" : "Which was your previous company" }, { "qusId" : "qs-867766", "type" : "yesNo", "qus" : "Are you willing to relocate?", "disqualify" : "true" } ] } } I want to update "qus" field of the above collection whose _id is "vtQ3tFXg8THF3TNBc" and "qusId" is "qs-585494".
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29489430
upvote count: 1
type: Question
has title: Updating array inside two object in mongod
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29489435
has answer: http://stackoverflow.com/a/29489435

http://stackoverflow.com/q/29523928
tagged with: backbone-events
possible better answer: http://stackoverflow.com/a/29524049
has answer: http://stackoverflow.com/a/29524582
type: Question
has answer: http://stackoverflow.com/a/29524240
has title: Checking how an element gained focus
tagged with: javascript
has answer: http://stackoverflow.com/a/29608840
accepted answer: http://stackoverflow.com/a/29608840
score: 0
has answer: http://stackoverflow.com/a/29524049
tagged with: jquery
tagged with: onfocus
tagged with: backbone.js
has body: Context I have a backbone app with an event listener for focus events on a textarea. Backbone uses jQuery events, so core of my question centers around jQuery focus events. Question Is there a way to tell how an element came into focus, be it by click or tab? The behavior of how the cursor gets positioned needs to be handled differently between these two cases, however there doesn't seem to be a way to distinguish between the two offhand. I could listen to click events, however will still need to listen to focus to capture tabbing - this will overlap with click event as it will also focus the textarea resulting in double events. I may to rethink this entirely. JSBin Example $('textarea') .focus(function(event){ console.log('You focused me by' + event.type); // Here I wish I know if the focus came from a 'click' or 'tab' events }); Focus me via click. Now try via tabbing.
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/a/29476641
answers question: http://stackoverflow.com/q/29476579
score: 7
has comment: http://stackoverflow.com/comment/47114485
upvote count: 7
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/47114287
accepted answer of: http://stackoverflow.com/q/29476579
downvote count: 0
has body: You can achieve this with sibling selector +. Very easy and also the fastest solution, since the browser's CSS engine will be used to select elements: $(".column-hr + .column-hr").remove(); hr hr dude hr hr dude hr How it works: CSS selector .column-hr + .column-hr selects .column-hr elements that have immediate previous sibling .column-hr. As the result this expression will select all adjacent .column-hr elements except the very first one, because the first one doesn't have another .column-hr right before it.

http://stackoverflow.com/comment/46984351
score: 0
comment on: http://stackoverflow.com/q/29404287
type: Comment
type: QuestionComment
has text: Please do not put "[SOLVED]" into your title, especially when there is no solution included. Instead, posting the solution below as an answer is how readers know this problem was solved. Edited. Thanks.

http://stackoverflow.com/comment/47191905
comment on: http://stackoverflow.com/q/29518255
has text: we can't guess at what is returned from server or where you are using this function. Please show usage and sample data
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/q/29394817
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46970261
has comment: http://stackoverflow.com/comment/46970752
has answer: http://stackoverflow.com/a/29408516
tagged with: jquery
has comment: http://stackoverflow.com/comment/46973092
tagged with: ajax
has body: The JSON returned by my PHP is: {"success":0,"message":"Error: No entityId passed!"} Still my javascript tells me "SyntaxError: Unexpected end of input". PHP: ... //check if an image id was passed for removal in the POST data if ( isset($_POST["entityId"])) { $entityId = $_POST["entityId"]; } else { //setup response json $resp = array(); $resp['success'] = 0; $resp['message'] = "Error: No entityId passed!"; header('Content-Type: application/json'); echo json_encode($resp); } ... JS: // send xhr request $.ajax({ dataType: 'json', type: $theForm.attr('method'), url: $theForm.attr('action'), data: $theForm.serialize(), success: function(data) { //backend returns a json with variable success either true or false. resp = data; if(resp.success == 1) { //render gallery anew } else { console.log(data); if (data.message) { $(self).find('.VanillaGallery-overlayContentWrapper').html(data.message); } else { $(self).find('.VanillaGallery-overlayContentWrapper').html('Oops! Något gick fel, felmeddelande saknas dock.'); } } }, error: function(xhr, status, text) { $(self).find('.VanillaGallery-overlayContentWrapper').html('Oops! Något gick fel...&lt;br /&gt;'+text); } }); Very strange. My headers are different depending on if the request is made through ajax or as a plain separate request directly in browser (not through ajax): The headers look like this through ajax: Connection:Keep-Alive Content-Length:0 Content-Type:text/html Date:Wed, 01 Apr 2015 17:48:26 GMT Keep-Alive:timeout=5, max=97 Server:Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/0.9.8zc DAV/2 PHP/5.5.3 X-Pad:avoid browser bug X-Powered-By:PHP/5.5.3 And through this directly from browser adress bar: Connection:Keep-Alive Content-Length:52 Content-Type:application/json Date:Wed, 01 Apr 2015 17:42:23 GMT Keep-Alive:timeout=5, max=100 Server:Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/0.9.8zc DAV/2 PHP/5.5.3 X-Powered-By:PHP/5.5.3
possible better answer: http://stackoverflow.com/a/29395235
has answer: http://stackoverflow.com/a/29395235
has title: jquery ajax "SyntaxError: Unexpected end of input" on valid JSON
has comment: http://stackoverflow.com/comment/46966097
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29408516
tagged with: syntax
type: Question
has comment: http://stackoverflow.com/comment/46973146
has comment: http://stackoverflow.com/comment/46971227
tagged with: javascript

http://stackoverflow.com/a/29426918
score: -1
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29426779
downvote count: 1
has body: You can access dynamically. var personDetails = {name:"stanze", location: "earth" }; var p1="name"; var p2="location"; console.log(personDetails[p1]); //will print stanze console.log(personDetails[p2]); //will print earth

http://stackoverflow.com/q/29501888
has body: I have a snippet of code that I wrote in Javascript/jQuery to search through a list of items. Does grep exist in C#, or is there a better way to do it? var items; var itemCount = 0; var result = $.grep(items, function (v, i) { //change title and description to lowercase to match search lowerCaseTitle = v.title.toLowerCase(); lowerCaseDesc = v.description.toLowerCase(); if (lowerCaseTitle.indexOf(lowerCaseSearch) &gt; -1 || lowerCaseDesc.indexOf(lowerCaseSearch) &gt; -1) { var newLI = createLI(i, v.title); $('#searchResults').append(newLI); itemCount++; } return v; }); I think I just want to search through a JSON string that I created using the JSONTextWriter. It puts in the id, title, and description of each item. If the title or description (or subset of title/description) matches the search term passed through, add it to another list.
has comment: http://stackoverflow.com/comment/47162142
has comment: http://stackoverflow.com/comment/47162033
accepted answer: http://stackoverflow.com/a/29502179
has title: grep in JQuery to C#
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/47162058
type: Question
tagged with: c#
tagged with: javascript
has answer: http://stackoverflow.com/a/29502179
score: 0
answer count: 1

http://stackoverflow.com/a/29419265
type: Answer
has body: You are using Food as function/constructor and as parameter name (that should not be the issue however but can cause trouble later) and you are never calling insertFood. Also locations should rather be object than array so that you can access the sub arrays as you do in your code. var locations = {fridge : [], freezer:[], pantry:[]]; function Food(name, locationName){ this.name = name; this.locationName = locationName; this.displayName = function(){ alert(this.name); }; }; function createFood(){ var name = prompt("Enter the items name:"); var locationName = prompt("Enter a location to store it:") while(locationName in locations){ alert("This is not an actual location."); locationName = prompt("Please enter another location:"); }; var x = new Food(name, locationName) function insertFood(food){ locations[food.locationName].push(food); var list = document.getElementById(food.locationName + "_items"); var li = document.createElement("li"); li.innerHTML = food.name; list.insertBefore(li, list.lastChild); }; // call the method now? insertFood(x); }; createFood();
has comment: http://stackoverflow.com/comment/47013687
score: 0
answers question: http://stackoverflow.com/q/29418831
has comment: http://stackoverflow.com/comment/47013818

http://stackoverflow.com/comment/47152639
comment on: http://stackoverflow.com/q/29496887
has text: At what point do you get this error? Do you want to add your sample code so we could see more clearly what's going on?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/30499949
type: Answer
has body: For Desktop, the expansion property comes from the touchpad driver so installing that worked. Also pinch-zoom must be enabled in the touchpad settings.
answers question: http://stackoverflow.com/q/29389253
score: 0

http://stackoverflow.com/comment/47121530
comment on: http://stackoverflow.com/q/29480412
type: Comment
type: QuestionComment
has text: set the `.submit()` handler on the form, not the input; or use `.change()` or `.keyup()` on the input
score: 1

http://stackoverflow.com/comment/47267077
has text: That's up to you and how secure you want your application. Will your application be big enough with a lot of users and sensible data, that you really need to concern with expiring and refreshing API keys? Although you probably don't need that I advise you to leave your Cordova application ready for that. What I'm saying is on your cordova application whenever you make an API request and receive a 403 response, it means that your user should login again.
comment on: http://stackoverflow.com/a/29474866
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29437906
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29436603
accepted answer of: http://stackoverflow.com/q/29436603
has body: You need to replace 'text/csv' with 'application/octet-stream' for response.contentType. The content type 'application/octet-stream' is used for a binary file.
score: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/47111066
type: AnswerComment
comment on: http://stackoverflow.com/a/29471275
type: Comment
has text: If that resolved the issue, please mark my answer as the solution so others can see where the problem was and potentially identify it in their code. ^^
score: 0

http://stackoverflow.com/q/29505644
tagged with: javascript
has title: using text() to change certain character in textarea
answer count: 2
upvote count: 1
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29506243
has body: Hello my name is James $('#myTextbox1').on('input', function() { $('textarea').text($(this).val()); }); I want to change the word 'James' by binding it to my input field. So far I'm stuck, only able to change the entire textarea. I know I can do it using div, but how about textarea?
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29505786
score: 1
accepted answer: http://stackoverflow.com/a/29505786
type: Question
has answer: http://stackoverflow.com/a/29506243

http://stackoverflow.com/q/29443834
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/29444267
has comment: http://stackoverflow.com/comment/47055415
has title: Form creation issue in Mozilla FireFox
has comment: http://stackoverflow.com/comment/47055288
has comment: http://stackoverflow.com/comment/47055993
type: AnsweredQuestion
tagged with: mozilla
type: Question
accepted answer: http://stackoverflow.com/a/29444267
has body: I'm working on a project in MVC.NET 5. In this project I have a table which has some checkboxes in it. I want to send these checkboxes value to the server and I don't have a form element. But I create a form element with jQuery. Here is the form creation code: $("#setNewRoles").click(function (evt) { evt.preventDefault(); var checkbox = $(".checkbox:checked"); var form = $("&lt;form /&gt;").attr({ "action": "/Admin/Account/AddnewRolesForUser", "method": "post" }); alert(form); for(var i=0;i&lt;checkbox.length;i++){ if ($(checkbox[i]).attr("disabled") != "disabled") { $(form).append("&lt;input type='checkbox' name='rolesValue[]' value='" + $(checkbox[i]).val() + "' checked /&gt;"); } } $(form).submit(); }); This code works correctly in Chrome but it doesn't work on Mozilla. What is the matter with the code?
tagged with: javascript
has comment: http://stackoverflow.com/comment/47055408
tagged with: jquery
score: 0

http://stackoverflow.com/q/29407709
score: 0
tagged with: data-binding
has title: Enable binding with multiple boolean observable flags
has body: Trying to bind enable state using data-bind based on two flags. We need to enable a input box if flagA is true and also flagB is false. var viewModel = function () { var self = this; self.flagA = ko.observable(true); self.flagB = ko.observable(false); self.changeState = function () { self.flagA(false); } } ko.applyBindings(viewModel); changeState Can any one help me find out why it is not working? I've tried using a function like enable:function(){flagA && !flagB} to make this work. But it's not working: it does not observe when I change the state using a button.
possible better answer: http://stackoverflow.com/a/29409882
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29407757
accepted answer: http://stackoverflow.com/a/29407757
has answer: http://stackoverflow.com/a/29409882
tagged with: knockout.js
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/47039048
type: Comment
comment on: http://stackoverflow.com/a/29434317
has text: your method worked,I dont know why the variable should stay inside,it is accessed by if right ?the value is stored right ?Then what are you taking about updating ? etc etc ?
type: AnswerComment
score: 0

http://stackoverflow.com/a/29413559
accepted answer of: http://stackoverflow.com/q/29406848
answers question: http://stackoverflow.com/q/29406848
has comment: http://stackoverflow.com/comment/47028715
has comment: http://stackoverflow.com/comment/47056848
score: 0
type: AcceptedAnswer
has body: $scope.updateTimeEnd = function() { var d = new Date(); d.setHours($scope.TimeStart.getHours() +1); //d.setMinutes($scope.TimeStart.getMinutes()); $scope.TimeEnd = d; }; $scope.$watch('TimeStart', function() { $scope.updateTimeEnd(); });
has comment: http://stackoverflow.com/comment/47027971
has comment: http://stackoverflow.com/comment/47002194
type: Answer

http://stackoverflow.com/comment/46972053
comment on: http://stackoverflow.com/a/29385112
score: 0
type: AnswerComment
type: Comment
has text: Wonderful! Worked perfectly! Thank you so much!

http://stackoverflow.com/comment/47064126
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29448925
has text: Taken straight from the Mozilla docs: "nextElementSibling read-only property returns the **element** immediately following the specified one in its parent's children list." "nextSibling read-only property returns the **node** immediately following the specified one in its parent's childNodes list". So in this case, you want the **element** (` `) because the next **node** is actually a text node.

http://stackoverflow.com/a/33416031
downvote count: 0
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29418465
has body: I am guessing that this is related to the browser cache. There is an issue where S3 omits a "Vary: Origin" Header for Non-CORS-Requests. This leads to some browsers caching a Non-CORS response and reusing this cached response in subsequent requests that need CORS, causing the browser to throw the "Cross-origin image load denied by Cross-Origin Resource Sharing policy." error. For more details see: S3 CORS, always send Vary: Origin The problem has also been reported on the AWS S3 Forums

http://stackoverflow.com/comment/47019546
type: AnswerComment
has text: Thanks for the detailed help. I implemented the changes and it worked; wish I understood better what the issue was though; I was running into problems with page 0 using your model and trying to fix that caused the same issue with the smallest of changes by keying everything including visiblePages off of a new computed that was currentPage + 1. So instead I changed the data-bind = text: $data + 1 and that worked... it just seems weird that the whole thing goes haywire when another computed is involved. Both cases set the lowest accepted value to 0 and set first to 0... strange.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29422899

http://stackoverflow.com/comment/47003323
has text: Form has to have `action` that is name of other file (or empty brackets to call the same file you put it in) that you post your form data to.
score: 0
comment on: http://stackoverflow.com/a/29401647
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29525930
answers question: http://stackoverflow.com/q/29524068
has body: I would do differently with regards to how you switch pages. I would message the background with the next URL, and let background update the page and re-inject stuff. This way it will be synchronized with navigation. // Content script chrome.runtime.sendMessage({action: "updateMe", url: nextUrl}); // Background function injectScripts(tab) { chrome.tabs.executeScript(tab.id, {file: "jquery-2.1.3.min.js"}, function () { chrome.tabs.executeScript(tab.id, {file: "content.js"}); } ); } chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) { if(message.action == "updateMe") { chrome.tabs.update(sender.tab.id, {url: message.url}, injectScripts); } }); // You can use the same handler in onClicked chrome.browserAction.onClicked.addListener(injectScripts);
downvote count: 0
score: 1
upvote count: 1
type: Answer

ruby-on-rails
tags question: http://stackoverflow.com/q/29383284
tags question: http://stackoverflow.com/q/29494034
tags question: http://stackoverflow.com/q/29461418
type: Tag
tags question: http://stackoverflow.com/q/29489115
tags question: http://stackoverflow.com/q/29439354
tags question: http://stackoverflow.com/q/29465289
tags question: http://stackoverflow.com/q/29391670
tags question: http://stackoverflow.com/q/29395263
tags question: http://stackoverflow.com/q/29443756
tags question: http://stackoverflow.com/q/29403403
tags question: http://stackoverflow.com/q/29375670
tags question: http://stackoverflow.com/q/29473962
tags question: http://stackoverflow.com/q/29478474
tags question: http://stackoverflow.com/q/29402265
tags question: http://stackoverflow.com/q/29387831
tags question: http://stackoverflow.com/q/29443825
tags question: http://stackoverflow.com/q/29401264
tags question: http://stackoverflow.com/q/29427370
tags question: http://stackoverflow.com/q/29384065
tags question: http://stackoverflow.com/q/29520857
tags question: http://stackoverflow.com/q/29522448
tags question: http://stackoverflow.com/q/29471179
tags question: http://stackoverflow.com/q/29463813
tags question: http://stackoverflow.com/q/29405129
tags question: http://stackoverflow.com/q/29389869
tags question: http://stackoverflow.com/q/29515650
tags question: http://stackoverflow.com/q/29498178
tags question: http://stackoverflow.com/q/29436217
tags question: http://stackoverflow.com/q/29405395
tags question: http://stackoverflow.com/q/29418161
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/29420356
tags question: http://stackoverflow.com/q/29484265
tags question: http://stackoverflow.com/q/29446030
tags question: http://stackoverflow.com/q/29417622
tags question: http://stackoverflow.com/q/29420344
tags question: http://stackoverflow.com/q/29403303
tags question: http://stackoverflow.com/q/29423361
tags question: http://stackoverflow.com/q/29488362
tags question: http://stackoverflow.com/q/29466417
tags question: http://stackoverflow.com/q/29503747
tags question: http://stackoverflow.com/q/29527762
tags question: http://stackoverflow.com/q/29486860
tags question: http://stackoverflow.com/q/29479496
tags question: http://stackoverflow.com/q/29446793
tags question: http://stackoverflow.com/q/29464451
tags question: http://stackoverflow.com/q/29375540
tags question: http://stackoverflow.com/q/29511343
tags question: http://stackoverflow.com/q/29458304
tags question: http://stackoverflow.com/q/29465655

http://stackoverflow.com/q/29380384
answer count: 1
tagged with: javascript
has title: Bigcommerce - Is it possible to change text after a function executes?
favorite count: 0
has body: I'm working on a site right now, and there is some text that I want to change. The site has a search feature in the header, and after you type 3 or 4 characters in the input field, a product list drops down listing products that have those characters in the product name (similar to: http://www.lightexports.com/). I want to change the text that appears at the bottom of that list, "View all results". I tried using the .replace() function but that doesn't work, and i can't use a window.onload because if you never use the search, then the code never gets loaded on the site. The code to display the list of products and the text that i want to change only appears after you start typing in the search bar. **NOTE: The platform I'm using is Bigcommerce and only allows HTML, CSS, and JavaScript. Any help is much appreciated. Thanks in advance and happy coding!
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/33793543
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46963762
type: Question
score: 1
tagged with: bigcommerce
upvote count: 1

http://stackoverflow.com/comment/46984500
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29403575
has text: There's this (can't comment on whether this is good): https://github.com/willgm/ngSelectable
type: Comment

http://stackoverflow.com/a/29406552
upvote count: 1
answers question: http://stackoverflow.com/q/29405780
downvote count: 0
score: 1
type: Answer
has body: Correct it will not work in FF. Have a look at this code. var dateString = '02-APR-2015 11:08 AM'; var d = dateString.split(" "); dArray = d[0].split("-"); var day = dArray[0]; var month = dArray[1]; switch(dArray[1]) { case "JAN" : month = "01"; break; case "FEB" : month = "02"; break; case "MAR" : month = "03"; break; case "APR" : month = "04"; break; case "MAY" : month = "05"; break; case "JUN" : month = "06"; break; case "JUL" : month = "07"; break; case "AUG" : month = "08"; break; case "SEP" : month = "09"; break; case "OCT" : month = "10"; break; case "NOV" : month = "11"; break; case "DEC" : month = "12"; break; default : month = "01"; break; } var year = dArray[2]; var tm = d[1].split(":"); if(d[2] == "AM") { var tm_h = tm[0]; } else { var tm_h = tm[1]+12; } var tm_m = tm[1]; var newStr = year+"-"+month+"-"+day+"T"+tm_h+":"+tm_m+":"+"00"; var date = new Date(newStr); alert(date); Fiddle : https://jsfiddle.net/uuv7uv3h/

http://stackoverflow.com/a/29504577
has comment: http://stackoverflow.com/comment/69855508
has comment: http://stackoverflow.com/comment/75186969
has body: I don't see you calling any API to upload file on click of submit button. Let me give you more comprehensive implementation. multer config in app.js app.use(multer({ dest: './uploads/', rename: function (fieldname, filename) { return filename.replace(/\W+/g, '-').toLowerCase() + Date.now() }, onFileUploadStart: function (file) { console.log(file.fieldname + ' is starting ...') }, onFileUploadData: function (file, data) { console.log(data.length + ' of ' + file.fieldname + ' arrived') }, onFileUploadComplete: function (file) { console.log(file.fieldname + ' uploaded to ' + file.path) } })); View &lt;form id="uploadProfilePicForm" enctype="multipart/form-data" action="/user/profile_pic_upload" method="post"&gt; &lt;input type="file" multiple="multiple" id="userPhotoInput" name="userPhoto" accept="image/*" /&gt; &lt;input type="submit" name="submit" value="Upload"&gt; &lt;/form&gt; End point '/user/profile_pic_upload' POST calls uploadProfilePic in controller var control = require('../controllers/controller'); app.post('/user/profile_pic_upload',control.uploadProfilePic); Upload profile pic logic in users controller uploadProfilePic = function(req,res){ // get the temporary location of the file var tmp_path = req.files.userPhoto.path; // set where the file should actually exists var target_path = '/Users/narendra/Documents/Workspaces/NodeExpressWorkspace/MongoExpressUploads/profile_pic/' + req.files.userPhoto.name; // move the file from the temporary location to the intended location fs.rename(tmp_path, target_path, function(err) { if (err) throw err; // delete the temporary file, so that the explicitly set temporary upload dir does not get filled with unwanted files fs.unlink(tmp_path, function() { if (err) { throw err; }else{ var profile_pic = req.files.userPhoto.name; //use profile_pic to do other stuffs like update DB or write rendering logic here. }; }); }); };
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/99925532
answers question: http://stackoverflow.com/q/29490833
type: Answer
accepted answer of: http://stackoverflow.com/q/29490833
score: 17
has comment: http://stackoverflow.com/comment/99925633
upvote count: 17

http://stackoverflow.com/q/29474817
has comment: http://stackoverflow.com/comment/47407273
favorite count: 0
has comment: http://stackoverflow.com/comment/47306774
has comment: http://stackoverflow.com/comment/47303765
has body: I have a problem (bug?) with my auto-complete. MyFaces 2.2.9 with PrimeFaces 5.1 This below is only an example to reproduce my error. I have a auto-complete - box in my modal dialog. Case 1 : I type something select "hello" from list in autocomplete and submit. Converter gets my person id and search the right person, all works fine. Case 2 (Error 1) : I type "h" and click in my modal area the h stays and list close. (When I submit my form h only disappears, no converter call) But I think h should disappear because force selection? Case 3 (Error 2) : The other error is harder. When I type "hello" (which is in the list) in my box and click in my modal dialog area, hello stays! When I submit the form I get "hello" in my converter and get back "null" because he only searches for the ids. More for case 3: I try to explain it with more details (see comments): I type something in my autocomplete box, with a string, that is in my box. than i click in my modal area. (NOT! directly on the choosable hello). Than the hello seems to be accept, too. Now i click on my test button and in my converter public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) { is arg2 not the ID from hello, it is the string "hello". Only the string. My expected behavior should be that there comes my id. The id comes only when i use the normal selection. Hope you can help me. Thanks for your time :) Question: Is this a bug or it is a misunderstanding from me? XHTML: <h:head> test </h:head> <h:body> <h:form onkeypress="return event.keyCode != 13"> <p:commandButton value="show Dialog" oncomplete="PF('dgl').show()" update=":dglform"/> </h:form> <p:dialog widgetVar="dgl" modal="true" resizable="false"> <h:form id="dglform" onkeypress="return event.keyCode != 13"> <p:autoComplete id="auto" forceSelection="true" converter="personConverter" value="#{myController.selectedPerson}" var="per" itemLabel="#{per.name}" itemValue="#{per}" completeMethod="#{myController.search}"> </p:autoComplete> …
has answer: http://stackoverflow.com/a/29658268
accepted answer: http://stackoverflow.com/a/29658268
has comment: http://stackoverflow.com/comment/47269816
type: AnsweredQuestion
score: 3
tagged with: jsf
downvote count: 0
has comment: http://stackoverflow.com/comment/47371588
has comment: http://stackoverflow.com/comment/47307540
has comment: http://stackoverflow.com/comment/47276747
has title: Force selection of highlighted p:autoComplete item when panel is hidden by clicking outside
has comment: http://stackoverflow.com/comment/47269739
type: Question
has comment: http://stackoverflow.com/comment/47283708
tagged with: primefaces
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/47408897
tagged with: javascript
has comment: http://stackoverflow.com/comment/47416101
has comment: http://stackoverflow.com/comment/47283825
upvote count: 3
has comment: http://stackoverflow.com/comment/47301947
has comment: http://stackoverflow.com/comment/47301717
has comment: http://stackoverflow.com/comment/47410083
answer count: 1

http://stackoverflow.com/comment/70088668
has text: take a look at [my answer](http://stackoverflow.com/a/41441055/4416726).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29382097

http://stackoverflow.com/comment/47116042
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29469434
has text: @Roamer-1888 In Q, `fail` is an alias for `catch`, so yes, it does filter if in fact the promise OP is dealing with is a Q promise.

http://stackoverflow.com/a/29473228
has comment: http://stackoverflow.com/comment/47108292
has comment: http://stackoverflow.com/comment/47107742
has body: Declare number_objects outside loadRandom scope. Have a different function do display the value. Call this function once for initial display and in the interval, decrease the value and display it again. var number_objects; // value in global scope var displayObject = $('#object_nb'); // fetch object only once, better performace function loadRandom() { number_objects = 200 + Math.floor(Math.random() * 100); } function decreaseRandom() { // decrease the value by randomly generated value in range 1 - 5 number_objects -= Math.floor(Math.random() * 5) + 1; } function showRandom() { // show / update the value displayObject.text(number_objects); } loadRandom(); // load the value showRandom(); // initial display var interval = setInterval(function () { decreaseRandom(); // display (update) it showRandom(); if(number_objects &lt;= 0) { // clear interval when number of objects gets to, or below, 0 clearInterval(interval); } }, 5000);
answers question: http://stackoverflow.com/q/29473159
upvote count: 2
has comment: http://stackoverflow.com/comment/47107800
accepted answer of: http://stackoverflow.com/q/29473159
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47107658
has comment: http://stackoverflow.com/comment/47107927
has comment: http://stackoverflow.com/comment/47107618
type: Answer
has comment: http://stackoverflow.com/comment/47108172
score: 2
downvote count: 0

http://stackoverflow.com/comment/47158101
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29499350
has text: I'm not up to speed on autoform, but `this` in your `valueOut:` should be the initial instantiated summernote element - not the element(s) created by summernote after instantiation or perhaps whatever else is part of the `afSummernote` template. If it is try wrapping `this` into jquery `$(this).code()`
score: 0

http://stackoverflow.com/q/29481925
has title: Isn't javascript regex lazy?
type: Question
has body: Lets say I have the input value: var input_value = "** foo ** bar **"; Then I run this: input_value = input_value.replace(/(\*\*)([\S\s.]+)(\*\*)/g,replacer_markup); function replacer_markup(match, p1, p2, p3, offset, string) { var pre = ''; var post = ''; if (p1 == '**') { pre = '&lt;b&gt;'; post = '&lt;/b&gt;'; } return pre+p2+post } It will give me: foo ** bar But instead I want to have: foo bar ** I want to have the smallest possible result. How can I achieve this? Sorry for any spelling mistakes, I'm not a native speaker. Thank you for your time.
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/29481942
score: 0
has answer: http://stackoverflow.com/a/29481944
tagged with: regex
type: UnansweredQuestion

http://stackoverflow.com/comment/47209770
type: Comment
has text: Here is the onchange function for the select tag.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29527449

http://stackoverflow.com/comment/47209011
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29525048
type: Comment
has text: Sorry, I made a mistake. it has to be initialized as well. Take a look at [this example](https://github.com/photonstorm/phaser-coding-tips/blob/master/issue-001/tanks.html) Phaser provides.

http://stackoverflow.com/a/29474282
has comment: http://stackoverflow.com/comment/47110109
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29474115
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47109894
has comment: http://stackoverflow.com/comment/47110909
has comment: http://stackoverflow.com/comment/47110715
answers question: http://stackoverflow.com/q/29474115
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/47110029
has body: I believe this answer would be what you're looking for, according to the docs found here. Max Brodin is correct in suggesting grid.getSelectedRows(). EDIT: To accommodate @AnotherFineMess's request to have it sorted top-bottom in the grid, the code should be: var items = grid.getSelectedRows().sort(function(a,b){return a - b});
score: 1
has comment: http://stackoverflow.com/comment/47109956
has comment: http://stackoverflow.com/comment/47110643

http://stackoverflow.com/comment/47165421
score: 0
has text: @jmunsch Same, but gives off `undefined`. Problem?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29503690

http://stackoverflow.com/comment/47017904
has text: So you want to get the count of rows for each different code? So with your example data, you would want a count of 21 and a count of 20?
comment on: http://stackoverflow.com/a/29422947
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47184805
comment on: http://stackoverflow.com/q/29514382
has text: That's right, but you won't be flooding global with everything, just one thing.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29383601
has body: itemSelector should rather be: itemSelector : '.e-item' You have no element with id '#e-user'. From the (very old) documentation: itemSelector: selector for all items you'll retrieve Edit based on comments: If you have two, or more, instances you'll need to make sure the selectors are still unique. For example, the following setup would be unique: itemSelector : '#firstScroller .e-item' and the second.. itemSelector : '#secondScroller .e-item'
accepted answer of: http://stackoverflow.com/q/29383536
type: Answer
has comment: http://stackoverflow.com/comment/46946076
has comment: http://stackoverflow.com/comment/46946177
answers question: http://stackoverflow.com/q/29383536
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46946046
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/a/29491728
has comment: http://stackoverflow.com/comment/47205282
accepted answer of: http://stackoverflow.com/q/29474294
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29474294
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/47143982
has body: I enabled the DynamoDB Local logging to see the internal error being generated by the engine, and here is what I got after trying to put an item like yours: [LocalDynamoDBServerHandler] - body: {"TableName":"MY_TABLE","Item":{"name":{"S":"test"},"restricted":{"BOOL":true}," creator":{"S":"Testcreator"}}} _LOG_2015-04-07 08:25:26,549 ERROR [com.amazonaws.services.dynamodbv2.local.serv er.LocalDynamoDBServerHandler] - Unknown error com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized f ield "BOOL" (class com.amazonaws.services.dynamodbv2.model.AttributeValue), not marked as ignorable (6 known properties: , "SS", "BS", "B", "S", "NS", "N"]) at [Source: [B@806204; line: 1, column: 78] (through reference chain: com.amazo naws.services.dynamodbv2.model.PutItemRequest["Item"]-&gt;com.amazonaws.services.dy namodbv2.model.AttributeValue["BOOL"]) According to the logs, it looks like the only supported types by DynamoDB Local at this time are the following : ["SS", "BS", "B", "S", "NS", "N"] You can try some alternatives like: https://www.npmjs.com/package/dynalite
score: 2

function
tags question: http://stackoverflow.com/q/29390119
tags question: http://stackoverflow.com/q/29426763
tags question: http://stackoverflow.com/q/29492689
tags question: http://stackoverflow.com/q/29475955
tags question: http://stackoverflow.com/q/29401020
tag name: function
tags question: http://stackoverflow.com/q/29485486
tags question: http://stackoverflow.com/q/29441867
tags question: http://stackoverflow.com/q/29407968
tags question: http://stackoverflow.com/q/29440835
tags question: http://stackoverflow.com/q/29399887
tags question: http://stackoverflow.com/q/29478856
tags question: http://stackoverflow.com/q/29392913
tags question: http://stackoverflow.com/q/29414422
tags question: http://stackoverflow.com/q/29437059
tags question: http://stackoverflow.com/q/29398185
tags question: http://stackoverflow.com/q/29382699
tags question: http://stackoverflow.com/q/29448638
tags question: http://stackoverflow.com/q/29435869
tags question: http://stackoverflow.com/q/29400485
tags question: http://stackoverflow.com/q/29374517
tags question: http://stackoverflow.com/q/29479875
tags question: http://stackoverflow.com/q/29502582
tags question: http://stackoverflow.com/q/29381078
tags question: http://stackoverflow.com/q/29483297
tags question: http://stackoverflow.com/q/29434258
tags question: http://stackoverflow.com/q/29387923
tags question: http://stackoverflow.com/q/29449349
tags question: http://stackoverflow.com/q/29463329
tags question: http://stackoverflow.com/q/29375127
tags question: http://stackoverflow.com/q/29500402
tags question: http://stackoverflow.com/q/29402453
tags question: http://stackoverflow.com/q/29403229
tags question: http://stackoverflow.com/q/29386613
tags question: http://stackoverflow.com/q/29497965
tags question: http://stackoverflow.com/q/29440301
tags question: http://stackoverflow.com/q/29423169
tags question: http://stackoverflow.com/q/29503754
tags question: http://stackoverflow.com/q/29526156
tags question: http://stackoverflow.com/q/29475323
type: Tag
tags question: http://stackoverflow.com/q/29394391
tags question: http://stackoverflow.com/q/29496891
tags question: http://stackoverflow.com/q/29408451
tags question: http://stackoverflow.com/q/29514382
tags question: http://stackoverflow.com/q/29418182
tags question: http://stackoverflow.com/q/29458030
tags question: http://stackoverflow.com/q/29383943
tags question: http://stackoverflow.com/q/29455877
tags question: http://stackoverflow.com/q/29520259
tags question: http://stackoverflow.com/q/29467558
tags question: http://stackoverflow.com/q/29474144
tags question: http://stackoverflow.com/q/29452758
tags question: http://stackoverflow.com/q/29443577
tags question: http://stackoverflow.com/q/29445989
tags question: http://stackoverflow.com/q/29482261
tags question: http://stackoverflow.com/q/29451267
tags question: http://stackoverflow.com/q/29395370
tags question: http://stackoverflow.com/q/29459331
tags question: http://stackoverflow.com/q/29421517
tags question: http://stackoverflow.com/q/29449581
tags question: http://stackoverflow.com/q/29416967

http://stackoverflow.com/comment/46941979
type: QuestionComment
comment on: http://stackoverflow.com/q/29381196
score: 0
has text: I think you actually want the YouTube Data API. https://developers.google.com/youtube/v3/
type: Comment

http://stackoverflow.com/q/29423133
score: 1
has title: Photoswipe: move image container vertically upwards
has comment: http://stackoverflow.com/comment/47017791
has comment: http://stackoverflow.com/comment/47021687
has body: As the title would suggest, I'm trying to shift the position of the image container vertically upwards (this is in order to give more room for my captions on mobile displays). It seems that the image container div (class="pswp__img") sits within another div with class="pswp__zoom-wrap". This second div determines the position of the image via the CSS style "transform: translate3d(..)". I have tried parsing through the photoswipe.js script, however my somewhat limited knowledge of JS has me stuck. Can anyone point me to where in the photoswipe.js script the vertical offset in "transform: translate3d(..)" is set? Link to github repo containing JS files of interest (photoswipe.js &amp; photoswipe-ui-default.js are the two files to look at): https://github.com/dimsemenov/PhotoSwipe/tree/master/dist Below are chunks from "photoswipe.js" which are involved with setting translate3d that I've found so far: _applyZoomTransform = function(styleObj,x,y,zoom) { styleObj[_transformKey] = _translatePrefix + x + 'px, ' + y + 'px' + _translateSufix + ' scale(' + zoom + ')'; _translatePrefix = 'translate' + (allow3dTransform ? '3d(' : '('); _translateSufix = _features.perspective ? ', 0px)' : ')';
type: Question
tagged with: javascript
upvote count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: photoswipe
downvote count: 0
answer count: 0

http://stackoverflow.com/comment/46972066
type: Comment
has text: ok for the time being i have handled the issue in hand with single controller and rest as suggested by you. its working fine. thanks a ton.
comment on: http://stackoverflow.com/a/29390759
score: 0
type: AnswerComment

http://stackoverflow.com/a/29533998
has comment: http://stackoverflow.com/comment/47568039
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47242004
answers question: http://stackoverflow.com/q/29526281
has comment: http://stackoverflow.com/comment/47237246
has comment: http://stackoverflow.com/comment/47568062
has comment: http://stackoverflow.com/comment/47237169
upvote count: 1
has body: It's possible but tricky - at least until 3.0. The trick is: Don't use .fail use .then. Return a resolved deferred from the fail. This is like signalling that we've dealt with the exception we got here: var p = addressModel.save().then(function() { console.log("promise done"); model.set("...", false); }, function(response) { console.log("promise fail"); if (response.responseJSON &amp;&amp; response.responseJSON._messages) { _.each(response.responseJSON._messages, function(value, key) { errors[key] = value[0]; }); } return $.Deferred().resolve(); // return a resolved deferred }); This will let you do: p.then(function(){ // this code runs when either failure or success happened, can also chain });

http://stackoverflow.com/q/29410867
type: Question
tagged with: google-analytics
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29532487
has comment: http://stackoverflow.com/comment/47013136
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29532487
has body: I currently have the google analytics ecommerce tracking code pulling through transaction and item details. Everything is working apart from the 'Price' for the item, my script on the confirmation page is as follows... &lt;script&gt; (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]|| function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) }) (window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-21273952-1', 'auto', {'allowLinker': true}); ga('require', 'linker'); ga('linker:autoLink', ['WEBSITE ADDRESS'] ); ga('send', 'pageview'); ga('require', 'ecommerce'); ga('ecommerce:addTransaction', { 'id': '090320151308320974', 'revenue': '25' }); ga('ecommerce:addItem', { 'id': '090320151308320974', 'name': 'Monthly 25', 'category': 'Monthly', 'price': '25' }); ga('ecommerce:send'); &lt;/script&gt; Can anybody see why this figure wouldn't be pulling through on my analytics dashboard?
has title: Google analytics not pulling through item price
score: 0

http://stackoverflow.com/comment/47210536
comment on: http://stackoverflow.com/a/29528072
has text: Yeah, that's right. I added a link in the description with an example of how I should look like.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47187368
type: Comment
has text: Your output is not posible, this is not valid syntax: `["abc": {...}]` what you want to output is an object like so: `{"abc": {..}}`
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29515960

http://stackoverflow.com/a/29460207
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29460146
has body: If the new page is a page whose code you control, then you can pass a query parameter to the new page via the link and you can have the javascript in the new page check for that query parameter and, if found, run some code in the page upon page load. LINK DISPLAY NAME HERE And the startup javascript in the new page would check for the runOnStartup query parameter and run some code based on its value. If the new page is in the same origin as your current page, then you could open the new page in a new window and then after it opened, you could call a function in that new window. But, your previous page would have to still be running in order to do that. If the new page is in a different origin and you do not control the code in that new page, then you cannot do what you're asking for browser security reasons.
answers question: http://stackoverflow.com/q/29460146
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/116590096
type: Answer
upvote count: 5

http://stackoverflow.com/comment/47177194
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29510325
has text: I don't understand asp.net that well, but on the client side, if you refresh the page OR reload a page from the server, the values will not be persistent. Have you tried using a cookie?
type: QuestionComment

http://stackoverflow.com/comment/47181779
has text: @Raidri thanks for your feed back.So it's on my side :)
comment on: http://stackoverflow.com/a/29512670
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47040696
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29435763
type: Comment
has text: this works but it just adds the class , preventing to actually load the url

http://stackoverflow.com/q/29464849
has answer: http://stackoverflow.com/a/77859890
type: AnsweredQuestion
has title: How to assert not null?
tagged with: mocha.js
type: Question
upvote count: 79
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29465237
favorite count: 0
score: 79
has answer: http://stackoverflow.com/a/56582435
has answer: http://stackoverflow.com/a/37829034
has body: I'm very new in javascript testing, I would like to know how to assert not null in Mocha framework.
answer count: 4
tagged with: node.js
possible better answer: http://stackoverflow.com/a/37829034
has answer: http://stackoverflow.com/a/29465237

http://stackoverflow.com/q/29465180
upvote count: 1
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/7951326
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47094404
tagged with: file
has comment: http://stackoverflow.com/comment/47093216
downvote count: 0
score: 1
has title: Javascript- saving each incoming data directly to disk
type: Question
has answer: http://stackoverflow.com/a/39665483
tagged with: webrtc
tagged with: javascript
has comment: http://stackoverflow.com/comment/47094222
has comment: http://stackoverflow.com/comment/47094545
has body: I am making a file sharing app in java-script. I have to send and receive large files which I cannot store in buffer or memory. I want to directly store each coming data chunk directly to disk. Any reference link will be appreciated.

http://stackoverflow.com/q/29401735
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/73371204
type: Question
has title: Fullcalendar eventClickLimit not showing custom popover and throwing error
has body: I'm getting an error when trying to show a bootstrap popover after a eventClickLimit event occurs in FullCalendar. The error says "JavaScript runtime error: Unable to get property 'documentElement' of undefined or null reference" on this line $(this).popover('show'); Here is my code for the fullcalendar that shows the eventClickLimit event code that tries to show a popover. NOTE - My dayClick shows a popover ok, it's just the eventClickLimit that doesn't. Maybe something in the click event code isn't correct. $('#fullcalendar').fullCalendar({ header: { left: 'prev,next', //today', center: 'title', //right: 'month,agendaWeek,agendaDay' right: '' }, defaultView: 'month', editable: true, allDaySlot: false, selectable: true, slotMinutes: 15, eventLimit: 1, //eventLimit: true, // for all non-agenda views //views: { // agenda: { // eventLimit: 2 // adjust to 6 only for agendaWeek/agendaDay // } //}, events: '/ManageSpaces/GetDiaryEvents/', eventLimitClick: function (cellInfo, jsEvent) { //var s = cellInfo.segs; $(this).popover({ html: true, placement: 'bottom', //container: 'body', title: function () { return $("#events-popover-head").html(); }, content: function () { return $("#events-popover-content").html(); } }); //$(this).popover('toggle'); //if ($calPopOver) // $calPopOver.popover('destroy'); //$calPopOver = $(this).popover('show'); $(this).popover('show'); }, eventClick: function (calEvent, jsEvent, view) { //function (data, event, view) { //var s = cellInfo.segs; $("#eventDetails.collapse").collapse('toggle'); if ($calPopOver) $calPopOver.popover('destroy'); }, dayClick: function (data, event, view) { $(this).popover({ html: true, placement: 'bottom', container: 'body', title: function () { return $("#day-popover-head").html(); }, content: function () { return $("#day-popover-content").html(); } }); $(this).popover('toggle'); if ($calPopOver) $calPopOver.popover('destroy'); $calPopOver = $(this).popover('show'); } }); Add Event Events hello
tagged with: asp.net-mvc
tagged with: javascript
tagged with: fullcalendar
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
answer count: 0
tagged with: twitter-bootstrap

http://stackoverflow.com/a/29477985
score: 0
answers question: http://stackoverflow.com/q/29442673
type: Answer
has body: You need to specify a callback function (&amp;callback=&lt;functionname&gt;) in your URL param. Like this: 'async!http://maps.google.com/maps/api/js?v=3&amp;libraries=places!callback' Or else you can use $.Deferred() to lazy load the map. This blog post explains it in detail. Hope it helps!

http://stackoverflow.com/q/29408948
answer count: 0
has body: I have uploaded an HTML to Google Drive using GoogleDriveAPI. Also I set the convert option to true. It successfully converted and uploaded to GoogleDrive. I tried opening the converted file in GoogleDocs. But some italian specials characters are not showing correctly. Have any idea??
tagged with: google-docs
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46991617
has title: Special characters lost after converting html to GoogleDocs
score: 0
tagged with: google-drive-api
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46997569
tagged with: http://stackoverflow.com/tag/html
tagged with: google-docs-api

http://stackoverflow.com/q/29452548
tagged with: inject
tagged with: javascript
tagged with: replace
has title: Can I inject text links within the body of a web-page
answer count: 1
has answer: http://stackoverflow.com/a/29452636
has body: I am coding a proof of concept for my boss, I am a backend developer and haven't done javascript in years so I don't know much about same origin policy and other obstacles. He basically has a chrome plugin and wants to replace matching keywords with links to his service, this will happen in any domain the user visits and not just one, similar to in-text advertising. I was also wondering if it's possible to do this with an iframe, without the need of a chrome extension.
type: UnansweredQuestion
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
score: 0
type: Question

http://stackoverflow.com/comment/47182844
has text: When I delete "var data = JSON.parse(data)["response"];" I no longer get the error. But I need to parse data to get a specific variable in it, how can I do that?
comment on: http://stackoverflow.com/q/29513030
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29457440
score: 0
has comment: http://stackoverflow.com/comment/47079572
type: Answer
has comment: http://stackoverflow.com/comment/90477553
answers question: http://stackoverflow.com/q/29457403
has comment: http://stackoverflow.com/comment/47079280
has body: What if you just try to write &lt;?php _e( 'Select a product', 'textdomain' ); ?&gt; JS variable and pass you option as you write, from jQuery? var selectOption = '&lt;?php _e( 'Select a product', 'textdomain' ); ?&gt;';

http://stackoverflow.com/q/29528167
has comment: http://stackoverflow.com/comment/47210518
possible better answer: http://stackoverflow.com/a/29528337
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29528616
accepted answer: http://stackoverflow.com/a/29528616
downvote count: 0
score: 1
type: Question
has body: I want to append array values in their respective div's, I've the following array of values with their "THINGS" taht points to the respective div's named as THING1, THING2 and so on ["THING1", "ABC", "123", "THING2", "DEF", "456", "GHI", "789", "JKL", "123", "THING3", "MNO", "123", "PQR", "546"] I'm checking the id's as follow if(this.getAttribute('id')=="ITEM"+i) { //exits } All I need is to append the values after the indicators (THING) in their respective div's (ITEM). My Attempt: JS: for (var i = 0; i &lt;= myThings.length; i++) { var item; if (myThings[i] != null) item = "ITEM1"; else if (myThings[i][i] != null) item = "ITEM2"; else if (myThings[i][i] != null) item= "ITEM3"; else if (myThings[i][i] != null) item = "ITEM4"; if (myThings[i] == item) { var e = myThings[i]; $('#'+j).after(e); } }; HTML: &lt;div id="ITEM1"&gt;&lt;/div&gt; &lt;div id="ITEM2"&gt;&lt;/div&gt; &lt;div id="ITEM3"&gt;&lt;/div&gt; &lt;div id="ITEM4"&gt;&lt;/div&gt;
has title: Appending array values to different containers
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/47210501
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29528337
favorite count: 0

http://stackoverflow.com/comment/47086662
comment on: http://stackoverflow.com/q/29460718
score: 0
type: QuestionComment
has text: It displays a date in the future, even though the time is in the past. So for example, if the date is 19:00 and the current time is 19:10, it will say something like "in an hour" even though it should say "10 minutes ago". I am assuming that the issue has something to do with the default timezone, but I can't change it, hence this question.
type: Comment

http://stackoverflow.com/q/29518809
score: 1
upvote count: 1
type: Question
tagged with: charts
tagged with: arrays
tagged with: javascript
downvote count: 0
favorite count: 0
has body: I did the following chart in php using the Google API, with data from a json service. However the data that are being shown are entered manually. I liked that the data were dynamic, meaning that the values of Y were from this loop for: for ($x = 0; $x <= $result2; $x++) { print_r($json2['values'][$x]['avg']); } and X values were from through this: for ($x = 0; $x <= $result2; $x++) { $milliseconds = $json2['values'][$x]['startTime']; $timestamp = $milliseconds/1000000000; echo date("d-m-Y h:i:s", $timestamp); } It is possible to do what I want? Does anyone could please help me? Realized my doubt? Thank you all for the help and sorry for my bad english.
has title: How Populate PHP Google Chart with data from loop for?
type: UnansweredQuestion
tagged with: php
answer count: 0

http://stackoverflow.com/q/29465970
has comment: http://stackoverflow.com/comment/47138429
has comment: http://stackoverflow.com/comment/47161273
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47099498
has answer: http://stackoverflow.com/a/29606710
type: Question
has title: Implement this java-script in joomla 3 (Uncaught TypeError: undefined is not a function (anonymous function)
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47217311
has comment: http://stackoverflow.com/comment/47152653
score: 0
has body: I found this great piece of code here on stackoverflow and this could be my long searched solution but I can`t get it to run on my joomla 3. Java-Script: $('#showVideo').click(function() { $('#video').show().html(' '); $('#showVideo').hide().html;}) See on http://jsfiddle.net/1tszLnhx/2/ After loading the script in the header after all the jquery I get the following error when I click on the actual "Click to start Video"-Link: Uncaught TypeError: undefined is not a function (anonymous function) What am I doing wrong? Can anybody can help me out with this?
has comment: http://stackoverflow.com/comment/47156268
answer count: 1
accepted answer: http://stackoverflow.com/a/29606710
tagged with: joomla
has comment: http://stackoverflow.com/comment/47234504
has comment: http://stackoverflow.com/comment/47352645
has comment: http://stackoverflow.com/comment/47220003

http://stackoverflow.com/a/29525986
has comment: http://stackoverflow.com/comment/76634328
score: 6
accepted answer of: http://stackoverflow.com/q/29506334
answers question: http://stackoverflow.com/q/29506334
has body: Assuming that what you want is to be able to click on a highlight to get rid of it, I suggest something like the following (which has support for IE 6-8; I don't know whether you need that but Rangy supports it). The crucial methods are the getHighlightForElement() and removeHighlights(): document.onclick = function(e) { e = e || window.event; var target = e.target || e.srcElement; var highlight = highlighter.getHighlightForElement(target); if (highlight) { highlighter.removeHighlights( [highlight] ); } };
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 6

http://stackoverflow.com/a/29495136
has body: So the true answer is what actually @Barmar said. I looked at the size of files I'm sending and it seemed alright, but what I didn't think about was that I didn't send the images as files but as data-URL. And that means that the file size didn't matter. And I had to actually increase the actual post size.
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/29396573
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29396573

http://stackoverflow.com/q/29438007
has body: I'm trying to reload a page and then access a file download url in javascript like so: function reloadAndDownload() { location.reload(); location.assign(fileDownloadURL); } I find that in the above example, only the "location.assign()" seems to execute. If I have this: function reloadAndDownload() { location.assign(fileDownloadURL); location.reload(); } then only the "location.reload()" seems to execute. Is it possible to call both these functions sequentially as described and have them both execute?
has title: Calling location.reload() and location.assign() sequentially
upvote count: 2
has answer: http://stackoverflow.com/a/29438112
downvote count: 1
type: Question
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29438112
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/29421808
downvote count: 0
score: 1
has body: Check out the following: Background blur with CSS The third answer seems like what you're looking for.
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29421542

http://stackoverflow.com/q/29462199
has title: Comma in the output
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29462302
upvote count: 1
downvote count: 1
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29462301
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47088359
type: AnsweredQuestion
has body: I wrote a function that considers the height and width of the div , now I can not find where I wrote the code,that output value with comma example: #div_0{ height: 13.3%;, width: 28.5%; } (function ($) { $.fn.percent = function (el, arg2) { var pol = $(this).parent() if (typeof (el) != 'object') { if (typeof (el) == 'number' &amp;&amp; arg2 == 'w' || typeof (el) == 'number' &amp;&amp; arg2 == 'width') return el * 100 / parseInt(pol.css('width'))+ '%;' ; else if (typeof (el) == 'number' &amp;&amp; arg2 == 'h' || typeof (el) == 'number' &amp;&amp; arg2 == 'height') return el * 100 / parseInt(pol.css('height'))+ '%;'; else return false; } var set = []; for (var i in el) { var element = parseInt($(this).css(i)); if (el[i] == 'w' || el[i] == 'width') set[set.length] = '\n' + i + ': ' + element * 100 / parseInt(pol.css('width'))+ '%;' ; else if (el[i] == 'h' || el[i] == 'height') set[set.length] = '\n' + i + ': ' + element * 100 / parseInt(pol.css('height'))+ '%;'; } return set; } })(jQuery); var return_ = ''; var sharp = '#'; function chet_div() { for (var i = 0; i &lt; $('#container div').length; i++) { if ($('#container div').eq(i).attr('id').search(/div/i) != -1) { return_ += sharp + $('#container div').eq(i).attr('id') + '{\n ' + $('#container div').eq(i).percent({ height: 'h', width: 'w' }) + '\n}\n'; } document.getElementById('hidden_sizes').value = return_; } return return_; } Thank
has comment: http://stackoverflow.com/comment/47088132
has answer: http://stackoverflow.com/a/29462301
type: Question
accepted answer: http://stackoverflow.com/a/29462302

google-maps
tags question: http://stackoverflow.com/q/29463131
tag name: google-maps
tags question: http://stackoverflow.com/q/29498943
tags question: http://stackoverflow.com/q/29511163
tags question: http://stackoverflow.com/q/29431735
tags question: http://stackoverflow.com/q/29415373
tags question: http://stackoverflow.com/q/29492928
tags question: http://stackoverflow.com/q/29411338
tags question: http://stackoverflow.com/q/29444803
tags question: http://stackoverflow.com/q/29446586
tags question: http://stackoverflow.com/q/29375141
tags question: http://stackoverflow.com/q/29434041
tags question: http://stackoverflow.com/q/29467417
tags question: http://stackoverflow.com/q/29520328
tags question: http://stackoverflow.com/q/29487638
tags question: http://stackoverflow.com/q/29473286
tags question: http://stackoverflow.com/q/29412753
tags question: http://stackoverflow.com/q/29408447
tags question: http://stackoverflow.com/q/29432426
tags question: http://stackoverflow.com/q/29441303
tags question: http://stackoverflow.com/q/29489045
tags question: http://stackoverflow.com/q/29401064
tags question: http://stackoverflow.com/q/29513695
tags question: http://stackoverflow.com/q/29498029
tags question: http://stackoverflow.com/q/29442673
tags question: http://stackoverflow.com/q/29428084
tags question: http://stackoverflow.com/q/29514672
tags question: http://stackoverflow.com/q/29518325
tags question: http://stackoverflow.com/q/29383388
tags question: http://stackoverflow.com/q/29374487
tags question: http://stackoverflow.com/q/29473896
tags question: http://stackoverflow.com/q/29519140
tags question: http://stackoverflow.com/q/29392878
tags question: http://stackoverflow.com/q/29470064
tags question: http://stackoverflow.com/q/29463153
tags question: http://stackoverflow.com/q/29506152
tags question: http://stackoverflow.com/q/29507673
tags question: http://stackoverflow.com/q/29527546
tags question: http://stackoverflow.com/q/29501230
tags question: http://stackoverflow.com/q/29509955
tags question: http://stackoverflow.com/q/29398547
tags question: http://stackoverflow.com/q/29490724
tags question: http://stackoverflow.com/q/29471641
tags question: http://stackoverflow.com/q/29376638
type: Tag
tags question: http://stackoverflow.com/q/29400878
tags question: http://stackoverflow.com/q/29478077
tags question: http://stackoverflow.com/q/29377169
tags question: http://stackoverflow.com/q/29427695
tags question: http://stackoverflow.com/q/29519635
tags question: http://stackoverflow.com/q/29401323
tags question: http://stackoverflow.com/q/29504629
tags question: http://stackoverflow.com/q/29488697
tags question: http://stackoverflow.com/q/29399599
tags question: http://stackoverflow.com/q/29530104
tags question: http://stackoverflow.com/q/29379147
tags question: http://stackoverflow.com/q/29413400
tags question: http://stackoverflow.com/q/29396432
tags question: http://stackoverflow.com/q/29381126
tags question: http://stackoverflow.com/q/29445140
tags question: http://stackoverflow.com/q/29478685
tags question: http://stackoverflow.com/q/29430393
tags question: http://stackoverflow.com/q/29438308
tags question: http://stackoverflow.com/q/29401175

http://stackoverflow.com/a/29475788
has comment: http://stackoverflow.com/comment/47112743
has body: Try adding a separate div for the fade in as in this fiddle. html: &lt;div class="overlay"&gt;&lt;/div&gt; js: $('.overlay').addClass('visible'); css: .x { width: 200px; height: 200px; border: 1px solid #0f0f0f; position: absolute; top: -210px; right:0; transition: all 1s ease 0s; margin-right: 20px; z-index:10; background-color:#fff; } .overlay { position: absolute; top:0; left: 0; z-index:-1; width: 100%; height: 100%; background-color: rgba(0,0,0,.5); transition : all 1s linear; opacity:0; } .visible{ opacity: 1; z-index:5; } Here is an updated fiddle that has the mask over everything but the popup. updated fiddle
has comment: http://stackoverflow.com/comment/47113519
downvote count: 0
has comment: http://stackoverflow.com/comment/47113018
score: 1
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29475314
has comment: http://stackoverflow.com/comment/47113207
accepted answer of: http://stackoverflow.com/q/29475314
type: Answer
has comment: http://stackoverflow.com/comment/47112855

http://stackoverflow.com/q/29452334
tagged with: javascript
favorite count: 0
tagged with: http-get
possible better answer: http://stackoverflow.com/a/29460199
has answer: http://stackoverflow.com/a/29460199
has answer: http://stackoverflow.com/a/29454028
answer count: 4
has answer: http://stackoverflow.com/a/43899256
tagged with: angularjs
linked to: http://stackoverflow.com/q/13121948
accepted answer: http://stackoverflow.com/a/29454028
upvote count: 1
has comment: http://stackoverflow.com/comment/50531694
has body: I am trying to query the App Store for information on a given app, however I keep getting the following error. XMLHttpRequest cannot load https://itunes.apple.com/lookup?id=&lt;some-app-id&gt;. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.&lt;some-website&gt;.co.uk' is therefore not allowed access. The response had HTTP status code 501. The code I'm using to execute the request is as follows. Does anyone know where I may be going wrong? var config = { headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET', 'Access-Control-Allow-Headers': 'Content-Type, X-Requested-With', } }; $http.get("https://itunes.apple.com/lookup?id=&lt;some-app-id&gt;", config).success( function(data) { // I got some data back! } );
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/75762770
type: Question
has title: How can I query the iTunes search API in javascript?
tagged with: ios
downvote count: 0

http://stackoverflow.com/q/29385817
has title: onHover being triggered by invisible part of menu
tagged with: javascript
has body: On my website if you hover anywhere below the 3 colourful header buttons i.e "Marketing" "Training" and "Specialists area", you notice the hidden menu for "Specialists area" is triggered. Can someone please help me understand why this behaviour is happening as i would like to have menu triggered ONLY when you hover on the "Specialists area" button itself. NOTE: "Marketing" &amp; "Training" buttons are working as intended. i.e triggering their menus ONLY when the hover is inside the respective button.
score: 0
has comment: http://stackoverflow.com/comment/46952134
has comment: http://stackoverflow.com/comment/46950016
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46952013
has comment: http://stackoverflow.com/comment/46950959
tagged with: css
has comment: http://stackoverflow.com/comment/46952894
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46951640
has comment: http://stackoverflow.com/comment/46950117
type: Question

http://stackoverflow.com/comment/47003908
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29415503
has text: first time should show selected: after onclick: should change to 1st one selected.

http://stackoverflow.com/comment/47171203
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29502494
score: 1
has text: Can u please provide your complete code of index.asp

http://stackoverflow.com/comment/47176874
type: AnswerComment
has text: Oh, could you please setup a jsfiddle.net with all menu related code?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29510176

http://stackoverflow.com/a/29445548
score: 1
has comment: http://stackoverflow.com/comment/47061230
accepted answer of: http://stackoverflow.com/q/29442577
upvote count: 1
answers question: http://stackoverflow.com/q/29442577
type: AcceptedAnswer
downvote count: 0
has body: That's obvious, because you are using one ID for all blocks! ID must be unique in the html page, but you have many &lt;div id="friends"&gt;. When you have some elements with same ID, javascript select first element. Solution is to use Class instead of ID: &lt;c:forEach items="${schedule}" var="period"&gt; &lt;td&gt; &lt;div class="friends"&gt; ${period.getFriends()} &lt;/div&gt; &lt;/td&gt; &lt;/c:forEach&gt; function myFunction() { var div = document.getElementsByClassName("friends"); div.innerHTML = "AFJASFAS"; }
type: Answer

http://stackoverflow.com/comment/47061142
type: AnswerComment
comment on: http://stackoverflow.com/a/29445969
type: Comment
has text: can u edit it the way it works with pre defined String instead of entering the text manually
score: 0

http://stackoverflow.com/comment/46981079
type: AnswerComment
score: 2
comment on: http://stackoverflow.com/a/29402863
type: Comment
has text: The OP didn't specify, but it's worth noting that the first example will remove the parent's parent of every link that is clicked on the page.

http://stackoverflow.com/a/29408716
has body: I might be misunderstanding the question, but... The scroll upwards is probably because the form is posted, triggering a reload of the page. Perhaps you could try changing your onclick to: onclick="buttonfix(this);return false" This would prevent the submit.
type: Answer
has comment: http://stackoverflow.com/comment/46991516
answers question: http://stackoverflow.com/q/29407817
score: 0
has comment: http://stackoverflow.com/comment/46996069
has comment: http://stackoverflow.com/comment/46996228

http://stackoverflow.com/comment/47158275
type: AnswerComment
comment on: http://stackoverflow.com/a/29486858
has text: Isaac stevens you are doing it using just simple attribute named "required" and i am familiar with it but i want to do it with jquery form validation plugin so your answer isn't helpfull for me its totaly irrelevant
type: Comment
score: 0

http://stackoverflow.com/comment/47042419
type: Comment
comment on: http://stackoverflow.com/a/29436212
score: 0
type: AnswerComment
has text: ur trouble in select undefined element

http://stackoverflow.com/comment/46947692
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29384583
has text: Can I get the zoneId values as "option1" or "option2" or "option3"? Now I am getting this values as 3,5,6.
score: 0

http://stackoverflow.com/comment/47025389
score: 0
type: QuestionComment
type: Comment
has text: User Interaction is okay. As while accessing camera, they ask for permission ? I am fine with it. I just don't want user to give me path.
comment on: http://stackoverflow.com/q/29427341

http://stackoverflow.com/comment/47062784
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29446360
has text: I'm not familiar with the plugin, so I thought a deep copy would be safe. To do a shallow copy, omit the first parameter. It may seem weird, but `$.extend` doesn't support `false` as a first parameter: http://api.jquery.com/jquery.extend/ ... "Warning: Passing false for the first argument is not supported."
type: Comment

http://stackoverflow.com/comment/128582112
type: Comment
has text: Thank you for chiming in with this. To be honest it's been so long since the project idea was dropped. I hope your answer will be useful for other users though!
comment on: http://stackoverflow.com/a/72595239
type: AnswerComment
score: 0

http://stackoverflow.com/a/29397022
accepted answer of: http://stackoverflow.com/q/29393317
type: Answer
answers question: http://stackoverflow.com/q/29393317
score: 3
upvote count: 3
type: AcceptedAnswer
downvote count: 0
has body: This is copypasta from the nodegit issue So you can only checkout a local branch. You're trying to checkout a remote. What you'll have to do is get the commit on the remote branch and then use that to create a new branch and then (optionally) set the upstream to track the original remote branch. At that point you can then check out your newly created local branch.

http://stackoverflow.com/a/29517863
has comment: http://stackoverflow.com/comment/47192016
accepted answer of: http://stackoverflow.com/q/29517560
has body: you could use javascript something like this should work function redirect(){ var target = $('#mainText').val(); var redirectTo = 'http://' + target + '.html'; window.location.replace(redirectTo); } Enter name:
has comment: http://stackoverflow.com/comment/47193493
type: Answer
answers question: http://stackoverflow.com/q/29517560
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47192266
has comment: http://stackoverflow.com/comment/47191130
has comment: http://stackoverflow.com/comment/47191498
has comment: http://stackoverflow.com/comment/47192974
has comment: http://stackoverflow.com/comment/47192024
has comment: http://stackoverflow.com/comment/47191625
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47193623

http://stackoverflow.com/comment/46944818
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29382542
has text: Thank you so much : DDDD I've just tried it and it fixes my problem! You're awesome!

http://stackoverflow.com/comment/46933775
comment on: http://stackoverflow.com/a/29376407
type: AnswerComment
has text: Credits to @Grundy for finding it. Glad we could help.
score: 0
type: Comment

http://stackoverflow.com/q/29501982
has answer: http://stackoverflow.com/a/29502130
answer count: 1
tagged with: javascript
has title: How to cancel one function for object.prototypes javascript
accepted answer: http://stackoverflow.com/a/29502130
tagged with: constructor
score: 0
type: Question
type: AnsweredQuestion
has body: http://codepen.io/haikudoichi/pen/EazdyL What is supposed to happen is when I click on a created object, it should disappear and a new one should not be made if it's in the boundaries of the old one. If I click elsewhere, then it's supposed to make a new object. What's actually happening is that a new object is made in place of the old one. I'm thinking my var noDraw = false; as a sort of flag would help but the method I tried did not work.
tagged with: prototype

http://stackoverflow.com/q/29422118
tagged with: three.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29422223
has answer: http://stackoverflow.com/a/31584332
linked to: http://stackoverflow.com/q/16177056
has answer: http://stackoverflow.com/a/41876366
score: 17
accepted answer: http://stackoverflow.com/a/29422223
upvote count: 17
type: Question
has answer: http://stackoverflow.com/a/73532621
answer count: 8
has title: Threejs canvas background black
tagged with: javascript
has answer: http://stackoverflow.com/a/76363428
has answer: http://stackoverflow.com/a/54561101
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/31706934
has answer: http://stackoverflow.com/a/50399995
has answer: http://stackoverflow.com/a/31706934
has body: I made a trial with basic scene of threejs but I can't understand why the canvas background is completely black. My first Three.js app EDIT: Code at felpone.netsons.org

http://stackoverflow.com/q/29456466
has comment: http://stackoverflow.com/comment/94459813
has answer: http://stackoverflow.com/a/29456539
has answer: http://stackoverflow.com/a/29456745
downvote count: 0
has title: Calculate a point which is perpendicular to a line
favorite count: 0
has body: I have two points store in two variable, which forms a line. I want to find a point which is perpendicular to that line from one end point in that line. Suppose I have two points P1(x1,y1) and P2(x2,y2) then i want to find a third point P3 such that line(P1-P2) is perpendicular to line(P2,P3) and intersect at P2.
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/74760494
score: 1
has answer: http://stackoverflow.com/a/38290231
tagged with: java
upvote count: 1
has answer: http://stackoverflow.com/a/29456709
has comment: http://stackoverflow.com/comment/47077532
type: Question
has comment: http://stackoverflow.com/comment/47077887
tagged with: javascript

http://stackoverflow.com/comment/47053034
type: AnswerComment
has text: thanks , will go though ur answer , thanks for the recommendation too . :)
type: Comment
comment on: http://stackoverflow.com/a/29442419
score: 0

http://stackoverflow.com/q/29442982
tagged with: this
favorite count: 0
has comment: http://stackoverflow.com/comment/47053933
possible better answer: http://stackoverflow.com/a/29443200
downvote count: 0
has answer: http://stackoverflow.com/a/29443200
has comment: http://stackoverflow.com/comment/47053703
has answer: http://stackoverflow.com/a/29443195
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29443173
has comment: http://stackoverflow.com/comment/47053782
type: Question
has body: I am trying to grasp the concepts of Javascript through online video courses, where I came upon this example below. https://www.youtube.com/watch?v=9oi0NY8Pen8 The instructor used this example first var carlike = function(obj, loc) { obj.loc = loc; obj.move = function() { this.loc++; }; return obj; }; var amy = carlike({}, 1); amy.move(); and then changed the carlike function to var carlike = function(obj, loc) { obj.loc = loc; obj.move = function() { obj.loc++; }; return obj; }; Saying the Instead of referring to the parameter this which gets bound to a new value each time move is invoked we can use obj How is this getting bound to new value. How can using obj prevent this.
tagged with: javascript
has title: Why is it beneficial to ditch 'this' in this example
has answer: http://stackoverflow.com/a/29443173
answer count: 3
linked to: http://stackoverflow.com/q/3127429
upvote count: 1

http://stackoverflow.com/a/29497533
has comment: http://stackoverflow.com/comment/47251021
has body: Try to apply .focus() and/or .blur() methods for fields you are interacting with, it might be a handler assigned to one of these events, which does calculation and enables button.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29434068
answers question: http://stackoverflow.com/q/29434068
score: 1
has comment: http://stackoverflow.com/comment/47249725
upvote count: 1

marker
tag name: marker
tags question: http://stackoverflow.com/q/29478685
type: Tag

http://stackoverflow.com/a/29467176
score: 4
upvote count: 4
has body: Instead of regex, you can compare numerical value itself: var ageValue = 50; // get the input age here var ageNumericVal = +ageValue; if (ageNumericVal &lt; 0 || ageNumericVal &gt; 200) { // invalid }
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29467075
answers question: http://stackoverflow.com/q/29467075

http://stackoverflow.com/comment/47124485
score: 0
has text: and did you have that confirmed field on the users document? or you have `profile.confirmed`? if you run `Meteor.user()` also what error is throwing the console?
comment on: http://stackoverflow.com/q/29481874
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29518786
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/71554232
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Remove constraints in sequelize migration
type: Question
tagged with: sequelize.js
tagged with: sql
has answer: http://stackoverflow.com/a/29535366
accepted answer: http://stackoverflow.com/a/46458342
score: 26
answer count: 6
possible better answer: http://stackoverflow.com/a/32483416
has answer: http://stackoverflow.com/a/32483416
has answer: http://stackoverflow.com/a/53749791
has comment: http://stackoverflow.com/comment/57282028
tagged with: constraints
upvote count: 26
has answer: http://stackoverflow.com/a/46458342
has answer: http://stackoverflow.com/a/75632395
has body: I'm adding a unique constraint in a migration via the migrations.changeColumn function. Adding the constraint works, but since you need to provide a “backwards migration“, removing it the same way does not. It doesn't give any errors when migrating backwards, but again applying the forward migration results in Possibly unhandled SequelizeDatabaseError: relation "myAttribute_unique_idx" already exists. (The used database is postgres) module.exports = { up: function (migration, DataTypes, done) { migration.changeColumn( 'Users', 'myAttribute', { type: DataTypes.STRING, unique: true // ADDING constraint works } ).done(done); }, down: function (migration, DataTypes, done) { migration.changeColumn( 'Users', 'myAttribute', { type: DataTypes.STRING, unique: false // REMOVING does not } ).done(done); } }; I also tried using removeIndex migration.removeIndex('Users', 'myAttribute_unique_idx').done(done); But it gives the following error when reverting the migration: Possibly unhandled SequelizeDatabaseError: cannot drop index "myAttribute_unique_idx" because constraint myAttribute_unique_idx on table "Users" requires it

http://stackoverflow.com/a/29513416
has comment: http://stackoverflow.com/comment/47285056
type: Answer
has body: You need to escape that backslash. Initially I thought you would only need to use one escape character, but, according to this demonstration, you need to use three: {"ID1":"1","ID2":"1","NAME":"Act\\\\"}
score: 0
has comment: http://stackoverflow.com/comment/47284976
answers question: http://stackoverflow.com/q/29513335

http://stackoverflow.com/comment/47185209
type: QuestionComment
comment on: http://stackoverflow.com/q/29514718
has text: @RoryMcCrossan may be onto something that `null` you're passing in looks suspicious.
score: 0
type: Comment

http://stackoverflow.com/comment/47150684
has text: You should use : element.find('#cropCanvas'). It seems element.siblings does not exist
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29495774
score: 0

http://stackoverflow.com/comment/46932884
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29376102
type: AnswerComment
has text: This is a better solution.

http://stackoverflow.com/comment/47192975
comment on: http://stackoverflow.com/a/29518017
score: 0
type: AnswerComment
has text: The code you attached seems fine. Do you perhaps have more code that you could show to see the problem?
type: Comment

http://stackoverflow.com/q/29464439
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29464762
favorite count: 0
linked to: http://stackoverflow.com/q/9619977
tagged with: tail-recursion
has answer: http://stackoverflow.com/a/29464762
downvote count: 0
has body: The question has partial answers here and here which seem to implicitly imply that javascript and python result in 'infinite recursion'. Background Lately I've been dabbling in tail recursion which to my current understanding is that the programming style (*generally) holds the benefit of performance of an equivalent iterative solution with the benefit of readability -essentially making it the best of both worlds. Examples I've noticed that if one were to do this in .NET or Java: while(true) {...} Eventually Windows brings up a dialog box that allows the machine user to alter such said executable's state: The question Since tail recursion (*practically) doesn't have to deal with the stackoverflow exception here, am I incorrect to assume that Java or C# would either: Trigger the "Foo.exe not responding" dialog Result in infinite recursion Additionally, I am correct in assuming that this runtime 'exception' would be handled by the language's interpreter?
has title: Detection of tail recursion in programming langs
type: AnsweredQuestion
tagged with: recursion
tagged with: c#
has comment: http://stackoverflow.com/comment/47091944
score: 1
tagged with: java
type: Question
upvote count: 1
linked to: http://stackoverflow.com/q/15955566
answer count: 1

http://stackoverflow.com/comment/47050897
type: QuestionComment
has text: It's called _modulus_.
comment on: http://stackoverflow.com/q/29441207
score: 0
type: Comment

http://stackoverflow.com/comment/46969572
comment on: http://stackoverflow.com/a/29382317
type: AnswerComment
score: 0
type: Comment
has text: I haven't tried this yet, but I would need "bob" to be a variable that I could grab, i.e. if 'http://myangularapp.com/app/sally/index.html#/' was a URL a person invoked, the site would still execute, but would be able grab "sally" from the url. Right now, http://myangularapp.com/app/index.html#/ works fine, I just wanted to keep my mostly clean URL. It looks like I'll be adding a querystring variable to solve this

http://stackoverflow.com/q/29393109
has comment: http://stackoverflow.com/comment/47075257
linked to: http://stackoverflow.com/q/15994944
type: Question
has comment: http://stackoverflow.com/comment/47077814
has comment: http://stackoverflow.com/comment/46989620
has comment: http://stackoverflow.com/comment/46971937
upvote count: 1
has comment: http://stackoverflow.com/comment/47004456
has body: I have scene() and meshes: scene: scene.add(layer1) layer.add(layer2) layer2.add(layer3) Wanted result is: layer1 covered by layer2 and covered by layer3. It works fine, but when i go far away with camera, there start to be loss precision problem and looks like this: (layers are not correctly rendered one to another) i tried to solve by materials, layer2.material.depthTest = 0; layer3.material.depthTest = 0; works fine, but there is problem with another object between camera and layers. Do exist best practice for solution?
tagged with: javascript
has comment: http://stackoverflow.com/comment/46999986
has comment: http://stackoverflow.com/comment/46977364
has title: Three js render child mesh always before his parent
favorite count: 0
has comment: http://stackoverflow.com/comment/47011775
answer count: 0
type: UnansweredQuestion
tagged with: three.js
has comment: http://stackoverflow.com/comment/46971214
has comment: http://stackoverflow.com/comment/47075281
downvote count: 0
has comment: http://stackoverflow.com/comment/46967634
score: 1
has comment: http://stackoverflow.com/comment/46968437

http://stackoverflow.com/q/29472547
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
has body: when trying to open dialog in edit mode, validation message pop up with required message. but what i need to achieve is that when opening dialog box on edit mode as text box will contain value as soon as dialog box opens but then also validation message is there. how to remove that if already a value present in text box. Example below for HTML code how I am using it. First Name Required Last Name Required app.directive('showErrors', function() { return { restrict: 'A', require: '^form', link: function (scope, el, attrs, formCtrl) { // find the text box element, which has the 'name' attribute var inputEl = el[0].querySelector("[name]"); // convert the native text box element to an angular element var inputNgEl = angular.element(inputEl); // get the name on the text box so we know the property to check // on the form controller var inputName = inputNgEl.attr('name'); // only apply the has-error class after the user leaves the text box inputNgEl.bind('blur', function() { el.toggleClass('has-error', formCtrl[inputName].$invalid); }); } } }); Below is the image when i am opening form in normal mode. And below image shows when i open in edit mode. the value already present in it but as soon as dialog opens it show validation message.
favorite count: 0
has comment: http://stackoverflow.com/comment/47106980
has comment: http://stackoverflow.com/comment/47106356
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has title: How to disable validation while opening dialog box on edit mode?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29473229
has answer: http://stackoverflow.com/a/29472636
downvote count: 1
type: Question
tagged with: angularjs-directive
score: -1

http://stackoverflow.com/comment/69087188
has text: I would look into this more, but the docs say: "Deprecated: (since v1.4.0) Please use the $cookies service instead." so it seems kind of moot. https://docs.angularjs.org/api/ngCookies/service/$cookieStore
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29484684
score: 1

http://stackoverflow.com/comment/46980523
score: 0
type: Comment
has text: I have already written all the code and it works except for the condition explained above. The only problem I am trying to resolve is how to open an upload dialog box programatically from the Ajax callback function.
comment on: http://stackoverflow.com/a/29402272
type: AnswerComment

http://stackoverflow.com/q/29451303
has title: 'document' within a child window unexpectedly refers to parent
has body: I opened a child window, then wrote HTML and so on to it using childhandle.document.write(...) That worked fine. The HTML included an input with ID 'foo'. Then I tried childhandle.document.addEventListener('DOMContentLoaded', function(event) { (document.getElementById('foo').value = 'bar'; }); This gave a TypeError. It works if I change it to childhandle.document.addEventListener('DOMContentLoaded', function(event) { (childhandle.document.getElementById('foo').value = 'bar'; }); It seems that with version one the code must have been looking for element 'foo' in the parent document. That seems odd - surely the EventListener function is running in the scope of the child? Can someone explain what's happening here? Thanks.
tagged with: parent
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29451356
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: document
tagged with: dom
has comment: http://stackoverflow.com/comment/47068440
type: Question
tagged with: javascript

http://stackoverflow.com/q/29432342
favorite count: 0
has body: I'm working on a website and I have to implement a carousel of images. My choice fell on looper.js since it is simple and lightweight. But I'm having problems in codeigniter: - I imported the style sheet. - I imported the javascript file. - The carousel works. But problems comes when I want to implement the controls, since I have a problem not recognizing "prev" and "next". First, do not put the arrows, and then if I click it brings me to the carousel div instead of changing the slide. Here is the code I implemented: <?php foreach($images as $photo) { echo " "; echo " config->item('base_url') . $this->config->item('img') . $this->config->item('car') . "/" . $photo . "' alt='' style='width: 100%; height: 312px;' alt=''>"; echo " "; } ?>
has answer: http://stackoverflow.com/a/29433437
has comment: http://stackoverflow.com/comment/47035625
type: AnsweredQuestion
score: 1
tagged with: codeigniter
tagged with: looper
type: Question
has comment: http://stackoverflow.com/comment/47035270
has comment: http://stackoverflow.com/comment/47035310
tagged with: javascript
has comment: http://stackoverflow.com/comment/47036191
has title: looper.js with controls in codeigniter
accepted answer: http://stackoverflow.com/a/29433437
upvote count: 1
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47035719

http://stackoverflow.com/comment/47203659
score: 0
type: Comment
has text: I think you need to swap to var q3 = q2.multiply(q1);
comment on: http://stackoverflow.com/a/29474162
type: AnswerComment

http://stackoverflow.com/comment/47191860
has text: Also, convention says don't TitleCase your functions unless they're supposed to be called as a constructor.
comment on: http://stackoverflow.com/a/29517782
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29421704
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/47015011
accepted answer of: http://stackoverflow.com/q/29421703
has body: Chrome has default protection against Reflective XSS attacks. In Chrome there is a flag with which you can start the browser. If you start the browser with this flag, you can do what you want: --disable-web-security
answers question: http://stackoverflow.com/q/29421703
score: 4

http://stackoverflow.com/comment/47249725
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29497533
type: Comment
has text: So this worked only for a day IE.Document.getElementsByTagName("input")("txtWeight").focus, now suddenly the form stopped responding to it. Trying keydown, keyup, or keypress, but all erroring. Found here: http://en.wikipedia.org/wiki/DOM_events. Applying like this: IE.Document.getElementsByTagName("input")("txtWeight").keydown. Getting "does support property or method" error. How can I apply this without error to see if this works? thx

http://stackoverflow.com/comment/47193884
score: 0
comment on: http://stackoverflow.com/a/29518017
type: Comment
has text: Strange, it seems it removes 20px from each element, maybe I should increase by 20px for each row of 3 elements. So that it would be -20px for the second row, -40px for the third and so on.
type: AnswerComment

http://stackoverflow.com/q/29390337
tagged with: jquery
has comment: http://stackoverflow.com/comment/46958417
favorite count: 0
upvote count: 3
type: UnansweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/46957898
has comment: http://stackoverflow.com/comment/46958031
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29390452
has body: Is it possible that we could edit text enclosed inside an HTML comment using Javascript or JQuery. For example if I have a comment like: &lt;!-- This is a comment --&gt; then is it possible to change text 'This is a comment' using JQuery or Javascript? Thanks.
has title: Edit HTML Comment Text using JQuery or Javascript
downvote count: 0
has answer: http://stackoverflow.com/a/29390645
tagged with: javascript

http://stackoverflow.com/q/29406962
type: AnsweredQuestion
has title: Can I access parameters in my protractor configuration file?
possible better answer: http://stackoverflow.com/a/36707772
has answer: http://stackoverflow.com/a/36707772
linked to: http://stackoverflow.com/q/31040996
type: Question
tagged with: testing
tagged with: protractor
accepted answer: http://stackoverflow.com/a/29407351
downvote count: 0
tagged with: javascript
has body: I start my protractor tests by running the following: protractor protractor.conf.js --params.baseUrl=http://www.google.com --suite all I would like to run a 'before launch' function which is dependant of one parameter (in this case, the baseUrl). Is it that possible? exports.config = { seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar', seleniumPort: 4455, suites: { all: 'test/*/*.js', }, capabilities: { 'browserName': 'firefox' }, beforeLaunch: function() { console.log('I want to access my baseUrl parameter here: ' + config.params.baseUrl); }, onPrepare: function() { require('jasmine-reporters'); jasmine.getEnv().addReporter( new jasmine.JUnitXmlReporter('output/xmloutput', true, true)); } }; If I run that I get a ReferenceError because config is not defined. How should I do that? Is that even possible?
upvote count: 32
answer count: 4
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/66128729
tagged with: e2e-testing
score: 32
has answer: http://stackoverflow.com/a/37685345
has answer: http://stackoverflow.com/a/29407351

http://stackoverflow.com/comment/47048965
type: QuestionComment
comment on: http://stackoverflow.com/q/29439354
score: 0
has text: Mohammad is correct. You want to use Rails' idea of unobtrusive javascript. Even if you don't use the form helpers on the Ruby side, you can still add data-remote="true" to get the effects you want.
type: Comment

http://stackoverflow.com/comment/47276929
score: 0
has text: Would you tell me why this (http://jsbin.com/celizicoco/1/edit) is not working? I'm confused.
type: Comment
comment on: http://stackoverflow.com/a/29457793
type: AnswerComment

http://stackoverflow.com/q/29507191
has body: I have created a form in yii and tried using the append method. In said form the user selects the items and enters the amount. If they click the button it will call the function. In output it shows "object text". How do I retrieve it? <?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'travel1-form', 'enableClientValidation'=>true, 'clientOptions'=>array( 'validateOnSubmit'=>true, ), )); ?> Fields with * are required. <?php echo $form->labelEx($model,'name'); ?> <?php echo $form->textField($model,'name',array('name'=>'name'),array('class'=>'addtocarts')); ?> <?php echo $form->error($model,'name'); ?> <?php echo $form->labelEx($model,'Seattype'); ?> <?php echo $form->dropDownList($model,'seattype', array('S' => 'Sleeper', 'M' => 'Semi-sleeper','A'=>'Seater'), array('empty' => '(Select Type)','name'=>'seattype'));?> <?php echo $form->error($model,'seattype'); ?> <?php echo $form->labelEx($model,'amount'); ?> <?php echo $form->textField($model,'amount',array('name'=>'amount')); ?> <?php echo $form->error($model,'amount'); ?> <?php echo CHtml::submitButton('Submit',array('name'=>'submit'))?> <?php echo CHtml::htmlButton('AddtoCart',array('name'=>'addtocart','onclick'=>'myfunction();'))?> <?php $this->endWidget(); ?>
has comment: http://stackoverflow.com/comment/47171141
has title: how to use append in yii
has comment: http://stackoverflow.com/comment/47171275
has comment: http://stackoverflow.com/comment/47171226
tagged with: php
has answer: http://stackoverflow.com/a/29507550
type: AnsweredQuestion
score: 0
possible better answer: http://stackoverflow.com/a/29507478
type: Question
has answer: http://stackoverflow.com/a/29507478
answer count: 2
has comment: http://stackoverflow.com/comment/47171103
tagged with: yii
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29507550
has comment: http://stackoverflow.com/comment/47171092

http://stackoverflow.com/q/29483678
has title: Sortable Javascript with rubaxa
tagged with: jquery-ui-sortable
answer count: 1
has body: Im trying to implement the "multi" example on this page... http://rubaxa.github.io/Sortable/ . I feel like I've "recreated" the structure and the appropriate options as set forth on https://github.com/RubaXa/Sortable , but I am struggling to get this to function as i want. the simplified version of what i'm trying to do is here... https://jsfiddle.net/uqcqufo8/ HTML... Multi Group A Group c Group b javascript... var el = document.getElementById('multi'); var sortable = Sortable.create(el, { animation: 150, handle: ".tile__name", draggable: ".tile" }); Basically, the large grey squares should be sortable (as they are), but the colored squares should also be sortable - they should be sortable within their individual boxes, and they should be draggable from one grey box to another. I'm failing to see what i'm missing. Thanks.
has answer: http://stackoverflow.com/a/30038187
tagged with: javascript
type: UnansweredQuestion
tagged with: rubaxa-sortable
score: 2
downvote count: 0
favorite count: 0
type: Question
upvote count: 2

http://stackoverflow.com/comment/70419653
comment on: http://stackoverflow.com/a/41477685
type: Comment
score: 0
type: AnswerComment
has text: I just create one anchor tag with "download" attribute and append to body tag than fire click event and remove the anchor tag. For more Information please refer this link - http://www.w3schools.com/TAgs/att_a_download.asp

http://stackoverflow.com/comment/47089907
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29463247
has text: And the problem is.. ?

http://stackoverflow.com/q/29523366
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47201466
has body: What I am trying to do is, get data from my MySQL database using a Javascript/JQuery GET request and place this information within an HTML table to display which shifts do not contain a User ID. I am struggling to understand how to display the JSON get data on the page and how to place this within a table on the HTML page. I am using PHP on my localhost server to retrieve the data and I am able to retrieve the information in a JSON string. The function that does this is here: function marketplaceShifts(){ include ('config.php'); $sql = "SELECT * FROM shift WHERE user_id IS NULL"; $result = $conn-&gt;query($sql)-&gt;fetchAll(PDO::FETCH_ASSOC); $return = array(); foreach ($result as $row){ $return[]=array('id'=&gt;$row['shift_id'], 'User id'=&gt;$row['user_id'], 'Date of shift'=&gt;$row['date_shift'], 'Start of Shift'=&gt;$row['start_time'], 'End of Shift'=&gt;$row['finish_time']); } $conn = null; header('Content-type: application/json'); echo json_encode($return); } This is the function that retrieves the data that I am looking for and works when using Postman to show me the JSON strings with the information I need.
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/16215061
has comment: http://stackoverflow.com/comment/47201199
tagged with: mysql
type: Question
accepted answer: http://stackoverflow.com/a/29527607
upvote count: 0
score: -2
has title: JSON GET data using Javascript/JQuery
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29527607
downvote count: 2

http://stackoverflow.com/comment/47045104
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29438174
has text: Using something other than `$q` sounds like the most likely option.

http://stackoverflow.com/comment/47010353
has text: What about self calling functions in tabs.js ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29414053

http://stackoverflow.com/comment/47101461
type: Comment
type: QuestionComment
has text: If you remove the `debugger` line, do you still get an error? What is the actual error?
comment on: http://stackoverflow.com/q/29469434
score: 0

http://stackoverflow.com/a/29481449
type: Answer
upvote count: 1
score: 1
has body: It sounds like you're close. Cloud functions (including before/after functions) must call success or error on the response object to properly complete, so... Parse.Cloud.define('nameFunction', function(request, response){ Parse.Cloud.useMasterKey(); var someParam = request.params.someParam; doSomePromiseReturningThing(someParam).then(function(result) { response.success(result); }, function (error) { response.error(error); }); });
answers question: http://stackoverflow.com/q/29479993
accepted answer of: http://stackoverflow.com/q/29479993
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47123897

http://stackoverflow.com/comment/46958733
type: QuestionComment
comment on: http://stackoverflow.com/q/29390720
has text: shouldn't it be: $target.on('show.bs.modal', function (showEvent) ... instead of $target.one('show.bs.modal', function (showEvent) {?
score: 0
type: Comment

http://stackoverflow.com/q/29385437
has answer: http://stackoverflow.com/a/29385526
answer count: 11
has body: I need to multiply two numbers in JavaScript, but I need to do without using the multiplication operator "*". Is it possible? function a(b,c){ return b*c; } // note:need to do this without the "*" operator
score: 0
upvote count: 7
has answer: http://stackoverflow.com/a/42178616
downvote count: 7
has title: Can I perform multiplication without using the multiplication operator "*" in JavaScript
has answer: http://stackoverflow.com/a/52341915
has answer: http://stackoverflow.com/a/69725871
has answer: http://stackoverflow.com/a/29385532
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/71527261
has answer: http://stackoverflow.com/a/48724088
has answer: http://stackoverflow.com/a/57351204
tagged with: javascript
has answer: http://stackoverflow.com/a/59755329
favorite count: 0
has answer: http://stackoverflow.com/a/68594947
has answer: http://stackoverflow.com/a/77445561
type: Question

http://stackoverflow.com/a/29465439
answers question: http://stackoverflow.com/q/29465270
score: 0
has comment: http://stackoverflow.com/comment/47093666
has body: Use Array.prototype.splice() to remove the element you want. Push it to the end. var arr = []; var tgtIdx = -1; var lastID = -1; JSON.parse(json).forEach(function (obj, idx, array) { if(obj.itemId !== null &amp;&amp; obj.itemId &gt; lastID) { tgtIdx = idx; lastID = obj.itemId; } arr.push(obj); }) if(tgtIdx &gt;= 0 &amp;&amp; tgtIdx &lt; arr.length - 1) { arr.push(arr.splice(tgtIdx, 1)[0]); }
type: Answer
has comment: http://stackoverflow.com/comment/47094091

http://stackoverflow.com/q/29474873
linked to: http://stackoverflow.com/q/6761415
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47110968
favorite count: 0
has title: Third party cookies using jquery cookie
type: AnsweredQuestion
score: 2
tagged with: cookies
type: Question
upvote count: 2
has body: There page domain.com, which include javascript from server.com. &lt;script src="https://server.com/script.js"&gt;&lt;/script&gt; In this script i can easee set cookie to domain.com: $.cookie('name', { data : data }, { path: '/', expires: 10, domain: 'domain.com' }); I need to set cookie on server.com and read it later. I read that I can set third party cookie, if i load content from it. Why i cant set cookie like bellow? $.cookie('name', { data : data }, { path: '/', expires: 10, domain: 'server.com' });
has answer: http://stackoverflow.com/a/29475229
accepted answer: http://stackoverflow.com/a/29475229
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29430544
downvote count: 0
answers question: http://stackoverflow.com/q/29429365
upvote count: 2
has body: In plain old JavaScript, appropriate syntax would be: Template.home.events({ 'click .buy': function () { Router.go('/product'); }); Note that if the element being clicked is not an anchor or form submission, you won't really need to use event.preventDefault();
type: Answer
score: 2

http://stackoverflow.com/comment/47002643
comment on: http://stackoverflow.com/q/29414918
score: 0
type: Comment
type: QuestionComment
has text: Just use the expression, i.e. `ng-include="vm.mapInfo.mapFile"` etc.

browser-cache
tags question: http://stackoverflow.com/q/29393503
tags question: http://stackoverflow.com/q/29517467
type: Tag
tag name: browser-cache

http://stackoverflow.com/a/29444990
answers question: http://stackoverflow.com/q/29444880
has comment: http://stackoverflow.com/comment/47057358
has body: You can do it like this: Example JsFiddle Choose Major Major1 Major2 Choose Prof Prof1 Prof2 $('#major').on('change', function(){ if($('#major')[0].selectedIndex != 0){ $('#profs').prop("disabled", false); } else { $('#profs').prop("disabled", true); }});
has comment: http://stackoverflow.com/comment/47058139
has comment: http://stackoverflow.com/comment/47057369
score: 0
has comment: http://stackoverflow.com/comment/47058113
type: Answer

http://stackoverflow.com/q/29434041
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29434414
has comment: http://stackoverflow.com/comment/47037951
score: 0
possible better answer: http://stackoverflow.com/a/29434414
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/47037522
accepted answer: http://stackoverflow.com/a/29435656
tagged with: javascript
tagged with: steroids
has comment: http://stackoverflow.com/comment/47060366
has title: $scope push doesn't work angularjs
answer count: 2
has comment: http://stackoverflow.com/comment/47038296
tagged with: supersonic
tagged with: angularjs
has body: I have an issue with this code. In my controller I have this. $scope.spiagge = []; var distanza = function(info, posizione) { var request = { origin : posizione, destination : new google.maps.LatLng(info.latitudine, info.longitudine), travelMode : google.maps.TravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { //$scope.directionsDisplay.setDirections(response); info.distanza = response.routes[0].legs[0].distance.text; //distanza= response.routes[0].legs[0].distance.value/1000 ; } riempi(info); }); //riempi(info); } var riempi = function(spiaggia) { //alert("distanza " + spiaggia.distanza); $scope.spiagge.push(spiaggia); } If I put riempi(info) outside the directionsService function, $scope.spiagge.push works without info.distanza. I think this is because info.distanza is a local variable of directionService . If I put inside, like in the code here, it doesn't work at all; but the riempi function sees every value of info, distanza included. I don't know what to do. This is the view {{spiaggia.nome}} distanza {{spiaggia.distanza}} km Sorry for my english. Any idea? Thanks.
has answer: http://stackoverflow.com/a/29435656
has comment: http://stackoverflow.com/comment/47040179

http://stackoverflow.com/q/29474452
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29474613
tagged with: angularjs
score: 0
has body: I can't seem to find why the "start" and "finish" part of my form isn't being rendered. This is the first time I've ever worked with AngularJS, and after following quite a few tuts online, I used to yo meanjs generator with the articles example. I then took the articles example and tried to port it over to this scheduling thing. It really doesn't matter though, I just want to know why the last two inputs in the form aren't being rendered in my view. Any help is much appreciated Here's the code for my view: New Schedule Title Content Start Finish Here's the code for my controller: 'use strict'; angular.module('schedules').controller('SchedulesController', ['$scope', '$stateParams', '$location', 'Authentication', 'Schedules', function($scope, $stateParams, $location, Authentication, Schedules) { $scope.authentication = Authentication; $scope.create = function() { var schedule = new Schedules({ title: this.title, content: this.content, start: this.start, finish: this.finish }); schedule.$save(function(response) { $location.path('schedules/' + response._id); console.log('hola!'); $scope.title = ''; $scope.content = ''; }, function(errorResponse) { $scope.error = errorResponse.data.message; }); }; $scope.remove = function(schedule) { if (schedule) { schedule.$remove(); for (var i in $scope.schedules) { if ($scope.schedules[i] === schedule) { $scope.schedules.splice(i, 1); } } } else { $scope.schedule.$remove(function() { $location.path('schedules'); }); } }; $scope.update = function() { var schedule = $scope.schedule; schedule.$update(function() { $location.path('schedules/' + schedule._id); }, function(errorResponse) { $scope.error = errorResponse.data.message; }); }; $scope.find = function() { $scope.schedules = Schedules.query(); }; $scope.findOne = function() { $scope.schedule = Schedules.get({ scheduleId: $stateParams.scheduleId }); }; } ]);
answer count: 1
tagged with: forms
has title: Part's of form not being rendered - AngularJS
has comment: http://stackoverflow.com/comment/47110031
tagged with: javascript

http://stackoverflow.com/comment/47026868
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29428073
score: 0
has text: according to [this](http://stackoverflow.com/a/4776378/1213041) you're method should work. You need to verify what is/isn't working. Check to make sure the canvas has a width, that is in the forefront, etc. Are you getting any js errors?

http://stackoverflow.com/q/29519593
type: UnansweredQuestion
has title: how to get image from directory to slider
has comment: http://stackoverflow.com/comment/47202315
has body: I need to get every image from the folder and show it in a jQuery slider. I got some scratch code from other sites but I didn't get my output. Here is my code: My project directory:
has comment: http://stackoverflow.com/comment/47195432
type: Question
has comment: http://stackoverflow.com/comment/47194470
has comment: http://stackoverflow.com/comment/47194604
tagged with: javascript
has comment: http://stackoverflow.com/comment/47194656
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/47195092
has comment: http://stackoverflow.com/comment/47194511
has comment: http://stackoverflow.com/comment/47194303
has comment: http://stackoverflow.com/comment/47195316
has comment: http://stackoverflow.com/comment/47194839
answer count: 0

http://stackoverflow.com/comment/47092749
comment on: http://stackoverflow.com/q/29464911
has text: it could be that... you are running the script which registers the click handler in another event handler... so whenever that handler is executed a new click handler is added to the existing step
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29514357
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47184982
has comment: http://stackoverflow.com/comment/47184519
score: 1
has comment: http://stackoverflow.com/comment/47184291
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29514634
has comment: http://stackoverflow.com/comment/47499070
tagged with: javascript
tagged with: jquery
answer count: 2
tagged with: datatables
has body: I am trying to use datatables jQuery plugin, but having trouble and I can't figure out why is that happening. I got an action column on my table: table = $('#' + tableId).DataTable({ processing: true, serverSide: true, ajax: dataUrl, deferRender: true, esponsive: true, pageLength: 15, pagingType: "full_numbers", stateSave: true, filter: true, language: { paginate: { next: " ", previous: " ", first: "First", last: "Last" } } $(document).on('click', ".details-control2", function () { var tr = $(this).parent().parent(); // <-- finds the correct tr var row = table.row(tr); console.log(row); // <-- undefined, why??? 'table' is recognized correctly } Update - Table's HTML: rasplap.dll WIN7X86 DLL 4/4/2015 3:45:45 PM 4/4/2015 5:38:32 PM 0 Any suggestions? Please tell me if any info is missing.
has comment: http://stackoverflow.com/comment/47184287
downvote count: 0
has answer: http://stackoverflow.com/a/29514830
has title: Jquery - table.row(tr) is undefined

http://stackoverflow.com/comment/46974916
comment on: http://stackoverflow.com/a/29399532
has text: This only answers part of the question
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/29393723
has title: jQuery do code if class is changed
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46964320
answer count: 3
linked to: http://stackoverflow.com/q/1950038
has comment: http://stackoverflow.com/comment/46964037
has body: I'm trying to check does li inside other li having class is-visible, and in that case do nothing, but if it doesn't add style width: 0px. if (jQuery("li:has(li.is-visible)")){ //nothing at this moment } else { jQuery('ul.cd-gallery li').css({'width' : '0px'}); } html part of code &lt;ul class="cd-item-wrapper"&gt; &lt;li data-type="sve" class="is-visible"&gt; &lt;img class="img-reponsive" src="someimg.jpg" alt="Jabuka" height="150" /&gt; &lt;/li&gt; &lt;li data-type="proizvodi" class="is-hidden"&gt; &lt;img class="img-reponsive" src="someimg.jpg" alt="Jabuka" height="150" /&gt; &lt;/li&gt; &lt;li data-type="vocnaci" class="is-hidden"&gt; &lt;img class="img-reponsive" src="someimg.jpg" alt="Jabuka" height="150" /&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; but I'm using jQuery to change class from is-hidden to is-visible and vice versa. So my code does not see any changes, and I have group all to display all images. If it helps here is link to that page my site mine Jquery code is good, at least i think, but issue is (if u do inspect element on site) u see bunch of and wehn u change category i need to hide elements (width:0) that dont't have li > ul > li class="is-visible"
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29393834
favorite count: 0
accepted answer: http://stackoverflow.com/a/29393834
tagged with: css
has answer: http://stackoverflow.com/a/29393760
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46990672
score: 1
has answer: http://stackoverflow.com/a/29393837
upvote count: 1
possible better answer: http://stackoverflow.com/a/29393760
type: Question

http://stackoverflow.com/comment/47164053
type: AnswerComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74668/discussion-between-donny-and-vihan1086).
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29497321

http://stackoverflow.com/q/29522310
tagged with: javascript
has title: To check when knockout binding is complete
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/29522938
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47199360
has body: I am using knockout to bind the controls on my page and after the binding is complete I use window.print() to print the page. all these functions are called in $(document).ready(function (){//} So the flow is like this: the page loads and due to window.print(); it goes to the print wizard. Now the problem is that the page goes to print wizard and the bindings are incomplete although i have used ko.applyBindings(object to be bound); before window.print(); Is there a method or way in knockout that i can check if all the bindings are complete or not because writing it in document.ready() is not helping.
has comment: http://stackoverflow.com/comment/47201531
tagged with: knockout.js
type: Question
score: 2
has comment: http://stackoverflow.com/comment/47199769
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/47006383
type: Comment
has text: sure, and that's a single test of.. what? what's running the code that's accepting the request, for instance? Node.js has a debug mode that lets you run your code right until it sees the `debugger` statement, and will interrupt the run so you can fire up the REPL, type whatever you want including console logs, and then exit the REPL again to continue regular program flow.
comment on: http://stackoverflow.com/a/29406365
score: 0
type: AnswerComment

http://stackoverflow.com/q/29481580
has answer: http://stackoverflow.com/a/29481773
answer count: 3
has title: Parse a URL into readable json format on a HTML page?
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: parsing
has body: I would like to know how to parse this URL into readable JSON format with jQuery on a html page.
accepted answer: http://stackoverflow.com/a/29481773
has answer: http://stackoverflow.com/a/29481749
possible better answer: http://stackoverflow.com/a/29481630
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47124165
has answer: http://stackoverflow.com/a/29481630
linked to: http://stackoverflow.com/q/5612787
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47123771
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29493350
score: -1
type: Answer
upvote count: 0
downvote count: 1
has body: Once, a used this snippet to get lat/lng from an address, all in PHP (old API): $address = "......"; $json = file_get_contents("http://maps.googleapis.com/maps/api/geocode/json?sensor=false&amp;address=".urlencode($address)); $json = json_decode($json); if ($json-&gt;status == "OK") return $json-&gt;results[0]-&gt;geometry-&gt;location;
answers question: http://stackoverflow.com/q/29493062

http://stackoverflow.com/q/29399243
has comment: http://stackoverflow.com/comment/46974426
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46974489
answer count: 1
has comment: http://stackoverflow.com/comment/46974405
tagged with: jquery
has body: I'm trying to simply resize a div when I click on it, yet it's not resizing. Can anyone tell me why? CSS #navigation{ position: absolute; display: block; float: right; margin: 0; top: 0; right: 0; width: 25px; height: 100%; z-index: 1; background-color: green; } JS $("#navigation").on("click", function(){ $("#navigation").css("width", "100px"); }) Doing it this way does not work either. $("#navigation").on("click", function(){ $("#navigation").width(100); }) HTML &lt;div id="navigation"&gt; &lt;ul&gt;&lt;/ul&gt; &lt;/div&gt; The console is not showing any errors.
favorite count: 0
has title: Why is my div not resizing in jQuery?
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/29399335
downvote count: 2
has comment: http://stackoverflow.com/comment/46974512
upvote count: 1
has comment: http://stackoverflow.com/comment/46974442

http://stackoverflow.com/a/29516587
score: 0
has body: I found the problem, i used document.test.rkb.value = rkb; where I should have used document.getElementById('rkb').innerHTML= rkb; That solved it.
answers question: http://stackoverflow.com/q/29375226
type: Answer

directive
tags question: http://stackoverflow.com/q/29387522
type: Tag
tags question: http://stackoverflow.com/q/29389873
tags question: http://stackoverflow.com/q/29384465
tags question: http://stackoverflow.com/q/29471947
tag name: directive
tags question: http://stackoverflow.com/q/29519351

http://stackoverflow.com/q/29416235
accepted answer: http://stackoverflow.com/a/29474162
type: Question
tagged with: camera
has body: I need to calculate the rotation of an object in 3D space. I'm attempting to use threejs, but haven't been able to figure it out. What I need is:(rotationX, rotationY, rotationZ), in degrees. I have the beginning camera view: (position[x,y,z], target[x,y,z], up[x,y,z]) and the ending camera view: (position[x,y,z], target[x,y,z], up[x,y,z]) Any help would be greatly appreciated.
tagged with: javascript
tagged with: jquery
score: 0
has title: Calculate object rotation from camera view change
answer count: 1
has answer: http://stackoverflow.com/a/29474162
type: AnsweredQuestion

geography
type: Tag
tags question: http://stackoverflow.com/q/29466407
tag name: geography
tags question: http://stackoverflow.com/q/29480620

http://stackoverflow.com/comment/47081891
type: Comment
type: QuestionComment
has text: @Pointy I understand that, i'm just sharing another method of triggering it but as you clearly pointed out, there isn't any reason for removing the event.
comment on: http://stackoverflow.com/q/29458804
score: 0

http://stackoverflow.com/comment/47066933
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29450466
has text: Thanks Bro it worked. But one problem I have checked the POST data it seems it is posting one extra select here selector"%"5B"%"5D=2&selector"%"5B"%"5D=1&selector"%"5B"%"5D=2&id=2 The one with selector=2 in the first is automatically added dont know how. I have even checked the html there is no such problem in that. Then why it is posting two times selector=2
type: Comment

http://stackoverflow.com/comment/47085286
score: 0
type: Comment
type: QuestionComment
has text: Why not use a customized version of Bootstrap? You can easily set the container sizes: http://getbootstrap.com/customize/#container-sizes or go ahead and download the source, edit these same variables, and recompile the less.
comment on: http://stackoverflow.com/q/29460370

http://stackoverflow.com/a/29521828
downvote count: 0
answers question: http://stackoverflow.com/q/29521232
has comment: http://stackoverflow.com/comment/47199245
has comment: http://stackoverflow.com/comment/47203964
score: 1
upvote count: 1
has body: The answer of Ramin Taghizada is better for me. There is another option: You can use localStorage if you want. Home About Contact To see which the last page is the user clicked: if(localStorage['prev'] != undefined) { alert(localStorage['prev']); }
type: Answer

java
tags question: http://stackoverflow.com/q/29512655
tags question: http://stackoverflow.com/q/29467990
tags question: http://stackoverflow.com/q/29504929
tags question: http://stackoverflow.com/q/29502523
tags question: http://stackoverflow.com/q/29405501
tags question: http://stackoverflow.com/q/29388142
tags question: http://stackoverflow.com/q/29452758
tags question: http://stackoverflow.com/q/29389031
tags question: http://stackoverflow.com/q/29380491
tags question: http://stackoverflow.com/q/29517170
tags question: http://stackoverflow.com/q/29406718
tags question: http://stackoverflow.com/q/29427301
tags question: http://stackoverflow.com/q/29416609
tags question: http://stackoverflow.com/q/29486199
tags question: http://stackoverflow.com/q/29411975
tags question: http://stackoverflow.com/q/29408841
tags question: http://stackoverflow.com/q/29511202
tags question: http://stackoverflow.com/q/29495049
tags question: http://stackoverflow.com/q/29461337
tags question: http://stackoverflow.com/q/29401989
tags question: http://stackoverflow.com/q/29497437
tags question: http://stackoverflow.com/q/29431985
tags question: http://stackoverflow.com/q/29377982
tags question: http://stackoverflow.com/q/29491634
tags question: http://stackoverflow.com/q/29459092
tags question: http://stackoverflow.com/q/29445264
tags question: http://stackoverflow.com/q/29405779
tags question: http://stackoverflow.com/q/29515791
tags question: http://stackoverflow.com/q/29391364
tags question: http://stackoverflow.com/q/29512057
tags question: http://stackoverflow.com/q/29378785
tags question: http://stackoverflow.com/q/29426520
tags question: http://stackoverflow.com/q/29374066
tags question: http://stackoverflow.com/q/29434995
tags question: http://stackoverflow.com/q/29481447
tags question: http://stackoverflow.com/q/29438273
tags question: http://stackoverflow.com/q/29443334
tags question: http://stackoverflow.com/q/29406732
tags question: http://stackoverflow.com/q/29379947
tags question: http://stackoverflow.com/q/29469026
tags question: http://stackoverflow.com/q/29424113
tag name: java
tags question: http://stackoverflow.com/q/29432748
tags question: http://stackoverflow.com/q/29434035
tags question: http://stackoverflow.com/q/29384404
tags question: http://stackoverflow.com/q/29512979
tags question: http://stackoverflow.com/q/29523307
tags question: http://stackoverflow.com/q/29413937
tags question: http://stackoverflow.com/q/29442679
tags question: http://stackoverflow.com/q/29415399
tags question: http://stackoverflow.com/q/29429037
tags question: http://stackoverflow.com/q/29464439
tags question: http://stackoverflow.com/q/29467782
tags question: http://stackoverflow.com/q/29383605
tags question: http://stackoverflow.com/q/29386830
tags question: http://stackoverflow.com/q/29518152
tags question: http://stackoverflow.com/q/29460312
tags question: http://stackoverflow.com/q/29418856
type: Tag
tags question: http://stackoverflow.com/q/29469081
tags question: http://stackoverflow.com/q/29504171
tags question: http://stackoverflow.com/q/29493691
tags question: http://stackoverflow.com/q/29457628
tags question: http://stackoverflow.com/q/29425760
tags question: http://stackoverflow.com/q/29456466

http://stackoverflow.com/comment/46999365
score: 0
type: Comment
type: QuestionComment
has text: Because you do not pass the `supervisor` to the `load`. You need to store it somewhere in the `addProject.tpl` I think, in json format, in a hidden field, and inject it into the `clones/add-another-supervisor.tpl`.
comment on: http://stackoverflow.com/q/29412312

http://stackoverflow.com/comment/79537090
has text: Re "weakmap work well for encapsulation and information hiding". Just because you can, doesn't mean you should. Javascript has default ways of doing encapsulation and information hiding even before weakmap was invented. As at now, there are [literally 6 ways to do it](https://stackoverflow.com/questions/29413222/what-are-the-actual-uses-of-es6-weakmap/40241741#comment79534889_29416340). Using weakmap to do encapsulation is an ugly facepalm.
type: AnswerComment
comment on: http://stackoverflow.com/a/40241741
score: 5
type: Comment

http://stackoverflow.com/a/29467469
has body: Plain Javascript approach:- This approach takes advantage of the this keyword as follows... HTML: &lt;div id="oldId" onclick="changeId(this)"&gt;&lt;/div&gt; JS: function changeId(element) { element.id = "someNewId"; } or simply (in one line) as part of the HTML &lt;div id="oldId" onclick="this.id='someNewId';"&gt;&lt;/div&gt; jQuery approach:- Use the attr() function as follows... $(function(){ $("#oldId").click(function(){ $("#oldId").attr("id","newId"); return false; }); }); EDIT: As requested, I will give a piece of code to toggle between 2 ids. HTML: &lt;div id="firstId" onclick="toggleId(this)"&gt;&lt;/div&gt; JS: function toggleId(element) { if(element.id == "firstId") { element.id = "secondId"; } else { //This will only execute when element.id == "secondId" element.id = "firstId"; } }
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47097235
accepted answer of: http://stackoverflow.com/q/29467409
has comment: http://stackoverflow.com/comment/47097154
answers question: http://stackoverflow.com/q/29467409
upvote count: 2
has comment: http://stackoverflow.com/comment/47097263
has comment: http://stackoverflow.com/comment/47097857
type: AcceptedAnswer

http://stackoverflow.com/a/29428792
downvote count: 0
has comment: http://stackoverflow.com/comment/47028479
has comment: http://stackoverflow.com/comment/47028576
has comment: http://stackoverflow.com/comment/47028640
answers question: http://stackoverflow.com/q/29428746
upvote count: 2
has body: Something like this? //var buttons = document.getElementsByClassName('.button'); // Not standard var buttons = document.querySelectorAll('.button'); function clickButton(index) { mybtn[index].click(); if(index &lt; buttons.length) { setTimeout("clickButton(" + (index+1) + ");", 5000); } } setTimeout("clickButton(0);", 5000); For testing, I added alert(): //var buttons = document.querySelectorAll('.button'); function clickButton(index) { //mybtn[index].click(); alert("button" + index); if(index &lt; 100) { setTimeout("clickButton(" + (index+1) + ");", 5000); } } setTimeout("clickButton(0);", 5000);
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/47027891
has comment: http://stackoverflow.com/comment/47027940

http://stackoverflow.com/q/29402730
has comment: http://stackoverflow.com/comment/46980889
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has body: I'm learning javascript but new to jQuery and am trying to make an on change event handeler for all the text boxes in my document. So here is my Text box <asp:Table ID="Table1" BorderColor="Black" BorderStyle="Solid" BorderWidth="3" runat="server"> <asp:TableRow> <asp:TableCell BorderColor="Black" BorderStyle="Solid" BorderWidth="2"> <asp:TextBox ID="TextBox1" BackColor="Blue" runat="server" Width="40" Text="1" TextMode="Number"></asp:TextBox> And My script at the bottom Than my javascript. $("textbox").change(function () { alert("ggg"); }); But when i change the text inside my textbox it will not alert I know how to make a regular javascript event but i want to be able to make a event to fire for all textboxes.
favorite count: 0
possible better answer: http://stackoverflow.com/a/29402812
has answer: http://stackoverflow.com/a/29402812
has comment: http://stackoverflow.com/comment/46980869
has comment: http://stackoverflow.com/comment/46980977
accepted answer: http://stackoverflow.com/a/29423443
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46980880
score: 1
has answer: http://stackoverflow.com/a/29411196
has answer: http://stackoverflow.com/a/29423443
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/46980910
has comment: http://stackoverflow.com/comment/46980926
tagged with: javascript
tagged with: jquery
has title: How to make an onchange event for a asp:textbox in jQuery
has comment: http://stackoverflow.com/comment/46980955

http://stackoverflow.com/q/29499180
score: 0
answer count: 2
tagged with: javascript
tagged with: parse-cloud-code
tagged with: angularjs
has answer: http://stackoverflow.com/a/29501191
type: AnsweredQuestion
has title: Cloud Code function not saving data
tagged with: parse-platform
possible better answer: http://stackoverflow.com/a/29501169
has answer: http://stackoverflow.com/a/29501169
type: Question
accepted answer: http://stackoverflow.com/a/29501191
has comment: http://stackoverflow.com/comment/47159740
has comment: http://stackoverflow.com/comment/47159329
has body: Before putting this on the cloud code I tested it in Angular with success producing the correct console.log responses throughout the program. Since this function manipulates data in the user table it must use the master key and be in cloud code. With this code in the cloud it saves the column 'duty' to the user table but with no data (there is data to be saved, this I am sure of). Moreover, I'm not even sure that the code runs past the first Parse Query as the console.log returns nothing in the Parse Logs. Where am I going wrong? 'use strict'; var express = require('express'); var app = express(); app.use(express.bodyParser()); var _ = require('underscore'); var server = require('http').createServer(app); Parse.Cloud.define("updateMerchant", function(request, response) { Parse.Cloud.useMasterKey(); var user = Parse.Object.extend("User") var merchantQuery = new Parse.Query(Parse.User); var Offers = Parse.Object.extend("Offer"); var offerQuery = new Parse.Query(Offers); var Matches = Parse.Object.extend("Matched"); var matchQuery = new Parse.Query(Matches); var merchantDuty = []; var merchants = request.params.data;//I confirmed the validity of this a key value pair where the value is an array of objects. var merchantIds = _.map(merchants, function(n){return n.id}); console.log(merchantIds) offerQuery.containedIn("user", merchants); offerQuery.limit(1000); offerQuery.find({//CODE STOPS RUNNING?!? success: function (offers) { var offerIds = _.map(offers, function (n) { return n.id}); console.log(offers)//this is telling as it does not appear in the Parse log! var offersBeta = _.map(offers, function (n) { return _.extend(_.find(n), {id: n.id})}); matchQuery.containedIn("offer", offers); matchQuery.limit(1000); matchQuery.find({ success: function (matches) { var merchantArray = _.map(_.flatten(matches), function (n) {return _.find(n)}); var offers3 = _.map(offersBeta, function (n) {return _.extend(n, { Matched: _.filter(merchantArray, function (a) {return a.offer.id == n…

http://stackoverflow.com/a/29410134
downvote count: 0
answers question: http://stackoverflow.com/q/29408986
accepted answer of: http://stackoverflow.com/q/29408986
type: Answer
score: 1
has body: You should look at gwt core JsonUtils which has a safeEval method for the string. You should define a JavaScript Overlay Object for use with the result or you could work with the object in JSNI as you seem to want to.
upvote count: 1
has comment: http://stackoverflow.com/comment/46995262
type: AcceptedAnswer

http://stackoverflow.com/q/29501908
tagged with: garbage-collection
has comment: http://stackoverflow.com/comment/47162386
tagged with: performance
has comment: http://stackoverflow.com/comment/47162028
has body: I'm loading content dynamically via AJAX (following a "hijax" pattern), and sometimes the AJAX loaded content has scripts that I also load and execute (inline, external). The scripts I load (written by me) are all wrapped up inside of an anonymous function (each separate script in a separate anonymous function) (function(){}());. Thing is, since all is done via AJAX, the page never truly reloads completely, and as far as I'm aware, these anonymous functions just linger in the window object, inaccessible, when the content changes and the previously loaded scripts are no longer relevant. Is this what happens? Or do they get cleaned up by the browser's garbage collector? I imagine that if they just linger in there, over time, the page would get slow, because of all the anonymous functions that are sitting in there, being useless. And if that was the case, would wrapping all of my scripts in a variable and with each new AJAX request clearing that variable with something like myScripts = undefined be enough? Thanks.
has comment: http://stackoverflow.com/comment/47162192
type: Question
has comment: http://stackoverflow.com/comment/47161992
tagged with: javascript
has comment: http://stackoverflow.com/comment/47162517
has title: What happens to anonymous functions when no longer used?
tagged with: ajax
has comment: http://stackoverflow.com/comment/47162803
score: 0
has comment: http://stackoverflow.com/comment/47162039
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/47158569
has text: Notice that the `in` operator is pretty slow.
comment on: http://stackoverflow.com/a/29499155
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/29397909
has comment: http://stackoverflow.com/comment/46973094
has title: How to ng-show element on scroll when it is into view in Angular JS
score: 1
has comment: http://stackoverflow.com/comment/46973236
favorite count: 0
has comment: http://stackoverflow.com/comment/46989676
has comment: http://stackoverflow.com/comment/46972811
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47027586
upvote count: 1
has answer: http://stackoverflow.com/a/29398558
has body: That's my code and it doesn't work. What's wrong with it? HTML &lt;i ng-show="whenIconsIntoView()" class="fa fa-mail"&gt;&lt;/i&gt; JS app.controller('AboutCtrl', ['$scope', '$window', function($scope, $window){ // some function to detect is scroll into user's view isScrolledIntoView = function(elem) {...} $window.onscroll = function() { $scope.whenIconsIntoView = function(){ $scope.$apply(function() { return isScrolledIntoView('.icons'); }); }; }; }]);
has answer: http://stackoverflow.com/a/29398392
has comment: http://stackoverflow.com/comment/47024524
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46974777

http://stackoverflow.com/q/29382547
accepted answer: http://stackoverflow.com/a/29391579
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46946019
has body: I would like to ask about this voting box that was included in our website files. Cause there seemed to be a problem with this. Whenever I click the "Click here to vote". Nothing happens, I do not have any idea why since I am not into java codings. I'd like to include the codes of it so you guys can take a look at. This is the voting box: https://i.sstatic.net/3LV8S.png So this is the code of where you are going to click it: if(isset($_SESSION['user'])) { odbc_exec($mssql, 'USE [ACCOUNT_DBF]'); $votepoints = odbc_exec($mssql, 'SELECT votepoints FROM [ACCOUNT_TBL] WHERE account=\''.mssql_escape_string($_SESSION['user']).'\''); echo 'Current Vote Points: '.odbc_result($votepoints, 'votepoints').' '; echo ''; echo 'Click here to vote!'; } else { echo 'You must login before you can vote!'; } This is the voteTab(); function: function voteTab() { $.ajax({ url: 'ajax.php?a=vote', type: 'GET', dataType: 'php', timeout: 1000, success: function(response){ $(".boxcontent").html(response); } }); This is the ajax:vote function: if($_GET['a'] == 'vote') { // Vote Box odbc_exec($mssql, 'USE [ACCOUNT_DBF]'); $userselect = odbc_exec($mssql, 'SELECT * FROM [ACCOUNT_TBL] WHERE account=\''.mssql_escape_string($_SESSION['user']).'\''); $user = odbc_fetch_array($userselect); $diff1 = diff($user['lastvote1']); $diff2 = diff($user['lastvote2']); $diff3 = diff($user['lastvote3']); $votedtoday = 0; if($diff1['hours'] < 12) $votedtoday = $votedtoday + 1; if($diff2['hours'] < 12) $votedtoday = $votedtoday + 1; if($diff3['hours'] < 12) $votedtoday = $votedtoday + 1; echo 'Username: '.$user['account'].' '; echo 'Current Vote Points: '.$user['votepoints'].' '; echo 'You can vote '.(3 - $votedtoday).' more times today. '; if($diff1['hours'] >= 12 || $diff2['hours'] >= 12 || $diff3['hours'] >= 12) { if(isset($_GET['submit'])) { if($_GET['submit'] == 1) { if($diff1['hours'] >= 12) { odbc_exec($mssql, 'UPDATE [ACCOUNT_TBL] SET votepoints=votepoints+\'1\', lastvote'.mssql_escape_string($_GET['submit']…
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46945497
has comment: http://stackoverflow.com/comment/46944307
type: Question
has title: Why does this javascript won't work?
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29391579
answer count: 2
has comment: http://stackoverflow.com/comment/46945570
favorite count: 0
possible better answer: http://stackoverflow.com/a/29382626
has answer: http://stackoverflow.com/a/29382626
has comment: http://stackoverflow.com/comment/46959657
tagged with: php

http://stackoverflow.com/a/30407354
downvote count: 0
score: 35
type: Answer
has body: This only happens when you have a ScrollView or ListView with TabBarIOS. You can remove the extra space at the top if you put automaticallyAdjustContentInsets={false} However, the ScrollView will not completely be shown because the bottom portion of it will be hidden under the TabBarIOS. To fix this add contentInset={{bottom:49}} adjust the height according to your needs. here is the code: &lt;ListView contentInset={{bottom:49}} automaticallyAdjustContentInsets={false} &gt;
answers question: http://stackoverflow.com/q/29496054
has comment: http://stackoverflow.com/comment/54023095
upvote count: 35

http://stackoverflow.com/q/29426302
has answer: http://stackoverflow.com/a/29428786
tagged with: src
type: Question
has answer: http://stackoverflow.com/a/29426341
possible better answer: http://stackoverflow.com/a/29426885
tagged with: javascript
has body: I'm working on an HTML/javascript app intended to be run locally. When dealing with img tags, it is possible to set the src attribute to a file name with a relative path and thereby quickly and easily load an image from the app's directory. I would like to use a similar method to retrieve a text file from the app's directory. I have used TideSDK, but it is less lightweight. And I am aware of HTTP requests, but if I remember correctly only Firefox has taken kindly to my use of this for local file access (although accessing local images with src does not appear to be an issue). I am also aware of the FileReader object; however, my interface requires that I load a file based on the file name and not based on a file-browser selection as with &lt;input type="file"&gt;. Is there some way of accomplishing this type of file access, or am I stuck with the methods mentioned above?
tagged with: get
upvote count: 2
answer count: 3
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
downvote count: 0
has title: Is it possible to retrieve text files from HTML app directory without HTTP request or ?
accepted answer: http://stackoverflow.com/a/29426341
has answer: http://stackoverflow.com/a/29426885

http://stackoverflow.com/comment/47164702
has text: Actually an alternative is to not technically store a value but to define a getter that will dynamically generate the correct value when requested. Please see my answer for an example.
comment on: http://stackoverflow.com/q/29501680
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/29526411
score: 1
accepted answer of: http://stackoverflow.com/q/29526272
answers question: http://stackoverflow.com/q/29526272
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/47209836
has body: How about if your batch file outputted it to a formatted JS include as plain text into the HTTP Dir, and your HTML included it. For example del "c:\httpdocs\mywebsite\protectedincludes\vars.js" set foldersList = dir /b /ad "" %foldersList% &gt; tempfile.txt echo "var myJsArray=[" &gt; "c:\httpdocs\mywebsite\protectedincludes\vars.js" 2&gt;&amp;1 FOR /f %a in (‘tempfile.txt’) do ( echo "'" &gt; "c:\httpdocs\mywebsite\protectedincludes\vars.js" 2&gt;&amp;1 echo %a &gt; "c:\httpdocs\mywebsite\protectedincludes\vars.js" 2&gt;&amp;1 echo "'," &gt; "c:\httpdocs\mywebsite\protectedincludes\vars.js" 2&gt;&amp;1 ) echo "];" &gt; "c:\httpdocs\mywebsite\protectedincludes\vars.js" 2&gt;&amp;1 and then on your webpage you can easily include it: &lt;html&gt; &lt;script src="protectedIncludes/vars.js"&gt;&lt;/script&gt; &lt;script&gt; Do something with myJsArray &lt;/script&gt; Something along these lines anyway. Bedtime for me now though. edit. couple of typos.
has comment: http://stackoverflow.com/comment/47619710
downvote count: 0

http://stackoverflow.com/comment/47361745
has text: Got it working! I just had to add "&callback=initialize" to the end of the script src
comment on: http://stackoverflow.com/a/29381665
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47402891
comment on: http://stackoverflow.com/q/29455858
score: 0
type: QuestionComment
type: Comment
has text: I recommend using a remote debugger and looking at what's going on in the network. Maybe mime file types are not ok.

http://stackoverflow.com/comment/47164861
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29503555
type: QuestionComment
has text: Exactly how do I do that? Excuse me for my questions, I just started using Javascript.

http://stackoverflow.com/comment/47291826
has text: You should post your own answer then properly below.
comment on: http://stackoverflow.com/q/29527190
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/29384980
type: AnsweredQuestion
has title: Injecting First Angular Factory
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46949227
has comment: http://stackoverflow.com/comment/46948653
type: Question
has comment: http://stackoverflow.com/comment/46948284
tagged with: dependency-injection
has comment: http://stackoverflow.com/comment/46949775
has comment: http://stackoverflow.com/comment/46949111
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46948580
has answer: http://stackoverflow.com/a/29385076
accepted answer: http://stackoverflow.com/a/29385076
has comment: http://stackoverflow.com/comment/46948826
upvote count: 1
answer count: 1
has body: I'm way overdue for injecting my first angular Factory . . . My code: .factory('Debts', function($q, $scope){ return MA; }) .controller('Admin', function ($scope, Debts) { $scope.Debts = Debts; $scope.Debts.MA(); }) With $scope in my factory I get the following error: Unknown provider: $scopeProvider &lt;- $scope &lt;- Debts I read somewhere that we should not include $scope in the factory but when I take it out I get two errors: 1) Provider 'Debts' must return a value from $get factory method 2) Uncaught ReferenceError: $scope is not defined The code for my factory is several hundred lines and yes it references $scope and $q. Please let me know what I need to change to make this work.
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46948595
tagged with: factory
has comment: http://stackoverflow.com/comment/46948323
has comment: http://stackoverflow.com/comment/46948340

http://stackoverflow.com/comment/47037404
has text: Actually you know what, I think was wrong about the constructor thing. It looks like I misunderstood one of the comments above.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29433312
type: Comment

http://stackoverflow.com/q/29395362
has comment: http://stackoverflow.com/comment/47020756
accepted answer: http://stackoverflow.com/a/29424782
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47021339
favorite count: 0
tagged with: angularjs
upvote count: 2
has body: Having an issue making this animation work for me. Essentially I have a vertical scrolling page with several div elements that vary in size based on the content being displayed. What's happening is that as these size changes occur the other elements are jumping abruptly based. I'd like to make these a bit more smooth. This is actually part of a massive project (angular) so I can't bring in any external libraries. I've created a jfiddle which illustrates the problem. $('.close').click(function () { $(this).parent().parent().height(0); $(this).parent().parent().slideUp(500);// in case if you want to move the second div up. }); http://jsfiddle.net/zberQ/5/ So to summarize, the issue is actually not with the element who's height is changing. The issue is with the elements below it which are instantly jumping up or down in response to this height change.
tagged with: css
has comment: http://stackoverflow.com/comment/46968091
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/29424782
has title: animate div movement relative to another div size change
type: Question
has comment: http://stackoverflow.com/comment/46968537
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/47052465
comment on: http://stackoverflow.com/a/29442184
type: AnswerComment
has text: yes since you are updating the page (DOM) after you get ajax response, the page needs to be loaded. Ideally page loading will be faster than ajax call but to be on safe side invoke your function in document ready.
type: Comment
score: 2

http://stackoverflow.com/a/29388826
has comment: http://stackoverflow.com/comment/46956802
has body: You can't for security reasons. See the same origin policy for JavaScript. There are some workarounds that exploit browser bugs or corner cases, but using them is not recommended. The best approach is having a server-side proxy that receives Ajax requests, and in turn, sends HTTP requests to other servers. This should be carefully implemented by sanitizing input and whitelisting the types of requests that are sent, and the servers that are contacted.
answers question: http://stackoverflow.com/q/29388719
type: Answer
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/comment/46945067
type: Comment
has text: Upps seems like i didn't read the README **This package does not support theming and includes generated CSS files of the default theme only.** i just add the semantic into a project, running `meteor add nooitaf:semantic-ui`
type: AnswerComment
comment on: http://stackoverflow.com/a/29382923
score: 0

http://stackoverflow.com/comment/47211646
score: 0
has text: It doesn't matter what the backend is, Ruby or otherwise. The browser submits only the *current* value of each form element at the moment the submit occurs. (If changes made by the user were ignored then that would defeat the whole purpose of having user-enterable forms, wouldn't it?)
comment on: http://stackoverflow.com/q/29528509
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29425746
type: Question
has answer: http://stackoverflow.com/a/29439379
downvote count: 0
tagged with: javascript
answer count: 1
score: 7
favorite count: 0
accepted answer: http://stackoverflow.com/a/29439379
has body: I have a Bookshelf.js model. I want to be able to set and get attributes for this model that are not persistent in the database. For instance lets say I have a model that looks like this: var Domain = bookshelf.Model.extend({ tableName: 'domains', initialize: function() { this.on('creating', this.setDomainName); }, setDomainName: function() { this.set('name', getDomainFromUrl(this.url)); } }); With a schema that looks like this: knex.schema.createTable('domains', function (table) { table.increments().index(); table.text('name').index(); table.timestamps(); }); I want to be able to save an attribute called url, then later parse the url into a domain before it saves. When I try something like this: new Domain({url: 'http://someurl.com/foo/bar'}).save() I get the error message: "column \"url\" of relation \"domains\" does not exist" I've looked and looked. I cant find any way to add non-persistent attributes to a bookshelf.js model. I also couldn't find anything about adding custom getter and setter methods to a bookshelf.js model. Any help or insight is appreciated!
tagged with: node.js
type: AnsweredQuestion
tagged with: bookshelf.js
upvote count: 7
has title: Bookshelf.js set attribute not in database

http://stackoverflow.com/comment/47036772
comment on: http://stackoverflow.com/a/29433456
type: Comment
has text: Yep, that would make sense. Thanks for elaborating on that CJ Wurtz.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47180482
has text: On a second look, the API is only available for packaged apps, so it still doesn't fit my needs. Oh well.
type: Comment
comment on: http://stackoverflow.com/a/29510952
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47184360
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29509198
has text: Please see ["Should questions include “tags” in their titles?"](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles), where the consensus is "no, they should not"!

http://stackoverflow.com/comment/47152566
type: QuestionComment
comment on: http://stackoverflow.com/q/29496770
has text: That is not allowed by Facebook Platform Policy
score: 0
type: Comment

http://stackoverflow.com/comment/47092355
comment on: http://stackoverflow.com/q/29464663
type: QuestionComment
type: Comment
score: 1
has text: If you would format your code correctly, you would probably be able to solve the issue yourself, or at the very least make it easier for others to help you.

http://stackoverflow.com/q/29459055
tagged with: javascript
has answer: http://stackoverflow.com/a/29459204
score: 0
answer count: 1
tagged with: reset
has body: I'm building a simple tic-tac-toe game and I need some help with my reset button and winner function. At the end of provided snippet I'm trying to implement a reset button, but I'm not exactly sure how to get it to work. The way I'm doing my else statement for my winner function is so, that if there are no more moves, I can't seem to get it to say: "no more moves" without it saying it every time you click on a square. How can I implement this? // IIFE (function() { angular .module("myApp", []) .controller("tictactoeController", tictactoeController); // Controller function tictactoeController() { // Capture Variable var self = this; self.currentTurn = ''; self.playerOne = 'X'; self.playerTwo = 'O'; self.winner = ''; // Gameboard self.boxes = [ {square: 1}, {square: 2}, {square: 3}, {square: 4}, {square: 5}, {square: 6}, {square: 7}, {square: 8}, {square: 9} ]; // Picks Random Player To Be X or O self.random = function() { if (Math.random() &gt; 0.5) { alert("Player One GO!"); self.currentTurn = "X"; } else { alert("Player Two GO!"); self.currentTurn = "O"; } }; self.random(); // Clickbox Function self.clickbox = function($index) { //console.log(self.boxes[$index].value + "check"); if (self.boxes[$index].value === undefined) { self.boxes[$index].value = self.currentTurn; self.boxes[$index].square = self.currentTurn; if (self.currentTurn === "X") { self.currentTurn = "O"; } else { self.currentTurn = "X"; } } else { alert( "Already Taken! Choose Another Square!" ); } // Check for winner after each click self.winner(self.boxes[$index].value); }; // Winner Fucntion self.winner = function(input) { // Row Wins if ((self.boxes[0].square == input &amp;&amp; self.boxes[ 1].square == input &amp;&amp; self.boxes[2] .square == input) || (self.boxes[3].square == input &amp;&amp; self.boxes[4].square == input &amp;&amp; self.boxes[5].square == input) || (self .boxes[6].square == input &amp;&amp; self.boxes[ 7].square == input &amp;&amp; self.boxes[8] .square == input)) { alert(inpu…
tagged with: angularjs
type: UnansweredQuestion
has title: Reset for game and winner issue
type: Question

http://stackoverflow.com/comment/47141408
score: 1
has text: I've been looking for the reason of the problem, the browser (Firefox in my case) does not handle disable-output-escaping. It simply ignores it. http://stackoverflow.com/questions/1137241/why-is-the-xslt-disable-output-escaping-not-implemented-in-firefox As a result, &amp;agrave; is shown always &agrave;
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29490037

http://stackoverflow.com/q/29448437
has title: Stopping JS in IE
tagged with: cross-browser
has comment: http://stackoverflow.com/comment/47063265
type: Question
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/29448513
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47083551
answer count: 1
has comment: http://stackoverflow.com/comment/47085083
has body: How can i stop the following script from running in IE8/9? For some reason sometimes the sections are fading in and sometimes not so i'd prefer to just turn it off in IE8/9. $(document).ready(function() { /* Every time the window is scrolled ... */ $(window).scroll( function(){ /* Check the location of each desired element */ $('.hideme').each( function(i){ var bottom_of_object = $(this).position().top + $(this).outerHeight(); var bottom_of_window = $(window).scrollTop() + $(window).height(); /* If the object is completely visible in the window, fade it it */ if( bottom_of_window &gt; bottom_of_object ){ $(this).animate({'opacity':'1'},1500); } }); }); });
type: UnansweredQuestion

youtube-javascript-api
type: Tag
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/29504840
tags question: http://stackoverflow.com/q/29392148

http://stackoverflow.com/comment/46964911
comment on: http://stackoverflow.com/q/29389151
has text: You can edit the question appropriately.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29463131
tagged with: javascript
possible better answer: http://stackoverflow.com/a/37403713
tagged with: google-maps-api-3
answer count: 3
has answer: http://stackoverflow.com/a/29463348
linked to: http://stackoverflow.com/q/13278368
has body: I'm using Google Maps JavaScript API v3 to generate a map with multiple locations/markers. I only have the address for these locations, not the coordinates, so I'm using the Geocoding API to get the coordinates. I finally got Google's geocoding to work, so the location markers are showing up where they are supposed to be. However, the same content is showing up in every InfoWindow. I seem to be unable to pass the location arrays into the geocode function. (Incidentally, I also tried creating a variable for the geocode results and moving the infoWindow function outside of the geocode function, but I couldn't make that work either.) I've tried this a hundred different ways already. I hoping someone else will see what I haven't been able to see. var locations = [ ['Location 1 Name', 'Location 1 Address', 'Location 1 URL'], ['Location 2 Name', 'Location 2 Address', 'Location 2 URL'], ['Location 3 Name', 'Location 3 Address', 'Location 3 URL'] ]; geocoder = new google.maps.Geocoder(); for (i = 0; i < locations.length; i++) { title = locations[i][0]; address = locations[i][1]; url = locations[i][2]; geocoder.geocode({ 'address' : locations[i][1] }, function(results, status) { marker = new google.maps.Marker({ icon: 'marker_blue.png', map: map, position: results[0].geometry.location, title: title, animation: google.maps.Animation.DROP, address: address, url: url }) infoWindow(marker, map, title, address, url); }) } function infoWindow(marker, map, title, address, url) { google.maps.event.addListener(marker, 'click', function() { var html = " " + title + " " + address + " View location "; iw = new google.maps.InfoWindow({ content : html, maxWidth : 350}); iw.open(map,marker); }); }
accepted answer: http://stackoverflow.com/a/29463348
has answer: http://stackoverflow.com/a/64394408
favorite count: 0
score: 6
has answer: http://stackoverflow.com/a/37403713
type: AnsweredQuestion
has title: Mapping multiple locations with Google Maps JavaScript API v3 and Geocoding API
upvote count: 7
downvote count: 1
type: Question
tagged with: google-geocoding-api
tagged with: google-maps
tagged with: google-geocoder

http://stackoverflow.com/comment/46970927
type: Comment
type: QuestionComment
has text: Using string concatenation. `$img = " ";`
comment on: http://stackoverflow.com/q/29397308
score: 0

http://stackoverflow.com/q/29385121
tagged with: percentage
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29385213
has answer: http://stackoverflow.com/a/29385213
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29385160
tagged with: jquery
has body: My complete example is here in JSFIDDLE I have a HTML table with few values in it. I want to find the Percentage in each tr based on the td values in it and have to append the resulted value at the end of each tr. My jQuery code $('tr').each (function() { var frstCol = $(this).find('.combat').text(); var seCol = $(this).find('.ac_yeild').text(); var result = parseInt(frstCol) * 100 / parseInt(seCol); console.log(result); $('.res').text(result); }); How do i calculate the percentage for first and second column and put it back in my result column for each tr?
has title: calculate the percentage between two numbers inside HTML table TD
accepted answer: http://stackoverflow.com/a/29385160
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 1
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/5799055

http://stackoverflow.com/a/29374197
downvote count: 0
score: 3
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/46929097
has comment: http://stackoverflow.com/comment/46929058
has body: You can typically do that by: db.Jobs.Where(x=&gt;x.Status=="high").Count() Assuming Model is a list of Jobs: @Model.Where(x=&gt;x.Status=="high").Count()
accepted answer of: http://stackoverflow.com/q/29374149
answers question: http://stackoverflow.com/q/29374149
type: AcceptedAnswer

simplex
tags question: http://stackoverflow.com/q/29413453
type: Tag
tag name: simplex

http://stackoverflow.com/comment/47056255
type: Comment
comment on: http://stackoverflow.com/q/29444379
has text: @ShaunakD I have a js files, i didn't have js link.. may i know, how to add link ? thanks
score: 0
type: QuestionComment

http://stackoverflow.com/q/29458262
accepted answer: http://stackoverflow.com/a/29458290
has body: My code would pretty much speak for itself about what I'm about to achieve but just to clarify... I want to return an the input value after long press (mousedown for 200ms). It's working perfectly outside the for loop but inside the the loop it seems like not. For this.value it returned undefined and for gangina[i].value it returned nothing. Here is the jsFiddle: http://jsfiddle.net/hezi_gangina/nxao19oc/ Here is my code : &lt;input type=button value=1&gt; &lt;input type=button value=2&gt; &lt;script&gt; var hezi; var gangina=document.getElementsByTagName("input"); alert(gangina[1].value); //THIS IS OK! :) for(i=0;i&lt;gangina.length;i++) { gangina[i].onmousedown=function() { hezi=setTimeout ( function() { alert('this = '+this.value); // = undefined alert('gangina['+i+'] = '+gangina[i].value); // = nothing },200 ); } } &lt;/script&gt; Small tweak needed here...
tagged with: this
tagged with: arrays
answer count: 1
tagged with: javascript
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47080676
upvote count: 2
has answer: http://stackoverflow.com/a/29458290
downvote count: 1
linked to: http://stackoverflow.com/q/750486
type: Question
type: AnsweredQuestion
has title: Javascript:: this.value is not working properly inside for loop?
tagged with: settimeout
duplicate of: http://stackoverflow.com/q/750486
tagged with: onmousedown

http://stackoverflow.com/q/29513044
has comment: http://stackoverflow.com/comment/47187603
type: Question
has comment: http://stackoverflow.com/comment/47182348
downvote count: 0
tagged with: ios
tagged with: javascript
has comment: http://stackoverflow.com/comment/47183399
has body: I'm developing an Android/iOS mobile application using cordova/phonegap. When my app is ready, It's going to create, if needed, the database (DB) using Web SQL. After creation, I'm going to make a DB query to know whether a user already exists in DB or not. Depending on query result, I will either show a form to user or simply present a welcome message. DB Initialization code (when application is ready): app.db.transaction(app.initDB, app.dbError, app.queryUser); If previous code runs ok, the funcion app.queryUser gets executed: app.queryUser = function(tx){ tx.executeSql('SELECT name, mail from User', [], app.renderUserData, app.dbQueryError); } And my function app.renderUserData: app.renderUserData = function(tx, results){ if(results.rows.length &lt; 1) { console.log("You have NO data!"); inputUserData(); } else { console.log("You have data!"); showUserData(results.rows.item(0).name, results.rows.item(0).mail); } } Inside this function, depending on whether user has associated data or not on DB, I'm going to call one of two functions that injects some HTML DOM on the page. In the middle of any of these functions - inputUserData() or showUserData() - sometimes (seems like it's random) the code just stops executing, and calls the error callback function app.dbError() (from my app.db.transaction call) gets called with following message: "the statement callback raised an exception or statement errorcallback did not return false" And it just happens while I'm testing this on my Android phone, because when using the app on Chrome dev tools, or using Apache Ripple the app does what it's supposed to do. If someone needs more info about the code, etc, just ask.. Thanks in advance for the help. EDIT There is app.dbQueryError() app.dbQueryError= function(err){ console.log("QUERY ERROR: " + err.message + "\nCode=" + err.code); }
has comment: http://stackoverflow.com/comment/47182720
has comment: http://stackoverflow.com/comment/47183234
tagged with: android
favorite count: 0
tagged with: cordova
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/47182929
has comment: http://stackoverflow.com/comment/47187579
has title: Phonegap/Cordova query Web SQL Database
has comment: http://stackoverflow.com/comment/47183315
score: 1
has comment: http://stackoverflow.com/comment/47182984

http://stackoverflow.com/a/29497886
accepted answer of: http://stackoverflow.com/q/29387950
answers question: http://stackoverflow.com/q/29387950
has body: In a web browser(Chrome), declaring the variable i outside of any function scope makes it global and therefore binds to window object. As a result, running this code in a web browser requires repeatedly resolving the property within the heavily populated window namespace in each iteration of the for loop. In Node.js however, declaring any variable outside of any function’s scope binds it only to the module scope (not the window object) which therefore makes it much easier and faster to resolve. We will get more or less same execution speed when we wrap the above code in function.
type: AcceptedAnswer
downvote count: 0
upvote count: 30
type: Answer
has comment: http://stackoverflow.com/comment/94205486
score: 30

http://stackoverflow.com/comment/46978129
type: Comment
comment on: http://stackoverflow.com/q/29401160
type: QuestionComment
score: 0
has text: Or you can try the `map` function.

http://stackoverflow.com/q/29518325
has body: I'm using angular google maps and I'm trying to use the cluster feature but it's not working, maybe some of u could give me a hint. Here is a fiddle working but its with the default google cluster image (yellow, blue n red cluster), u can see 3 markers, if u reduces the zoom u will see the cluster. http://jsfiddle.net/5ya0svjs/11/ $scope.clusterOpt = { calculator: function(){ return { index: 1 , text: "HERE DUDE, CAN U SEE?", title:"Please help me guys"}; }, styles: [ { url: "mypath/anyImage.png", width: 63 } ], averageCenter: true }; I wanna customize it, so I've added the calculator function to return one of my own images based on how much markers is on the cluster. But when I do it the cluster is been on top of the map, not where it should be, I tried to set the avarege property and the anchor property but both is useless to solve this bug. In this fiddle u can see the calculator function, returning always 1 for the styles array with only 1 makericoncluster (to be specific with the bug). When you reduces the zoom u will not see the cluster where it should be, but u will see it on top of the map, I didnt put an image too, I only write a text "Here dude...") (to be specific with the bug). Could someone help me? (if u click on the marker, that is only a "here dude, can u see?" u will be placed where markers are) This is my Fiddle
has title: How can I change cluster icon on angular google maps?
has answer: http://stackoverflow.com/a/29527861
has comment: http://stackoverflow.com/comment/47196737
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/29566931
linked to: http://stackoverflow.com/q/22047466
type: Question
tagged with: angular-google-maps
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/29527861
downvote count: 0
tagged with: javascript
answer count: 1
favorite count: 0
tagged with: angularjs
upvote count: 2

http://stackoverflow.com/q/29472397
has title: HTML Form isn't submitting. Using Material Desing and Javascript
type: Question
has comment: http://stackoverflow.com/comment/47107430
has body: I have this form which I can't make submit. Enviar Since I'm using a < div > as a button I use this Javascript code to submit it function submitForm() { alert("hue"); if(document.getElementById('MessageTextArea').value == "") return false; else document.getElementById('MessageSend').submit(); } And the weird part is that even the alert() isn't showing up. I was using a normal button before this material design one and It wasn't working either EDIT: I gave up on using form. I'll use AJAX instead. Thanks for the help
tagged with: javascript
has answer: http://stackoverflow.com/a/29472546
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/47106063
possible better answer: http://stackoverflow.com/a/29472546
has answer: http://stackoverflow.com/a/29473135
accepted answer: http://stackoverflow.com/a/29473135
has comment: http://stackoverflow.com/comment/47106147
has comment: http://stackoverflow.com/comment/47107349
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47106260
linked to: http://stackoverflow.com/q/29471074
tagged with: forms

http://stackoverflow.com/a/29466619
has comment: http://stackoverflow.com/comment/47101920
has body: This one looks a little simplified var renderField = function (field, options) { var out = ''; var value = field.value || ''; var cls = ''; if(field.required){ cls = 'required'; }else if(field.readonly){ cls = 'readonly'; } switch (field.type) { case 'options': out = renderOptions(field.value, field.values[0].value, field); break; case 'text': out = '&lt;input type="text" class="form-control" value="' + value + '"" ' + renderFieldMetaData(field, null, options) + ' class="span8" '+cls+'&gt;'; break; case 'text-area': out = '&lt;textarea row="3" ' + renderFieldMetaData(field, null, options) + ' class="width-full" '+cls+'&gt;' + value + '&lt;/textarea&gt;'; break; case 'file': out = '&lt;input type="file" value="' + value + '" ' + renderFieldMetaData(field, null, options) + ' '+cls+'&gt;'; break; default: out = 'Normal Field' + field.type + ''; break; } return '&lt;div class="custom-form-right col-lg-10 col-md-10 col-sm-12 col-xs-12"&gt;'+out+'&lt;/div&gt;'; };
has comment: http://stackoverflow.com/comment/47102500
score: 0
has comment: http://stackoverflow.com/comment/47099342
answers question: http://stackoverflow.com/q/29465778
has comment: http://stackoverflow.com/comment/47102052
type: Answer

http://stackoverflow.com/a/29413408
type: Answer
answers question: http://stackoverflow.com/q/29413330
has body: You refer in your code to DOM elements, but they are not ready yet. Put all your &lt;script&gt; tags just before closing &lt;/body&gt; tag.
score: 0

http://stackoverflow.com/comment/47185205
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29514802
has text: 2 more issues: 1. you nest a form directly after a list. 2. You are using a submit button inside a repeat (which would submit the whole form. These -probably- won't break anything, it's just terrible HTML.
score: 2

http://stackoverflow.com/comment/47161857
comment on: http://stackoverflow.com/a/29501430
score: 0
type: AnswerComment
type: Comment
has text: Does setting lastIndex to zero is a bad practice? since match dosen't return the matches grouped it returns only ['Yosi 1']?

http://stackoverflow.com/a/29413424
upvote count: 1
answers question: http://stackoverflow.com/q/29413047
has comment: http://stackoverflow.com/comment/46999661
type: Answer
has comment: http://stackoverflow.com/comment/47174980
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47002049
has body: Do you need to directly call JavaScript from a bean? RichFaces components have @oncomplete, it lets you set code to be executed when the request comes back from the server.
has comment: http://stackoverflow.com/comment/47002421

http://stackoverflow.com/comment/47013966
type: Comment
score: 2
has text: So, I must check one by one. I prefer to use fully supported elements, but I have a great client that loves to "push" the balls. Testing some elements in the site you have mentioned, seems that modernizr is not as necessary as a couple of years ago. Many thanks.
comment on: http://stackoverflow.com/a/29420411
type: AnswerComment

http://stackoverflow.com/comment/47098829
has text: When i'm installing mongodb then return error " mongodb-3.0.1 already installed, it's just not linked " and when I'm connect mongodb then return this error "-bash: mongod: command not found".
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29467971
score: 0

http://stackoverflow.com/comment/46964749
has text: @Jordy is correct, see [this](http://datatables.net/reference/api/%24()) for an explanation
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29393945
type: Comment

http://stackoverflow.com/comment/47086529
type: QuestionComment
has text: the server application is coded in php, asp? if you render the file using header('Content-type: application/pdf'); the file will be automatically view by the default browser pdf viewer
score: 0
comment on: http://stackoverflow.com/q/29460499
type: Comment

http://stackoverflow.com/comment/46951262
score: 0
type: AnswerComment
has text: No I can't, it's not online. It's on a local website :/
comment on: http://stackoverflow.com/a/29385346
type: Comment

http://stackoverflow.com/q/29466417
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47095543
has comment: http://stackoverflow.com/comment/47096581
has title: Scroll to top jQuery in Rails 4 app
has answer: http://stackoverflow.com/a/29472293
tagged with: css
has comment: http://stackoverflow.com/comment/47097401
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47096844
upvote count: 1
tagged with: ruby-on-rails
has body: I've followed various tutorials on creating a fadeIn/Out jQuery scrollTo function. But there seems to be some conflict with the css display:none, as it's not showing on the page, if i remove the css display:none it shows the div, but obviously the fadeIn/Out does not work. application.js //= require jquery //= require jquery.turbolinks //= require jquery_ujs //= require_tree . //Check to see if the window is top if not then display button $(window).scroll(function(){ if ($(this).scrollTop() > 600) { $(".scrollToTop").fadeIn(1000) } else { $(".scrollToTop").fadeOut(1000); } }); //Click event to scroll to top $(".scrollToTop").click(function(){ $('html, body').animate({scrollTop : 0},500); return false; }); Other js code which works $(window).scroll(function() { if ($(".navbar").offset().top > 50) { $(".navbar-fixed-top").addClass("top-nav-collapse"); $(".navbar-transparent").addClass("navbar-color"); $(".navbar-nav").addClass("navbar-nav-dark"); $(".logo_dark").show(); return $(".logo_light").hide(); } else { $(".navbar-fixed-top").removeClass("top-nav-collapse"); $(".navbar-transparent").removeClass("navbar-color"); $(".navbar-nav").removeClass("navbar-nav-dark"); $(".logo_light").show(); return $(".logo_dark").hide(); } }); CSS .scrollToTop { margin: 0; position: fixed; bottom: 8.5%; right: 0; z-index: 100; display: none; text-decoration: none; color: #ffffff; background-color: rgba(100, 193, 151, .7); padding: 10px 20px 10px 10px; font-size: 12px; } .scrollToTop:hover { background-color: rgba(100, 193, 151, 1); color: #ffffff; text-decoration: none; } HTML Back to top
type: Question
accepted answer: http://stackoverflow.com/a/29472293
score: 1
has comment: http://stackoverflow.com/comment/47096552
tagged with: ruby-on-rails-4
has comment: http://stackoverflow.com/comment/47097495
has comment: http://stackoverflow.com/comment/47096947
has comment: http://stackoverflow.com/comment/47097592
answer count: 1
downvote count: 0

http://stackoverflow.com/q/29420073
has title: Highchart - Displaying the last yaxis value in the guage
type: Question
tagged with: highcharts
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has body: Here is the guage chart i have, the way it displays - Here is the jsfiddle http://jsfiddle.net/fwxbfu1u/11/ The range is from 0 to 550, the tick interval is 100, how do it get it to show the max value "550"? as the last tick?. Although it does not fall into the interval of the tick interval. - http://jsfiddle.net/fwxbfu1u/11/ Just the yaxis code here, so that it allows me to add the jsfiddle link - yAxis: [{ lineWidth: 0, min: 0, max: 550, tickInterval: 100, tickPosition: 'outside', minorTickPosition: 'outside', tickLength: 15, minorTickLength: 0, labels: { distance: 25, }, offset: 5, endOnTick: false, title: { y: -70 },
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29429319

http://stackoverflow.com/a/29450246
has body: Ok, I am far from sure of myself on this one. I came up with a solution which I think does what you want, but I am not happy with how 'hacky' it looks. The following seems to be ok for me at the command line. From what I understand of the JQuery clock you use, you should be able to use to value show in the console log (basically the local unix time plus the zone offset, which is negative in this case): var moment = require( 'moment-timezone' ), nytz = moment.tz( "America/New_York" ), asstring = nytz.format(), asunixtime = parseInt( nytz.format( 'X' ) ), offset = moment.parseZone( asstring ).utcOffset(); console.log( asunixtime + offset ); Way too hacky to be a valid answer, I am afraid, but I am stumped to do it properly with moment API. One last thing: if you run in a browser make sure you have the timezone data (see here). Hope it helps a bit.
has comment: http://stackoverflow.com/comment/47068667
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29449036

http://stackoverflow.com/a/29494190
type: Answer
answers question: http://stackoverflow.com/q/29492934
has body: String.fromCharCode and event.keyCode are different. String.fromCharCode expect Unicode codes as parameters and then return the character associated to them. event.keyCode in keydown events implementation is a bit confusing, they return the code of the key being pressed and not of the character printed. However using it in keypress events will return the expected values and the correct ones to be used in String.fromCharCode. function f(e){ document.querySelector('div').innerHTML += e.type + ' - ' + e.keyCode + ' - ' + String.fromCharCode(e.keyCode) + '&lt;br/&gt;'; } document.querySelector('input').addEventListener('keydown', f); document.querySelector('input').addEventListener('keypress', f); &lt;input /&gt; &lt;div&gt;&lt;/div&gt;
upvote count: 3
score: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29492934

http://stackoverflow.com/comment/46977888
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29401020
has text: @JAL can you please elaborate?
score: 0

http://stackoverflow.com/comment/47022924
comment on: http://stackoverflow.com/q/29425820
has text: What about 1. `JSON.stringify` 2. `array.prototype.slice`
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29488208
tagged with: android
favorite count: 0
downvote count: 0
type: UnansweredQuestion
tagged with: webview
tagged with: text
has comment: http://stackoverflow.com/comment/47182134
score: 1
has body: I'm having problems replacing some html text in an Android WebView. I have a HTML template that I load inside a WebView and after the template is fully loaded to the WebView I need to replace an < h5> header with a String but when I do this I got the whole template replaced with the String. I'm doing this with JavaScript, any tip about this will be helpful. Thanx in advance. alberut. Here is my html template inside assets folder: ...header... ...description... And here is my code inside a Fragment: private static final String URL2 = "file:///android_asset/product_template.html"; private WebView myWebView2; myWebView2 = (WebView) getView().findViewById( R.id.webViewArticuloDetalle); myWebView2.getSettings().setJavaScriptEnabled(true); myWebView2.setWebChromeClient(new WebChromeClient()); myWebView2.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { String textToChange = "NEW TEXT"; String javaScript = "javascript: var element = document.getElementById('REPLACE_TITLE');" + "element.innerHTML = '" + textToChange + "';"; view.loadUrl(javaScript); } }); myWebView2.loadUrl(URL2);
tagged with: replace
type: Question
has comment: http://stackoverflow.com/comment/47139809
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/47174754
has title: Replacing html text on an Android WebView template with JavaScript
has answer: http://stackoverflow.com/a/69714276
has comment: http://stackoverflow.com/comment/47135626
upvote count: 1

http://stackoverflow.com/q/29415006
linked to: http://stackoverflow.com/q/6965107
type: AnsweredQuestion
tagged with: blob
downvote count: 0
has comment: http://stackoverflow.com/comment/47202133
type: Question
answer count: 2
tagged with: websocket
upvote count: 6
tagged with: javascript
has answer: http://stackoverflow.com/a/44837971
has comment: http://stackoverflow.com/comment/47198291
favorite count: 0
accepted answer: http://stackoverflow.com/a/29525316
has title: nodejs binary websocket mimetype handling
has comment: http://stackoverflow.com/comment/47199776
tagged with: node.js
has comment: http://stackoverflow.com/comment/47197310
has answer: http://stackoverflow.com/a/29525316
has body: I'm not 100% sure but from what I read when I send a blob (binary data) over websocket, the blob does not contain any file information. (Also the official specification states that wesockets only send the raw binary) the filesize the mimetype user info (explain later) I'm using https://github.com/websockets/ws Testing: Sending directly the blob from an input file. ws.send(this.files[0]) //this should already contain the info Creating a new blob with the native JavaScript API from file setting the proper mimetype. ws.send(new Blob([this.files[0]],{type:this.files[0].type})); //also this on both sides you can get only the effective blob without any other information. Is it possible to append let's say a 4kb predefined JSON data converted also to binary that contains important information like the mimetype and the filesize, and then just split off the 4kb when needed? {"mime":"txt/plain","size":345}____________4KB_REST_OF_THE_BINARY OR ws.send({"mime":"txt\/plain","size":345}) ws.send(this.files[0]) Even if the first one is the worst solution ever it would allow me to send everything at one time. The second one has a big problem: it's a chat that allows to send also files like documents, images, music videos. I could write some sort of handshaking system when sending the file/user info before I send the binary data. BUT if another person sends also a file, as it's async, the handshaking system has no chance to determine which file is the right one for the correct user and mimetype. So how do you properly send a binary file in a multiuser async environment? I know I can convert to base64 but that's 30% bigger. btw. Totally disappointed with Apple... while Chrome shows every binary data properly, my iOS devices are not able to handle blob's, only images will show in blob or base64 format, not even a simple txt file. Basically only a tag can read dynamic files. How everything works (now): user sends a file nodejs gets the binary data, also user info... but not mimetype, f…
tagged with: binary
linked to: http://stackoverflow.com/q/8609289
score: 6
possible better answer: http://stackoverflow.com/a/44837971

http://stackoverflow.com/q/29395493
tagged with: visual-studio-2010
type: Question
tagged with: debugging
has body: When I debug my ASP.NET 4.0 application and it hits the debugger; javascript statement it wants to debug that with a new instance of VS2010 An unhandled exception ('Script Breakpoint') occured in iexplore.exe How can I make it use the VS2010 that is already open? I enabled Script debugging in IE11. Also I enabled Script debugging in VS2010 -Tools - Options - Debugging - 'Just in Time' Also this worked until recently.
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29605659
answer count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29605659
has title: VS2010 javascript debugger wants to launch in new instance of VS2010

http://stackoverflow.com/a/29484777
type: Answer
downvote count: 0
score: 6
has body: Looks like there are some typos in your code - the ease belongs inside the vars object: tl.to(DOM_ELEMENT_TOP, 1, {left:100, ease:Linear.easeIn}); tl.to(DOM_ELEMENT_BOTTOM, 1, {top:100, ease:Linear.easeIn}); And then if you want to revert things to where they started, you can simply jump to the beginning like: tl.pause(0); Or, if you want to literally clear the top/left property from the inline CSS, you can do: TweenLite.set(DOM_ELEMENT_TOP, {clearProps:"left"}); TweenLite.set(DOM_ELEMENT_BOTTOM, {clearProps:"top"});
upvote count: 6
answers question: http://stackoverflow.com/q/29470854
accepted answer of: http://stackoverflow.com/q/29470854
type: AcceptedAnswer

http://stackoverflow.com/a/29443357
has comment: http://stackoverflow.com/comment/47054463
has comment: http://stackoverflow.com/comment/47054861
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47054507
type: Answer
has comment: http://stackoverflow.com/comment/47054558
has comment: http://stackoverflow.com/comment/47054745
has body: To avoid copying over all the properties from prop, you can set prop as the prototype of inst. Since inst is a function (not an ordinary object), you have no control of its constructor (it has to be Function), so the only way to change its prototype is via the internal __proto__ property. The immediate drawback is, you lose access to all methods of a function, e.g. you cannot call x.call(). But you can solve it by chaining Function.prototype to prop. See the code below. var Functor = function(f, prop) { var inst = function() { return inst.__op__.apply(this, arguments) } // Setup prototype chain: inst -&gt; prop -&gt; Function.prototype prop.__proto__ = inst.__proto__ inst.__proto__ = prop inst.__op__ = f return inst } !function() { var x = Functor(null, {qwe:123}) console.log(x.qwe) // 123 // Method 1: bind the context to __op__ x.__op__ = console.log.bind(console) x(321) // 321 // Method 2: call x with the context x.__op__ = console.log x.call(console, 321) // 321 }() As for the use of this, you are already correctly passing on the context to __op__ at inst via Function.prototype.apply. The way to pass on a context is via calling x with a context (Method 2), or the more clumsy console.x = x; console.x(321). If you don't want to do this, you can always bind the context into __op__ (Method 1). Keep in mind that when a function is executed, it needs both the context (this) and the arguments. The context is either permanently bound to the function (Method 1) or supplied in situ (Method 2).
has comment: http://stackoverflow.com/comment/47054492
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29443180
has comment: http://stackoverflow.com/comment/47054645
has comment: http://stackoverflow.com/comment/47055555
answers question: http://stackoverflow.com/q/29443180
has comment: http://stackoverflow.com/comment/47054544
has comment: http://stackoverflow.com/comment/47054584
has comment: http://stackoverflow.com/comment/47054425
score: 1

http://stackoverflow.com/comment/47142834
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29491673
type: Comment
has text: Oh yes sorry. Are having any console error or something? Thats odd. It should work. Maybe when you try to re call the tooltip the footer is not loaded yet. Try set a time out to see if theres a problem.

http://stackoverflow.com/q/29411354
answer count: 1
tagged with: multidimensional-array
linked to: http://stackoverflow.com/q/3059044
has body: I have been playing around with the Google Maps Javascript API v3 and trying to get it to display icons based on a multidimensional array. Everything is fine until I try and define the icon relative to 'i' from the for loop, I think I'm making a simple mistake. The code below displays gives the error: Uncaught TypeError: Cannot read property '2' of undefined function initialize() { var map; var myOptions = { zoom: 14, center: new google.maps.LatLng(53.382971,-1.4702737), mapTypeId: 'roadmap', panControl: false, streetViewControl: false, mapTypeControl: false, zoomControl: false }; map = new google.maps.Map($('#map_canvas')[0], myOptions); var addresses = [ ["S1 4EJ", "Available", "/img/green-marker.png"], ["S1 4QW", "Available", "/img/green-marker.png"], ["S1 2HE", "Let Agreed", "/img/red-marker.png"] ]; for (var i = 0; i &lt; addresses.length; i++) { console.log(i); $.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address='+addresses[i][0]+'&amp;sensor=false', null, function (data) { var p = data.results[0].geometry.location var latlng = new google.maps.LatLng(p.lat, p.lng); console.log(i); new google.maps.Marker({ position: latlng, map: map, icon: { url: addresses[i][2], size: new google.maps.Size(50, 50), origin: new google.maps.Point(0,0), anchor: new google.maps.Point(25, 50) } }); }); } }; google.maps.event.addDomListener(window, "load", initialize); The second console.log(addresses[i][2]); inside the $.getJSON success function all outputs as '3'. Moving the addresses[i][2] outside of the $.getJSON function but still inside the for loop outputs them all as the last called iteration of 'i', for example: ... for (var i = 0; i &lt; addresses.length; i++) { console.log(i); var image = addresses[i][2]; $.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address='+addresses[i][0]+'&amp;sensor=false', null, function (data) { var p = data.results[0].geometry.location var latlng = new google.maps.LatLng(p.lat, p.lng); console.log(i); new google.maps.…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29413146
type: Question
tagged with: for-loop
accepted answer: http://stackoverflow.com/a/29413146
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/46998037
tagged with: google-maps-api-3
has title: Set google.maps.Marker icon using multidimensional array in for loop
score: 0

http://stackoverflow.com/comment/47208124
type: QuestionComment
has text: Why in the world would you need to do this?
score: 0
comment on: http://stackoverflow.com/q/29526862
type: Comment

http://stackoverflow.com/q/29516208
downvote count: 0
tagged with: chaining
favorite count: 0
type: UnansweredQuestion
tagged with: lodash
tagged with: underscore.js
score: 1
upvote count: 1
has body: Is there any difference in approach of invoking map method from the perspective of which data it will return? I expect that when I do _(object).map(callback); it leads to creating new underscore class instance and returned value is an underscore's wrapper rather than using _.map(obj, callback) utilizes the same (already created) instance of underscore and returns plain JavaScript array as expected
has answer: http://stackoverflow.com/a/29520284
type: Question
has comment: http://stackoverflow.com/comment/47187699
has title: Difference between using _(obj).map(callback) and _.map(obj, callback) in underscore
tagged with: javascript
has answer: http://stackoverflow.com/a/29520852
answer count: 2
tagged with: wrapper

http://stackoverflow.com/q/29528857
has title: HTML5 Page Bottom Stick
tagged with: footer
has answer: http://stackoverflow.com/a/29530209
has comment: http://stackoverflow.com/comment/47212329
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I have a page that I built with HTML. I put a clock on the bottom of the page in a single table cell. I have put things under that table/clock in the HTML file, but they appear above the table/clock. What am I doing wrong? Here is the code: Start Page Search Google Drive t 50 Gmail Jackson 94 John Doe 80 Time
type: UnansweredQuestion
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47212217
score: -1
has comment: http://stackoverflow.com/comment/47212292
has comment: http://stackoverflow.com/comment/47212986
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/29445581
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29445546
answers question: http://stackoverflow.com/q/29445546
type: Answer
has body: Strings don't have pause property, so check '.audioDemo'.pause won't work. You need to check plain HTMLAudioElement object pause property. So with the help of jQuery you select $(".audioDemo") jQuery object collection, and from there you get raw HTML element as the first element of this collection: $('#ocean').click(function () { if ($(".audioDemo")[0].paused == false) { $(".audioDemo").trigger('pause'); } else { $(".audioDemo").trigger('play'); } }); Or a little bit optimized code: $('#ocean').click(function () { var $audioObj = $(".audioDemo"); $audioObj.trigger(!$audioObj[0].paused ? 'pause' : 'play'); }); function stopAudio() { $(".audioDemo").trigger('pause').prop("currentTime", 0); }
has comment: http://stackoverflow.com/comment/47058348
score: 4
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/a/29471549
downvote count: 1
score: 0
has comment: http://stackoverflow.com/comment/47104451
type: Answer
has body: the form elements with multiple selections give the same form name: for example: &lt;input type="checkout" name="language[]" value="english"&gt; &lt;input type="checkout" name="french[]" value="english"&gt; ( the [] will send the information in an array ) you can use serialize() and send it as a post or get method. $("#idForm").submit(function() { var url = "path/to/your/script.php"; // the script where you handle the form input. $.ajax({ type: "POST", url: url, data: $("#idForm").serialize(), // serializes the form's elements. success: function(data) { alert(data); // show response from the php script. } }); return false; // avoid to execute the actual submit of the form. });
has comment: http://stackoverflow.com/comment/47197596
has comment: http://stackoverflow.com/comment/47132208
accepted answer of: http://stackoverflow.com/q/29471482
has comment: http://stackoverflow.com/comment/47312870
answers question: http://stackoverflow.com/q/29471482
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/29469548
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/29469860
upvote count: 3
has comment: http://stackoverflow.com/comment/47100830
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47101760
has body: I have three similar sections. I want to select an element with a given class but only within the scope of the element I clicked. My current code selects all the elements with the same class. If I add an event handler on class mine, and some action needed to be done on target class, only for the inner2 within the scope of class one I clicked, so how do i do it. HTML:
accepted answer: http://stackoverflow.com/a/29469860
has title: Select a child with a given class
tagged with: http://stackoverflow.com/tag/html
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/47100867
possible better answer: http://stackoverflow.com/a/29469624
has answer: http://stackoverflow.com/a/29469923
has answer: http://stackoverflow.com/a/29469867
has answer: http://stackoverflow.com/a/29469624

http://stackoverflow.com/q/29483343
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29484000
upvote count: 1
type: Question
has body: I want to evaluate a condition based upon a link text and show hide a tab depending on what value it returns. HTML: Info Accounts Users Here im trying to check if the 'a' has value 'Accounts', if so hide a div. I tried this: Js: var link = $('a').filter( function () { return $(this).text() =="Accounts"; //will return: [Accounts] }); And in some place where the 'Accounts' link does not exists, it will return: [] Now Im not sure how to check for a condition whether the array is empty or has a value: if (link is empty){ //hide ` Accounts` }else{ //show ` Accounts` } Any ideas how this condition can be evaluated?/ Thanks!
tagged with: javascript
answer count: 3
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/29484000
favorite count: 0
has answer: http://stackoverflow.com/a/29483403
possible better answer: http://stackoverflow.com/a/29483374
has title: How to check if a link has some text and evaluate a condition based upon the value of text- Jquery/JS
has answer: http://stackoverflow.com/a/29483374

http://stackoverflow.com/comment/47204242
has text: that's weird. check if (data == null) after assignment of variable. If null then handle properly.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29522701
type: AnswerComment

http://stackoverflow.com/q/29405664
score: 1
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
tagged with: parse-platform
has body: I'm attempting to create a login flow for Parse using phone number verification. The idea is that users of an iOS app enter their phone number, receive a code via SMS, then enter that code to login. No email/username/password required. The critical piece is getting the session token to then use the become method. Here is my (abbreviated, doesn't include code verification) cloud code: Parse.Cloud.define('signInUser', function(request, response) { Parse.Cloud.useMasterKey(); var phone = request.params.phone; var verificationCode = request.params.verificationCode; var query = new Parse.Query(Parse.User); query.equalTo('phone', phone) query.first().then(function(user) { if (!user) { response.error('User does not exist'); } var token = user.getSessionToken(); console.log("Token: " + token); response.success('Token: ' + token); }) }) token is always returning as undefined. According to the docs, using Parse.Cloud.useMasterKey() should allow me to accomplish what I want to do but it isn't working.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/30539983
has title: User getSessionToken() Returning Undefined
downvote count: 0

http://stackoverflow.com/comment/47135986
type: AnswerComment
has text: A generic answer is hard. You would need to simulate the event on the DOM level instead of using jQuery events. A concrete answer (some specific page) may have a simpler answer.
type: Comment
comment on: http://stackoverflow.com/a/29478154
score: 0

http://stackoverflow.com/q/29523562
tagged with: idioms
possible better answer: http://stackoverflow.com/a/29525836
has answer: http://stackoverflow.com/a/29525836
has title: How does one query a field value in ReactJS?
upvote count: 2
has comment: http://stackoverflow.com/comment/47201849
downvote count: 1
has comment: http://stackoverflow.com/comment/47201699
type: AnsweredQuestion
type: Question
tagged with: reactjs
answer count: 2
has answer: http://stackoverflow.com/a/29524102
has comment: http://stackoverflow.com/comment/47248389
has body: I have code that is at present accessing a React component directly, and getting a warning saying "You probably don't want to do this." The code is: var description = document.getElementById('description').value; console.log(description); new_child.setState({ description: description }); The component it's trying to access is: var that = this; return ( {that.state.children} Save ); What is an idiomatic way to replace the code I have here with a "thinking in React" replacement?
tagged with: javascript
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/29524102
has comment: http://stackoverflow.com/comment/47202531

http://stackoverflow.com/comment/47146456
comment on: http://stackoverflow.com/a/29493371
score: 0
type: AnswerComment
type: Comment
has text: Check your ` ` tag that include angular? Maybe there is 2 of them? or maybe angular is already in a bundle (concat and minified)? If so, try remove one of them? Or do you have a code somewhere that tries to bootstrap angular in script and via ng-app directive? do you have multiple ng-app directive on the page?

http://stackoverflow.com/comment/47101375
has text: No. And I believe that's a good thing. How would any website know where I store the files I want to upload?
type: AnswerComment
comment on: http://stackoverflow.com/a/29467775
score: 3
type: Comment

http://stackoverflow.com/comment/47136054
type: AnswerComment
has text: @AlexMcMillan yep, but then `this.handleChange` will be undefined. Not much difference (if you know how to use debugger).
type: Comment
comment on: http://stackoverflow.com/a/29487967
score: 0

http://stackoverflow.com/q/29482098
has title: Calling a function bypassing eval()
has comment: http://stackoverflow.com/comment/47124803
downvote count: 1
has answer: http://stackoverflow.com/a/29482198
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47125014
type: Question
accepted answer: http://stackoverflow.com/a/29482235
possible better answer: http://stackoverflow.com/a/29482171
tagged with: javascript
has comment: http://stackoverflow.com/comment/47124833
has answer: http://stackoverflow.com/a/29482171
has body: I am working with a Javascript code that uses eval function. eval(myString) The value of myString = myFunc(arg), I want to call myFunc directly without using eval. I dont have any control over the function to call as I am getting that function as a String (here myString). The arguments to that function is also part of the same string. So, is there any way through which I can call the intended function without using eval?
answer count: 3
tagged with: eval
has comment: http://stackoverflow.com/comment/47124918
has comment: http://stackoverflow.com/comment/47124745
favorite count: 0
has answer: http://stackoverflow.com/a/29482235
score: 0
has comment: http://stackoverflow.com/comment/47124752
upvote count: 1

http://stackoverflow.com/comment/46940164
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29377583
score: 0
has text: @BigDaddy: To be honest, I don't know. If I did, I'd post an answers for you...but I do know that falsifying mouse events is not the solution.

http://stackoverflow.com/q/29483396
type: Question
tagged with: reactjs
accepted answer: http://stackoverflow.com/a/29488990
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Using the jQuery UI Timepicker Addon with React
tagged with: jquery-plugins
has answer: http://stackoverflow.com/a/29488990
tagged with: jquery-ui-timepicker
answer count: 1
has body: I am attempting to use the jQuery UI Timepicker Addon in a React component that I am writing. However, whenever I try to use it I get an error that the "datetimepicker" function that the Addon adds to jQuery is not defined. I think part of (or maybe the whole) the problem I am having is that there is no module for this in React, yet I am importing jQuery through React. What I'm trying to do... index.html: If you see this there is a problem with React on the site. As you can see, since the Addon does not currently exist as a React component (at least, I couldn't find it if it does), I manually imported it along with jQuery UI. My component (included on index via a different component): /** @jsx React.DOM */ var React = require('react'); var jQ = require('jquery'); var Time = React.createClass({ componentDidMount: function() { jQ('#startDate').datetimepicker({ timeFormat: "HH:mm:ss", onClose: function() { console.log("Timepicker closed"); } }); }, render: function() { return ( ); } }); module.exports = {Time: Time}; How should I go about including the Timepicker Addon for use in this React component? Side note: I am using the Timepicker in large part because of how well it pop-up over other elements as well as it's inclusion of support for seconds and various time formats. I am using "datetime-local" inputs right now but they just don't really cut it :(
favorite count: 0
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/q/29526281
favorite count: 0
tagged with: backbone.js
tagged with: promise
type: UnansweredQuestion
upvote count: 1
score: 1
linked to: http://stackoverflow.com/q/28131082
type: Question
has answer: http://stackoverflow.com/a/29533998
answer count: 2
has title: How to continue executing JS after deferred.fail()
tagged with: jquery-deferred
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47278498
has answer: http://stackoverflow.com/a/29702334
linked to: http://stackoverflow.com/q/12075074
has body: Here is some code that takes a Backbone model, saves it and then waits for the response and fires the jQuery .done() or .fail() code. This is working fine but on fail we actually want to get the returned message from the service add it to our errors object. This is all within a Backbone validate() function; after this code, we check the errors object and display the message if there is one. It seems like if we .fail(), everything stops executing. We need to continue the validate function. I found this question/answer but it didn't seem to make a difference: Is there a way to continue after one deferred fails? Any way to continue executing code after hitting a deferred.fail()? addressModel.save().done(function() { console.log("promise done"); model.set("...", false); }).fail(function(response) { console.log("promise fail"); if (response.responseJSON &amp;&amp; response.responseJSON._messages) { _.each(response.responseJSON._messages, function(value, key) { errors[key] = value[0]; }); } });

http://stackoverflow.com/a/29451659
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29451559
downvote count: 0
has comment: http://stackoverflow.com/comment/47069097
type: Answer
has body: I see 2 things : you never create li in your js code you got an error in your HTML JS var node = document.getElementById("myList"); // this should be outside the loop for(var index in items) { var li = document.createElement('li'); var textnode = document.createTextNode(index + " : " + items[index]); li.appendChild(textnode); node.appendChild(li); } and suppress document.getElementById('myList').appendChild(node); HTML &lt;ul id="myList"&gt;&lt;/div&gt; should be &lt;ul id="myList"&gt;&lt;/ul&gt;

http://stackoverflow.com/q/29424610
answer count: 3
has title: Alias the AngularJS $scope object in a controller
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29547610
downvote count: 2
possible better answer: http://stackoverflow.com/a/29590425
has answer: http://stackoverflow.com/a/29436391
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29590425
has comment: http://stackoverflow.com/comment/47245352
score: 10
type: Question
has body: Without getting into the details of why, I need to provide an alias for $scope in my controllers. Instead of injecting and decorating $scope I'd like for the users to instead be able to inject view and have it have the same effect. Based on my understanding of angular, $scope is created by a $scopeProvider which is a factory registered at configuration time of the angular app. I'm assuming that I need to register a viewProvider and set it equal to the $scopeProvider but I haven't had luck with what I've been trying. Any ideas? FYI: I'm not looking for something like ['$scope', function(view){..., the ideal solution would work with ['view', function(view){.... The view object would act exactly like $scope, two way binding, etc.
has comment: http://stackoverflow.com/comment/47236233
has comment: http://stackoverflow.com/comment/47237668
upvote count: 12
has comment: http://stackoverflow.com/comment/47025393
has answer: http://stackoverflow.com/a/29547610
tagged with: javascript
has comment: http://stackoverflow.com/comment/47514041

http://stackoverflow.com/a/29459263
has body: It's probably not working because you declare st1 and st2 but then reference them as str1 and str2. Change to... var str1 = "Not"; var str2 = "available"; var tosearch = str1.concat(str2); // The rest of your code... You're also creating the string "Notavailable" which is not what you intend to, I think. Maybe try: var tosearch = str1 + " " + str2; You could do the same thing with even less code like so: if(document.body.innerHTML.toString().indexOf("Not\ available") &gt; -1){ alert("Yes") } else { alert("No") } That being said, it's kind of a mystery to me what you're trying to do with this script. :)
has comment: http://stackoverflow.com/comment/47082685
accepted answer of: http://stackoverflow.com/q/29459232
upvote count: 1
answers question: http://stackoverflow.com/q/29459232
has comment: http://stackoverflow.com/comment/47085537
has comment: http://stackoverflow.com/comment/47082533
score: 1
has comment: http://stackoverflow.com/comment/47082524
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/29443503
has title: Why am I getting an infinite for loop using javascript?
tagged with: javascript
has comment: http://stackoverflow.com/comment/47054667
accepted answer: http://stackoverflow.com/a/29443530
answer count: 1
has comment: http://stackoverflow.com/comment/47054653
has body: I am trying to create a bookshelf with various books. However, when I attempt to make a new bookshelf for every 4 books, I get an error. Possibly an infinite for loop? What is going wrong? (Khan Academy Program) An array of books. var book = [ { title: "The Giver", stars: 4, author: "Lois Lowry",//2.Author property to each book added #1 color: color(0, 120, 42),//3. Property that stores color recommended: true }, { title: "NWT of the Holy Scriptures", stars: 5, author: "Jehovah",//2.Author property... #2 color: color(204, 204, 204),//3. Property that stores color recommended: true }, { title: "The Cay", stars: 4, author: "Theodore Taylor",//2.Author property... #3 color: color(80, 84, 209),//3. Property that stores color recommended: true }, { title: "The Golden Compass", stars: 5, author: "Philip Pullman",//2.Author property... #4 color: color(97, 55, 186),//3. Property that stores color recommended: true }, ]; Draw bookshelves and books for(var x = 0; x &lt; book.length; x++){ //Draw books fill(book[x].color); rect(5 + 100 * x, 20, 90, 100); fill(0, 0, 0); text(book[x].title, 15 + 100 * x, 29, 70, 100); text(book[x].author,35 + 100 * x, 76, 70, 100); //Draw leaf for recommended books if(book[x].recommended === true){ var leaf = getImage("avatars/leaf-red"); image(leaf, 10 + 100 * x, 85,25,25); } //Draw stars for star rating for (var i = 0; i &lt; book[x].stars; i++) { image(getImage("cute/Star"), 17 + i * 15 + 100 * x, 96 , 15, 25); } //Draw bookshelf for every 4 books for(var y = book.length;y &gt;= 0;y - 4){ // draw shelf fill(87, 10, 0); rect(0, 120 + 100 * y, width, 10); }/// &lt;------ infinite loop? }
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29443530
has comment: http://stackoverflow.com/comment/47054742
type: Question
has comment: http://stackoverflow.com/comment/47054668

http://stackoverflow.com/a/32809955
downvote count: 1
answers question: http://stackoverflow.com/q/29374519
score: -1
upvote count: 0
type: Answer
has body: "yield" tag is usefull if we are trying to access the inner text of tag within the HTML code of tag definition. but if we have to acces that text in scri

http://stackoverflow.com/a/44116397
upvote count: 1
score: 1
downvote count: 0
has body: You can use this function, if you want to remove the element (without index) removeItem(item) { this.setState(prevState =&gt; { data: prevState.data.filter(i =&gt; i !== item) }); }
type: Answer
answers question: http://stackoverflow.com/q/29527385

http://stackoverflow.com/q/29500402
possible better answer: http://stackoverflow.com/a/29500491
answer count: 2
has comment: http://stackoverflow.com/comment/47159468
has answer: http://stackoverflow.com/a/29500491
tagged with: function
tagged with: arrays
has body: I am trying to code an if/else statement that writes html to a page depending on what option the randomNumber function generates from the myOptions array. I am not sure how to check the if condition as it always results to the else which writes "You lose!.....". Goal: Options 1 and Options 2 win, Options 3 and Options 4 lose. fiddle it. function randomNumber(range) { return Math.round( Math.random() * range ); } var myOptions = ["Option 1", "Option 2", "Option 3", "Option 4"]; myOptions = myOptions[randomNumber( myOptions.length - 1)]; alert(myOptions); if (myOptions &lt;= 1) { document.getElementById("message").innerHTML = "You win!"; } else { document.getElementById("message").innerHTML = "You lose! " + myOptions + " was your pick"; }
has comment: http://stackoverflow.com/comment/47159427
accepted answer: http://stackoverflow.com/a/29500471
type: AnsweredQuestion
has title: How to check random conditions in if/else statements?
score: 0
has comment: http://stackoverflow.com/comment/47159445
type: Question
tagged with: if-statement
tagged with: javascript
has answer: http://stackoverflow.com/a/29500471

webdriver-io
type: Tag
tag name: webdriver-io
tags question: http://stackoverflow.com/q/29385175

http://stackoverflow.com/q/29448698
tagged with: raspberry-pi
has title: Dynamically create multiple Firebase references using a loop in JavaScript
tagged with: javascript
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29448930
tagged with: firebase
score: 0
has body: I am writing a script that uses Firebase to interact with a dashboard of pin values on my Raspberry Pi. It also allows me to update those pin values via firebase. I've managed to create a dynamic script that works with any given number of pins, but the one part I'm having trouble with is how to dynamically create the actual firebase references themselves. For example; If I want to reference the first 9 pins, I have this in my script to create the 9 references; var myFirebaseRef1 = new Firebase("https://ant-torch-2.firebaseio.com/gpio2/1"); var myFirebaseRef2 = new Firebase("https://ant-torch-2.firebaseio.com/gpio2/2"); var myFirebaseRef3 = new Firebase("https://ant-torch-2.firebaseio.com/gpio2/3"); var myFirebaseRef4 = new Firebase("https://ant-torch-2.firebaseio.com/gpio2/4"); var myFirebaseRef5 = new Firebase("https://ant-torch-2.firebaseio.com/gpio2/5"); var myFirebaseRef6 = new Firebase("https://ant-torch-2.firebaseio.com/gpio2/6"); var myFirebaseRef7 = new Firebase("https://ant-torch-2.firebaseio.com/gpio2/7"); var myFirebaseRef8 = new Firebase("https://ant-torch-2.firebaseio.com/gpio2/8"); var myFirebaseRef9 = new Firebase("https://ant-torch-2.firebaseio.com/gpio2/9"); How can I stick that lot into a loop and avoid having 10 repeated lines? I've tried using the EVAL function, Arrays etc, but none have worked?! I've managed to 'variablize' every aspect of the script bar this bit!
type: Question

http://stackoverflow.com/comment/47165222
score: 0
type: AnswerComment
has text: OK, **But how would it look if I used Javascript?**
type: Comment
comment on: http://stackoverflow.com/a/29503709

http://stackoverflow.com/comment/46992395
score: 0
comment on: http://stackoverflow.com/q/29379901
has text: UPDATE: if controls are enabled in the tag, the video shows. See [Page with controls](http://www.whereintimeisnewman.com) vs. [Page without controls](http://www.whereintimeisnewman.com/temp-index.html). Anyone having a clue?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47021337
score: 1
has text: @jfriend00 - one should be able to overwrite the `scroll` function, even in the global scope, so the functions name probably isn't the real issue, it's probably out of scope, defined inside DOM ready or something, and then because of that `window.scroll` is called instead, and that error comes up because `window.scroll` requires two arguments.
comment on: http://stackoverflow.com/q/29424703
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29425872
answer count: 1
accepted answer: http://stackoverflow.com/a/29426221
tagged with: cordova
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29426221
has title: Make Phone Calls in Phonegap 4
has body: i am trying to make a call from my phonegap app. I was trying to do it by tag, and i had add the CALL_PHONE permission in my manifest. Do i need to make anything else? Thank you in advance!
tagged with: javascript
score: 0
tagged with: android

http://stackoverflow.com/comment/94594080
type: Comment
has text: point 1 is defined by the point coordinates (x1, y1), and point 2 is defined by the point coordinates (x2, y2). Together, point 1 and point 2 can be interpreted as points of a line
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29456539

http://stackoverflow.com/a/29493186
has comment: http://stackoverflow.com/comment/47145945
answers question: http://stackoverflow.com/q/29492928
has comment: http://stackoverflow.com/comment/47145388
score: 0
type: Answer
has body: I don't think you're passing the position variable back to your initialize function. So when it tries to get the latitude and longitude properties it can't because position is undefined. Try changing this navigator.geolocation.getCurrentPosition(initialize); to this navigator.geolocation.getCurrentPosition(function(position) { initialize(position); });

http://stackoverflow.com/comment/47028054
type: Comment
comment on: http://stackoverflow.com/q/29428976
score: 0
has text: No, i've tried window onload and <body onload=, and did not work,
type: QuestionComment

http://stackoverflow.com/comment/47179109
comment on: http://stackoverflow.com/q/29509198
type: Comment
type: QuestionComment
has text: I editted. When I run my project, Javascript function data is not defined @StephenMuecke
score: 0

http://stackoverflow.com/a/29401024
has comment: http://stackoverflow.com/comment/46977841
type: Answer
has comment: http://stackoverflow.com/comment/46977810
score: 3
downvote count: 0
has body: Looks like there are only 2 things that differ, and they are strings. Pass them in as parameters. exports.updateAccount = function(req, res, next, path, message) { //add 2 parameters User.findById(req.user.id, function(err, user) { if (err) { return next(err); } user.email = req.body.email || ''; user.firstname = req.body.firstname || ''; user.lastname = req.body.lastname || ''; user.save(function(err) { if (err) { return next(err); } req.flash('success', { msg: message //message param }); res.redirect(path); //path param }); }); };
has comment: http://stackoverflow.com/comment/46977933
answers question: http://stackoverflow.com/q/29400963
upvote count: 3

http://stackoverflow.com/comment/47141514
type: QuestionComment
comment on: http://stackoverflow.com/q/29491192
score: 0
has text: @huggilou http://www.codeigniter.com/docs new location now.
type: Comment

http://stackoverflow.com/q/29456211
answer count: 4
has answer: http://stackoverflow.com/a/29456221
accepted answer: http://stackoverflow.com/a/29456227
has body: The following code appends text goes here to an input value $('#someid').val($('#someid').val() + 'text goes here'); I'm trying to use variable like below but It isn't working var someText= text goes here; $('#someid').val($('#someid').val() + 'someText'); How can I properly append variable using val() ?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29456221
has title: appending variable to an input value using val()
has comment: http://stackoverflow.com/comment/47076932
type: Question
score: 0
has answer: http://stackoverflow.com/a/29456263
has comment: http://stackoverflow.com/comment/47076935
has answer: http://stackoverflow.com/a/29456273
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29456227

http://stackoverflow.com/a/29479435
upvote count: 107
has body: Is there a method for clearing the .thens of a JavaScript Promise instance? No. Not in ECMAScript 6 at least. Promises (and their then handlers) are uncancellable by default (unfortunately). There is a bit of discussion on es-discuss (e.g. here) about how to do this in the right way, but whatever approach will win it won't land in ES6. The current standpoint is that subclassing will allow to create cancellable promises using your own implementation (not sure how well that'll work). Until the language commitee has figured out the best way (ES7 hopefully?) you can still use userland Promise implementations, many of which feature cancellation. Current discussion is in the https://github.com/domenic/cancelable-promise and https://github.com/bergus/promise-cancellation drafts.
has comment: http://stackoverflow.com/comment/47155002
has comment: http://stackoverflow.com/comment/47154645
score: 107
has comment: http://stackoverflow.com/comment/47154832
accepted answer of: http://stackoverflow.com/q/29478751
answers question: http://stackoverflow.com/q/29478751
has comment: http://stackoverflow.com/comment/69683230
has comment: http://stackoverflow.com/comment/63990544
has comment: http://stackoverflow.com/comment/63991436
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/67688626
type: Answer
has comment: http://stackoverflow.com/comment/47152582

http://stackoverflow.com/a/29493220
has body: Consider using a pub/sub worker queue model where the socket.io server just interacts with clients and persists their data to a database (redis or whatever) and a separate cluster of worker processes pull computation jobs off a queue, calculate the results, and write them back, where the client servers can transfer them out to the clients.
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29493127
answers question: http://stackoverflow.com/q/29493127
type: Answer

http://stackoverflow.com/comment/47086927
has text: SyntaxError: expected expression, got '.' on if($foodcheck).width() > 0) {
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29461434
type: Comment

http://stackoverflow.com/a/29501942
answers question: http://stackoverflow.com/q/29501304
accepted answer of: http://stackoverflow.com/q/29501304
score: 0
type: AcceptedAnswer
type: Answer
has body: Issues: 1- The function is never called 2- The function has a syntax error function phonenumber(inputtxt) { var pattern = "/^\d{10}$/", phoneno = new RegExp(pattern); if (inputtxt) { if(inputtxt.match(phoneno)) { return true; } else { alert("message"); return false; } } } //Using jQuery for DOM manipulation you can execute the function on validate button click $('#valButton').on('click', function () { var phoneInputValue = $('#phoneno').val(); phonenumber(phoneInputValue); }); Checkout fixed code here: https://jsfiddle.net/au7aft0k/2/

http://stackoverflow.com/a/29439837
has comment: http://stackoverflow.com/comment/47048811
has comment: http://stackoverflow.com/comment/47048922
has comment: http://stackoverflow.com/comment/47048731
has body: One solution is to make the click a toggle, by remembering if the text was selected the last time you clicked. So add a variable var selection = false; and change the onclick handler to if (selection = !selection) this.select(); Then the first slick will select all the text, the next click will deselect it, etc. See JSFiddle. Edit: an alternative method is to deselect the text on a mousedown. That would be closer to what you need. &lt;input onMouseDown="this.setSelectionRange(0,0)" onClick="this.select();" type="text" name="country" value="Norwayasdasdasddddddddddddddddddddddddddddddddddddddd" readonly&gt; See other JSFiddle.
accepted answer of: http://stackoverflow.com/q/29439467
answers question: http://stackoverflow.com/q/29439467
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47056052
has comment: http://stackoverflow.com/comment/47050844
type: Answer
has comment: http://stackoverflow.com/comment/47060801
has comment: http://stackoverflow.com/comment/47056024
downvote count: 0
score: 1

http://stackoverflow.com/a/29462265
answers question: http://stackoverflow.com/q/29462250
score: -4
has comment: http://stackoverflow.com/comment/47088226
has body: iframe.contents().find('body').blur()
downvote count: 4
has comment: http://stackoverflow.com/comment/47088200
type: Answer
upvote count: 0

http://stackoverflow.com/comment/47212122
has text: Wow thanks man, that worked like a charm, its all in the pseudo of the wrapper.
comment on: http://stackoverflow.com/q/29528863
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29433978
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/70431725
has answer: http://stackoverflow.com/a/41615032
has body: I was trying out the 5 min Anuglar2 Tutorial and when it said that you are able to use external templates I tried it. My component looks like this import {Component, Template, bootstrap} from 'angular2/angular2'; // Annotation section @Component({ selector: 'my-app' }) @Template({ url: "component.html" }) // Component controller class MyAppComponent { constructor() { this.name = 'Alice'; } } bootstrap(MyAppComponent); I had a mistake in my external template and fixed it, but the HTML file was still cached so I couldn't the effects in the browser. Figuring out how they cache it I looked at the code on Github I found this #angular/modules/angular2/src/core/compiler/template_loader.js @Injectable() export class TemplateLoader { _xhr: XHR; _htmlCache: StringMap; _baseUrls: Map&lt;Type, string&gt;; _urlCache: Map&lt;Type, string&gt;; _urlResolver: UrlResolver; constructor(xhr: XHR, urlResolver: UrlResolver) { this._xhr = xhr; this._urlResolver = urlResolver; this._htmlCache = StringMapWrapper.create(); this._baseUrls = MapWrapper.create(); this._urlCache = MapWrapper.create(); } // TODO(vicb): union type: return an Element or a Promise&lt;Element&gt; load(template: Template) { if (isPresent(template.inline)) { return DOM.createTemplate(template.inline); } if (isPresent(template.url)) { var url = this.getTemplateUrl(template); var promise = StringMapWrapper.get(this._htmlCache, url); if (isBlank(promise)) { promise = this._xhr.get(url).then(function (html) { var template = DOM.createTemplate(html); return template; }); StringMapWrapper.set(this._htmlCache, url, promise); } return promise; } So I check out the StringMapWrapper angular/modules/angular2/src/facade/collection.es6 and for set the code is just static set(map, key, value) { map[key] = value; } I saw that the StringMapWrapper comes from global export var StringMap = global.Object; But looking in angular/modules/angular2/src/facade/lang.es6 I cant figure out where the Map is cached. I do not know much about the ca…
tagged with: caching
type: Question
upvote count: 2
answer count: 2
downvote count: 0
tagged with: javascript
has title: Angular2 how do they save to cache?
favorite count: 0
tagged with: angular
has comment: http://stackoverflow.com/comment/47037894
has comment: http://stackoverflow.com/comment/57950961
has answer: http://stackoverflow.com/a/32709991
has comment: http://stackoverflow.com/comment/47039681
has comment: http://stackoverflow.com/comment/47047399
has comment: http://stackoverflow.com/comment/47038202
score: 2
has comment: http://stackoverflow.com/comment/47046863

http://stackoverflow.com/comment/46945238
score: 0
type: AnswerComment
has text: Note that they **can not** change the markup of the table.
type: Comment
comment on: http://stackoverflow.com/a/29382535

http://stackoverflow.com/q/29456981
has answer: http://stackoverflow.com/a/29457006
has comment: http://stackoverflow.com/comment/47078306
tagged with: typed-arrays
has title: Why is the value of Float32Array.length always 3?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29457006
type: Question
has comment: http://stackoverflow.com/comment/47078300
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29457079
favorite count: 0
upvote count: 8
answer count: 3
has body: I was reading the Mozilla Developer Network docs on Float32Arrays when I came upon Float32Array.length Length property whose value is 3. ... why is always 3? I also noticed that prototype property of the same name overrides it.
accepted answer: http://stackoverflow.com/a/29457079
score: 8
has answer: http://stackoverflow.com/a/29468753

http://stackoverflow.com/comment/47050262
type: QuestionComment
has text: You want it to alert that if everything is alright, correct?
score: 0
comment on: http://stackoverflow.com/q/29440258
type: Comment

http://stackoverflow.com/q/29450464
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47066824
has comment: http://stackoverflow.com/comment/47068344
favorite count: 0
has title: How to check Javascript battery usage
type: Question
has body: This sounds like a very strange question as I have probably phrased it wrong. How can I check how big of an impact my javascript code is having on the battery of a device such as a laptop? I know the website I'm using the JS in is causing my power to drain rapidly through checking Mac Activity monitor and the sound of the fans coming on full speed when the site is on for a while. When I close the tab, everything calms down. Thanks.
upvote count: 1
score: 0
downvote count: 1
tagged with: battery-saver
tagged with: batterylevel
has comment: http://stackoverflow.com/comment/47070904
answer count: 0
tagged with: javascript

http://stackoverflow.com/a/29518056
score: 3
has body: You can use the += syntax that animate also supports $('.box1').css('top','+=20px'); .box { width: 100px; height:100px; position: absolute; top: 10px; } .box1 { background-color: red; left:10px; } .box2 { background-color: yellow; left: 120px; }
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29517894
upvote count: 3

http://stackoverflow.com/a/38249138
has body: Try using CSS to make a fake popup. That'll make it look real. Or embed a PNG. But be warned. Embedding a PNG could result in the user dragging it and finding out it's fake. Try using Animate.CSS to let it pop up in the Windows fashion.
answers question: http://stackoverflow.com/q/29504772
type: Answer
downvote count: 1
upvote count: 0
score: -1

http://stackoverflow.com/comment/47029544
type: QuestionComment
comment on: http://stackoverflow.com/q/29429701
score: 0
has text: @RGraham I was not complete in my question, sorry. I would like to use an `ng-input="myCallback()"`-like attribute on an element.
type: Comment

http://stackoverflow.com/q/29423797
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/29423952
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29423872
has comment: http://stackoverflow.com/comment/47019133
has answer: http://stackoverflow.com/a/29423872
downvote count: 0
favorite count: 0
has title: Why do you have to have an anonymous function in addeventlistener when passing parameters?
has comment: http://stackoverflow.com/comment/47018986
has body: So if you have a named function with parameters and call that function, it doesn't work properly when using the addEventListener, but if you wrap that in an anonymous function, then it works, why is that? default text Here is my JavaScript. function myFunc(str){ document.getElementById("myDiv").innerHTML = str; } //does not work. document.getElementById("subBtn").addEventListener("click", myFunc("hey there buddy"), false); //this works, but why? document.getElementById("subBtn").addEventListener("click", function(){ myFunc("hey there buddy"); }, false); Now if myFunc didn't take any parameters, then both ways would work.
accepted answer: http://stackoverflow.com/a/29423952
score: 1
upvote count: 1

http://stackoverflow.com/q/29508303
tagged with: casperjs
has title: Passing argument array to CasperJS from node.js
has answer: http://stackoverflow.com/a/29510354
accepted answer: http://stackoverflow.com/a/29510354
type: Question
possible better answer: http://stackoverflow.com/a/29508558
tagged with: javascript
has answer: http://stackoverflow.com/a/29508558
has body: I am using CasperJS to test a website. A part of the test is resource check. What I want to do: Pass array or object array to CasperJS and iterate through them. The first step is one array then object array. both have same issue. Node.js code: require('child_process').exec('/usr/local/bin/casperjs script.js [url,regex]' , function(err, stdout, stderr) { err &amp;&amp; console.log(err); stderr &amp;&amp; console.log(stderr.toString()); stdout &amp;&amp; console.log(stdout.toString()); }) Casperjs script: var casper = require('casper').create(), a = casper.cli.args[0], // we need something here to string to js array w=a[0], r=a[1]; casper.start(w, function() { if (this.resourceExists(r)) { console.log("PASS\t" +r+ "\t"+ w); } else { console.log("FAIL\t" +r+ "\t"+ w); } }); casper.run(); The problem is CasperJS takes args as string.
score: 0
answer count: 2
tagged with: node.js
tagged with: phantomjs
type: AnsweredQuestion

http://stackoverflow.com/q/29387724
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has title: Mocha js tests not showing diff when strings not equal
tagged with: node.js
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29393789
tagged with: unit-testing
type: Question
has body: I have a simple unit test to assert a string is correct but it only shows me the test name that failed, not the diff of expected and actual results. For example, here is some silly test code: describe('stackoverflow', function(){ it('should be simple', function() { var someValue = 'A' + 1 + 2; assert.equal('A3', someValue); }); }); The the output isn't very helpful: $ mocha stackoverflow 1) should be simple &lt;--- this line is red Yes I can see which test failed but I can't easily see why. I'd like to see something like: $ mocha stackoverflow 1) should be simple Expected: 'A3' Actual : 'A12' Is there something I'm doing wrong?
has comment: http://stackoverflow.com/comment/46956026
tagged with: javascript
tagged with: mocha.js
answer count: 1

http://stackoverflow.com/q/29386205
tagged with: javascript
score: 0
has title: Uncaught SyntaxError: Unexpected token = in Chrome
has answer: http://stackoverflow.com/a/29386289
has comment: http://stackoverflow.com/comment/46950566
type: AnsweredQuestion
has body: I am following an on-line tutorial to create a simple game in HTML using canvas and JavaScript. I tried to load what seemed to be perfectly fine code but nothing is showing up on the screen and I received an error in the console saying Uncaught SyntaxError: Unexpected token = This is the portion of my code that seems to be incorrect: player = { x: null, y: null, width: 20, height: 100, update = function() {}, draw = function() { ctx.fillRect(this.x, this.y, this.width, this.height) }; }; PS - this error is showing up in Chrome.
linked to: http://stackoverflow.com/q/19699257
has comment: http://stackoverflow.com/comment/46950657
type: Question
has comment: http://stackoverflow.com/comment/46950764
has answer: http://stackoverflow.com/a/29386292
answer count: 2
accepted answer: http://stackoverflow.com/a/29386292
tagged with: canvas
possible better answer: http://stackoverflow.com/a/29386289

http://stackoverflow.com/a/29473765
downvote count: 0
answers question: http://stackoverflow.com/q/29472655
upvote count: 2
type: Answer
has body: Here is how to do it using jinqJs The line of code is: jinqJs().from(example).select(function(row){return row.name;}); var example = [{ name: "someone1", city: "somewhere1", state: "someplace1" },{ name: "someone2", city: "somewhere2", state: "someplace2" }]; var result = jinqJs().from(example).select(function(row){return row.name;}); document.body.innerHTML = '&lt;pre&gt;' + JSON.stringify(result, null, 2) + '&lt;/pre&gt;&lt;br&gt;&lt;br&gt;'; &lt;script src="https://rawgit.com/fordth/jinqJs/master/jinqjs.min.js"&gt;&lt;/script&gt;
score: 2

http://stackoverflow.com/comment/47211451
has text: Better now? is that what you mean?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29528616
type: AnswerComment

http://stackoverflow.com/a/29400872
score: 2
upvote count: 3
has body: Why don't you just use child = child || 'default' instead of an if else statement? This achieves the same thing.
downvote count: 1
answers question: http://stackoverflow.com/q/29400692
type: Answer

http://stackoverflow.com/a/29410859
type: Answer
downvote count: 0
score: 1
has body: You would need to iterate each row which is visible. Here is the fiddle- http://jsfiddle.net/j0up6z5y/ function isVisible( row, container ){ var elementTop = $(row).offset().top, elementHeight = $(row).height(), containerTop = $(container).offset().top, containerHeight = $(container).height(); return ((((elementTop - containerTop) + elementHeight) &gt; 0) &amp;&amp; ((elementTop - containerTop) &lt; containerHeight)); }
answers question: http://stackoverflow.com/q/29410285
upvote count: 1

http://stackoverflow.com/q/29494944
has answer: http://stackoverflow.com/a/29495107
accepted answer: http://stackoverflow.com/a/29495107
tagged with: javascript
has title: php boolean's lower AND upper case and numerical boolean's acceptable?
has comment: http://stackoverflow.com/comment/47148881
tagged with: boolean
has comment: http://stackoverflow.com/comment/47149851
answer count: 2
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/47150299
possible better answer: http://stackoverflow.com/a/29495069
has answer: http://stackoverflow.com/a/29495069
tagged with: php
type: AnsweredQuestion
upvote count: 0
has body: I have this line of code in PHP: if($connect-&gt;query("INSERT INTO users (last_login) VALUES ('$now')") === TRUE) ... and this line. return true; I've noticed that PHP booleans are sometimes uppercase and sometimes lowercase. Why is this? Should I use one for better performance? Do they produce different results? If so, what is the difference? Are numeric booleans acceptable in PHP, because in JavaScript, booleans can be 0 and 1. IE in JavaScript, you can do: if(0) ... // false if(1) ... // true
type: Question
score: -2

http://stackoverflow.com/comment/46930028
type: Comment
comment on: http://stackoverflow.com/a/29374730
type: AnswerComment
has text: or `onclick="event.preventDefault(); resendCode();"`
score: 0

http://stackoverflow.com/comment/47027221
type: QuestionComment
comment on: http://stackoverflow.com/q/29427948
has text: How would I do that ?
score: 0
type: Comment

http://stackoverflow.com/q/29461865
has answer: http://stackoverflow.com/a/29463782
has body: I for some reason can not figure out how to loop through this xml. I can get data out from the first parent nodes and the children nodes below it, but can not get it to go to the second parent node. Any help would be great. I'm using xmlReader. function saveData(dataObject) { var GameData = Parse.Object.extend("AllGameData"); var GameData = new GameData(); dataObject.forEach(function (element, i) { GameData.set(element.name, element.data); }); GameData.save(); } Parse.Cloud.httpRequest({ url: xmlURL, success: function (httpResponse) { var counter = 0; xmlreader.read(httpResponse.text, function (err, xmldata) { var state = xmldata.allcrosswords.StateCrossword.count(); for(var y = 0; y < state.length; y++) { xmldata.allcrosswords.array[y].StateCrossword.array.forEach(function (element, i) { xmldata.allcrosswords.StateCrossword.array[i].game.array.forEach(function (element, j) { saveData(data); counter++; }); }); } status.success("" + counter + " row(s) inserted."); }); }, error: function (httpResponse) { status.error('Request failed with response code ' + httpResponse.status); } }); XML is below: <crossword_date_played>02/01/2014</crossword_date_played> <words_wrong>2</words_wrong> <total_score>110</total_score> <crossword_date_played>04/16/2015</crossword_date_played> <words_wrong>10</words_wrong> <total_score>12</total_score> <crossword_date_played>08/04/2014</crossword_date_played> <words_wrong>12</words_wrong> <total_score>0</total_score>
tagged with: xmlreader
linked to: http://stackoverflow.com/q/14782408
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/47089766
upvote count: 1
accepted answer: http://stackoverflow.com/a/29463782
has comment: http://stackoverflow.com/comment/47091193
has comment: http://stackoverflow.com/comment/47087808
tagged with: javascript
has title: Loop through XML in Javascript
has comment: http://stackoverflow.com/comment/47090636
has comment: http://stackoverflow.com/comment/47089783
type: AnsweredQuestion
answer count: 1
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47088691
favorite count: 0
type: Question

http://stackoverflow.com/q/29487469
downvote count: 5
tagged with: javascript
favorite count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47134472
has title: Few actions in else (JavaScript)
has answer: http://stackoverflow.com/a/29487590
has comment: http://stackoverflow.com/comment/47134306
type: AnsweredQuestion
score: -5
has comment: http://stackoverflow.com/comment/47134271
has body: Is it proper to use multiple statements in one of the conditional clauses of a ternary boolean operator? For example: $('#loadMore').click(function () { x= (x+5 &lt;= size_div) ? x+4 : size_div &amp; $('#loadMore').hide(); $('#postList div:lt('+x+')').show(); }); In the else condition, I want to assign size_div to x and run the statement ('#loadMore').hide(). Is this the right way to do this, or is there a better way?
has comment: http://stackoverflow.com/comment/47135019
type: Question
accepted answer: http://stackoverflow.com/a/29487590
upvote count: 0

http://stackoverflow.com/q/29423170
has answer: http://stackoverflow.com/a/29423430
has comment: http://stackoverflow.com/comment/47017927
has title: How do I "default" a boolean property in JavaScript?
has comment: http://stackoverflow.com/comment/47017903
type: Question
has answer: http://stackoverflow.com/a/29423895
downvote count: 0
accepted answer: http://stackoverflow.com/a/29423395
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/29423373
has answer: http://stackoverflow.com/a/29423655
has comment: http://stackoverflow.com/comment/47017967
score: 1
has comment: http://stackoverflow.com/comment/47017859
has comment: http://stackoverflow.com/comment/47017985
favorite count: 0
has comment: http://stackoverflow.com/comment/47018173
has comment: http://stackoverflow.com/comment/47017855
has comment: http://stackoverflow.com/comment/47018042
has answer: http://stackoverflow.com/a/29423368
upvote count: 1
linked to: http://stackoverflow.com/q/894860
has comment: http://stackoverflow.com/comment/47018289
has body: In JavaScript I often use the || operator to get the value of some property - or a default value. For instance: var dens = mapping.defaultElementNamespaceURI||mapping.dens||''; If mapping has defaultElementNamespaceURI, it will be used, otherwise look for dens or use an empty string by default. However if my property is boolean, it does not work: var dom = mapping.allowDom || mapping.dom || true; Returns true even if mapping.dom is false. I wonder, what would be the best (laconic but still readable) syntax for defaulting boolean properties? Defaulting in a sense that if the property is defined, use its value otherwise some provided default value. I can write a function for this, sure, but maybe there's someting as elegant as a || b || c? Code sample: var a = {}; $('#result').text(a.boo||a.b||true); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;pre id="result"&gt;&lt;/pre&gt; Update Seems like there's no "syntactically sweet" way to do this, so I've resorted to writing a function: var defaultValue = function() { var args = arguments; if (args.length === 0) { return undefined; } else { var defaultValue = args[args.length - 1]; var typeOfDefaultValue = typeof defaultValue; for (var index = 0; index &lt; args.length - 1; index++) { var candidateValue = args[index]; if (typeof candidateValue === typeOfDefaultValue) { return candidateValue; } } return defaultValue; } } Considers the last argument to be the default value. Returns the first argument which has the same type as the default value.
has answer: http://stackoverflow.com/a/29423395
has comment: http://stackoverflow.com/comment/47017970
has comment: http://stackoverflow.com/comment/47018325
possible better answer: http://stackoverflow.com/a/29423430
type: AnsweredQuestion

http://stackoverflow.com/comment/47148912
score: 0
type: AnswerComment
has text: Will this work for multiple fields?! User1, User2, etc.
type: Comment
comment on: http://stackoverflow.com/a/29493571

http://stackoverflow.com/a/29438684
type: Answer
has body: Looks like you're dealing with dynamic content so if you need to give all of these unique ID's then this will do it. But what you're trying to achieve based on the image you provide shouldn't require each of these need a unique id though. If you let us know what you need those id's for then we may be able to give a more professional way to do it. If they're just css hooks maybe look at the nth-child(n) selector #header div:nth-child(2) { background-color: rgba(100,100,100,0.4); } To address the question of professionalism though: professionals have to deal with some pretty funky systems and have to do things to get around those systems' limitations that probably makes their heart hurt a little. If this is one of those situations then congratulations - you're a pro!
answers question: http://stackoverflow.com/q/29437782
score: 0

http://stackoverflow.com/q/29412784
type: Question
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: The route change event is fired on the initial page load itself, ideally i want to fire when the user go to the next page from the initial page not on the initial page load. Here I have bound the directive "meeee" to the elements and in the link function of the directive I put the callback for routeChangeStart event. In which I want to fire the callback to remove the elements from the current page with directive "meeee" when user goes to the next page. But "routeChangeStart" event is fired for the current page itself, removing all the "meeee" elements at the initial load itself , please see this plunkr code http://plnkr.co/edit/h7nLME7YW7dI8qaBk1in?p=preview Index.html AngularJS Plunker Meee1 Meee2 Meee3 App.js var myApp = angular.module('myApp', ['ngRoute']); myApp.controller('parentCtrl',['$scope','$window','$location',function ($scope,$window,$location) { }]); myApp.config(function($locationProvider,$routeProvider) { $routeProvider .when('/p1', { templateUrl:'page1.html', }) .when('/p2', { templateUrl:'page2.html', }) .when('/p3', { templateUrl:'partials/page3.html', }) .when('/default', { templateUrl:'default.html', }) .otherwise({ redirectTo:'/default' }); }); myApp.directive("meeee",['$rootScope','$location', function ($rootScope, $location){ return { restrict: 'C', link: function(scope, elm, attr) { $rootScope.$on('$routeChangeStart', function() { console.log('attr["id"]: '+attr["id"]); elm.remove(); }); elm.detach(); angular.element("body").append(elm); } }; }]); default.html Page1 Page2 Page3 Page1.html In Page One Page 1 Meee1 Page 1 Meee2 Page 1 Meee3 page2.html In Page Two page3.html In Page Three Thanks in advance for any help.
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29615247
has title: RouteChangeStart event fired on initial index.html page load

http://stackoverflow.com/q/29491192
favorite count: 0
has answer: http://stackoverflow.com/a/29492305
has comment: http://stackoverflow.com/comment/47141452
has body: Explain codeigniter session conpect. I can not understand,Help me. &lt;?php $session_id = $this-&gt;session-&gt;userdata('session_id'); echo $this-&gt;session-&gt;set_userdata($array); ?&gt;
tagged with: http://stackoverflow.com/tag/html
tagged with: php
possible better answer: http://stackoverflow.com/a/29492305
type: AnsweredQuestion
has title: Codeigniter session concept brief explanation
has comment: http://stackoverflow.com/comment/47141514
has answer: http://stackoverflow.com/a/29492404
tagged with: codeigniter
type: Question
has comment: http://stackoverflow.com/comment/47141457
accepted answer: http://stackoverflow.com/a/29492404
score: -5
downvote count: 5
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/39036006
has comment: http://stackoverflow.com/comment/125697569
upvote count: 2
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/115562865
answers question: http://stackoverflow.com/q/29490833
type: Answer
has body: Try this var multer = require('multer') var storage = multer.diskStorage({ destination: function (request, file, callback) { callback(null, './uploads/'); }, filename: function (request, file, callback) { console.log(file); callback(null, file.originalname) } }); var upload = multer({ storage: storage }); app.post('/', upload.single('photo'), function (req, res) { console.log(req.body) // form fields console.log(req.file) // form files res.status(204).end() }); ref: http://wiki.workassis.com/nodejs-express-get-post-multipart-request-handling-example/

http://stackoverflow.com/q/29428821
tagged with: protractor
tagged with: javascript
has answer: http://stackoverflow.com/a/29432630
accepted answer: http://stackoverflow.com/a/29432630
has comment: http://stackoverflow.com/comment/47034562
upvote count: 3
has comment: http://stackoverflow.com/comment/47033457
has body: I have a grid, from which I want to select all the rows and none of the elements inside the rows The rows are just divs, no classes etc etc, something like this (inner content removed for brevity) Normally with a protractor locator you could just go element(by.css(".grid > div")) The issue I have is that grid is already a protractor element and I don't have control over it but I still want to only select its direct children. var gridElement = element(by.css(".grid")); So I'd need something like var rows = gridElement.all(by.css("> div")); But this is not a valid CSS selector as it's missing the left hand side. Does anyone know how I can achieve this? EDIT: Using protractor 1.0, and updating the version is unfortunately a last-resort
answer count: 2
possible better answer: http://stackoverflow.com/a/29432433
has answer: http://stackoverflow.com/a/29432433
favorite count: 0
linked to: http://stackoverflow.com/q/25878496
tagged with: angularjs
has title: Angular JS, Protractor locator, get direct children of element
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47038127
downvote count: 0
has comment: http://stackoverflow.com/comment/47035087
type: Question
score: 3

http://stackoverflow.com/q/29438891
tagged with: javascript
answer count: 1
downvote count: 0
score: 1
favorite count: 0
type: UnansweredQuestion
tagged with: dhtmlx
has title: How can i save tasks in dhtmlx gantt?
has comment: http://stackoverflow.com/comment/47098921
has body: I used dhtmlx for chart gantt, I succeed in saving tasks in the data base, the problem is that when I add a new task there is no change in the chart, for example if I add a new task with 4 days as duration it appears just one cell not four ones and also for the other properties. Here the code of adding a new task : &lt;script type="text/javascript"&gt; gantt.init("gantt_here"); gantt.attachEvent("onLightboxSave", function(id, task, is_new){ mnth = ("0" + (task.start_date.getMonth()+1)).slice(-2), day = ("0" + task.start_date.getDate()).slice(-2); mnth = ("0" + (task.end_date.getMonth()+1)).slice(-2), day = ("0" + task.end_date.getDate()).slice(-2); $.post("Control",{id:task.id,duration:task.duration,text:task.text,start_date:[ day,mnth, task.start_date.getFullYear() ].join("-").toString()},function(data){ alert(data); }) ; gantt.hideLightbox(); }); &lt;/script&gt;
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29468758

http://stackoverflow.com/q/29522370
has answer: http://stackoverflow.com/a/29522684
downvote count: 1
linked to: http://stackoverflow.com/q/29466380
tagged with: angularjs-directive
tagged with: angular-ui-router
type: UnansweredQuestion
has body: through AngularJs'm trying to access a server to make me return a JSON in thi way modulo.controller('listaController', function($scope, $http) { $http.get('http://api.rottentomatoes.com/api/public/v1.0/movies.json?[apyKeyBlaBla]&amp;q=Toy+Story+3&amp;page_limit=1').success(function(data) { $scope.items = data; }); }); but when you launch the application I get this error: XMLHttpRequest cannot load [Name Sting] No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8383' is therefore not allowed access. Where is the solution? Notified that I use netbeans and I put my apyKey in the above string then the string is correct because I tested it!
tagged with: cors
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/47199871
has answer: http://stackoverflow.com/a/29522747
favorite count: 0
has title: I can not access in to a server with angularJs ($ http)
tagged with: angularjs
type: Question
linked to: http://stackoverflow.com/q/20035101
has answer: http://stackoverflow.com/a/29522761
score: -1
answer count: 3

http://stackoverflow.com/comment/47162792
comment on: http://stackoverflow.com/q/29502240
score: 0
type: Comment
type: QuestionComment
has text: @dandavis confused !! what do you mean?

http://stackoverflow.com/comment/47194049
score: 1
has text: Naturally, whether it returns `undefined` or `null`, you're going to still have to deal with it. Why not just check for both? See also http://programmers.stackexchange.com/a/268125
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29519452

http://stackoverflow.com/a/29512006
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/47234289
accepted answer of: http://stackoverflow.com/q/29481767
score: 0
answers question: http://stackoverflow.com/q/29481767
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47211691
type: Answer
has comment: http://stackoverflow.com/comment/47214725
has body: This warning is only showing in Chrome in the development environment of ExtJs. Once the application is built with sencha cmd, the warning doesn't show anymore. As @Evan pointed out the warning looks benign, and you should not have to worry about it. The fact that there is a warning should not be an issue, since it will never show in a deployed application. If you do not yet use sencha cmd, it is definitely worth to integrate it in your development cycle. I know it is not a direct answer to the question. Myself, I wonder if it is possible to get rid of this warning at all.

http://stackoverflow.com/a/29407643
has body: You must submit form to get Values or you use Watch Function function DemoController($scope) { $scope.name1 = 'LISA'; $scope.submitName = function () { console.log($scope.name2) } } {{ name1 }} click
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29407327

http://stackoverflow.com/q/29377730
linked to: http://stackoverflow.com/q/2705583
upvote count: 3
tagged with: selenium
tagged with: web-scraping
answer count: 1
has answer: http://stackoverflow.com/a/29377928
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has title: Executing a script in selenium python
favorite count: 0
type: Question
score: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: python
linked to: http://stackoverflow.com/q/19377437
accepted answer: http://stackoverflow.com/a/29377928
has body: I am trying to execute this script in selenium. Nyaralego , Sikonge , Ab-Titchaz and 11 others like this. This is my code to execute it. browser.execute_script("document.getElement(By.xpath(\"//div[@class='vbseo_liked']/a[contains(@onclick, 'return vbseoui.others_click(this)')]\").click()") It didn't work. What am i doing wrong?
linked to: http://stackoverflow.com/q/29361133

http://stackoverflow.com/comment/46950948
comment on: http://stackoverflow.com/a/29386255
has text: Tiger, It worked my guy I was miss matching the class name. I standardized the update in php and js. Cheers
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29411784
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46997736
downvote count: 0
has body: The value will not get updated, as the grid[a-1] returns a -ve value when a is 0, change the code as below. for (var a = 0; a &lt;= 100; a++) { if (grid[a].num == 2) { grid[a + 1].num++; if (a &gt; 0) { grid[a - 1].num++; } grid[a].num = 0; } }
answers question: http://stackoverflow.com/q/29411714
type: Answer

http://stackoverflow.com/a/30257884
has comment: http://stackoverflow.com/comment/48707907
answers question: http://stackoverflow.com/q/29412529
has comment: http://stackoverflow.com/comment/48708291
score: 0
has body: Try this directive: app.directive('checkImage', function ($http) { return { restrict: 'A', link: function (scope, element, attrs) { attrs.$observe('ngSrc', function (ngSrc) { $http.get(ngSrc).success(function () { }).error(function () { //Image doesn't exists!. To do anything... }); }); } }; }); HTML: &lt;img check-image ng-src="{{urlImg}}/&gt; Or you can try this error handler directive: app.directive('errSrc', function () { return { link: function (scope, element, attrs) { element.bind('error', function () { if (attrs.src != attrs.errSrc) { attrs.$set('src', attrs.errSrc); } }); } } }); HTML: &lt;img ng-src="{{urlImg}} err-src=""/&gt;
type: Answer

http://stackoverflow.com/comment/47147474
has text: Okay, I did it a little differently. My `location /` has this: `try_files $uri /media/images/default.gif;` and my `location ~ \.jsp$ {` has the proxy information.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29489090
type: Comment

http://stackoverflow.com/comment/46980729
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29400371
has text: This is purely a browser issue. Your node.js code will remain the same. See here how to send the form through AJAX instead of posting it: http://stackoverflow.com/questions/1960240/jquery-ajax-submit-form (yes, definitely add jQuery to your frontend)

http://stackoverflow.com/q/29394605
has title: My unsaved changes directive needs to work for all forms with different names
has comment: http://stackoverflow.com/comment/46968162
answer count: 2
upvote count: 1
has body: I have a directive that opens a modal to alert user of unsaved changes and I need it to check for form dirty with different unknown names. I have tried to use scope to access the forms name and this but have not been successfull. I can access the form name with elem[0].name but it does not carry the form $dirty value. &lt;form class="form-inline" role="form" name="myFormName" confirm-on-exit&gt; Cool form html &lt;/form&gt; app.directive('confirmOnExit', ['modalService', '$rootScope', '$stateParams', '$state', function (modalService, $rootScope, $stateParms, $state) { return { restrict: 'A', link: function (scope, elem, attrs, formCtrl) { onRouteChangeOff = $rootScope.$on('$stateChangeStart', routeChange); function routeChange(event, newState, newParams, fromState, fromParams) { if (scope.myFormName.$dirty) { return; } event.preventDefault(); var modalOptions = { closeButtonText: 'No, I\'ll stay and save them.', actionButtonText: 'Yes, Leave and Ignore Changes', headerText: 'Unsaved Changes', bodyText: 'You have unsaved changes. Do you want to leave the page?' }; modalService.showModal({}, modalOptions).then(function (result) { if (result) { onRouteChangeOff(); //Stop listening for location changes $state.go(newState); //Go to page they're interested in } else { $state.go(fromState); //Stay on the page and have tab revert to fromState } }); return; } } }; }]);
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/29396217
has comment: http://stackoverflow.com/comment/46968213
has answer: http://stackoverflow.com/a/29396187
has comment: http://stackoverflow.com/comment/46968685
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29396187
accepted answer: http://stackoverflow.com/a/29396217
has comment: http://stackoverflow.com/comment/46969714
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46968418
score: 1
favorite count: 0
tagged with: angularjs
type: Question

http://stackoverflow.com/a/29520181
score: 0
answers question: http://stackoverflow.com/q/29519855
type: Answer
has body: Explanation You are passing in a number, not a string. When you combine a number with a string (&quot;&quot;) it assumes you want to make a string. So you are really converting it to a string. To an array, then back to a string. If you attempt to split a number, the compiler will throw an error. More exactly TypeError: undefined is not a function (evaluating 'n.split('')') So what you really are doing is making the number into a String. There are different methods you can use, take a look here. n += '';(String) -&gt; .split() (Array) -&gt; .split() (Array) -&gt; .join() (String) Your function is actually producing and returning a string Alternative Function I'm going to critique ;) , you could shorten, and improve this function using the following. var reverse_a_number = function (n){ return +(n += &quot;&quot;).split(&quot;&quot;).reverse().join(&quot;&quot;); } What does this do? n = n + '' has a special operator, +=. We can shorten this to on-line by using this inside parenthesis. The + will convert it into a Integer

http://stackoverflow.com/q/29421098
tagged with: breadcrumbs
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29421485
tagged with: angularjs
type: UnansweredQuestion
has title: How to apply Breadcrum using AngularJS?
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
tagged with: navigation
type: Question
tagged with: javascript
score: -1
has body: I want to add breadcrums in my application , How i can achieve this task using AngularJS. So far i have implemented router and header file and not sure after this how to use breadcrums in AngularJS. So far tried below code... INDEX HTML Risk Assessment Platform Dashboard Process Risk & Control Inventory Create New Process Create New Unaligned Risk Create New Unaligned Control View/ Search Inventory View End-to-End Reports Data Upload <!-- li Upload Inventory Upload Inventory Risk Assessment RCSA CRA Reports Administration {{user.customUserDetails.workFullName}} Logout ROUTER.JS angular.module('riskAssessmentApp') .config(function($stateProvider, $httpProvider, $urlRouterProvider) { /* * This has to be here because the browsers will not catch the home * state without it */ $urlRouterProvider.otherwise( function($injector, $location) { var $state = $injector.get("$state"); $state.go("home"); }); $httpProvider.defaults.withCredentials = true; $httpProvider.defaults.headers.post = {'Content-Type': 'application/json'}; $httpProvider.interceptors.push('HttpResponseInterceptor'); $stateProvider .state('home', { url : '/', templateUrl: 'views/riskAssesmentHomePage.html', controller: 'riskHomePageController', data: { authenticate: true } }).state('smlogin', { url: '/smlogin', controller: 'SMLoginController' }) .state('login', { url : '/login', templateUrl : 'views/login.html', controller : 'LoginController' }) .state('error', { url:'/error', templateUrl: 'views/error.html' }) .state('settings', { url:'/settings', templateUrl: 'views/settings.html', controller: 'SettingsController' }) .state('sessions', { url:'/sessions', templateUrl: 'views/sessions.html', controller: 'SessionsController', resolve:{ resolvedSessions:['Sessions', function (Sessions) { return Sessions.get(); }] } }) .state('metrics', { url:'/metrics', templateUrl: 'views/metrics.html', controller: 'MetricsController' }) .state('logs', { url:'/logs', templateUrl: 'views/logs.html', controller: 'LogsController',…
upvote count: 0

http://stackoverflow.com/a/29473771
type: AcceptedAnswer
has body: You can try to include js file. }else{ echo `&lt;script src="you_file.js"&gt;&lt;/script&gt;` } //you_file.js (function ($){ $(document).ready(function() { alert(`test`); $('#errLoginModal').modal('show'); window.location.href='index.php'; }) }) of course include jquery before that
has comment: http://stackoverflow.com/comment/47108770
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29473519
upvote count: 2
answers question: http://stackoverflow.com/q/29473519
has comment: http://stackoverflow.com/comment/47109185

http://stackoverflow.com/comment/47094699
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29465922
score: 0
has text: I used class name called autocomplete-w1.. but it is not working, thanks

http://stackoverflow.com/q/29528347
has comment: http://stackoverflow.com/comment/47211526
has answer: http://stackoverflow.com/a/29532007
upvote count: 0
tagged with: arrays
tagged with: javascript
score: -1
has body: I'm doing an exercise where ihave to read data from a table and guard in Arrays to sort the sequence : Available, Buy; Available, No stock; Sold, Buying; Sold, No Stock. Could someone help me saying how to do to read the two cell of the same line then distribute between arrays and generate a new table already ordered? My code below: prod0 sold Quantity prod0 available buy prod2 sold buy prod2 sold buy prod4 available no Stock prod6 available buy prod2 sold buy prod5 available buy prod3 sold buy prod4 available no Stock prod4 available no Stock Order look here put an example that I think is most visible for you to understand my problem : http://jsfiddle.net/Helder666/yzmp2psz/2/ (note: this coloqueo linck in the commentary below also)
answer count: 1
has comment: http://stackoverflow.com/comment/47211761
has title: sort array tables with javascript
accepted answer: http://stackoverflow.com/a/29532007
favorite count: 0
has comment: http://stackoverflow.com/comment/47212605
type: AnsweredQuestion
tagged with: jquery-ui-sortable
downvote count: 1
type: Question

http://stackoverflow.com/q/29505825
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has body: JSFiddle Demo of My Code I need to change the selected OPTION in a dropdown & Also Trigger the onChange of the dropdown. $('#type').val('option 1'); $('#type').val('option1'); I tried the above to select option 1 However no luck so far!
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29506060
has answer: http://stackoverflow.com/a/29505915
upvote count: 1
has comment: http://stackoverflow.com/comment/47168683
type: Question
score: 1
has answer: http://stackoverflow.com/a/29505893
has answer: http://stackoverflow.com/a/29505906
accepted answer: http://stackoverflow.com/a/29505915
possible better answer: http://stackoverflow.com/a/29505893
has title: Javascript to select option in dropdown list with VALUE
has comment: http://stackoverflow.com/comment/47168659
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/30110436
has body: You are mixing the concepts of add-ons and plugins. Plugins are for processing specific content-types (like PDF reader), add-ons are for extending browser functionality (like AdBlock). navigator.plugins gives you the list of the plugins, whereas there's no way of getting the list of the BHO add-ons from the client script. However it could still be possible to indirectly identify some of them by modifications they make to the content of the page (e.g. altering content or adding new elements like images, links or iframes)
downvote count: 0
answers question: http://stackoverflow.com/q/29438995
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/29418079
has answer: http://stackoverflow.com/a/29418519
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29431434
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29418438
has title: xPages execute SSJS from CSJS
type: Question
has body: I want to run SSJS from CSJS script library... This command works fine in Client Side JavaScript library: var myVar = "#{javascript:getComponent('myCustomControl').getPropertyMap().property1 = 'test'}"; When I check custom control property1 from SSJS it shows test. So works fine. But I need to substitute 'test' value with some variable, like: function myFunction(testID){ var myVar = "#{javascript:getComponent('myCustomControl').getPropertyMap().property1 = '" + testID + "'}"; } Now when I check customcontrol property1 property it says exactly '" + testID + "' so it doesn't calculate/substitute
tagged with: javascript
tagged with: xpages

http://stackoverflow.com/comment/47051126
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29441303
has text: Did you tried `ctaLayer.setMap(null)` before adding the new one?

http://stackoverflow.com/a/29422980
answers question: http://stackoverflow.com/q/29422661
score: 1
upvote count: 1
type: Answer
has body: So you have good answers to WHY this is so - they are labels - but if you would want to have them like assignments, you could only wrap them in an "object": var myClass = { thing1: 123123, thing2: "asdfasdf", thing3: {asdf:1234}, thing4: function () { return 1 }, parent: function() { for (var i=0; i&lt;10; i++) { var a = 0 child: while(a &lt; 5) { a++ console.log(a) if (a &gt; 2) break } } } }; console.log(myClass.thing1); console.log(myClass.thing2); console.log(myClass.thing3['asdf']); console.log(myClass.thing4()); myClass.parent(); You can play around here: http://jsfiddle.net/td951gc7/2/
downvote count: 0

http://stackoverflow.com/a/29516540
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29515485
score: 2
has body: You are missing "." in the following lines which have to be mentioned as class. $('firstPage').visible(true) $('sticky').css('top', 0+'px'); See here, I added raw Jquery-visible-min in your javascript and edited your code.
downvote count: 0
answers question: http://stackoverflow.com/q/29515485
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/47188606

http://stackoverflow.com/comment/47187725
type: AnswerComment
type: Comment
has text: Well, sorry then.. As far as I know there is no other natural way to accomplish this in JS.
comment on: http://stackoverflow.com/a/29516092
score: 0

http://stackoverflow.com/q/29400084
has answer: http://stackoverflow.com/a/29401234
tagged with: css
accepted answer: http://stackoverflow.com/a/29400281
type: AnsweredQuestion
has body: I have a div that needs to switch between background images as well as size. I'm able to get the initial(first) click to change the background image and div size correctly, but when I click on it again, I'm unable to return it to it's original size and background image. Can anyone explain to me what I need to do? CSS #navigation{ position: absolute; display: block; float: right; margin: 0; top: 0; right: 0; width: 25px; height: 100%; background-image: url(../images/left.png); background-repeat: no-repeat; background-position: left; z-index: 3; background-color: green; } JS $("#navigation").on("click", function(){ if($(this).css("background-image", "url(images/left.png)")){ $(this).css("background-image", "url(images/right.png)"); $(this).animate({width: 100}, 350); } else{ $(this).css("background-image", "url(images/left.png)"); $(this).animate({width: 25}, 350); } })
score: 1
has title: Switching between images and changing div size in jQuery
has answer: http://stackoverflow.com/a/29400281
type: Question
tagged with: javascript
answer count: 2
upvote count: 1
downvote count: 0
possible better answer: http://stackoverflow.com/a/29401234
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/47047246
type: AnswerComment
comment on: http://stackoverflow.com/a/29438299
type: Comment
has text: This makes sense, thanks. I'll stick with this approach for now!
score: 0

http://stackoverflow.com/q/29449348
linked to: http://stackoverflow.com/q/12383070
has comment: http://stackoverflow.com/comment/47074140
type: Question
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/47064838
score: 0
answer count: 0
has body: I want to insert value in myArray[] and alert to show the value. myArray: var myArray = [{"id" : "obj_0" ,"src" : "bg2.png"}]; my function: function getSet(sset_id){ var xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200){ var txt=xmlhttp.responseText; var m = txt.replace(/(&lt;([^&gt;]+)&gt;)/ig,""); var w = m.split(' '); alert(w[0]); var i; for(i=0;i&lt;w.length;i=i+5){ myArray[i+1].id = w[i]; alert(myArray[i+1].id); } $("#frame").html(xmlhttp.responseText); myFunction(); } } xmlhttp.open("GET","querySet.php?sset_id="+sset_id,true); xmlhttp.send(); } I convert xmlhttp.responseText into string and split it by space. Then, I try to input value in w[i] to json array and alert it, but it not work.
type: UnansweredQuestion
has title: How to input value in array to JSON array with for loop?
has comment: http://stackoverflow.com/comment/47065047
has comment: http://stackoverflow.com/comment/47066627
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/29456408
favorite count: 0
has answer: http://stackoverflow.com/a/29457167
type: AnsweredQuestion
tagged with: loops
downvote count: 1
accepted answer: http://stackoverflow.com/a/29457167
type: Question
tagged with: google-apps-script
tagged with: google-sheets
upvote count: 0
has title: Looping through cells in Google Spreadsheet
tagged with: javascript
score: -1
linked to: http://stackoverflow.com/q/15616530
has body: I've been busy trying to use the build-in javascript in Google Spreadsheet, however, not having worked in either javascript or Google Spreadsheet, i'm having a few difficulties. My script is supposed to read a number (1-3) in a cell, and from that number parse an image to the cell below (I've been using the setFormula command for this). So far it's working for 1 cell (B6 as i've choosen right now), but i would like to loop through a column with numbers in every other cell (So that after the script has run, it's number-picture-number-picture etc) - i just can't figure out how. The code i'm using right now: function numbtoimage() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; var url = 'IMAGE("https://dl.dropboxusercontent.com/s/bpqy8o796casqjl/belt.JPG?dl=0", 2)'; var url2 = 'IMAGE("https://dl.dropboxusercontent.com/s/4q8sakhkpot0h65/belt2.JPG?dl=0",2)'; var url3 = 'IMAGE("https://dl.dropboxusercontent.com/s/kvsf4z6z45rcg53/belt3.JPG?dl=0",2)'; var cell = sheet.getRange("B6") var data = cell.getValue() if(data==1) {cell.offset(1, 0, 1).setFormula(url);} else if(data==2) {cell.offset(1, 0, 1).setFormula(url2);} else if(data==3) {cell.offset(1, 0, 1).setFormula(url3);} } I've looked at This similar problem, but have been unable to make it work for my case. Any help is greatly and truly appreciated! Nicklas
answer count: 1

http://stackoverflow.com/q/29401380
has comment: http://stackoverflow.com/comment/46979288
has comment: http://stackoverflow.com/comment/46978961
answer count: 1
downvote count: 0
has title: jQuery Transparent Menu on Scroll Up
has comment: http://stackoverflow.com/comment/46978664
has comment: http://stackoverflow.com/comment/46978867
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46979471
has comment: http://stackoverflow.com/comment/46978904
has body: What I am trying to achieve is something similar to this: http://www.thoughtspot.com/ I'm nearly there! What I can't replicate is how the navigation has a transparent background when scrolling up and then it disappears. Could anyone assist me on this? function hasScrolled() { var st = $(this).scrollTop(); // Make sure they scroll more than delta if(Math.abs(lastScrollTop - st) &lt;= delta) return; // If they scrolled down and are past the navbar, add class .nav-up. // This is necessary so you never see what is "behind" the navbar. if (st &gt; lastScrollTop &amp;&amp; st &gt; navbarHeight){ // Scroll Down $('header').removeClass('nav-down').addClass('nav-up'); } else { // Scroll Up if(st + $(window).height() &lt; $(document).height()) { $('header').removeClass('nav-up').addClass('nav-down'); } } lastScrollTop = st; } For the full code please view the jsfiddle I have created: http://jsfiddle.net/s6mLJ/2257/ Thanks everyone!
tagged with: css
has comment: http://stackoverflow.com/comment/46978998
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29401804
upvote count: 1
tagged with: javascript
type: Question

http://stackoverflow.com/q/29516041
has answer: http://stackoverflow.com/a/29516196
answer count: 3
upvote count: 0
favorite count: 0
has body: When I run this script in Google sheets script editor it says Missing ) after argument list. (line 10, file "Code") but no matter where I put a ), it won't resolve. I've also tried adding \ before the string quotes and changing them to single quotes, to no avail. Here's the script: function onEdit(event) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = SpreadsheetApp.getActiveSheet(); var CellRow = SpreadsheetApp.getActiveRange().getRow(); var CellColumn = SpreadsheetApp.getActiveRange().getColumn(); var sheetName = SpreadsheetApp.getActiveSheet().getSheetName(); if (and(sheetName == "MainView", CellColumn == 6)) { sheet.getRange(CellRow, CellColumn).setFormula("=DATEDIF(C" + CellRow ",TODAY()," Browser.msgBox("DON'T MESS WITH THE FORMULAS!"); } }
type: UnansweredQuestion
downvote count: 2
has title: missing ) after argument list DATEDIF
has answer: http://stackoverflow.com/a/29516304
type: Question
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/29516211

http://stackoverflow.com/comment/47036156
comment on: http://stackoverflow.com/q/29433240
score: 3
has text: I have no clue what you are asking.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29455225
score: 0
has comment: http://stackoverflow.com/comment/47075513
accepted answer of: http://stackoverflow.com/q/29455160
type: AcceptedAnswer
has body: On a quick glance I can see a couple of errors in the JS. Javascript variables are created with a var syntax like var size_li = $("#myList li").size(); or var x = 3. Once these are created we can assign them values directly like x = 4. $(document).ready(function () { var size_li = $(".carousel-row").size(); var x=3; $('.carousel-row:lt('+x+')').show(); $('#loadMore').click(function () { x= (x+5 &lt;= size_li) ? x+5 : size_li; $('.carousel-row:lt('+x+')').show(); }); $('#showLess').click(function () { x=(x-5&lt;0) ? 3 : x-5; $('.carousel-row').not(':lt('+x+')').hide(); }); }); The #showMore and #showLess buttons need to be added to the html to trigger the click functions also, but we are now targetting .carousel-row to check how many rows exist.
type: Answer
has comment: http://stackoverflow.com/comment/47075375
has comment: http://stackoverflow.com/comment/47075618
answers question: http://stackoverflow.com/q/29455160

http://stackoverflow.com/q/29515247
has answer: http://stackoverflow.com/a/29515582
has answer: http://stackoverflow.com/a/29515518
has body: I have a question that was answered before probably, but I was not able to make a code work. I have an , and once the user click on it, it should scroll down (with animation) to a div with id "page-contact". It does take me to the form but with no animation Here is the code: Contact $('.page-contact').on('click', function(event) { var target = $(this.href); if( target.length ) { event.preventDefault(); $('html, body').animate({ scrollTop: $("#page-contact").offset().top }, "slow"); } });
answer count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29515582
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47186002
has comment: http://stackoverflow.com/comment/47186056
score: 1
has comment: http://stackoverflow.com/comment/47185969
has comment: http://stackoverflow.com/comment/47186277
has answer: http://stackoverflow.com/a/29515606
linked to: http://stackoverflow.com/q/3432656
possible better answer: http://stackoverflow.com/a/29515468
downvote count: 0
has answer: http://stackoverflow.com/a/29515468
has title: Scrolling to a div using jquery
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/94205486
score: 3
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29497886
has text: Also note how you get a significant speed-up by using `let i` instead of `var i`, which makes it a local variable.

http://stackoverflow.com/q/29400692
has comment: http://stackoverflow.com/comment/46977321
favorite count: 0
upvote count: 5
has comment: http://stackoverflow.com/comment/46977274
has answer: http://stackoverflow.com/a/29400872
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46977331
has title: Javascript optional if else inside constructor
has comment: http://stackoverflow.com/comment/46977638
has comment: http://stackoverflow.com/comment/46977213
has comment: http://stackoverflow.com/comment/46977298
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29400997
score: 4
has body: Here's the code to start with. function person(name, age, child){ this.name = name; this.age = age; if(this.child == undefined){ this.child = 'default'; }else{ this.child = child; } } var sarah = new person('sarah',34,true); document.write(sarah.child+' '); So I'm trying to make an optional property inside a constructor function. But whatever I put inside the child parameter it always says 'default' when printed out. I am exceedingly new to JS, just came off php. No idea why this isn't working. I've looked at other questions, tried to follow, but what I try from them doesn't seem to help.
answer count: 2
has comment: http://stackoverflow.com/comment/46977262
downvote count: 1

http://stackoverflow.com/a/29450946
score: 3
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29450896
answers question: http://stackoverflow.com/q/29450896
has body: You need to place your code in : // A $( document ).ready() block. $( document ).ready(function() { // Your code here. }); Else your code wont work. In jsfiddle you can see on the left the javascript is loaded onDomready
type: Answer
downvote count: 0

http://stackoverflow.com/a/29398392
upvote count: 0
has comment: http://stackoverflow.com/comment/46973066
has comment: http://stackoverflow.com/comment/46973938
type: Answer
answers question: http://stackoverflow.com/q/29397909
has body: You can add an event listener in your JS file to listen for the position of that ID. In other words, you'll probably need to make a directive that is attached to the thing you want to display, and in that directive you want to have the position always sending. So, use jquery in a new directive, and have it ping it's position, then if the position of that is a y value that is on the monitor bingo. In other words, if your monitor is 1000px high, and your element is 1400px below, you scroll 400px downward, jquery will recognize that your window scroll height has changed, then you can fire off a function. Don't want to give you the code, but a high-level understanding. Does this help? $("#scrollid").scroll(function(){ // get current window height //then get id position on page // if window scroll overlaps with id position, set display:bock or whatever })
downvote count: 1
score: -1

http://stackoverflow.com/a/29434761
type: Answer
has comment: http://stackoverflow.com/comment/47040057
has body: First, function formhash(form, password) is outside the scope of $(function(){ block. So, the alert is being fired, but formhash is undefined. Move your formhash block inside of the $(function(){ block. Next, what is being sent to the formhash function? Try this instead: function yourfunction(event) { alert('some anchor clicked'); formhash($("form")[0], $("#password")); return false; } Also, hex_sha512 is undefined. Hope this all helps!! Working demo: http://jsfiddle.net/6bL6kj54/3/
upvote count: 1
has comment: http://stackoverflow.com/comment/47039800
accepted answer of: http://stackoverflow.com/q/29434394
has comment: http://stackoverflow.com/comment/47039744
score: 1
has comment: http://stackoverflow.com/comment/47038957
has comment: http://stackoverflow.com/comment/47039646
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47039710
has comment: http://stackoverflow.com/comment/47039812
answers question: http://stackoverflow.com/q/29434394

http://stackoverflow.com/comment/47202988
has text: Yeah but data attribute are added to create a separation between logic and design. But sure, it's working with classes
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29523804
type: AnswerComment

events
tags question: http://stackoverflow.com/q/29502314
tags question: http://stackoverflow.com/q/29384371
tags question: http://stackoverflow.com/q/29493384
tags question: http://stackoverflow.com/q/29475295
tags question: http://stackoverflow.com/q/29458804
tags question: http://stackoverflow.com/q/29379798
tags question: http://stackoverflow.com/q/29406509
tags question: http://stackoverflow.com/q/29480076
tags question: http://stackoverflow.com/q/29398763
tags question: http://stackoverflow.com/q/29513423
tags question: http://stackoverflow.com/q/29423624
tags question: http://stackoverflow.com/q/29480055
tags question: http://stackoverflow.com/q/29519459
tags question: http://stackoverflow.com/q/29420996
tags question: http://stackoverflow.com/q/29413697
tags question: http://stackoverflow.com/q/29374487
tags question: http://stackoverflow.com/q/29451372
tags question: http://stackoverflow.com/q/29402437
tags question: http://stackoverflow.com/q/29496378
tag name: events
tags question: http://stackoverflow.com/q/29393636
tags question: http://stackoverflow.com/q/29461609
type: Tag
tags question: http://stackoverflow.com/q/29511243

http://stackoverflow.com/comment/47153589
score: 0
has text: @WPMed How can I access to this JSON elements? `code {"d":"[{\"aa\":\"11111111111111111111\",\"bb\":\"222222222222222222\"},{\"aa\":\"33333333333333333333\",\"bb\":\"444444444444444444\"}]"} `
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29473011

http://stackoverflow.com/comment/47187439
type: Comment
comment on: http://stackoverflow.com/q/29516044
score: 0
has text: Why not jquery and ajax ?
type: QuestionComment

http://stackoverflow.com/comment/47040179
has text: Yes, `if (status == google.maps.DirectionsStatus.OK)` is just to be sure that the call to googlemaps DirectionsService is ok
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29434041

http://stackoverflow.com/q/29379129
tagged with: testing
tagged with: protractor
downvote count: 0
tagged with: javascript
has body: I am currently facing an issue with angular's ng-repeat directive containing multiple, piped filters when running it during a Protractor test suite. Although I can see Protractor click the sort/toggle button, the list does not change as it should. I expect it to sort the list and only show some items when clicking special toggle buttons. However, when I execute all the commands manually (in the same browser!), it works just fine! Please find how I call Protractor: element(by.id('customers_sort_id')).click(); browser.driver.sleep(500); browser.waitForAngular(); expect(element.all(by.repeater('c in list.customers')).get(0).all(by.tagName('td')).first().getText()).toEqual('500'); I have built in the sleep() command as well as the waitForAngular() call just for debugging reasons, but they also change nothing. These are two toggle buttons whether to display company customers, private customers, both types or none: Companies Private This is one of the table header rows with sorting functionality: This is how the filter variable is set: $scope.toggleSort = function(column) { if($scope.list.orderBy == column) { $scope.list.reverse = !$scope.list.reverse; } $scope.list.orderBy = column; }; This is the table body: Neither the orderBy nor the reverse filter do anything. Sorting it manually works as expected. When running Protractor tests, the sort functionality just doesn't work. Does anyone have an idea why?? Thanks for any input!
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/46938616
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47169049
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/46971489
has title: angular chained orderby not updating when running protractor tests in browser
upvote count: 1
type: Question

http://stackoverflow.com/comment/47363397
comment on: http://stackoverflow.com/q/29519680
score: 0
type: Comment
type: QuestionComment
has text: The first example is very dense from the perspective of the number of SVG elements in the view. The second is relatively sparse. If you examine either image carefully, you'll note shading that indicates the endpoints of individual polyline segments. This is the effect I wish to duplicate.

http://stackoverflow.com/q/29437347
has title: Swift search function
tagged with: javascript
tagged with: uiwebview
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47044071
tagged with: swift
answer count: 0
has comment: http://stackoverflow.com/comment/47044659
type: Question
tagged with: search
has body: The following is the JavaScript I have which functions what I am after is "Swift " which will do the same thing. The search would be working on a HTML file not on a table as almost every search tutorial I have seen does. I am not asking for this code to be translated, although that would be great, I am after somewhere to find out where I can learn how to write a similar function that will get me the same results. Any help would be great. &lt;script&gt; function FindNext () { var str = document.getElementById ("findInput").value; if (str == "") { alert ("Please enter some text to search!"); return; } if (window.find) { var found = window.find (str); if (!found) { alert ("The following text was not found:\n" + str); } } } &lt;/script&gt;
score: 0

http://stackoverflow.com/comment/46984877
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29393851
has text: Thank you again for the quick response but for some reason the second query just doesn't reduce the number of results from the first. What I need is to filter the results from the first query using the second one.
score: 0

http://stackoverflow.com/q/29436788
tagged with: javascript
linked to: http://stackoverflow.com/q/10059940
tagged with: google-maps-api-3
has body: I found something that is close to my problem here: Storing Google Map Markers and Selecting a specific marker from it However, I've studied the code there hard and I just can't quite figure out how to implement it into mine. Here is what I have: var t = { name:"sdf", lat:123, lng:-123, address:"asd", link:"http://www.google.com" }; a[0] = t; var t = { name:"sdf", lat:123, lng:-123, address:"asd", link:"http://www.google.com" }; a[1] = t; for (var i = 0; i &lt; a.length; i++) { var latlng = new google.maps.LatLng(a[i].lat,a[i].lng); map.addMarker(createMarker(a[i].name,latlng,a[i].address,a[i].link)); }; This code is within the initialize function. I placed this code outside the function after the dom listener for initialize: google.maps.event.addListener(marker[[a[0]], "click",function(){ alert("worked!") }); Thing is, I need to be able to select a specific marker to do something different than the rest. I even tried giving an additional variable the same value as a[0] sort of like what they did in the link. But putting that variable in the marker brackets didn't work either. Here is the code that creates the markers: function createMarker(name,latlng,address,link) { var marker = new google.maps.Marker({position: latlng, map: map}); google.maps.event.addListener(marker, "click", function() { if (infowindow) infowindow.close(); infowindow = new google.maps.InfoWindow({content:"&lt;div class='buildingInfo'&gt;" + name + "&lt;br&gt;" + "&lt;a href='" + link + "'&gt;" + address +"&lt;/a&gt;" + "&lt;/div&gt;"}); infowindow.open(map, marker); }); return marker; };
tagged with: google-maps-markers
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47045260
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29443814
score: 1
has title: How can I select a specific marker from my array?
has comment: http://stackoverflow.com/comment/47043502
type: Question
upvote count: 2
answer count: 2
linked to: http://stackoverflow.com/q/24697284
has answer: http://stackoverflow.com/a/29437948

http://stackoverflow.com/comment/98470044
comment on: http://stackoverflow.com/a/29398962
type: Comment
has text: For anyone stumbling upon this and looking for a cross-browser solution that includes Firefox (though possibly not very performant), see my answer over at this question: https://stackoverflow.com/questions/55906822/how-to-make-an-hover-effect-on-two-overlapping-shapes-in-svg?noredirect=1#answer-55907287
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47144203
type: Comment
has text: @RicardoSimoes There are many. You'll have to share more code if you want us to find out. If you have a jquery version below 1.7 this would also make your code not work (no support for `.on`)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29475236

http://stackoverflow.com/q/29527580
has comment: http://stackoverflow.com/comment/47218346
score: 0
upvote count: 1
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/47210752
favorite count: 0
has title: How to Fetch a Select Element Value using $_POST in PHP
tagged with: php
has answer: http://stackoverflow.com/a/29533576
accepted answer: http://stackoverflow.com/a/29533576
type: AnsweredQuestion
has body: Although, this is such a simple question, but I still cannot figure it out. I'm working on a PHP file that is used to get some data from my database and then store it in a jSON string variable $result. I tried to get some value from my select option value element in my HTML using $_POST, and used it in my query. But, unfortunetly, it didn't work. No data stored in my array variable. 'namgi' & 'notrafo' is my select element's name that i will be used in the query. this is my php code [getdata.php]: <?php $server= "localhost"; $user="root"; $pass=""; $namagis=($_POST['namgi']); $notrafos=($_POST['notrafo']); $con = mysql_connect($server,$user,$pass); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("data", $con); $query = mysql_query("SELECT * FROM `ukur` WHERE NamaGI=\"$namagis\" && NoTrafo=$notrafos"); $bS = array(); $bS['name'] = 'Beban S'; $bT = array(); $bT['name'] = 'Beban T'; while($r = mysql_fetch_array($query)) { $bS['data'][] = $r['BebanS']; $bT['data'][] = $r['BebanT']; } $result = array(); array_push($result,$bS); array_push($result,$bT); print json_encode($result, JSON_NUMERIC_CHECK); mysql_close($con); ?> The $result variable above, will be used in my Highchart script function. the script $.getJSON("getdata.php", function(json) { options.series[0] = json[0]; options.series[1] = json[1]; chart = new Highcharts.Chart(options); }); My HTML Code Choose.. One Two Choose.. a b I have searched the solutions in the internet, but still cannot figure it out. A beginners problem :D, So, I hope anyone could help me out. Thanks.,
tagged with: mysql
has comment: http://stackoverflow.com/comment/47210614
type: Question
has comment: http://stackoverflow.com/comment/47218599
has comment: http://stackoverflow.com/comment/47220112
tagged with: javascript
has comment: http://stackoverflow.com/comment/47218873

http://stackoverflow.com/q/29495620
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47150148
tagged with: authentication
has body: I would like to make auto login on my web site tto as I login in my android app. Mostly, this web will be shown on android. So I want to make my user easy to login when they use my web site. Right now, I can see only login with javascript on facebook developer page. For it, we need to type user's id and password. I wonder that is there any way to get login information from their local facebook application to auto login on my website using javascript if they are not logged in on web. Thank you to read this. Have a nice day :)
downvote count: 1
type: Question
tagged with: javascript
score: -1
has title: how to auto login using js
has answer: http://stackoverflow.com/a/29495842
upvote count: 0

http://stackoverflow.com/q/29425837
has comment: http://stackoverflow.com/comment/47022755
score: 0
has answer: http://stackoverflow.com/a/29425859
answer count: 1
type: UnansweredQuestion
has body: Hello I am trying to create Tetris in JavaScript. I have map object with a variable called data. When I'm calling a function from the object, the 'this' is no longer the object but the local function I think. I have tried using declaring a variable _this = this in the objects constructor but doesn't help. function Map(width, height){ var _this = this; this.data = []; for(var i = 0; i &lt; width; i++){ var row = []; for(var n = 0; n &lt; height; n++){ row.push("0"); } this.data.push(row); } } Map.prototype.add = function(x, y, shape){ for(var i in shape){ for(var n in shape[i]){ _this.data[x+i][y+n] = shape[i][n]; } } } var colMap = new Map(23,30); var selectedShape = new FallingShape(0, 0, getShapeArray(randomShapeId(), 0)); colMap.add(selectedShape.x, selectedShape.y, selectedShape.shapeArray); I'm trying to change the values of data but can't because of the scope, I've tried the '_this' trick but doesn't work. Can anyone help me understand? Heres a link to a codepen page if you want to see the whole code. http://codepen.io/taylorlutjen/pen/OPGwoo?editors=001
has title: Javascript object's this scope, _this not fixing
has comment: http://stackoverflow.com/comment/47022774
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47022786

http://stackoverflow.com/comment/47186910
type: QuestionComment
comment on: http://stackoverflow.com/q/29515734
score: 0
type: Comment
has text: I think you are missing a matching ")" from .controller(

http://stackoverflow.com/comment/46952882
comment on: http://stackoverflow.com/q/29387368
score: 0
has text: where are you calling checkAlphabets from?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46993579
comment on: http://stackoverflow.com/a/29409456
type: Comment
has text: @I'll-Be-Back Does the curl script download the updated report to the browser of does it update the report itself? If it just downloads the updated report, why do you actually need to send the requests? If it also updates the report, a cronjob will be a more suitable solution.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29374888
upvote count: 3
tagged with: angular-material
answer count: 1
has answer: http://stackoverflow.com/a/30463496
has title: Angular Ui Router not loading view when accessing url [material-ui + tabs]
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/48591688
tagged with: javascript
type: UnansweredQuestion
score: 3
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/48611902
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/48615748
has body: I'm using Angular + material-ui and basically I want to do an onboarding process with different steps so I'm using the tabs directive , each with a different ui-view. Html: <md-tabs md-selected="$root.selectedIndex" md-border-bottom class="md-primary"> Welcome Personal This is my routes config: angular.module('onboarding').config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { $stateProvider .state('start', { url: '/:memberId', views: { vStart: { templateUrl: 'views/start.html', controller: 'StartCtrl' } } }) .state('personal', { url: '/:memberId/personal', views: { vPersonal: { templateUrl: 'views/personal.html', controller: 'PersonalCtrl' } } }) ... The function goTo(status): $scope.goTo = function(state) { $state.transitionTo(state, $stateParams); }; The problem is mainly that if I open the "home" at url localhost:9000/#/12345 it's working fine, I see the start view and I can switch to the personal view with $rootScope.selectedIndex = 1; $state.transitionTo('personal', $stateParams); But if I open the url straight from localhost:9000/#/12345/personal nothing is happening, the view is not loaded and also the controller is not loaded. I have a console.log('start controller') and same console.log('personal controller') to check when they are loaded. Also the browser history is not working, for example I go to the start page locahost:9000/#/12345 and then click on the button to go to localhost:9000/#/12345/personal everything is all right but then if I go back with browser history the url is localhost:9000/#/1245 (correct) but the view is totally empty and no controller loaded at all.

http://stackoverflow.com/q/29422867
tagged with: javascript
tagged with: parse-cloud-code
score: 0
tagged with: parse-platform
type: UnansweredQuestion
has body: I just start learning how to modify my database in Parse.com. I'm using cloud code in my mac. In my database, I got around 150 data, with class openhour and closehour. Unfortunately, it was written in string. It's structure is like this 12:30. I want to convert all of it from string to number, and store it in class openHour and closeHour. For an example, I will change 12:30 as string, to 12.5 as number. I've wrote this code, deploy it, and execute it using terminal in mac. It seems succeeded since I can see some of my data in class openHour and closeHour are being filled. My problem is, there are several data that are still empty. Can someone show me why this is happening? did I miss something? var _ = require('underscore.js'); Parse.Cloud.define("openclose", function(request, response) { Parse.Cloud.useMasterKey(); var query = new Parse.Query("Places"); query.limit = 1000; query.find().then(function(results) { _.each(results, function(result) { var openString = result.get("openhour"); var openHourString = openString.slice(0,2); var openHour = Number(openHourString); var openMinuteString = openString.slice(3); var openMinute = Number(openMinuteString); result.set("openHour", openMinute/60 + openHour); var closeString = result.get("closehour"); var closeHourString = closeString.slice(0,2); var closeHour = Number(closeHourString); var closeMinuteString = closeString.slice(3); var closeMinute = Number(closeMinuteString); result.set("closeHour", closeMinute/60 + closeHour); }); return Parse.Object.saveAll(results); }).then(function(results) { response.success(results); }, function(error) { response.error(error); }); });
has answer: http://stackoverflow.com/a/29440591
type: Question
has title: cloud code in parse.com doesn't work to all data
answer count: 1

http://stackoverflow.com/comment/47455677
type: Comment
has text: I managed the problem with a easy to implement and customize plug in.
score: 0
comment on: http://stackoverflow.com/q/29432147
type: QuestionComment

http://stackoverflow.com/comment/47028920
type: AnswerComment
has text: Thanks a million, this problem has been bothering me for ages.
score: 0
comment on: http://stackoverflow.com/a/29429446
type: Comment

http://stackoverflow.com/comment/47225017
type: Comment
comment on: http://stackoverflow.com/a/29512785
has text: thanks @icza for your detail description. I'm already populating dropdown by rendering html return via ajax in input.html `$("#divPlaceholderForDropDown").empty(); $("#divPlaceholderForDropDown").append(data); ` Don't we have anything parallel to partial rendering of go templates ?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46962647
has text: hello & thanks for looking in. JSFiddle says the code is valid.
type: QuestionComment
comment on: http://stackoverflow.com/q/29392117
type: Comment
score: 0

http://stackoverflow.com/q/29376735
has comment: http://stackoverflow.com/comment/46934477
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46934740
has body: I am trying to display a webpage inside a div using object tag of html. I have tried loading it inside a div but since the host name of that webpage differes, it gives CORS error. Also tried iframe but it requires scrolling='no' to remove scrollbars. So, I decided to use object tag after referring https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object. I am able to remove the scroll bars if I specify fixed height and width in pixels. However, I want to decide this dynamically based on screen resolution to avaoid scrollbars appearing for any devices/browsers. How can I achieve this? Below is my code snippet. &lt;div style="width: 100%; overflow:hidden;"&gt; &lt;!-- Main content goes here --&gt; &lt;object type="text/html" data="&lt;%=url%&gt;" style="overflow: auto;" align="middle" standby="Loading ..." id="py-content"&gt; &lt;/object&gt; &lt;/div&gt; I really appreciate any help on this.
score: 0
has title: How to set height and width of object tag so that no scrollbars appear
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47371280
answer count: 0
has comment: http://stackoverflow.com/comment/46934156
type: Question

http://stackoverflow.com/comment/46998440
has text: Btw, have you added in your HTML?
comment on: http://stackoverflow.com/a/29411946
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/52915456
score: 0
comment on: http://stackoverflow.com/a/29398962
type: Comment
has text: I mean sure, it was just an example. But replacing `covered` with just a single `lastEvent` works also and fixes that problem. http://jsfiddle.net/michaschwab/w0wufbtn/13/
type: AnswerComment

http://stackoverflow.com/q/29449608
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I'm new to this datepicker and I don't know how to get the month and year string on change events changeMonth and changeYear. Here is a link to the plugin: https://github.com/eternicode/bootstrap-datepicker The issue is that onchange captures only the transition from months to years. I am only able to get the day/date of the selected date, and nothing is selected during transition. I tried to grab text from the div, but I am always one selection too late. How can I get the month and year of the value that is selected after a transition. To clarify: getYear() when we see all 12 months after changing from the decade view getMonth() when we see days after the month view Heres my fiddle: http://jsfiddle.net/vj3cdzbc/2/
upvote count: 7
has answer: http://stackoverflow.com/a/29454651
accepted answer: http://stackoverflow.com/a/29454651
favorite count: 0
tagged with: twitter-bootstrap
tagged with: datepicker
has title: How to get year and month of Bootstrap Datepicker as it on change
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/58603167
tagged with: twitter-bootstrap-3
downvote count: 0
score: 7
possible better answer: http://stackoverflow.com/a/58603167
type: Question

http://stackoverflow.com/comment/46974718
comment on: http://stackoverflow.com/a/29390589
type: AnswerComment
score: 0
type: Comment
has text: here the fiddler way: https://jsfiddle.net/uh8m2wax/4/ - updated my copy paste sample with `.val()` instead of `.text()`

http://stackoverflow.com/q/29496178
tagged with: javascript
type: UnansweredQuestion
answer count: 4
has answer: http://stackoverflow.com/a/29496353
has comment: http://stackoverflow.com/comment/47151251
has answer: http://stackoverflow.com/a/29496371
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29496414
has answer: http://stackoverflow.com/a/29496225
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
has body: I am attempting to clone an HTML &lt;select&gt; dropdown one to many times, given a json response. The issue is that when I attempt to store the clone in a variable and display it on the screen all I see is the following: [object Object] I made a simple JSFIDDLE to help explain my issue. Things to note: The select dropdown is in a hidden div. &lt;div class="hidden"&gt; &lt;select class="certList"&gt; ..... &lt;/select&gt; &lt;/div&gt; I am building a string using: buildList += "&lt;div.... I then append the list I build using the jQuery append function. $("#certRow").append(buildList); Lastly if there are any tips to how I should display the results better I am all ears. I was thinking on using an unordered list but wasn't sure how to.
has title: Clone an html element one too many times
upvote count: 1
downvote count: 1
tagged with: clone
tagged with: http://stackoverflow.com/tag/json

datatables
tags question: http://stackoverflow.com/q/29483138
tags question: http://stackoverflow.com/q/29406924
tags question: http://stackoverflow.com/q/29399222
tags question: http://stackoverflow.com/q/29487684
tags question: http://stackoverflow.com/q/29387415
tags question: http://stackoverflow.com/q/29438104
tags question: http://stackoverflow.com/q/29514357
tags question: http://stackoverflow.com/q/29463645
tags question: http://stackoverflow.com/q/29377216
tags question: http://stackoverflow.com/q/29395272
tags question: http://stackoverflow.com/q/29401725
tags question: http://stackoverflow.com/q/29449056
tags question: http://stackoverflow.com/q/29485359
tags question: http://stackoverflow.com/q/29393464
tags question: http://stackoverflow.com/q/29414350
tags question: http://stackoverflow.com/q/29440564
type: Tag
tags question: http://stackoverflow.com/q/29484426
tag name: datatables
tags question: http://stackoverflow.com/q/29391263

http://stackoverflow.com/a/29516782
downvote count: 0
has body: You can track the sum using an observer. This has the advantage of not having to reiterate the entire array each time a value changes. (see http://jsfiddle.net/tL8ofLtj/): oninit: function () { this.observe('items.*.size', function (newValue, oldValue) { this.add('sum', (newValue||0) - (oldValue||0) ); }); }
answers question: http://stackoverflow.com/q/29509419
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/29403551
tagged with: handlebars.js
answer count: 0
has comment: http://stackoverflow.com/comment/46986349
type: Question
has title: Grunt-Spritesmith: How can I lowercase the file name in the handlebar template?
has comment: http://stackoverflow.com/comment/46996794
tagged with: javascript
tagged with: gruntjs
has body: I have this: {{#items}} .ts-{{name}} { background-position: sprite_position_percentage( {{px.offset_x}}, {{px.offset_y}} ) } {{/items}} How can I lowecase the name variable? I tried {{name.toLowerCase()}} but the output produced was missing the name parameter: .ts- { background-pos...
score: 0
has comment: http://stackoverflow.com/comment/46982483
linked to: http://stackoverflow.com/q/9011228
tagged with: grunt-spritesmith
type: UnansweredQuestion

http://stackoverflow.com/comment/47011616
type: AnswerComment
has text: Thanks, yeah that works. But the whole reason I am wanting this is so that I can then set a "value", so I would use something like "value='blue'" (this would show all values just in blue, with in the value blue), so that with my HTML table and select box, I would select a blue entry in the select box, and then it would change the text field blue. I want the same with green, and the same with orange. Thanks
type: Comment
comment on: http://stackoverflow.com/a/29401079
score: 0

http://stackoverflow.com/q/29527415
has comment: http://stackoverflow.com/comment/47218407
answer count: 2
has comment: http://stackoverflow.com/comment/47218943
has comment: http://stackoverflow.com/comment/47210824
downvote count: 0
has comment: http://stackoverflow.com/comment/47218171
favorite count: 0
type: UnansweredQuestion
score: 2
upvote count: 2
has body: I am running a phantom js process to render a webpage. The webpage has many javascripts loaded asynchronously, each running their own functions. Is there a way to inspect/debug the javascript engine in webkit to know if it is currently executing any javascript line (as opposed to being idle)? If so, is there a way to tell from which javascript resource it is executing? Something like pausing the javascript engine, logging the stack trace, then resuming it as normal would do perfectly. I don't mind reading through the source code of webkit, phantomjs, or render.js, modifying it myself, and re-compiling it from source. I'd like to ask you guys first though in case a feature already exists or if someone's already done it since Google didn't give me any results. Thanks!
type: Question
has title: PhantomJS - any way to check if a javascript function is running?
tagged with: phantomjs
has answer: http://stackoverflow.com/a/29543233
has answer: http://stackoverflow.com/a/29527674
tagged with: javascript
linked to: http://stackoverflow.com/q/11340038

http://stackoverflow.com/comment/46987644
type: QuestionComment
has text: You can use HTML inputs inplace of asp.net controls
score: 0
comment on: http://stackoverflow.com/q/29406395
type: Comment

http://stackoverflow.com/comment/47121508
type: AnswerComment
has text: Using this code, I should still be able to create more than 1 requirement to work right? For example if (myInput.value == "start" && currentRoom = true) or something along those lines? That way I can use the same form box throughout the entire game.
comment on: http://stackoverflow.com/a/29480101
type: Comment
score: 0

http://stackoverflow.com/comment/47124463
score: 0
has text: @EvanTrimboli but how to remove that warning
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29481767

http://stackoverflow.com/comment/47090774
comment on: http://stackoverflow.com/q/29463559
type: Comment
score: 0
has text: in other word, I want the click on a A button able to be detected by a B element, with nothing other link that the event itself (I would like to not have to write into the function something like "when click on A, change B". I want something like : "B, when A is clicked, change yourself"
type: QuestionComment

http://stackoverflow.com/comment/47285056
type: Comment
has text: However, you should never need to put JSON within a js string literal
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29513416

http://stackoverflow.com/q/29477489
type: Question
has body: I have a function which the output shows as a list: email1 email2 email3 … What I am trying to achieve is to have an array output that looks like: email1, email2, email3, … Any idea how could I convert the list ? $(document).ready(function(){ $(".select_email").click(function(){ var val = []; $(':checkbox:checked').each(function(i){ val[i] = $(this).val(); var arr = jQuery.makeArray( val[i] ); arr.push(val[i]); document.getElementById("demo").innerHTML = arr; console.log(arr); }); }); });
has answer: http://stackoverflow.com/a/29477769
has answer: http://stackoverflow.com/a/29477657
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery
upvote count: 1
has title: JS - List to an array separated by coma
possible better answer: http://stackoverflow.com/a/29477662
favorite count: 0
has answer: http://stackoverflow.com/a/29477626
answer count: 5
tagged with: php
has answer: http://stackoverflow.com/a/29477693
accepted answer: http://stackoverflow.com/a/29477693
type: AnsweredQuestion
tagged with: list
score: 1
has answer: http://stackoverflow.com/a/29477662

http://stackoverflow.com/comment/47109763
score: 0
comment on: http://stackoverflow.com/a/29473833
type: Comment
type: AnswerComment
has text: Updated the snippet to do the auto refresh.

http://stackoverflow.com/q/29374028
has answer: http://stackoverflow.com/a/29374314
tagged with: angular-ui-bootstrap
has comment: http://stackoverflow.com/comment/46928627
has title: angular-ui-bootstrap: disable group header after expanding
has comment: http://stackoverflow.com/comment/46928729
has body: I have a requirement to disable the collapse operation on click of the angular-ui-bootstrap accordion-group. It should expand on click but not collapse if clicked again, rather it should get collapsed on click of any other accordion-group(which is a default behavior. Any suggestions appreciated.
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46928703
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29374314
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/29446283
answers question: http://stackoverflow.com/q/29446242
has body: I use JavaScript plus jQuery for animations. CSS is (don't judge) in my opinion excellent only for styling the animations. However, CSS3 made a huge improvement, and future versions might make CSS the perfect tool for animation. So, if you already know CSS, I say learn basic JavaScript and learn how to animate with jQuery, and style your animation with CSS.
score: 0
type: Answer

http://stackoverflow.com/comment/46953510
comment on: http://stackoverflow.com/q/29387698
has text: I control the result of the getPhotoName, but I do not control message
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29492541
type: AcceptedAnswer
type: Answer
score: 7
answers question: http://stackoverflow.com/q/29492501
upvote count: 7
has body: It does not work because of a typo positions.push[fulltxt]; ^ ^ should be positions.push(fulltxt); ^ ^ And it appears you are trying to reinvent $(this).text(). You can also use map() var positions = $('.category-description TABLE TD') .map(function() { return $(this).text(); }) .get();
accepted answer of: http://stackoverflow.com/q/29492501
downvote count: 0

http://stackoverflow.com/comment/47131872
comment on: http://stackoverflow.com/q/29486216
has text: How exactly doesn't it work? Any errors in the console?
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29380697
has body: I am working on a site, and have the code below. What I'm trying to do is show a full screen absolute positioned video that takes the size of whatever the browser currently is, then show content under it. Since it's an absolute position div and I can't clear the div, I need to get the height of that div, then set the "margin-top" property to the height of the div for the content below the video. #bgvid { border: solid 4px blue; position: absolute; right: 0; bottom: 0; min-width: 100%; min-height: 100%; overflow-y: hidden; width: auto; height: auto; z-index: -1; } .wrap{ height: 500px; border: solid 4px black; } .... .... lorem ipsum .... .... So this shows the .wrap div under the #bgvid div when the page loads, but when I resize the browser the position of the .wrap div stays where it was placed on loadand I need to reload in order to put it in the correct position under the video, obviously because the script will run everytime the page loads. This is fine when someone opens the page on a phone or tablet, but if someone resizes their browser it will look screwy until they reload. So my question is if there is a way to constantly get that height of the #bgvid div to feed into jquery?
has title: Dynamically clearing an absolute positioned div based on browser size with jquery .css() property
accepted answer: http://stackoverflow.com/a/29380774
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/29380774
type: Question
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46941224

http://stackoverflow.com/comment/47081953
type: Comment
has text: jQuery isn't tagged in the question, also the question isn't how to toggle elements. The question is "*am I doing something wrong or can someone point me in the right direction*" so correcting the existing source code would be the correct answer.
score: 1
comment on: http://stackoverflow.com/a/29458932
type: AnswerComment

http://stackoverflow.com/q/29523210
type: Question
type: AnsweredQuestion
has title: Steam Web API: I'm not sure what to do with this hash looking url to generate an image with it
tagged with: steam-web-api
tagged with: javascript
has answer: http://stackoverflow.com/a/29523256
upvote count: 1
answer count: 1
favorite count: 0
has body: Using the Steam Web API I load my trade partners inventory which returns an array filled with objects like this: { id: '2063512233', classid: '520025252', instanceid: '0', amount: '1', pos: 2, appid: '730', icon_url: 'fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZYMUrsm1j-9xgEObwgfEgznuShMhvflDOGJG68Didsh4K9W1jtmhA9yIPqKZHlhIgCQUvgKBKBoowq7CyJi7pZlV47jou0EeFrs4dGQYbEtOdsZSsTQRLbYMa0PH-14', icon_drag_url: '', name: 'Operation Breakout Weapon Case', market_hash_name: 'Operation Breakout Weapon Case', market_name: 'Operation Breakout Weapon Case', name_color: 'D2D2D2', background_color: '', type: 'Base Grade Container', tradable: 1, marketable: 1, commodity: 1, descriptions: [ { type: 'html', value: ' ' }, { type: 'html', value: 'Container Series #18', color: '99ccff' }, { type: 'html', value: ' ' }, { type: 'html', value: 'Contains one of the following:' }, { type: 'html', value: 'MP7 | Urban Hazard', color: '4b69ff' }, { type: 'html', value: 'Negev | Desert-Strike', color: '4b69ff' }, { type: 'html', value: 'P2000 | Ivory', color: '4b69ff' }, { type: 'html', value: 'SSG 08 | Abyss', color: '4b69ff' }, { type: 'html', value: 'UMP-45 | Labyrinth', color: '4b69ff' }, { type: 'html', value: 'PP-Bizon | Osiris', color: '8847ff' }, { type: 'html', value: 'CZ75-Auto | Tigris', color: '8847ff' }, { type: 'html', value: 'Nova | Koi', color: '8847ff' }, { type: 'html', value: 'P250 | Supernova', color: '8847ff' }, { type: 'html', value: 'Desert Eagle | Conspiracy', color: 'd32ce6' }, { type: 'html', value: 'Five-SeveN | Fowl Play', color: 'd32ce6' }, { type: 'html', value: 'Glock-18 | Water Elemental', color: 'd32ce6' }, { type: 'html', value: 'P90 | Asiimov', color: 'eb4b4b' }, { type: 'html', value: 'M4A1-S | Cyrex', color: 'eb4b4b' }, { type: 'html', value: 'or an Exceedingly Rare Butterfly Knife!', color: 'ffd700' }, { type: 'html', value: ' ' }, { type: 'html', value: '', color: '00a000', app_data: [Object] } ], tags: [ { internal_name: 'CSGO_Type_WeaponCase', name: 'Cont…
downvote count: 0
score: 1
tagged with: steam
accepted answer: http://stackoverflow.com/a/29523256

http://stackoverflow.com/comment/47212793
comment on: http://stackoverflow.com/q/29529472
score: 0
type: Comment
has text: http://jsfiddle.net/blue1086/qqsefuqe/3/
type: QuestionComment

webspeech-api
tags question: http://stackoverflow.com/q/29484600
tag name: webspeech-api
tags question: http://stackoverflow.com/q/29522985
type: Tag

http://stackoverflow.com/a/29391718
upvote count: 2
has body: My Solution: $('.test').attr('contenteditable', function() { $(this).on('keypress', function(e) { var len = $(this).attr('maxlength'); if ($(this).html().length >= len) { e.preventDefault(); } }); return true; }); div { background: red; } .small { width: 42px; } .medium { width: 82px; } .large { width: 122px; } MaxLength 5: MaxLength 10: MaxLength 15: thx to @cmbuckley. Brought me to the new thinking :D No focus needed because the focus is never lost and chars can be deleted easy.
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29390131
downvote count: 0

http://stackoverflow.com/comment/46963731
has text: do I understand correctly that model.sourcefile will be address like "'D:/jqueryfileuploadmvc4/MVC4Appl/App_Data/1.png'"?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29392844

http://stackoverflow.com/q/29435647
has body: I am just making some settings for my gulpfile.js but I have a problem. I have settings - in js literal object - like this: // Directories var dirs = { source: './src/', build: this.source + 'build/' }; // Files to read. var paths = { sass: { src: dirs.source + 'sass/**/*.scss', dest: dirs.build + 'css/' }, js: { src: dirs.source + 'js/**/*.js', dest: dirs.build + 'js' } }; but, off course, the dirs.build returns ./undefinedbuild/ directory instead of ./src/build/ directory. Is there any way - or different style of settings - how to fix it (how to make settings in JS)? Literal object notation is best looking for me.
tagged with: gulp
has answer: http://stackoverflow.com/a/29453882
accepted answer: http://stackoverflow.com/a/29435936
tagged with: settings
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29453882
type: Question
has answer: http://stackoverflow.com/a/29435936
tagged with: javascript
score: 0
answer count: 2
has title: Gulp settings javascript object

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/29391670
tags question: http://stackoverflow.com/q/29402265
tags question: http://stackoverflow.com/q/29375562
tags question: http://stackoverflow.com/q/29465289
tags question: http://stackoverflow.com/q/29389869
tags question: http://stackoverflow.com/q/29515650
tags question: http://stackoverflow.com/q/29418161
tags question: http://stackoverflow.com/q/29420356
tags question: http://stackoverflow.com/q/29466417
tags question: http://stackoverflow.com/q/29503747
tags question: http://stackoverflow.com/q/29498178
tag name: ruby-on-rails-4

http://stackoverflow.com/comment/46933708
has text: On another note: I don't know why you'd merge all scripts like this. It makes it a nightmare to maintain (and debug, as we can see)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29376407
score: 1

http://stackoverflow.com/a/29406272
answers question: http://stackoverflow.com/q/29405779
has comment: http://stackoverflow.com/comment/46987639
type: Answer
has body: Try onkeyup: var chat = document.chat;// chat form var send = function() { chat.msg.value = ''; chat.msg.focus(); }; var trySend = function(e) { e = e || event; var k = e.keyCode || e.which; if (13 === k) send(); }; Send
score: 0

http://stackoverflow.com/comment/46954691
has text: @ArunD - Change "OnChange" to "OnBlur"... and then try
comment on: http://stackoverflow.com/a/29388172
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29439292
has answer: http://stackoverflow.com/a/29439664
type: Question
has title: Parse: Can a user create another user?
has body: I have read this post: Can a user create another user in parse? but I don't think it answers the question. So I will put the question this way: I am a teacher. I have 20 kids in my class. I want to add them to my application because I this app allows me to enter their grades into Parse for their parents to see. I am currently using my application to create a new user and after I successfully creating a new user, I become that user. I don't want to become that user, I just want to create him and remain myself in the app. How is that possible? My app is currently using the Parse Javascript SDK. And coming soon...it will be on iPhone using Swift. Here is the simple code I am using: var user = new Parse.User(); user.set("username", t_username.value); user.set("password", t_password.value); user.signUp(null, { success: function (user) { alert('New user created!'); //but now i am that user??!?! }, error: function (user, error) { // Show the error message somewhere and let the user try again. alert("Error: " + error.code + " " + error.message); } });
tagged with: javascript
linked to: http://stackoverflow.com/q/26993409
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29442350
tagged with: parse-platform
type: UnansweredQuestion
tagged with: swift
has answer: http://stackoverflow.com/a/29439363

http://stackoverflow.com/comment/47048922
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29439837
has text: It's not really a bug. The default action in Firefox when you move the mouse on a selected piece of text is to invoke drag-and-drop instead of selecting again. So basically what you're doing is attempting to move the whole text somewhere else.
score: 0

http://stackoverflow.com/comment/47154247
score: 0
comment on: http://stackoverflow.com/q/29495808
has text: @ChrisC Even if that case is true -which I can't tell since I use morris.js for the first time, there must be a way to populate dynamically generated data...
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29435770
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29439836
has comment: http://stackoverflow.com/comment/47055198
has comment: http://stackoverflow.com/comment/47046451
score: 3
downvote count: 0
type: Question
tagged with: testing
tagged with: bdd
has body: When having an angular directive that inside its template has a button with ng-click attribute, should I test the effect of actual action taken (clicking) or of, an attached to ng-click attribute, function call? In other words, for a directive, that has a template like this: start should I test what clicking does or what game.start function does? I am aware that later the function game.start can be changed for a different one. Also, ng-click can be removed and click event can be caught in a different way. Unit testing with triggerHandler('click') is tempting but directive's template can also change. That would mean that I need some "proven" access to DOM nodes, namely through id attributes. Should I attach id attributes on nodes just for unit testing sake or should I take a different aproach to the problem?
tagged with: javascript
upvote count: 3
answer count: 1
has title: Ng-click - how to unit test for behaviour
favorite count: 0

http://stackoverflow.com/comment/46947976
score: 0
comment on: http://stackoverflow.com/a/29384606
type: AnswerComment
has text: @Imad Sorry the `About 3.` should have been removed. This is related to all three. The `live` callbacks will always be the last callbacks that are called for the given event, because they are attached to the `document` which is the last element in the bubbling phase
type: Comment

http://stackoverflow.com/a/29458012
has comment: http://stackoverflow.com/comment/47081802
answers question: http://stackoverflow.com/q/29457860
has comment: http://stackoverflow.com/comment/47083492
has comment: http://stackoverflow.com/comment/47084889
has comment: http://stackoverflow.com/comment/47085695
upvote count: 2
has comment: http://stackoverflow.com/comment/47083302
has body: The select is reset and the error disappears because the form is still posted. The value that you return from the function doesn't stop the submission. You should use the onsubmit event on the form instead of onclick on the button. Use return in the event code to convey the value from the function back to the event: &lt;form method="get" action="Chairman.php" onsubmit="return checkDropdown()"&gt;
has comment: http://stackoverflow.com/comment/47083710
has comment: http://stackoverflow.com/comment/47083961
type: Answer
has comment: http://stackoverflow.com/comment/47082721
score: 2
downvote count: 0

http://stackoverflow.com/a/30746551
upvote count: 2
has comment: http://stackoverflow.com/comment/110049712
score: 2
has body: This is what npm-offline could do for you. npm-offline could cache modules, you would just need to create a script that ensures you have the modules that you want cached.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29447071

http://stackoverflow.com/q/29503329
has comment: http://stackoverflow.com/comment/47164473
has body: When viewing apple's website on my iPhone, it has very cool transparent navigation menu bar. I wonder how it is done. website link
type: Question
tagged with: responsive-design
tagged with: javascript
has comment: http://stackoverflow.com/comment/47164893
upvote count: 3
downvote count: 2
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29503380
accepted answer: http://stackoverflow.com/a/29503380
has title: How to create a sliding navigation bar like in apple's website?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47167136
tagged with: css
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/47184030
comment on: http://stackoverflow.com/a/29510537
type: Comment
has text: Then you did so despite of the typos I still have in my quick'n'dirty PostScript code. Hadn't testrun it (still haven't) but now I spotted two errors. To be fixed now...
type: AnswerComment
score: 0

http://stackoverflow.com/q/29477263
downvote count: 0
accepted answer: http://stackoverflow.com/a/29484031
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/47121950
tagged with: youtube
score: 2
type: AnsweredQuestion
has title: Can't Change Focus from Youtube IFrame
tagged with: iframe
possible better answer: http://stackoverflow.com/a/79443507
has answer: http://stackoverflow.com/a/79443507
has answer: http://stackoverflow.com/a/29484031
type: Question
tagged with: javascript
has body: I have a Youtube iFrame and I control playback using keyboard shortcuts. However, when I fast-forward/rewind, the focus changes to the iFrame, which captures subsequent key presses. Thus, I use a simple function to poll when focus changes to the iFrame, and then switch the focus back to the document body. Here is the live code: CODEPEN However, it doesn't work! Even though document.body.focus() is being called, the focus never changes from the iFrame. Any idea how to fix this? Note: The browser I'm using is Chrome 41.0.2272.118 on my Surface Pro 3 (Win 8.1)
answer count: 2

http://stackoverflow.com/comment/47092962
type: AnswerComment
type: Comment
has text: You modify it's top and left CSS properties, or if that doesn't work modify its margin properties.
comment on: http://stackoverflow.com/a/29454146
score: 0

http://stackoverflow.com/q/29525860
type: Question
tagged with: google-apps-script
has answer: http://stackoverflow.com/a/29529913
has answer: http://stackoverflow.com/a/68933501
has title: Cross-domain requests stopped working due to no `Access-Control-Allow-Origin` header present in the response
tagged with: javascript
has answer: http://stackoverflow.com/a/68421505
tagged with: cross-domain
tagged with: cors
has answer: http://stackoverflow.com/a/50806615
linked to: http://stackoverflow.com/q/44910180
downvote count: 0
accepted answer: http://stackoverflow.com/a/29529913
favorite count: 0
has answer: http://stackoverflow.com/a/66249348
has answer: http://stackoverflow.com/a/59387261
answer count: 9
possible better answer: http://stackoverflow.com/a/50806615
has answer: http://stackoverflow.com/a/34243515
linked to: http://stackoverflow.com/q/56502086
type: AnsweredQuestion
score: 21
linked to: http://stackoverflow.com/q/53433938
has answer: http://stackoverflow.com/a/59903865
has body: I have an error reporting beacon I created using Google Apps script and it is published to run as myself and to be accessible to "anyone, even anonymous," which should mean that X-domain requests to GAS are allowed. However, my browsers are now indicating there is no Access-Control-Allow-Origin header on the response after the code posts to the beacon. Am I missing something here? This used to work as recently as two months ago. So long as the GAS was published for public access, then it was setting the Access-Control-Allow-Origin header. In Google Apps Script: Code.gs function doPost(data){ if(data){ //Do Something } return ContentService.createTextOutput("{status:'okay'}", ContentService.MimeType.JSON); } Client Side: script.js $.post(beacon_url, data, null, "json");
upvote count: 21
has answer: http://stackoverflow.com/a/65217449
linked to: http://stackoverflow.com/q/48293261

http://stackoverflow.com/q/29409374
has title: Ionic Show Webpage
tagged with: angularjs
type: UnansweredQuestion
tagged with: android
tagged with: ionic-framework
type: Question
has body: Im building an Ionic WebApp and stumbelt over an problem. I have an webpage with content and i want to use that site as content of an news page on the app. I have been trying and searching for a way to do this for a couple of days now without a acceptable solution. What I tried: Using the ng-include command this showed the info but didnt bring the css and made all the links dead. Using the in-app-browser plugin Just couldnt get it to work. Using an Iframe. This got the best result but on older android devices(android 2.3) I was unable to scroll. I have been searching a lot but just couldn't find anything that worked for me. Good thing to say as well is that my JavaScript knowledge is 0. Thanks
has answer: http://stackoverflow.com/a/29427882
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/47076566
has text: Ah yes, the "previous" page has become the "current" page on Step 2. Is it possible to just call a function on the `onclick` attribute that does the 2 things already?
type: Comment
comment on: http://stackoverflow.com/a/29455960
score: 0
type: AnswerComment

http://stackoverflow.com/q/29383955
type: Question
tagged with: regex
linked to: http://stackoverflow.com/q/4840547
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/29384126
has body: Basically my validation is very simple, but I'm totally new to regex and need this fired up fairly quickly, so here goes: 1234567890 or 123456-7890 it can be, obviously, any number in a range of 0 - 9 and the length must be either 10 or 11 characters. Can you please show me a way to write a function for this?
duplicate of: http://stackoverflow.com/q/4840547
has title: How to write a regex (JavaScript) for an id validation?
tagged with: javascript
has comment: http://stackoverflow.com/comment/46946523
possible better answer: http://stackoverflow.com/a/29384074
type: AnsweredQuestion
tagged with: validation
accepted answer: http://stackoverflow.com/a/29384126
has answer: http://stackoverflow.com/a/29384074
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29384140

http://stackoverflow.com/q/29470101
has answer: http://stackoverflow.com/a/29470659
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/16626735
answer count: 3
has answer: http://stackoverflow.com/a/29470213
has comment: http://stackoverflow.com/comment/47102387
accepted answer: http://stackoverflow.com/a/29470659
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/47102012
has title: How to merge the two array of objects using javascript
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29470532
has answer: http://stackoverflow.com/a/29470532
has comment: http://stackoverflow.com/comment/47102071
has body: How to merge the two array of objects using javascript for given data. var data = [{ "key": 2000, "value": 10000 }, { "key": 2001, "value": 50000 }]; var data1 = [{ "key": [2000, 0], "value": 1000 }, { "key": [2000, 1], "value": 1500 }, { "key": [2000, 3], "value": 2000 }, { "key": [2001, 0], "value": 2500 }, { "key": [2001, 1], "value": 3000 }, { "key": [2001, 3], "value": 4000 }]; And finally out put is given below: var data3 = [{ "key": 2000, "value": 10000, children: [{ "key": [2000, 0], "value": 1000 }, { "key": [2000, 1], "value": 1500 }, { "key": [2000, 3], "value": 2000 }] }, { "key": 2001, "value": 50000, children: [{ "key": [2001, 0], "value": 2500 }, { "key": [2001, 1], "value": 3000 }, { "key": [2001, 3], "value": 4000 }] }]
type: Question
score: 0
has comment: http://stackoverflow.com/comment/47102918

http://stackoverflow.com/q/29425760
has body: i am working on a legacy project where i have seen below piece of code. I know it is a bad practice to use script inside scriptlet. Regarding this , i have few confusion in mind. what i believe is scriptlet is executed before page loads, so if below if condition is true then ShowBookReference() function call is a part of an Html page, but my question is when page is rendered should this function call happens or not ? &lt;% if (refLinkTerm != null) { %&gt; &lt;script Language="javascript"&gt; ShowBookReference('&lt;%=sub2ndNavMenu%&gt;', '&lt;%=refLinkTerm%&gt;', &lt;%=String.valueOf(searchType)%&gt;, &lt;%=String.valueOf(codeType)%&gt;) &lt;/script&gt; &lt;%}%&gt; How to avoid this kind of practice ? Please share your thoughts.
answer count: 2
tagged with: jsp
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29425791
tagged with: scriptlet
type: Question
has title: script inside scriptlet - bad practice how to avoid
tagged with: java
tagged with: javascript
has answer: http://stackoverflow.com/a/29425822
score: 0

http://stackoverflow.com/a/29526573
has body: I would do something like this: distance = 100; //distance between earth and sun. getXPosition = function(angle){ return distance*(Math.cos(Math.PI * (angle/180))); }; getYPosition = function(angle){ return distance*(Math.sin(Math.PI * (angle/180))); }; var x = getXPosition(45); //70.71 from the sun var y = getYPosition(45); //70.71 from the sun And to get the final position just do this: x += 200; //200 = sun position y -= 200; //200 = sun position
downvote count: 0
answers question: http://stackoverflow.com/q/29526438
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/comment/47109782
score: 0
type: AnswerComment
has text: There is a lot of stuff going on there... you should use chrome or firefox developer tools... make sure "randomSelect" and "ipd" still exist in the dom after it is loaded, check for javascript console errors, and put a debug point in the code to see if the vars are getting assigned what you expect.
type: Comment
comment on: http://stackoverflow.com/a/29473964

http://stackoverflow.com/comment/47119913
type: Comment
comment on: http://stackoverflow.com/a/29478385
has text: What about going from A to B?
score: 0
type: AnswerComment

http://stackoverflow.com/q/29446246
has comment: http://stackoverflow.com/comment/47061995
tagged with: javascript
has title: Highcharts not rendering properly with too many series
answer count: 1
tagged with: highcharts
downvote count: 0
has body: luckily highcharts is been integrated to the application but the problem i am facing now is the rendering of the data..it works fine with the small amount of series but as the series goes on increasing the size of the graph displayed gets smaller n eventually nothing is visible..i am confused whether its a css problem or something else here is how it looks: any help I would be glad!!
favorite count: 0
linked to: http://stackoverflow.com/q/16706068
has comment: http://stackoverflow.com/comment/47077889
has comment: http://stackoverflow.com/comment/47183556
has comment: http://stackoverflow.com/comment/47189126
has comment: http://stackoverflow.com/comment/47183582
has answer: http://stackoverflow.com/a/29515664
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47134801

http://stackoverflow.com/a/29377656
score: 1
has body: You can clear the timeout on mouseover and start it again on mouseout. I updated your code: var ct = 0; var myTimeout; function showElem2() { var length = $('.t1').length; $('.t1').hide(); $('.info span').text(ct); $('.t1').eq(ct).fadeIn(900); (ct &gt;= (length-1)) ? ct = 0: ct++; myTimeout = setTimeout(showElem2, 1600); } $(document).ready(function(){ showElem2(); // $('div') is the container you want to attach the mouseover/mouseout event to. $('div').hover(function() { // mouseover clearTimeout(myTimeout); // cancels the timeout }, function() { // mouseout myTimeout = setTimeout(showElem2, 1600); // starts it again (or technically a new timeout) }); }); Probably not the best solution code-wise, but the key here is clearTimeout() which let's you cancel a timeout set with setTimeout().
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29377485
answers question: http://stackoverflow.com/q/29377485
type: Answer
downvote count: 0

http://stackoverflow.com/comment/47168144
type: QuestionComment
has text: I need something which I can set once, after which it applies to all charts on my page, so I don't want to set the same tooltip options for each chart. I suppose a JQuery script would work though, but I can't access JSFiddle.net from here at work.
score: 0
comment on: http://stackoverflow.com/q/29483876
type: Comment

http://stackoverflow.com/comment/47080760
type: Comment
has text: No error messages whatsoever. I know the controller function is executing every time since I've tested that with console.log. I see everything from console.log messages and XHR requests but no errors :/
comment on: http://stackoverflow.com/q/29458184
score: 0
type: QuestionComment

http://stackoverflow.com/q/29506533
has answer: http://stackoverflow.com/a/29506784
tagged with: javascript
tagged with: bootstrapper
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/47170242
has body: I am facing a issue with styling of Ul in IE, but seems to work in chrome browser perfectly. Even after applying this style ul { list-style: none !important; } it does not work in IE and I get a weird look for list element. My observation is this style of bootstrapper.css adds some style *:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box} After toggling on this style in IE browser it removes the liststyle applied. I also tried to add below css for elements but still issue is not solved box-sizing:border-box Please let me know if someone faced similar issue
has title: List style not getting set to none in IE but applies in IE
type: Question
tagged with: internet-explorer

http://stackoverflow.com/comment/47065364
comment on: http://stackoverflow.com/q/29449490
score: 0
type: Comment
type: QuestionComment
has text: I updated the post. Why does the function reverseGeoCode then not react to the published call? And why is the preventDefault error message there?

http://stackoverflow.com/q/29509639
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: extjs
score: 0
has body: I have a problem with grid cell editor. I have the validation for cells, and I need to prevent them from loosing focus in case when validation error happens. That's how I'm doing it: blur: function (field, event) { if (field.value &gt; field.maxValue || field.value &lt; field.minValue) { field.focus(); return false; } }, specialkey: function (field, event) { if (event.getKey() == 9 ) { if (field.value &gt; field.maxValue || field.value &lt; field.minValue) { field.focus(); return false; } } } This part works ok for cases when you try to click anywhere outside the grid, or try to select next cell using Tab. The problem is that if you'll click another cell, I'll still loose focus. That's what debug showed: cell_1 - blur, cell_1 - focus, cell_2 - blur, cell_2 - focus Does anybody got similar problem? Also a bit confusing that if you'll place breakpoint in to the "blur" listener, it will work! Debug will show: cell_1 - blur and no other events.
answer count: 1
has answer: http://stackoverflow.com/a/29563138
accepted answer: http://stackoverflow.com/a/29563138
has title: ExtJS Grid cell editor, prevent focus loose issue

http://stackoverflow.com/q/29503250
type: UnansweredQuestion
tagged with: http-redirect
tagged with: roblox
tagged with: post
type: Question
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29503598
has title: Redirects instead of changing text and posting
has body: I'm attempting to make an automatic forum bump bot using the console on ROBLOX. (it regards the wait time between posts) I enter the ID of the forum as a parameter, and every 30 seconds it should bump the thread, editing the TextArea to the second parameter and clicking the "Post" button. I'm having huge troubles, mainly because I am a JavaScript noobie. I don't know how to finish what I started. Here is the code, instead of doing what I want it just redirects to the Forum page to reply, but doesn't do anything else. Thank you for all help, I really appreciate it. function post(path, params, method) { method = method || "post"; 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(); } function bump(id) { console.log("bumping") window.setInterval(function () { post('/Forum/AddPost.aspx?PostID=' + id + '&amp;mode=flat', {ctl00_cphRoblox_Createeditpost1_PostForm_PostBody: 'whatttt'}); }, 20000); } bump(159628387);

http://stackoverflow.com/q/29443786
has answer: http://stackoverflow.com/a/29443856
score: 0
answer count: 1
tagged with: node.js
has title: How to refresh resources in Node without restarting the server?
tagged with: koa
tagged with: javascript
type: UnansweredQuestion
has body: I'm using koa-static-folder, but apparently it doesn't provide access to files added after the server starts without the need to restart the actual server. Are there any middleware or libraries that do?
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29403057
has body: You don't need to load both libraries, just use the version with the templates. Difference is explained here.
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29395301
type: Answer
answers question: http://stackoverflow.com/q/29395301
upvote count: 1

http://stackoverflow.com/a/29503170
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/47164752
score: 2
downvote count: 0
has body: The request is not formed correctly based on google's docs. Try this: $http.post('https://www.googleapis.com/urlshortener/v1/url?key=#key',{longUrl:'http://uihacker.blogspot.ca/2013/04/javascript-use-googl-link-shortener.html'}).success(function(data,status,headers,config){ $scope.shortUrl=data.id; }). error(function(data,status,headers,config){ });
accepted answer of: http://stackoverflow.com/q/29502799
has comment: http://stackoverflow.com/comment/47164843
answers question: http://stackoverflow.com/q/29502799
upvote count: 2

http://stackoverflow.com/a/29519525
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29519295
has body: You are missing some externals files: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js https://rawgit.com/daneden/animate.css/master/animate.css Also you have to select jquery. here is your code adding the files: http://jsfiddle.net/cmdvrhwz/4/ $(document).ready(function(){ var carouselContainer = $('.carousel'); var slideInterval = 5000; function toggleH(){ $('.toggleCaption').hide() var caption = carouselContainer.find('.active').find('.toggleCaption').addClass('animated fadeInRight').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function (){ $(this).removeClass('animated fadeInRight')}); caption.slideToggle(); } function toggleC(){ $('.toggleButton').hide() var button = carouselContainer.find('.active').find('.toggleButton').addClass('animated fadeInUp').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function (){ $(this).removeClass('animated fadeInUp') }); button.slideToggle(); } carouselContainer.carousel({ interval: slideInterval, cycle: true, pause: "hover"}) .on('slide.bs.carousel slid.bs.carousel', toggleH).trigger('slide.bs.carousel') .on('slide.bs.carousel slid.bs.carousel', toggleC).trigger('slide.bs.carousel'); }); Hope it's hepls

http://stackoverflow.com/q/29373881
has comment: http://stackoverflow.com/comment/46929280
has title: Photo Upload not working via Ajax call
score: 0
has comment: http://stackoverflow.com/comment/46929356
answer count: 1
linked to: http://stackoverflow.com/q/1350779
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46929912
linked to: http://stackoverflow.com/q/1622457
has body: I am trying to upload a photo using Ajax so that photo can be posted after clicking of submit button. Flow: user uploads image -> Ajax call is made to upload photo, user clicks submit -> Post is shown to the user along with photo Here is my php file for upload image: Submit Here is my JS code: function PhotoUpload(){ alert ('got photo'); $("#preview").html(''); $("#preview").html('Loading...'); $("#imageform").ajaxForm({ target: '#preview' }).submit(); } Here is my ajax_image.php code <?php include('includes/dbconnection.php'); include("session.php"); $path = "uploads/"; $valid_formats = array("jpg", "png", "gif","JPG","JPEG","jpeg","PNG"); if(isset($_POST) and $_SERVER['REQUEST_METHOD'] == "POST") { $name = $_FILES['photoimg']['name']; $size = $_FILES['photoimg']['size']; if(strlen($name)) { list($txt, $ext) = explode(".", $name); if(in_array($ext,$valid_formats)) { if($size<(1024*1024)) { $actual_image_name = time().substr(str_replace(" ", "_", $txt), 5).".".$ext; $tmp = $_FILES['photoimg']['tmp_name']; if(move_uploaded_file($tmp, $path.$actual_image_name)) { $command="Insert into uploads(image_name) values('$actual_image_name')"; if (!mysqli_query($con,$command)) { die('Error: ' . mysqli_error($con)); } else { $msg =" 1 record added"; } //echo "-----Images here----".$msg; $query=mysqli_query($con,"Select upload_id,image_name from uploads where image_name='$actual_image_name'"); $result=mysqli_fetch_array($query); $id=$result['upload_id']; echo " "; } else echo "failed"; } else echo "Image file size max 250k"; } else echo "Invalid file format.."; } else echo "Please select image..!"; exit; } ?> Whenever i select a file using the input form, JS is called and i see 'loading...' message on UI but nothing happens after that. Can somebody help me to understand why my ajax_image.php file is not being called. Thanks in advance!
has comment: http://stackoverflow.com/comment/46928280
linked to: http://stackoverflow.com/q/4105211
tagged with: javascript
has comment: http://stackoverflow.com/comment/46929685
has comment: http://stackoverflow.com/comment/46928288
tagged with: ajax
has comment: http://stackoverflow.com/comment/46929459
type: Question
has answer: http://stackoverflow.com/a/29404776
has comment: http://stackoverflow.com/comment/46929403
tagged with: php
has comment: http://stackoverflow.com/comment/46928502

http://stackoverflow.com/a/29425162
score: 6
accepted answer of: http://stackoverflow.com/q/29425070
answers question: http://stackoverflow.com/q/29425070
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You can certainly create an express route/middleware that tricks express-session that the incoming request contains the session cookie. Place something like this before the session middleware: app.use(function getSessionViaQuerystring(req, res, next) { var sessionId = req.query.sessionId; if (!sessionId) return res.send(401); // Or whatever // Trick the session middleware that you have the cookie; // Make sure you configure the cookie name, and set 'secure' to false // in https://github.com/expressjs/session#cookie-options req.cookies['connect.sid'] = req.query.sessionId; next(); });
upvote count: 6

http://stackoverflow.com/a/64869546
type: Answer
upvote count: 4
downvote count: 0
score: 4
has body: For checking one date is after another by using isAfter() method. moment('2020-01-20').isAfter('2020-01-21'); // false moment('2020-01-20').isAfter('2020-01-19'); // true For checking one date is before another by using isBefore() method. moment('2020-01-20').isBefore('2020-01-21'); // true moment('2020-01-20').isBefore('2020-01-19'); // false For checking one date is same as another by using isSame() method. moment('2020-01-20').isSame('2020-01-21'); // false moment('2020-01-20').isSame('2020-01-20'); // true
answers question: http://stackoverflow.com/q/29494528

http://stackoverflow.com/q/29388955
has comment: http://stackoverflow.com/comment/46955331
tagged with: php
has comment: http://stackoverflow.com/comment/46955669
has comment: http://stackoverflow.com/comment/46956029
has comment: http://stackoverflow.com/comment/46955487
type: Question
has comment: http://stackoverflow.com/comment/46955820
has comment: http://stackoverflow.com/comment/46955676
has comment: http://stackoverflow.com/comment/46957336
has comment: http://stackoverflow.com/comment/46955880
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46957276
has title: Retain in the same page and do JS operations
has comment: http://stackoverflow.com/comment/46956406
has body: My file structure front-page homepage.html lib .js .php I send the user information to server and doing server side validation. If server side validation fails, i want to load my html page and open log in window if email already exists. I have done the following if(isset($_POST['submit']) && $_POST['email']!='') { $email= $_POST['email']; $sql1 = "SELECT * FROM Users WHERE emailID = '$email'"; $result1 = mysqli_query($connection,$sql1) or die("Oops"); if (mysqli_num_rows($result1) > 0) { //echo "This Email is already used."; //Write code to go back to register window //header('Location: ../homepage.html'); echo ' '; } } I don't see any errors and it isnot triggering the click too. I don't have any restrications. Please provide me the best way to do these kinda stuff. I checked with few sites they loads the separate page if php call fails. But i want to know why can't we do it in the same page if so. HTML: <!----head> </head!---------> content goes here Submit click: is handled by jquery Please let me now if any data further needed
has comment: http://stackoverflow.com/comment/46955529
has comment: http://stackoverflow.com/comment/46957848
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/29515485
has comment: http://stackoverflow.com/comment/47187658
tagged with: visible
score: 0
has answer: http://stackoverflow.com/a/29516540
type: Question
type: AnsweredQuestion
has body: Complete SSCCE JSFiddle here! What I want: When the page is scrolled down to the extent that the top part of page (heightwise equal to the viewport's height) is no more visible, a CSS class (sticky in the example) should be added to the header menu .header-menu-container-nav. Then when the user starts scrolling back up, as soon as the that part of the page (the topmost part of page which is heightwise equal to the viewport's height), i.e. the .firstpage div from the example I believe, the event fired when scrolling down should be removed and the class sticky should be removed. How I am trying to do this: Using the jquery-visible plugin: The jquery-visible plugin does not seem to work at all. I added the jquery-visible plugin in my HTML &lt;head&gt; (after extracting the .zip downloaded from here in the project's folder) like this: &lt;script src="jquery-2.1.3.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="jquery-visible-master/jquery.visible.js"&gt;&lt;/script&gt; Please tell me what I am doing wrong? And how to get this to work? My Code: /** * Function for the header's drama! **/ $(window).bind('scroll', function(){ var lastScrollTop = 0; var originalHeaderPosition = $(".header-menu-container-nav").offset().top; var scrollTop = $(this).scrollTop(); var vph = $(window).height(); var currentHeaderPosition = $(document).scrollTop(); var deltaHeaderPosition = currentHeaderPosition - originalHeaderPosition; if (scrollTop &gt; lastScrollTop){ // downscroll code if (deltaHeaderPosition &gt;= vph) { $('.header-menu-container-nav').addClass('sticky'); $('.header-menu-container-nav').fadeIn(); } } else {// upscroll code if ($('firstPage').visible(true)) {//******************* $('.header-menu-container-nav').fadeOut(function() { $('.header-menu-container-nav').attr('style',''); $('.header-menu-container-nav').removeClass('sticky'); }); } } lastScrollTop = scrollTop; });
accepted answer: http://stackoverflow.com/a/29516540
has comment: http://stackoverflow.com/comment/47186393
tagged with: javascript
has comment: http://stackoverflow.com/comment/47186516
tagged with: jquery-plugins
has comment: http://stackoverflow.com/comment/47187180
answer count: 1
has comment: http://stackoverflow.com/comment/47186481
tagged with: jquery
has comment: http://stackoverflow.com/comment/47187146
has comment: http://stackoverflow.com/comment/47188278
has title: Why can't I get the jquery-visible plugin to work at all?

http://stackoverflow.com/a/29473209
has comment: http://stackoverflow.com/comment/47108437
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47107692
has body: You can get it using array notation [] and using object properties. var array = [[{"chatName":"Piet","time":"13:00","message":"asdasdasd"}],"14282568276220321","14282568276220321"]; var objects = array[0]; // will give the first item in array var object = objects[0]; // will erturn you first item in that inner array object.chatName; // Piet object.time; // 13.00 object.message; // message to populate it in that dom: var div = document.querySelector("#messageContent"); div.querySelector("b").textContent = object.chatName; div.querySelector("span").textContent = object.time; div.querySelector("p").textContent = object.message; Mostly you may desire to create those messages via loop: var array = [[{"chatName":"Piet","time":"13:00","message":"asdasdasd"}],"14282568276220321","14282568276220321"]; var div = document.querySelector("#messagecontent"), html = ""; console.log(div); array[0].forEach(function(object) { // you can create a wrapper div for this as well html +=" "; html += ""+object.chatName+""; html += ""+object.time+""; html += " "+object.message+" "; html += " "; }); div.innerHTML += html;
type: Answer
answers question: http://stackoverflow.com/q/29473156
accepted answer of: http://stackoverflow.com/q/29473156
upvote count: 1
has comment: http://stackoverflow.com/comment/47108333

http://stackoverflow.com/comment/50775926
type: Comment
comment on: http://stackoverflow.com/a/29485650
has text: I am thinking about serving my own web page with some https://cordova.apache.org/ and trying to do what I want in JS
score: 0
type: AnswerComment

http://stackoverflow.com/q/29401646
score: 0
has title: Changing background colors items using an array in a circle
has answer: http://stackoverflow.com/a/29402200
has comment: http://stackoverflow.com/comment/46978940
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/29401767
has answer: http://stackoverflow.com/a/29401729
linked to: http://stackoverflow.com/q/9847580
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46978957
has comment: http://stackoverflow.com/comment/46979022
has body: I have a particular challenge, and is killing me, because I don't know how to do what I am trying to. I have 5 items: 4 divs with width and height 50px and the body. And I want create a function that sets the background-color for these items, for example: var colors = ['red', 'blue', 'green', 'black', 'pink']; div1 = red div2 = blue div3 = green div4 = black body = pink and if the browser reload, they change: div1 = pink div2 = red div3 = blue div4 = green body = black and if the browser change the same happens... There is any jquery plugin that do that? I don't know where start.. i already create the array with the items, inside a function: HTML: JS: function changeColors() { var colors = ['red', 'blue', 'green', 'black', 'pink']; } changeColors();
type: Question
has answer: http://stackoverflow.com/a/29401762
accepted answer: http://stackoverflow.com/a/29401767
has comment: http://stackoverflow.com/comment/46978922
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46978929
possible better answer: http://stackoverflow.com/a/29401762
linked to: http://stackoverflow.com/q/8900652

http://stackoverflow.com/comment/47132540
has text: @NewDev in controller.
comment on: http://stackoverflow.com/q/29479504
score: 0
type: Comment
type: QuestionComment

underscore.js
tags question: http://stackoverflow.com/q/29412890
tags question: http://stackoverflow.com/q/29516208
type: Tag
tags question: http://stackoverflow.com/q/29424545
tags question: http://stackoverflow.com/q/29464955
tag name: underscore.js
tags question: http://stackoverflow.com/q/29442509
tags question: http://stackoverflow.com/q/29458094
tags question: http://stackoverflow.com/q/29410586
tags question: http://stackoverflow.com/q/29380507
tags question: http://stackoverflow.com/q/29378548
tags question: http://stackoverflow.com/q/29442676
tags question: http://stackoverflow.com/q/29493126
tags question: http://stackoverflow.com/q/29402351
tags question: http://stackoverflow.com/q/29389990
tags question: http://stackoverflow.com/q/29520327
tags question: http://stackoverflow.com/q/29376281
tags question: http://stackoverflow.com/q/29428280
tags question: http://stackoverflow.com/q/29430567
tags question: http://stackoverflow.com/q/29511468

http://stackoverflow.com/comment/47091730
type: Comment
comment on: http://stackoverflow.com/a/29454629
type: AnswerComment
score: 0
has text: glad it helps . don't forget to mark it as answer(so someone can refer to this later)

http://stackoverflow.com/comment/47135751
score: 0
type: Comment
type: QuestionComment
has text: Hey, I don't understand :/ What is default bootstrap css? is "title" or "tooltip" part of bootstrap css?
comment on: http://stackoverflow.com/q/29469209

http://stackoverflow.com/comment/47043231
has text: Definitely consider this to at least be better than a setInterval, setInterval will continuously send requests even if the requests are taking longer than the set interval or failing. Using this approach gives you more control and allows you to handle errors appropriately with a little bit more code.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29435254
type: Comment

http://stackoverflow.com/comment/47038998
has text: @Bergi I don't think it's because people don't understand them. It's probably because code that *has* to be written using labels to be readable contains already too much loop nesting and other control flow to be unreadable by itself, so they are suggesting to refactor the code, possibly splitting it in functions. Like, in C goto is a perfectly valid statement... in the very *very* few cases where it improves the code, while in the rest of the cases is a signal for refactoring spaghetti code.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29426078
type: Comment

http://stackoverflow.com/comment/47142748
type: Comment
comment on: http://stackoverflow.com/a/29491449
type: AnswerComment
has text: This is a good answer, and is the way to go if you want to stick with using the prototype (which is slightly more memory efficient). I also added a new answer below showing how you could implement it so `mp.protein.getTotalSets()` would still work (also, consider using traits).
score: 0

http://stackoverflow.com/comment/46963971
type: AnswerComment
has text: I'd say let's try to resolve the issue. Let's create 2 JSFiddles. Go ahead and create a JSFiddle with the failing code (the one that returns the 403 error) and set the flag DEBUG=True. Create a second JSFiddle with your complete code from this individual webpage, with all sensitive information redacted, and post a link to both JSFiddles in a comment. To generate a JSFiddle link, just click save at the top (it will redirect to a permalink page) after you're done entering in all the code.
type: Comment
comment on: http://stackoverflow.com/a/29377999
score: 1

http://stackoverflow.com/q/29405604
tagged with: popup
linked to: http://stackoverflow.com/q/20923305
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29406787
score: 0
has body: How to resize iframe when popup or calendar or dynamic element with position absolute is open in iframe? When datepicker is at bottom of page in iframe then it hide the calendar elements. It also happen when popup(colorbox) is open in iframe and I Click on reset button which will open Enter "Email Address textbox". After opening textbox it hide the content below the Email Address textbox.
answer count: 1
tagged with: css
type: UnansweredQuestion
tagged with: iframe
has title: datepicker or popup element is hide in iframe

http://stackoverflow.com/comment/46939522
comment on: http://stackoverflow.com/q/29379584
has text: And how are you updating data in `require('./api/entry')`?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/54709879
comment on: http://stackoverflow.com/a/30406754
type: Comment
score: 0
type: AnswerComment
has text: This is correct, however, if num < 10 then recursive function would not need to be called. I would make 'result' store the function and call it in the else clause: return num < 10 ? 0 : result(String(num)....);

http://stackoverflow.com/comment/46959406
score: 0
type: Comment
type: QuestionComment
has text: @forgivenson Because it is related to my `Time` object, and I would like it in the prototype and not the constructor itself.
comment on: http://stackoverflow.com/q/29390119

http://stackoverflow.com/a/29414203
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47003010
type: Answer
has comment: http://stackoverflow.com/comment/47001223
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29413768
has body: Forget all I said before (I deleted it, but you can still see it in the revision history). Using some code I found on this Web site, you can calculate the height of the box. Now, you just need to apply that to update the box heights on resize: function getBoxHeight(boxId) { // using a function to get the height of the box from ==&gt; var ckeditorFrame = $('#' + boxId + ' iframe'); var innerDoc = (ckeditorFrame.get(0).contentDocument) ? ckeditorFrame.get(0).contentDocument : ckeditorFrame.get(0).contentWindow.document; var messageHeight = $(innerDoc.body).height(); return messageHeight ? messageHeight : 0; } function r() { if (getBoxHeight("cke_1_contents") &gt; getBoxHeight("cke_2_contents")) { $("#cke_2_contents").height($("#cke_1_contents").height()); } else { $("#cke_1_contents").height($("#cke_2_contents").height()); } } As you can see on this JSFiddle: http://jsfiddle.net/povw33x7/3/. This solution is cleaner than the other one, although it still has a glitch as it may leave an extra empty space (the height of a line) in one of the boxes.
answers question: http://stackoverflow.com/q/29413768

http://stackoverflow.com/a/29496440
accepted answer of: http://stackoverflow.com/q/29496039
has body: You can determine if the clicked on element has a specific class in the following way: $('.a').click(function() { var classes = $(this).attr('class').split(/\s+/); $.each(classes, function(index, item) { if (item === 'b-a') { // open a popup? // OR, populate a single popup element with new text... alert("b-a text!") } }); }); div { height: 100px; width: 100px; border: dashed 2px teal; cursor: pointer; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div class="a b-a"&gt;&lt;/div&gt; It would probably be easier to have just one pop up and populate the text differently based on what class is found (eg if(thisClass === 'moreMessages--channels) { // do something; })
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29496039
type: Answer

http://stackoverflow.com/a/29405351
accepted answer of: http://stackoverflow.com/q/29405306
answers question: http://stackoverflow.com/q/29405306
has comment: http://stackoverflow.com/comment/46986403
type: Answer
has comment: http://stackoverflow.com/comment/46986368
score: 2
upvote count: 2
has body: The regex is ^[0-9]+(\.[1-3])?$ in js: var rx = /^[0-9]+(\.[1-3])?$/; in c# var rx = new Regex(@"^[0-9]+(\.[1-3])?$");
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29374953
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46930786
tagged with: jssor
has answer: http://stackoverflow.com/a/29375174
has body: I've been modifying this javascript and trying to fix it but for some reason the slideshow stays in the first div/slide until i click or drag it, then it all works out. My question is, how to get rid of this bug when it freezes at the page load? The html document: TEST Mer info Mer info
has title: Jssor slider stays on the first image until I click it
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46930635

http://stackoverflow.com/comment/47086167
type: Comment
comment on: http://stackoverflow.com/a/29461120
has text: That's pretty restrictive as it supports no array methods such as `.length` or `.slice()`, or `.forEach()` etc... In fact, you can't even iterate the elements in that object. Demonstrates a possible direction, but likely not practical as implemented.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47046014
comment on: http://stackoverflow.com/a/29428739
score: 0
type: AnswerComment
has text: this works in the console, but how can I save it as: `var dataset = ` ?
type: Comment

http://stackoverflow.com/a/29400413
accepted answer of: http://stackoverflow.com/q/29400274
upvote count: 3
has body: You need to use class instead of id on &lt;button&gt;, so that multiple buttons can share the same jQuery event handler. &lt;button class="vote" data-answerid="..."&gt; Then you can do the following in JavaScript: $(document).on("click", ".vote", function(){ var answerid; answerid = $(this).attr("data-answerid"); $.get('/vote_answer/', {answer_id: answerid}, function(data){ $('#vote_count').html(data); $('#vote').hide(); }); }); This will bind the event handler to click any &lt;button class=vote&gt;. Also you should do AJAX POST instead of GET by HTTP semantics, because voting is a state changing operation. Otherwise the browser or the web proxies may cache the result (though jQuery have its own cache buster).
score: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29400274
has comment: http://stackoverflow.com/comment/46978013
type: Answer
has comment: http://stackoverflow.com/comment/46978169

http://stackoverflow.com/comment/46992357
has text: Thanks for your answer, but what if there are multiple divs on the page that i want this to apply on? Say 20 different square divs.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29402524
type: AnswerComment

http://stackoverflow.com/q/29382730
has title: Creating a simple inventory system in JavaScript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29382857
has answer: http://stackoverflow.com/a/29382896
downvote count: 1
type: Question
upvote count: 0
tagged with: inventory
tagged with: arrays
tagged with: javascript
has body: I'm trying to make a simple text adventure/farming simulator, but I'm new to JavaScript and I'm stuck trying to plan out how my inventory system will work. The main problem I have is that there are two main types of items: food/consumables and tools/durable goods. Food will be created and consumed at a regular rate, whereas tools will need to be bought, and lose durability with each use. The simplest solution I could think of was to have the quantity of each food item to be a property of the player (player.meat, player.vegetable, etc.) since quantity would be the only thing changing. Tools were a little more complex, so I figured I could create a Tool prototype, then give the player an inventory array that would store all their tools. However the more I thought about it, the more I realized food would need to be a prototype as well (it has properties like price and nutritional value as well). My head is kind of spinning right now trying to think of the most effective way of doing this. Do I create 2 separate prototypes, then give the player an array for each of them? Would I need to create a prototype for the array so it can keep track of both item type and quantity? And will I need to search for each item in the array when I want to modify it? This seems needlessly complicated, but I can't really think of anything simpler. Can anyone help?
tagged with: prototype
answer count: 3
has answer: http://stackoverflow.com/a/29383132
favorite count: 0
score: -1

http://stackoverflow.com/comment/46939623
type: QuestionComment
has text: @Aweary sure, one sec
score: 0
comment on: http://stackoverflow.com/q/29379842
type: Comment

http://stackoverflow.com/q/29449886
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47066467
has comment: http://stackoverflow.com/comment/47067387
has title: Assigning an object prototype after creation
linked to: http://stackoverflow.com/q/23807805
tagged with: prototype-programming
has comment: http://stackoverflow.com/comment/47067251
has body: All examples and questions I've came upon searching on the web about prototypal inheritance shows the assigning of prototypes to constructor functions and before it's called, much like the following code: Object.beget = function (o) { var F = function () {}; F.prototype = o; return new F(); }; My question is, is there a way to change an object (not a constructor function) prototype after it has been instatiated in such a way that I can access the new prototype methods without calling it directly, or in other words, in such a way where the object inherits its new prototype methods? EDIT: I guess the focus of the question might not be clear, I am not interested in enhancing an object's prototype, what I really want is a way to assign a new prototype, without altering other objects which had the same prototype as the first.
type: Question
has answer: http://stackoverflow.com/a/29450299
possible better answer: http://stackoverflow.com/a/29449927
has comment: http://stackoverflow.com/comment/47066350
accepted answer: http://stackoverflow.com/a/29450741
has answer: http://stackoverflow.com/a/29449927
tagged with: javascript
tagged with: inheritance
tagged with: prototype
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/7015693
linked to: http://stackoverflow.com/q/6225562
linked to: http://stackoverflow.com/q/14688774
has answer: http://stackoverflow.com/a/29450741

http://stackoverflow.com/a/29518723
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29518671
downvote count: 0
has comment: http://stackoverflow.com/comment/47192648
has comment: http://stackoverflow.com/comment/47192622
has body: You can store the numeric id of the timeout in a variable and clear it: var timeout = setTimeout(particleAppear,randomTimeGen); clearTimeout(timeout);
has comment: http://stackoverflow.com/comment/47192640
score: 4
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47192578
has comment: http://stackoverflow.com/comment/47192618
type: Answer
answers question: http://stackoverflow.com/q/29518671
has comment: http://stackoverflow.com/comment/47192562

http://stackoverflow.com/q/29459770
has body: I want to display a pop up message using this code. var messagedialogpopup = new Windows.UI.Popups.MessageDialog('', g_message); But the full message is not being displayed.After few words ... is coming. 1.How to increase the size of this popup? 2.How to decrease the font size?or 3.How to break the message to display in two different lines,so that user can see full message.
has comment: http://stackoverflow.com/comment/47103878
tagged with: javascript
has comment: http://stackoverflow.com/comment/47094497
tagged with: user-interface
answer count: 1
tagged with: winrt-xaml
has comment: http://stackoverflow.com/comment/47084522
type: UnansweredQuestion
tagged with: windows-store-apps
has title: How to display text in different lines using Windows.UI.Popups.MessageDialog?
score: 0
has comment: http://stackoverflow.com/comment/47094514
tagged with: xaml
type: Question
has answer: http://stackoverflow.com/a/29465931
has comment: http://stackoverflow.com/comment/47129183

http://stackoverflow.com/comment/47182810
type: AnswerComment
score: 0
has text: Could you elaborate what is wrong with the example above? How it should look like ?
type: Comment
comment on: http://stackoverflow.com/a/29510456

http://stackoverflow.com/q/29456464
type: Question
accepted answer: http://stackoverflow.com/a/29456714
has body: I want to show some input fields in gsp code when checkbox is on. I use jquery for it. I connect jquery script to gsp as follows: &lt;g:javascript library="jquery" /&gt; &lt;script type="text/javascript"&gt;($('.isAdminCafee').click(function() { $('.adminFields')[this.checked ? "show" : "hide"](); });) &lt;/script&gt; This is my part of my gsp-code, with this code jquery-script must be interact: &lt;div class="checkbox"&gt; &lt;label&gt;&lt;g:checkBox name="isAdminCafee" value="${false}"/&gt; Register as admin &lt;/label&gt; &lt;/div&gt; &lt;div class="adminFields"&gt; hello) &lt;/div&gt; But interaction doesn't happen. How to fix it?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29456729
tagged with: jquery
tagged with: grails
has answer: http://stackoverflow.com/a/29456729
score: 0
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/29456714
type: AnsweredQuestion
has title: Executing jquery code in gsp in Grails
upvote count: 1
tagged with: gsp
downvote count: 1

http://stackoverflow.com/q/29432192
has comment: http://stackoverflow.com/comment/47033951
tagged with: node.js
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/29432209
has answer: http://stackoverflow.com/a/29432269
score: -2
has body: I have char array: a = [ 'm', 'a', 'q', '0', '2', 'o' ] when I try an extend the array for any element: a[a['0']] = something; it treats '0' as the index 0 Why does this happen? ---EDIT--- What I wish to do is say a[a[3]] = something so that when I evaluate a['0'] it returns 'something';
tagged with: javascript
has title: Js char array treats string integers as integers
type: Question
has comment: http://stackoverflow.com/comment/47033953
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/47033843
favorite count: 0

http://stackoverflow.com/a/29525916
score: 1
has body: After trying it on a windows XP.. it turns out that is is not the Google Maps, I mean I can add marker statically. In stead, I realized that it is actually the problem of the CORS on IE 8 + 9. As you can see in the caniuse.com, IE 8 and IE 9 has only a partial support on CORS. Also it is said in the wiki that: Internet Explorer did not implement CORS until version 10. The two previous versions (8 and 9) offered similar functionality through the XDomainRequest API. It is now supported by all modern browsers (desktop and mobile) There are discussions saying that using jQuery.support.cors = true; would make it works, but sadly no luck for my Windows XP + IE 8. Some more helpful readings: 'jQuery.getJSON' not working in Internet Explorer 8 jQuery issue in Internet Explorer 8
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29515830

http://stackoverflow.com/comment/47187821
score: 0
type: AnswerComment
has text: Sorry, that won't work.
type: Comment
comment on: http://stackoverflow.com/a/29478280

http://stackoverflow.com/comment/47259768
type: AnswerComment
comment on: http://stackoverflow.com/a/29537621
score: 2
type: Comment
has text: How is this a callback hell?

http://stackoverflow.com/a/30713370
answers question: http://stackoverflow.com/q/29494608
score: 0
type: Answer
has body: I think you may find what you want with this library which implements the RFC-6570 in Java. com.github.fge uri-template yourVersionHere The URITemplate constructor will return an URITemplateParseException if there is an error during the parsing. final URITemplate template = new URITemplate("http://foo.bar/myPage{?map*}");

http://stackoverflow.com/q/29455559
accepted answer: http://stackoverflow.com/a/29474922
type: Question
has title: How to use the javascript var to reference the Mongo DB collection's field
tagged with: javascript
tagged with: mongo-shell
score: 0
tagged with: mongodb
answer count: 2
possible better answer: http://stackoverflow.com/a/29466656
has body: I want to change the field value type from string to object. ...{value: "my title"}... ===&gt; ...{value:{value:"my title ABC"}} In the Mongo shell, I present this field through the JavaScript var articlePath. Now, how can I use this var to update the field value? The following code is create a new field articlePath instead of using the var's value. var articlePath = "layout.content.header." + i + "." + j + ".value" var articleValue = block.value + " ABC" db.mycollection.update( {_id: catId}, { $set: { articlePath: {value: articleValue} } }, function(err, numberUpdated) { print("---&gt;err: ", err) } )
has answer: http://stackoverflow.com/a/29466656
has answer: http://stackoverflow.com/a/29474922
type: AnsweredQuestion

http://stackoverflow.com/comment/46999566
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29413322
has text: By the way the usage of empty name: `name: ''` is wrong!

http://stackoverflow.com/a/29420505
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47132952
type: Answer
accepted answer of: http://stackoverflow.com/q/29420151
has comment: http://stackoverflow.com/comment/47014930
has body: ng-model is a key here. Every time ng-repeat iterate through given collection it will create different scope for each piece of the repeated html code respectively to given object. Using ng-model allows you to manage the data in given scope. Name: Comment: Add My Comment Secondly in your code : this.addComment = function(story) you are referencing to the instance of the controller, better way to do this is bind everything that has connection with view with $scope $scope.addComment = function(story) More about ng-model: https://docs.angularjs.org/api/ng/directive/ngModel Understaning angular model and scope system is a huge milestone to understand the Angular way to build apps. I encourage you to start with that.
answers question: http://stackoverflow.com/q/29420151

http://stackoverflow.com/q/29399996
has comment: http://stackoverflow.com/comment/46976378
has comment: http://stackoverflow.com/comment/46976405
has comment: http://stackoverflow.com/comment/46976448
has comment: http://stackoverflow.com/comment/46976307
has title: Unexpected end of input jquery using ajax
has comment: http://stackoverflow.com/comment/46976561
possible better answer: http://stackoverflow.com/a/60882262
has comment: http://stackoverflow.com/comment/46976022
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46976183
has body: I am having the following jQuery script. http://www.codeshare.io/aQxBp And getting the error: SyntaxError: Unexpected end of input My js file is correct on syntax side, do not missing any closing or opening bracket. Thanks for any suggestion.
has comment: http://stackoverflow.com/comment/46976715
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/60882262
has answer: http://stackoverflow.com/a/29400607
has comment: http://stackoverflow.com/comment/46976311
accepted answer: http://stackoverflow.com/a/29400607
tagged with: javascript
tagged with: jquery
tagged with: xmlhttprequest

http://stackoverflow.com/a/29476776
type: Answer
answers question: http://stackoverflow.com/q/29476450
score: 0
has body: $('.discussionListItem .forumLink:contains("Music")').parents('.discussionListItem').hide()

http://stackoverflow.com/q/29412618
accepted answer: http://stackoverflow.com/a/29412810
upvote count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29412810
has title: Click off menu/div to close
has answer: http://stackoverflow.com/a/29412858
has comment: http://stackoverflow.com/comment/46998109
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46998144
type: Question
has body: I've been trying to make my menu close when I click anywhere on the page except for within the menu. I managed to achieve this for when a link is clicked within the menu by giving it the same onclick function as the menu button, but I am not succeeding at clicking off the menu to close it. http://codepen.io/anon/pen/LEvdmW JS function setVisibility(id) { var targetButton; switch( id ) { case "layer": targetButton = "button"; break; } if (document.getElementById(targetButton).value == 'Close') { document.getElementById(targetButton).innerHTML = 'Open'; document.getElementById(targetButton).value = 'Open'; document.getElementById(id).style.display = 'none'; } else { document.getElementById(targetButton).innerHTML = 'Close'; document.getElementById(targetButton).value = 'Close'; document.getElementById(id).style.display = 'inline'; } } HTML Open Hello CSS #layer { position: absolute; left: 8px; top: 50px; background-color: #989898; width: 280px; height: 100px; padding: 10px; color: black; display: none; } button { border:none; background:#989898; color:#fff; padding:10px; outline:none; cursor:pointer; }
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29412858
answer count: 2

http://stackoverflow.com/comment/46983232
has text: THANK YOU SO MUCH, you turned on a light in my brain, yea I had the before_filter :authenticate_user! and load_and_authorize_resource of cancancan, I just added except: array my update_categories action. Thank you again, The rail's error was not very descriptive...
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29404035

http://stackoverflow.com/a/29454217
downvote count: 0
has comment: http://stackoverflow.com/comment/47073775
has comment: http://stackoverflow.com/comment/47073697
answers question: http://stackoverflow.com/q/29453992
upvote count: 2
has comment: http://stackoverflow.com/comment/47073748
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29453992
has body: Your API is never private since it's used by a web app which I am assuming is available to the general public. If this is the case, there really is no impetus to secure it since anyone and everyone would have access to the API. If on the other hand, this web app is only available to registered users, you can use a token system to check for authorization. When the user successfully logs in, you pass back a token (usually something 20 to 30 characters long). Every API request would require a valid token. Tokens can be set to expire automatically (using a database job) X hours after creation if your application requires higher security thresholds. If security isn't a big issue, they can be renewed automatically every time a request is made. This is essentially a two tiered approach. Temporary tokens are generated for users to directly connect to your API so that permanent credentials are never sent to the client. Predefined keys are given to third party developers who build applications on top of your API and have their own back-end.
type: Answer
score: 2

http://stackoverflow.com/comment/47003832
score: 0
type: AnswerComment
has text: Please modify using on click and send me the jsfiddle link. then in function: function showpart(){ $("#mu_part_name").prop("selectedIndex", 0).selectmenu("refresh", true);; var test = $("#mu_part_name").val(); alert(test); var text = $("#mu_part_name option:selected").text(); alert(text); }
type: Comment
comment on: http://stackoverflow.com/a/29415503

http://stackoverflow.com/comment/47081828
type: AnswerComment
has text: Updated the href values but it is still causing the same problem
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29455006

http://stackoverflow.com/comment/47157020
has text: @Maximus2012 I post the whole code and the part that we worked
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29498472

http://stackoverflow.com/comment/47004387
score: 0
type: AnswerComment
has text: 1. so bottom line they had to be using jquery? Thought they frown on that in angular. 2. That selector info in jQuery docs you offered. I checked the find() - how did you end up at that page if you don't mind me asking. On the surface it makes sense - but interested on how to solve my own problem nxt time. thx again
type: Comment
comment on: http://stackoverflow.com/a/29415788

http://stackoverflow.com/a/29423353
downvote count: 0
type: Answer
has body: This should do the trick var userInputLower = userInput.toLowerCase(); var shouldToggle = $(value).text().toLowerCase().indexOf(userInputLower) &gt;= 0; $(value).toggle(shouldToggle);
upvote count: 1
answers question: http://stackoverflow.com/q/29423313
score: 1
accepted answer of: http://stackoverflow.com/q/29423313
type: AcceptedAnswer

http://stackoverflow.com/q/29373872
has answer: http://stackoverflow.com/a/29374056
answer count: 1
score: 4
has body: I must be losing it, I can't get the keydown event to work: I tried: $('#container').keydown(function() { console.log("down"); alert('down'); }); Also tried: $('#container').on('keydown',function() { console.log("down"); alert('down'); }) http://jsfiddle.net/foreyez/mwptttdv/
has title: Why doesn't keydown event work on regular container div?
upvote count: 4
accepted answer: http://stackoverflow.com/a/29374056
downvote count: 0
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/3149362
has comment: http://stackoverflow.com/comment/46928447
has comment: http://stackoverflow.com/comment/46928311
type: AnsweredQuestion
favorite count: 0
has comment: http://stackoverflow.com/comment/46928412
type: Question
linked to: http://stackoverflow.com/q/3759339

http://stackoverflow.com/q/29525861
has comment: http://stackoverflow.com/comment/47207148
type: Question
has comment: http://stackoverflow.com/comment/47206513
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47206693
has body: I have a wizard form (single html page with multiple form sections) that I am validating using multiple Ajax calls (POST requests to and from an iFrame for IE9 support) and I am having some very strange behavior with an onbeforeunload() event. On 2/3 sections of the form I want this event to occur, it does, but one particular form segment has strange behavior when I click the browser back button. Here is how I administer the property: $(window).on({ beforeunload : function(e) { return "If you navigate away from the page, you'll lose any unsaved information.";} }); When I click on the browser back button in the particular spot in the page, my ajax call fires and the success callback activates. Super crazy. I've tried setting that property everywhere I can think of. Any advice is appreciate. I can paste more relevant code if need be. EDIT: Also, through some form of sorcery, the title of the page changes in the broswer tab to the page's URL, strange...
has comment: http://stackoverflow.com/comment/47206822
upvote count: 3
has title: back button not firing onbeforeunload event with iFrame
favorite count: 0
type: UnansweredQuestion
tagged with: iframe
score: 3
answer count: 0
linked to: http://stackoverflow.com/q/4376596
has comment: http://stackoverflow.com/comment/47206464

http://stackoverflow.com/comment/47151014
comment on: http://stackoverflow.com/q/29495492
score: 0
has text: Do they always have the val[num][letter] pattern tho, or would an object have the keys `orange`, `moose`, `gopher`, for example?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/44543352
has body: I think the description of each in the documentation makes it quite clear: $cookie just gives you access to cookies same as if you did by some other method. $cookieStore uses cookies to make a key/value storage solution for you. So if you are starting something new and want to persist key/value pairs use $cookieStore If you want to use existing cookie solution - say read/write cookies from your existing server session system then use $cookie.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29484684
answers question: http://stackoverflow.com/q/29484684
score: 5
type: AcceptedAnswer
upvote count: 5
type: Answer

http://stackoverflow.com/comment/47040423
score: 1
type: Comment
has text: It comes with exp =-) jQuery - just a library, but powerful library ) dont forget about approve ans for improving SO
type: AnswerComment
comment on: http://stackoverflow.com/a/29435640

http://stackoverflow.com/comment/47279658
score: 0
comment on: http://stackoverflow.com/q/29401704
type: Comment
type: QuestionComment
has text: All users would see the link. When the page first loads all fields are disabled. If there is URL for the website it will display as a link. Once the Edit button is clicked all the fields become enabled and the URL for the website then becomes an input field with the URL in it ready to be modified if necessary. So in non-edit mode, displays as a link; edit mode displays as a text box with the URL in it.

http://stackoverflow.com/comment/47147703
comment on: http://stackoverflow.com/a/29494179
type: Comment
score: 1
type: AnswerComment
has text: Kinda hacky solution, better use window.onload event.

http://stackoverflow.com/comment/46930168
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74206/discussion-between-redress-and-david-weldon).
comment on: http://stackoverflow.com/a/29374065
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29393404
has comment: http://stackoverflow.com/comment/46965362
answers question: http://stackoverflow.com/q/29393064
has comment: http://stackoverflow.com/comment/46964921
has comment: http://stackoverflow.com/comment/46963905
has comment: http://stackoverflow.com/comment/46965416
type: Answer
has comment: http://stackoverflow.com/comment/46965873
has comment: http://stackoverflow.com/comment/46964275
score: 2
has comment: http://stackoverflow.com/comment/46966624
downvote count: 2
has comment: http://stackoverflow.com/comment/46963962
has comment: http://stackoverflow.com/comment/46963828
has comment: http://stackoverflow.com/comment/46963789
has comment: http://stackoverflow.com/comment/46965011
has comment: http://stackoverflow.com/comment/57584220
has body: i use this library from google: https://github.com/evanplaice/jquery-csv/ First - u have to $.get(ur_csv_file_path); and then use guide from page
has comment: http://stackoverflow.com/comment/46965760
has comment: http://stackoverflow.com/comment/46964676
upvote count: 4
has comment: http://stackoverflow.com/comment/46964357
has comment: http://stackoverflow.com/comment/46964567
has comment: http://stackoverflow.com/comment/46965762

http://stackoverflow.com/q/29520072
linked to: http://stackoverflow.com/q/12854644
downvote count: 3
score: -1
has title: Javascript |= operator
type: Question
duplicate of: http://stackoverflow.com/q/12854644
has answer: http://stackoverflow.com/a/29520152
has comment: http://stackoverflow.com/comment/47195123
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47195109
tagged with: operator-keyword
has body: I've seen the operator |= in a jQuery plugin, in the following line: if (e.ctrlKey) mod |= 1; How it works? Is it a good practice to use it?
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47195119
has comment: http://stackoverflow.com/comment/47195181
has comment: http://stackoverflow.com/comment/47195200

http://stackoverflow.com/q/29519683
downvote count: 0
tagged with: javascript
has title: How to get reproducible node-count in chrome developer tools timeline?
score: 4
upvote count: 4
answer count: 1
favorite count: 0
has body: I am trying to optimize a very large single page app, built using AngularJS. I suspect there are some memory leaks, and I am trying to track them down using Chrome's Developer Tools. The first thing I am trying to do is see if garbage collection is not able to remove some unused DOM nodes. My problem right now is that I can't seem to get a reproducible output in the Timeline of the Dev Tools. Each time I run through the same set of steps, I get a different number of total nodes - both at the start of the sequence and the end. I would expect that the result would be the same as long as the same interactions are occurring. Below are some screen shots of several tests I have done. The only variables I can think of that would differ from test to test are the time elapsed, and the exact position of the mouse cursor on the interface. There aren't any mouseover events that would trigger new DOM elements to be created or deleted. Does anyone have any tips on how to get reproducible results? Or, are my expectations incorrect? NOTE: The drop-off in the graph towards the end of each example is a forced garbage collection.
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/11969062
has answer: http://stackoverflow.com/a/29520302
tagged with: google-chrome-devtools
type: Question

http://stackoverflow.com/comment/47180977
type: Comment
has text: I have a last question, how can I clear table from row2 and keep row1 ?because I had th in my table. I need to clear all td I guess
comment on: http://stackoverflow.com/a/29510526
score: 0
type: AnswerComment

http://stackoverflow.com/a/29633153
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/105581367
type: Answer
accepted answer of: http://stackoverflow.com/q/29383939
upvote count: 6
has comment: http://stackoverflow.com/comment/49740661
answers question: http://stackoverflow.com/q/29383939
has body: The maximum amount of buffered data is an implementation detail and is not exposed to the developer in any way AFAIK. According to the spec, when appending new data the browser will execute the coded frame eviction algorithm which removes any buffered data deemed unnecessary by the browser. Browsers tend to remove any part of the stream that has already been played and don't remove parts of the stream that are in the future relative to current time. This means that if the stream is very large and the dash player downloads it very quickly, faster than the MSE can play it, then there will be a lot of the stream that cannot be remove by the coded frame eviction algorithm and this may cause the append buffer method to throw a QuotaExceededError. Of course a good dash player should monitor the buffered amount and not download excessive amounts of data. In plain text: You have nothing to worry about, unless your player downloads all of the stream as quickly as possible without taking under consideration the current buffered amount. The MSE API works with a stream of data (audio or video). It has no knowledge of segments. Theoretically you could get the buffered timerange and map to to a pair of segments using the timing data provided in the MPD. But this is fragile IMHO. Better is to keep track of the downloaded and fed segments. Look at the buffered property. The easiest way to get the end time in seconds of the last appended segments is simply: videoElement.buffered.end(0) If by presentation time you mean the Presentation TimeStamp of the last buffered frame then there is no way of doing this apart from parsing the stream itself. To remove buffered data you can use the remove method. Quality switching is actually quite easy although the spec doesn't say much about it. To switch the qualities the only thing you have to do is append the init header for the new quality to the SourceBuffer. After that you can append the segments for the new quality as usual. I personally fi…
score: 6
has comment: http://stackoverflow.com/comment/134917888

http://stackoverflow.com/comment/47119216
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29479214
has text: @zerkms—the first thing that [*parseInt*](http://ecma-international.org/ecma-262/5.1/#sec-15.1.2.2) does is call *ToString* on the first argument, so no, it does not need to be a string.
type: Comment

http://stackoverflow.com/comment/47161653
type: AnswerComment
type: Comment
has text: Either way works. Personally, I would make it all one function but that's not my call.
comment on: http://stackoverflow.com/a/29501619
score: 1

jsbin
tags question: http://stackoverflow.com/q/29512519
tags question: http://stackoverflow.com/q/29481987
type: Tag
tag name: jsbin
tags question: http://stackoverflow.com/q/29404198

http://stackoverflow.com/a/29393112
score: 0
has comment: http://stackoverflow.com/comment/47028286
type: Answer
answers question: http://stackoverflow.com/q/29387874
has comment: http://stackoverflow.com/comment/47026289
has body: You need to replace your array for point with object. It should be {x: 5, y:7, name: "Spread the word"}. Then in formatter refer to this.point.options.name

http://stackoverflow.com/comment/47142562
type: QuestionComment
has text: Why dont you inialize the tooltip again at the restore function?
score: 0
comment on: http://stackoverflow.com/q/29491673
type: Comment

http://stackoverflow.com/a/29389057
score: 1
downvote count: 0
has body: You shoud replace .label-wrapper > button from your css and use this. .label-wrapper &gt; button { left: 190px; width: 300px; margin-top: 20px; margin-left: 100px; }
type: Answer
answers question: http://stackoverflow.com/q/29388766
upvote count: 1

http://stackoverflow.com/a/29398448
has comment: http://stackoverflow.com/comment/46973204
score: 0
answers question: http://stackoverflow.com/q/29398277
has body: document.addEventListener('load', function(){ document.getElementById("viewport").innerHTML = ""; });
upvote count: 1
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/112122908
has comment: http://stackoverflow.com/comment/46975866
has comment: http://stackoverflow.com/comment/46972994

http://stackoverflow.com/q/29452692
tagged with: jquery
score: 0
has body: The issue I've created a javascript/jQuery/HTML5 audio player that works very well, save a few exceptions... Sometimes the audio loads, but doesn't start playing, even though audio.play() is included in the script Sometimes the player returns a duration of 'Infinity:0NaN' Sometimes the audio doesn't load all the way, but the player plays anyway (i.e. - a song is 90 sec. long, but only loads, displays the duration of, and plays something like 6 seconds) I would greatly appreciate any insight that can be offered. Thanks in advance! You can test the action here: http://goo.gl/Aw2OaY A few details I'm dynamically loading each mp3 via a div that stores the mp3's location in a 'data' attribute. When clicked, a script loads a single html5 audio player located at the bottom of my page with the new mp3. Here is a representation of the loader: My Song The player X The script jQuery(document).ready(function() { // // Store elements // var audioPlayerWrap = document.getElementById('audioPlayerWrap'); var audio = jQuery('audio'); var music = document.getElementById('music'); var mp3Source = jQuery('#mp3Source'); var pButton = document.getElementById('pButton'); var timeline = jQuery('#timeline'); var playhead = document.getElementById('playhead'); var songLink = jQuery('.song-link'); var currentSong = jQuery('#currentSong'); var exitPlayer = jQuery('#exitPlayer'); // // Event Listeners // // Play audio on songLink click songLink.click(function() { // Get song URL from data attribute var songURL = jQuery(this).attr('data'); // Set song URL as audio player source mp3Source.attr('src', songURL); // Get song name var songName = jQuery(this).text(); // Set current song text currentSong.text('Now playing: ' + '"' + songName + '"'); // Load music music.load(); //Load meta data and play music.addEventListener("loadedmetadata", function(event) { var duration = music.duration; // Play music playAudio(); }); // Bind song time to timeline jQuery('#music').bind('timeupdate', updateTime); // …
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/29452823
has answer: http://stackoverflow.com/a/29452823
has title: Issues with dynamically loaded, custom javascript/jQuery/HTML5 audio player
type: AnsweredQuestion
tagged with: audio
type: Question
tagged with: javascript

http://stackoverflow.com/comment/47060815
score: 1
has text: This should help you: https://github.com/npm/npm-registry-couchapp#replicating-the-registry.
type: Comment
comment on: http://stackoverflow.com/q/29447071
type: QuestionComment

http://stackoverflow.com/q/29387979
has body: I'm trying to develop a Google Chrome Extension with Ext JS 5.1.0. When I was trying to add ext-all.js into default_popup html I discovered that Google chrome extensions can no longer use dynamic script evaluation techniques like eval() or new Function(), or pass strings of JS code to functions that will cause an eval() to be used, like setTimeout(). So during the setup google chrome debugger returns the following error: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". ext-all-debug.js:8742 Ext.ClassManager.Ext.apply.getInstantiator This is the faulty piece of code getInstantiator: function(length) { var instantiators = this.instantiators, instantiator, i, args; instantiator = instantiators[length]; if (!instantiator) { i = length; args = []; for (i = 0; i &lt; length; i++) { args.push('a[' + i + ']'); } // The problem is here instantiator = instantiators[length] = new Function('c','a','return new c(' + args.join(',') + ')'); instantiator.name = "Ext.create" + length; } return instantiator; }, I have found a solution changing the content_security_policy "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" Adding this line into manifest.json permits dynamic script evaluation techniques (but this is dangerous). So, I would like to preserve standard google chrome security permission. Is there is a way to workaround this problem ?
has title: Extjs, Chrome Extension and Content Security Policy
has answer: http://stackoverflow.com/a/29389339
upvote count: 1
tagged with: google-chrome
type: Question
score: 1
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: extjs
type: UnansweredQuestion
tagged with: google-chrome-extension

http://stackoverflow.com/q/29490178
has title: Storing value of PHP variable in javascript variable
downvote count: 1
accepted answer: http://stackoverflow.com/a/29490240
type: Question
has body: I'm trying to pass a php variable to a javascript variable(on different files). myPHP.php <?php include'myJS.php'; $hello="Hello"; echo json_encode($hello); myJS.php Hello I'm running the myPHP.php file (and not myJS.php). I'm not getting any error, however, in the variable 'data' in myJS.php file, instead of storing the value of only the PHP variable, the entire myJS.php file is getting stored. How can I avoid this and store just the variable value? P.S. This is a sample code, I would be implementing this logic with dynamic data, so please do suggest me solutions which can work with dynamic data.
has comment: http://stackoverflow.com/comment/47140176
has comment: http://stackoverflow.com/comment/47139895
tagged with: javascript
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47139942
has answer: http://stackoverflow.com/a/29490240
has comment: http://stackoverflow.com/comment/47140051
tagged with: php
has comment: http://stackoverflow.com/comment/47140400
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47139619
upvote count: 2
score: 1

http://stackoverflow.com/comment/47044420
comment on: http://stackoverflow.com/a/29437734
has text: Hi Ray, I edited my question again with code I wrote for that already. I included the loadconfigFile() call in the init which will be called later on. Why is this wrong?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47211747
type: Comment
has text: Thanks a lot Steve :) `var insertname = document.getElementsByName("name");` worked for me :)
type: AnswerComment
comment on: http://stackoverflow.com/a/29526437
score: 0

http://stackoverflow.com/comment/47134916
has text: Disagree with duplicate. There is no event for clicking per se, but there is an event when an active tab _changes_. Would it fit your purpose?
type: QuestionComment
comment on: http://stackoverflow.com/q/29487816
score: 0
type: Comment

http://stackoverflow.com/a/29483093
has body: I dont see any cleaning up in the code except a small change to the formVals object. app.factory('FormValues', function(){ //Custom factory that allows values to be passed inbetween different pages in the ng-view form. var formVals = { custEmail : '', custPhone : '', movieChosen : '', movieTime : '', movieTickets : '', movieCost : 0, concObjects : {}, concPurchases : '', concTotalCost : 0, finalCost : 0, tax: 0, subTotal: 0 }; return formVals; });
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29481948

http://stackoverflow.com/q/29385899
has answer: http://stackoverflow.com/a/29386244
tagged with: javascript
has title: How can I map snap SVG circle via angular JS?
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29386244
tagged with: angularjs
type: AnsweredQuestion
has body: I want to set the radius of snap SVG circle through an input box of angularJS, as I want to make it dynamic on run time. Anybody who knows the correct way to do it? Radius:
type: Question

http://stackoverflow.com/comment/47068051
score: 0
type: Comment
has text: Solution two is, unfortunately, because of various reasons not an option. Any idea why solution one isn't working?
comment on: http://stackoverflow.com/a/29450328
type: AnswerComment

http://stackoverflow.com/comment/47172100
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29507712
type: QuestionComment
has text: @anpsmn nope, I did that and the blink became slow, not the delay between.

http://stackoverflow.com/comment/47056740
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29444609
has text: var check = (a === true && (id < arr.length - 1) ? true : false; but arr and id need to be accessible.
type: Comment

http://stackoverflow.com/q/29386519
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46952039
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/46951205
accepted answer: http://stackoverflow.com/a/29386955
score: 0
has comment: http://stackoverflow.com/comment/46953261
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46988213
type: Question
has body: I am trying to implement before-after image comparison by jquery below.It takes two images and shows the comparison. fiddled here &lt;div&gt; (image comparison1) &lt;/div&gt; &lt;div&gt; (image comparison2) &lt;/div&gt; &lt;div&gt; (image comparison3) &lt;/div&gt; though it is very useful for me for single pair comparison, but the problem is whenever I want to implement the same effect with multiple pair, the container size defined in css becomes trouble. I have tried to make the width and height of css as auto &amp; as fit to content, but nothing seems to work. I want to implement multiple pair comparison on the same page as shown in div above. its like pairs of before after images.Each pair is of different size. Any suggeston for corrections with my coding is really appreciated. Thank You in advance.
has title: put multiple image-before-after section with jquery
answer count: 1
has answer: http://stackoverflow.com/a/29386955

http://stackoverflow.com/q/29487684
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/47134946
tagged with: datatables
has title: JQuery DataTable Column Filter - select dropdown filter
answer count: 1
has answer: http://stackoverflow.com/a/29487952
has body: At the moment, I'm trying to use a dropdown list to filter my table (I'm using Datatable plugin) This is my code : $('#tableID').dataTable() .columnFilter({ aoColumns: [ { type: "text" }, { type: "number" }, { type: "select", values: [ 'Identify Proposal', 'Define Proposal', 'Evaluate', 'Pending Proposal', 'Approval'] }, { type: "select", values: [ 'Identify Proposal', 'Define Proposal', 'Evaluate', 'Pending Proposal', 'Approval'] }, { type: "text" }, null, null, null, null, null, null, null, null ] }); }); What I'm trying to do is to get my table to have a drop-down filter : http://jquery-datatables-column-filter.googlecode.com/svn/trunk/customFilters.html But for some reasons it's not doing what it should. I don't know what I did wrong. This is the link to my table : http://176.32.230.19/caffeine-cranked.com/Files/test.html
tagged with: datatable
has comment: http://stackoverflow.com/comment/47136210
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47135237
accepted answer: http://stackoverflow.com/a/29487952

http://stackoverflow.com/comment/47110625
comment on: http://stackoverflow.com/q/29474779
score: 0
has text: Have you tried adding the `disabled` attribute to the input in your success callback?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29483303
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/29483138
type: Answer
downvote count: 1
has body: When I remove rows the index number is updated. Try the code blow. Click a row. It will alert its index then delete itself. Try clicking the row after it which should now have the same index as the deleted row. $('table tr').click(function(){ alert(this.rowIndex); $(this).remove(); }); Click to remove Click to remove Click to remove Click to remove Click to remove

http://stackoverflow.com/comment/47237169
type: AnswerComment
has text: I'm curious--version 3.0 of what?
type: Comment
comment on: http://stackoverflow.com/a/29533998
score: 0

http://stackoverflow.com/q/29489116
answer count: 1
has answer: http://stackoverflow.com/a/29492978
tagged with: javascript
type: UnansweredQuestion
has body: I can write: {{#link-to 'route' (query-params color=getColor)}} Link {{/link-to}} Is there any way to give parameters to getColor function? getColor is defined in the corresponding controller.
type: Question
has comment: http://stackoverflow.com/comment/47138097
tagged with: ember.js
has title: How to give parameters to a function that is given as a parameter value for query-params?
score: 0

http://stackoverflow.com/comment/47205495
has text: No, nothing more behind it. It's simply a unary operator that returns the negative value.
comment on: http://stackoverflow.com/q/29525566
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/29408119
type: Answer
has comment: http://stackoverflow.com/comment/46996115
has comment: http://stackoverflow.com/comment/47097486
has comment: http://stackoverflow.com/comment/46990248
has comment: http://stackoverflow.com/comment/46995582
has body: [Edited] Check this answer. You can detect scroll directions and trigger any event at a certain position of the scroll. How can I determine the direction of a jQuery scroll event?
answers question: http://stackoverflow.com/q/29407632
score: 0

http://stackoverflow.com/comment/47064045
score: 0
type: AnswerComment
has text: thanks for your answer. what about using `game` in players prototype? can i use it there too?
comment on: http://stackoverflow.com/a/29448879
type: Comment

http://stackoverflow.com/comment/56551037
has text: This is not a question. I am just answering Eun's question, which has not been answered yet.
comment on: http://stackoverflow.com/a/34403417
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47027959
type: Comment
type: QuestionComment
has text: There are some subtle difference in anonymous functions between JS and C#, but they are very subtle and difficult to find. They are connected to how closures are handled... http://www.smartik.net/2013/07/Closures-CSharp-vs-JS-Same-But-Different.html But in the end unless you try to do strange things, the differences are more "how it is implemented" than "how it works when used"
score: 1
comment on: http://stackoverflow.com/q/29426763

http://stackoverflow.com/comment/47161183
type: AnswerComment
score: 0
has text: Since your edit, just access the ball property with entry.Name and you can replace easily the indexOf function by your own, should not change that much.
type: Comment
comment on: http://stackoverflow.com/a/29500546

http://stackoverflow.com/comment/47098024
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29466131
has text: sorry maybe I didn't explain well what I try to do. The main issue is not to set the checkout date but the issue is to disable the checkout date before the checkin date dynamically.

http://stackoverflow.com/comment/46940287
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29379630
has text: Hi @shahbaz-masud thanks for your advice, I added the "$conn," to my PHP code and it now seems to be partly working, the "alert(data)" is now returning "[object Object]", I'm trying to have it return something like "/images/00001.jpg", do you know why it isn't rendering this data correctly?
type: AnswerComment

http://stackoverflow.com/comment/46958190
has text: Using an input is not the task :) I know how to do it with the input but in my case I have to use div. But the comment of @cmbuckley brought me to the right solution. Thx anyways :)
type: Comment
comment on: http://stackoverflow.com/a/29390293
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47099440
type: QuestionComment
has text: I meant the pitch, audacity was in french for me so I just translated it directly, my bad
score: 0
comment on: http://stackoverflow.com/q/29468346
type: Comment

http://stackoverflow.com/q/29511343
has body: I'm having a problem posting an image from an app that has been converted to a base64 string to a ruby on rails server. The app is written using Titanium. The the image sting is retrieved it is and turned back into an image there is no image. The app function doing the conversion and sending it is as follows function postActivity() { //hide keyboard on submit Ti.UI.Android.hideSoftKeyboard(); var imgFile = Ti.Filesystem.getFile(img); var imgString = imgFile.read(); var mybase = Ti.Utils.base64encode(imgString); sendData('POST', 'create_post.json', true, jsonToForm({ "post[text1]" : $.txt1.value, "post[number1]" : $.number1.value, "post[time]" : (60 * parseInt($.txtHrs.value)) + parseInt($.txtMins.value), "post[comment]" : $.txtComments.value, "post[image64]" : mybase.toString() }), function(response) { alert('Activity Added.'); Ti.App.fireEvent('getFeed'); Ti.App.fireEvent('showFeed'); Ti.API.info('Response: ' + response.message); }, function(error) { alert('There was an error. Please try again later.'); }); }; When the data arrives on the server it is inserted directly into the posts along with other data table using the following code: @user = User.find(session[:user_id]) @post = @user.posts.create(params[:post].merge(:val1 => @val1, :val2 => @val2, :group_id => @groupId ).permit(:val3, :val4, :time, :val5, :val5, :group_id, :comment, :image64)) To see what was sent from the app, the image as a base64 string was saved to a file. Here is an extract of that [binary] The post[image64] value is arriving and saving in the database as this: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDACgcHiMeGSgjISMtKygwPGRBPDc3PHtYXUlkkYCZlo AjIqgtObDoKrarYqMyP/L2u71////m8H////6/ b9//j/2wBDASstLTw1PHZBQXb4pYyl Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj4 Pj/wAA Note that the sent string contains Pj4+Pj4+ and the string at the server end turns into Pj4 Pj4 . The + character has been removed. My guess is this and possibly some other alteration to the string is causing the problem.…
has title: Post image as base64 string from Titanium app to Ruby on rails web service
tagged with: image-processing
tagged with: ruby-on-rails
type: Question
tagged with: javascript
tagged with: base64
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29511694
tagged with: titanium

http://stackoverflow.com/a/29419420
has body: Seems you need something like this: https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29416609
downvote count: 0

http://stackoverflow.com/q/29393461
has comment: http://stackoverflow.com/comment/46963745
has answer: http://stackoverflow.com/a/29393597
duplicate of: http://stackoverflow.com/q/5827290
tagged with: parsley.js
has comment: http://stackoverflow.com/comment/46966134
has comment: http://stackoverflow.com/comment/46963645
has comment: http://stackoverflow.com/comment/46966059
has body: I saw in the ParsleyJs library the folowing: What does the expression !(function(f){...}) mean? Is it a negation? EDIT: After some explanations, I observed that actually the code looks like !( f(y){}( f(x){} ) ); or can be written as !( f(z) ); or !(Z); where Z = f(z), z = f(y){}, and finally y = f(x){}... So is not really clear what function executes the expression !(Z);
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/46963631
answer count: 2
has comment: http://stackoverflow.com/comment/46963732
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46963647
has title: What does !(function()) mean in JavaScript/jQuery?
has answer: http://stackoverflow.com/a/29393831
has comment: http://stackoverflow.com/comment/46964819
score: 4
linked to: http://stackoverflow.com/q/5827290
linked to: http://stackoverflow.com/q/3755606
type: UnansweredQuestion

multiple-file-upload
tags question: http://stackoverflow.com/q/29394126
type: Tag
tag name: multiple-file-upload

http://stackoverflow.com/comment/47059230
has text: @user3663882 In css one element always fill the surrounding element but when you create div the width is always 100%. If you set `float: left` the same as `display:inline` the element will shrink and be the size of the thing that's inside.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29446068
type: Comment

http://stackoverflow.com/comment/47035032
has text: expended retained with data in it?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29432193

http://stackoverflow.com/q/29448475
has answer: http://stackoverflow.com/a/29450838
has title: Nodejs server: Failed to load resource: the server responded with a status of 404 (Not Found)
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29470098
tagged with: http
type: Question
has body: I have a web server setted up in node. var app = express(); app.use(express.static(PUBLIC_PATH)); server = require('http').createServer(app), io = require('socket.io').listen(server); i set the public path to my app's root public folder, where i keep my frontend, so when the server is deployed, it's /app/public When i try to open a page, i see this in chrome's console i Failed to load resource: the server responded with a status of 404 (Not Found) The file in question is app.js which is located in my public folder. I do see requests from the web server for that certain file 2015-04-04T15:43:04.208178+00:00 heroku[router]: at=info method=GET path="/style.css" host=hive-badescuga.herokuapp.com request_id=2be0334e-e968-4397-8c2e-9c65c85fea22 fwd="188.25.247.211" dyno=web.1 connect=1ms service=6ms status=304 bytes=236 2015-04-04T15:43:04.203415+00:00 heroku[router]: at=info method=GET path="/app.js" host=hive-badescuga.herokuapp.com request_id=fc8c529c-7641-4df2-9b13-5fee9e1af365 fwd="188.25.247.211" dyno=web.1 connect=1ms service=7ms status=404 bytes=217 2015-04-04T15:43:09.152566+00:00 heroku[router]: at=info method=GET path="/style.css" host=hive-badescuga.herokuapp.com request_id=b89ded8e-5433-4b57-8c80-c2e7407d31b0 fwd="188.25.247.211" dyno=web.1 connect=1ms service=6ms status=304 bytes=236 What is the problem? UPDATE As i'm debugging further i see that a css in the same root as my app.js (that can't be loaded), gets loaded. Here is my html: &lt;link rel="stylesheet" href="/style.css"&gt; &lt;script type='text/javascript' src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;signed_in=true&amp;libraries=places"&gt;&lt;/script&gt; &lt;script src="/app.js"&gt;&lt;/script&gt; so style.css does get loaded while app.js doesn't (because it can't be found), and they are in the same folder.
tagged with: heroku
tagged with: javascript
tagged with: express
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29470098
possible better answer: http://stackoverflow.com/a/29450838

http://stackoverflow.com/comment/46987923
has text: Where do you want to get ? client side or server side??
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29406470
type: AnswerComment

http://stackoverflow.com/a/29467114
has comment: http://stackoverflow.com/comment/47096633
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/47096608
upvote count: 2
has body: I strongly recommend using an if statement for this since regex is not efficient for this case. Anyway, if you really want to use RegEx, try the following: var age_regex=/\s[0-1]{1}[0-9]{0,2}/; Regex demo and explanation. EDIT: Using this regex in : (Working Demo) p{ color: red; } Enter Age: This form will give error if number does not pass the regex.
has comment: http://stackoverflow.com/comment/106720134
has comment: http://stackoverflow.com/comment/47096561
answers question: http://stackoverflow.com/q/29467075
downvote count: 0

http://stackoverflow.com/q/29403867
has comment: http://stackoverflow.com/comment/46983032
score: 0
accepted answer: http://stackoverflow.com/a/29403932
answer count: 1
has body: I'm trying to initialize jquery accordion plugin dynamically from a rest ajax query. There is no console error just doesn't actually accordion the data. I'm not quite sure what is wrong because im not that good with jquery. Any help would be appreciated. TheWayWardJourney <!--[if lte IE 8]> <![endif]--> Messages
tagged with: jquery
tagged with: ajax
type: AnsweredQuestion
has title: jquery accordion not initializing with dynamic creation not sure why
has answer: http://stackoverflow.com/a/29403932
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46930121
comment on: http://stackoverflow.com/q/29374517
type: Comment
type: QuestionComment
has text: When it runs the first time.
score: 0

http://stackoverflow.com/q/29486274
answer count: 2
downvote count: 0
has body: I have a little issue on centering text in a highchart pie chart. I have this script for a pie chart var chart1 = new Highcharts.Chart({ chart: { renderTo: 'finance-1', type: 'pie' }, credits: { enabled: false }, title: { text: '', }, tooltip: { enabled: false }, plotOptions: { pie: { borderColor: null, innerSize: '70%', dataLabels: { enabled: false } } }, series: [{ data: [ { y: 64, color: '#283139' }, { y: 46, color: '#ebebeb' } ] }] }, // using function (chart1) { // on complete var xpos = '50%'; var ypos = '50%'; var circleradius = 40; // Render the circle chart1.renderer.circle(xpos, ypos, circleradius).attr({ fill: '#fff', }).add(); // Render the text chart1.renderer.text('3.900' + ' kr.', 100, 90).css({ width: circleradius * 2, color: '#222', fontSize: '18px', textAlign: 'center', fontFamily: 'dinotmedium', }).attr({ // why doesn't zIndex get the text in front of the chart? zIndex: 999 }).add(); }); var chart2 = new Highcharts.Chart({ chart: { renderTo: 'finance-2', type: 'pie', backgroundColor: '#ebebeb' }, credits: { enabled: false }, title: { text: '', }, tooltip: { enabled: false }, plotOptions: { pie: { borderColor: null, innerSize: '70%', dataLabels: { enabled: false } } }, series: [{ data: [ { y: 86, color: '#fff' }, { y: 14, color: '#283139' } ] }] }, This works almost as it should, but the text centering is not responsive, - because it is a static position, chart1.renderer.text('3.900' + ' kr.', 100, 90) The text will move out of the center when the screen size gets smaller. How can I position it in the center of the pie chart accordingly to the screen size ?
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29487232
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/29488768
type: Question
tagged with: charts
has title: centering text in highchart pie on responsive
tagged with: highcharts
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29487232
has answer: http://stackoverflow.com/a/29488768

http://stackoverflow.com/comment/46933856
score: 0
has text: use onclick="signup();" AND onclick="login();" where they are needed on the divs/buttons/tags @user3312767
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29376648

http://stackoverflow.com/q/29473721
tagged with: mysql
has comment: http://stackoverflow.com/comment/47111044
has body: I am trying to plot a bar chart by taking two columns from my database and converting it to JSON using json_encode in PHP (probc.php file) I referred to this example here to construct a bar chart - BAR CHART EXAMPLE After doing so, I changed the attributes letters and frequency to the column names I wanted to use (fphour for x-axis and fpprob for y-axis), and also changed d3.tsv to d3.json and included the relevant file (probc.php). But I do not get any results on running my file. Just a blank vanilla page. Please help! Here's the code &lt;script src="http://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt; &lt;script&gt; var margin = {top: 20, right: 20, bottom: 30, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; var x = d3.scale.ordinal() .rangeRoundBands([0, width], .1); var y = d3.scale.linear() .range([height, 0]); var xAxis = d3.svg.axis() .scale(x) .orient("bottom"); var yAxis = d3.svg.axis() .scale(y) .orient("left") .ticks(10, "%"); var svg = d3.select("body").append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); d3.json("probc.php", type, function(error, data) { x.domain(data.map(function(d) { return d.fphour; })); y.domain([0, d3.max(data, function(d) { return d.fpprob; })]); svg.append("g") .attr("class", "x axis") .attr("transform", "translate(0," + height + ")") .call(xAxis); svg.append("g") .attr("class", "y axis") .call(yAxis) .append("text") .attr("transform", "rotate(-90)") .attr("y", 6) .attr("dy", ".71em") .style("text-anchor", "end") .text("Frequency"); svg.selectAll(".bar") .data(data) .enter().append("rect") .attr("class", "bar") .attr("x", function(d) { return x(d.fphour); }) .attr("width", x.rangeBand()) .attr("y", function(d) { return y(d.fpprob); }) .attr("height", function(d) { return height - y(d.fpprob); }); }); function type(d) { d.fpprob = +d.fppro…
type: Question
accepted answer: http://stackoverflow.com/a/35577292
answer count: 1
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/47108670
favorite count: 0
has answer: http://stackoverflow.com/a/35577292
has comment: http://stackoverflow.com/comment/47111144
upvote count: 4
tagged with: d3.js
has title: Plotting Bar Chart from MySQL Database using D3.js
tagged with: php
has comment: http://stackoverflow.com/comment/47110410
type: AnsweredQuestion
downvote count: 0
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/47006934
score: 0
type: Comment
type: QuestionComment
has text: Would you recommend executing both functions (getLocation and provideError) within getCoords and then returning the value?
comment on: http://stackoverflow.com/q/29416967

http://stackoverflow.com/comment/46986062
score: 0
type: Comment
has text: In that case why dropdown is opening? if i understand correctly it should throw an error when i try to open the dropdown or when i try to initialize the dropdown right? in both cases dom is mutated by materialize right?.But why this is only happening onClick event of item?
type: AnswerComment
comment on: http://stackoverflow.com/a/29400530

http://stackoverflow.com/a/29428851
has comment: http://stackoverflow.com/comment/47027946
has comment: http://stackoverflow.com/comment/47028300
has comment: http://stackoverflow.com/comment/47027844
has comment: http://stackoverflow.com/comment/47027897
type: Answer
has comment: http://stackoverflow.com/comment/47027980
has body: Here you can use ajax and then call your radio player which is not in form... Find below example. $("button").click(function(){ $.ajax({url: "demo_test.txt", success: function(result){ $("#div1").html(result); } }); }); Hope this wil help.
has comment: http://stackoverflow.com/comment/47027900
has comment: http://stackoverflow.com/comment/47027825
has comment: http://stackoverflow.com/comment/47027882
has comment: http://stackoverflow.com/comment/47027863
has comment: http://stackoverflow.com/comment/47028496
has comment: http://stackoverflow.com/comment/47027810
score: 0
has comment: http://stackoverflow.com/comment/47028082
has comment: http://stackoverflow.com/comment/47028262
answers question: http://stackoverflow.com/q/29428788

http://stackoverflow.com/a/29423916
answers question: http://stackoverflow.com/q/29423900
score: 2
has comment: http://stackoverflow.com/comment/47019398
has comment: http://stackoverflow.com/comment/47019334
upvote count: 2
has comment: http://stackoverflow.com/comment/47019476
accepted answer of: http://stackoverflow.com/q/29423900
has body: Your syntax was a bit off, I think that's how it used to work with live back in the day, but on behaves slightly differently for a better performance. See it in action here: $("body").on("click", "button", function() { $(".center").append(" CLICK ME "); }); .center { margin: 0 auto; text-align: center; width: 380px; } .box { background: #F7F7F7; width: 380px; height: 80px; border: 1px solid #D5D5D5; box-shadow: 0 0 5px #BABABA; font-family: inherit; font-size: inherit; } CLICK ME
has comment: http://stackoverflow.com/comment/47019868
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47019380
type: Answer

http://stackoverflow.com/a/29388677
has comment: http://stackoverflow.com/comment/46955200
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29388550
answers question: http://stackoverflow.com/q/29388550
type: Answer
has body: First of all one thing you should notice that you cannot use same ids for multiple elements in one single page. Id has to be unique for each element. In your case you can change it to class: $('.mySelect:eq(0)').change(function(){ $('option:contains(Five)').prop('disabled', this.value == "One"); }).change(); // <---this makes sure to fire the change event on doc ready // because you have option with value "one" already selected. One Two Three Four Five Six
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46955723
has comment: http://stackoverflow.com/comment/46955549

timer
tag name: timer
tags question: http://stackoverflow.com/q/29478388
tags question: http://stackoverflow.com/q/29524394
tags question: http://stackoverflow.com/q/29407685
tags question: http://stackoverflow.com/q/29451267
type: Tag
tags question: http://stackoverflow.com/q/29409842
tags question: http://stackoverflow.com/q/29512786
tags question: http://stackoverflow.com/q/29430922
tags question: http://stackoverflow.com/q/29480819
tags question: http://stackoverflow.com/q/29397865
tags question: http://stackoverflow.com/q/29485771
tags question: http://stackoverflow.com/q/29513460
tags question: http://stackoverflow.com/q/29425941

http://stackoverflow.com/comment/47080086
score: 0
comment on: http://stackoverflow.com/a/29457580
type: Comment
has text: Yes, but OP is just appending a string to the DOM that is being interpreted by the browser as HTML. How do you explain my fiddle working, no errors in the console and the `div` is appended. It is already escaped you don't have to worry about it anymore.
type: AnswerComment

http://stackoverflow.com/comment/47185774
type: QuestionComment
has text: shouldn't you convert your object to json? I think you should call JSON.stringify(data) in your post request
comment on: http://stackoverflow.com/q/29515034
score: 0
type: Comment

http://stackoverflow.com/q/29502240
has title: javascript: how to remove data from array
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29502444
has body: From below code i tried removing data from array. Unfortunately Its not removing data from my array i.e ary , See if you can help me with this challange var ary = [{"Force":"Force Converter"},{"Power":"Power Converter"}]; function removeFav(n,v){ var index = ary.indexOf(n); alert(index); if (index &gt; -1) { ary.splice(index, 1); } alert("New updated Array:"+ary); } Calling to remove as removeFav("Power","Power Converter"); // this calls the above method
has answer: http://stackoverflow.com/a/29525146
has comment: http://stackoverflow.com/comment/47162792
has comment: http://stackoverflow.com/comment/47162610
accepted answer: http://stackoverflow.com/a/29502444
possible better answer: http://stackoverflow.com/a/29502364
has comment: http://stackoverflow.com/comment/47162875
has answer: http://stackoverflow.com/a/29502364
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47162598
has comment: http://stackoverflow.com/comment/47162634
has comment: http://stackoverflow.com/comment/47162694
type: Question
has comment: http://stackoverflow.com/comment/47162675
tagged with: javascript

http://stackoverflow.com/comment/46933762
comment on: http://stackoverflow.com/q/29375944
score: 0
type: Comment
type: QuestionComment
has text: you should have the input bound to an observable in your viewmodel, it will automatically get updated. and since the selectPage function is in the viewmodel, it already has access to the other observable. no need to pass it around

http://stackoverflow.com/a/29440870
accepted answer of: http://stackoverflow.com/q/29440812
upvote count: 1
has comment: http://stackoverflow.com/comment/47053532
has comment: http://stackoverflow.com/comment/47051253
answers question: http://stackoverflow.com/q/29440812
has body: The first thing is, if your frontend script and server script(php) is in the same page, you don't need to use ajax. you can simply set the data like this after your php script var tableData = &lt;?php echo json_encode($data); ?&gt;; Then in datatable initialize method, use this $(document).ready(function() { $('#example').dataTable({ "aaData": tableData, "aoColumns": [ { "data": "provider_num" }, { "data": "provider_name" }, { "data": "233_net_charity_care" }, { "data": "291_cost_of_non_mcr_bad_debts" }, { "data": "301_cost_of_uncomp_care" } ] }); });
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47050425
has comment: http://stackoverflow.com/comment/47051158
type: Answer
score: 1

http://stackoverflow.com/comment/47148003
type: Comment
score: 1
type: QuestionComment
has text: that happens with the source code too. try hover multiple times, you will see the effect.
comment on: http://stackoverflow.com/q/29491886

http://stackoverflow.com/a/29385755
answers question: http://stackoverflow.com/q/29385648
downvote count: 0
score: 4
type: Answer
has body: Just put you $scope.create function inside your controller. Not outside ! $scope is only defined in controllers, each controller have its own. So write $scope outside your controller can't work.
upvote count: 4

computer-vision
tags question: http://stackoverflow.com/q/29421717
type: Tag
tag name: computer-vision

http://stackoverflow.com/q/29507712
has body: .blink_me { -webkit-animation-name: blinker; -webkit-animation-duration: 1s; -webkit-animation-delay: 2s; -webkit-animation-timing-function: linear; -webkit-animation-iteration-count: infinite; -moz-animation-name: blinker; -moz-animation-duration: 2s; -moz-animation-timing-function: linear; -moz-animation-iteration-count: infinite; animation-name: blinker; animation-duration: 2s; animation-timing-function: linear; animation-iteration-count: infinite; } @-webkit-keyframes blinker { 0% { opacity: 1.0; } 50% { opacity: 0.0; } 100% { opacity: 1.0; } } } This Will Blink I added -webkit-animation-delay: 2s; but the delay triggered at the beginning not at between, how can I make delay happens in between so that the blinking speed is slower?
possible better answer: http://stackoverflow.com/a/29508087
type: Question
has title: css3 animation delay between keyframe?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47172070
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/47172183
has answer: http://stackoverflow.com/a/29507982
linked to: http://stackoverflow.com/q/8209473
has comment: http://stackoverflow.com/comment/47172100
accepted answer: http://stackoverflow.com/a/29507982
tagged with: css
has answer: http://stackoverflow.com/a/29508087
type: AnsweredQuestion

http://stackoverflow.com/comment/47067211
type: Comment
type: QuestionComment
has text: @firefoxuser_1 I just realized that I can't do this because my inputs start as "invalid" and I don't want them to all appear red before the customers have a chance to fill them out. That's why I didn't use a css class originally.
comment on: http://stackoverflow.com/q/29442357
score: 0

http://stackoverflow.com/comment/47077576
type: QuestionComment
comment on: http://stackoverflow.com/q/29449068
type: Comment
has text: Use concole (F12 Crome) and check errors or missing files.
score: 0

http://stackoverflow.com/comment/47113183
comment on: http://stackoverflow.com/q/29476126
score: 1
has text: It is personal opinion. Showing/Hiding seems more reasonable since you do not have to worry about where the content is going to be loaded from. BUT if the content was huge, loading it dynamically is probably a better bet. So the answer is it depends.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29506264
score: 1
has body: When you use a getter method like .attr('class') on a set of elements, it will return the value of the first element in the set. when you say $('.users') it will return all elements with the class users. In your case you want to have reference to the clicked button, which is available in the click handler as this so you can $(document).ready(function() { var users = ['u1', 'u2', 'u3'] for (var i = 0; i &lt; users.length; i++) { var $currentUser = $('&lt;button class="users ' + i + '"&gt;&lt;/button&gt;'); $currentUser.text(users[i]); $currentUser.appendTo('.userList'); } $(".users").click(function() { alert(this.className.split(/\s+/)); alert(this.classList); //for ie 10+ }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div class="userList"&gt;&lt;/div&gt;
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29506186
downvote count: 0

http://stackoverflow.com/a/29374065
has body: You need to fetch the documents in order to return an array from your method. Something like this: returnUsers: function() { var selector = {}; var options = {fields: {username: 1}}; return Meteor.users.find(selector, options).fetch(); } Note that it's critical that you filter the fields in order to avoid sending all of your users' secrets to the client. For more information see the "published secrets" section in my common mistakes article. It's hard to say without knowing your use case, but instead of using a method, it may make more sense to publish some subset of users to your client, rather than fetching all of them on an event. In order to get the result back from the server, you should invoke the method like this: Meteor.call('returnUsers', function(err, users) { console.log(users); });
has comment: http://stackoverflow.com/comment/46936948
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46929893
has comment: http://stackoverflow.com/comment/46937377
upvote count: 2
has comment: http://stackoverflow.com/comment/46929829
score: 2
has comment: http://stackoverflow.com/comment/46930107
has comment: http://stackoverflow.com/comment/46930168
has comment: http://stackoverflow.com/comment/46929327
has comment: http://stackoverflow.com/comment/46928773
accepted answer of: http://stackoverflow.com/q/29373931
has comment: http://stackoverflow.com/comment/46929565
answers question: http://stackoverflow.com/q/29373931
type: AcceptedAnswer

http://stackoverflow.com/comment/47042995
type: Comment
type: QuestionComment
has text: have you tried to log the different values to ensure they are being set properly?
comment on: http://stackoverflow.com/q/29436581
score: 0

http://stackoverflow.com/a/42489703
has comment: http://stackoverflow.com/comment/83365050
answers question: http://stackoverflow.com/q/29447715
downvote count: 2
type: Answer
has body: You might also want to take a look at NativeBase (http://nativebase.io). This a library of components for React Native that include some nice layout structure (http://nativebase.io/docs/v2.0.0/components#anatomy) including Headers and Footers. It's a bit like Bootstrap for Mobile.
score: 7
upvote count: 9

http://stackoverflow.com/comment/47004828
has text: I updated the JQuery in my jsfiddle. I'm almost there. I can get 3 of them working. I just need help with the other 3. Here''s my jsfiddle too: https://jsfiddle.net/mjreno/r99qom5v/31/
comment on: http://stackoverflow.com/q/29399493
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29406603
score: 4
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/29402775
has body: You may check this with use method_exists. Like that: method_exists(Yii::$app-&gt;controllerNamespace . $controllerName, 'action' . ucfirst($actionName));// $actionName with first lette is uppercase For more - http://php.net/manual/en/function.method-exists.php EDIT: Or you may use this way: $controller = Yii::$app-&gt;createController('controller');// if (!$controller !== null &amp;&amp; method_exists($controller, 'action')) { echo 'controller/action is allow :)'; } Or I invented better way with use Yii2 Api: $controller = Yii::$app-&gt;createController('controller');// if (!$controller !== null &amp;&amp; $controller-&gt;hasMethod('action'))) { echo 'controller/action is allow :)'; }
has comment: http://stackoverflow.com/comment/46989736

mysql
tags question: http://stackoverflow.com/q/29480558
tags question: http://stackoverflow.com/q/29394849
tags question: http://stackoverflow.com/q/29443558
tags question: http://stackoverflow.com/q/29399075
tags question: http://stackoverflow.com/q/29463990
tags question: http://stackoverflow.com/q/29514423
tags question: http://stackoverflow.com/q/29447755
tags question: http://stackoverflow.com/q/29438150
tags question: http://stackoverflow.com/q/29527580
tags question: http://stackoverflow.com/q/29392845
tag name: mysql
tags question: http://stackoverflow.com/q/29475461
tags question: http://stackoverflow.com/q/29442508
tags question: http://stackoverflow.com/q/29375540
tags question: http://stackoverflow.com/q/29493454
tags question: http://stackoverflow.com/q/29438234
tags question: http://stackoverflow.com/q/29471491
tags question: http://stackoverflow.com/q/29455865
tags question: http://stackoverflow.com/q/29380829
tags question: http://stackoverflow.com/q/29424844
tags question: http://stackoverflow.com/q/29523366
tags question: http://stackoverflow.com/q/29472359
tags question: http://stackoverflow.com/q/29505016
tags question: http://stackoverflow.com/q/29506536
type: Tag
tags question: http://stackoverflow.com/q/29395299
tags question: http://stackoverflow.com/q/29384006
tags question: http://stackoverflow.com/q/29419642
tags question: http://stackoverflow.com/q/29421684
tags question: http://stackoverflow.com/q/29390145
tags question: http://stackoverflow.com/q/29477677
tags question: http://stackoverflow.com/q/29457628
tags question: http://stackoverflow.com/q/29412629
tags question: http://stackoverflow.com/q/29473721
tags question: http://stackoverflow.com/q/29528284
tags question: http://stackoverflow.com/q/29497204
tags question: http://stackoverflow.com/q/29435752
tags question: http://stackoverflow.com/q/29521627
tags question: http://stackoverflow.com/q/29434840
tags question: http://stackoverflow.com/q/29383843
tags question: http://stackoverflow.com/q/29383572
tags question: http://stackoverflow.com/q/29448943
tags question: http://stackoverflow.com/q/29400793
tags question: http://stackoverflow.com/q/29529905
tags question: http://stackoverflow.com/q/29447857
tags question: http://stackoverflow.com/q/29485085
tags question: http://stackoverflow.com/q/29526567
tags question: http://stackoverflow.com/q/29460197
tags question: http://stackoverflow.com/q/29394728

http://stackoverflow.com/comment/47121776
type: QuestionComment
comment on: http://stackoverflow.com/q/29480427
has text: Actually, your first guess (Content-Type: application/json) worked!! I'll remember that from now on, I didn't know it was necessary. Thanks a lot!!
score: 0
type: Comment

http://stackoverflow.com/comment/47124117
type: QuestionComment
comment on: http://stackoverflow.com/q/29477589
has text: Maybe this example is what you're after? http://threejs.org/examples/webgl_loader_pdb.html
score: 0
type: Comment

http://stackoverflow.com/a/54561101
has body: Updating this for the latest version of ThreeJS (2019) - After you instantiate your scene using: scene = new THREE.Scene(); You can then access the "background" property of this object and set the hex color like this: scene.background = new THREE.Color(0xf5f5f5);
answers question: http://stackoverflow.com/q/29422118
type: Answer
score: 2
upvote count: 2
downvote count: 0

http://stackoverflow.com/q/29503603
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47164887
has answer: http://stackoverflow.com/a/29503722
has comment: http://stackoverflow.com/comment/47164946
has answer: http://stackoverflow.com/a/29504580
has answer: http://stackoverflow.com/a/29503758
type: Question
has body: I have such string 13-2-10-7-3 where numbers delimited by -. I am wondering what is the best way to calculate the sum of all numbers from the string in javascript?
tagged with: javascript
tagged with: jquery
score: -1
downvote count: 2
upvote count: 1
has title: How to calculate numbers in string
has answer: http://stackoverflow.com/a/29503694
has answer: http://stackoverflow.com/a/29503677
favorite count: 0

http://stackoverflow.com/q/29474721
has answer: http://stackoverflow.com/a/29474775
favorite count: 0
has comment: http://stackoverflow.com/comment/47110578
accepted answer: http://stackoverflow.com/a/29474931
possible better answer: http://stackoverflow.com/a/29474775
upvote count: 1
tagged with: php
type: AnsweredQuestion
has title: Using PHP, how do I append a JSON blob to an existing multi-level JSON object
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/29474931
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 2
has comment: http://stackoverflow.com/comment/47110555
has body: I am attempting to get some JSON data from an external file and append some user generated JSON to it that gets sent via GET. In this example I have removed the GET business and supplied the new JSON as a variable. The old data is coming from data/test.json and is stored in the variable $oldData. The new data will be coming from a GET, but in this test it is in the variable $newData Here is the JSON from data/test.json { "monkeys": [ { "id": 1424634259848, "name": "Funky Monkey", "description": "This sure is a funky monkey!", "favoriteFoods": [ "bananas", "cheese" ], "image": "img/funky-monkey.jpg" } ] } Here is the PHP that has gotten me this far $fileData = file_get_contents('data/test.json'); $oldData = json_decode($fileData, true); $newData = json_decode('{"id": 1424634259848,"name": "Monkey Ball","description": "This is a video game, not a monkey!","favoriteFoods": ["bits","pixels"],"image": "img/monkey-ball.jpg"}', true); $result = array_merge_recursive($oldData,$newData); echo '&lt;pre&gt;' . print_r(json_encode($result), true) . '&lt;/pre&gt;'; Here is the result { "monkeys": [ { "id": 1424634259848, "name": "Funky Monkey", "description": "This sure is a funky monkey!", "favoriteFoods": [ "bananas", "cheese" ], "image": "img/funky-monkey.jpg" } ], "id": 1424634259848, "name": "Monkey Ball", "description": "This is a video game, not a monkey!", "favoriteFoods": [ "bits", "pixels" ], "image": "img/monkey-ball.jpg" } Unfortunately the second monkey is outside the brackets and not the second item in the monkeys array. Here is the result I would like { "monkeys": [ { "id": 1424634259848, "name": "Funky Monkey", "description": "This sure is a funky monkey!", "favoriteFoods": [ "bananas", "cheese" ], "image": "img/funky-monkey.jpg" }, { "id": 1424634259848, "name": "Monkey Ball", "description": "This is a video game, not a monkey!", "favoriteFoods": [ "bits", "pixels" ], "image": "img/monkey-ball.jpg" } ] } I don't care about keys or values of the JSON, I just want…

http://stackoverflow.com/comment/46993728
comment on: http://stackoverflow.com/q/29407467
score: 0
type: Comment
type: QuestionComment
has text: I think you can't do that... Because, in order to download (not show), you need to tell to browser with specific headers from server side. See more [http://php.net/manual/en/function.header.php#example-4915](http://php.net/manual/en/function.header.php#example-4915)

http://stackoverflow.com/comment/46961037
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29374711
has text: Use a WHILE loop on the credential fields. For example, as long as the captcha is visible, have Selenium try filling in the credentials if they're empty. Just remember to put a bit of a wait so the While doesn't execute hundreds of times a second. Does that help?
score: 0

http://stackoverflow.com/a/29434890
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29417241
score: 1
upvote count: 1
has body: Thanks to @AllanNienhuis, he puts me on a good lead. My solution with Node.js + Mongoose : In Event.js : var mongoose = require('mongoose'); var EventSchema = new mongoose.Schema({ name: String, pos : [Number], type: String }); EventSchema.index({ pos : '2dsphere' }); module.exports = mongoose.model('Event', EventSchema); In eventController.js exports.near = function(req, res) { var point = JSON.parse(req.body.point); var max = parseInt(req.body.max); console.log(point); Event.geoNear(point.pos, { spherical : true, maxDistance : max }, function (err, results, stats) { if (err) res.json(JsonResponse.get(Code.generic_error, {error: err})); else res.json(JsonResponse.get(Code.valid, results )); }); }; Works like a charm !
has comment: http://stackoverflow.com/comment/47041434
answers question: http://stackoverflow.com/q/29417241
type: AcceptedAnswer

http://stackoverflow.com/comment/47263638
has text: Thank you for replying. Unfortunately it does not work for me, but I found something that helped me out. I ll post it as answer here.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29512392

internet-explorer
tags question: http://stackoverflow.com/q/29418231
tags question: http://stackoverflow.com/q/29401613
tags question: http://stackoverflow.com/q/29463395
tags question: http://stackoverflow.com/q/29426323
tags question: http://stackoverflow.com/q/29522063
tags question: http://stackoverflow.com/q/29438995
tag name: internet-explorer
tags question: http://stackoverflow.com/q/29412126
tags question: http://stackoverflow.com/q/29393661
tags question: http://stackoverflow.com/q/29529900
tags question: http://stackoverflow.com/q/29467870
tags question: http://stackoverflow.com/q/29407398
tags question: http://stackoverflow.com/q/29501508
tags question: http://stackoverflow.com/q/29429192
tags question: http://stackoverflow.com/q/29434868
tags question: http://stackoverflow.com/q/29525345
tags question: http://stackoverflow.com/q/29438912
tags question: http://stackoverflow.com/q/29416448
tags question: http://stackoverflow.com/q/29398641
tags question: http://stackoverflow.com/q/29506471
tags question: http://stackoverflow.com/q/29485904
tags question: http://stackoverflow.com/q/29518621
tags question: http://stackoverflow.com/q/29516280
tags question: http://stackoverflow.com/q/29515830
tags question: http://stackoverflow.com/q/29448437
tags question: http://stackoverflow.com/q/29459749
tags question: http://stackoverflow.com/q/29442299
tags question: http://stackoverflow.com/q/29506533
tags question: http://stackoverflow.com/q/29516979
tags question: http://stackoverflow.com/q/29488495
tags question: http://stackoverflow.com/q/29388363
tags question: http://stackoverflow.com/q/29514718
tags question: http://stackoverflow.com/q/29388687
type: Tag
tags question: http://stackoverflow.com/q/29512509
tags question: http://stackoverflow.com/q/29401915
tags question: http://stackoverflow.com/q/29418785
tags question: http://stackoverflow.com/q/29495733
tags question: http://stackoverflow.com/q/29524343

http://stackoverflow.com/comment/47206959
type: AnswerComment
comment on: http://stackoverflow.com/a/29524934
type: Comment
score: 1
has text: Many thanks, @NicolasBoonaert! I have tested it and it works like a charm. Answer accepted, best regards,

http://stackoverflow.com/a/29380728
downvote count: 0
answers question: http://stackoverflow.com/q/29380685
has body: Try this: $('.background').css({ transition: 'background-color 1s ease-in-out', "background-color": "red" });
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/29483803
type: Question
has answer: http://stackoverflow.com/a/29484081
possible better answer: http://stackoverflow.com/a/29483946
tagged with: javascript
has answer: http://stackoverflow.com/a/29483946
has title: How to show just one image at a time at a set interval?
tagged with: http://stackoverflow.com/tag/html
has body: I have created a javascript function which takes two images from div style and displays it one picture first and the other picture after the specified time. JavaScript var imageID = 0; function changeImage (every_seconds) { if (!imageID) { document.getElementById("myimage1"); imageID++; } if (imageID == 1) { document.getElementById("myimage2"); } } //call same function again for x of seconds setTimeout("changeImage(" + every_seconds + ")", ((every_seconds) * 50000000000)); } HTML Please can someone help how to get just a single image at a time and disappear the other one at the specified interval.
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29484081
has answer: http://stackoverflow.com/a/29484067
tagged with: css
answer count: 4
type: AnsweredQuestion
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/29483940

sprite-sheet
tags question: http://stackoverflow.com/q/29450956
tag name: sprite-sheet
type: Tag
tags question: http://stackoverflow.com/q/29474925

http://stackoverflow.com/comment/47108420
comment on: http://stackoverflow.com/a/29473437
has text: yes, of course. To counter I was assign eiImg wich is string. I have updated may answer. The problem with your code was that when the page is loaded counter variable is set to 0 and it's starts increment from 0. The solution is to set counter variable to the value ( index ) that is used to show the image.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47171349
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29507327
has text: this works. i'm curious i used url directly at update. it can get into it.

http://stackoverflow.com/comment/47204597
has text: @RobG Oh ofcourse, that's pretty stupid. Awesome feedback, thank you so much ^^
score: 0
comment on: http://stackoverflow.com/q/29524609
type: QuestionComment
type: Comment

parse-platform
tags question: http://stackoverflow.com/q/29377113
tags question: http://stackoverflow.com/q/29525143
tags question: http://stackoverflow.com/q/29449248
tags question: http://stackoverflow.com/q/29381538
type: Tag
tags question: http://stackoverflow.com/q/29522469
tags question: http://stackoverflow.com/q/29382979
tags question: http://stackoverflow.com/q/29442452
tags question: http://stackoverflow.com/q/29489008
tags question: http://stackoverflow.com/q/29439292
tags question: http://stackoverflow.com/q/29484049
tags question: http://stackoverflow.com/q/29405487
tags question: http://stackoverflow.com/q/29431413
tags question: http://stackoverflow.com/q/29496654
tags question: http://stackoverflow.com/q/29463265
tags question: http://stackoverflow.com/q/29501647
tags question: http://stackoverflow.com/q/29422867
tags question: http://stackoverflow.com/q/29393636
tags question: http://stackoverflow.com/q/29479993
tags question: http://stackoverflow.com/q/29499180
tags question: http://stackoverflow.com/q/29482225
tags question: http://stackoverflow.com/q/29408547
tags question: http://stackoverflow.com/q/29428249
tags question: http://stackoverflow.com/q/29405664
tags question: http://stackoverflow.com/q/29403831
tag name: parse-platform
tags question: http://stackoverflow.com/q/29412890

http://stackoverflow.com/comment/47218338
score: 0
type: Comment
type: QuestionComment
has text: @Ian: I have not tried to add data or any points. I am just exploring my options if I would be able to recreate a similar animation.
comment on: http://stackoverflow.com/q/29525480

http://stackoverflow.com/a/29410083
type: Answer
downvote count: 0
score: 1
upvote count: 1
has body: The code looks correct as long as somewhere either sightingByDate or renderer is getting modified. Perhaps, this is not evident in your code snippet. Make sure any or both of these are getting changed somewhere in your flow to trigger WatchCollection
answers question: http://stackoverflow.com/q/29409338

http://stackoverflow.com/a/29414463
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29408447
answers question: http://stackoverflow.com/q/29408447
has body: Related question: How to set zoom level in google map If you only have one marker (markers.length == 1), then don't call map.fitBounds(). Change: map.setCenter(latlngbounds.getCenter()); map.fitBounds(latlngbounds); map.setZoom(5); To: map.setCenter(latlngbounds.getCenter()); if (marker.length != 1) map.fitBounds(latlngbounds); map.setZoom(5);
type: AcceptedAnswer

http://stackoverflow.com/comment/47005317
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29414917
has text: Did u try browsers other than chrome to check if this issue exists across all browsers?
type: QuestionComment

http://stackoverflow.com/q/29479882
has title: Meteor app fails to run - Object #<Compiler> has no method 'host'
has answer: http://stackoverflow.com/a/30427543
type: Question
score: 0
answer count: 1
has body: Info Creating a new app via meteor create app_name and running it works fine Trying to run an app that another developer is working on - it works on his machine Have tried totally reinstalling meteor Error Log /Users/USERNAME/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245 throw(ex); ^ TypeError: Object #&lt;Compiler&gt; has no method 'host' at Compiler.visit (/Users/USERNAME/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/minifiers/npm/minifiers/node_modules/css-stringify/lib/compiler.js:33:25) at Compiler.mapVisit (/Users/USERNAME/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/minifiers/npm/minifiers/node_modules/css-stringify/lib/compiler.js:45:17) at Compiler.stylesheet (/Users/USERNAME/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/minifiers/npm/minifiers/node_modules/css-stringify/lib/identity.js:43:15) at Compiler.compile (/Users/USERNAME/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/minifiers/npm/minifiers/node_modules/css-stringify/lib/identity.js:35:15) at Object.module.exports [as stringifyCss] (/Users/USERNAME/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/minifiers/npm/minifiers/node_modules/css-stringify/index.js:35:25) at [object Object]._.extend.mergeCss (/Users/USERNAME/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/bundler.js:1077:35) at [object Object]._.extend.make (/Users/USERNAME/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/bundler.js:503:12) at /Users/USERNAME/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x…
has comment: http://stackoverflow.com/comment/47121163
tagged with: javascript
has comment: http://stackoverflow.com/comment/47156354
tagged with: meteor
type: UnansweredQuestion

http://stackoverflow.com/a/48110544
has comment: http://stackoverflow.com/comment/139734490
answers question: http://stackoverflow.com/q/29501220
type: Answer
upvote count: 4
downvote count: 0
score: 4
has body: You can use Google Chart's Options to set the style of the series rendered by adding a Role column for Style (https://developers.google.com/chart/interactive/docs/roles). E.g. // original column definitions... // be sure to configure columns correctly (see comments below) dataTable.addColumn({ type: 'string', role: 'style' }); // ... // after adding other rows // ... // create a style option to set opacity to 0 let blankStyle = "opacity: 0"; // use some default date for date columns let defaultDate = someDefaultDate; dataTable.addRow(['Superman', blankDate, blankDate, blankStyle]); Working demo Things to note: You should use a dummy date that exists within your actual date ranges being displayed, otherwise the Chart will be rendered to accommodate the specified date. Google charts column ordering is a bit fragile. Style seems to work in the example given in the working demo, but not other column orderings. It also needs the Name column present You probably want to also add a tooltip column and set it to not display to stop a tooltip appearing for data that doesn't really exist I find the Style Role Column very useful and recommend it's usage over post render DOM manipulation. It's also the superior way of controlling the series colours as other documented approaches do not work for all situations. It's often refered to as the "undocumented style role" but it is in fact documented here https://developers.google.com/chart/interactive/docs/roles .

http://stackoverflow.com/q/29502432
has comment: http://stackoverflow.com/comment/47163090
tagged with: css
accepted answer: http://stackoverflow.com/a/29502619
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47162918
has comment: http://stackoverflow.com/comment/47163048
has answer: http://stackoverflow.com/a/29502619
has title: How to put container div under menu using CSS
type: Question
has comment: http://stackoverflow.com/comment/47163212
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47162977
has body: I have a problem, how can i make container div to be under menu, when i put container background it go beside a header and menu... Could someone help me to fix my problem? My HTML and CSS bellow... Рено Клуб Македонија - Добредојдовте Почетна Форум Клуб Членство Галерија Огласник Контакт Превземено од Макпетрол *цените се изразени во денари / литар @charset "utf-8"; body { margin:0; padding:0; width:960px; background:#e2e2e2; } a { text-decoration:none; color:#ffffff; text-shadow:1px 1px #000000; } a:hover { text-decoration:none; color:#a6a5a5; } a:active { text-decoration:none; color:#ecd302; } .web { width:960px; margin-left:auto; margin-right:auto; } #header { background-repeat:no-repeat; display:block; margin:auto; padding:0px; height:110px; background:#ecd302; position:absolute; top:0; left:0; right:0; } .logo { background-repeat:no-repeat; width:305px; height:85px; float:left; margin:10px 0 0 202px; } .menu { background:#4b4b4b; text-transform:uppercase; word-spacing:32px; font-size:20px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; text-decoration:none; text-align:center; border-bottom:1px solid #000; border-top: 1px solid #000; display:block; position:absolute; top:105px; left:0; right:0; } ul { } li { display:inline; } .container { background:#929191; left:0px; right:0px; text-align:right; width: 960px; font-size:12px; } If my question is not understood please contact me... i will give more information.
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/47163466
has comment: http://stackoverflow.com/comment/47163805

http://stackoverflow.com/comment/47097263
comment on: http://stackoverflow.com/a/29467469
type: Comment
has text: I will add the short approach too. Anyway, Thank you!
score: 0
type: AnswerComment

http://stackoverflow.com/a/29708853
answers question: http://stackoverflow.com/q/29418465
downvote count: 0
has body: Try to clean browser cache. If this won't work then please provide the URL to an example image.
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/46979331
type: QuestionComment
comment on: http://stackoverflow.com/q/29401890
has text: http://stackoverflow.com/questions/4935632/parse-json-in-javascript - you would parse your json, iterate through it and rebuild it as needed.
score: 0
type: Comment

http://stackoverflow.com/comment/47143367
comment on: http://stackoverflow.com/q/29491731
has text: I have updated my code snippets. Please check and guide me with the next step. It would me a great help.
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/47042052
score: 0
has text: u have to add a condition on if elem.exist
comment on: http://stackoverflow.com/a/29436212
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29384776
favorite count: 0
has answer: http://stackoverflow.com/a/29417514
answer count: 5
has answer: http://stackoverflow.com/a/29384832
tagged with: php
has body: //My jquery $(document).ready(function() { var form = $('#form1'); // contact form var submit = $('#submit1'); // submit button var alert = $('.alert1'); // alert div for show alert message // form submit event form.on('submit', function(e) { e.preventDefault(); // prevent default form submit // sending ajax request through jQuery $.ajax({ url: 'giftcard_check.php', // form action url type: 'POST', // form submit method get/post dataType: 'html', // request type html/json/xml data: form.serialize(), // serialize form data beforeSend: function() { alert.fadeOut(); submit.html('Checking....'); // change submit button text }, success: function(data) { alert.html(data).fadeIn(); // fade in response data form.trigger('reset'); // reset form submit.html('Apply'); // reset submit button text var $container = $("#result1"); var refreshId = setInterval(function() { $container.load("result.php?code=&lt;?php echo $variable; ?&gt;"); }, 500); }, error: function(e) { console.log(e) } }); }); }); The above code is not working while using php code inside jquery. If iam not using php code its working fine. But i want to send session variables to another page (result.php). How can i solve this. Is there any method.
type: AnsweredQuestion
score: 3
tagged with: echo
has comment: http://stackoverflow.com/comment/46947857
has answer: http://stackoverflow.com/a/29386019
upvote count: 3
has answer: http://stackoverflow.com/a/29385122
type: Question
accepted answer: http://stackoverflow.com/a/29384832
has title: PHP code inside jquery not working
possible better answer: http://stackoverflow.com/a/29384956
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29384956
has comment: http://stackoverflow.com/comment/46947805

http://stackoverflow.com/a/29481674
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29481186
type: Answer
answers question: http://stackoverflow.com/q/29481186
has body: I managed to do this. It's what I added: rect = obj.getBoundingClientRect(); clientTop = document.documentElement.clientTop || obj.clientTop || 0, scrollTop = (window.pageYOffset || document.documentElement.scrollTop || obj.scrollTop), x = (ev.pageX - rect.left - (w / 2) * (w &gt; h ? (h / w) : 1)), y = (ev.pageY - rect.top - scrollTop - clientTop - (h / 2) * (h &gt; w ? (w / h) : 1)),

http://stackoverflow.com/a/29445209
answers question: http://stackoverflow.com/q/29445095
has body: To prevent clogging the global namespace, alternatively you could pass the variable via immediately invoked function expression like so: The variable still will be available within the scope of the outer function. (function($, still) { $(function() { alert(still); }); })(jQuery, "STILL"); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"&gt;&lt;/script&gt; You are overriding the current global variable with your function variable as it currently stands.
score: 0
type: Answer

http://stackoverflow.com/comment/47119386
type: Comment
comment on: http://stackoverflow.com/a/29467221
has text: Thank you for the answer. Could you please let me know how you did to find the names? I can't render North West Frontier and North West Areas. But your answer is essentially right. It seems that it's only poorly documented and perhaps incomplete implementation.
type: AnswerComment
score: 0

http://stackoverflow.com/a/29469599
has comment: http://stackoverflow.com/comment/47102416
has comment: http://stackoverflow.com/comment/47102359
has comment: http://stackoverflow.com/comment/47102474
has comment: http://stackoverflow.com/comment/47103627
has comment: http://stackoverflow.com/comment/47101174
answers question: http://stackoverflow.com/q/29469244
has body: Try the following now. &lt;?php $url = $_SERVER['HTTP_REFERER']; $uri = explode('#', $url); ?&gt; &lt;div class="voteBtnBox"&gt;&lt;!--voteBtnBox start--&gt; &lt;input type="submit" name="submit" value="&lt;?php if(count($uri) &gt; 1){ echo 'Thank You'; }else{ echo 'Vote';} ?&gt;" id="voteBtn" onclick="showDiv()" /&gt; &lt;/div&gt;&lt;!--voteBtnBox end--&gt; &lt;script&gt; function showDiv(){ window.location.href = 'http://localhost/aaa/counter/click.php?id=roy'; } &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/29469244
score: 0
has comment: http://stackoverflow.com/comment/47103309
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47102562
has comment: http://stackoverflow.com/comment/47103095
has comment: http://stackoverflow.com/comment/47101847
has comment: http://stackoverflow.com/comment/47103093
has comment: http://stackoverflow.com/comment/47101470
has comment: http://stackoverflow.com/comment/47102053
type: Answer

http://stackoverflow.com/comment/47016350
comment on: http://stackoverflow.com/q/29421520
score: 1
type: Comment
has text: What you're probably looking for is javascript's setTimeout() function. As a friendly aside, you may want to get into the habit of formatting your code with proper indents - it's hard to read the structure as it is.
type: QuestionComment

gruntjs
tags question: http://stackoverflow.com/q/29519158
tags question: http://stackoverflow.com/q/29387904
tags question: http://stackoverflow.com/q/29491761
tags question: http://stackoverflow.com/q/29411141
tags question: http://stackoverflow.com/q/29511037
tags question: http://stackoverflow.com/q/29492904
tags question: http://stackoverflow.com/q/29404104
tags question: http://stackoverflow.com/q/29406000
tags question: http://stackoverflow.com/q/29446186
tags question: http://stackoverflow.com/q/29491065
tags question: http://stackoverflow.com/q/29400259
tags question: http://stackoverflow.com/q/29494589
type: Tag
tags question: http://stackoverflow.com/q/29526441
tags question: http://stackoverflow.com/q/29483259
tags question: http://stackoverflow.com/q/29480490
tags question: http://stackoverflow.com/q/29382249
tags question: http://stackoverflow.com/q/29472862
tags question: http://stackoverflow.com/q/29412947
tags question: http://stackoverflow.com/q/29403551
tags question: http://stackoverflow.com/q/29498128
tag name: gruntjs
tags question: http://stackoverflow.com/q/29423535
tags question: http://stackoverflow.com/q/29504947
tags question: http://stackoverflow.com/q/29529025

http://stackoverflow.com/comment/47045260
type: QuestionComment
comment on: http://stackoverflow.com/q/29436788
type: Comment
has text: **http://stackoverflow.com/questions/24697284/google-api-multiple-markers-with-different-colours-depending-on-a-class/24697331#24697331** I think it help
score: 0

http://stackoverflow.com/a/29385064
has body: You will need to use onchange event to perform this task. The idea is when the first select is changed, you set the default value (here I choose to set to the first item of the list, but you can do whatever you need to re-initialize its value). function initialize() { var select_car = document.getElementById("select_car"); var select_power = document.getElementById("select_power"); select_car.selectedIndex = 0; select_power.selectedIndex = 0; select_car.addEventListener("change", function() { select_power.selectedIndex = 1; }); } -- Select a car -- Mazda MX5 Nissan Skyline GTR -- Select a power -- 150CV 255CV
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29384785

app-store
tag name: app-store
type: Tag
tags question: http://stackoverflow.com/q/29400210

http://stackoverflow.com/comment/47349927
has text: I just tried, ad they worked. So which functionality is missing/not working?
comment on: http://stackoverflow.com/a/29473260
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29473829
type: Question
has answer: http://stackoverflow.com/a/29493510
tagged with: javascript
tagged with: jquery
answer count: 3
score: 2
has body: I created 4 predefined sizes for circle tags. I want create a park tag ( cloud tag ) where the tags are dispersant randomly just for first time. but I cannot make it working here is my code : HTML tag name tag name tag name tag name CSS tags-cloud { background-color:white; padding:10px; margin-top:10px; position:relative; width:100%; height:600px; } .tag { color:#FFFFFF; text-align:center; text-transform:capitalize; border-radius:100%; display:inline-block; position:absolute; } .tag-1{width:46px;height:46px;background:#DC5E0A;line-height:46px;} .tag-2{width:58px;height:58px;background:#05F9EB;line-height:58px;} .tag-3{width:76px;height:76px;background:#4B05F9;line-height:76px;} .tag-4{width:89px;height:89px;background:#9EDC0A;line-height:89px;} JS CODE $('.tag').each(function() { var size = Math.round(Math.random()*550+20); $(this).css({ 'top':size/2, 'bottom':size/2, 'left':size/2, 'right':size/2, zIndex:size }) }); the result I want : My result JS FIDDLE http://jsfiddle.net/s1aoxf1o/
has title: create a park tag with css and Javascript
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/47109071
has comment: http://stackoverflow.com/comment/47108989
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/47108789
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/29476208
has answer: http://stackoverflow.com/a/29474096

http://stackoverflow.com/a/56708623
has comment: http://stackoverflow.com/comment/99980604
has body: Client var connection = new HubConnection(&lt;YOUR_URL&gt;); connection.Headers.Add("username", "maria"); var myHub = connection.CreateHubProxy("MyHub"); Server string username = Context.Headers.Get("username"); Console.WriteLine("New client connection - " + username);
upvote count: 2
answers question: http://stackoverflow.com/q/29509396
type: Answer
score: 2
downvote count: 0

acrobat
type: Tag
tags question: http://stackoverflow.com/q/29470866
tag name: acrobat

http://stackoverflow.com/comment/87341522
has text: @mpsyp yes for "regular" 8- or 16-bit code points this function should just return exactly what you passed it.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29463039

http://stackoverflow.com/q/29438912
has title: Submit form requires more than one click in IE
has comment: http://stackoverflow.com/comment/47070524
tagged with: jquery
has comment: http://stackoverflow.com/comment/47107801
has comment: http://stackoverflow.com/comment/47070570
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/9396411
answer count: 0
score: 0
linked to: http://stackoverflow.com/q/19846807
has body: Please find below file code where multiple file upload functionality is given. On click of upload link it opens input file browser window where we select file and then click on submit. In chrome, submit button submits the form on first click but In IE, it does not submit the form on first click. In IE, If we select one file using upload link then submit button submits the form in second click. If we select two file then it submits the form in 3rd click and accordingly. Please let me know how to stop this event chain to submit in one click. Please find below test.html file as, https://www.dropbox.com/s/o7dwxhjnegxo0fo/Test.html?dl=0
upvote count: 1
has comment: http://stackoverflow.com/comment/47105079
downvote count: 1
type: Question
duplicate of: http://stackoverflow.com/q/19846807
tagged with: internet-explorer
tagged with: javascript
linked to: http://stackoverflow.com/q/10667856
has comment: http://stackoverflow.com/comment/47046727

http://stackoverflow.com/q/29385199
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46949044
accepted answer: http://stackoverflow.com/a/29385405
upvote count: 3
type: AnsweredQuestion
has body: Hello I request an Image from my server (binay, arraybuffer) and then I would like to convert that arraybuffer to valid imageData that can be drawn on any canvas element. Besides the imageData made from the ajax request, I also have other imageData objects which I combine all together on a canvas (in order to flatten the image) and produce my final image. However the imageData as mentioned above from the server request results in pure noise I"m not sure what I'm doing wrong to create valid imageData. Here is my method that tries to convert the arraybuffer into imageData without success. ImageProcessor.prototype.imageData = function(data, width, height) { width = width || this.settings.width; height = height || this.settings.width; var newData = (data instanceof Uint8ClampedArray) ? data : new Uint8ClampedArray(data); var imageData = this.ctx.createImageData(width, height); imageData.data.set(newData); return imageData; }; PS: I've managed to convert the arrayBuffer into a b64 image resource-URL and then create an image out of it and then draw th image on to the canvas element, but I'm not interested in such a solution because: overkill in my opinion uses callbacks UPDATE The images on the server are .png files (RGBA). And bellow is the ajaxTransport used with jQuery in order to do the binary - arraybuffer requests for images from the server: $.ajaxTransport("+binary", function(options, originalOptions, jqXHR){ // check for conditions and support for blob / arraybuffer response type if (window.FormData &amp;&amp; ((options.dataType &amp;&amp; (options.dataType == 'binary')) || (options.data &amp;&amp; ((window.ArrayBuffer &amp;&amp; options.data instanceof ArrayBuffer) || (window.Blob &amp;&amp; options.data instanceof Blob))))) { return { // create new XMLHttpRequest send: function(_, callback){ // setup all variables var xhr = new XMLHttpRequest(), url = options.url, type = options.type, // blob or arraybuffer. Default is blob dataType = options.responseType || "bl…
has comment: http://stackoverflow.com/comment/46949019
type: Question
has title: Draw ajax arraybuffer response into canvas
has answer: http://stackoverflow.com/a/29385405
has answer: http://stackoverflow.com/a/29385492
answer count: 2
tagged with: canvas
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/28593763
possible better answer: http://stackoverflow.com/a/29385492
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46948700
score: 3

http://stackoverflow.com/comment/47031425
comment on: http://stackoverflow.com/q/29431006
has text: What kind of variable can you use `()` on? Do you know what type that is?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/47092795
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29464911
has text: I added an alert, and the alert is popping up multiple times. @ArunPJohny

http://stackoverflow.com/comment/47206693
score: 0
type: Comment
type: QuestionComment
has text: I don't believe we have any anchor tags with # as the href.
comment on: http://stackoverflow.com/q/29525861

http://stackoverflow.com/a/29385969
upvote count: 3
has body: all the implementations Safari, WebKit, Chorme, Firefox and IE, are following an old version of the WebStorage standard, where the value of the storage items can be only a string. Thus you need to compare the value with string: if(object == "true") { Here is the Alternative posted by CMS.
answers question: http://stackoverflow.com/q/29385953
type: Answer
downvote count: 0
score: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29385953

http://stackoverflow.com/q/29417466
tagged with: ember-data
has title: EmberJS: Auto-Generate Record when no record ID in route
tagged with: javascript
has comment: http://stackoverflow.com/comment/47015335
score: 0
has comment: http://stackoverflow.com/comment/47022019
type: UnansweredQuestion
has body: I am creating an application which lets applicants apply through a form. The form must auto-generate a new application if no previous application was passed in. My router.js file: Router.map(function () { this.route("apply", {path: ":application_id"}, function () { /* ... */ }); }); And my routes/apply.js export default Ember.Route.extend({ model: function(params) { if (params["application_id"]) { console.dir(params.application_id); return this.store.find("application", params.application_id); } else { console.dir(params); let emptyApplicant = this.store.createRecord("applicant", {isPrimary: true}), emptyApplication = this.store.createRecord("application"); emptyApplication.set("applicant", emptyApplicant); return emptyApplication; } } }); But navigating to /apply gives me the following error: Error while processing route: apply.index Couldn't find record of type 'application' for the id 'apply'. Error: Couldn't find record of type 'application' for the id 'apply'. at DS.LSAdapter.DS.Adapter.extend.find I checked what the params is, and it is apply in this case (I was expecting it to be null, and the url apply/7g2c7 to be 7g2c7). How can I detect when an application ID is being sent in, and auto-generate a new application otherwise?
tagged with: ember.js
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/47010987

http://stackoverflow.com/q/29426468
answer count: 1
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/47023859
has answer: http://stackoverflow.com/a/29426578
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has title: Overlaying an HTML5 video element over another video element.
has body: I am trying to overlay 2 video elements, where one lies directly on top of another. Obviously, the one on top will be smaller than the other such that both are visible. So far, the only things I have been able to find are overlaying text over the video, but most of the time the examples I have seen used hardcoded distances from the top of the page to accomplish this. Here's what I have tried: HTML: &lt;div class='video-container'&gt; &lt;video class='userVideo' id="localVideo" autoplay&gt;&lt;/video&gt; &lt;video class='peerVideo' id='peerVideo' autoplay&gt;&lt;/video&gt; &lt;/div&gt; CSS: .userVideo { height: 200px; width: 200px; float: left; border:5px solid orange; position: absolute; top: 100px; } .peerVideo { height: 200px; width: 200px; border:5px solid blue; } So far, the only thing I have been able to achieve is a text div overlapping a single video. Is there a way to overlap 2 videos or even nest a video within another?
accepted answer: http://stackoverflow.com/a/29426578
type: Question
tagged with: video
upvote count: 4

http://stackoverflow.com/comment/47147936
score: 1
has text: But, like I said, Google Docs does control this. Using the scroll gesture for both browser navigation and scrolling doesn't make sense in a full edge-to-edge application with a scrollable canvas and widgets with content that can scroll as well.
comment on: http://stackoverflow.com/q/29494082
type: Comment
type: QuestionComment

http://stackoverflow.com/a/37151456
downvote count: 0
score: 1
upvote count: 1
has body: Your ng-click on the sub grid needs to just refer to it's own appscope, not the parent grids expandableRowScope. ng-click="grid.expandableRowScope.clickMeSub()" should be ng-click="grid.appScope.clickMeSub()" Modified Plunker - http://plnkr.co/edit/0o9ViW0TEuYIA4zx0kIW?p=preview
type: Answer
answers question: http://stackoverflow.com/q/29398342

http://stackoverflow.com/comment/47189241
type: Comment
has text: Thank you for the answer,. We currently simulate `404` and `500` server errors with `protractor-http-mock`, but need to simulate connection errors - haven't found an example in the project you've mentioned..
comment on: http://stackoverflow.com/a/29504742
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46928627
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29374028
has text: Why not use `is-disabled` option of `accordion-group` directive for this?

http://stackoverflow.com/q/29452992
type: Question
answer count: 2
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/29453074
possible better answer: http://stackoverflow.com/a/29453062
has body: I've tried using these. Using getElementById it works for a dropdown with id. But when change to getElementsByName for a dropdown without an id, it doesn't. var name = "Charlie"; function setSelectedIndex(s, v) { for ( var i = 0; i < s.options.length; i++ ) { if ( s.options[i].text.slice(0,name.length) == v ) { s.options[i].selected = true; return; } } } setSelectedIndex(document.getElementsByName('attributes[10]'),name); Select name David Charlie Chris Ramon John
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29453074
has answer: http://stackoverflow.com/a/29453062
tagged with: select
has title: How do I select the name in dropdown using javascript?

http://stackoverflow.com/q/29519089
type: Question
has answer: http://stackoverflow.com/a/75169965
has title: Intercept calls to constructor
tagged with: javascript
score: 4
tagged with: prototype
has answer: http://stackoverflow.com/a/76948828
upvote count: 4
has comment: http://stackoverflow.com/comment/47193303
has answer: http://stackoverflow.com/a/71683292
downvote count: 0
tagged with: prototype-chain
favorite count: 0
possible better answer: http://stackoverflow.com/a/75169965
accepted answer: http://stackoverflow.com/a/29519303
has comment: http://stackoverflow.com/comment/47193402
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29519303
has body: I am having a bit of trouble intercepting constructor calls to a library (so I can replay them later) while still maintaining the prototype chain. More concretely, I am working with a library (ThreeJS, but could be any library), and some code that uses this library. What I want to do is write a piece of code that modifies the library objects, so I can run a block of code every time a constructor is called. Example: when a new scene is created, I want to print "new Scene created" to the console. var scene = new THREE.Scene(); When the constructor takes arguments, I also want to log these arguments.

http://stackoverflow.com/q/29472898
tagged with: javascript
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/47107144
answer count: 1
has comment: http://stackoverflow.com/comment/47107193
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47107459
has title: Event that automatically goes over all links
downvote count: 0
score: 1
has body: I'm writing a jQuery script that adds tooltips to specific links on my web application. The website is constantly adding new links. What I'm trying to do is make it so that, the script will automatically go over all the links on the page and over new ones. Furthermore, the script also modifies the link itself by changing its colour and prefixing an image before it. This is why I need to keep looking for new links automatically. What kind of events would I have to hook into to make this happen?
has answer: http://stackoverflow.com/a/29472934
accepted answer: http://stackoverflow.com/a/29472934
tagged with: anchor
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47107118

http://stackoverflow.com/q/29498624
has answer: http://stackoverflow.com/a/29498726
has body: I have a HTML mark up like this. &lt;div class="formSection custom"&gt; &lt;form id="support"&gt; &lt;/form&gt; &lt;div&gt; The class name "custom" to the div is added dynamically and I need to check in on form submission. So far I have this and its not working. $('#support').on('submit', function(e) { if ($(".support").parent().hasClass("custom")) { alert("Yeah, It does have class"); } } It works when I do if ($(".formSection").hasClass("custom")) I don't want my jquery to be so rigid. I want to track down form's parent and check its class. Is there a way I can do it?
tagged with: javascript
tagged with: jquery
score: 0
has title: jQuery: Check form's parent div'sclass on submit
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/29498726
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/46993727
type: Comment
type: QuestionComment
has text: How do you init your Webview? Please post a little bit more code :)
score: 0
comment on: http://stackoverflow.com/q/29407501

http://stackoverflow.com/a/29411315
has comment: http://stackoverflow.com/comment/47000531
answers question: http://stackoverflow.com/q/29408841
type: AcceptedAnswer
downvote count: 0
has body: Selenium does not provide any facilities to ensure that any single Selenium operation is done atomically or that multiple operations are performed as part of a single atomic transaction. For instance, it is possible for a single click operation to fail if the element to be clicked moves while Selenium clicks it. Yes, this can lead to problems. It is up to you to write your code so that it can recover from bad conditions. You need to know what it is you are interacting with and: Wait for a condition that indicates that the UI is stable. For instance, I have Datatables tables on some pages. One thing I check before testing that a table contains the right information is make sure the little banner that Datatables automatically popup when a table is being updated is not visible. Otherwise, I may be checking a table that has not been updated yet and still contains old data. Detect a bad state and recover. In one case, I want to click a button in a part of the UI that is refreshed on the basis of various conditions. It does not matter whether I click the button before or after a refresh but the problem is that if a refresh happens between the time I get the button and the time I try to click it, Selenium will raise StaleElementReferenceException. I have to catch this exception, reacquire the button and try to click it again. (For the record, it is not worth in this case to test the UI before clicking. 99.999% of the time the click will go through without having to try it a second time.)
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29408841

http://stackoverflow.com/q/29493992
has body: In my javascript code I want to be able to retrieve current URL and then generate a new URL by adding relative paths (all of this without actually redirecting to new place, just want the URL string reference to pass on). For eg: - this is exactly what I want but minus the redirection that kicks in window.location.href = "../../"; var url = window.location.href; I just want the result of appending relative path to current url and retrieve the new URL in string format. EDIT with example to make the question more clear. Suppose the current URL is: www.example.com/level1/level2/level3/index.html Now I want to get the URL 2 levels back: www.example.com/level1
duplicate of: http://stackoverflow.com/q/3943281
has comment: http://stackoverflow.com/comment/47146969
tagged with: javascript
has comment: http://stackoverflow.com/comment/47147122
has comment: http://stackoverflow.com/comment/47147079
score: 0
has comment: http://stackoverflow.com/comment/47147205
has comment: http://stackoverflow.com/comment/47147096
has comment: http://stackoverflow.com/comment/47172779
has title: generate URL by using relative paths without redirection
has comment: http://stackoverflow.com/comment/47147304
has comment: http://stackoverflow.com/comment/47147456
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3943281
type: Question

http://stackoverflow.com/q/29503025
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29503077
score: 0
answer count: 3
has body: Let's say there are three 9* images on the page: *Just an example, there won't always be 9 images - could be 5 or 6, etc How would I make it so that the percentage width of the images correspond to this order: 1st image: width: 100%; 2nd image: width: 70%; 3rd image: width: 30%; Repeat Similar to what has been done here: Overall, for every image on the page, the width has to be: 100% for the first image, 70% for the second image, 30% for the third image, Repeat in this order for every other image, e.g: 100% for the fourth image, 70% for the fifth image, 30% for the sixth image, I believe scripts would need to be used though I am not sure how to do so Basic Implementation:
has comment: http://stackoverflow.com/comment/47163995
possible better answer: http://stackoverflow.com/a/29503128
has answer: http://stackoverflow.com/a/29503144
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29503128
accepted answer: http://stackoverflow.com/a/29503077
has title: How to change the percentage width of multiple images based on their order of appearance?
type: Question

http://stackoverflow.com/comment/111149828
type: AnswerComment
type: Comment
score: 1
has text: [Google Website Translator](https://translate.google.com/intl/en/about/website/) is no longer providing new access. Yes. Developers used to add some javascripts for the Google translation to work.
comment on: http://stackoverflow.com/a/29525954

http://stackoverflow.com/comment/47127118
comment on: http://stackoverflow.com/q/29482645
score: 0
type: Comment
type: QuestionComment
has text: I think he's talking about proxy server.

http://stackoverflow.com/comment/47201584
score: 0
type: Comment
has text: what about now the error points to exactly on the beginning of "<#assign"
comment on: http://stackoverflow.com/q/29523016
type: QuestionComment

http://stackoverflow.com/comment/47036909
score: 2
comment on: http://stackoverflow.com/q/29433765
has text: It does not remove the event handler, it probably produces an error as the `attachFunction` is not defined in the scope you're trying to remove it.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46963513
has text: It's not that I don't want to use Ajax, it's that I'm generating the page in a situation where the server knows which item to display, but the client doesn't. So client doesn't know which item to ask for, if server doesn't tell it. I guess the right thing to do would be to redo URL so that it is an actual Angular route and includes item id there?
comment on: http://stackoverflow.com/a/29378629
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29463039
type: Answer
accepted answer of: http://stackoverflow.com/q/29462958
has comment: http://stackoverflow.com/comment/87341522
answers question: http://stackoverflow.com/q/29462958
has comment: http://stackoverflow.com/comment/73005985
score: 7
has body: JavaScript strings use UTF-16 encoding. Your character requires a two-part escape because it's a 3-byte UTF-8 sequence codepoint that requires 2 UTF-16 characters. Stolen from a blog post by somebody smarter than me is this handy function: function toUTF16(codePoint) { var TEN_BITS = parseInt('1111111111', 2); function u(codeUnit) { return '\\u'+codeUnit.toString(16).toUpperCase(); } if (codePoint &lt;= 0xFFFF) { return u(codePoint); } codePoint -= 0x10000; // Shift right to get to most significant 10 bits var leadSurrogate = 0xD800 + (codePoint &gt;&gt; 10); // Mask to get least significant 10 bits var tailSurrogate = 0xDC00 + (codePoint &amp; TEN_BITS); return u(leadSurrogate) + u(tailSurrogate); } When you invoke that with your code: var treble = toUTF16(0x1D120); you get back "\uD834\uDD20". Thanks again to Dr. Axel Rauschmayer for the code above &mdash; read the excellent linked blog post for more information.
downvote count: 1
has comment: http://stackoverflow.com/comment/47089593
has comment: http://stackoverflow.com/comment/47090499
has comment: http://stackoverflow.com/comment/87337612
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/73005943
has comment: http://stackoverflow.com/comment/87341464
upvote count: 8
has comment: http://stackoverflow.com/comment/47089614
has comment: http://stackoverflow.com/comment/47089565

http://stackoverflow.com/a/29429453
upvote count: 2
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29429395
has body: You should use a BigInteger library for javascript. You can write it by your own (if you don't need advanced operations, it's quite easy and funny to write), or you can search online. There are tons of those libraries out there: What JavaScript library can I use to manipulate big integers?
type: Answer

http://stackoverflow.com/comment/47213645
has text: But has nothing to do with the script. I guess it has some browser issue.
comment on: http://stackoverflow.com/q/29529900
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29401621
score: 1
answers question: http://stackoverflow.com/q/29400878
upvote count: 1
has body: Well, depending on what kind of customizing you want to perform on your page, you can include the Google Maps JavaScript API 3 in your page. This will allow you various customization from adding custom markers, adding images, to calculating and drawing directions. There are even helpful examples, so I'd say it's a great start to add a custom google map to your html.
accepted answer of: http://stackoverflow.com/q/29400878
has comment: http://stackoverflow.com/comment/47003453
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/47108188
type: Comment
comment on: http://stackoverflow.com/a/29473398
score: 0
type: AnswerComment
has text: Your above code will nt work. You're inserting HTML inside your javascript. It must be either as string or as DOM elements.

http://stackoverflow.com/q/29401175
tagged with: google-maps
has answer: http://stackoverflow.com/a/29402798
answer count: 1
type: UnansweredQuestion
score: 0
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Loading Combined JSON File Onto Google Maps
tagged with: javascript
has body: I have been trying to display a JSON file on a Google Map for two days now, I feel like I have tried everything that is on the internet with no success... The JSON file is rather large(7.5mb) so that may be part of the problem. Regardless, I still need to make this work. The JSON file consists of 750+ combined carrier routes, every carrier route has it's own "properties" so that they will all display as a different color. Each carrier route has a different amount of coordinates in geometry.coordinates A sample of the JSON file(yeah, i know it is ugly): { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84", "marker-size": "medium", "marker-symbol": "circle", "marker-color": "#28f30c" } }, "features": [ { "type": "Feature", "properties": { "Name": "", "Description": "", "marker-type": "circle", "marker-color": "#73b8b2" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ -96.654725, 33.110625 ], [ -96.654707, 33.11062 ], [ -96.654692, 33.110615 ], [ -96.654673, 33.110609 ] ] } }, { "type": "Feature", "properties": { "Name": "", "Description": "", "marker-type": "circle", "marker-color": "#b4a2e1" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ -96.876587, 32.971849 ], [ -96.876579, 32.97197 ], [ -96.876568, 32.971729 ] ] } }, { "type": "Feature", "properties": { "Name": "", "Description": "", "marker-type": "circle", "marker-color": "#a4b333" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ -96.723167, 32.916299 ], [ -96.723159, 32.91627 ] ] } } ] } I cannot for the life of me figure out how to make them load on a Google Map. I have tried hundreds of different things, the latest being: var map; function initialize() { map = new google.maps.Map(document.getElementById('map-canvas'), { zoom: 2, center: new google.maps.LatLng(2.8,-187.3), mapTypeId: google.maps.MapTypeId.TERRAIN }); $.getJSON('CarrierRoutes.json', function(data){ // loop and add markers for (var i = 0; i &lt; data.length; …

http://stackoverflow.com/comment/58907861
type: AnswerComment
type: Comment
has text: @ЮрийСветлов I'm not sure I understand what you mean? Are you referring to point 3?
comment on: http://stackoverflow.com/a/29528515
score: 0

http://stackoverflow.com/q/29458496
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47081274
tagged with: css
accepted answer: http://stackoverflow.com/a/29458606
upvote count: 1
has title: How to add the height of another object as margin with jQuery?
has comment: http://stackoverflow.com/comment/47081247
type: AnsweredQuestion
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29458606
has comment: http://stackoverflow.com/comment/47081155
has comment: http://stackoverflow.com/comment/47081116
downvote count: 0
has body: I`m working on a small project of mine and I don't know why my code is not working. I tried $('.sidebar-title').css("top",$('.sidebar').height() + " px"); and also var TH = $('.sidebar').height() + " px" $('.sidebar-title').css("top",TH); Neither of those work. I tried to alert TH to see if it has something in it, and it displays 82px as it should. What am I doing Wrong? UPDATE: HTML code if it helps : Search and the default CSS : .sidebar-title{ position: absolute; padding:10px 30px; color:#fff; background: #ff5151; top:0px; left:50%; margin-left:-87px; transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; -webkit-transition: all 0.5s ease-in-out; } .sidebar { position: absolute; top:-100px; transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; width: 97.1%; left: 0px; }
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29458556
favorite count: 0
has answer: http://stackoverflow.com/a/29458556

http://stackoverflow.com/q/29392913
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29393011
tagged with: function
downvote count: 0
tagged with: javascript
has title: Passing a function with parameters
possible better answer: http://stackoverflow.com/a/29393007
has answer: http://stackoverflow.com/a/29393007
has body: I want to pass a function with parameters into another function without evaluating it. This method doesn't work: function first (id) {...} function second (func) { func(); } second(first(id)); This method does but I can't use it because the number of parameters is not always the same: function first (id) {...} function second (func, id) { func(id); } second(first, someId);
has answer: http://stackoverflow.com/a/29393184
accepted answer: http://stackoverflow.com/a/29393011
favorite count: 0
has answer: http://stackoverflow.com/a/29393014
answer count: 4
tagged with: parameters
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/29482658
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29483048
score: 0
answer count: 2
type: UnansweredQuestion
tagged with: countdowntimer
has answer: http://stackoverflow.com/a/29483049
has body: I have created a countdown timer. However, it does not count down properly. Instead of counting down per second or minutes, it counts down by hundreths and does not update properly. I created another counting up timer using the same code but it works properly counting up per increment - it counts up minutes everytime 60 seconds have passed. I'm wondering how I can make this timer count down properly. JSBin: http://jsbin.com/funiveremi/6/edit Updated* Adding in the 60 Seconds Counter: http://jsbin.com/hohusuvube/2/edit HTML User Input Timer 00:00:00 Start Stop Reset JAVASCIPT hundreths = 10; seconds = 15; minutes = 20; document.getElementById("time").innerHTML = minutes + ":" + seconds + ":" + hundreths; var currentTime = document.getElementById('time'); var t; function startClock() { function add() { hundreths--; if (hundreths < 0) { hundreths = 0; seconds--; if (seconds < 0) { seconds = 0; minutes--; } if(minutes < 0) { seconds= 0; minutes= 0; stopTimer(); } } if (hundreths > 9 && seconds < 9) { currentTime.innerHTML = "0" + minutes + ":" + "0" + seconds + ":" + hundreths; } else if ((seconds > 9 ) && (hundreths < 9)) { currentTime.innerHTML = "0" + minutes + ":" + seconds + ":" + "0" + hundreths; } else if((seconds > 9) && (hundreths > 9)) { currentTime.innerHTML = "0" + minutes + ":" + seconds + ":" + hundreths; } else if ((minutes > 9) && (seconds < 9) && (hundreths < 9)) { currentTime.innerHTML = minutes + ":" + "0" + seconds + ":" + "0" + hundreths; } else if ((minutes > 9) && (seconds > 9) && (hundreths < 9)) { currentTime.innerHTML = minutes + ":" + seconds + ":" + "0" + hundreths; } else if ((minutes > 9) && (seconds > 9) && (hundreths < 9)) { currentTime.innerHTML = minutes + ":" + seconds + ":" + hundreths; } else { currentTime.innerHTML = "0" + minutes + ":" + "0" + seconds + ":" + "0" + hundreths; } timer(); } // end function add(); function timer() { t = setTimeout(add, 100); } timer(); } // end function startClock(); function stopTimer() { document.ge…
has title: Javascript Countdown Timer Counting Down Not Updating Seconds/Minutes Properly

http://stackoverflow.com/a/29381687
answers question: http://stackoverflow.com/q/29381635
accepted answer of: http://stackoverflow.com/q/29381635
score: 0
type: AcceptedAnswer
type: Answer
has body: $('.dot').on('click', function() { $('.dot.active').removeClass('active'); $(this).addClass('active'); });

http://stackoverflow.com/comment/47209077
has text: Might want to be careful on that Outstanding comparison if the model is not actually a string. I don't know your data structure but just in case it is a number, it might be problematic. Perhaps massage it to a boolean...
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29527407

getselection
tags question: http://stackoverflow.com/q/29414380
type: Tag
tag name: getselection

http://stackoverflow.com/a/29412291
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/29412103
has body: If I understand correct :) hope it's what you want example js $('nav.primary').prepend(' Menu '); $('nav.primary #menu-button').on('click', function(){ if(!$(".menu-header-container").hasClass("opened")) { $(".menu-header-container").show(); $(".menu-header-container").addClass("opened"); }else { $(".menu-header-container").hide(); $(".menu-header-container").removeClass("opened"); } });
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46997481
has comment: http://stackoverflow.com/comment/46997396

http://stackoverflow.com/q/29428289
has body: Submit I created a button using div tag. It is not actually a button but it is look like a button. Here I want to change the content of h3 tag to '>' this symbol when mouse is hover on it. How to do it? I write code in javascript to change h3 contents but it will not show any effect? I don't know why?
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29428340
tagged with: javascript
has title: change h3 tag content
has comment: http://stackoverflow.com/comment/47026918
score: 0
answer count: 2
favorite count: 0
has comment: http://stackoverflow.com/comment/47026905
has answer: http://stackoverflow.com/a/29428336
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/47056573
type: QuestionComment
comment on: http://stackoverflow.com/q/29444534
score: 0
has text: Keep a count server side too. You can't rely on JS too much.
type: Comment

http://stackoverflow.com/a/29483643
answers question: http://stackoverflow.com/q/29483109
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/47161529
score: 1
upvote count: 1
has body: did you forget to display the data? If so, add this to your function: document.getElementById('users').innerHTML = xmlDoc; If that does not work, change responseXML to responseText. If that does not work, try replacing xmlhttp.open("GET","gameXML.xml",false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; with xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("users").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","gameXML.xml",true); xmlhttp.send();

http://stackoverflow.com/comment/47136279
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29488499
has text: http://jsfiddle.net/3a7pjeb9/13/ actually i just need to insert the div 4th li, 8th li, 12th li, depend on the li stay in which row @nevermind
score: 0

http://stackoverflow.com/a/29437415
score: 4
has comment: http://stackoverflow.com/comment/47044292
has comment: http://stackoverflow.com/comment/47043911
type: Answer
has comment: http://stackoverflow.com/comment/47043965
accepted answer of: http://stackoverflow.com/q/29437380
has comment: http://stackoverflow.com/comment/47044330
answers question: http://stackoverflow.com/q/29437380
has comment: http://stackoverflow.com/comment/47044452
has comment: http://stackoverflow.com/comment/47044649
has comment: http://stackoverflow.com/comment/47043880
has comment: http://stackoverflow.com/comment/47043716
upvote count: 4
has comment: http://stackoverflow.com/comment/47043905
type: AcceptedAnswer
has body: As simple as Explanations The ng-repeat loops through your models array and will add a model item in your scope on each iterations. From the HTML inside that ng-repeat, you can use model as if you had put it in your $scope from the controller. Feel free to read more documentation about ng-repeat If that is not what you want If $scope.models is supposed to be a list of property names, for instance you want to actually edit $scope.modelOne rather than the string modelOne itself (on second read I think that could be what you mean), you cannot do that directly but you can use an object in between, i.e. edit $scope.foo.modelOne rather than $scope.modelOne And in your controller have $scope.foo = { 'modelOne': 'some text', 'modelTwo': 'some other text', 'modelThree': 'hello world' }
downvote count: 0

http://stackoverflow.com/comment/57993661
type: AnswerComment
has text: Helped me in my context, thanks fellow devs! long live computing!
comment on: http://stackoverflow.com/a/29435709
type: Comment
score: 1

http://stackoverflow.com/a/29403953
upvote count: 9
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29403919
answers question: http://stackoverflow.com/q/29403919
score: 9
has body: The first one: function Person(age,name){ this.name = name; this.age = age; this.speak = function(){...} } Is a named constructor function. Will work properly with instanceof Person Is easier to do mixins or classic Javascript inheritance with Could use the prototype for methods which may consume less memory or be faster to construct an object if there are lots of methods Could also be designed to work without requiring new. Is more akin to how the new ES6 class and extends syntax works which is likely how a lot of Javascript will be written in the future. The second one: function Person(age,name){ var p = {} p.name = name; p.age = age; p.speak = function(){...} return p; } Is a factory function. It creates a generic object, assigns properties to it and then returns the object. It could be inherited from, but not in a classic way only by another factory function that knows how this object works. Some types of inheritance of mixins are not as doable with this structure. Will not work with instanceof. Does not and cannot use the prototype for methods. Could be called with new and would still work (the system-created new object would just be discarded). Can create any kind of object. It can even branch based on the arguments passed or environment and create a different kind of object based on some logic. Technically you can do this with the first style too, but it's inefficient because the interpreter creates a specific type of object and then you would return something else causing the original object that was created to then be garbage collected. So, if you're going to create multiple different kinds of objects, the second method would be more efficient at that. Outside of these differences, the two will mostly function the same and there is nothing technically "wrong" with either method. There are advocates for both styles of programming in Javascript and some would say there are situations where one is more appropriate than another and vice versa. I'd suggest you b…
type: AcceptedAnswer

http://stackoverflow.com/q/29398381
score: 1
has body: I am developing with Javascript oop and Observer pattern. In the first method model g is put inside mesh and mesh inside scene. We can find now our g model in scene.children. In the second method in intersected[i].object we can find our model g. The problem is that if I modify a property of intersected[i].object it is not reflected to the model g. g = new GeometryModel(); tjsv = new ThreeJSView(document.getElementById('maincanvas'), g); GeometryModel.prototype.populateScene = function(scene) { var i; for (i = 0; i &lt; this.geometries.length; i++) { var g = this.geometries[i];//&lt;----- g is the model var material = new THREE.MeshBasicMaterial( { color: g.color, transparent: g.transparent, opacity: g.opacity }); var mesh = new THREE.Mesh(g, material); this.addLabels(g, mesh); scene.add(mesh); if (g.lineWidth &gt; 0) { var egh = new THREE.EdgesHelper( mesh, g.lineColor ); egh.material.linewidth = g.lineWidth; scene.add( egh ); } } } ThreeJSView.prototype.selectByRaycaster = function(x, y){ var i; var intersected; var mouse = {x: (x / this.width) * 2 - 1, y: 1 - (y / this.height) * 2}; var raycaster = new THREE.Raycaster(); raycaster.setFromCamera(mouse, this.camera); intersected = raycaster.intersectObjects(this.scene.children); console.log(); for ( var i = 0; i &lt; intersected.length; i++ ) { if (intersected[i].object instanceof THREE.Mesh){ intersected[i].object.selected = true;// I modify my model changed = true; console.log( intersected[i].object); } } console.log(this.model);//my model but here there are no modify! if (changed) this.model.notifyListeners(); }
type: Question
tagged with: oop
tagged with: javascript
has title: Javascript oop instances
upvote count: 1
answer count: 1
favorite count: 0
tagged with: three.js
has answer: http://stackoverflow.com/a/29413763
accepted answer: http://stackoverflow.com/a/29413763
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/29442679
answer count: 1
has answer: http://stackoverflow.com/a/29442976
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47053477
tagged with: java
has body: I have been using JSOUP for all my html website requirements thus far. I have however, ran into a roadblock. Kickass gets the full list of files from each torrent by clicking a javascript link &lt;a href="javascript:getFiles('52261EB9480EDFD83B5B85C8C4817D28F3AE0C95', 1);" class="showmore folded"&gt;. I have traced the javascript function back to a *.js file that is used but I am not sure how to mimic this behaviour. Ideally I would just like to grab the javascript link from the main site, and get the list like I would with any other website, though everything for JSOUP seems to follow html links rather than javascript ones. So I tried with HtmlUnit. I inspected the site with chrome: https://kickass.to/australian-aria-top-50-singles-13-10-2014-t9702189.html and copied the xpath expression. Currently the below does not work, while I would like to get around having to use this library for a single function, I can't get it work in general. My Test Code: java.util.logging.Logger.getLogger("com.gargoylesoftware").setLevel(java.util.logging.Level.OFF); WebClient webClient = new WebClient(BrowserVersion.CHROME); HtmlPage page = webClient.getPage("https://kickass.to/australian-aria-top-50-singles-13-10-2014-t9702189.html"); HtmlElement htmlElement = page.getFirstByXPath("//*[@id=\"ul_top\"]/tbody/tr[31]/td[2]/a"); System.out.println(htmlElement.toString()); htmlElement.click(); webClient.waitForBackgroundJavaScript(1000); //get changes here webClient.closeAllWindows();
accepted answer: http://stackoverflow.com/a/29442976
has title: Get html changes from javascript link using Java
type: Question
has comment: http://stackoverflow.com/comment/47053675
tagged with: javascript
has comment: http://stackoverflow.com/comment/47053401
score: 0
tagged with: jsoup
linked to: http://stackoverflow.com/q/10136873

http://stackoverflow.com/comment/46953470
comment on: http://stackoverflow.com/a/29387730
score: 0
type: AnswerComment
has text: Never knew that that even mattered in js/jquery/html, thanks for clearing this up for me!
type: Comment

http://stackoverflow.com/comment/47002511
type: Comment
comment on: http://stackoverflow.com/q/29414772
has text: Is there a way you can share `WaitForAjax`, `ScrollToElemet` functions? wondering if they are doing something strange
score: 0
type: QuestionComment

http://stackoverflow.com/q/29461972
tagged with: javascript
score: 0
has title: Node.js net tcp buffering memory leak
tagged with: memory-leaks
answer count: 1
tagged with: buffer
has comment: http://stackoverflow.com/comment/47090989
has comment: http://stackoverflow.com/comment/47104440
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47090310
has body: I'm writing a TCP game server in Node.js and am having issues with splitting the TCP stream into messages. As i want to read numbers and floats from the buffer i cannot find a suitable module to outsource to as all the ones i've found deal with simple strings ending with a new line delimiter. I decided to go with prefixing each message with the length in bytes of the message. I did this and wrote a simple program to spam the server with random messages ( well constructed with a UInt16LE prefix depicting the length of the message ). I noticed that the longer I leave the programs running my actual server keeps using up more and more memory. I tried using a debugging tool to trace the memory allocation with no success so I figured i'd post my code here and hope for a reply. So here is my code... any tips or pointers as to where I'm going wrong or what I can do differently/more efficiently would be amazing! Thanks. server.on("connection", function(socket) { var session = new sessionCS(socket); console.log("Connection from " + session.address); // data buffering variables var currentBuffer = new Buffer(args.bufSize); var bufWrite = 0; var bufRead = 0; var mSize = null; var i = 0; socket.on("data", function(dataBuffer) { // check if buffer risk of overflow if (bufWrite + dataBuffer.length &gt; args.bufSize-1) { var newBufWrite = 0; var newBuffer = new Buffer(args.bufSize); while(bufRead &lt; bufWrite) { newBuffer[newBufWrite] = currentBuffer[bufRead]; newBufWrite++; bufRead++; } currentBuffer = newBuffer; bufWrite = newBufWrite; bufRead = 0; newBufWrite = null; } // appending buffer for (i=0; i&lt;dataBuffer.length; i++) { currentBuffer[bufWrite] = dataBuffer[i]; bufWrite ++; } // if beginning of message not acknowleged if (mSize === null &amp;&amp; (bufWrite - bufRead) &gt;= 2) { mSize = currentBuffer.readUInt16LE(bufRead); } // if difference between read and write is greater or equal to message mSize + 2 // +2 for the integer holding the message size // this means that …
has answer: http://stackoverflow.com/a/30056114
tagged with: node.js
tagged with: tcp
has comment: http://stackoverflow.com/comment/48187300
has comment: http://stackoverflow.com/comment/47090175
type: Question

http://stackoverflow.com/comment/47111589
comment on: http://stackoverflow.com/q/29475314
has text: No It doesn't. Same delay after timeout milliseconds. [Demo](http://jsfiddle.net/GopsAB/e772g9zq/6/)
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/a/29478861
accepted answer of: http://stackoverflow.com/q/29477733
type: Answer
downvote count: 0
score: 1
has body: I would definitely recommend using a jquery plugin such as tooltipster or jquery tooltip. But this kind of does what you are looking for: fiddle html: Hover over me js: $(document).ready(function () { $('.tooltip-change').on('mouseover', function () { setTimeout(function () { $('.tooltip-change').attr('title', 'title 2'); }, 5000); }); $('.tooltip-change').on('mouseout', function () { $('.tooltip-change').attr('title', 'title 1'); }); }); Only problem with that is that the native title tooltip does not update its display unless the cursor is moved over the html element. Title changes in that after 5 seconds instead of 10 to make the effect quicker.
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29477733

http://stackoverflow.com/comment/47037657
has text: cant fix it, sorry ( mb try it a little bit later, dont give up
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29433478

http://stackoverflow.com/q/29492501
answer count: 1
has answer: http://stackoverflow.com/a/29492541
favorite count: 0
has body: I have this code: var positions = []; $('.category-description TABLE TD').each(function() { var fulltxt = $(this).html().replace(/(&lt;([^&gt;]+)&gt;)/ig,""); var lengt = fulltxt.length; var indx = $(this).index(); positions.push[fulltxt]; alert(positions); }); I can't understand why it's not working.. Table always have atleast 3 TD's and fulltxt have content. Alert(positions) returns empty result.
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has title: Jquery.each array push is not working?
accepted answer: http://stackoverflow.com/a/29492541
has comment: http://stackoverflow.com/comment/47144064
type: Question
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/29516918
downvote count: 0
score: 1
has body: It's because you're checking the target element in this line: if(e.target === scope.targetEl){ The target element is changing whenever you click the h elements inside the div. I forked your plunkr here and you can see the alert fires when you click on the h elements.
type: Answer
answers question: http://stackoverflow.com/q/29516729
upvote count: 1

http://stackoverflow.com/comment/46972041
has text: `tag = prompt("…").trim();` does not work when the user clicks cancel because then `null` is being returned. And `null` can't be trimmed.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29397069

http://stackoverflow.com/comment/47138049
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29489439
has text: @Vikrant, in the `if` you can do an additional check if the function is called from the form or a field (for example add an argument `SaveData(element)`)

http://stackoverflow.com/comment/47049178
type: Comment
comment on: http://stackoverflow.com/q/29440055
has text: No problems, anytime :D
score: 0
type: QuestionComment

http://stackoverflow.com/comment/47207595
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29526556
has text: @PatrickEvans that's what I thought originally, but doing that doesn't run the function at all.
type: Comment

http://stackoverflow.com/q/29424680
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47020903
has answer: http://stackoverflow.com/a/29424880
has comment: http://stackoverflow.com/comment/47024114
score: 1
has body: I'm fetching the value the user has put into a text field in Jquery but the value is empty. Maybe I'm doing something wrong here or maybe I'm trying to access a clone of something istead of the real element because the inputed value is inside a popover in a fullcalendar. And I'm using bootstrap. Here is my code. $(document).on('click', '#saveEvent', function () { //save to db var yogaspaceid = $("#HiddenYogaSpaceId").val(); var eventTitle = $("#eventTitle").val(); // always empty //var eventTitle = $("#eventTitle").attr('value'); //always emtpy var eventStartTime = $( "#timeSelect" ).val(); var eventDuration = $("#timeDuration").val(); $.post( '/ManageSpaces/SaveNewEvent', { id: yogaspaceid, title: eventTitle, startTime: eventStartTime, duration: eventDuration} ); $calPopOver.popover('destroy'); //refresh callendar or add new event then re render }); Add Event @* *@ Title: Select time: Select duration: 30 min 45 min 60 min 75 min 90 min 105 min 120 min Submit Cancel @* *@ hello
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/21262838
has title: Fetching text input val in jquery is always empty
downvote count: 0
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/47021052
favorite count: 0
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/47121618
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29479881
type: Comment
has text: @nikoss Updated my answer, check it out.

http://stackoverflow.com/q/29434995
upvote count: 1
type: Question
tagged with: javascript
downvote count: 0
answer count: 1
tagged with: morris.js
favorite count: 0
has title: binding Morris Donut Chart
type: UnansweredQuestion
has body: I don´t know how to bind a morris donut chart. I have a class called customer: public class Customer { private Long id; private String name; private String email; private Address address; //+ constructors + getter and setters and a class called address: public class Address { private Long id; private String country; private String city; private String street; private String zip; //+ constructors + getter and setters I have a Rest controller which returns all the customers in the DB: 1: { id: 2 name: "Sydney Garrett" email: "lacinia@nuncQuisqueornare.edu" address: { id: 38 country: "Spain" city: "Madrid" street: "P.O. Box 318, 7554 Natoque Avenue" zip: "92394" } } 2: { id: 3 name: "Peter Phillips" email: "Nulla@sodales.org" address: { id: 78 country: "Spain" city: "Vigo" street: "6967 Id, Av." zip: "11498" } } Now, I want to bind a Morris Donut with the city name and the number of customers from each city (for example: Madrid 20, Vigo 12, Barcelona 30) I'm trying to do something like this in js code: $.getJSON('http://localhost:8080/spring/customers/all', function(data){ Morris.Donut({ element: 'morris-donut-chart', data: data }) But I don´t know how to prepare that data (count customers from each city) in the js code. Any suggestion?
score: 1
has answer: http://stackoverflow.com/a/30946637
tagged with: java

http://stackoverflow.com/a/29415414
type: Answer
has body: it's because your update function actually includes the creation of the bars as well, in order to have them just change the color you should have two separate functions, one for the appending of the objects, and one for the update (for example you could have a function that appends rectangles without any attributes and the update function that styles them)
answers question: http://stackoverflow.com/q/29413914
has comment: http://stackoverflow.com/comment/47163356
score: 0
has comment: http://stackoverflow.com/comment/47139489
has comment: http://stackoverflow.com/comment/47139458

http://stackoverflow.com/a/31838774
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/67360433
score: 161
type: Answer
has comment: http://stackoverflow.com/comment/87153533
downvote count: 0
has comment: http://stackoverflow.com/comment/57546761
has comment: http://stackoverflow.com/comment/71635124
accepted answer of: http://stackoverflow.com/q/29527385
has comment: http://stackoverflow.com/comment/106626207
upvote count: 161
has body: The cleanest way to do this that I've seen is with filter: removeItem(index) { this.setState({ data: this.state.data.filter((_, i) =&gt; i !== index) }); }
answers question: http://stackoverflow.com/q/29527385
has comment: http://stackoverflow.com/comment/73377073
has comment: http://stackoverflow.com/comment/78760133
has comment: http://stackoverflow.com/comment/82745299

http://stackoverflow.com/a/29443830
answers question: http://stackoverflow.com/q/29443759
has body: &lt;script&gt; $(document).ready(function(){ $("#id").click(function(){ $("#div").load('friendlist.php'); }); }); &lt;/script&gt; try like this...
score: 0
type: Answer

http://stackoverflow.com/comment/47023008
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29425820
score: 0
has text: @zerkms, I could see JSON.stringify working to find the existence of a contiguous subarray, but do you know how you would retrieve its index? I'm guessing you would have to split on commas or something..but then you would be back to square 1. At your number 2 method, I fail to see how `Array.prototype.slice` would help. I understand you can use it to convert Strings into arrays using `call` but that is not the problem.

http://stackoverflow.com/comment/46928915
comment on: http://stackoverflow.com/a/29374118
score: 0
type: AnswerComment
type: Comment
has text: @발렌텐 - The only downside is if you have other logic to run other than simply removing the element from the array (like calling a server-side API).

http://stackoverflow.com/q/29380266
downvote count: 1
upvote count: 6
has answer: http://stackoverflow.com/a/42786104
type: Question
score: 5
has comment: http://stackoverflow.com/comment/46969400
has title: How to detect iPhone 6 and 6 Plus via JavaScript/jQuery (or PHP)?
tagged with: iphone
linked to: http://stackoverflow.com/q/25759046
tagged with: ios
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/8309998
has comment: http://stackoverflow.com/comment/46958120
has comment: http://stackoverflow.com/comment/47188750
tagged with: viewport
answer count: 3
has body: Is there a way to detect iPhone 6 and 6 Plus via JavaScript or PHP ? I need a boolean value for a conditional if else in jQuery. It's for a web app in Safari (or UIWebView). I tried to detect the screen resolution but because of meta viewport or pixel ration (I don't really know) the output value is the same on iPhone 5, iPhone 6 and 6 Plus. Thanks in advance !
has comment: http://stackoverflow.com/comment/46940506
favorite count: 0
has answer: http://stackoverflow.com/a/39367680
has answer: http://stackoverflow.com/a/29380966
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46940852

http://stackoverflow.com/comment/47235898
comment on: http://stackoverflow.com/q/29518816
score: 0
type: Comment
has text: Please see ["Should questions include “tags” in their titles?"](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles), where the consensus is "no, they should not"!
type: QuestionComment

http://stackoverflow.com/comment/47830292
type: AnswerComment
type: Comment
has text: You'll get perf problems and ordering issues if you try to do that
score: 1
comment on: http://stackoverflow.com/a/29552654

http://stackoverflow.com/a/29383877
has comment: http://stackoverflow.com/comment/46947223
has comment: http://stackoverflow.com/comment/46947163
has comment: http://stackoverflow.com/comment/46946454
has comment: http://stackoverflow.com/comment/46947040
has comment: http://stackoverflow.com/comment/46947352
score: 0
has comment: http://stackoverflow.com/comment/46980685
has comment: http://stackoverflow.com/comment/46947253
answers question: http://stackoverflow.com/q/29383572
has comment: http://stackoverflow.com/comment/46980526
has comment: http://stackoverflow.com/comment/46947306
type: Answer
has body: On your code. your sending ajax request everytime you click the checkbox. better to make another button or something before sending ajax request. $('SOME_ELEMENT').click(function(){ var ids = []; //loop to all checked checkboxes $('.compareRow:checked').each(function(){ //store all id to ids ids.push($(this).attr('id')); }); $.ajax({ type : 'post', url : 'query.php', //query data : {post_id:ids}, // passing id via ajax success : function(r) { other code? }); } }); });

http://stackoverflow.com/comment/46981473
has text: There are a ton of ways to implement something like this in WebGL, depending on the requirements. If you were to strictly replicate the linked content just use plain HTML, no need to use WebGL for this...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29397510
score: 1

http://stackoverflow.com/a/29421506
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47014825
answers question: http://stackoverflow.com/q/29421442
upvote count: 2
has body: Using toggle() may be more effective: $("#timeli").click(function(){ $("#timeUlSub").toggle(); }); Example Fiddle
type: Answer

http://stackoverflow.com/comment/47138565
type: Comment
type: QuestionComment
has text: It would help if you add minimal needed code to reproduce your scenario to the question itself..
score: 2
comment on: http://stackoverflow.com/q/29489686

browser
tags question: http://stackoverflow.com/q/29478712
tags question: http://stackoverflow.com/q/29457759
tags question: http://stackoverflow.com/q/29485481
tags question: http://stackoverflow.com/q/29396769
tags question: http://stackoverflow.com/q/29492113
tags question: http://stackoverflow.com/q/29528410
tags question: http://stackoverflow.com/q/29489142
tags question: http://stackoverflow.com/q/29404245
tags question: http://stackoverflow.com/q/29517467
tags question: http://stackoverflow.com/q/29436570
tags question: http://stackoverflow.com/q/29403210
tag name: browser
tags question: http://stackoverflow.com/q/29375691
type: Tag
tags question: http://stackoverflow.com/q/29493384

http://stackoverflow.com/q/29497347
type: AnsweredQuestion
has title: Read multiple files to string with javascript
tagged with: file
type: Question
accepted answer: http://stackoverflow.com/a/29498071
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29498071
has body: My application read a specific .txt file on the server and writes the content in a string (array) filename = "textfile01.txt" $.get(filename, function(datafil) { var bookings = datafil.split("\n"); //Display $("#divname").append(bookings); }); It works good, but i'd like to add to my array the content of all the text files in that directory. I thought to use regular expressions, but i don't know how apply them. Something like "load all /textfile\d\d\.txt/files in the datafil string". So i can load textfile01.txt, textfile02.txt and so on. Thank you!
tagged with: text

list
type: Tag
tags question: http://stackoverflow.com/q/29518883
tag name: list
tags question: http://stackoverflow.com/q/29471776
tags question: http://stackoverflow.com/q/29444351
tags question: http://stackoverflow.com/q/29491634
tags question: http://stackoverflow.com/q/29527450
tags question: http://stackoverflow.com/q/29474121
tags question: http://stackoverflow.com/q/29495077
tags question: http://stackoverflow.com/q/29477489

http://stackoverflow.com/q/29422508
accepted answer: http://stackoverflow.com/a/29422606
answer count: 1
favorite count: 0
has title: Angularjs - set the default value for select without ng-options
tagged with: angularjs
type: AnsweredQuestion
upvote count: 2
score: 1
has answer: http://stackoverflow.com/a/29422606
tagged with: select
downvote count: 1
type: Question
tagged with: javascript
has body: I have a classic select Male Female And I would like to set selected value according variable coming from scope {{profile.gender}}. When a variable is Female then also option value will be selected. Problem is that I don't have options with gender, only string so I need match it and select. Is it somehow possible to do it with easy way?

http://stackoverflow.com/q/29468055
favorite count: 0
has answer: http://stackoverflow.com/a/33479962
type: UnansweredQuestion
tagged with: php
downvote count: 1
tagged with: dailymotion-api
type: Question
has answer: http://stackoverflow.com/a/29841868
linked to: http://stackoverflow.com/q/29433079
score: -1
has title: is there any way play youtube videos in dailymotion player new beta version
answer count: 2
upvote count: 0
tagged with: javascript
has body: So far this is what I have: so i need the player to play this video 'https://youtu.be/hXI8RQYC36Q?list=PLFgquLnL59akA2PflFpeQG9L01VFg90wS' adding player js &lt;script src="http://api.dmcdn.net/all.js"&gt;&lt;/script&gt; &lt;script&gt; DM.init({ apiKey: 'my app key', status: true, // check login status cookie: true // enable cookies to allow the server to access the session }); // Append a div in the DOM, you may use a real &lt;div&gt; tag var div = document.createElement('div'); document.body.appendChild(div); var videos = 'xdn8vw'; // this is the video id from dailymotions site now i want to play the any youtube video var player = DM.player(div, {video: videos }); &lt;/script&gt; any suggestions

http://stackoverflow.com/q/29427528
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29427976
accepted answer: http://stackoverflow.com/a/29427976
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29427927
has answer: http://stackoverflow.com/a/29427927
tagged with: javascript
score: 0
has title: JSON parser error with ruby
tagged with: ruby
has body: I have JSON data inside the script tag of a page. I tried like below using Nokogiri: json = doc.to_s[/var triforceManifestFeed = (.*)\r/, 1] and json contains the json data in the below format: "{\"manifest\":{\"css\":null,\"pageClass\":\"ent_p038_spike\",\"id\":\"56d116b5-e309-44ba-b5db-4e3ec78eadbc\",\"CMSTitle\":\"ENT_P038_SPIKE - Series Episode Guide\",\"parameters\":[],\"reporting\":{\"parentId\":\"5597d8e0-5eba-4eed-a9ea-a79f2d02002f\"},\"title\":\"Cops - Episode Guide | SPIKE.com\",\"type\":\"ENT_P038\",\"zones\":{\"t1_lc_promo1\":{\"feed\":\"http:\\/\\/www.spike.com\\/feeds\\/ent_m113_spike\\/2.0\\/1444d771-4d00-4a3e-973e-41a9847c69f2\\/5597d8e0-5eba-4eed-a9ea-a79f2d02002f\",\"feedData\":null,\"libraries\":[],\"version\":\"V3\",\"moduleName\":\"ENT_M113_Spike\",\"method\":\"triforce_v1\",\"priority\":0,\"driver\":\"ent_m113_spike_v2\",\"scriptHash\":\"ab1408769329d49\",\"zone\":\"t1_lc_promo1\"},\"t4_lc_promo1\":{\"feed\":\"http:\\/\\/www.spike.com\\/feeds\\/ent_m112_spike\\/2.0.1\\/62a1e116-2b7d-4160-ac2e-505f57572f0d\\/5597d8e0-5eba-4eed-a9ea-a79f2d02002f\",\"feedData\":null,\"libraries\":[],\"version\":\"V3\",\"moduleName\":\"ENT_M112_Spike\",\"method\":\"triforce_v1\",\"priority\":\"200\",\"driver\":\"ent_m112_spike_v2_0_1\",\"scriptHash\":\"8d876061f481e59\",\"zone\":\"t4_lc_promo1\"},\"ads-reporting\":{\"feed\":\"http:\\/\\/www.spike.com\\/modules\\/reporting\\/13ba010f-8f4e-4038-b8f8-b585175e92ca\",\"feedData\":null,\"libraries\":[],\"version\":\"V3\",\"moduleName\":\"ENT_SPIKE_Reporting\",\"method\":\"triforce_v1\",\"priority\":\"50\",\"driver\":\"reporting_v1\",\"scriptHash\":\"0b05d1e51beb47c\",\"zone\":\"ads-reporting\"},\"header\":{\"feed\":\"http:\\/\\/www.spike.com\\/modules\\/ent_m070_spike\\/4.2.0\\/57958c1a-ce7d-44a7-b17f-6d2b500b8275\\/5597d8e0-5eba-4eed-a9ea-a79f2d02002f\",\"feedData\":null,\"libraries\":[],\"version\":\"V3\",\"moduleName\":\"ENT_M070_Spike\",\"method\":\"dummy\",\"priority\":\"-100\",\"driver\":\"ent_m070_spike_v4_2_0\",\…

http://stackoverflow.com/comment/47176562
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29486702
has text: By data do you mean the meta information for the gird like column title e.t.c or the actual data for the rows. Also if its data for the rows then why can't you just do collection.fetch(). You can always get the master id from the row on which you click

http://stackoverflow.com/q/29491324
type: Question
has body: I want to prevent deletion of the divs .panel-heading and .panel-body when the user press delete or backspace keys on the editor. This is the div that appears on the editor: test title test body
tagged with: javascript
tagged with: tinymce-4
downvote count: 0
answer count: 1
favorite count: 0
tagged with: tinymce
has title: How to prevent delete of a div in tinyMCE Editor
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29491325
score: 1
upvote count: 1

http://stackoverflow.com/q/29528509
has answer: http://stackoverflow.com/a/29634310
tagged with: javascript
has comment: http://stackoverflow.com/comment/47229085
has comment: http://stackoverflow.com/comment/47211145
has comment: http://stackoverflow.com/comment/47211189
has comment: http://stackoverflow.com/comment/47403486
score: 3
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47211236
tagged with: jquery
has comment: http://stackoverflow.com/comment/47211646
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47211661
has body: I have a hash and would like to take each of those values and put them inside a text field. The one problem with what I have written out now is that the values are hardcoded in the HTML so if changes are to be made in a text field by the user they would be ignored when submitting a form. Is there any way I can insert the data from my hashes without them being explicitly written as a value attribute but still be processed on submit? HTML JS var data = [{name: "Object One", num: 1}, {name: "Object Two", num: 2}, {name: "Object Three",num: 3}]; for (var i = 0; i < data.length; i++) { var dataNum = " ", dataName = " "; var $tr = " " + dataNum + dataName + " "; $("table").append($tr); }
has comment: http://stackoverflow.com/comment/47211285
has comment: http://stackoverflow.com/comment/47211120
has comment: http://stackoverflow.com/comment/47211287
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47211151
tagged with: forms
has comment: http://stackoverflow.com/comment/47211233
has title: Assigning input values in a for-loop
has comment: http://stackoverflow.com/comment/47211317
type: Question

http://stackoverflow.com/comment/47212463
has text: Yea but I was supposed to use CSS, but this helped! Thanks!
comment on: http://stackoverflow.com/a/29529244
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/47159919
has text: ah I see, will udpate
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29499883

http://stackoverflow.com/comment/46975686
score: 0
has text: http://jsfiddle.net/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29399889

http://stackoverflow.com/comment/47134047
type: Comment
has text: May be your text contains white spaces
type: QuestionComment
comment on: http://stackoverflow.com/q/29487210
score: 0

http://stackoverflow.com/comment/47105413
comment on: http://stackoverflow.com/q/29472008
type: Comment
has text: I had difficulties with giving active class to the next item
score: 0
type: QuestionComment

http://stackoverflow.com/comment/47124034
type: Comment
type: QuestionComment
has text: So this isn't a problem with your own source code. This question seems to be: How to steal videos from another website. If it isn't then I suggest you edit your question, explain the issue and display any attempts you have made to resolve the issue.
comment on: http://stackoverflow.com/q/29481626
score: 0

http://stackoverflow.com/comment/47111503
comment on: http://stackoverflow.com/q/29475187
type: QuestionComment
score: 0
has text: Can you be more clear on the problem here. Is it that the items that do not have "file" in their name is still being affected?
type: Comment

http://stackoverflow.com/comment/47162884
score: 0
has text: have you tried changing the closing of the view model to "})();" instead of "});" ?
comment on: http://stackoverflow.com/q/29502200
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29407285
type: UnansweredQuestion
tagged with: android
answer count: 0
tagged with: famo.us
score: 1
upvote count: 1
has title: Famo.us: Performance of famo.us application is not same in all android phones
type: Question
has body: I have created a famo.us application having different modules. When .apk file installed to phones, different limitations came into scene are as follows- RenderController 3d animation ara not running in .apk while smoothly running in browsers like chrome(even if the persective is set to 1000). .apk file working in phones having android version 4.4.4("motoG") but not in other phones having "Jelly bean"(version 4.2.0 or 4.2.2) If background-color is set with class name in apk, then in apk that surface is not showing background-color, but showing in browsers when running file locally. Like above so many issues I am facing. Is there any proper way to solve this? Thanks.
tagged with: javascript
downvote count: 0
favorite count: 0

api
tags question: http://stackoverflow.com/q/29476362
tags question: http://stackoverflow.com/q/29424973
tags question: http://stackoverflow.com/q/29528190
tags question: http://stackoverflow.com/q/29437299
type: Tag
tags question: http://stackoverflow.com/q/29483686
tag name: api
tags question: http://stackoverflow.com/q/29436863
tags question: http://stackoverflow.com/q/29408482
tags question: http://stackoverflow.com/q/29379603
tags question: http://stackoverflow.com/q/29386981

http://stackoverflow.com/comment/47026905
score: 2
type: Comment
has text: It should be `function` and not `funtion`
type: QuestionComment
comment on: http://stackoverflow.com/q/29428289

http://stackoverflow.com/comment/47068238
score: 0
type: AnswerComment
type: Comment
has text: I have edited my scripts now so it just has to get the value in the text file and not a specific value, can I edit your script in some way to make it work or do I have to do it another way now?
comment on: http://stackoverflow.com/a/29441196

http://stackoverflow.com/comment/47126085
type: Comment
type: QuestionComment
has text: What does jQuery/JavaScript have to do with it?
comment on: http://stackoverflow.com/q/29482757
score: 0

http://stackoverflow.com/q/29424677
has comment: http://stackoverflow.com/comment/47020651
type: UnansweredQuestion
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29424706
has title: Is it ok to assign all variables to an object for a way to avoid creating global variables?
has answer: http://stackoverflow.com/a/29424696
score: -1
answer count: 2
has body: 1.For example if i had defined an object before declaring the variables, then called the them as part of the object as below... //Global object var Global = []; //Every var thereafter ... Global.variable1 = some value; Global.variable2 = some value; Global.variable3 = some value;**
downvote count: 1

http://stackoverflow.com/a/29430098
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29429951
upvote count: 2
answers question: http://stackoverflow.com/q/29429951
has body: You can use the closest method to find the table row, then locate the input from there. You can use the reference to the current element instead of an identity: TakeAction Then use it in the function: function myAction(element){ $.ajax({ method: "POST", dataType:'text', url: "/mydata/someaction/", data: { id: someId} }).done(function( msg ) { $("#myAction_"+someId).text(msg); var check = $(element).closest('tr').find('input[type=checkbox]'); check.prop('checked', true); // make the checkbox checked }); }
type: Answer
downvote count: 0
score: 2

http://stackoverflow.com/comment/47066112
type: AnswerComment
type: Comment
has text: @ChrisGciso I'm testing around, I'll let you know if I find something
score: 1
comment on: http://stackoverflow.com/a/29449763

http://stackoverflow.com/q/29492234
tagged with: upload
tagged with: javascript
favorite count: 0
has title: Listening to XMLHttpRequest.upload.onprogress cost 'ERR_EMPTY_RESPONSE' while uploading an image through formData?
tagged with: ajax
has body: Today I stucked into a weird issue while I'm trying to upload an image to my server through AJAX2 formData, however an 'ERR_EMPTY_RESPONSE' shown up. Everything is ok on my server side because the upload service has been used for a while. After debug line by line, again and again (T__T), I found out it is the xml.upload.onprogress that make this error happened. // This works without listening to the progress event var xhr = new XMLHttpRequest(); var form = new FormData(); form.append('img', myFile, myFilesName); // Both of them will make this error happen! // xhr.upload.onprogress = function() {}; // xhr.upload.addEventListener('progress', function(){}); xhr.open('POST','my_server_side_url'); xhr.send(form); However when I add the progress event listener to the xhr, even I do nothing in the callback, the ERR_EMPTY_RESPONSE error show up. Isn't it weird? Anyone knows why this happening? Thx!!
tagged with: form-data
answer count: 0
type: UnansweredQuestion
score: 2
downvote count: 0
type: Question
upvote count: 2

http://stackoverflow.com/comment/47096668
type: Comment
comment on: http://stackoverflow.com/a/29467073
has text: My focus was to make all the plugins functional. I didn't know what other CSS / scripting code do you have. That's why I asked for the complete code.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/47213032
has text: what does your data look like?
type: Comment
comment on: http://stackoverflow.com/q/29528602
score: 0
type: QuestionComment

http://stackoverflow.com/comment/47123856
type: QuestionComment
has text: yeah. I want to find the source
comment on: http://stackoverflow.com/q/29481626
score: 0
type: Comment

http://stackoverflow.com/q/29401890
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29401959
has title: Modifying a JSON Object
linked to: http://stackoverflow.com/q/4810841
has comment: http://stackoverflow.com/comment/46979286
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46979364
tagged with: javascript
linked to: http://stackoverflow.com/q/4935632
has answer: http://stackoverflow.com/a/29402507
has comment: http://stackoverflow.com/comment/46979304
has body: I have a JSON generated by Papa Parse from a CSV file that look like this: { object, object, object, .... , object } I need to modify it so it looks like this: { "publication" : { "id" : 1, "name" : "name1" }, "publication" : { "id" : 2, "name" : "name2" }, "publication" : { "id" : 3, "name" : "name3" } } Where the "id" and "name" are properties within each object. In other words, I need a JSON that say "publication" and each "publication" occurrence have nested under it the properties names and values of one of the objects above. How could I achieve this with Javascript? Thanks
answer count: 3
tagged with: arrays
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46979272
accepted answer: http://stackoverflow.com/a/29401959
has comment: http://stackoverflow.com/comment/46979274
possible better answer: http://stackoverflow.com/a/29401973
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46979331
has answer: http://stackoverflow.com/a/29401973
score: 1
has comment: http://stackoverflow.com/comment/46979393

http://stackoverflow.com/q/29521386
has comment: http://stackoverflow.com/comment/47206248
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47198576
has comment: http://stackoverflow.com/comment/47200355
has body: I'm working with the Fullpage.js system for my site. Following problem is that I can't seem to get my background image to go over the video showing. With the .layer class it's possible to get text over the video. But It doesn't work for a background-image. Or I can't seem to get it to work. I already contacted the fullpage.js github and they say it's CSS related period. code: #myVideo{ position: absolute; right: 0; bottom: 0; top:0; right:0; width: 100%; height: 100%; background-size: 100% 100%; background-color: black; /* in case the video doesn't fit the whole page*/ background-image: /* our video */; background-position: center center; background-size: contain; object-fit: cover; /*cover video background */ z-index:1; } #layer2{ background-image:url(imgs/TOHA.svg); background-repeat: no-repeat; background-attachment:fixed; background-size:cover; background-position:center; background-size:; z-index:9999; } /* Layer with position absolute in order to have it over the video * --------------------------------------- */ #section0 .layer{ position: absolute; z-index: 4; width: 100%; left: 0; top: 43%; } /*solves problem with overflowing video in Mac with Chrome */ #section0{ overflow: hidden; } Fixed elements Create your own headers and footers
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: fullpage.js
has answer: http://stackoverflow.com/a/29527854
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47204391
has answer: http://stackoverflow.com/a/29566630
accepted answer: http://stackoverflow.com/a/29527854
has title: Fullpage.js - Video + Background in same section
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29566630

http://stackoverflow.com/q/29504772
has answer: http://stackoverflow.com/a/29504983
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: How to change prompt responses to input boxes in JavaScript and HTML
has answer: http://stackoverflow.com/a/38249138
answer count: 4
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/38249011
tagged with: command-prompt
tagged with: prompt
type: Question
has answer: http://stackoverflow.com/a/29504826
has body: Long Detailed Question I put a part of my code below. It is a small javascript game I am working on. When the game wants to know something, or take an text input from the user, I use the prompt command, which as you probably know brings up an alert box that displays some text and lets the user submit a text response. I want to know how I can change it, so instead of an alert box that pops up there is just a input box on the screen that takes their text response. I assume the code needed would either be JQuery(which I do not have much experience in) or JavaScript. Short Summarized Question So in summary I want to know how I can make an input box that takes text inputs similar to how a prompt alert does&lt;&lt;&lt; Code var finishAnt = prompt( "you can either risk your life and finish him, or try to run away. Do you finish him?").toLowerCase() if (finishAnt == "yes") { console.log("congratulations you have killed the aint eater!") } else if (finishAnt == "no") { console.log( "You run away and barley make it, you are badly hurt"); } else { console.log("sorry thats not an option") } } else if (meetAnt == "no") { console.log( "You run past the ant eater and get to saftey. You are very lucky") } else { console.log("Sorry that is not an option.") }
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46934787
score: 0
type: Comment
has text: @zerkms thanks a lot! Now I can go to sleep...
comment on: http://stackoverflow.com/a/29376983
type: AnswerComment

http://stackoverflow.com/a/29576090
type: AcceptedAnswer
downvote count: 0
upvote count: 8
type: Answer
score: 8
accepted answer of: http://stackoverflow.com/q/29420472
answers question: http://stackoverflow.com/q/29420472
has body: The whole thing can use some cleanup especially depending on your final data, but here's a good solution I think. I used the inspection methods to find out where on the chart's div the line should go and then add a new div to draw the line over the SVG chart. You can similarly add an SVG node to the SVG element in the DOM. http://jsfiddle.net/vmb4odkt/2/ I had to make the container div position: relative to make calculations easier. The main code is this: var line = document.createElement("div"); var interface = chart.getChartLayoutInterface(); var cli = chart.getChartLayoutInterface(); line.style.background = "red"; line.style.width = "2px"; line.style.position = "absolute"; line.style.left = (interface.getXLocation(2) - 1) + "px"; line.style.top = interface.getYLocation(5) + "px"; line.style.height = (interface.getYLocation(1) - interface.getYLocation(5)) + "px"; el.appendChild(line); All of the hardcoded values can be removed and replaced with either calculations or constants depending on your data source.

http://stackoverflow.com/comment/47040562
type: AnswerComment
type: Comment
has text: you are right, i had it wrong on the attachment methods, as for the collection it was an oversight a simple array conversion would solve the problem. Thanks for the pointers
score: 0
comment on: http://stackoverflow.com/a/29377551

http://stackoverflow.com/comment/47027324
score: 0
comment on: http://stackoverflow.com/q/29428566
type: Comment
has text: What browsers did you test in?
type: QuestionComment

http://stackoverflow.com/comment/47009899
type: AnswerComment
score: 0
type: Comment
has text: Don't stringify the data, is already a string, just do: `localStorage.setItem("htDat", heatData);` `var heatData = JSON.parse(localStorage.getItem("htDat"));`
comment on: http://stackoverflow.com/a/29403279

http://stackoverflow.com/a/29387750
has comment: http://stackoverflow.com/comment/46954214
type: Answer
has comment: http://stackoverflow.com/comment/46954532
downvote count: 0
score: 1
has body: If you use onblur and focus on the textbox together the alert box will always show in the screen, because after focusing the textbox you are closing the modal alert means that you are re-belurring the textbox. So it's better to use : the onchange event. Or the onKeyup event. Note: Using the onkeyup is a better approach to refocus the textbox safely. And try to focus on the textbox right before showing the alert, so when you close the alert the textbox will be already focused. EDIT: Here's a DEMO Fiddle using the onkeyup event but a simple alert, and here's the code: function checkalphabets(textbox) { var pattern = /^[a-zA-Z\s]+$/; if (!pattern.test(textbox.value)) { setTimeout(function () { textbox.focus(); }, 1); alert('This is wrong'); exit; return false; } return true; } It fires whenever you type a wrong character and still focuses in teh textbox.
answers question: http://stackoverflow.com/q/29387368
has comment: http://stackoverflow.com/comment/46953556
upvote count: 1

http://stackoverflow.com/q/29408903
answer count: 3
has answer: http://stackoverflow.com/a/37806490
downvote count: 0
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/10591422
tagged with: http://stackoverflow.com/tag/html
has body: See the following two screenshots of the same carousel from Bootstrap 3 with different size images in it. First screenshot: Second screenshot: Html for the inner carousel. . . . . Both the carousel and the table are contained in a class="row" with both inside it's own class="col-md-6". As you can see this is ugly as the carousel keeps changing heights with the different heights of the images. I won't accept "Your source images should all have the same heights" as an answer. I want the carousel be of a fixed height and the images should scale accordingly (preferably the same height as the table). Also if possible I'd like to fix this with one of the bootstrap classes provided instead of adding custom css. I've already read to add a fixed width (or height) for the carousel, but I don't find this to be a good solution, because Custom css It's not responsive, it should stay col-md-6 being half of the row! So does anyone know an elegant, robust and responsive way of fixing this problem? Maybe with Javascript? NOTE I know there are other carousels out there, but suggesting that is not an answer for my question. My question addresses bootstrap's carousel.
tagged with: carousel
has title: bootstrap 3 carousel fixed height
tagged with: css
has answer: http://stackoverflow.com/a/29409702
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/59149267
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
has answer: http://stackoverflow.com/a/29412012

http://stackoverflow.com/comment/47211861
type: Comment
type: QuestionComment
has text: I don't understand why my question is marked as duplicate while it refers to Firefox instead of Chrome..
comment on: http://stackoverflow.com/q/29528410
score: 0

http://stackoverflow.com/a/29406518
has comment: http://stackoverflow.com/comment/46990024
has comment: http://stackoverflow.com/comment/46988296
downvote count: 3
accepted answer of: http://stackoverflow.com/q/29406400
has body: Try this in your javascript code window.location.href = 'products.php?price_range='+encodeURIComponent('-INFto2000,2001to5000'); You can access the decoded value in $_GET['price_range']. $_GET variables are decoded by default in PHP.
upvote count: 5
has comment: http://stackoverflow.com/comment/46991942
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46988087
has comment: http://stackoverflow.com/comment/46988808
type: Answer
has comment: http://stackoverflow.com/comment/46988228
score: 2
has comment: http://stackoverflow.com/comment/46988556
answers question: http://stackoverflow.com/q/29406400

http://stackoverflow.com/q/29516174
tagged with: php
has comment: http://stackoverflow.com/comment/47189351
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29516757
has comment: http://stackoverflow.com/comment/47190973
has comment: http://stackoverflow.com/comment/47187835
has comment: http://stackoverflow.com/comment/47188839
has comment: http://stackoverflow.com/comment/47188110
downvote count: 1
has comment: http://stackoverflow.com/comment/47188322
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29558775
accepted answer: http://stackoverflow.com/a/29558775
has comment: http://stackoverflow.com/comment/47189316
tagged with: javascript
score: 0
upvote count: 1
has title: PHP mail() is not functioning
tagged with: email
tagged with: smtp
favorite count: 0
has body: I'm trying to communicate between JavaScript and PHP since last two days. After reading numerous tutorials, suggestions and solutions of the similar encountered issues of other people I am unable to succeed as intended yet. So to speak, I'm programming over a domain of mine, not locally. The goal is to: Send to my e-mail address a very well formatted string from a well-formed object in my JavaScript. In order to do that I do understand that a PHP script is needed to be executed with it's famous email() function. Steps taken for the goal: Have a functioning JavaScript (with no errors) that creates and fills data to the above-mentioned JS object (name it: 'person'); Format it into a good string (because I want it to send as a plain text format not an HTML yet); Have jQuery's $.ajax() call to do a CORS interaction with the server-side, which is a PHP containing the necessary Headers and the code to send a simple mail to the designated destination (e.g. my e-mail address). (Optional) Have undergone GZIP compression, minifying HTML/CSS/JS to produce a faster loading content to the client. What's the ISSUE? My AJAX code runs smooth with no errors but not as expected and intended. Instead of jumping/entering into SUCCESS, it goes right away on ERROR custom-made functions and I don't seem to be able to decipher what could possibly be going wrong. I'm going to post below both JS (AJAX call) and the PHP script that I'm using to accomplish the goal mentioned above. JavaScript (updated) : function submitOnClick() { var full_name = "John Doe"; var profile_person = "--[Name: John, Surname: Doe, Birthday: 25/02/1950]--"; var hr = new XMLHttpRequest(); hr.open("POST", "submit_to_email.php", true); hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); hr.send("full_name=" + full_name + "&amp;" + "person=" + profile_person); hr.onreadystatechange = function () { if (hr.readyState == 4 &amp;&amp; hr.status == 200) { var data = hr.responseText; console.log("PHP resp…
has comment: http://stackoverflow.com/comment/47187914
possible better answer: http://stackoverflow.com/a/29516757

http://stackoverflow.com/a/29499981
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29498472
answers question: http://stackoverflow.com/q/29498472
score: 0
has body: The solution was the below.. It was one line of code $disease = implode(",",$_POST["disease"]); queryMysql("INSERT INTO patient_diseases (disease,username) VALUES('$disease','$username')");

http://stackoverflow.com/comment/87450701
has text: Excellent answer! I found & created a more verbose method (https://gist.github.com/rmckeel/b4e60922f5098ced9c50bdd96731b34a/ccca5069825096cb286c46c090312f1b5e0d5594), but I updated that code sample with this inherit stdio concept (https://gist.github.com/rmckeel/b4e60922f5098ced9c50bdd96731b34a), because it is elegant and should work for most purposes. Thanks!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/33132843
type: Comment

http://stackoverflow.com/q/29442008
has answer: http://stackoverflow.com/a/29446474
tagged with: angularjs
tagged with: wikipedia-api
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/29446474
type: Question
tagged with: cors
score: 2
answer count: 1
downvote count: 0
has title: AngularJS: consume web service from Wikipedia API
has body: I'm developing an AngularJS app, and I want to display some info from Wikipedia, but I can't access the data in Angular, because the CORS restriction. $scope.wikipediaData = $http.get('http://es.wikipedia.org/w/api.php?titles='+$scope.country.name.toLowerCase()+'&amp;rawcontinue=true&amp;action=query&amp;format=json&amp;prop=extracts'); It make the call and I see it in firebug, I copied the url and paste it in another tab and I can see the JSON response. In firebug also I'm seeing that I have to activate CORS but I don't know how to do it, and I tried a lot of solutions that I have been reading in StackOverflow and another sites. Anyone can help me? Thanks
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/29374410
tagged with: react-native
downvote count: 0
type: Question
accepted answer: http://stackoverflow.com/a/29374411
score: 5
tagged with: ios
tagged with: javascript
has answer: http://stackoverflow.com/a/29374411
answer count: 1
favorite count: 0
upvote count: 5
has comment: http://stackoverflow.com/comment/62900434
has title: How to build React Native App for iPhone?
has body: On the iPhone simulator everything works fine. When building the App for the iPhone i get the error: A bundleURL is required to create an RCTRootView In the AppDelegate.m i uncomment the following line; jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; And downloaded the prebuild main.jsbundle to the iOS folder in the project root: curl http://localhost:8081/index.ios.bundle -o main.jsbundle
type: AnsweredQuestion

http://stackoverflow.com/q/29375188
has comment: http://stackoverflow.com/comment/53846591
tagged with: javascript
tagged with: jquery
has body: I'm currently using two plugins: https://www.datatables.net/ http://eonasdan.github.io/bootstrap-datetimepicker/ The problem arises when trying to actually put the datetimepicker inside the table. The styles get all garbled. Here's a picture: On the left is what I have and on the right is what I should have. Here's my code: Test page Name Position Office Age Start date Salary Name Position Office Age Start date Salary System Architect Edinburgh 61 2011/04/25 $320,800 Garrett Winters Accountant Tokyo 63 2011/07/25 $170,750 Ashton Cox Junior Technical Author San Francisco 66 2009/01/12 $86,000 My best guess is that the datatable plugin's styles override the datetimepicker's. However, I have no idea how to actually solve this situation short of hacking the plugin itself, which I'd rather avoid if at all possible.
score: 0
accepted answer: http://stackoverflow.com/a/33016525
possible better answer: http://stackoverflow.com/a/52848281
tagged with: css
has answer: http://stackoverflow.com/a/52848281
type: AnsweredQuestion
tagged with: twitter-bootstrap
has title: bootstrap datetimepicker conflicts with datatable jquery plugin
has comment: http://stackoverflow.com/comment/53855923
type: Question
has answer: http://stackoverflow.com/a/33016525
answer count: 2

firefox
tags question: http://stackoverflow.com/q/29378785
tags question: http://stackoverflow.com/q/29484632
tags question: http://stackoverflow.com/q/29380811
tags question: http://stackoverflow.com/q/29433504
tags question: http://stackoverflow.com/q/29528410
tags question: http://stackoverflow.com/q/29405683
tags question: http://stackoverflow.com/q/29403681
tags question: http://stackoverflow.com/q/29394797
tags question: http://stackoverflow.com/q/29464954
tags question: http://stackoverflow.com/q/29391364
tags question: http://stackoverflow.com/q/29487039
tags question: http://stackoverflow.com/q/29509941
tag name: firefox
tags question: http://stackoverflow.com/q/29512957
tags question: http://stackoverflow.com/q/29507364
tags question: http://stackoverflow.com/q/29494715
tags question: http://stackoverflow.com/q/29403490
tags question: http://stackoverflow.com/q/29497857
tags question: http://stackoverflow.com/q/29486775
tags question: http://stackoverflow.com/q/29469341
type: Tag
tags question: http://stackoverflow.com/q/29408140
tags question: http://stackoverflow.com/q/29509140
tags question: http://stackoverflow.com/q/29377964
tags question: http://stackoverflow.com/q/29459749
tags question: http://stackoverflow.com/q/29433134
tags question: http://stackoverflow.com/q/29381955
tags question: http://stackoverflow.com/q/29424375
tags question: http://stackoverflow.com/q/29498655
tags question: http://stackoverflow.com/q/29398060
tags question: http://stackoverflow.com/q/29439467
tags question: http://stackoverflow.com/q/29493496
tags question: http://stackoverflow.com/q/29409347
tags question: http://stackoverflow.com/q/29507571
tags question: http://stackoverflow.com/q/29467362
tags question: http://stackoverflow.com/q/29394805
tags question: http://stackoverflow.com/q/29386993
tags question: http://stackoverflow.com/q/29527256
tags question: http://stackoverflow.com/q/29479569
tags question: http://stackoverflow.com/q/29452205

http://stackoverflow.com/comment/59065138
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29494873
has text: Like ng-pattern only for 31 days

http://stackoverflow.com/a/29510537
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29381899
upvote count: 5
has comment: http://stackoverflow.com/comment/47181665
has comment: http://stackoverflow.com/comment/47348826
has comment: http://stackoverflow.com/comment/47185122
type: Answer
accepted answer of: http://stackoverflow.com/q/29381899
downvote count: 0
has body: So, today seems to be a safe day to tackle this problem... The OP does not seem to be quite so PDF-savvy. However, he obviously is quite a literate LaTeX guy. Which means, he also must be knowing TeX very well, given he is so much of a Donald Knuth admirer... So much for the preliminaries. Now for the real meat. First, to quote the official PDF-1.7 specification document: PDF is not a programming language, and a PDF file is not a program. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (p. 92, Section 7.10.1) However, the pre-decessor of the PDF format, PostScript, IS a Turing-complete programming language... Turing-complete, just as TeX is, the creation of Donald Knuth, one of the greatest computer scientists of all time. PostScript files, on the other hand, ARE programs, and can easily be executed by PostScript printers (though this execution time cannot reliably be determined in advance). Hence, and second, the OP should be able to find a way to convert his hi-level LaTeX code to low-level TeX code. That code needs to emit a PostScript program, which in turn can be executed by a PostScript printer. Writing that TeX code should be trivial for somebody like the OP, once he is given the PostScript code that should be the result of his TeX code. I myself am not so well-versed with the TeX aspect of that problem solving procedure. However, I can help with the PostScript. The PostScript which the OP's TeX code should produce goes like this (there are for sure more optimized versions possible -- this is only a first, quick'n'dirty shot at it): %!PS % define variables /n1 999 def /t1 334 def /n2 995 def /t2 200 def /n3 990 def /s1 67 def /t3 2 def…
has comment: http://stackoverflow.com/comment/47346516
has comment: http://stackoverflow.com/comment/47184453
has comment: http://stackoverflow.com/comment/47185577
has comment: http://stackoverflow.com/comment/47345400
has comment: http://stackoverflow.com/comment/47184565
has comment: http://stackoverflow.com/comment/47184030
score: 5
has comment: http://stackoverflow.com/comment/47184905

http://stackoverflow.com/comment/47244627
has text: Ah right, just put a + in front of the date: `x(+dateParser(d.start) + d.value * 60 * 1000) - x(dateParser(d.start))`
comment on: http://stackoverflow.com/q/29499553
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/29498111
has comment: http://stackoverflow.com/comment/47178461
has comment: http://stackoverflow.com/comment/47176338
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47180836
has answer: http://stackoverflow.com/a/29498390
tagged with: javascript
has comment: http://stackoverflow.com/comment/47192412
has comment: http://stackoverflow.com/comment/47155560
type: Question
tagged with: http://stackoverflow.com/tag/csv
answer count: 1
accepted answer: http://stackoverflow.com/a/29498390
tagged with: d3.js
has title: Reading Csv File with Javascript
has body: I have a problem when I read a csv file from javascript with d3 Library. The problem is that: Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load this is the code that I execute:
score: 0

http://stackoverflow.com/a/29402824
has body: I'm not 100% sure, if I understand your question correctly, but this focuses the input after click. var myApp = angular.module("CheckAllModule", []); myApp.directive('myFocus', function ($compile, $timeout) { return { restrict: 'A', link: function (scope, element, attr) { var focus = function (n,o) { $timeout(function() { if (n != 0 &amp;&amp; n) { console.log(element[0]); // Degub print element[0].focus(); element[0].select(); } }, 3000); } scope.$watch(attr.myFocus, focus); element.removeAttr("my-focus"); $compile(element)(scope); } }; }); Hope it helps!
has comment: http://stackoverflow.com/comment/46981322
accepted answer of: http://stackoverflow.com/q/29402671
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46981212
upvote count: 2
has comment: http://stackoverflow.com/comment/46981077
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29402671

http://stackoverflow.com/comment/46961253
score: 0
type: AnswerComment
has text: Thanks man I got it working here is the updated fiddle: https://jsfiddle.net/24gmnjwm/2/
type: Comment
comment on: http://stackoverflow.com/a/29391868

http://stackoverflow.com/q/29519640
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/pdf
tagged with: http://stackoverflow.com/tag/html
has body: In our web portal we generate PDFs for certain kinds of data. The user downloads the PDF by clicking an tag that references something that we return with content-type: application/pdf;charset=utf-8 This works well when it works; the browser realizes that it is getting a PDF file and opens a internal or external PDF reader, or asks the user to save the file, depending on browser and user configuration. We have some cases where we may fail to generate the PDF though. First we didn't handle the error, a NullPointerException fell through and we got an ugly new page full of JSON formatted garbage. Then we tried returning an empty result, which the browser thinks is fine and just saves or sends an empty file. Then I tried returning a redirect, which confused Chrome which showed an alert telling the user that something strange was happening. The href in the tag is on the format "/module/showmypdf.cmd?pdfid=67482". This, as I said, works fine when a valid pdf is returned. So, is there any kind of best practice for error handling when it comes to sending non-HTML files to browsers? Is there something else I could try to make the browser interpret my response as a redirect?
has comment: http://stackoverflow.com/comment/47269767
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29535704
has title: Error handling when generating pdf or other non-html file
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/47244097

http://stackoverflow.com/comment/47157510
type: QuestionComment
has text: I had a variabled and a function w/ same name.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29486353

http://stackoverflow.com/a/29498725
type: AcceptedAnswer
has body: You can use javascript on your PHP code like this: &lt;?php &lt;script&gt; location.href="#thanku" &lt;/script&gt; ?&gt; Try that. I hope this helps. UPDATE If you do AJAX instead, it would be best. After signup, if the user signups successfully, on the javascript file you can use location.href="#thanku". For that, you would need to do an AJAX request in your signup form.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29498631
accepted answer of: http://stackoverflow.com/q/29498631
has comment: http://stackoverflow.com/comment/47176886

http://stackoverflow.com/comment/46962571
type: AnswerComment
comment on: http://stackoverflow.com/a/29374817
score: 0
type: Comment
has text: Also the $post method has to sit inside the ready https://api.jquery.com/ready/

http://stackoverflow.com/comment/47107405
type: QuestionComment
type: Comment
score: 1
has text: Using Angular and jQuery at the same time is discouraged, unless you really know what you're doing. It's certainly overkill if all you want to do is include an external HTML file, even if you were initializing it correctly, [which you are not](https://docs.angularjs.org/tutorial/step_02).
comment on: http://stackoverflow.com/q/29473137

asp.net-mvc
tags question: http://stackoverflow.com/q/29428581
tags question: http://stackoverflow.com/q/29465903
tags question: http://stackoverflow.com/q/29448756
tags question: http://stackoverflow.com/q/29420871
tags question: http://stackoverflow.com/q/29414927
tags question: http://stackoverflow.com/q/29401735
tags question: http://stackoverflow.com/q/29487733
tags question: http://stackoverflow.com/q/29483876
tags question: http://stackoverflow.com/q/29378301
tags question: http://stackoverflow.com/q/29374662
tags question: http://stackoverflow.com/q/29417231
tags question: http://stackoverflow.com/q/29385635
tags question: http://stackoverflow.com/q/29406628
tags question: http://stackoverflow.com/q/29380360
tags question: http://stackoverflow.com/q/29414682
tags question: http://stackoverflow.com/q/29481901
tags question: http://stackoverflow.com/q/29493558
tags question: http://stackoverflow.com/q/29472909
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/29480289
tags question: http://stackoverflow.com/q/29517467
tags question: http://stackoverflow.com/q/29475585
tags question: http://stackoverflow.com/q/29487628
tags question: http://stackoverflow.com/q/29426777
tags question: http://stackoverflow.com/q/29376571
tags question: http://stackoverflow.com/q/29375944
tags question: http://stackoverflow.com/q/29451269
tags question: http://stackoverflow.com/q/29450944
tags question: http://stackoverflow.com/q/29497597
tags question: http://stackoverflow.com/q/29439302
tags question: http://stackoverflow.com/q/29423447
tags question: http://stackoverflow.com/q/29385189
type: Tag
tags question: http://stackoverflow.com/q/29429950
tags question: http://stackoverflow.com/q/29512509
tags question: http://stackoverflow.com/q/29504348
tags question: http://stackoverflow.com/q/29442299
tags question: http://stackoverflow.com/q/29492820
tags question: http://stackoverflow.com/q/29437561
tags question: http://stackoverflow.com/q/29492900
tags question: http://stackoverflow.com/q/29391810
tags question: http://stackoverflow.com/q/29524971
tags question: http://stackoverflow.com/q/29400330
tags question: http://stackoverflow.com/q/29455930
tags question: http://stackoverflow.com/q/29454957
tags question: http://stackoverflow.com/q/29393738

http://stackoverflow.com/q/29479016
has comment: http://stackoverflow.com/comment/47118639
has title: using a global variable to store a number (JavaScript)
type: Question
downvote count: 0
accepted answer: http://stackoverflow.com/a/29479120
has comment: http://stackoverflow.com/comment/47118731
tagged with: javascript
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: 2
possible better answer: http://stackoverflow.com/a/29479303
upvote count: 2
has answer: http://stackoverflow.com/a/29479303
has body: the statement if (xPos === xGold3 && yPos === yGold3) , the code somehow does not recognize the values for xGold3 and yGold3 and my code does not work, but if i assign some values manually like if (xPos === 400 && yPos === 0) , then the code works. Can anyone tell me what i'm doing wrong? thanks P New Game Use WASD or IJKL or arrow keys to move kitty
has answer: http://stackoverflow.com/a/29479177
has answer: http://stackoverflow.com/a/29479120
type: AnsweredQuestion

http://stackoverflow.com/q/29436354
tagged with: javascript
score: 0
answer count: 2
has title: JavaScript: Accessing variable inside callback
accepted answer: http://stackoverflow.com/a/29436428
linked to: http://stackoverflow.com/q/17311693
tagged with: node.js
has answer: http://stackoverflow.com/a/29436450
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47050564
possible better answer: http://stackoverflow.com/a/29436450
linked to: http://stackoverflow.com/q/750486
type: Question
has body: I'm trying to use the open-graph plugin in NodeJS to get a preview image for a vine. The OG result is correct, but I can't access result[i] from within the og callback - the variable is undefined. How can I access result[i] in the OG callback? Thing.find(function(err, result) { for (var i = 0; i &lt; result.length; i++) { if (result[i].attachment) { if (result[i].attachment.embed_type == 'vine') { og(result[i].attachment.embed_url, function(err, meta) { result[i].attachment.preview_image = meta.image; result[i].save(); }); } } } });
has answer: http://stackoverflow.com/a/29436428

http://stackoverflow.com/q/29530104
has answer: http://stackoverflow.com/a/29555584
favorite count: 0
has comment: http://stackoverflow.com/comment/47234736
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has body: Im using Google Maps API V3 markers php/sql. my problem is i want a real time update of markers depending on data stored in my sql db because i need it for my emergency response system for my capstone project. but i see 2 or 3 threads with this same issue but nothing happens when i try to use there codes. please somebody tell me what to do. i'm doing this almost 1 day straight but nothing happens. What I want to achieve is this. this is my code. PHP/MySQL & Google Maps Example
has answer: http://stackoverflow.com/a/42795117
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47235774
has comment: http://stackoverflow.com/comment/47214924
tagged with: javascript
score: -1
has title: Real-Time update of markers without loading the page Google Maps API V3
tagged with: google-maps-api-3
answer count: 2
tagged with: google-maps
upvote count: 0

http://stackoverflow.com/q/29408744
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29409019
has body: I am facing some issues in jquery .. actually I have ionrange slider ..I am getting the values from that slider.. and now I have to use that values and put some conditions on it using if else statements(5-7 conditions) and show them in another input filed.. but I am not getting the required values. For example, when the value of range slider is 0-100 then the rate is 22 and then total amount is rate*100 ...when the value is 101-500 then the rate is 21$ its show rate and then total amount is rate*500 and so on.. Number of Students Price per Student per Month $ Total Cost Per Month $ $("#rangeValue-p").on("change", function() { var rv_p =document.getElementById("rangeValue-p"); var rate_p=0; var totalAmount_p=0; if (rv_p>=0 && rv_p<=100) { rate_p=22; $(".rvps-p").val(rate_p); totalAmount_p=rate_p*100; $(".t-p").val(totalAmount_p); } else if (rv_p>=101 && rv_p<=500) { rate_p=21; $(".rvps-p").val(rate_p); totalAmount_p=rate_p*500; $(".t-p").val(totalAmount_p); } else if (rv_p>=501 && rv_p<=1000) { rate_p=20; $(".rvps-p").val(rate_p); totalAmount_p=rate_p*1000; $(".t-p").val(totalAmount_p); } else if (rv_p>=1001 && rv_p<=1500) { rate_p=19; $(".rvps-p").val(rate_p); totalAmount_p=rate_p*1500; $(".t-p").val(totalAmount_p); } else if (rv_p>=1501 && rv_p<=2000) { rate_p=18; $(".rvps-p").val(rate_p); totalAmount_p=rate_p*2000; $(".t-p").val(totalAmount_p); } else if (rv_p>=2001 && rv_p<=2500) { rate_p=17; $(".rvps-p").val(rate_p); totalAmount_p=rate_p*2500; $(".t-p").val(totalAmount_p); } else if (rv_p>=2501 && rv_p<=3000) { rate_p=16; $(".rvps-p").val(rate_p); totalAmount_p=rate_p*3000; $(".t-p").val(totalAmount_p); } });
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has title: how to calculate the input values from a range slider dynamic values .?
has comment: http://stackoverflow.com/comment/46991541

http://stackoverflow.com/a/52097053
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29466639
upvote count: 2
has body: The enable-usermedia-screen-capture flag was removed from chrome://flags/ in Chrome M36 (Chromium Issue 347641). For testing or experimenting, the feature can still be enabled when starting Chrome with chrome --enable-usermedia-screen-capturing (tested in Chrome 68). Screenshot: The Chrome Platform Status also highlights a MediaStream.getDisplayMedia() implementation, which will allow developers to record or share the screen from the browser without any plugin. The specification for this can be found in the Screen Capture Editor's Draft.
type: Answer

http://stackoverflow.com/q/29435226
has title: Error opening a new browser window using javascript
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: Terms and Conditions in this term and conditions I have an onclick that calls `myFunction()` and i justenter code here have w3school as an example For the onclick does it have to go to a published website or can it be a html file i have saved on my hardrive called terms.html?
type: Question
has answer: http://stackoverflow.com/a/29435300
tagged with: javascript
score: 0
tagged with: new-window
answer count: 1
accepted answer: http://stackoverflow.com/a/29435300

http://stackoverflow.com/q/29388921
has comment: http://stackoverflow.com/comment/46955798
score: 1
has comment: http://stackoverflow.com/comment/46956537
type: Question
accepted answer: http://stackoverflow.com/a/29389435
has comment: http://stackoverflow.com/comment/46955258
has comment: http://stackoverflow.com/comment/46955412
has comment: http://stackoverflow.com/comment/46955495
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46956442
tagged with: ajax
has answer: http://stackoverflow.com/a/29389435
has title: pages keep refreshing after call javascript function returned from ajax response
upvote count: 1
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46955947
has comment: http://stackoverflow.com/comment/46955652
has body: I have tried most answers about call javascript function returned from ajax response. Every answer worked but I must call alert to show the ajax response to see the result.(If not use alert in the function refreshResults, sometime the result will show but disappear immediately) It seems the page keep refreshing. Here is the screenshot. I already tested the browser can receive data successfully from the server. The problem is how to show the data from the browser side. Here is the code related to receive data from the server and how the server return data. ajax function sendAjaxQuery(url, data) { $.ajax({ type: 'POST', url: url, data: data, success: function (data) { //eval(document.getElementById("refreshResults").innerHTML); refreshResults(data); //$("#firstname").text(data); // alert('success '+data); } }); } This is how I send data to server. sendAjaxQuery('http://localhost:3000/results.html',JSON.stringify($('form').serializeObject())); js The server side is nodejs. (The server side return a string. Status is 200). The http header is "Content-Type": "text/plain",'Access-Control-Allow-Origin': '*' This is the click handler. function sendData() { var form = document.getElementById('myform'); sendAjaxQuery('http://localhost:3000/results.html',JSON.stringify($('form').serializeObject())); } var sendButton = document.getElementById('sendButton'); sendButton.onclick = sendData; This is the according html Search
has comment: http://stackoverflow.com/comment/46956574
favorite count: 0
has comment: http://stackoverflow.com/comment/46956387
has comment: http://stackoverflow.com/comment/46955878
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46955589

http://stackoverflow.com/q/29377748
has comment: http://stackoverflow.com/comment/46935773
tagged with: canvas
has comment: http://stackoverflow.com/comment/46936039
tagged with: javascript
has comment: http://stackoverflow.com/comment/46936122
has comment: http://stackoverflow.com/comment/46937391
answer count: 1
has answer: http://stackoverflow.com/a/29379772
downvote count: 0
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/46935834
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29379772
has title: Draw a line with two different sized ends
has body: How can I have a line be two different sizes with canvas? I have a line I am drawing with canvas that I would like to start out with a width of 30 and gradually(proportionally) reduce down to a size of 15, so that it reaches 15 right at the end of the line. I though that perhaps if I set context.lineWidth in two places (start and end) it would work.
has comment: http://stackoverflow.com/comment/46940019
type: Question

http://stackoverflow.com/q/29383632
type: Question
has body: I have a question about Self-Defining Function. var scareMe = function(){ console.log("Boo!"); var instance = this; scareMe = function(){ console.log("Double Boo!"); return instance; } } scareMe.prototype.nothing = true; var un1 = new scareMe(); console.log(un1.nothing); //true scareMe.prototype.everything = true; var un2 = new scareMe(); console.log(un1 === un2); //true It works as I expected. console.log(un2.everything); //undefined Where can I get the 'everything' property?
tagged with: javascript
score: 0
has title: Where is the property in self-defining function?
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46946206
has answer: http://stackoverflow.com/a/29383722
type: UnansweredQuestion
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/29475258
tagged with: javascript
has comment: http://stackoverflow.com/comment/47111703
has body: first of all I would like to state that I am completly new to the world of web design and I am building my basics right now . So I have looked for methods of making a webpage repsonsive (make it zoom in and out without loosing content , and workig on different screen resolutions) and i have chosen the Restive.js method. I have stated the right (in my opinion) directories for the jQuery , the restive.js and my own CSS but when i zoom in on the page i have implemented the Restive it doesnt do anything. I am guessing the issue is that I have used mostly PIXELS to define sizes of objects and selectors. Is that the issue with the Restive not working or is there something else i am doing wrong ? Here is the code for the statement of the external files and the code for the js itself: &lt;link rel="stylesheet" href="thezonesh.css" /&gt; &lt;script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js\restive\restive.min.js"&gt;&lt;/script&gt; and the JS &lt;script&gt; $(document).ready(function () { $('body').restive({ breakpoints: ['240', '320', '480', '640', '960', '1024', '1280'], classes: ['css-240', 'css-320', 'css-480', 'css-640', 'css-960', 'css-1024', 'css-1280'] }); }); &lt;/script&gt;
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/47111558
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47111617
has title: Can I make a pixel based webpage responsive?
answer count: 0
tagged with: pixel
score: 1
upvote count: 1
type: Question
tagged with: responsive-design
has comment: http://stackoverflow.com/comment/47112303

http://stackoverflow.com/q/29444455
has title: mean of .on( events [, selector ] [, data ], handler )
favorite count: 0
has comment: http://stackoverflow.com/comment/47056457
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47056499
has comment: http://stackoverflow.com/comment/47056366
has body: I was reading jquery on method and the method signature is .on( events [, selector ] [, data ], handler ) so this means basically it accepts 4 arguments I didnt understand what is meant by events [(why opened square bracket) similarily here selector ] [ and here data ]
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47056491
has answer: http://stackoverflow.com/a/29444470
tagged with: javascript
linked to: http://stackoverflow.com/q/16744652
linked to: http://stackoverflow.com/q/29266604
score: 0
has comment: http://stackoverflow.com/comment/47056424
duplicate of: http://stackoverflow.com/q/16744652
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/47056539

http://stackoverflow.com/a/29518781
has comment: http://stackoverflow.com/comment/47193181
downvote count: 0
score: 1
upvote count: 1
has body: Within a jQuery event handler the this keyword will refer to the element which raised the event. As such, you can use either this.id or $(this).prop('id');. Note however that the former is by far the better practice.
type: Answer
answers question: http://stackoverflow.com/q/29518762

http://stackoverflow.com/comment/46944495
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29380248
has text: Thanks. Sounds reasonable. Is there a "Flux" way of doing so? Is there a best practice/tutorial showing this way? And one question: When you say "dispatch init action from within root component" - I do not understand why this should be a dispatch, rather than a simple init method of this module. Thanks again!

http://stackoverflow.com/q/29385479
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/29503613
favorite count: 0
type: Question
tagged with: facebook
has title: Change the new facebook page plugin width
has body: The new facebook page plugin has the minimum width at 280px (inserted by a data-width:280px). However when I inspect the element created by the script with firebug i see an element with id="u_0_0" with the width at 280 but i can modify it from console to be as i need (227px). I've tried to modify it with a little script made with jquery (i can only work with jquery 1.2...an old version of it...) but it doesent seams to work since the element is inserted dinamicaly into the DOM. I also tried an method finded by google but also it doesn't work: jQuery(document).ready(function(){ jQuery('#u_0_0').live('DOMNodeInserted', function(){ alert(jQuery('#u_0_0').html()); }); }); The above method doesn't work and if i dont use live it alerts me with undefined... So, how can i get the element so i can modify it's css ? Maybe jquery 1.2.1 is too old but maybe i can get and modify it with clasic javascript...
possible better answer: http://stackoverflow.com/a/29388702
upvote count: 2
has answer: http://stackoverflow.com/a/29388702
answer count: 2
accepted answer: http://stackoverflow.com/a/29503613
tagged with: javascript
type: AnsweredQuestion
score: 2

http://stackoverflow.com/a/29505679
has body: Try the following code: var table = document.getElementById('blueteam'); table.innerHTML = ""; //Clears table for (var i = 0; i &lt; firstnames.length; i += 1) { if(explevel[i] &gt;= 1 &amp;&amp; explevel[i] &lt;= 3){ var row = table.insertRow(0); var cell = row.insertCell(0); cell.innerHTML = firstnames[i] + " " + lastnames[i] + " Exp:" + explevel[i]; } } }; You were calling if explevel &lt; 4 but since explevel is a list (explevel[i]), you cannot do that. Instead, check each iteration of explevel.
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29505642
score: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29505642

http://stackoverflow.com/q/29421018
has answer: http://stackoverflow.com/a/29421248
score: 2
has title: Pass javascript variable value to .php using a html form
upvote count: 3
tagged with: forms
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47013875
has comment: http://stackoverflow.com/comment/47017023
tagged with: javascript
tagged with: post
answer count: 2
has comment: http://stackoverflow.com/comment/47017051
has comment: http://stackoverflow.com/comment/47017373
has answer: http://stackoverflow.com/a/29427007
favorite count: 0
has comment: http://stackoverflow.com/comment/47013921
has comment: http://stackoverflow.com/comment/47013807
type: UnansweredQuestion
has body: I have a html form, a variable and a .php script. I would like to pass the value of this variable to the .php script using a html form, it has to be the variables value, so lets say it is 1 then it passes the value 1, but then if the value of the variable changes to 2 then the value the form passes should be 2. Currently when passing the variable, it just passes the name of it. html: &lt;form id="get-form" action="getAmount.php" method="POST" name="get-form"&gt; &lt;input type="text" name="amount" id="amount" /&gt; &lt;input type="hidden" id="testVar" name="testVar" value="testVar"/&gt; &lt;input type="image" src="butImg.png" id="Button" value="pay" alt="but"/&gt; &lt;/form&gt; &lt;script type="text/javascript"&gt; var testVar= 1; document.getElementById("testVar").value = testVar; &lt;/script&gt; php: $testVar= $_POST['testVar'];
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/comment/54935018
score: 1
comment on: http://stackoverflow.com/a/29504008
has text: like you would do with every other Ember "objects", it means you'd use `mapaLat: "your value, as simple as that"` without wrapping in a `DS.attr()`
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47067083
has text: You cannot use the ctrl+U option. You need to use the "Save page as..." (ctrl+S)
comment on: http://stackoverflow.com/q/29449068
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29483877
has comment: http://stackoverflow.com/comment/47128489
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/65396786
tagged with: c#
answer count: 2
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/65396786
tagged with: ajax
has answer: http://stackoverflow.com/a/29555219
has body: I use the Ajax Update Panel in Visual Studio to handle post backs for my search function on the site. (IE searching for a member) Will generate a gridview with the results. Every time I get the newest version from TFS, it throws this error: unhandled exception at line 1, column 132567 in http://localhost:58921/bundles/MsAjaxJs? JavaScript runtime error: Unable to get the property 'PRM_MissingPanel' of undefined or null reference After it breaks, I can debug again and it won't break until I get a newer version. I have done a lot of Googling and I can't find what PRM_MissingPanel is. Any ideas on why this is happening? MsAjaxBundle comes from ScriptManager, which was generated when I created my Web App: &lt;asp:ScriptManager runat="server"&gt; &lt;Scripts&gt; &lt;asp:ScriptReference Name="MsAjaxBundle" /&gt; &lt;asp:ScriptReference Name="jquery" /&gt; &lt;asp:ScriptReference Name="bootstrap" /&gt; &lt;asp:ScriptReference Name="respond" /&gt; &lt;asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" /&gt; &lt;asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" /&gt; &lt;asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" /&gt; &lt;asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" /&gt; &lt;asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" /&gt; &lt;asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" /&gt; &lt;asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" /&gt; &lt;asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" /&gt; &lt;asp:ScriptReference Name="WebFormsBundle" /&gt; &lt;/Scripts&gt; &lt;/asp:ScriptManager&gt;
tagged with: updatepanel
tagged with: asp.net
favorite count: 0
has title: Ajax Update Panel Random Error 'PRM_MissingPanel'
accepted answer: http://stackoverflow.com/a/29555219
has comment: http://stackoverflow.com/comment/47128101
type: AnsweredQuestion
score: 3

http://stackoverflow.com/a/29490037
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/47140484
score: 1
has comment: http://stackoverflow.com/comment/47140780
has comment: http://stackoverflow.com/comment/47150153
answers question: http://stackoverflow.com/q/29487039
has comment: http://stackoverflow.com/comment/47144643
downvote count: 0
has comment: http://stackoverflow.com/comment/47141408
has body: Is there a solution where I can directly replace &amp; into &amp; for example without the need to call the replacement template for each special character I expect to exist? Why don't you simply disable the escaping when outputting the text? For example, given an input of: &lt;content&gt;Lor&amp;amp;eacute;m ipsum &amp;amp;lsquo;dolor&amp;amp;lsquo; sit am&amp;amp;egrave;t, consectetuer adipiscing elit.&lt;/content&gt; you can have your stylesheet process this as: &lt;p&gt; &lt;xsl:value-of select="content" disable-output-escaping="yes"/&gt; &lt;/p&gt; and return: &lt;p&gt;Lor&amp;eacute;m ipsum &amp;lsquo;dolor&amp;lsquo; sit am&amp;egrave;t, consectetuer adipiscing elit.&lt;/p&gt; which a browser should render as:

http://stackoverflow.com/comment/47108354
comment on: http://stackoverflow.com/q/29472202
score: 0
type: QuestionComment
type: Comment
has text: @M.Doyle im still not getting the text responses in my div to say success or error, the console log errors have now been resolved

http://stackoverflow.com/comment/47059850
comment on: http://stackoverflow.com/q/29446528
type: Comment
type: QuestionComment
has text: *"and I wrote code like this"* What's `newArray`?
score: 0

http://stackoverflow.com/comment/47698572
has text: No. also when the iframe is in focus, I want being able to catch the mouse events in his parent
type: AnswerComment
comment on: http://stackoverflow.com/a/29784153
score: 0
type: Comment

http://stackoverflow.com/q/29447076
accepted answer: http://stackoverflow.com/a/29447319
type: Question
has title: How to move checkmark through the cheboxlist?
tagged with: javascript
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/29447160
favorite count: 0
has answer: http://stackoverflow.com/a/29447160
has answer: http://stackoverflow.com/a/29447319
tagged with: checkbox
type: AnsweredQuestion
score: 1
upvote count: 1
has body: So i have checkboxlist &lt;input type="checkbox" name="colorc" value="black" /&gt;Black&lt;br/&gt;&lt;br&gt; &lt;input type="checkbox" name="colorc" value="brown" /&gt;Brown&lt;br/&gt;&lt;br&gt; &lt;input type="checkbox" name="colorc" value="white" /&gt;White&lt;br/&gt;&lt;br&gt; &lt;input type="button" id="btnClick" value="Color Change"&gt;&lt;/button&gt; and when i press button, checkmark moves to next checkbox, the same i want if we have two checkmarks, but without using JQuery, clear JS. Thanks

http://stackoverflow.com/comment/46996875
has text: Great. Got that. I'll get back to you guys after trying it. Thanks for your time.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29411776
type: Comment

http://stackoverflow.com/q/29468491
upvote count: 2
has answer: http://stackoverflow.com/a/29468704
tagged with: node.js
tagged with: reactive-programming
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29468704
has body: I'm using Rx.js to stream my results from an AJAX call to multiple units. But I have encountered issue when there is more than on observer subscribing to MapObserver. When the first subscriber will always get the correct data but the rest will get undefined. this.observable = new Rx.Subject(); observeMap = this.observable .map(createMarker.bind(this)); var s1 = observeMap.subscribe(console.log.bind(console, 1)); var s2 = observeMap.subscribe(console.log.bind(console, 2)); Please advice, Thanks!
type: Question
has title: Rx.js, Subscribe is called with undefined
has comment: http://stackoverflow.com/comment/47173698
tagged with: javascript
score: 2
has comment: http://stackoverflow.com/comment/47129461
downvote count: 0
answer count: 1
tagged with: rxjs
favorite count: 0

http://stackoverflow.com/a/29388332
downvote count: 0
type: Answer
has body: check DEMO var counter = 0; $(".itemMasTxt").hover(function () { if(innterText !== $(this)[0].innerText){ counter = 0; } if(counter == 0){ innerHeight = $(this).innerHeight(); innerHeightAdd = $(this).innerHeight() + addHeight; innterText = $(this)[0].innerText; } counter++; $(this).stop().animate({ height:(innerHeight + addHeight) }, 200); }, function () { $(this).stop().animate({ height:(innerHeightAdd - addHeight) }, 200); });
answers question: http://stackoverflow.com/q/29388065
score: 3
upvote count: 3

http://stackoverflow.com/q/29423626
has comment: http://stackoverflow.com/comment/47019320
tagged with: meteor
tagged with: asynchronous
tagged with: node.js
has comment: http://stackoverflow.com/comment/47024250
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47039137
type: Question
has title: How can I trigger multiple asynchronous calls that utilize a third party node module within Meteor js
has body: I am working on an admin UI using Meteor js (my first Meteor project) and have a bit of a situation. I've got a js class, which uses an asynchronous call from a 3rd party module, then uses the results of that call to trigger multiple calls to another 3rd party api. Since the second "round" of calls might be 10-20 calls, I'd like to run them in parallel, collect the results, then return them to meteor. Problem is, Meteor keeps crashing with exit code 8 whenever the "second" round of calls are triggered. Here's a rough flow (outline) of what's happening: Meteor calls an Async wrapped method to in the class I wrote. Internal to class I wrote, a third party API is called (rest API) and results are gotten in a callback (in the class). In that callback, I iterate the results of API 1, and create separate instances of objects of API 2, one to make each request. As soon as (or soon after) triggering the first call to API 2, Meteor crashes with exit code 8. The console flashes a message, quickly, sometimes, but I can't read it (and can't find where meteor saves crash logs). Any thoughts, welcome. Ultimately, I may pull all this code out of meteor, and behind a node rest api of my own, but I'd like to be able to develop/test it as a class used by Meteor directly.
tagged with: javascript
score: 0
tagged with: rest

http://stackoverflow.com/q/29413222
favorite count: 0
has answer: http://stackoverflow.com/a/64791846
has comment: http://stackoverflow.com/comment/102422141
has comment: http://stackoverflow.com/comment/47002181
linked to: http://stackoverflow.com/q/154724
possible better answer: http://stackoverflow.com/a/29413402
type: Question
has comment: http://stackoverflow.com/comment/50561993
has comment: http://stackoverflow.com/comment/46999487
has comment: http://stackoverflow.com/comment/102404725
has comment: http://stackoverflow.com/comment/50598131
has comment: http://stackoverflow.com/comment/102435138
has comment: http://stackoverflow.com/comment/53173287
has title: What are the actual uses of ES6 WeakMap?
downvote count: 3
has comment: http://stackoverflow.com/comment/46999966
has comment: http://stackoverflow.com/comment/55512883
has answer: http://stackoverflow.com/a/29416340
accepted answer: http://stackoverflow.com/a/29416340
has comment: http://stackoverflow.com/comment/51049600
has answer: http://stackoverflow.com/a/77644537
has answer: http://stackoverflow.com/a/46263541
answer count: 9
score: 544
upvote count: 547
tagged with: javascript
tagged with: weakmap
has comment: http://stackoverflow.com/comment/51073041
has answer: http://stackoverflow.com/a/40241741
has comment: http://stackoverflow.com/comment/66398548
tagged with: ecmascript-6
has body: What are the actual uses of the WeakMap data structure introduced in ECMAScript 6? Since a key of a weak map creates a strong reference to its corresponding value, ensuring that a value which has been inserted into a weak map will never disappear as long as its key is still alive, it can't be used for memo tables, caches or anything else that you would normally use weak references, maps with weak values, etc. for. It seems to me that this: weakmap.set(key, value); ...is just a roundabout way of saying this: key.value = value; What concrete use cases am I missing?
has answer: http://stackoverflow.com/a/60523759
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/69837960
has comment: http://stackoverflow.com/comment/50575154
has answer: http://stackoverflow.com/a/29413402
has comment: http://stackoverflow.com/comment/109730630
has comment: http://stackoverflow.com/comment/47005824
has answer: http://stackoverflow.com/a/45537392

http://stackoverflow.com/a/29521631
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29502494
answers question: http://stackoverflow.com/q/29502494
type: Answer
has body: I finally figured it out in my index.asp I have: User Name: Password: Note the two form tags that are outside of the "Modal-Menu" div. What it needs to look like is this: where the form tags are wrapped inside of the "Modal-Menu" div... Idiocy 1 Hexobolic 0...
score: 0

http://stackoverflow.com/q/29417989
score: 2
has comment: http://stackoverflow.com/comment/47008198
downvote count: 0
tagged with: javascript
has body: I have an array $scope.something = ['xyz','abc','pqr']; On click, I want to filter the ng-repeat data so that it will return the resulting JSON data filtered with 'xyz', 'pqr', and 'abc'. ng-repeat="data in flt_det | filter:something". Thanks in advance.
accepted answer: http://stackoverflow.com/a/29418263
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs-ng-repeat
tagged with: angularjs
upvote count: 2
has title: angularjs ng-repeat filter based on array values on click
has comment: http://stackoverflow.com/comment/47008465
linked to: http://stackoverflow.com/q/14882370
has answer: http://stackoverflow.com/a/29418263
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29418509
type: Question
has answer: http://stackoverflow.com/a/29418509
answer count: 2

http://stackoverflow.com/q/29475295
score: 7
has answer: http://stackoverflow.com/a/29475373
type: Question
accepted answer: http://stackoverflow.com/a/29475483
answer count: 2
linked to: http://stackoverflow.com/q/23508221
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: selector
favorite count: 0
duplicate of: http://stackoverflow.com/q/23508221
tagged with: events
linked to: http://stackoverflow.com/q/6801070
has answer: http://stackoverflow.com/a/29475483
has title: JavaScript equivalent for jQuery .on() with additional selector
has body: Here is JSFiddle exapmle: https://jsfiddle.net/1a6j4es1/1/ $('table').on('click', 'td', function() { $(this).css('background', 'green'); }); How can this code be rewritten in plain JavaScript? Callback function should work even for new td elements inside the table element. Update: I found out a very short and clean solution: https://jsfiddle.net/1a6j4es1/28/ function delegateSelector(selector, event, childSelector, handler) { var is = function(el, selector) { return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector); }; var elements = document.querySelectorAll(selector); [].forEach.call(elements, function(el, i){ el.addEventListener(event, function(e) { if (is(e.target, childSelector)) { handler(e); } }); }); } delegateSelector('table', "click", 'td', function(e) { e.target.style.backgroundColor = 'green'; });
upvote count: 7
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29475373

http://stackoverflow.com/a/30121849
downvote count: 0
has body: add framework: 'jasmine2' to your conf.js file . more info here #1978
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29497906
type: Answer

http://stackoverflow.com/q/29463647
tagged with: javascript
score: 0
has body: I am building an app in Titanium using Alloy. I am trying to open a new controller on a button click, but no matter what is in that controller, it stays for a couple of milliseconds and then closes and goes back to the previous screen? Code js of current screen: $.easy.addEventListener('click', function() { openLevel("easy"); }); $.medium.addEventListener('click', function() { openLevel("medium"); }); $.hard.addEventListener('click', function() { openLevel("hard"); }); function openLevel(difficulty) { var levels = Alloy.createController('choose', {difficulty : difficulty}).getView(); levels.open(); } The xml code of the current screen: Patternz Easy Medium Hard The xml of the new screen: There was more content in here, but after removing that to see what the issue was, the issue remained. I cannot open another screen, no matter what the name of the controller, the styling, the xml content, anything. What could be happening?
tagged with: http://stackoverflow.com/tag/xml
tagged with: appcelerator
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47128090
tagged with: titanium
tagged with: titanium-alloy
has title: Titanium Alloy Controller wont stay open
has comment: http://stackoverflow.com/comment/47121656
has comment: http://stackoverflow.com/comment/47092089
has comment: http://stackoverflow.com/comment/47111972
has comment: http://stackoverflow.com/comment/47095574
type: Question

http://stackoverflow.com/comment/47089676
type: AnswerComment
comment on: http://stackoverflow.com/a/29461587
type: Comment
has text: Hmm not working for me. I edited my main post and posted the whole block straight from chromes inspect element console. Not sure if it changes anything from your answer or not or if I'm missing something in Tampermonkey.
score: 0

http://stackoverflow.com/a/29418470
has comment: http://stackoverflow.com/comment/47009472
answers question: http://stackoverflow.com/q/29417959
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47009647
has body: Don't use interactive mode to open pages. Something prevents PhantomJS from opening pages, so the callback is never called. If you wait a little and try to access page.content it still shows the about:blank content. This is because REPL mode is broken. Previous answer in case this is used as a script and not in interactive mode: I believe this is a flush problem. Add a second console.log() to see if the first one appears. Also, it is always a good idea to close the script at which point the output will be flushed: page.open('http://net.tutsplus.com', function(s){ console.log(s); phantom.exit(); }); I could reproduce this issue on Raspbian with PhantomJS 2.0.1-dev once. All other invocations had no problem anymore.
type: Answer
has comment: http://stackoverflow.com/comment/47028773
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29417959

http://stackoverflow.com/comment/46945843
has text: @Nicksen782 ops, my bad on the translate. This works with lines, but for fillRect it's better not to use it. Added live demo - seems sharp now.
type: AnswerComment
comment on: http://stackoverflow.com/a/29383400
score: 0
type: Comment

http://stackoverflow.com/a/29448925
has comment: http://stackoverflow.com/comment/47064069
has comment: http://stackoverflow.com/comment/47064506
has comment: http://stackoverflow.com/comment/47064138
type: Answer
has comment: http://stackoverflow.com/comment/47064377
has comment: http://stackoverflow.com/comment/47064140
has comment: http://stackoverflow.com/comment/47064513
has comment: http://stackoverflow.com/comment/47064171
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/29448880
has comment: http://stackoverflow.com/comment/47064756
has comment: http://stackoverflow.com/comment/47064124
has body: Are you perhaps looking for nextElementSibling? var secLi = document.getElementById('secLi'); secLi.nextSibling; // Is a text node. secLi.nextElementSibling; // Is the &lt;li&gt; you're looking for, so.. secLi.nextElementSibling.textContent; // Gives you "item3" Update To better understand why you want nextElementSibling instead of nextSibling look at what the parent &lt;ul&gt; says its childNodes are: secLi.parentElement.childNodes; // [#text, &lt;li&gt;, #text, &lt;li&gt;, #text, &lt;li&gt;, #text, &lt;li&gt;, #text] You don't want the nextSibling because it's just the empty text between list items. You want the next element (list item). See https://developer.mozilla.org/en-US/docs/Web/API/NonDocumentTypeChildNode/nextElementSibling
has comment: http://stackoverflow.com/comment/47064437
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47064306
accepted answer of: http://stackoverflow.com/q/29448880
has comment: http://stackoverflow.com/comment/47064126

http://stackoverflow.com/q/29398826
has title: Getting data in an API from a Stored Procedure in javascript
score: 0
tagged with: azure
tagged with: sql
has answer: http://stackoverflow.com/a/29399130
type: AnsweredQuestion
tagged with: stored-procedures
has body: So the title may not be the most helpful.. but I am using Microsoft Azure to call a stored procedure mssql.query("EXEC allInfo ?", [meetingID], { success: function(results1) { console.log(results1); var endOutput2 = request.body.meetingName; response.send(statusCodes.OK, endOutput2 ); }, error: function(err) { console.log("error is: " + err); response.send(statusCodes.OK, { message : err }); } }); I know the line var endOutput2 = request.body.meetingName; is not correct. I am trying to get the result from executing the stored procedure allInfo. How can I get the data so I can parse it and use it later in the project. The stored procedure is below. BEGIN SELECT * FROM ScheduleMe.main_Meeting WHERE meetingID = @meetingID; SELECT * FROM ScheduleMe.date_Time WHERE meetingID = @meetingID; END I can get it to output like this(below) but I cannot then just grab meetingName or other variables. [{"meetingID":"899c-64b7-fa94","meetingName":"Test 1","meetingDescription":"test","meetingLength":30,"meetingNotes":null,"hostUserID":"someone@hotmail.com"}]
type: Question
answer count: 1
accepted answer: http://stackoverflow.com/a/29399130
tagged with: javascript

http://stackoverflow.com/q/29404282
has answer: http://stackoverflow.com/a/29404751
tagged with: javascript
has answer: http://stackoverflow.com/a/29404599
accepted answer: http://stackoverflow.com/a/29404599
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
downvote count: 0
possible better answer: http://stackoverflow.com/a/29404751
has comment: http://stackoverflow.com/comment/46983878
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/46983776
has title: Call javascript function into a link when it is printed
type: Question
answer count: 2
has body: I'm making a little application with intel xdk I have already passed id values from one page to another. My problem is when I print some links in html I can't pass value from the other page. I'm trying by this way: I have passed id value from one page to another but in this case I need to pass from a printed link. Is it possible or there is another way. Thanks! Also I don't know if there is another way to call a function that receives parameters when the link is printed. More information. Into my head tag: Document And in my body tag: Right link In the first link the function is called and I get redirected to the other page, but in the printed link is doesn't work.

http://stackoverflow.com/comment/47115660
type: Comment
has text: I did added this to submit.php
comment on: http://stackoverflow.com/a/29475686
type: AnswerComment
score: 0

http://stackoverflow.com/q/29502799
has comment: http://stackoverflow.com/comment/47163708
score: 1
has answer: http://stackoverflow.com/a/29503170
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/47164084
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29503170
has comment: http://stackoverflow.com/comment/47163844
answer count: 1
has comment: http://stackoverflow.com/comment/47164020
has body: I am trying to implement a shortened url feature in my web application.So I am using google shorten url api in angularjs using ajax but I am not getting anything in response.` $http.post('https://www.googleapis.com/urlshortener/v1/url?key=#key','http://uihacker.blogspot.ca/2013/04/javascript-use-googl-link-shortener.html').success(function(data,status,headers,config){ $scope.shortUrl=data.id; }). error(function(data,status,headers,config){ }); `
has comment: http://stackoverflow.com/comment/47163901
has comment: http://stackoverflow.com/comment/47164209
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47163986
upvote count: 1
has title: Implement a shorten url feature in angularjs
has comment: http://stackoverflow.com/comment/47163980
type: AnsweredQuestion

http://stackoverflow.com/comment/47073894
type: Comment
type: QuestionComment
score: 2
has text: you never bothered checking if you're ALREADY on the proper site, so if someone comes in as (say) Android, they redirect to mobile. mobile checks if they're on mobile, and hey! they are, so redirect to mobile... you need `If (mobile && (not already on mobile site))`
comment on: http://stackoverflow.com/q/29454339

http://stackoverflow.com/comment/47098582
comment on: http://stackoverflow.com/a/29468199
type: Comment
score: 0
type: AnswerComment
has text: `<=` in while loop required. Try your code by searching for 11.

http://stackoverflow.com/comment/47170153
type: Comment
has text: @thednp:- Thats why I added in my answer, if you dont mind readabiliyt then you can go with any of the option. It will have very minimal or rather no impact as far as the performance is concerned.
score: 0
comment on: http://stackoverflow.com/a/29506664
type: AnswerComment

http://stackoverflow.com/a/29485668
has comment: http://stackoverflow.com/comment/47145694
has comment: http://stackoverflow.com/comment/47146924
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47146178
has comment: http://stackoverflow.com/comment/47147141
type: Answer
accepted answer of: http://stackoverflow.com/q/29481125
has body: The key to the answer is in the wording of your own question: Can you please check if the factory has been set up correctly to return a promise You need to return it. Right now your getMonitors function (if I remove all the code irrelevant to the question) is as follows: getMonitors: function(){ $http({}) .success(function(data){ // convert data to monitors return monitors; }); } This is a function call that doesn't return anything, or rather, returns undefined. There is no "magic" with promises - it's just as any other object - you need to return it to the caller. So, two things you need to do: 1) Change from .success to .then. .then generates a new chained promise that delivers, when returned, the monitors to the consumer (that you are returning in the .then handler). On the other hand, .success returns the original promise (generated by $http) and data returning from .success is lost. 2) Actually return the $http call (or, rather, $http().then() call) Here's conceptually how this would look like: app.factory('ZMService', function ZMServiceFactory($http){ return { // getMonitors function of the ZMService service getMonitors: function(){ return $http({}) .then(function(response){ var data = response.data; // convert data to monitors return monitors; }); } }; }); (also, noticed how I renamed your service from ZMFactory to ZMService. A "factory" in the name is a misnomer. The factory is the function that generates the instance - hence "the factory" - but the instance itself is an object, which is called a "service" in Angular)
has comment: http://stackoverflow.com/comment/47147014
upvote count: 1
answers question: http://stackoverflow.com/q/29481125
has comment: http://stackoverflow.com/comment/47148158
has comment: http://stackoverflow.com/comment/47147305
score: 1
has comment: http://stackoverflow.com/comment/47145833

http://stackoverflow.com/comment/47195244
type: Comment
has text: Right, now I see it. You're passing nested children into `update`, which will only patch on the top-level and essentially call `set` on each property in the update (see the documentation for a better explanation than I could possibly write up: https://www.firebase.com/docs/web/api/firebase/update.html). If you want to also apply the update/patch logic to descendants, you can write your application code to handle that. So first update the top-level: `ref.update({ time: Date.now() });` and then update the child: `ref.child('skills').update({ "back-end": { "js": "firebase" } });`
score: 0
comment on: http://stackoverflow.com/q/29429529
type: QuestionComment

http://stackoverflow.com/q/29463798
type: UnansweredQuestion
has title: how to password protect a single page (that's not apart of an authentication system)?
has answer: http://stackoverflow.com/a/29463919
tagged with: authentication
has body: I'm building a Meteor app for contracts. A signed in user can create a contract. But I'd like for them to be able to send a contract to another party, who can view the contract without signing up or creating an account. The problem is that, even if the URL is long and random, www.example.com/docs/bM7GjrRq1wABYdxws3 -- I'm not sure it is private enough -- because maybe all these contracts could be easily crawled or end up in search like this. I'd like the creator of the contract to set a password that can be emailed to the other party along with the link to the contract. Before the party can view the contract, they need to enter the password. My solution is to allow a user to password protect the page (but without a username/email). But I'm not sure how to do it. How can I password protect a page with a password set by a user?
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: meteor
tagged with: password-protection

http://stackoverflow.com/a/29381818
has body: You are missing a conceptual difference between classes and IDs. Classes are not unique, so you will not be able to retrieve a single element when querying for a class. You can surely get a list with a single element, but it will still be a list because you can possibly have more than one element with the same class. On the other hand, IDs are unique, and this is why you can select a direct element by using a method to get it by its ID. The correct JavaScript method for retrieving objects by their class is getElementsByClassName (note that by the s it will return a list of elements, and not a single result as you probably expected). You have to parse the returned list to get the element(s) you want. Just to illustrate, you can toggle the display attribute of the first returned element by doing: var displayedTexts = document.getElementsByClassName("displayText"); displayedTexts[0].style.display = "none"; You can see a JS Fiddle with a simple example here.
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29381115
answers question: http://stackoverflow.com/q/29381115
type: AcceptedAnswer

http://stackoverflow.com/q/29456433
score: 1
possible better answer: http://stackoverflow.com/a/29456612
has comment: http://stackoverflow.com/comment/47077498
has comment: http://stackoverflow.com/comment/47077660
has comment: http://stackoverflow.com/comment/47077374
has comment: http://stackoverflow.com/comment/47077394
answer count: 2
has comment: http://stackoverflow.com/comment/47077640
downvote count: 0
has answer: http://stackoverflow.com/a/29456665
tagged with: javascript
favorite count: 0
has body: I have homework from university, classic 15 puzzle. I have problem with those two styles. Here is the code that i have problem function siirra_pala(pala) { var palaRivi = parseInt(pala.style.top) / palanKoko; var palaSarake = parseInt(pala.style.left) / palanKoko; } Error code is "Uncaught TypeError: Cannot read property 'top' of undefined" and "Uncaught TypeError: Cannot read property 'left' of undefined". If it helps: siirra_pala(pala) is move_tile(tile) palaRivi is tileRow and palaSarake is tileColumn palanKoko is tileSize. I have palanKoko set to 100. And style is defined in: function muodosta_palat(pelialue) { for (var y = 0; y &lt; 4; y++) { for (var x = 0; x &lt; 4; x++) { if (!(x === tyhja_paikka.x &amp;&amp; y === tyhja_paikka.y)) { var pala = document.createElement('div'); pala.id = 'pala' + x + y; pala.textContent = 4 * y + x + 1; pala.style.left = x * palanKoko + 'px'; pala.style.top = y * palanKoko + 'px'; pala.className = 'pala'; pelialue.appendChild(pala); } } } If you need more code, please tell which one. Thank You @Bergi: window.onload = function () { muodosta_palat(document.getElementById('pelialue')); var palat = document.querySelectorAll(".pala"); document.getElementById('sekoitusnappi').onclick = sekoita; for (var i = 0; i &lt; palat.length; i++) { palat[i].addEventListener("click", siirra_pala); palat[i].addEventListener("mouseover", mouseOver); palat[i].addEventListener("mouseout", mouseOut); } };
has title: undefined style
has comment: http://stackoverflow.com/comment/47077405
accepted answer: http://stackoverflow.com/a/29456665
upvote count: 1
has answer: http://stackoverflow.com/a/29456612
type: Question
has comment: http://stackoverflow.com/comment/47077606
type: AnsweredQuestion

http://stackoverflow.com/q/29483662
has answer: http://stackoverflow.com/a/29484736
downvote count: 1
type: AnsweredQuestion
has title: Run pdftk in JSP
score: 1
type: Question
upvote count: 2
tagged with: arrays
answer count: 1
tagged with: jsp
tagged with: javascript
favorite count: 0
has body: I have array value that store pdf filename in jsp page print.jsp I want to merge the pdf before it can be print. Here my code: &lt;% try { String[] ids=request.getParameterValues("list"); for (String id:ids) { System.out.print(id); } //Runtime.getRuntime().exec("pdftk" +id+ "cat output output.pdf"); } catch(Exception e) { System.out.println("fail"); } %&gt; How do I write array value to fill up the pdftk command. Please help me.
tagged with: pdftk
accepted answer: http://stackoverflow.com/a/29484736

http://stackoverflow.com/q/29382760
answer count: 1
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29382855
has body: I'm using canPlayType() to determine if a browser can play a specific video format before I load it into the video tag, but when I test it, it returns "maybe" for all video formats. My code is below. Am I missing something? canItPlay1 = document.getElementById('intro_video').canPlayType('video/webm'); canItPlay2 = document.getElementById('intro_video').canPlayType('video/ogg'); canItPlay3 = document.getElementById('intro_video').canPlayType('video/mp4'); alert("Can play type? "+canItPlay1+canItPlay2+canItPlay3);
type: Question
tagged with: video
has title: canPlayType always returning maybe? Am I missing something?
score: 0
accepted answer: http://stackoverflow.com/a/29382855

http://stackoverflow.com/q/29422389
type: UnansweredQuestion
upvote count: 3
type: Question
tagged with: internet-explorer-9
tagged with: javascript
score: 3
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
tagged with: rest
has body: The initial POST rest/user/session request works in Firefox, Chrome, and Safari, but when using Internet Explorer 9 it always returns some sort of error.. When the dataType is set to "json", IE9 gets back a 'no transport' error with a status of 0. When the dataType is set to "jsonp", IE9 gets back an error object with a success XHR status 200 with a parseError. ... $.ajax({ url: BASE_PATH + url, beforeSend: function (request) { request.setRequestHeader("X-DREAMFACTORY-APPLICATION-NAME", APP_NAME); request.setRequestHeader("X-DREAMFACTORY-SESSION-TOKEN", sessionStorage.SESSION_TOKEN); request.setRequestHeader("Content-Type","application/json"); request.setRequestHeader("Accept","application/json"); }, method: method, contentType: "application/json; charset=utf-8", dataType: "jsonp", processData : processData, data: newdata, cache: false, success: function(response){ console.log(arguments); $.jStorage.set("unique_session_id",response.session_id); sessionStorage.SESSION_TOKEN = response.session_id; runApp(); }, error: function(response){ console.log(arguments); } });
has title: DreamFactory REST API POST rest/user/session request always returns error in IE9
has answer: http://stackoverflow.com/a/30624766

http://stackoverflow.com/comment/47186423
comment on: http://stackoverflow.com/a/29514963
has text: I have gone through $sanitize and $sce and even tried but in vain...I have tried : $sce.trustAsHtml and $sanitize(text) but it is not returning the expected results
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29528279
accepted answer: http://stackoverflow.com/a/29528336
tagged with: php
type: AnsweredQuestion
has title: Ajax POST to PHP - How do I do a reply?
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29528336
tagged with: post
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29528352
tagged with: ajax
has body: I have sent an email address via an ajax post from javascript to php. I have then searched the database in php to find out if this email exists in the database. How can i then send a message back to the javascript/html to say that the value was present? This is what I used to send the request: function postEmail(){ var checkEmail = "someone@gmail.com"; var dataString = 'checkEmail1='+ checkEmail; // AJAX Code To Submit Form. $.ajax({ type: "POST", url: "myfile.php", data: dataString, cache: false, success: function(result){ alert("Sent successfully"); } }); } and then in the PHP: $checkEmail2=$_POST['checkEmail1']; $results = mysql_query("select id from myTable where emailaddress='$checkEmail2' "); $row = mysql_num_rows($results); if ($row &gt; 0 ) { echo "email already exists"; } else { if ($row == 0 ) { echo "email doesnt exist"; } } Not sure if I should do a get request? Or if you return values or something. Thanks. (p.s, Im developing a hybrid app so need to use JSON to send/retrieve from PHP)
possible better answer: http://stackoverflow.com/a/29528352

http://stackoverflow.com/comment/47014826
has text: https://api.jquery.com/on/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29421584

http://stackoverflow.com/a/29413710
has body: I am no expert in Phonegap, but this is how you'd create/populate a table in jQuery for your specific scenario. You may then append the table to an exising element on the page or like I did, to the body (as it's a demo). Adapt this code to suit your needs, such as replace everything between success : function(data) { and }) with my code except the var dat = [....]; var data = [{"CategoryName":"Flash News","DisplayOrder":"0","ENoticeDescription":"","ENoticeId":19619,"NoticeDocument":"","Subject":"Singing competitions will be conducted this Month, interested candidates can come to office room and enroll.","createddate":"12 Jun 2014","noticedate":"6\/12\/2014 12:00:00 AM"},{"CategoryName":"Flash News","DisplayOrder":"0","ENoticeDescription":"","ENoticeId":19623,"NoticeDocument":"","Subject":"Flowers day celebrations will be conducted on 1st Saturday of next Month, Students are instructed to bring 5 different Flowers.","createddate":"12 Jun 2014","noticedate":"6\/12\/2014 12:00:00 AM"},{"CategoryName":"Flash News","DisplayOrder":"0","ENoticeDescription":"","ENoticeId":19624,"NoticeDocument":"","Subject":"Painting competitions for Senior Program will be conducted on 30th of this month.","createddate":"12 Jun 2014","noticedate":"6\/12\/2014 12:00:00 AM"},{"CategoryName":"Flash News","DisplayOrder":"0","ENoticeDescription":"Debate competition for Senior class students will be conducted on 2nd of April month, interested students contact Head of Senior Program Staff.","ENoticeId":19660,"NoticeDocument":"","Subject":"Senior Program - Debate Competition","createddate":"12 Jun 2014","noticedate":"6\/12\/2014 12:00:00 AM"}]; var $table = $('&lt;table width="400" height="288" align="center" style="border:5px solid #10A3D8;"&gt;'); var $trs = $(); $.each(data, function() { var $tr = $("&lt;tr/&gt;").css("background", "#D4D2D2"); var $td = $("&lt;td/&gt;").css("color", "#041DB3").text("Subject:"); $tr.append($td); $td = $("&lt;td/&gt;").css("color", "#041DB3").text(this.Subject); $…
answers question: http://stackoverflow.com/q/29412886
score: 0
type: Answer

http://stackoverflow.com/a/29682166
answers question: http://stackoverflow.com/q/29412478
type: Answer
has body: What you're going to find is that .Click() doesn't return anything. It just clicks on an onscreen object. If you want to log a message when you click on an item, go ahead and do it. There's no fancy logic necessary. But if you want to ensure something happened when you click that button, you need to check the object tree or check for some indication that something happened.
score: 0

http://stackoverflow.com/q/29459619
downvote count: 0
has body: I have two elements inside in the dz-message element in my Dropzone form. One is hidden out of sight (using overflow:hidden) and one is visible. When the form gets the dz-drag-hover class, the second element becomes visible when the dz-message element is moved up using CSS transitions. This is the structure of the insi dropzone element: The best way to create collaborative image collections. No account required. Drop in some images to get started. Or click here to sign in. Drop it like it's hot See the inside the dz-message-hovered and dz-message-empty elements? When the cursor ends up inside their body, it causes dropzone to think that dragend has happened. That means the dz-drag-hover class is removed from the form, and the dz-message element starts to transition back down. I made a video to help demonstrate what I mean: http://quick.as/7OYPiG4Q1 - see how it flickers when the inner elements are dragged over? Is there anything easy I can do, without forking dropzone, to prevent dropzone from thinking that I'm finished dragging?
score: 1
has answer: http://stackoverflow.com/a/29460419
favorite count: 0
tagged with: dropzone.js
type: UnansweredQuestion
tagged with: css
has title: CSS3 transition within dropzone
upvote count: 1
type: Question
tagged with: javascript
answer count: 1

http://stackoverflow.com/a/29519488
has comment: http://stackoverflow.com/comment/47212341
score: 0
answers question: http://stackoverflow.com/q/29506712
has body: This is an undocumented method, so I am not sure it is officially supported by NetSuite. Many of the Field API methods do not work client-side because the nlobjField objects they operate on are supposed to be read-only. Instead of doing this in a Client Script, try a User Event script. Instead of using nlapiSetFieldMandatory, use nlapiGetField('yourfieldid').setMandatory(true) If the field should always be mandatory, instead of a script you can simply customize the form and make your custom form the Preferred one for all roles.
type: Answer

http://stackoverflow.com/q/29439228
has title: How to replace a javascript variable on conditional?
tagged with: javascript
tagged with: variables
favorite count: 0
accepted answer: http://stackoverflow.com/a/29439447
has comment: http://stackoverflow.com/comment/47047631
has comment: http://stackoverflow.com/comment/47047292
upvote count: 1
type: AnsweredQuestion
score: 1
has body: I have a drop down menu of names in HTML: Generic Lastname, Firstname Middle Doe Jr., Jim Smith, Christopher Sam=Chris Wilson, Sue Ann I use a script to parse these names into variables split on commas and spaces. Last name, first name excluding middle names. I'm trying to add the nicknames. Where the variable for the first name is replaced by a nickname ONLY if a nickname is present, but stays the same if the nickname variable is not present. For example, in the above code, Christopher will be replaced by Chris, but every other option will keep their respective first names. I can't figure out how to swap the variable. Also, do I need "=" inside every option? Or can the split function read the variable as null if no "=" is present? I'm not yet familiar with conditionals. Please be patient with me. I tried to put IFs in the code with no luck. Here's the code: var nam=document.forms[0].nam.value; var half_array=nam.split(","); var first_array=half_array[1].split(" "); document.getElementById('firstname').value = first_array[1];
has answer: http://stackoverflow.com/a/29439447
type: Question
tagged with: split
tagged with: arrays
downvote count: 0
answer count: 1

node.js
tags question: http://stackoverflow.com/q/29382899
tags question: http://stackoverflow.com/q/29506814
tags question: http://stackoverflow.com/q/29486358
tags question: http://stackoverflow.com/q/29401840
tags question: http://stackoverflow.com/q/29414582
tags question: http://stackoverflow.com/q/29459184
tags question: http://stackoverflow.com/q/29488449
tags question: http://stackoverflow.com/q/29491635
tags question: http://stackoverflow.com/q/29437838
tags question: http://stackoverflow.com/q/29481333
tags question: http://stackoverflow.com/q/29429639
tags question: http://stackoverflow.com/q/29417560
tags question: http://stackoverflow.com/q/29481085
tags question: http://stackoverflow.com/q/29434991
tags question: http://stackoverflow.com/q/29377519
tags question: http://stackoverflow.com/q/29511404
tags question: http://stackoverflow.com/q/29517414
tags question: http://stackoverflow.com/q/29467971
tags question: http://stackoverflow.com/q/29525530
tags question: http://stackoverflow.com/q/29420977
tags question: http://stackoverflow.com/q/29436791
tags question: http://stackoverflow.com/q/29430542
tags question: http://stackoverflow.com/q/29443791
tags question: http://stackoverflow.com/q/29423886
tags question: http://stackoverflow.com/q/29401989
tags question: http://stackoverflow.com/q/29406371
tags question: http://stackoverflow.com/q/29394424
tags question: http://stackoverflow.com/q/29496847
tags question: http://stackoverflow.com/q/29507745
tags question: http://stackoverflow.com/q/29423626
tags question: http://stackoverflow.com/q/29467987
tags question: http://stackoverflow.com/q/29396843
tags question: http://stackoverflow.com/q/29505620
tags question: http://stackoverflow.com/q/29473247
tags question: http://stackoverflow.com/q/29461972
tags question: http://stackoverflow.com/q/29387939
tags question: http://stackoverflow.com/q/29449777
tags question: http://stackoverflow.com/q/29423229
tags question: http://stackoverflow.com/q/29482645
tags question: http://stackoverflow.com/q/29402788
tags question: http://stackoverflow.com/q/29486551
tags question: http://stackoverflow.com/q/29389616
tags question: http://stackoverflow.com/q/29387950
tags question: http://stackoverflow.com/q/29493514
tags question: http://stackoverflow.com/q/29417241
tags question: http://stackoverflow.com/q/29460197
tags question: http://stackoverflow.com/q/29459891
tags question: http://stackoverflow.com/q/29445740
tags question: http://stackoverflow.com/q/29417485
tags question: http://stackoverflow.com/q/29379138
tags question: http://stackoverflow.com/q/29503657
tags question: http://stackoverflow.com/q/29383464
tags question: http://stackoverflow.com/q/29503640
tags question: http://stackoverflow.com/q/29425070
tags question: http://stackoverflow.com/q/29425746
tags question: http://stackoverflow.com/q/29494126
tags question: http://stackoverflow.com/q/29496515
tags question: http://stackoverflow.com/q/29529969
tags question: http://stackoverflow.com/q/29462510
tags question: http://stackoverflow.com/q/29414215
tags question: http://stackoverflow.com/q/29454881
tags question: http://stackoverflow.com/q/29492052
tags question: http://stackoverflow.com/q/29482254
tags question: http://stackoverflow.com/q/29416606
tags question: http://stackoverflow.com/q/29453105
tags question: http://stackoverflow.com/q/29442889
tags question: http://stackoverflow.com/q/29483592
tags question: http://stackoverflow.com/q/29392856
tags question: http://stackoverflow.com/q/29454799
tags question: http://stackoverflow.com/q/29447755
tags question: http://stackoverflow.com/q/29468984
tags question: http://stackoverflow.com/q/29428500
tags question: http://stackoverflow.com/q/29524416
tags question: http://stackoverflow.com/q/29488287
tags question: http://stackoverflow.com/q/29494231
tags question: http://stackoverflow.com/q/29449349
tags question: http://stackoverflow.com/q/29459636
tags question: http://stackoverflow.com/q/29404104
tags question: http://stackoverflow.com/q/29453724
tags question: http://stackoverflow.com/q/29426130

http://stackoverflow.com/q/29445831
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/47061271
has title: How to store text content of a browser textarea on a local disk
score: 1
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: ckeditor
tagged with: http://stackoverflow.com/tag/html
has body: I need to store edited "textarea" text ( > 1 MB ) temporarily on a local disk to work offline. Later I want to load it again and continue editing, just like a with common desktop apps. I know I can load textfiles easily and add it to an textarea. But how to save it ? I'v red a lot in blogs about this issue and there are some serious workaround proposals like IndexdDB and Web SQL Storage. But which one is working on all major browsers and will be supported in the (near) future ? I did not find any current clear statement yet.
favorite count: 0
has answer: http://stackoverflow.com/a/29451936

http://stackoverflow.com/comment/47043306
score: 0
comment on: http://stackoverflow.com/q/29436999
has text: I think the mistake you made is using jQuery with SVG.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29494359
downvote count: 0
tagged with: meteor
favorite count: 0
type: UnansweredQuestion
tagged with: router
has answer: http://stackoverflow.com/a/29495349
has answer: http://stackoverflow.com/a/29540781
has title: Handling "no data" scenario with Flow Router and Meteor.js
type: Question
has body: I'm wondering how to handle the "no data" scenario with the Meteor's Flow Router. Let's say I want to have a route /article/:slug on which I want to render an Article (fetched by the slug field) along with related comments (separate collection). So I'll define a route like this: FlowRouter.route('/article/:slug', { subscriptions: function(params) { this.register('article', Meteor.subscribe('articleSlug', params.slug)); this.register('comments', Meteor.subscribe('commentsByArticleSlug', params.slug)); }, action: function() { FlowLayout.render('appLayout', { main: "articleDetail" }); } }); In the template I'll display the article details &amp; comments when subs are ready, until then I'll just display a "loading..." text. But what if the :slug param in the URL doesn't match any article in the DB? I don't want to keep displaying the "loading..." text, I want to display some sort of "Article not found" message. How to do this? Thanks for any advice. UPDATE: I'd also like to point to the github discussion related to this question: https://github.com/meteorhacks/flow-router/issues/70
has answer: http://stackoverflow.com/a/29496385
tagged with: javascript
score: 4
upvote count: 4
answer count: 3

http://stackoverflow.com/q/29381496
tagged with: javascript
score: 0
tagged with: jquery
has title: How to extract content from checkbox in javascript?
has answer: http://stackoverflow.com/a/29381892
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2204250
has answer: http://stackoverflow.com/a/29381656
has answer: http://stackoverflow.com/a/29381754
answer count: 4
has answer: http://stackoverflow.com/a/29381688
type: Question
has body: I'm using a function like this to extract a few data from a form: $(document).ready(function() { $('#btnEnviar').click(function() { var email = $('#email').val(); It's working, but now I also need to extract the content of a list box, which is a mark sign. So I put the list box inside a span with id "idaevolta": So far so good, but when I try to extract the data: var idaevolta = $("#idaevolta").html(); It is simply not working. UPDATE WHILE LOOKING AT THE HTML OUPUT, WITH CHROME CONSOLE, LOOK WHAT I FOUND: Does it make things easier to find a solution? UDPATE 2 It is actually a check box.

http://stackoverflow.com/comment/47195793
type: QuestionComment
comment on: http://stackoverflow.com/q/29520259
has text: The flag is a good idea. Without seeing the kinds of tasks you will be executing, it is difficult to suggest a best way. In any case, something like a "pause" for a constantly running game is something that definitely needs to be "baked in" from the outset. Every action, event, task, etc will be subject to the "pause" condition. Some tasks you might want to keep running, eg., if any characters have movement animations or something. Things like play clocks, accruals of energy or the like, you may not have to stop the timers, but use the flag to prevents variables from incrementing.
score: 0
type: Comment

http://stackoverflow.com/comment/47190982
type: Comment
comment on: http://stackoverflow.com/a/29517150
type: AnswerComment
has text: Does this have browser compatibility issues? because it does not seem to work no matter what browser I try - nothing appears
score: 0

http://stackoverflow.com/comment/46965237
score: 0
type: AnswerComment
type: Comment
has text: Tomalak, thank you for the suggestion! Ill give this a try today and let you know if it worked.
comment on: http://stackoverflow.com/a/29394319

http://stackoverflow.com/comment/47120232
type: AnswerComment
type: Comment
has text: what isn't working? Are you getting any errors? Does the plain babel task work?
score: 0
comment on: http://stackoverflow.com/a/29478183

http://stackoverflow.com/comment/46978497
score: 0
type: AnswerComment
has text: Thank you for your response but i don't have the problem moving inside the array (i can do it with $.each(resultado, function( key, value ) The problem that I have is --> how to build the new array
type: Comment
comment on: http://stackoverflow.com/a/29401250

http://stackoverflow.com/q/29432361
score: 0
has comment: http://stackoverflow.com/comment/47037263
answer count: 1
has comment: http://stackoverflow.com/comment/47036922
has title: Interrupting a Function
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47527334
has comment: http://stackoverflow.com/comment/47034612
type: Question
tagged with: google-visualization
has body: We're using the gauge Google Chart applet to visually monitor some message transfer failure rates on a SOAP interface we have via AJAX. My desire is to have the background of the page flash red and white when the fail rate is at 50% or higher, and just have a plain white background when not. We're monitoring two SOAP interfaces with two separate gauges, so they can't step on each other when turning the flashing on or off. To that end, I can get it to turn on but not turn off, and every 5 seconds (the interval of the AJAX refresh) that the dial is over 50, it will re-call the flashing loop which will eventually run the flashing interval up so high that the page looks like a strobe light. I'll admit this- I'm terrible at javascript. Here's what I have so far: For the flashing itself: function changecolors(on) { x = 1; if (on === "on") { setInterval(change, 500); } else { x = 2; document.body.style.background = "white"; } } function change() { if (x === 1) { color = "red"; x = 2; } else { color = "white"; x = 1; } document.body.style.background = color; } And the gauges: function drawFAIL1() { var data = google.visualization.arrayToDataTable([ ['Label', 'Value'], ['Percent', 0] ]); var options = { width: 600, height: 320, redFrom: 50, redTo: 100, yellowFrom: 25, yellowTo: 50, minorTicks: 5, max: 100 }; var chart = new google.visualization.Gauge(document.getElementById('fail1')); chart.draw(data, options); function getData() { $.ajax({ url: 'fail1.php', success: function(response) { data.setValue(0, 1, response); chart.draw(data, options); setTimeout(getData, 5000); if (response &gt; 49) { changecolors("on"); } else { changecolors("off"); } } }); } getData(); } function drawFAIL2() { var data = google.visualization.arrayToDataTable([ ['Label', 'Value'], ['Percent', 0] ]); var options = { width: 600, height: 320, redFrom: 50, redTo: 100, yellowFrom: 25, yellowTo: 50, minorTicks: 5, max: 100 }; var chart = new google.visualization.Gauge(document.getElementById('fail2')); …
has comment: http://stackoverflow.com/comment/47034232
tagged with: javascript
has answer: http://stackoverflow.com/a/29433665
tagged with: ajax

http://stackoverflow.com/q/29478506
has comment: http://stackoverflow.com/comment/47118079
tagged with: css
has comment: http://stackoverflow.com/comment/47117715
has comment: http://stackoverflow.com/comment/47117932
type: AnsweredQuestion
has title: How to style li's using value of clicked li?
duplicate of: http://stackoverflow.com/q/29475717
has comment: http://stackoverflow.com/comment/47117877
type: Question
accepted answer: http://stackoverflow.com/a/29478910
has body: I am a bit stuck here and would appreciate being put on the right path. Basically I have a list of li's with color names, and once one of the boxes is clicked I need all the li's to change background colors to the clicked color, and also have the clicked li become bold and uppercase. How can I get the value of the clicked li and apply it to the siblings? (Have to use jquery/javascript, can't modify the html) Thanks! Project 18 Project 18 Colorize Siblings When one of the "li"'s is clicked: Update the background color of all li's to the color value of the clicked "li" Make only the clicked item bold and uppercase red orange yellow green blue indigo violet Tab Switching Add the jQuery so that when a nav item is clicked: It becomes the active nav item (the light gray color) The content below switches to show the correct section NOTE: the page should not try and anchor link down to the target section. One Two Three Section One Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Section Two Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Section Three Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim v…
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/47117718
has answer: http://stackoverflow.com/a/29478910
linked to: http://stackoverflow.com/q/29475717

http://stackoverflow.com/comment/47016178
comment on: http://stackoverflow.com/a/29421250
type: AnswerComment
has text: Found it. Should be `this.require.nodeRequire`. But the `selfPath` is still not recognized.
score: 0
type: Comment

http://stackoverflow.com/q/29389863
has answer: http://stackoverflow.com/a/29489412
has title: Why is Highchart loaded twice in my rails app ? (Uncaught Highcharts error #16)
type: AnsweredQuestion
score: 1
type: Question
has body: I can't make working the basic example of Highcharts. I got these errors : Uncaught Highcharts error #16 in app/assets/javascripts/application.js Uncaught TypeError: undefined is not a function in app/assets/javascripts/graphique_repartition_budgetaire Highcharts says that the error 16 is because : This error happens the second time Highcharts or Highstock is loaded in the same page, so the Highcharts namespace is already defined. Keep in mind that the Highcharts.Chart constructor and all features of Highcharts are included in Highstock, so if you are running Chart and StockChart in combination, you only need to load the highstock.js file. But I can't figure out how can Highcharts could be loaded twice in the same page. I'm using Rails 3.2.21 I put this into my Gemfile : gem 'jquery-rails' gem 'highcharts-rails', '~&gt; 3.0.0' I put this into my app/assets/javascripts/application.js : //= require jquery //= require jquery_ujs //= require_tree . //= require highcharts I put this into my app/views/layouts/application.html.haml : %html %head %title My title blablabla = javascript_include_tag 'application' = stylesheet_link_tag 'application', :media =&gt; 'screen' = stylesheet_link_tag 'application', :media =&gt; 'print, projection' /[if IE] = stylesheet_link_tag 'application', :media =&gt; 'screen, projection' = csrf_meta_tags ... This is the code I have in my view (HAML-like) : .groupe-champs-encadres #graphique-repartition-budgetaire This is the what I put into my stylesheet (SASS-like) : #graphique-repartition-budgetaire width: 100% height: 400px This is the code (frome Highcharts example) that I put into my app/assets/javascripts/graphique_repartition_budgetaire.js $(function () { $('#graphique-repartition-budgetaire').highcharts({ chart: { type: 'bar' }, title: { text: 'Fruit Consumption' }, xAxis: { categories: ['Apples', 'Bananas', 'Oranges'] }, yAxis: { title: { text: 'Fruit eaten' } }, series: [{ name: 'Jane', data: [1, 0, 4] }, { name: 'John', data: [5, 7, 3]…
answer count: 1
tagged with: highcharts
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ruby-on-rails-3.2
accepted answer: http://stackoverflow.com/a/29489412
linked to: http://stackoverflow.com/q/10273292
favorite count: 0
upvote count: 1

http://stackoverflow.com/comment/47154444
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29460436
has text: Unfortunately, it does not work for me. First I have to comment the line `score.set("otherValue", param.otherValue);` to remove an error: **TypeError: Object [object Object] has no method 'set'**
score: 0

http://stackoverflow.com/a/29391776
score: 1
has comment: http://stackoverflow.com/comment/47286991
type: Answer
has comment: http://stackoverflow.com/comment/47114931
upvote count: 1
has comment: http://stackoverflow.com/comment/47159264
has body: It doesn't look like the data is being set in the your ShowController. I commented about this before. I think you need to pass the id of the event using &lt;super-navigate&gt; with a location property and a data-params-id or whatever you want the parameter name to be. Then in your ShowController you can access it with: supersonic.ui.views.current.params.onValue( function (values) { // values.nameOfPropertyPassedInCouldBeEventId $scope.id = values.id; }); Then you might be able to do something like this to access the Event by id: Event.find($scope.id).then( function (theEvent) { $scope.$apply( function () { $scope.event = theEvent; }); }); Now in your view where you have {{ event.eventdescription }} there should be some data. And another piece for when the view is visible meaning every time you see that view page this will fire: supersonic.ui.views.current.whenVisible( function () { // your code for watching events });
has comment: http://stackoverflow.com/comment/47047575
answers question: http://stackoverflow.com/q/29380008
downvote count: 0

http://stackoverflow.com/comment/53102662
has text: I'm using Chrome, I get different values for my local app, but when I look at the jsfiddle mentioned in this answer: http://jsfiddle.net/dalper01/yvfwzfw4/6/ then I also get different values. I.e. when I click the bottom left on the image at zoom level 4 the values are 760.5633802816901 966.403162055336, at zoom level 3 the values are 522.6917057902973 1126.4822134387352
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/30082225
type: Comment

http://stackoverflow.com/comment/47207654
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29526556
has text: Then you need to look at your console for errors, for instance your jsfiddle is throwing an error because you have set it to have your code executed in the head and not using a dom ready event like onload

http://stackoverflow.com/comment/47021852
comment on: http://stackoverflow.com/q/29425224
type: Comment
type: QuestionComment
score: 1
has text: You should not add anything to your webpage via `Response.Write`. You should add controls as children of other controls on the page. With `Response.Write`, you have no control over where the markup ends up in your page.

http://stackoverflow.com/comment/47064304
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29448614
has text: No, it didn't help. I even changed the tag to another tag in order to be sure.
type: AnswerComment

http://stackoverflow.com/a/29432613
answers question: http://stackoverflow.com/q/29432585
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47035022
has body: You have a logic problem. if (a != "1" || a != "2") { is always verified, whatever the value of a, because a can't be equal to 1 and 2 at the same time. You seem to want if (profile.toString() != "1" &amp;&amp; profile.toString() != "2") {
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29432585

http://stackoverflow.com/comment/47049799
score: 0
has text: You use a different PHP page to send JavaScript data to with AJAX. PHP Side, you usually `echo json_encode($assocArray);` results back to your JavaScript, where they will be passed as an argument into your `success` function. It should also be noted that unless you are setting a `$_SESSION`, a `$_COOKIE`, or are putting the JavaScript data into a database there is no need to send the information, since you have access to it Client Side already.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29440478

http://stackoverflow.com/q/29464119
accepted answer: http://stackoverflow.com/a/29465370
has title: I can't vertically align element to bottom
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I added some code to verticaly align to bottom some td element (fullcalendar event) inside a table. Here is my original post. I added the necessary code from the answers given and everything aligned at the bottom. Now I want another element (multiple event link) to align to the bottom as well, but in the develoer tools it's showing a line through the css and it's still aligned in the middle. What I would like is the eventLimit (class=fc-more-cell) in the day cell to be aligned on the bottom of the day, just like a single event is aligned at the bottom. Picture posted below. Here is my fiddle link $(document).ready(function() { // page is now ready, initialize the calendar... var eventsArray = [ { title: 'Test1', start: new Date() }, { title: 'Test2', start: new Date("2015-04-21") }, { title: 'Test3', start: new Date("2015-04-21") } ]; $('#calendar').fullCalendar({ // put your options and callbacks here header: { left: 'prev,next', //today', center: 'title', right: '' }, defaultView: 'month', editable: true, allDaySlot: false, selectable: true, events: eventsArray, eventLimit: 1 }) }); .fc-event { border-radius: 0; } .fc-row .fc-content-skeleton { position: absolute; top: 0; left: 0; right: 0; bottom: 0; } .fc-content-skeleton table { height: 100% } .fc-content-skeleton .fc-event-container { vertical-align: bottom; } .fc-more-cell { vertical-align: bottom; } a.fc-more { position: relative; display: block; font-size: 0.85em; line-height: 1.3; border-radius: 3px; border: 1px solid #3a87ad; background-color: #3a87ad; font-weight: normal; color: #fff; border-radius: 0; } &lt;link href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.css" rel="stylesheet"/&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.js"&gt;&lt;/script&gt; &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.js"&gt;&lt;/script&gt; &lt;div style="border:solid 2px red;"&gt; &lt;div id='calendar'&gt;&lt;/div&gt; &lt;/di…
tagged with: css
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29465370
tagged with: javascript
tagged with: fullcalendar
linked to: http://stackoverflow.com/q/29462217

http://stackoverflow.com/q/29394153
score: -1
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29394549
has comment: http://stackoverflow.com/comment/46965174
has title: Bootstrap CSS and JS do I have to include them in seperate files or can compile them?
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46964979
has comment: http://stackoverflow.com/comment/46964953
tagged with: css
has body: I was wondering with Bootstrap CSS and JS in my do I have to list them as seperate files i.e. &lt;script src="bower_components/bootstrap/dist/js/bootstrap.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" /&gt; and then lets say I have my custom CSS and JS file &lt;script src="custom.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="custom/.css" /&gt; To make it easier on other people to get a particular javascript control up and running and including 4 files, can I join the bootstrap JS and CSS with my custom JS and CSS into a single CSS &amp; JS file ofcourse keeping the copyright information etc from bootstrap. Or does legally bootstrap require to be listed seperately ?
upvote count: 0
has answer: http://stackoverflow.com/a/29394549
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/46965033
downvote count: 1
has answer: http://stackoverflow.com/a/29394238
accepted answer: http://stackoverflow.com/a/29394238
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46965214

http://stackoverflow.com/comment/46968968
score: 1
has text: There is a problem with Chart.js not showing when divs are initially hidden when the chart is created https://github.com/jtblin/angular-chart.js/issues/29
type: QuestionComment
comment on: http://stackoverflow.com/q/29395853
type: Comment

http://stackoverflow.com/q/29429861
tagged with: angularjs
type: UnansweredQuestion
has body: I've been trying to make tutorial page for my app first installment using ionic framework. Is that even possible to make the tutorial page ? Because I can manage to make the splash screen and icon already. An Example maybe ?
has answer: http://stackoverflow.com/a/29430552
has title: Can we make a tutorial page for app's fresh installment with ionic framework?
downvote count: 2
tagged with: ionic-framework
type: Question
has comment: http://stackoverflow.com/comment/47031017
score: -2
tagged with: javascript
upvote count: 0
answer count: 1
tagged with: splash-screen
favorite count: 0

http://stackoverflow.com/comment/47225233
comment on: http://stackoverflow.com/a/29460051
score: 0
type: AnswerComment
type: Comment
has text: Can you give me link or tell me how to send and get data by php method as i am poor in php

http://stackoverflow.com/comment/47041998
type: Comment
has text: Thank you for the quick response! I fixed it! Too bad I can only pick one correct answer...
comment on: http://stackoverflow.com/a/29436469
type: AnswerComment
score: 0

http://stackoverflow.com/comment/47070168
type: Comment
comment on: http://stackoverflow.com/q/29452244
score: 1
has text: You're not returning the value of `fetchIDs().then`. You're just invoking it. Change to `return fetchIDs().then...`
type: QuestionComment

http://stackoverflow.com/comment/47027621
score: 0
type: Comment
type: QuestionComment
has text: So use native promises then.
comment on: http://stackoverflow.com/q/29428629

http://stackoverflow.com/comment/88947775
type: AnswerComment
type: Comment
has text: Thank you, this is the only solution that worked for me. I had images with both width and height flex-sized (bounded by the screen) and until I added aspectRatio, only the height was being sized properly and the width was the source image width (even though the parent had alignItems: 'stretch').
comment on: http://stackoverflow.com/a/44709894
score: 0

http://stackoverflow.com/comment/47070512
has text: Bah, put ages into writing the question! Heh it's fine,I don't need one, I'm very familiar with deciphering google's API docs, just hadn't come across the chrome.webrequest API before now. Cheers :)
type: QuestionComment
comment on: http://stackoverflow.com/q/29452336
score: 0
type: Comment

http://stackoverflow.com/a/29485621
type: Answer
has body: https://docs.angularjs.org/api/ng/directive/ngCloak ngCloak-This is What you need !!
answers question: http://stackoverflow.com/q/29485219
score: 0

http://stackoverflow.com/q/29392959
has comment: http://stackoverflow.com/comment/46962646
favorite count: 0
score: -1
has body: Test Environment Click me I hate to be the guy asking others to do my work but I can't figure out why it doesn't work. I'm trying to learn javascipt and I've completed the codecademy course. Now I'm actually trying to work with it and put it to use and I can't figure out why my script is not executed. Anyone's expertise I can borrow for a second?
type: Question
upvote count: 2
answer count: 2
has title: Javascript in HTML does not execute
has answer: http://stackoverflow.com/a/29393239
downvote count: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/29393022
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46962864
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29865792
answers question: http://stackoverflow.com/q/29422571
type: AcceptedAnswer
has body: To add more fields to the user registration form provided by useraccounts packages, see Form Fields Configuration section of the official Guide Supposing you want to add a gender field to the registration form, you could do something like this AccountsTemplates.addField({ _id: "gender", type: "select", displayName: "Gender", select: [ { text: "Male", value: "male", }, { text: "Female", value: "female", }, ], });
downvote count: 0
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29422571

http://stackoverflow.com/comment/47121574
has text: Thanks Second Rikudo, the `Date.now()` + `i` will work!
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29480199
type: AnswerComment

http://stackoverflow.com/comment/51143537
score: 0
type: Comment
type: AnswerComment
has text: I am sure it can be, you can try, or maybe ask a question with detailed example. IE is very quirky.
comment on: http://stackoverflow.com/a/30600160

http://stackoverflow.com/comment/46930851
type: Comment
type: QuestionComment
has text: Use onclick instead of onClick @ArmineBabertsian
comment on: http://stackoverflow.com/q/29375175
score: 0

http://stackoverflow.com/q/29529830
answer count: 1
tagged with: url
has title: Change numbers in url - chrome extension
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29530314
tagged with: regex
linked to: http://stackoverflow.com/q/503093
has body: I am trying to make my own chrome extension but I have only basic knowledge of html and js is gibberish to me. So I am begging for help. I have this kind of url: http://www.website.com/blabla/number1/number2/blabla/number3_orig.extension http://www.website.com/blabla/11912/57294/blabla/001_orig.png And I am trying to make an extension which will allow to increase or decrease numbers in that url and show the webpage at the same time and also I want the ability to choose the extension at the end of url (png or jpg). http://postimg.org/image/40cevbqlh/full/ "+" means current number plus one, and "-" means current number minus one, radio buttons changes the extension .png or .jpg Example: I have this url: http://www.website.com/blabla/00000/00000/blabla/000_orig.png and when I click the first "+" this url should open: http://www.website.com/blabla/00001/00000/blabla/000_orig.png and now I click the second "+" this url should open: http://www.website.com/blabla/00001/00001/blabla/000_orig.png and now I click the ".jpg radio button" this url should open: http://www.website.com/blabla/00001/00001/blabla/000_orig.jpg and now when I click the second "-" this url should open: http://www.website.com/blabla/00001/00000/blabla/000_orig.jpg etc etc... I was able to make this code: manifest.json { "name": "Name", "version": ".1", "description": "Description", "background": { "page":"bg.html" }, "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html", "default_title": "Click here!" }, "manifest_version": 2, "content_scripts": [ { "matches": ["http://*/*", "https://*/*"], "js": ["content.js"] } ], "permissions": ["tabs"] } popup.html Getting Started Extension's Popup + + + - - - .png .jpg bg.html popup.js ??? I dont know what code should be here... redirect.js ??? I dont know what code should be here... content.js ??? I dont know what code should be here...
tagged with: google-chrome
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46950799
comment on: http://stackoverflow.com/a/29385532
has text: Explaining the downvote is both good for me and my code as both gets improved.
score: 2
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47362938
has text: Here is a working copy: http://jsfiddle.net/tford/p0dmjpto/6/ The issue was with the self closing span tags.
type: AnswerComment
comment on: http://stackoverflow.com/a/29398721
score: 0
type: Comment

syntax-error
tags question: http://stackoverflow.com/q/29373865
type: Tag
tags question: http://stackoverflow.com/q/29523028
tag name: syntax-error

http://stackoverflow.com/a/29510144
has body: $('select').change(function() { if($(this).val()!='enable') { $(this).parent().siblings().children('select').prop('disabled',true); } else { $(this).parent().siblings().children('select').prop('disabled',false); } }); https://jsfiddle.net/51fevoam/8/
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29509889

http://stackoverflow.com/comment/46931134
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29374795
has text: Thanks @hamed for the reponse. It works, but wondering if we can implement it in a single statement

http://stackoverflow.com/q/29373893
tagged with: google-analytics
has answer: http://stackoverflow.com/a/29409844
type: Question
tagged with: javascript
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/6582171
tagged with: regex
has title: Extract document extensions from clicks
has body: I'm using this technique to extract the click events in my SharePoint site. It uses jquery and a regular expression to capture clicks and report them as events to google analytics. I'm also just past total newbie with regex -- It is starting to make some sense to me, but I have a lot to learn still. So here goes. I have a preapproved list of filetypes that I am interested in based on the site listed above. var filetypes = /\.(zip|pdf|doc.*|xls.*|ppt.*|mp3|txt|wma|mov|avi|wmv|flv|wav|jpg)$/i; But it isn't quite working like I need. With the $ I assume it is trying to match to the end of the line. But often in SharePoint we get links like this: example.org/sharepoint/_layouts/15/wopiframe.aspx?sourcedoc=/sharepointlibrary/the%20document%20name.docx&amp;action=default&amp;defaultitemopen=1 The two problems I have are, I can't count on the file name being before the query or hash and I can't count on it being at the end. And all the different Microsoft Office extensions. I found this thread on extracting extensions, but it doesn't seem to work correctly. I've put together this version var filetypes = \.(zip|pdf|doc|xls|ppt|mp3|txt|wma|mov|avi|wmv|flv|wav|jpg)[A-Za-z]* I changed the office bits from doc.* to just plain doc and added the optional alpha character afterwards. And removed the $ end anchor. It seems to be working with my test sample, but I don't know if there are gotchas that I don't understand. Does this seem like a good solution or is there a better way to get a predetermined list of extensions (including for example the Office varions like doc, docx, docm) that is either before the query string or might be one parameter in the query string?
accepted answer: http://stackoverflow.com/a/29409844
tagged with: sharepoint-2013
type: AnsweredQuestion

http://stackoverflow.com/comment/46985421
has text: actually, this for touchscreen device, and it just like digital poster, so i need it stop and start automatically with timer maybe.
comment on: http://stackoverflow.com/a/29405222
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47117814
comment on: http://stackoverflow.com/q/29475787
has text: No. You are writing code for two different computers, the web server (asp) and the client (javascript) - the only way those two computers can communicate/share data is via HTTP requests.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29404069
answers question: http://stackoverflow.com/q/29403522
type: AcceptedAnswer
downvote count: 0
upvote count: 8
accepted answer of: http://stackoverflow.com/q/29403522
type: Answer
score: 8
has body: According to the official document, it can be pretty easy. $('.responsive').slick({ dots: true, infinite: false, speed: 300, slidesToShow: 4, slidesToScroll: 4, responsive: [ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 3, infinite: true, dots: true } }, { breakpoint: 600, settings: { slidesToShow: 2, slidesToScroll: 2 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } } // You can unslick at a given breakpoint now by adding: // settings: "unslick" // instead of a settings object ] });

http://stackoverflow.com/comment/47165936
has text: Isn't this similar to the examples where a boolean value is updated on an ng-click event `ng-click="updated = !updated"` and the code watching updates; something is shown or hidden? In essence, changing a variable on $scope.
comment on: http://stackoverflow.com/q/29504062
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/29502104
type: AcceptedAnswer
has body: Where you define the getWinner() function you say var getWinner = function(playerMove, computerMove) { ... } That will work in the browser because the default scope of variables is the window object. So variables declared out of defined context are assigned to the window object. When run in a terminal like that, I'm not sure what the default scope is (or if there even is one) so that function may not exist after its declaration. The solution that worked for me was changing the above line to function getWinner(playerMove, computerMove) { ... } Hopefully that works for you. I'll try and find more information and will update when I have a more concrete explanation for what's happening. EDIT: Read more about the difference between function Declaration and function Expression Declaration vs Expression
type: Answer
answers question: http://stackoverflow.com/q/29501981
has comment: http://stackoverflow.com/comment/47162987
accepted answer of: http://stackoverflow.com/q/29501981
score: 0

http://stackoverflow.com/comment/47027126
comment on: http://stackoverflow.com/a/29428112
type: AnswerComment
score: 0
has text: Yeah I checked.. Its Working fine in the fiddle, but i dont know why even after using same codes in my system the values are being appended to previously created divs.. This is exactly what i want to do http://jsfiddle.net/mmpuov74/7/ but its not working..
type: Comment

http://stackoverflow.com/comment/46940215
type: QuestionComment
score: 0
has text: Could you link this to a jsfiddle please?
comment on: http://stackoverflow.com/q/29380210
type: Comment

http://stackoverflow.com/a/29396612
has body: you don't do anything with the file. You need to open the file and write that value to it. $filename = "iPhoneAuctionBids.txt"; $content = file_get_contents($filename); $content .= $numberVariable . PHP_EOL; file_put_contents($filename, $content); Also you might want to wait for the html to be generated before you do any js processing on the DOM. Just put your JS code inside window.onload(function(){ // here });
has comment: http://stackoverflow.com/comment/47049014
has comment: http://stackoverflow.com/comment/47020255
score: 2
has comment: http://stackoverflow.com/comment/47001543
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29396350
answers question: http://stackoverflow.com/q/29396350
upvote count: 2
has comment: http://stackoverflow.com/comment/47006938
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47035573
type: Answer

http://stackoverflow.com/q/29492928
score: -1
answer count: 2
has body: I don't know what is wrong with my code i've build it in brackets and it worked but when i've move in visual studio its telling me that he can't read the latitude property more precise with Google Developer tools i'm getting this "Uncaught TypeError: Cannot read property 'latitude' of undefined" &lt;script&gt; $(document).ready(function(){ getLocation(); }); function getLocation(){ if(navigator.geolocation){ navigator.geolocation.getCurrentPosition(initialize); }else{ x.innerHTML = "Geolocation is not supported by this browser."; } } function initialize(position){ var mapCanvas = document.getElementById('map-canvas'); var myLatLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var mapOptions = { center: myLatLng , zoom: 18, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(mapCanvas, mapOptions); map.set('styles', [ { featureType: 'road', elementType: 'geometry', stylers:[ {color: '#C4C4C4'}, {weight: 0.6} ] }, { featureType: 'road', elementType: 'labels', stylers:[, {saturation: -100}, {invert_lightness: false} ] }, { featureType: 'landscape', elementType: 'geometry', stylers: [ { visibility: 'on' }, { hue: '#ffffff' }, { gamma: 1.4 }, { saturation: 82 }, { lightness: 80 } ] }, { featureType: 'poi', elementType: 'geometry', stylers: [ { visibility: 'off' } ] }, { featureType: 'poi.school', elementType: 'geometry', stylers: [ { visibility: 'off' }, { hue: '#fff700' }, { lightness: -15 }, { saturation: 99 } ] } ]); var iconBase = 'Images/'; var marker = new google.maps.Marker({ position: myLatLng, icon: iconBase + 'romb.png', map:map }); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; UPDATED! After looking again on my code i've discover a problem in brackets i didn't use at the top of the html document the DOCTYPE tag but in vs2013 i've used it, after i removed the tag in vs2013 worked also i've removed the google call line. but now i have another question: Why with the DOCTYPE ta…
downvote count: 1
tagged with: visual-studio-2012
type: UnansweredQuestion
has title: Error in geolocation api and google maps
has answer: http://stackoverflow.com/a/29493186
tagged with: google-maps
upvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/47144948
has answer: http://stackoverflow.com/a/29493151
type: Question

http://stackoverflow.com/comment/47115578
has text: Make a fiddle please.
comment on: http://stackoverflow.com/q/29475540
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29434406
has comment: http://stackoverflow.com/comment/47038800
upvote count: 17
possible better answer: http://stackoverflow.com/a/45312985
has title: Create a class extending from ES6 Map
has body: Trying to get away with custom get/set functionality on ES6 Maps. Currently using Babel to transpile my code to ES5. Chrome Version 41.0.2272.101 m class MyMap extends Map { get(key) { if (!this.has(key)) { throw new Error(...); } return super.get(key); } set(key) { if (this.has(key)) { throw new Error(...); } return super.set(key); } } Not sure if I just got the syntax wrong or I'm missing an implementation of some sort. But I get the following error: Method Map.prototype.forEach called on incompatible reciever
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47038393
has comment: http://stackoverflow.com/comment/47038370
score: 17
has comment: http://stackoverflow.com/comment/47039086
type: Question
has comment: http://stackoverflow.com/comment/47038232
tagged with: ecmascript-6
linked to: http://stackoverflow.com/q/28900954
downvote count: 0
has answer: http://stackoverflow.com/a/29436039
has answer: http://stackoverflow.com/a/61905951
tagged with: javascript
tagged with: inheritance
has answer: http://stackoverflow.com/a/46962435
favorite count: 0
has answer: http://stackoverflow.com/a/45312985
answer count: 5
accepted answer: http://stackoverflow.com/a/29436039
has comment: http://stackoverflow.com/comment/47038856
has answer: http://stackoverflow.com/a/41959639

http://stackoverflow.com/q/29490212
type: UnansweredQuestion
tagged with: calendar
type: Question
tagged with: children
tagged with: javascript
has title: change style of specific days in a calendar using jquery
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29490430
tagged with: jquery
has answer: http://stackoverflow.com/a/29490305
has body: I have a calendar in javascript and I want to change the style of specific days. The structure of the calendar is: 13 14 15 . . . I want to select the day 13 and the day 15 using Jquery, but I'm using something like this, but it doen't work: var value = $("td[data_month=" + month+ "][data_year=" + year+ "]") .first().html(); value is undefined, why??????

http://stackoverflow.com/comment/47117718
type: QuestionComment
has text: This looks like homework. I suggest that you do some research and make an attempt. If you get stuck, let us know what you tried and what specifically goes wrong.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29478506

http://stackoverflow.com/q/29389505
score: 3
has title: What is the "prototype" linkage for Objects created via the Object Literal Notation in JavaScript?
upvote count: 3
answer count: 2
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29389570
accepted answer: http://stackoverflow.com/a/29389570
has body: My first post on Stack Overflow and so a complete newbie here and I am still getting used to the rules / annotations followed on this forum and so please do excuse this aspiring "developer" ;-) While reading through Crockford's "Good Parts", I came across a line that said: Every object is linked to a prototype object from which it can inherit properties. All objects created from object literals are linked to Object.prototype, an object that comes standard with JavaScript. So to test this out I wrote the following JScript code: var Student = {} console.log(Student.isPrototypeOf(Object.prototype)) Note: I am executing this via the Browser Console and hence the function - console.log(...). I am guessing the way the Student variable declared here is using the "Object Literal Notation". Isn't that correct ? So the second line - console.log(Student.isPrototypeOf(Object.prototype)) returned a false instead of a true. Shouldn't that display a true instead of a false ? Well doesn't that contradict the lines from the Book that I mentioned above ? So here is the snippet in action - var Student = {}; alert(Student.isPrototypeOf(Object.prototype)); I am sure that I missing something here for sure!
possible better answer: http://stackoverflow.com/a/29389556
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29389556
type: Question

http://stackoverflow.com/comment/47216534
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29517040
type: Comment
has text: @FelixKling Thanks for giving advice . i changed

http://stackoverflow.com/comment/47191420
type: Comment
has text: Also, how can I test my app out of production mode? I know I can deploy to appname.meteor.com, but how would I tell my "native" app to point to that url?
type: AnswerComment
comment on: http://stackoverflow.com/a/29508339
score: 0

http://stackoverflow.com/comment/46951661
type: Comment
comment on: http://stackoverflow.com/a/29384205
type: AnswerComment
score: 1
has text: I have tried your code and its working even with the loading code. Make sure that you have added code for [preventing the default behavior of form](http://api.jquery.com/event.preventdefault/). Please provide the element with id tab1 if you still facing the same problem (Update it on your question).

http://stackoverflow.com/a/29400982
has body: An equivalent loop can be made by testing the value after assigning: while (true) { chunk = readableStream.read(); if (chunk == null) { break; } data += chunk; } or you can repeat the assignment before the loop and inside the loop: chunk = readableStream.read(); while (chunk != null) { data += chunk; chunk = readableStream.read(); }
answers question: http://stackoverflow.com/q/29400928
type: Answer
score: 0

http://stackoverflow.com/comment/112734215
score: 0
type: Comment
has text: Yours all appear to collapse/sticky together at once. They are supposed to happen one at a time when each header hits the next one.
type: AnswerComment
comment on: http://stackoverflow.com/a/29530731

http://stackoverflow.com/a/29454761
upvote count: 3
type: Answer
accepted answer of: http://stackoverflow.com/q/29454717
answers question: http://stackoverflow.com/q/29454717
score: 3
downvote count: 0
has body: You could implement a php wrapper which your ajax code could request and pass in the file you would like to see the contents of: Request via ajax: http://yourdomain.com/get_content.php?file=test.php get_content.php: &lt;?php if (isset($_GET['file'] &amp;&amp; file_exists($_GET['file'])) { echo file_get_contents($_GET['file']); } ?&gt; Please do not use the code above in production mode, it is just an idea how to handle your problem.
has comment: http://stackoverflow.com/comment/47074629
type: AcceptedAnswer

http://stackoverflow.com/q/29502837
has comment: http://stackoverflow.com/comment/47196582
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47164582
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14632260
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47166916
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/29521771
has body: I'd would like to transclude content from a template url instead of from within the body of the directive tags. Using a modal as an example, you could see the need to have the modal directive declaring a template url for the modal wrapper markup, however for the transcluded content instead of sourcing that content from within the directive tags (some modals may have extensive markup) I'd like to use a template url to provide the transluded content. Thus provided a much cleaner abstraction layer for the component. i.e. homeView.html modalDirective.js app.directive('modal', function() { return { templateUrl: 'app/shared/modalView.html', // some nifty way to transclude content from say 'app/shared/partials/' + attr.transcludeContent + '.html }; }); modalView.html - x
has title: In Angular, can I transclude content from a template url?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29521771

http://stackoverflow.com/a/29499912
has comment: http://stackoverflow.com/comment/47158645
answers question: http://stackoverflow.com/q/29499818
upvote count: 4
has comment: http://stackoverflow.com/comment/47158561
type: AcceptedAnswer
has body: What you're currently doing is adding an onclick event to a link that calls a function that adds another onclick event via jQuery. Remove the onclick property and the open_file() function wrapper so that jQuery adds the event as you intended.
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/47158474
type: Answer
has comment: http://stackoverflow.com/comment/47158757
accepted answer of: http://stackoverflow.com/q/29499818

http://stackoverflow.com/a/29434513
type: Answer
answers question: http://stackoverflow.com/q/29434409
score: 0
has body: As mentioned in the comments, putting a zero before the number will change its type from decimal (1 - 10) to octal (1 - 8). To keep the numbers decimal, remove the leading zeros. Here is your code with this suggestion: function myFunction(a, b) { return a * b; } document.write('04 * 03 = '); document.write(myFunction(4, 3)); //Result 12, correct document.write(' &lt;&lt; Correct &lt;br/&gt;20 * 2 = '); document.write(myFunction(20, 2)); //Result 40, correct document.write(' &lt;&lt; Correct ') The reason why myFunction(04, 03) works correctly is because it has no numbers in the eight spot. On the other hand 20 * 02 has a 2 in the eight spot in 20 that is interpreted as 2 times eight or 16 when it is multiplied by an octal 02.

http://stackoverflow.com/comment/47115336
comment on: http://stackoverflow.com/a/29466789
score: 0
type: AnswerComment
has text: Updated, think it's exactly as requested now. B-)
type: Comment

http://stackoverflow.com/a/29452834
type: Answer
answers question: http://stackoverflow.com/q/29451462
has comment: http://stackoverflow.com/comment/47071396
has body: If you want to renew the event handler, then try calling them again once you have recreated the DOM elements: $("#vsubmit").before($(" ")); $("#vsubmit").after(horizontalSquaresQuestion); $("#vsubmit").off("click").on("click", function () { ... }); Since function () { ... } is now being used multiple times and recursively, you must assign it to a variable. var vsubmitListener = function () { trueNumberOfVerticalSquares = $numOfVerticalSquares.val(); alert(trueNumberOfVerticalSquares + " vertical squares will be created. Click OK if that's okay."); for (creatingVDivs = 0; creatingVDivs < trueNumberOfVerticalSquares; creatingVDivs++) { $("body").append(createVerticalDivs); $(".vsquare").height("200px"); $(".vsquare").width("200px"); $(".vsquare").css("margin", "0px"); $(".vsquare").css("background-color", "#eef7ff"); } if (creatingVDivs >= trueNumberOfVerticalSquares) { $("body").append(createContainer); $("#logo").detach(); $("#container").prepend($(".vsquare")); $("#vsubmit").detach(); $("#vsquareInput").detach(); $("#verticalSquaresQuestion").detach(); $("#clearQuestion").detach(); $(" ").detach(); $("#clearSubmit").detach(); $("#container").before(createEtchASketchLogoDiv); $("#logo").before(clearQuestion); $("#logo").before(clearQuestionSpace); $("#clearQuestion").after(clearQuestionSubmit); $("#clearSubmit").off("click").on("click", function () { alert("Are you sure you really want to erase your hard work? Click OK if you are."); $(".vsquare, .hsquare").detach(); $("#clearSubmit").detach(); $("#clearQuestion").detach(); $("#horizontalSquaresQuestion").detach(); $("#hsquareInput").detach(); $("#hsubmit").detach(); $("h1").after(verticalSquaresQuestion); $("#verticalSquaresQuestion").after(vSquareInput); $("#vsquareInput").after(vSubmit); $("#verticalSquaresQuestion").after($(" ")); $("#vsubmit").before($(" ")); $("#vsubmit").after(horizontalSquaresQuestion); /* Now that is has a name, we can recursively call it */ $("#vsubmit").off("click").on("click", vsubmitLis…
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/29451462

http://stackoverflow.com/a/29379956
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29379886
has body: instead of "#" use javascript:void(0) Show something more info here:

http://stackoverflow.com/q/29394904
has comment: http://stackoverflow.com/comment/46966695
downvote count: 1
has answer: http://stackoverflow.com/a/29394995
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46966650
has comment: http://stackoverflow.com/comment/46966519
score: 1
tagged with: jquery
favorite count: 0
type: Question
has title: Should I / how do I clear a mousemove JQuery event listener?
has comment: http://stackoverflow.com/comment/46966305
answer count: 2
has answer: http://stackoverflow.com/a/29395261
upvote count: 2
has body: When I use $(".page").mousemove(function(event){}); As soon as the mouseup event comes, I no longer need this listener. Since I'll be applying the listener repetitively for different actions, it seems to me that these listeners might stick around and build up (needlessly wasting CPU) as the user activates the function many times. I'm not really sure how this works internally, that's just my guess. Should I / how do I clear a mousemove JQuery event listener?

http://stackoverflow.com/comment/47221786
has text: Hi, I am somehow making some mistake here to display the title http://jsfiddle.net/BETBk/111/
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29533367

http://stackoverflow.com/comment/47245675
has text: I'm sorry. It's just the assignment notes from the professor is very poor. But from my understanding, I have to do the ajax validation in the servlet.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29488070

http://stackoverflow.com/q/29479411
has title: String is not a function-Filesaver.js
has comment: http://stackoverflow.com/comment/47119532
linked to: http://stackoverflow.com/q/7852237
tagged with: file-io
duplicate of: http://stackoverflow.com/q/7852237
tagged with: http://stackoverflow.com/tag/html
has body: I am using filesaver.js and I have the following js code function download(){ //ejectCss(); var t="snnsnsns\n"; t+="aslhgakgskasgkgsakgas[]\n\n\n\""; var blob = new Blob([t], {type: "text/plain;charset=utf-8"}); saveAs(blob, "sliders-ui-custom-classes.css"); } To trigger that function I am using this: Download user-created classes But i get an error saying"String is not a function".Any ideas? Also this is not working Download user-created classes
answer count: 0
type: UnansweredQuestion
tagged with: file
has comment: http://stackoverflow.com/comment/47119588
has comment: http://stackoverflow.com/comment/47119628
tagged with: javascript
has comment: http://stackoverflow.com/comment/47119448
type: Question
score: 0
has comment: http://stackoverflow.com/comment/47119493
has comment: http://stackoverflow.com/comment/47119450
has comment: http://stackoverflow.com/comment/47119415
has comment: http://stackoverflow.com/comment/47119514

http://stackoverflow.com/comment/47205530
type: QuestionComment
type: Comment
has text: Cut and paste error. It has been corrected.
comment on: http://stackoverflow.com/q/29525149
score: 0

http://stackoverflow.com/a/29401042
has comment: http://stackoverflow.com/comment/46978044
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29400898
has comment: http://stackoverflow.com/comment/46977840
type: Answer
answers question: http://stackoverflow.com/q/29400898
upvote count: 1
has comment: http://stackoverflow.com/comment/46977967
score: 1
has body: You can probably simplify the condition to oResponse &amp;&amp; oResponse.responseCode if all you care about is that it is not null nor undefined, and it has a responseCode property that is not null nor undefined. The check for oResponse != null is redundant since null evaluates to false. The check for oResponse.responseCode !== null is redundant for the same reason. The check for typeof oResponse === "object" is redundant since if it was a string or other type it wouldn't have a responseCode property. Note that if oResponse.responseCode === 0 or another "falsy" value, this condition will evaluate to false (i.e., that is considered an "invalid" responseCode). @snowYetis comment about an error handler is also a good idea to have in there in case there is an error on the server. It won't cover the validation of a successful response that is invalid though.
has comment: http://stackoverflow.com/comment/46978177

http://stackoverflow.com/a/29427636
answers question: http://stackoverflow.com/q/29427612
downvote count: 0
has body: If you want 250 characters, You can set the maxlength attribute to 250 if you want 250 words: function maxlength(obj,wordLen){ var len = obj.value.split(/[\s]+/); if(len.length &gt; wordLen){ alert("You cannot put more than "+wordLen+" words in this text area."); } } Function Call: onChange="maxlength(this, 250)" Working Demo
score: 1
upvote count: 1
type: Answer

http://stackoverflow.com/comment/46947393
comment on: http://stackoverflow.com/q/29384404
type: Comment
has text: @Touffy: Basically client is a reporting portal and Portal is requesting date range for the data which needs to be show on Graph and tables. So they do not have any hours in the portal. It is pure based on Date only.
score: 0
type: QuestionComment

http://stackoverflow.com/q/29407362
score: 0
answer count: 3
has title: Div flickering on fade in out
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29407883
has answer: http://stackoverflow.com/a/29407529
tagged with: css
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29407482
has body: I have two text as intro where text1 disappears and text2 stays. The problem is The content div below flickers when text1 disappears and goes back to its place when text2 appears. Could any one fix this issue ? Here is my fiddle http://jsfiddle.net/qdrtsvf3/1/ HTML Welcome to our site Company Name Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. CSS: body { padding-top:30px;} .text2 { display: none; } .text1,.text2 { font-size:30px; font-weight:bold; text-transform:uppercase; text-align:center; } .content { background:red} JS: function fade() { $('.text1').fadeIn().delay(2000).fadeOut(); $('.text2').delay(2500).fadeIn(); } fade();
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46961984
comment on: http://stackoverflow.com/a/29390733
score: 0
type: AnswerComment
has text: Thanks! I can't believe I overlooked that - I was using the option + arrow-key instead of option + clicking.
type: Comment

http://stackoverflow.com/q/29384570
has comment: http://stackoverflow.com/comment/46947617
tagged with: javascript
tagged with: jquery
has title: textbox values on change
has answer: http://stackoverflow.com/a/29384584
tagged with: http://stackoverflow.com/tag/html
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/29384583
has body: I have three textboxes with the same id's in a table. I also have one dropdown on top of the table. While changing the dropdown I need to set the textbox values as same as the dropdown value. I used the following code and I am able to change only the first textbox, others are not getting values. function myHome() { var zoneId = $("#funderIds").val(); $("#funder").val($("#funderIds").val()); } --Select-- option1 option2 option3 Can anyone give some advise on where I am making a mistake?
score: -4
possible better answer: http://stackoverflow.com/a/29384668
has answer: http://stackoverflow.com/a/29384668
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29385381
type: Question
accepted answer: http://stackoverflow.com/a/29384583
downvote count: 4
has comment: http://stackoverflow.com/comment/46947449
upvote count: 0

http://stackoverflow.com/q/29454620
tagged with: javascript
linked to: http://stackoverflow.com/q/12178792
has comment: http://stackoverflow.com/comment/47074575
upvote count: 2
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/47074368
has comment: http://stackoverflow.com/comment/47074594
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I would like to create a function that maps a grid, represented as a nested array, to a html table. For example take list: [ ['a', 'b', 'c'], ['d', 'e', 'f'], ['f', 'g', 'h'] ] and alter html table to show: a b c d e f f g h Assume table size predetermined and list matches the dimensions. So something that completes: table border="1"> row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2
linked to: http://stackoverflow.com/q/15164655
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/47075077
has answer: http://stackoverflow.com/a/29455096
has comment: http://stackoverflow.com/comment/47074410
has comment: http://stackoverflow.com/comment/47075266
has title: Map a javascript array to html table
has answer: http://stackoverflow.com/a/29454697
duplicate of: http://stackoverflow.com/q/12178792
has comment: http://stackoverflow.com/comment/47075456
type: Question
has answer: http://stackoverflow.com/a/29456901

http://stackoverflow.com/a/29447452
type: Answer
score: 1
upvote count: 1
has body: You can load the modal using javascript on the change event of the dropdown. Just check this link : Bootstrap Modal doesn&#39;t show
accepted answer of: http://stackoverflow.com/q/29447278
answers question: http://stackoverflow.com/q/29447278
has comment: http://stackoverflow.com/comment/47061979
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/47118763
has text: Not a problem, best of luck! @KenPalmer
type: Comment
comment on: http://stackoverflow.com/a/29479084
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46956862
has text: But my json data is of a complicated format.. Can i post it here?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29388709

http://stackoverflow.com/q/29445776
has body: I have script https://drive.google.com/file/d/0B4Cqle1HMxo8LXl6YktuMF9EVWc/view?usp=sharing It's working as WebGL 2D When it draws 50 images (texture) -- FPS 60, but when it draws 150 and more -- FPS 20-30 Why? How can I solve this problem with WebGL? UPD jsFiddle html &lt;canvas id="spirit_canvas"&gt;&lt;/canvas&gt; &lt;div id="fps" style="position:absolute;top:0;left:0;background:rgba(0,0,0,0.1);color:#111;padding:1px 2px;font-size:10px;font-family:sans-serif;z-index:5"&gt;&lt;/div&gt; js function WebGL2d(id) { this._el = document.getElementById(id); this._gl = null; this._vertexShader = null; this._fragmentShader = null; this._program = null; this._p = { positionLocation: null, translationLocation: null, resolutionLocation: null, colorLocation: null, texCoordLocation: null, v_t: null }; this._vertexShaderSrc = "\ attribute vec2 a_position;\n\ uniform vec2 u_resolution;\n\ uniform vec2 u_translation;\n\ attribute vec2 a_texCoord;\n\ varying vec2 v_texCoord;\n\ void main() {\n\ vec2 position = a_position + u_translation;\n\ vec2 zeroToOne = position / u_resolution;\n\ vec2 zeroToTwo = zeroToOne * 2.0;\n\ vec2 clipSpace = zeroToTwo - 1.0;\n\ gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);\n\ gl_PointSize = 2.;\n\ v_texCoord = a_texCoord;\n\ }\n\ "; this._fragmentShaderSrc = "\ precision mediump float;\n\ uniform vec4 u_color;\n\ uniform sampler2D u_image;\n\ varying vec2 v_texCoord;\n\ uniform int v_t;\n\ void main() {\n\ gl_FragColor = u_color;\n\ if (v_t == 1) {\n\ gl_FragColor = texture2D(u_image, v_texCoord);\n\ }\n\ }\n\ "; this._canvas2d = null; this._canvas2dCache = null; this._canvasPathBuffer = []; this._isPointInPath = false; this.txtr = {}; this._vertexBuffer = null; this._indexBuffer = null; this._uvBuffer = null; this._colorBuffer = null; // ------------------- this.fillStyle = '#000'; this.strokeStyle = '#000'; this.lineWidth = 1; //----||| this._init(); } WebGL2d.prototype = { _getCanvas: function(w,h) { var canvas = document.createElement("canvas"…
has comment: http://stackoverflow.com/comment/47058849
has answer: http://stackoverflow.com/a/29459588
upvote count: 1
answer count: 1
downvote count: 1
favorite count: 0
has title: Low FPS in WebGL (working as 2d)
has comment: http://stackoverflow.com/comment/47058675
type: AnsweredQuestion
tagged with: frame-rate
tagged with: webgl
type: Question
tagged with: canvas
accepted answer: http://stackoverflow.com/a/29459588
tagged with: javascript
score: 0

http://stackoverflow.com/a/29445205
has comment: http://stackoverflow.com/comment/47057699
type: Answer
downvote count: 0
score: 1
has body: $(".container&gt;parent").click(function() { $('.element').css({ 'animation': 'fadeInUp .2s', '-webkit-animation': 'fadeInUp .2s' }); setTimeout(function(){ $('.element').removeAttr('style'); },300); });
answers question: http://stackoverflow.com/q/29445014
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29445014

object-tag
type: Tag
tag name: object-tag
tags question: http://stackoverflow.com/q/29503555

http://stackoverflow.com/q/29390388
tagged with: javascript
has comment: http://stackoverflow.com/comment/46957985
tagged with: asp.net
has comment: http://stackoverflow.com/comment/46957967
has answer: http://stackoverflow.com/a/29390943
answer count: 3
has answer: http://stackoverflow.com/a/29390660
tagged with: visual-studio
has body: I have no problems running the code as an HTML page. Now, in a web form, the converter simply does nothing. Was trying to migrate it over to a web form page from HTML to use a master page and theme. &lt;asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"&gt; &lt;script lang="javascript" type="text/javascript"&gt; //Convert Logic function CelsiusConvert() { document.converter.fahrenheit.value = (document.converter.celsius.value * 9 / 5) + 32 document.converter.kelvin.value = document.converter.celsius.value * 1 + 273.15 } function FahrenheitConvert() { document.converter.celsius.value = (document.converter.fahrenheit.value - 32) * 5 / 9 document.converter.kelvin.value = ((document.converter.fahrenheit.value - 32) * 5 / 9) + 273.15 } function KelvinConvert() { document.converter.celsius.value = document.converter.kelvin.value - 273.15 document.converter.fahrenheit.value = ((document.converter.kelvin.value - 273.15) * 9 / 5) + 32 } &lt;/script&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"&gt; &lt;form name="converter"&gt; &lt;!--Input Fields--&gt; Celsius: &lt;input type="text" name="celsius" onchange="CelsiusConvert()"/&gt;&lt;br /&gt; Fahrenheit: &lt;input type="text" name="fahrenheit" onchange="FahrenheitConvert()"/&gt;&lt;br /&gt; Kelvin: &lt;input type="text" name="kelvin" onchange="KelvinConvert()"/&gt;&lt;br /&gt; &lt;!--Convert Button--&gt; &lt;input type="button" value="Convert!" /&gt; &lt;/form&gt; &lt;/asp:Content&gt;
has comment: http://stackoverflow.com/comment/46958731
has comment: http://stackoverflow.com/comment/46958706
type: AnsweredQuestion
tagged with: c#
possible better answer: http://stackoverflow.com/a/29390943
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46957981
has answer: http://stackoverflow.com/a/29390705
accepted answer: http://stackoverflow.com/a/29390660
has title: Why won't my JavaScript work in a ASP.net web form?

http://stackoverflow.com/a/29411211
answers question: http://stackoverflow.com/q/29411037
score: 0
type: AcceptedAnswer
has body: You can place the popup markup in the for loop and use the variables from the for or you can use data-atributes as you sugested to pass data from the looped markup to the popup . The avantage of data-atributes over placing the popup markup in the loop is less markup on the page ->small html page -> fast render time
has comment: http://stackoverflow.com/comment/46995666
has comment: http://stackoverflow.com/comment/46995874
type: Answer
accepted answer of: http://stackoverflow.com/q/29411037

http://stackoverflow.com/comment/47031966
type: AnswerComment
has text: @user3283304 glad for u, but maybe once, in 5 years, someone has task like u, but he use jQuery, and he can google my ans! : D
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29431027

http://stackoverflow.com/comment/47674111
type: Comment
comment on: http://stackoverflow.com/a/29433709
type: AnswerComment
has text: That is exactly what I wanted. It still has a little bug on scroll down where it sometimes snaps to bottom. But thank you. If you'll edit the answer I'll vote it up and accept it.
score: 0

http://stackoverflow.com/comment/138881681
comment on: http://stackoverflow.com/a/78771501
has text: Why does size matter? See this [jsperf](https://jsbench.me/molyt72c5c/) Using python? See this [answer](https://stackoverflow.com/questions/77579920/which-is-more-efficient-in-python-and-in-general-iterate-over-short-list-and)?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29497656
type: Answer
score: 1
has body: I guess that's your problem: ECMAScript ed 6 draft ECMAScript 5 ISO-8601 format support The date time string may be in ISO 8601 format. For example, "2011-10-10" (just date) or "2011-10-10T14:48:00" (date and time) can be passed and parsed. The UTC time zone is used to interpret arguments in ISO 8601 format that do not contain time zone information (note that ECMAScript ed 6 draft specifies that date time strings without a time zone are to be treated as local, not UTC). Let's compare ISO times in IE and Chrome. Chrome: "2015-04-09T12:30:00.000Z" IE: "2015-04-09T09:30:00.000Z" IE assumes the ISO time is local time, like it should be. Chrome actually assumes its UTC.
upvote count: 1
answers question: http://stackoverflow.com/q/29495733
accepted answer of: http://stackoverflow.com/q/29495733
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/47134030
comment on: http://stackoverflow.com/q/29486818
has text: i have to allow only the alphabets and i should not allow http, https, www in the same text box
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46960369
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29390691
type: Comment
has text: you have conflicting traverses

http://stackoverflow.com/q/29451267
has answer: http://stackoverflow.com/a/29451402
type: Question
tagged with: function
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29451404
has body: I'm trying to make the this.SPAWN_FREQUENCY decrease by 200 after time elapsed reaches 30 seconds, 1 min, 2 min and so on. Basically levels in the game increasing the amount of enemies to defeat. I've tried a load of code and still can't get anything to work. Any suggestions where to start? Sorry if I didn't provide enough detail. function EnemyManager (timer) { this.enemies = []; this.SPEED = -5; this.SPAWN_FREQUENCY = 1300; this.spawnTimer = 0; Do I add 'if' statement?
has title: Javascript function, need to decrement every 30 secs time elapsed
tagged with: timer
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29451391

http://stackoverflow.com/comment/47023005
comment on: http://stackoverflow.com/q/29425820
score: 0
type: QuestionComment
type: Comment
has text: Don't join with `''` but join with `,` instead. String.indexOf would still work but it will avoid interpreting `[2,11,5]` and `[21,15]` as the same thing

http://stackoverflow.com/comment/46967215
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29395363
has text: thanks for your reply but I did it befor posting but nothing happened. I want to get a new page redirects
type: AnswerComment

http://stackoverflow.com/comment/46955282
score: 0
has text: @phts There any solution ?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29388719

http://stackoverflow.com/q/29417058
has comment: http://stackoverflow.com/comment/47006343
type: Question
has answer: http://stackoverflow.com/a/31998661
has title: HTML Javascript Self-assessment quiz/questionnaire
has answer: http://stackoverflow.com/a/29435999
accepted answer: http://stackoverflow.com/a/29435999
has body: Hi so i got a very basic JavaScript HTML quiz working, however what i want to end up with is an assessment type quiz that has lets say 15 questions based on 3 categories (e.g. Alcoholism, depression, drug abuse) e.g. How often to you drink alcohol? - All the time - Occasionally - Never the player answers all 15 questions and at the end depending on how they answered the questions they get assigned a category e.g. your category is Drug Abuse etc. I'm thinking that maybe each category has its own counter and a value is applied to each of the possible answers e.g. All the time gives a score of 3, occasionally scores a 2 etc. As the player answers the questions, the values get stored in the corresponding category and at the end the scores for each category are added up and the category with the highest score gets assigned to the player? Any help with this would be appreciated :) HTML: CSS: JS:
score: 0
answer count: 2
upvote count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/31998661
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47006258
type: AnsweredQuestion

http://stackoverflow.com/comment/46964033
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29389962
has text: .I implemented it like you suggested but I have 6 child-directives and it means 6 $watch methods(the service returns an obj with 6 properties and I used them one by one in the 6 child-directives). For better performens should I set a state variable and an object variable on the ctrl to share it with the directives? Asking in the directives to watch only the state variable? But I think this will not work. What do you think? Here is the code made on your sugestion: http://jsfiddle.net/8hkxv85x/1/

http://stackoverflow.com/comment/47186133
comment on: http://stackoverflow.com/a/29515199
has text: Why are you calling the same function twice?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47025168
type: Comment
type: QuestionComment
has text: oh you need `onClientClick` or somethinng like that if you <aui:select is a server tag
comment on: http://stackoverflow.com/q/29427301
score: 0

http://stackoverflow.com/q/29483526
has comment: http://stackoverflow.com/comment/47127415
tagged with: javascript
has comment: http://stackoverflow.com/comment/47127823
downvote count: 4
upvote count: 0
tagged with: html5-canvas
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/47127532
has answer: http://stackoverflow.com/a/29484012
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47127805
has comment: http://stackoverflow.com/comment/47127412
tagged with: css
tagged with: css-shapes
score: -4
has comment: http://stackoverflow.com/comment/47127519
has body: I have to make some shapes in my website, I need to put some background for the shapes, and it should change the background when I hover the cursor, how do i develop this, can I develop it using pure css or html canvas is required, I am attaching the demo image of the shape here. for the image given below each section is different shapes. any small help will be appreciated
has comment: http://stackoverflow.com/comment/47127517
has comment: http://stackoverflow.com/comment/47127308
has comment: http://stackoverflow.com/comment/47127553
type: Question
has title: Draw shapes in webpage

http://stackoverflow.com/comment/46995388
has text: Do you have control over File constructor or is it some native one? However in any case you will be able to implement toJson method.
comment on: http://stackoverflow.com/q/29410908
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29496028
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/29504237
accepted answer: http://stackoverflow.com/a/29504237
tagged with: javascript
score: 0
tagged with: telerik
tagged with: asp.net
has body: Upon clicking btnSearch, it disables it with telerik's SingleClick=true property. If validation fails it doesn't postback and I try to set the button back to being enabled but it doesn't get set. It still is disabled with the text saying "Searching...". What I am trying to do is if it fails the validation, I want the button to be enabled again. Right now if i click on it and validation fails, it gets stuck being disabled. javascript function Validate(button, args) { if (error) { button.set_autoPostBack(true); } else { //validation fails button.set_autoPostBack(false); button.set_enabled(true); // i have currently } } aspx &lt;telerik:RadButton ID="btnSearch" Text="Search" SingleClick="true" OnClick="btnSearch_Click" OnClientClicking="Validate" SingleClickText="Searching..." &gt;&lt;/telerik:RadButton&gt;
type: AnsweredQuestion
has title: Re-enable RadButton with property SingleClick=true

http://stackoverflow.com/comment/46958031
type: QuestionComment
comment on: http://stackoverflow.com/q/29390337
has text: Ah. I see you have edited your post (or Rory did :) You want to change what's inside a comment. That's completely different.
score: 0
type: Comment

http://stackoverflow.com/comment/47160362
score: 0
has text: I should mention that the key here is using a factory. A service/provider will be changed globally, but factories are like an instance of whatever is defined, so it's safe to change it in one controller without effecting another.
type: Comment
comment on: http://stackoverflow.com/a/29500964
type: AnswerComment

http://stackoverflow.com/q/29393377
type: Question
has title: Google Analytics Charts in javascript
tagged with: google-analytics
tagged with: charts
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29396907
has body: Good Morning. I am a newbie in javascript, and I think what I want to do is easy, but i don´t know how. I'm trying to draw Google analytics graph to display on my own dashboard. My code works, but I have several webs registered, and always shows me the same default unless I change it manually(the field is called PROPERTY). I would like the default web was another. Here is my code (i have changed CLIENT ID to 'XXX' Google Analytics Charts VISITS Can anybody help me with it? Thanks so much in advance
accepted answer: http://stackoverflow.com/a/29396622
has answer: http://stackoverflow.com/a/29396622
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29396907

http://stackoverflow.com/comment/47082580
type: Comment
type: QuestionComment
has text: What does the two subfolder line look like? Because it should be `/subfolder1/subfolder2/index.php` and work fine.
score: 0
comment on: http://stackoverflow.com/q/29459240

http://stackoverflow.com/comment/46945745
type: AnswerComment
has text: after I publish it can I just used it like Meteor.user().cart?
type: Comment
comment on: http://stackoverflow.com/a/29383500
score: 0

http://stackoverflow.com/a/29373674
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/29373552
type: Answer
score: 2
has body: You are clicking only one element, but your function is changing all icons, you have use $(this) instead in order to only change the icon you are clicking: function toggleClass() { $(this).toggleClass('fa-chevron-down fa-chevron-up'); }; and then use only one function: $faChevronDown.click(toggleClass); With this you avoid the use of Ifs and elses and the code is much simplier and small.

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/29465884
tags question: http://stackoverflow.com/q/29454232
tags question: http://stackoverflow.com/q/29453363
tags question: http://stackoverflow.com/q/29409674
tags question: http://stackoverflow.com/q/29438515
type: Tag

http://stackoverflow.com/a/29387730
score: 3
has comment: http://stackoverflow.com/comment/46953391
has body: Unfortunatly HTML element id's need to be different, they are meant to be unique identifiers. Classes however can be applied to multiple elements like so: HTML &lt;input type="text" id="first" value="tesdafsdf" /&gt; &lt;input type="text" class="second" /&gt; &lt;input type="text" class="second" /&gt; &lt;input type="text" class="second" /&gt; &lt;input type="text" class="second" /&gt; &lt;input type="text" class="second" /&gt; &lt;input type="text" class="second" /&gt; &lt;input type="text" class="second" /&gt; &lt;input type="text" class="second" /&gt; Javascript $('#first').keyup(function() { updateSearch(); }); var updateSearch = function() { $('.second').each(function(index, value) { this.value = $('#first').val(); }); }; //Change the values for testing purpose updateSearch();
downvote count: 0
answers question: http://stackoverflow.com/q/29387657
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/46953470

http://stackoverflow.com/a/29377919
answers question: http://stackoverflow.com/q/29377839
upvote count: 3
downvote count: 2
type: Answer
score: 1
has body: var myh1 = document.getElementById('id1'); or with jQuery var myh1 = $('#id1')

http://stackoverflow.com/a/29396217
upvote count: 2
type: Answer
score: 2
downvote count: 0
has body: I would suggest creating a service for observing route changes where you register all forms you want to spy on. The registration of a form will then be handled by your directive. I put together some code below: app.directive('confirmOnExit', function (FormChanges) { return { restrict: 'A', link: function (scope, elem, attrs, formCtrl) { FormChanges.register(scope, attrs.name); } }; }]); app.factory('FormChanges', function (modalService, $rootScope, $state) { var formNames = []; var dirtyCallbacks = {}; $rootScope.$on('$stateChangeStart', function (event, newState, newParams, fromState, fromParams) { var hasDirtyForm = false; // Check all registered forms if any of them is dirty for (var i = 0; i &lt; formNames.length; i++) { var name = formNames[i]; if (dirtyCallbacks[name] &amp;&amp; dirtyCallbacks[name]()) { // got a dirty form! hasDirtyForm = true; break; } } if (!hasDirtyForm) { // Nothing is dirty, we can continue normally return; } // Something was dirty, show modal event.preventDefault(); var modalOptions = { closeButtonText: 'No, I\'ll stay and save them.', actionButtonText: 'Yes, Leave and Ignore Changes', headerText: 'Unsaved Changes', bodyText: 'You have unsaved changes. Do you want to leave the page?' }; modalService.showModal({}, modalOptions).then(function (result) { if (result) { // clear the current forms formNames = []; dirtyCallbacks = {}; $state.go(newState, newParams); //Go to page they're interested in } else { $state.go(fromState, fromParams); //Stay on the page and have tab revert to fromState } }); return; }); $rootScope.$on('$stateChangeSuccess', function () { // be sure to clear the registered forms when change was successful formNames = []; dirtyCallbacks = {}; }); var service = { // Register a form by giving the scope it's contained in and its name register: function (scope, name) { scope.$on('$destroy', function () { // e.g. an ng-if may destroy the scope, so make sure to remove this form again service.remove(name); }); formNames.push(na…
answers question: http://stackoverflow.com/q/29394605
has comment: http://stackoverflow.com/comment/46997516
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29394605

http://stackoverflow.com/comment/58869832
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/30993285
has text: @RandallB seems like they have moved the docs, updated the link :)

http://stackoverflow.com/a/29505464
has comment: http://stackoverflow.com/comment/47212155
has comment: http://stackoverflow.com/comment/47229101
upvote count: 2
has comment: http://stackoverflow.com/comment/47272432
type: AcceptedAnswer
downvote count: 1
accepted answer of: http://stackoverflow.com/q/29505397
has body: Adjustment ... function removeBy(textArray) { var capture = false; rebuild = []; for (var i=0,len=textArray.length; i&lt;len; i++) { var s = textArray[i].trim(); if (s.substring(0,3).toUpperCase()==="BY ") { capture = true; } else if (capture &amp;&amp; s!=="") { capture = false; } if (capture) { rebuild.push(s); } } return rebuild; } This function assumes you are sending an array of strings and returns a stripped array. var answer = removeBy(["By Bob", "", "", "This is the result"]); // answer = ["By Bob"]; Fiddle: http://jsfiddle.net/rfornal/ojL72L8b/ If the incoming data is separated by line-breaks, you can use the .strip() function to make the textArray; In reverse, the rebuild returned can be put back together with answer.join("\n"); UPDATE Based on comments, changed substring to (0,3) and compared against "BY " (space) to ONLY watch for BY not something like BYA. Updated Fiddle: http://jsfiddle.net/rfornal/b5gvk48c/1/
answers question: http://stackoverflow.com/q/29505397
type: Answer
score: 1

http://stackoverflow.com/a/29425308
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47029910
type: Answer
answers question: http://stackoverflow.com/q/29424778
accepted answer of: http://stackoverflow.com/q/29424778
score: 2
downvote count: 0
has body: A clean JavaScript solution: Set the length of the form: var form = document.querySelector("#myForm"); // document.getElementById("myForm") is also working var formLength = form.length; form[0] first tag form[1] second tag ... form[0].name &lt;input name="name"...&gt; form[0].value &lt;input value="inputValue"...&gt; ... Set an object to store these dates: var obj = {}; After clicking the button go through the form and store the dates in the object: for(var i = 0; i &lt; formLength; i += 1) { obj[form[i].name] = form[i].value; } At last stringify your object: var json = JSON.stringify(obj); http://jsfiddle.net/Lcae8p8f/1/
upvote count: 2
has comment: http://stackoverflow.com/comment/47029716

http://stackoverflow.com/q/29461562
score: 1
tagged with: backbone-views
has body: I've create dynamic popup in my Backbone.view by clicking button: var Section = Backbone.View.extend({ className: 'sqs-frontend-overlay-editor-widget-section', events:{ 'click .sqs--section--control__edit': 'Section_control' }, initialize: function(){ }, render: function(){ this.$el.append(_.template(_section).apply(this.options)); return this.$el; }, Section_control: function(){ var me = this; require(['View/Popup/Section_control'], function(_Section_control){ var sec = new _Section_control({popup: popup, sec: me.options.section}); var popup = new Popup({content: sec.render()}); }); } }); return Section; in the created dynamic popup i have button with trigger: events:{ 'click .module-invert-mode': 'invert' }, invert: function(e){ console.log('hello'); if(this.options.sec.hasClass('.module-invert')) { console.log('yse'); } this.options.sec.toggleClass('module-invert'); this.options.sec.trigger('invertChange'); }, and button invertChange trigger: el.on("invertChange", function(e){ var section = el.parents('section'); var index = section.index(); var model = collection.at(index); model.set(Helper.sectionToObj(section),{doReload: true}) }); take a look at the {doReload: true} function that i call in invertChange: change: function(model, options){ me = this; if( model._changing &amp;&amp; options.doReload ) { $.ajax({ url: 'wp-admin/admin-ajax.php', type: 'post', data: { action: 'getShortcode', shortcode: model.attributes.shortcode }, success: function (data) { //var section = $(data); me.$el.find('section:eq(' + model.collection.indexOf(model) + ')').replaceWith(data); me.add( model, model.collection ); //me.collection.add({shortcode: model.attributes.shortcode}, {at: section.index()}); } }); } }, the problem is when I create dynamic popup and click on the button with invertChange trigger, ajax works only once, when I click on button in popup again, ajax doesn't works ( next ajax request works only if close and create dynamic popup again). How I can call ajax without c…
has answer: http://stackoverflow.com/a/29468425
upvote count: 1
has title: Click function doesn't work after ajax call in dynamic element (Backbone)
type: Question
accepted answer: http://stackoverflow.com/a/29468425
tagged with: javascript
has comment: http://stackoverflow.com/comment/47095523
has comment: http://stackoverflow.com/comment/47088047
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: backbone.js
tagged with: ajax
type: AnsweredQuestion

http://stackoverflow.com/comment/47167644
type: Comment
type: QuestionComment
has text: What file is your javascript located in on the site?
score: 0
comment on: http://stackoverflow.com/q/29505166

dom
tags question: http://stackoverflow.com/q/29386842
tags question: http://stackoverflow.com/q/29485850
type: Tag
tags question: http://stackoverflow.com/q/29462699
tags question: http://stackoverflow.com/q/29516372
tags question: http://stackoverflow.com/q/29387657
tags question: http://stackoverflow.com/q/29479583
tags question: http://stackoverflow.com/q/29429416
tags question: http://stackoverflow.com/q/29416423
tags question: http://stackoverflow.com/q/29395895
tags question: http://stackoverflow.com/q/29405279
tags question: http://stackoverflow.com/q/29485537
tags question: http://stackoverflow.com/q/29448880
tags question: http://stackoverflow.com/q/29428324
tags question: http://stackoverflow.com/q/29499486
tags question: http://stackoverflow.com/q/29438876
tags question: http://stackoverflow.com/q/29508678
tags question: http://stackoverflow.com/q/29459232
tags question: http://stackoverflow.com/q/29435593
tags question: http://stackoverflow.com/q/29518762
tags question: http://stackoverflow.com/q/29416409
tags question: http://stackoverflow.com/q/29396769
tags question: http://stackoverflow.com/q/29430354
tags question: http://stackoverflow.com/q/29423662
tags question: http://stackoverflow.com/q/29500820
tags question: http://stackoverflow.com/q/29471291
tags question: http://stackoverflow.com/q/29465123
tags question: http://stackoverflow.com/q/29509953
tags question: http://stackoverflow.com/q/29459297
tags question: http://stackoverflow.com/q/29414422
tags question: http://stackoverflow.com/q/29522361
tags question: http://stackoverflow.com/q/29458722
tags question: http://stackoverflow.com/q/29524609
tags question: http://stackoverflow.com/q/29428746
tags question: http://stackoverflow.com/q/29503828
tags question: http://stackoverflow.com/q/29404754
tag name: dom
tags question: http://stackoverflow.com/q/29514338
tags question: http://stackoverflow.com/q/29454230
tags question: http://stackoverflow.com/q/29414114
tags question: http://stackoverflow.com/q/29490407
tags question: http://stackoverflow.com/q/29481427
tags question: http://stackoverflow.com/q/29451303
tags question: http://stackoverflow.com/q/29466953
tags question: http://stackoverflow.com/q/29524560

http://stackoverflow.com/comment/61518260
has text: Hi @Henrik, it sounds like you've answered your own question ;). This question/answer is useful for the huge number of people not using Webpack, but you're right: if you're using a system which is already polyfilling for you, don't manually add a polyfill.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/31166888

http://stackoverflow.com/comment/46929058
score: 0
type: AnswerComment
type: Comment
has text: If it works for you and answers your question don't forget to mark it (or the best one) as the answer in order to help others.
comment on: http://stackoverflow.com/a/29374197

http://stackoverflow.com/a/29415742
has comment: http://stackoverflow.com/comment/105753452
score: 8
upvote count: 8
type: Answer
has body: You should be looking at chrome.browserAction API. Specifically: chrome.browserAction.setPopup(object details) Sets the html document to be opened as a popup when the user clicks on the browser action's icon. So, to set your popup, you would call it like this: chrome.browserAction.setPopup({popup: "logged_in.html"}); You can do this when you understand that the user is logged in; however, you may want to restore this state when extension is restarted. To do so, you should save the fact that you are logged in (or out) in persistent storage and call this function on initialization. An event script is a good place to do so. // wherever you can do this in your code function login_success() { /* ... */ chrome.storage.local.set({logged_in: true}); chrome.browserAction.setPopup({popup: "logged_in.html"}); } function login_failure() { /* ... */ chrome.storage.local.set({logged_in: false}); chrome.browserAction.setPopup({popup: "default.html"}); } // This goes into eventPage.js and executes once on extension load chrome.storage.local.get("logged_in", function(data) { if(data.logged_in) chrome.browserAction.setPopup({popup: "logged_in.html"}); });
has comment: http://stackoverflow.com/comment/47005015
has comment: http://stackoverflow.com/comment/98657589
accepted answer of: http://stackoverflow.com/q/29412317
has comment: http://stackoverflow.com/comment/97239296
answers question: http://stackoverflow.com/q/29412317
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/q/29414215
has comment: http://stackoverflow.com/comment/47005778
has comment: http://stackoverflow.com/comment/47005611
has comment: http://stackoverflow.com/comment/47005634
has comment: http://stackoverflow.com/comment/47001288
has comment: http://stackoverflow.com/comment/47005987
tagged with: javascript
score: -1
upvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/25254355
has comment: http://stackoverflow.com/comment/47005885
has comment: http://stackoverflow.com/comment/47005330
has comment: http://stackoverflow.com/comment/47005653
tagged with: asynchronous
favorite count: 0
linked to: http://stackoverflow.com/q/14220321
has title: trying to understand scope around promises
linked to: http://stackoverflow.com/q/4296505
has comment: http://stackoverflow.com/comment/47006071
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47005747
has comment: http://stackoverflow.com/comment/47005818
tagged with: node.js
has comment: http://stackoverflow.com/comment/47005738
has comment: http://stackoverflow.com/comment/47006445
has comment: http://stackoverflow.com/comment/47001563
has comment: http://stackoverflow.com/comment/47004662
has answer: http://stackoverflow.com/a/29414276
has body: Promises are confusing. The below is obviously bad, incomplete and not how I would actually go about doing it but should be enough to clear up my questions. Given the below code, is the if statement blocked until the User.find promise is resolved? or is it a race condition to the console.log at the end? var user = null; if (....) { User.find(123) .on("success", function(u) { user = u; }); } else { // do something else to user } console.log(user.Name); Likewise, if there is a promise being called within a promise is the outer promise(User.find) blocked until the inner one(Posts.findAll) is resolved? Again I know this is bad code, just trying to work out the flow and scope in my head. var postlist = []; User.find(123) .on("success", function(user) { Posts.findAll({where:{user_id:user.id}}) .on("success", function(posts) { postlist = posts}); }); console.log(postlist); Again, I am not looking for the "correct or best" way of doing this, just trying to get a grasp on the flow and scope. Sorry to keep reiterating it, but I've grown tired of people not answering the questions asked in loo of offering their advice -- bad experiences on other sites, hopefully that wont happen here.
has comment: http://stackoverflow.com/comment/47005736
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47005497

http://stackoverflow.com/comment/47131476
score: 2
comment on: http://stackoverflow.com/q/29485980
type: QuestionComment
has text: first print repl4 to check what it returns.Is there any string or special char occurs or not.
type: Comment

http://stackoverflow.com/comment/46965408
comment on: http://stackoverflow.com/a/29394083
type: Comment
has text: Yes, that would work. if your going to do it via jquery remember to use $scope.$apply();
type: AnswerComment
score: 0

http://stackoverflow.com/comment/47416243
type: Comment
has text: You can't tell if the client has received the `ghI` collection?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29399850

http://stackoverflow.com/tag/pdf
tags question: http://stackoverflow.com/q/29408039
tags question: http://stackoverflow.com/q/29414927
tags question: http://stackoverflow.com/q/29381899
tags question: http://stackoverflow.com/q/29519640
type: Tag
tag name: pdf
tags question: http://stackoverflow.com/q/29470866
tags question: http://stackoverflow.com/q/29414114
tags question: http://stackoverflow.com/q/29505485
tags question: http://stackoverflow.com/q/29465655
tags question: http://stackoverflow.com/q/29421398

http://stackoverflow.com/a/29423767
answers question: http://stackoverflow.com/q/29423716
downvote count: 0
has comment: http://stackoverflow.com/comment/47019568
has comment: http://stackoverflow.com/comment/47019309
score: 1
has comment: http://stackoverflow.com/comment/47071032
has comment: http://stackoverflow.com/comment/47019635
has comment: http://stackoverflow.com/comment/47019670
has comment: http://stackoverflow.com/comment/47019269
has comment: http://stackoverflow.com/comment/47019514
has comment: http://stackoverflow.com/comment/47019393
has comment: http://stackoverflow.com/comment/47076440
has comment: http://stackoverflow.com/comment/47085055
upvote count: 1
has comment: http://stackoverflow.com/comment/47070462
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47024477
has comment: http://stackoverflow.com/comment/47074282
has comment: http://stackoverflow.com/comment/47074489
accepted answer of: http://stackoverflow.com/q/29423716
type: Answer
has comment: http://stackoverflow.com/comment/47036141
has comment: http://stackoverflow.com/comment/47019508
has body: Check for text or html: Without content $(document).ready(function() { if ( $("#content").text() ){ $('input#bt23').show(); } else { $('input#bt23').hide(); } }); With content $(document).ready(function() { if ( $("#content").text() ){ $('input#bt23').show(); } else { $('input#bt23').hide(); } }); Content here With spaces only $(document).ready(function() { if ( $("#content").text().trim() ){ $('input#bt23').show(); } else { $('input#bt23').hide(); } }); Checking for a specific div We can be a little creative here. Let's say we're looking for the .video_wrapper div inside the content. We can simply query for it, and if it's not found, the returned length will be zero, causing the input to hide. $(document).ready(function() { console.log($("#content .video-wrapper")); if ($("#content .video-wrapper").length > 0) { $('input#bt23').show(); } else { $('input#bt23').hide(); } }); Checking for a specific div - plain JS function windowReady() { if (document.querySelector("#content .video-wrapper")) { document.getElementById('bt23').style.display = "block"; } else { document.getElementById('bt23').style.display = "none"; } }; window.onload = windowReady;

http://stackoverflow.com/comment/46963127
type: Comment
type: QuestionComment
score: 0
has text: Well Alex it can, just not in typical browsers that are concerned about user security.
comment on: http://stackoverflow.com/q/29393141

http://stackoverflow.com/q/29411964
score: 0
has answer: http://stackoverflow.com/a/29414515
tagged with: cordova
type: UnansweredQuestion
has body: From this line I am trying to call a javascript function Browser its working fine, only in phonegap android its not working. I tried many things nothing is working if I put only container-fluid its not working Complete code <!--[if lt IE 9]> <![endif]--> Start Bootstrap Dashboard Shortcuts Overview Events About Services Contact ** ** Shop by Category Women Men Kids Accessories Brands Deals New looks Top sellers
type: Question
answer count: 1
tagged with: javascript
has title: PhoneGap onclick not getting called

http://stackoverflow.com/comment/47009133
type: AnswerComment
has text: Do you mean that I can sometimes reuse them? Or in other words, they aren't temporary values?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29418087

http://stackoverflow.com/q/29442011
has answer: http://stackoverflow.com/a/29442026
tagged with: javascript
type: UnansweredQuestion
has body: I have a table which fetches amounts in row. Need to find minimum amount on that row I am trying this code but I am getting vm.MinimumAmount as nan function minAmount(totalarray) { vm.MinimumAmount = Math.min(totalarray) }
tagged with: angularjs
type: Question
has title: Angular JS find minimum value in a row
score: 0
answer count: 1

http://stackoverflow.com/q/29390206
tagged with: session-variables
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29390351
has comment: http://stackoverflow.com/comment/46957716
tagged with: php
has comment: http://stackoverflow.com/comment/46957739
has comment: http://stackoverflow.com/comment/46957851
has title: session set in jquery cant able to get in php
has body: index.js file sessionStorage.setItem('name', 'xxxx'); login.php &lt;?php echo $_SESSION['name'] ?&gt; in my index.html page i get the name and store it in session using javascript after the page will navigate to login.php in that i cant able to get the session variable pls do help me to solve the issue.
type: Question
has comment: http://stackoverflow.com/comment/46957697
answer count: 2
score: 2
tagged with: session
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29390382
has comment: http://stackoverflow.com/comment/46957708
has comment: http://stackoverflow.com/comment/46957958

http://stackoverflow.com/q/29481186
answer count: 1
has answer: http://stackoverflow.com/a/29481674
accepted answer: http://stackoverflow.com/a/29481674
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47123823
type: Question
tagged with: javascript
has title: offset.Top in relative container with pageY calculations
has body: I got a script that is a direction aware hover. It work's great but the thing is, I have to use relative container. If I use one, the calculations got all wrong because offsetTop counts from the container and not body. When I use pageY and pageX in the calculations I get wrong result. y = (ev.pageY - obj.offsetTop - (h / 2) * (h &gt; w ? (w / h) : 1)), x = (ev.pageX - obj.offsetLeft - (w / 2) * (w &gt; h ? (h / w) : 1)), I got fiddle with console.log: https://jsfiddle.net/zvny953x/ What I need to achieve is, obj.offsetTop and obj.offsetLeft will ignore relative container. Guess it's not possible so I have to calculate it's position according to element position in the whole document not only container Let say I got that container really down in the webpage and it's what console.log says: pageY: 2682 pageX: 1050 obj.offsetTop: 235 obj.offsetLeft: 101 What it should look like: pageY: 2765 pageX: 91 obj.offsetTop: 2682 obj.offsetLeft: 101 Hope you get the point.
score: 0

http://stackoverflow.com/comment/47110660
type: Comment
comment on: http://stackoverflow.com/a/29470962
has text: Sorry I had to go away unexpectadly. Basically what I am trying to do: If you are on another subpage, then the .tabLink links in the navigation should take you to the correct subpage and select the correct tab (this works), but once you are on the correct page, then they should just open the correct tab. - So the links should work both for external and internal linking. I hope I am explaining it correctly. I tried the above and looked at the jsfiddle you posted, but I still cant get it to work- the URL of the page changes, but the tab is not selected/opened.
type: AnswerComment
score: 0

http://stackoverflow.com/a/29466758
downvote count: 0
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29466567
has comment: http://stackoverflow.com/comment/47099404
has body: here is a way : html: pause play js: $(document).ready(function() { $("#pause").click(function() { $(this).hide(); $("#play").show(); $("#aa").stop(true,false); audioTag1.pause(); }); $("#play").click(function() { $(this).hide(); $("#pause").show(); animateaa(); }); }); fiddle: http://jsfiddle.net/98cc94nb/ or: http://jsfiddle.net/98cc94nb/1/

http://stackoverflow.com/q/29478685
score: -1
type: Question
tagged with: google-maps
tagged with: google-maps-markers
upvote count: 0
has body: I'm using the Google Maps API for a web app and I'm trying to delete a single group of markers depending on the input distance, but all I can do is delete all markers with the following code I found in the google Api's documentation: clearMarkers(); markers = []; how can I keep track of every marker and delete/hide it individually?
has answer: http://stackoverflow.com/a/44282798
tagged with: javascript
has title: delete a specific google maps marker
tagged with: marker
tagged with: google-maps-api-3
answer count: 3
favorite count: 0
type: UnansweredQuestion
downvote count: 1
has answer: http://stackoverflow.com/a/29478787
has answer: http://stackoverflow.com/a/29479359

http://stackoverflow.com/q/29490993
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47218916
has title: Disable tooltip for 0 value in NVD3 multiBarHorizontalChart
score: 2
type: Question
upvote count: 2
has body: I'm using nvd3 for a multiBarHorizontalChart,i need guidance on how to disable tooltip for 0 values. .tooltip(function(key, x, y, e) { return '&lt;h3&gt;' + key + ' ' + e.point.label + '&lt;/h3&gt;' + '&lt;p&gt;' + y + '&lt;/p&gt;'; }) This function i am using to display tooltip value.
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/30822248
tagged with: nvd3.js
downvote count: 0

http://stackoverflow.com/comment/47162055
has text: @levi you're right, but since the instruction was to "Sum all the integers you find" I think that's not necessary.
comment on: http://stackoverflow.com/a/29501256
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29385939
answers question: http://stackoverflow.com/q/29385718
has body: How to read text file in JavaScript here you can see how to read files with javascript. Once you you have the text in a string variable, apply the .search method. http://www.w3schools.com/jsref/jsref_search.asp
score: 0
type: Answer

http://stackoverflow.com/comment/47117012
has text: If the content is loaded with ajax, you would probably have to look for some handler to hook into in the source of that page ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29478166

http://stackoverflow.com/q/29519140
tagged with: http://stackoverflow.com/tag/html
score: 0
accepted answer: http://stackoverflow.com/a/29520002
answer count: 1
has body: Is it possible for my sidebar button and my infoWindow to have different strings but refer to the same location? Here's a sample of my code &lt; script src = "https://maps.googleapis.com/maps/api/js?KEY=AIzaSyCo0yGy0Qk9b1x4pFDnk_rMQibhBroLW8M" &gt; &lt; /script&gt; &lt;script&gt; var restaurantList = [{ 'latlng': [6.428073, 3.421507], name: 'RSVP' }, { 'latlng': [6.426412, 3.414347], name: 'Izanagi' }, { 'latlng': [6.433162, 3.423306], name: 'Bistro 7' }, { 'latlng': [6.429500, 3.420479], name: 'Spice Route' }, { 'latlng': [6.428518, 3.428305], name: '355' }, ]; var infoWnd, mapCanvas; function intialize() { mapCanvas = new google.maps.Map(document.getElementById('map_canvas'), { disableDefaultUI: true, scrollwheel: false, draggable: true, zoom: 14, center: new google.maps.LatLng(6.456528, 3.408272), mapTypeId: google.maps.MapTypeId.ROADMAP }); infoWnd = new google.maps.InfoWindow(); var bounds = new google.maps.LatLngBounds(); var restaurant, i, latlng; for (i in restaurantList) { restaurant = restaurantList[i]; latlng = new google.maps.LatLng(restaurant.latlng[0], restaurant.latlng[1]); bounds.extend(latlng); var marker = createMarker( mapCanvas, latlng, restaurant.name ); createMarkerButton(marker); } mapCanvas.fitBounds(bounds); } var iconBase = 'http://maps.google.com/mapfiles/kml/pal2/'; function createMarker(map, latlng, title) { var marker = new google.maps.Marker({ position: latlng, map: map, icon: iconBase + 'icon44.png', title: title }); google.maps.event.addListener(marker, "click", function() { infoWnd.setContent("&lt;strong&gt;" + title + "&lt;/title&gt;"); infoWnd.open(map, marker); }); google.maps.event.addListener(marker, 'click', function() { map.setZoom(17); map.setCenter(marker.getPosition()); }); return marker; } function createMarkerButton(marker) { var ul = document.getElementById("marker_list"); var li = document.createElement("li"); var title = marker.getTitle(); li.innerHTML = title; ul.appendChild(li); google.maps.event.addDomListener(li, …
tagged with: javascript
tagged with: google-maps-api-3
tagged with: google-maps
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29520002
type: Question
has title: Is it possible for Sidebar button and infoWindow have different content?

http://stackoverflow.com/a/29426048
has body: I encountered this issue while I was using Vagrant with nginx. The solution was to just turn off sendfile directive from nginx configuration. sendfile off;
has comment: http://stackoverflow.com/comment/47146696
answers question: http://stackoverflow.com/q/29414917
has comment: http://stackoverflow.com/comment/47146511
accepted answer of: http://stackoverflow.com/q/29414917
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/47117863
type: QuestionComment
comment on: http://stackoverflow.com/q/29478571
has text: Are you defining your own insert method for the collection in your js file?
score: 0
type: Comment

http://stackoverflow.com/a/29512912
upvote count: 3
type: Answer
accepted answer of: http://stackoverflow.com/q/29512795
answers question: http://stackoverflow.com/q/29512795
has comment: http://stackoverflow.com/comment/47182178
downvote count: 0
has comment: http://stackoverflow.com/comment/47181558
score: 3
has body: Client Side You want to validate input on the client side first because you can give better feedback to the average user. For example, if they enter an invalid email address and move to the next field, you can show an error message immediately. That way the user can correct every field before they submit the form. If you only validate on the server, they have to submit the form, get an error message, and try to hunt down the problem. (This pain can be eased by making "sticky" forms where the server remembers what was entered in each field and fills it back in, but client-side validation is still faster.) Server Side You want to validate on the server side because you can protect against the malicious user, who can easily bypass your JavaScript and submit dangerous input to the server. It is very dangerous to trust your UI. Not only can they abuse your UI, but they may not be using your UI at all, or even a browser. What if the user manually edits the URL, or runs their own Javascript, or tweaks their HTTP requests with another tool? What if they send custom HTTP requests from curl, for example? Not allowing for that is not only naive from a security standpoint, but also non-standard: a client should be allowed to send HTTP by whatever means they wish, and you should respond correctly. That includes validation. FOR MORE REFERENCE
type: AcceptedAnswer

http://stackoverflow.com/comment/47138578
type: Comment
has text: aha, yes! Adding jQuery 1.7.2 fixed the problem! Thank you!
comment on: http://stackoverflow.com/a/29489651
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46928311
score: 3
comment on: http://stackoverflow.com/q/29373872
type: Comment
type: QuestionComment
has text: Because only form elements (almost) are focusable, and only focused elements can detect keyboard events. You can add `tabindex="0"` to the `div` [to gain focus](http://jsfiddle.net/rvL64c7j/) to it.

http://stackoverflow.com/q/29411714
answer count: 1
has title: JavaScript array value setting error?
type: UnansweredQuestion
has body: I was trying to make a small javascript game when I ran into a problem: I couldn't set the value of previous segments in an array. To make it more clear, here is an example: for (var a = 0; a &lt;= 100; a++) { if (grid[a].num == 2) { grid[a + 1].num++; grid[a - 1].num++; grid[a].num = 0; } } The attribute 'num' of of grid[a+1] increased just fine, but nothing happened to the attribute 'num' of grid[a-1]. Why does this happen and how can I get over this problem?
has comment: http://stackoverflow.com/comment/47092337
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/29411784
tagged with: arrays
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html

netsuite
tags question: http://stackoverflow.com/q/29466832
tag name: netsuite
tags question: http://stackoverflow.com/q/29435063
type: Tag
tags question: http://stackoverflow.com/q/29506712

http://stackoverflow.com/q/29417584
has body: I've been struggling to get this to work using the $.Deferred object. Here is the stubbed setup. g_plans = []; $(function(){ // I have to use a custom ajax function, but it returns a promise obj var pageLoadPromise.ajax{( url: //call to webmethod }); pageLoadPromise.done(matrix.buildGrid); ... }); (function(matrix,$,undefined){ var matrix.buildGrid = function(components){ var gridData = data.d.components; buildHeader(gridData); buildRows(gridData); }; function buildHeader(components){ $.each(components,function(key,component){ //does some stuff if(this === that){ //do some other stuff } else{ getPlans(copmonent.COMPONENT_ID); //does other stuff } }); } } function buildRows(components){ //does stuff, but uses data from getPlans } function getPlans(component){ var planPromise = ajax({ url: //call to webmethod data:{ componentId:component} planPromise.done(function(data){ g_plans.push({componentId:componentId,plans:data.d.plans}); }); } })(window.matrix = window.matrix || {}, jQuery); The problem is buildRows starts before the getPlans has time to finish it's ajax call, which is causing my issue. I have tried a few things with no success. Any help would be appreciated.
has answer: http://stackoverflow.com/a/29418724
upvote count: 1
type: Question
score: 1
has title: Wait for ajax return while in loop jquery
accepted answer: http://stackoverflow.com/a/29418724
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
type: AnsweredQuestion

http://stackoverflow.com/comment/47069152
has text: @TTK: For that, an array is the perfectly legitimate solution.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29430374

http://stackoverflow.com/a/29436545
type: Answer
has comment: http://stackoverflow.com/comment/47130127
has body: You could be able to create a variable for limitTo in the controller and only set it after you get length of filtered list: HTML &lt;tr ng-repeat="person in peopleList | filter:query | orderBy:orderByField:reverseSort | limitTo:limit" ng-if="lastResult($index)"&gt; Controller $scope.limit = ($scope.itemsPerPage*$scope.currentPage); $scope.filterApplied = function (filteredList, query) { $scope.filteredItems = $filter('filter')(filteredList, query); if ($scope.filteredItems != null) { $scope.limit=0; $scope.totalItems = filteredList.length; $scope.limit = ($scope.itemsPerPage*$scope.currentPage); } };
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/29433017

http://stackoverflow.com/a/29484309
has body: This is how you can handle for highlighted via tab then enter key //keypress event $('a').click(function(e) { console.log(e); // Screen Positions returns 0 on enter if( e.screenX == 0 &amp;&amp; e.screenY == 0 ) { alert('Enter'); } else if( e.type == "click" ) { alert('click'); } }); DEMO Ofcause rest you will detect easily.
answers question: http://stackoverflow.com/q/29484179
has comment: http://stackoverflow.com/comment/47132443
type: Answer
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/47128851

http://stackoverflow.com/a/29401343
has comment: http://stackoverflow.com/comment/46978358
has comment: http://stackoverflow.com/comment/46979025
has comment: http://stackoverflow.com/comment/46978432
has body: I would suggest first to integrate the AngularJS to work together with blade template engine in Laravel. This can be done easy with angular service called interpolation. Here is how you will make it: &lt;script&gt; var customInterpolationApp = angular.module('customInterpolationApp', []); customInterpolationApp.config(function($interpolateProvider) { $interpolateProvider.startSymbol(''); $interpolateProvider.endSymbol(''); }); customInterpolationApp.controller('DemoController', function() { this.label = "This binding is brought you by [[ ]] interpolation symbols."; }); &lt;/script&gt; &lt;div ng-app="App" ng-controller="DemoController as demo"&gt; demo.label &lt;/div&gt; Here is angularjs page explaning the $interpolateProvider This way you will not have conflict between AngularJS and Blade Template Engine You should load it with AngularJS You should attach the result to a $scope.links in a custom AngularJS controller. Based on the code from step 1 you can inject $http into anonymous DemoController function, and after this inside controller do something like this: var self = this; $http.get('YOUR API LINK', function (data) { self.links = data; });
answers question: http://stackoverflow.com/q/29401144
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29401144
has comment: http://stackoverflow.com/comment/46978463
has comment: http://stackoverflow.com/comment/46978528
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46978917
has comment: http://stackoverflow.com/comment/46978596

http://stackoverflow.com/a/31133702
type: Answer
has body: this is my issue too , and over spending 2 hours , I fnally fixed that . Go to http://adbdriver.com/downloads/ download and check if your adb driver is install right or not ? If wrong , please reinstall it. Access to C:\Users\NAME\AppData\Local\Android\android-sdk\platform-tools , open cmd from here ( Shift + right click) and type : adb devices . You should see a device in the list. Back to your chrome://inspect/#devices and you will see your devices ready for inspect .
score: 0
answers question: http://stackoverflow.com/q/29418970

http://stackoverflow.com/comment/47787735
comment on: http://stackoverflow.com/a/29459204
has text: The values were still be stored within the console... I ended up figuring things out and got things to work. I'm not at my computer right now but will post my code later to show you what exactly I pulled off. Thanks for all the help!!! :o)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29528390
tagged with: sql
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/29528472
has body: I am getting a dateTime back from the stored procedure getDateTime. The format I recieve it back in is very weird (shown below) This is how it looks (incorrect return) {"dateTime":"Wed Apr 01 2015 04:00:00 GMT+0000 (Coordinated Universal Time)","Thu Apr 02 2015 12:00:00 GMT+0000 (Coordinated Universal Time)"}]} This is what I want it to return {"dateTime":["2015-04-01T04:00:00Z","2015-04-02T12:00:00Z"]} Here is the code that get the dateTime mssql.query("EXEC getDateTime ?", [meetingID], { success: function(results) { var length = results.length; var dateTime = results[0].meetingDateTime; //this part!!!! for (var x= 1; x &lt; length; x++) { dateTime = dateTime + results[x].meetingDateTime } }
has answer: http://stackoverflow.com/a/29528472
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29528551
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/47211125
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47210983
has title: Return DateTime from database in JSON format using javascript
accepted answer: http://stackoverflow.com/a/29528551
answer count: 2

http://stackoverflow.com/a/29383577
has body: To answer your questions: 1) Nope. What you have observed is correct. Modifying a prototype affects all objects that utilize that prototype. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain 2) Yes. Rather than using primitives, you can use a simple object like so: var a = { id: 1234, value: "abc" }; var b = { id: 5678, value: "def" }; 3) Probably not... See 1 :)
type: Answer
answers question: http://stackoverflow.com/q/29383144
score: 0

http://stackoverflow.com/comment/46965137
has text: Well both I guess, I know it will work but I guess I was wondering is it allowed or will I run into trouble doing it this way
type: Comment
comment on: http://stackoverflow.com/a/29394238
type: AnswerComment
score: 0

http://stackoverflow.com/a/29421960
accepted answer of: http://stackoverflow.com/q/29421300
downvote count: 0
answers question: http://stackoverflow.com/q/29421300
type: Answer
upvote count: 1
has body: Maybe you need another data model - let's call it a LanguageSelection: var LanguageSelection, PageModel, pageModel; LanguageSelection = function LanguageSelection() { this.language = ko.observable(); }; PageModel = function PageModel(){ this.availableLanguages = ko.observableArray([ "English", "Spanish", "German", "Russian" ]); this.languageSelections = ko.observableArray([]); } pageModel = new PageModel(); pageModel.languageSelections.push( new LanguageSelection() ); pageModel.languageSelections.push( new LanguageSelection() ); pageModel.languageSelections.push( new LanguageSelection() ); ko.applyBindings( pageModel ); When I update it here I want to see the update here
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47016233

http://stackoverflow.com/comment/47094318
type: Comment
has text: This was essentially what happened, the browser console returned `undefined` on the first try but the variable was actually set.
comment on: http://stackoverflow.com/a/29455727
type: AnswerComment
score: 0

http://stackoverflow.com/a/29380451
score: 1
has body: the problem is with ng-model-options="{ updateOn: 'blur' }" on your select, this tells angular to update your ng-model just after you "clicked out" of the select, remove that ng-model-options, and this should be fine
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29379448
has comment: http://stackoverflow.com/comment/46961854
answers question: http://stackoverflow.com/q/29379448
type: Answer
downvote count: 0

http://stackoverflow.com/q/29453105
has comment: http://stackoverflow.com/comment/47071779
tagged with: node.js
score: 2
upvote count: 2
type: UnansweredQuestion
has body: I am currently going through the nodeschool.io tutorial on Javascript. This is a sample code from one of the solutions. module.exports = function (dir, filterStr, callback) { fs.readdir(dir, function (err, list) { if (err) return callback(err) list = list.filter(function (file) { return path.extname(file) === '.' + filterStr }) callback(null, list) }) } From what I understand, javascript is a synchronous language. However, node.js uses asynchronous functions. In this code, isn't it possible for the callback to happen before the if statement. Therefore, is there even any reason to have functions that are different from the format function(params, callback){ // one line data manipulation callback(); }
type: Question
tagged with: synchronous
has comment: http://stackoverflow.com/comment/47071853
has comment: http://stackoverflow.com/comment/47071710
tagged with: javascript
has answer: http://stackoverflow.com/a/29453203
has answer: http://stackoverflow.com/a/29453230
answer count: 3
has comment: http://stackoverflow.com/comment/47071914
has answer: http://stackoverflow.com/a/29453286
downvote count: 0
has title: Asynchronous vs synchronous in javascript functions. (Node.js)
tagged with: asynchronous
favorite count: 0

http://stackoverflow.com/comment/92706838
comment on: http://stackoverflow.com/a/30245167
type: AnswerComment
score: 0
type: Comment
has text: only completing that to get the soap results after button click, you could use the following code: soup_level2 = BeautifulSoup(driver.page_source, 'html.parser')

http://stackoverflow.com/q/29458184
has comment: http://stackoverflow.com/comment/47080597
has comment: http://stackoverflow.com/comment/47080712
tagged with: tinymce-4
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/47081435
tagged with: javascript
has comment: http://stackoverflow.com/comment/47080567
has title: TinyMCE instance dissapears when switching angular route options
has body: I'm trying to build a dashboard with AngularJS where I have a couple of different routing options. On some of those options (pages) I'm trying to use a TinyMCE editor. I've written a directive for the textarea and tinymce and that works fine. The problem I'm facing now is that whenever I switch options (pages), the TinyMCE instance seems to dissapear. So keep in mind that the TinyMCE appears normally when I load the routing option first, but when I start switching around to other options and back things start to break and all I see is a plain textfield with no controls or anything. No error messages are happening or whatsoever so I don't really know what's going on. I do check if the instance is already initialized before I even do that, I just don't know what's wrong :/
accepted answer: http://stackoverflow.com/a/29460725
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47085139
has comment: http://stackoverflow.com/comment/47081959
has answer: http://stackoverflow.com/a/29460725
has comment: http://stackoverflow.com/comment/47082589
has comment: http://stackoverflow.com/comment/47080760
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/comment/47073847
has text: Does the iframe is covering all the page? Does the button overlay cover all the iframe?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29454285
type: Comment

http://stackoverflow.com/comment/46955495
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29388921
score: 0
has text: Where `sendAjaxQuery()` is called?

http://stackoverflow.com/a/29459244
score: 1
type: Answer
upvote count: 1
has body: What happens is that your html get's rendered like this (I've escaped the cr character:) &lt;input id="test" type="hidden" value="a\13 b"&gt; and the browser trims the whitespace, thus deleting the CR character. What you can do is to render urlencode($str) instead of the plain $str variable. This way the browser won't mess with your control characters. You'll have to urldecode on the other side, though.
answers question: http://stackoverflow.com/q/29458722
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29458722

http://stackoverflow.com/a/29404387
accepted answer of: http://stackoverflow.com/q/29404363
type: Answer
has body: $('#total-weight').val(100 - sumWeight) will set the value of the element and return a jQuery object. So your condition will not work. Also you might want to use toggleClass(), since you want to remove the class if the value is >=0 'use strict'; $(document).on('keyup', '.weight-value', function () { // the sum of weight (%) var sumWeight = 0; var totalWeight = 0; $('.weight-value').each(function () { sumWeight += +$(this).val(); }); // end of sum of weight (%) // populate weigth remaining totalWeight = 100 - sumWeight; $('#total-weight').val(totalWeight); $('#total-weight').toggleClass('table-border', totalWeight &lt; 0); }); // end document .on keyup Demo: Fiddle
has comment: http://stackoverflow.com/comment/46984031
answers question: http://stackoverflow.com/q/29404363
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46984122
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29529623
tagged with: javascript
favorite count: 0
answer count: 1
tagged with: quickblox
upvote count: 2
type: UnansweredQuestion
score: 2
type: Question
has answer: http://stackoverflow.com/a/29566084
has comment: http://stackoverflow.com/comment/47246186
has body: I am using quickblox javascript SDK for video calling.Everything has been implemented and running, but the video quality on the connected device is poor.I checked out the javascript docs by quickblox, found nothing there. Does anyone know how the video quality can be improved ? Thanks.
has comment: http://stackoverflow.com/comment/47256905
downvote count: 0
has title: Improve video quality when using quickblox javascript SDk

http://stackoverflow.com/comment/47094623
type: Comment
type: QuestionComment
has text: @subas_poudel, here the proper link for the [circle div](http://dabblet.com/gist/3864650)
comment on: http://stackoverflow.com/q/29465688
score: 0

http://stackoverflow.com/comment/47055184
type: QuestionComment
score: 1
has text: What you want is not doable. You cannot use javascript to dynamic load php files.
comment on: http://stackoverflow.com/q/29443759
type: Comment

http://stackoverflow.com/q/29378069
has answer: http://stackoverflow.com/a/29379505
has comment: http://stackoverflow.com/comment/46936510
upvote count: 1
has body: So, I looked up a tutorial for uploading and sending files to a server with an XML HTTP Request. I followed the tutorial, however, I think I must be missing something. While the file appears to be uploaded and sent, nothing in the "handler" file is ever accessed. Is there a PHP function I need to write to process it? For context, here is what I wrote: $(document).ready(function() { $('#upload-button').click(function(event) { $('#upload-button').removeClass("btn-danger"); }); $( "#report-form" ).submit(function( event ) { var form = document.getElementById('report-form'); var fileSelect = document.getElementById('file-select'); var uploadButton = document.getElementById('upload-button'); event.preventDefault(); // Stop the event from sending the way it usually does. uploadButton.value = 'Submitting...'; // Change text. var files = fileSelect.files; var maxfiles = <?php echo $config['Report_MaxFiles'] ?>; var mfs = <?php echo $config['Report_MaxFileSize'] ?>; if(files.length > maxfiles) // Make sure it's not uploading too many. { uploadButton.value = 'You uploaded too many files. The limit is ' + maxfiles + '.'; // Update button text. $('#upload-button').addClass('btn-danger'); // Make the button red, if so. return; } var formData = new FormData(); // Make a "form data" variable. for (var i = 0; i < files.length; i++) { var file = files[i]; // Add the file to the request. if(file.size / 1000 > mfs) { uploadButton.value = 'One of the files is too big. The file size limit is ' + (mfs) + 'kb (' + (mfs / 1000) + 'mb).'; $('#upload-button').addClass('btn-danger'); return; } formData.append('files[]', file, file.name); // Not really sure what this does, to be honest, // but I think it makes a file array. } var xhr = new XMLHttpRequest(); // Construct an XML HTTP Request xhr.open('POST', 'assets/class/FileHandler.php', true); // Open a connection with my handler PHP file. xhr.onload = function () { if (xhr.status === 200) { uploadButton.value = 'Files Submitted!'; // NOTE: I…
tagged with: http
type: Question
has comment: http://stackoverflow.com/comment/46936694
has comment: http://stackoverflow.com/comment/46936859
tagged with: javascript
has comment: http://stackoverflow.com/comment/46936608
has comment: http://stackoverflow.com/comment/46936768
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46937233
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46936430
type: UnansweredQuestion
tagged with: request
tagged with: php
has title: Need Help Handling a XML HTTP File Upload Request
has comment: http://stackoverflow.com/comment/46937435
score: 1

http://stackoverflow.com/q/29527874
answer count: 1
has title: play a looping css animation only while scrolling - stop when scrolling stops
type: AnsweredQuestion
tagged with: javascript
has body: I have a css animation on a fixed div that plays continuously. I would like to have it only play when the user is scrolling and stop when the scroll stops. I'm new to this and can't figure it out for the life of me. my css: .flame { margin:0 auto; position:absolute; width:100px; height:136px; background:url('../images/flame.png') 0px 0px no-repeat; -webkit-animation: flicker .4s infinite; @-webkit-keyframes flicker { /* flame pulses */ 0% { background-position:0px 0px; opacity:.8 } 25% { background-position:0px 0px; } 25.1% { background-position:-100px 0px; } 50% { background-position:-100px 0px; opacity:.4 } 50.1% { background-position:-200px 0px; } 75% { background-position:-200px 0px; } 75.1% { background-position:-100px 0px; } 100% { background-position:-100px 0px; opacity:.8 } My HTML: &lt;div id="flamegroup"&gt; &lt;div class="flame" id="fl1"&gt;&lt;/div&gt; &lt;div class="flame" id="fl2"&gt;&lt;/div&gt; &lt;div class="flame" id="fl3"&gt;&lt;/div&gt; &lt;/div&gt;
tagged with: jquery
has answer: http://stackoverflow.com/a/29528069
type: Question
accepted answer: http://stackoverflow.com/a/29528069
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47209824
tagged with: css
has comment: http://stackoverflow.com/comment/47209938
score: 0

http://stackoverflow.com/q/29482317
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47125389
type: Question
has body: Hi trying to get the total value from an array (ie Arr[1] + Arr[2] etc) However, I can't seem to figure this out. Here is my current function this.hourlyTotals = function() { var custsperhour = Math.floor(Math.random() * (this.maxcust - this.mincust + 1)) + this.mincust; var hourly = custsperhour * this.avgDonuts; this.hourlyArray.push(hourly); return hourly; this.dailyDonuts = function () { for (var i = 0; i &lt; 11; i++) { var ht = this.hourlyTotals(); console.log(ht); this.dailyTotals += ht; } I'm looking to get the total of each 11 arrays. Any clue?
has answer: http://stackoverflow.com/a/29482372
has answer: http://stackoverflow.com/a/29482371
has comment: http://stackoverflow.com/comment/47125250
has comment: http://stackoverflow.com/comment/47125216
score: 0
answer count: 2
tagged with: arrays
tagged with: javascript
has title: Getting the total value of an array
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/53538575
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/32762233
has text: Could you provide a little more context as to how Phantom would be used, instead of just dumping a link to the tool?

http://stackoverflow.com/a/53285045
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29384700
downvote count: 0
has body: Here is what I used to get different color raindrops: var xPositions = []; var yPositions = []; var rainColor = [(color(random(0,255),random(0,255),random(0,255)))]; draw = function() { background(204, 247, 255); var x= random(0,255); var y = random(0,255); var z = random(0,255); mouseReleased = function(){ xPositions.push(mouseX); yPositions.push(mouseY); rainColor.push(color(x, y, z)); }; for (var i = 0; i &lt; xPositions.length; i++) { noStroke(); fill(rainColor[i]); ellipse(xPositions[i], yPositions[i], 10, 10); yPositions[i] += 5; if (yPositions[i] &gt;400){ yPositions[i] = 0; } } };
upvote count: 2

animation
tags question: http://stackoverflow.com/q/29528950
tags question: http://stackoverflow.com/q/29404723
tags question: http://stackoverflow.com/q/29516319
tags question: http://stackoverflow.com/q/29445014
tags question: http://stackoverflow.com/q/29429049
tags question: http://stackoverflow.com/q/29496396
tags question: http://stackoverflow.com/q/29480730
type: Tag
tags question: http://stackoverflow.com/q/29480204
tags question: http://stackoverflow.com/q/29373740
tag name: animation
tags question: http://stackoverflow.com/q/29526438
tags question: http://stackoverflow.com/q/29478254
tags question: http://stackoverflow.com/q/29376467
tags question: http://stackoverflow.com/q/29386710
tags question: http://stackoverflow.com/q/29516461
tags question: http://stackoverflow.com/q/29513628
tags question: http://stackoverflow.com/q/29438983
tags question: http://stackoverflow.com/q/29376053
tags question: http://stackoverflow.com/q/29419118
tags question: http://stackoverflow.com/q/29496648
tags question: http://stackoverflow.com/q/29464566
tags question: http://stackoverflow.com/q/29397919
tags question: http://stackoverflow.com/q/29463739
tags question: http://stackoverflow.com/q/29518816
tags question: http://stackoverflow.com/q/29479094
tags question: http://stackoverflow.com/q/29383319
tags question: http://stackoverflow.com/q/29487914
tags question: http://stackoverflow.com/q/29421377

typescript
tags question: http://stackoverflow.com/q/29458306
tags question: http://stackoverflow.com/q/29476899
tags question: http://stackoverflow.com/q/29434401
tags question: http://stackoverflow.com/q/29432757
tags question: http://stackoverflow.com/q/29423940
tags question: http://stackoverflow.com/q/29431629
tag name: typescript
tags question: http://stackoverflow.com/q/29453127
tags question: http://stackoverflow.com/q/29524416
tags question: http://stackoverflow.com/q/29394919
tags question: http://stackoverflow.com/q/29524810
tags question: http://stackoverflow.com/q/29431630
tags question: http://stackoverflow.com/q/29467148
tags question: http://stackoverflow.com/q/29465903
type: Tag
tags question: http://stackoverflow.com/q/29434386
tags question: http://stackoverflow.com/q/29506772
tags question: http://stackoverflow.com/q/29475969

http://stackoverflow.com/q/29491319
answer count: 1
accepted answer: http://stackoverflow.com/a/29491538
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29491538
linked to: http://stackoverflow.com/q/18332506
has title: Show local user files and display content
downvote count: 0
has comment: http://stackoverflow.com/comment/47141731
has body: I'm new to web development and I already got stuck with my first try. I want the user to be able to select a directory and then list all the files in it. The user should then be able to display the file contents by just clicking on the name in the list. (I want to do it in angular JS but for now plain JS is fine too). I found this http://www.w3.org/TR/FileAPI/ where the user can select multiple files (I'd rather like the user to be able to select the folder and then just list all files). Now what I couldn't manage to get done is that the user can select one of those files in the list and then display the content of the file. I'm not sure if i understood it correctly from other posts if this is even possible. Best regards, jan
type: Question
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/comment/47112066
has text: Are you trying to create those sentences from the array, or check if they contain words, or ....... what ?
comment on: http://stackoverflow.com/q/29475545
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46970478
score: 1
type: AnswerComment
has text: why you are mixing up service syntax with factory, you should use `this` instead of local `var` while using service, & shouldn't return object, do look at this http://stackoverflow.com/a/28262966/2435473
type: Comment
comment on: http://stackoverflow.com/a/29396954

http://stackoverflow.com/q/29424888
linked to: http://stackoverflow.com/q/14115701
type: Question
has body: I'm trying to replicate the functionality found in this codepen example. Primarily, I'd like to include this code: $( function() { var $wrap = $('#wrap'); var $textarea = $('textarea'); var $dummy = $('.dummy'); function positionTextarea() { var h = $wrap.height(); var top = Math.max( 0, ( h - $dummy.height() ) * 0.5 ); $textarea.css({ paddingTop: top, height: h - top }); } $textarea.on( 'keyup change', function( event ) { var html = formatDummyText( $textarea.val() ); $dummy.html( html ); positionTextarea(); }).trigger('change'); // should debounce this $( window ).on( 'resize', positionTextarea ); }); in a directive. I'll have a textarea with a dummy div nearby with 0 opacity. What's the best way to include this functionality in a directive?
has title: Angularizing: Vertically Centering Text in Textarea
tagged with: javascript
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47021206
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47021146
answer count: 0

sidebar
type: Tag
tag name: sidebar
tags question: http://stackoverflow.com/q/29500931

http://stackoverflow.com/comment/47138017
type: Comment
comment on: http://stackoverflow.com/a/29489439
type: AnswerComment
has text: @Vikrant, ok, but i would suggest to change the title of your question since it does make much sense
score: 0

http://stackoverflow.com/a/29427639
has comment: http://stackoverflow.com/comment/47025854
upvote count: 1
downvote count: 0
score: 1
has body: Try this: var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { var responsefromURL = xmlhttp.responseText; if(responsefromURL != false) { alert("Failed to fetch Data from URL. (Store/Store)"); } else { var responseJSON = eval('('+responsefromURL+')'); this.prepareStoreFromJSON(responseJSON); } } } xmlhttp.open("GET",url,true); xmlhttp.send();
type: Answer
answers question: http://stackoverflow.com/q/29427189

http://stackoverflow.com/comment/47009812
type: Comment
type: QuestionComment
has text: Hmmm interesting. I seem to be able to get and set using local storage when using running the file protocol in chrome.
comment on: http://stackoverflow.com/q/29418785
score: 0

http://stackoverflow.com/comment/47173331
comment on: http://stackoverflow.com/q/29471566
has text: You are using a very old version of phonegap, you should use the latest. Cordova 2.9.1 apps won't be accepted on google play for security reasons.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46999488
type: Comment
has text: wow... how i'll do this ? ok thanks for guidance, will give it a go
type: AnswerComment
comment on: http://stackoverflow.com/a/29413335
score: 0

http://stackoverflow.com/q/29501220
type: Question
tagged with: charts
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29578252
has title: Google Charts API: Add Blank Row to Timeline?
answer count: 3
has body: I'm trying to create a list of people who have worked today, with their start and end times. This is no problem for people who have records, but I can't figure out how to get Google's Timeline chart to print a name of someone and then no entries on graph. Here is the documentation, but it says nothing about blank entries: https://google-developers.appspot.com/chart/interactive/docs/gallery/timeline#BarsOneRow Here is a sample of my code: &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; google.load("visualization", "1", {packages:["timeline"]}); google.setOnLoadCallback(drawChart); function drawChart() { var container = document.getElementById('timeline'); var chart = new google.visualization.Timeline(container); var dataTable = new google.visualization.DataTable(); dataTable.addColumn({ type: 'string', id: 'Employee' }); dataTable.addColumn({ type: 'date', id: 'Start' }); dataTable.addColumn({ type: 'date', id: 'End' }); dataTable.addRows([ [ 'Spiderman', new Date(2015, 04, 07, 04, 43, 49), new Date(2015, 04, 07, 06, 45, 05), ], [ 'Iron Man', new Date(2015, 04, 07, 04, 40, 53), new Date(2015, 04, 07, 08, 45, 47), ], [ 'Spiderman', new Date(2015, 04, 07, 09, 10, 19), new Date(2015, 04, 07, 13, 22, 02), ], ]); var options = { timeline: { singleColor: '#00f', colorByRowLabel: true, groupByRowLabel: true, }, backgroundColor: '#ffffff' }; chart.draw(dataTable, options); } &lt;/script&gt; What do I need to do to add a row for Superman, even though he didn't work that day?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/48110544
favorite count: 0
tagged with: google-api
score: 6
has answer: http://stackoverflow.com/a/45942348
accepted answer: http://stackoverflow.com/a/29578252
upvote count: 7
has answer: http://stackoverflow.com/a/48110544
downvote count: 1

http://stackoverflow.com/comment/47196654
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29520302
has text: Thanks for the extensive comments loislo.

http://stackoverflow.com/comment/47206598
type: Comment
has text: Wouldn't `featureService.OpenResponses.length` end up being reduced to 0 at the end of each directive individually? I have two directives which each emit their own event to signify that a particular type of load has finished. I need to bind my init code to the **combination** of both events.
comment on: http://stackoverflow.com/a/29524096
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47005885
score: 0
has text: You need a full on tutorial that explains what promises are and how promise chaining works, there's plenty of them all over the internet, but explaining that here in a single answer is a bit much (and has likely already been done)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29414215

http://stackoverflow.com/comment/47206596
score: 0
comment on: http://stackoverflow.com/q/29526047
has text: I have tried using `zoom = parseInt($(this).val(), 10);` but strangely enough it loses the value i.e perhaps convert it to undefined or null.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47100971
type: Comment
type: QuestionComment
has text: Seems that you use `-webkit-inline-box` but not `-moz-inline-box`.
score: 0
comment on: http://stackoverflow.com/q/29469341

http://stackoverflow.com/comment/47621643
type: Comment
comment on: http://stackoverflow.com/q/29518756
type: QuestionComment
has text: Ok, so I managed to make it work on plunker. But only in embedded view. So from the original splitted view mode, we need to click on 'open the embedded view' (third icon top right), I think it might be because of some resolution issues since I'm using the full window. Anyway, here is the direct link : http://embed.plnkr.co/0nufcYZpE3ZzGxKQmUkf/preview As I said before, put your mouse on the left to make the menu appear then use it to navigate between SVG, and you'll notice we need to click twice to properly change the svg.
score: 0

http://stackoverflow.com/q/29380408
accepted answer: http://stackoverflow.com/a/29381998
upvote count: 1
type: AnsweredQuestion
score: 1
has body: I suspect my question may be a bit obtuse, and I apologize. Here is what I am trying to achieve: I am using this multi-level push menu, and it works fine out of the box. However, I would like the multi-level menu to close after a modal is submitted and closed. I am having a difficult time figuring out how to trigger this menu to close. So, on to some code. Up first, the Javascript that runs the menu itself. mlPushMenu.prototype = { defaults : { // overlap: there will be a gap between open levels // cover: the open levels will be on top of any previous open level type : 'overlap', // overlap || cover // space between each overlaped level levelSpacing : 40, // classname for the element (if any) that when clicked closes the current level backClass : 'mp-back' }, _init : function() { // if menu is open or not this.open = false; // level depth this.level = 0; // the moving wrapper this.wrapper = document.getElementById( 'mp-pusher' ); // the mp-level elements this.levels = Array.prototype.slice.call( this.el.querySelectorAll( 'div.mp-level' ) ); // save the depth of each of these mp-level elements var self = this; this.levels.forEach( function( el, i ) { el.setAttribute( 'data-level', getLevelDepth( el, self.el.id, 'mp-level' ) ); } ); // the menu items this.menuItems = Array.prototype.slice.call( this.el.querySelectorAll( 'li' ) ); // if type == "cover" these will serve as hooks to move back to the previous level this.levelBack = Array.prototype.slice.call( this.el.querySelectorAll( '.' + this.options.backClass ) ); // event type (if mobile use touch events) this.eventtype = mobilecheck() ? 'touchstart' : 'click'; // add the class mp-overlap or mp-cover to the main element depending on options.type classie.add( this.el, 'mp-' + this.options.type ); // initialize / bind the necessary events this._initEvents(); }, _initEvents : function() { var self = this; // the menu should close if clicking somewhere on the body var bodyClickFn = function( el ) { self._resetMenu(); el.…
has title: Trigger method defined in javascript object, but outside of the object itself
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29381998
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46996060
comment on: http://stackoverflow.com/q/29408718
type: QuestionComment
type: Comment
has text: Take a look at `underscore` project http://underscorejs.org/
score: 0

http://stackoverflow.com/comment/47084091
score: 1
has text: Just copied your code and tested it. Every time it gives me results greater than 0. Maybe also provide what's the browser and operating system you're using?
type: Comment
comment on: http://stackoverflow.com/q/29460040
type: QuestionComment

http://stackoverflow.com/comment/47098970
type: QuestionComment
has text: Does your `xmlhttp.open` point to the right URL? is "editDescription" in the same path as your web page?
score: 0
comment on: http://stackoverflow.com/q/29468368
type: Comment

http://stackoverflow.com/comment/46934397
comment on: http://stackoverflow.com/a/29376983
has text: @Touffy well, a function that returns a number should be used in a context that requires a scalar :-) Otherwise it makes no sense.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29407642
type: Question
has title: Gridview JQuery plugin fires only once, custom confirm box
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
has body: I have checkbox in a gridview, when you click on the checkbox i need to show confirm message box. i want to change the confirm message box button text from 'OK'/'cancel' to 'Yes'/No For this i am using JQuery plugin http://www.invetek.nl/samples/confirmon/index.php My gridView below <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" style="text-align:center" CellPadding="3" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" ForeColor="Black" Font-Bold="false" GridLines="Vertical" RowStyle-CssClass="GridRow" OnRowCommand="GridView1_RowCommand"><%--OnRowDataBound="GridView1_RowDataBound"--%> <AlternatingRowStyle BackColor="#F8F8F8" /> <asp:TemplateField Visible="false"> <asp:Label ID="lbl_CarBrandID" runat="server" Text='<%# Eval("CarBrandID") %>'></asp:Label> </asp:TemplateField> <asp:TemplateField ItemStyle-Width="10%" HeaderText="Brand Name" HeaderStyle-CssClass="header-center"> <asp:Label ID="lbl_CarBrandName" runat="server" Text='<%# Eval("CarBrandName") %>'></asp:Label> </asp:TemplateField> <asp:TemplateField ItemStyle-Width="5%" HeaderText="Active" HeaderStyle-CssClass="header-center"> <asp:checkbox ID="lbl_Active" runat="server" AutoPostBack="true" OnCheckedChanged="chkIsActive_CheckedChanged" Checked='<%# Eval("IsEnabled") %>'></asp:checkbox> </asp:TemplateField> <asp:TemplateField ItemStyle-Width="5%" HeaderText="Models" HeaderStyle-CssClass="header-center"> <asp:Button ID="img_Save" runat="server" OnClientClick="ShowModel()" CommandArgument='<%# Eval("CarBrandID") %>' CommandName="ShowCarModels" Width="100%" Text="Display Models" /> </asp:TemplateField> </asp:GridView> </asp:UpdatePanel> my JQuery for checkbox change I am getting the confirm box only once (first time) after page load, if i check uncheck again then the message box does not appear. i want for every click of checkbox i need the message box to show. please help me out.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46989632
tagged with: gridview
answer count: 0
score: 1
upvote count: 1

http://stackoverflow.com/q/29513380
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29513503
has comment: http://stackoverflow.com/comment/47182615
has comment: http://stackoverflow.com/comment/47182626
has answer: http://stackoverflow.com/a/29514279
has comment: http://stackoverflow.com/comment/47182685
has comment: http://stackoverflow.com/comment/47182587
possible better answer: http://stackoverflow.com/a/29513503
type: Question
accepted answer: http://stackoverflow.com/a/29513538
tagged with: javascript
tagged with: jquery
score: -1
has title: My button didnt work
has comment: http://stackoverflow.com/comment/47182830
has answer: http://stackoverflow.com/a/29513538
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has answer: http://stackoverflow.com/a/29513524
favorite count: 0
upvote count: 0
has answer: http://stackoverflow.com/a/29513860
answer count: 5
has body: Hi i created a login form, but when i click on login i can't send username and password to db, with this code: &lt;a id="enter" href="#"&gt;&lt;div id = "enterbutton"&gt;enter&lt;/"div&gt;&lt;/a&gt;. And i am able to send username and pass with this code: &lt;input id="enterbutton" type="submit" value="Login"&gt; and now this button look ugly, because i have pic for this button added in my css. With this first code button look exactly how i want it to be. How to fix this? My form look: &lt;form name="forma2" action="login.php" method="post"&gt; &lt;br&gt; &lt;input class="inputbox" type="text" name="username" maxlength="18" placeholder="username"&gt; &lt;br&gt; &lt;br&gt; &lt;input class="inputbox" type="password" name="password" placeholder="password"&gt; &lt;br&gt; &lt;input type="submit" value="Login"&gt; &lt;/form&gt; Work's but without css.
tagged with: css

http://stackoverflow.com/comment/46935679
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29377580
score: 0
has text: Aren't you just passing in the constructor for your `welcomeCtrl` object? Should just do `doScan.bind(this)();` to reference your current object instance.

http://stackoverflow.com/comment/46958043
comment on: http://stackoverflow.com/a/29390118
has text: Can you forget about the if clause for a moment? I cannot even get the inner loop to display all experts for each expert role. No matter if they match or not, I don't even check that, have a careful read of my entire post, please.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/96711322
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29527045
score: 1
has text: Added a `Yes` / `No` answer. I don't see it answered in any of the other answers on the page.

http://stackoverflow.com/q/29471029
has title: Kendo UI Not Working with Meteor?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29479876
type: Question
possible better answer: http://stackoverflow.com/a/29479774
answer count: 2
has answer: http://stackoverflow.com/a/29479774
tagged with: javascript
tagged with: jquery
has body: I'm attempting to get a simple MultiSelect working in Meteor. After checking out ~20 different UI libraries, I decided Kendo UI looked best. I looked around and found that they had Meteor package already set up to (supposedly) easily use Kendo UI in Meteor. Here's the steps I did to try and get a kind of Hello World with MultiSelect using Kendo UI in Meteor: meteor create FindMeFood meteor add telerik:kendo-ui-core-fiori-theme Then I modified FindMeFood.html: FindMeFood Where McDonalds Burger King Wendy's Five Guys KFC Taco Bell Pizza Hut Papa Johns Finally modified FindMeFood.js: if (Meteor.isClient) { $("#where").kendoMultiSelect().data("kendoMultiSelect"); } And absolutely nothing happened. I ended up with a standard multiple-select box when I started up Meteor and visited the page.
score: 0
accepted answer: http://stackoverflow.com/a/29479876
tagged with: meteor
tagged with: kendo-ui

http://stackoverflow.com/comment/47180755
comment on: http://stackoverflow.com/q/29510377
has text: What's in the call stack when the error happens? `setState` is also async, so it's not necessarily the best match for management of points and real-time feedback, especially when it involves drawing on a canvas. Further, as a canvas is retained, redrawing it constantly shouldn't be necessary.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/130862265
has text: Hi @Felix Kling YOU ARE A GREAT REFERENCE in JavaScript, excellent answer, but I still have a doubt. is the lexical environment created ONLY in case there is at least ONE variable declaration with let or const inside the braces, since ONLY THOSE 2 create a "different" block scope than the functions, right? Thanks in advance
comment on: http://stackoverflow.com/a/29414771
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29444885
has comment: http://stackoverflow.com/comment/47057201
accepted answer: http://stackoverflow.com/a/29444923
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/47057172
has body: If I was to have a page like index.php and then was to include an iframe, but the iframe was missing JavaScript that was included on the index.php file; would the JavaScript activate the JavaScript functions on the iframe or is it required for them to be on the same page? Example: Index.php: Includes both of the following code, while the iframe requires them but does not have it listed on the page.
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/29444923
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47057184
tagged with: iframe
has title: iframe and JavaScript on different pages
type: Question

http://stackoverflow.com/comment/46962581
has text: Maybe better is load chart in visible part of page and then catch scroll event and load other ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29389571

http://stackoverflow.com/comment/46937370
has text: Here's an example of the D3 library displaying a radial tree layout http://strongriley.github.io/d3/ex/tree.html
comment on: http://stackoverflow.com/q/29378150
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46985655
has text: C is not global, but it is required by so many modules so I won't attempt to list them all in shim config.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29385297

http://stackoverflow.com/comment/46937419
score: 0
type: Comment
type: QuestionComment
has text: `this.processData.bind(this)` is you don't want anonymous function.
comment on: http://stackoverflow.com/q/29378342

http://stackoverflow.com/a/29384590
has body: x will be 20. var is "hoisted" (more below), which means that the variable gets declared as of the beginning of the function, before any step-by-step code is run. Any initializer on a var statement is actually just an assignment statement. So your code: function foo() { var x = 10; //do something var x = 20; console.log("x: " + x); } is treated as though it were like this: function foo() { var x; x = 10; //do something x = 20; console.log("x: " + x); } When you call a function, the JavaScript engine does several things before it starts executing the step-by-step code in the question. one of the things it does is look through the code and process any var statements. (Although it's called the var statement, var is more of a declaration.) It's quite fun, your code could also be written this way: function foo() { x = 10; //do something x = 20; console.log("x: " + x); return; var x; } It would still be valid, and it would do exactly the same thing. More (on my blog): Poor, misunderstood var ES6 will introduce let, which behaves differently (amongst other things, it is scoped to the block it's in, whereas var is scoped to the function as a whole even if declared within a block); details on MDN.
score: 2
upvote count: 3
downvote count: 1
accepted answer of: http://stackoverflow.com/q/29384558
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29384558
type: Answer

http://stackoverflow.com/q/29511873
has comment: http://stackoverflow.com/comment/47179860
has comment: http://stackoverflow.com/comment/47179855
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47179560
has answer: http://stackoverflow.com/a/29512317
downvote count: 0
has comment: http://stackoverflow.com/comment/47179618
has answer: http://stackoverflow.com/a/30196610
accepted answer: http://stackoverflow.com/a/30196610
has comment: http://stackoverflow.com/comment/47180252
upvote count: 8
has comment: http://stackoverflow.com/comment/47179991
type: Question
answer count: 2
has body: I have a project in which I use MVC C#, with Bootstrap and FontAwesome. My objective is to show a spinner and disable the page while waiting for an ajax request. So far, I have successfully acomplished this goal with the following code: HTML: &lt;div id='ajax_loader' style="position: fixed; left: 50%; top: 50%; display: none;"&gt; &lt;img src="~/Images/ajax-loader.gif"&gt; &lt;/div&gt; JS: function blablabla() { //show spinner, disable page var modal = $('&lt;div&gt;').dialog({ modal: true }); modal.dialog('widget').hide(); $('#ajax_loader').show(); $.ajax({ type: "Get", url: url, success: function (result) { alert("success! " + result); }, error: function(result) { alert("error!" + result); }, complete: function () { //back to normal! $('#ajax_loader').hide(); modal.dialog('close'); } }); } Now, this code works, I have the page disabled and I show a spinner. However, this spinner is also grayed out, and I do not want that to happen. How can I prevent this bug ?
has comment: http://stackoverflow.com/comment/47179690
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/47180135
tagged with: http://stackoverflow.com/tag/html
score: 8
favorite count: 0
has comment: http://stackoverflow.com/comment/47179512
has title: Show spinner and disable page while waiting for ajax request
possible better answer: http://stackoverflow.com/a/29512317

http://stackoverflow.com/comment/47182821
comment on: http://stackoverflow.com/q/29510133
type: Comment
has text: Are there any errors in the console?
score: 0
type: QuestionComment

http://stackoverflow.com/q/29489507
score: -3
has comment: http://stackoverflow.com/comment/47138218
has answer: http://stackoverflow.com/a/29489644
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29489644
has body: Can I create a single iconic file of several html files like creating .exe file in java using servlets, java beans, dao etc.. please do suggest.
downvote count: 3
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47138298
has title: How to package in html into single application
has comment: http://stackoverflow.com/comment/47138430
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/47138164
favorite count: 0
has comment: http://stackoverflow.com/comment/47138061

http://stackoverflow.com/a/29378066
downvote count: 1
has comment: http://stackoverflow.com/comment/46936453
has body: Change window.onload=startCountdown; to window.onload=startCountdown(); and use defer <%-- Begins countdown --%> this is the function in the js file var startCountdown = function() { var TIMEOUT = 900000; var COUNT_BACK = 3; setTimeout("displayWarning("+COUNT_BACK+")", TIMEOUT); };
score: 0
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29377982

http://stackoverflow.com/comment/46929911
comment on: http://stackoverflow.com/q/29374664
type: Comment
type: QuestionComment
has text: This seems to have nothing to do with JSON, but rather includes for different definitions of a javascript object literal. Are you asking for ways to dynamically determine which file to include? If that is the case, can you share your current logic for determining which include to use?
score: 0

http://stackoverflow.com/a/68550424
has body: i fixed this question with this code: getCount(arr) { const chunked = []; for(let i=0; i&lt;arr.length; i++) chunked[i] = []; let sub = 0; for (let i = 1; i &lt; arr.length; i++) { if (arr[i]&gt;arr[i-1]) { chunked[sub].push(...[arr[i-1],arr[i]]); } else { sub++ } } const chunked2 = [...chunked.filter(k=&gt;k.length).map(k =&gt; [...new Set(k)])]; for (let i = 0; i &lt; chunked2.length; i++) { if (chunked2[i+1]) if( chunked2[i][chunked2[i].length - 1] &gt; chunked2[i+1][0]) { chunked2[i+1].shift(); } } return [].concat.apply([], chunked2).lenght; }
score: 0
answers question: http://stackoverflow.com/q/29425820
type: Answer

http://stackoverflow.com/a/29503677
upvote count: 1
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29503603
has body: var sum = "13-2-10-7-3".split('-').reduce(function(x, y) { return parseInt(x)+ parseInt(y); });
score: 0

http://stackoverflow.com/comment/47122466
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29480781
has text: have you got a link to the documentation where handPrevClick is explained? I looked at the tween lite docs but couldn't find this function.
score: 0

http://stackoverflow.com/comment/73775748
type: Comment
has text: Could you please explain what you mean by 'pretty much' the same?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29483247

http://stackoverflow.com/q/29430884
has comment: http://stackoverflow.com/comment/47031665
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29431228
tagged with: angularjs-scope
upvote count: 0
answer count: 1
tagged with: javascript
has title: angularJs, I'm not succeeding set view refresh after data get from ajax call
favorite count: 0
tagged with: ajax
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47031349
has body: I've searched a lot before answer this question and couldn'y find any solution working for me. I've started studying angular and I've been able to create a simple page with an ng-repeat that iter an object. The next step I want to achieve is to update this object from an AJAX call to an API. The problem is that I'm not able to do this. It seems to me that the problem is the function inside the controller: is not able to edit an attribute of the same controller: app.controller('StoreController', [ '$http', 'ajaxFactory', function($http, ajaxFactory) { this.products = products; this.getProducts = function() { /* this works and empty the object AND the view on the click */ this.products = []; ajaxFactory.getFamily2().then(function(data) { /* * this DOES NOT works, DOES NOT empty the object NOR the * view on the click */ /* * i'm sure the AJAX call is working, i can see the result * and also alert his content */ this.products = data; }); }; } ]); Thanks in advance FULL CODE: Html: – an Angular catalogue – Kliq Here! JS: (function() { var app = angular.module('catalogo', [ 'store-directives' ]); app.factory('ajaxFactory', function($http) { var factory = {}; factory.getFamily2 = function() { return $http.get("http://apigility-ds.gsanet.it/rpc").then( function(result) { return result.data; }); } return factory; }); app.controller('TotalPriceController', function() { this.totalPrice = 0; this.calculateTotalPrice = function() { this.totalPrice = 0; for ( var x in products) { var product = products[x]; if (typeof (product.num) !== 'undefined') { this.totalPrice += (product.price * product.num); } } }; }); app.config(function($httpProvider) { $httpProvider.defaults.useXDomain = true; delete $httpProvider.defaults.headers.common['X-Requested-With']; }); app.controller('StoreController', [ '$http', 'ajaxFactory', function($http, ajaxFactory) { this.products = products; this.getProducts = function() { this.products = []; ajaxFactory.getFamily2().then(function(data) { this.product…
has answer: http://stackoverflow.com/a/29431228
tagged with: angularjs-ng-repeat
score: -1
type: AnsweredQuestion

http://stackoverflow.com/a/29406470
answers question: http://stackoverflow.com/q/29406395
has comment: http://stackoverflow.com/comment/46987901
has body: Try this: $('#mumbaiid').click(function(){ var self = $(this); if(self.val() == 'allinone'){ $("."+self.attr('class')).prop('selected',true); // or you can also use // self.siblings("."+self.attr('class')).prop('selected',true); } else { self.find('.mumbai:first').prop('selected', false) } }) Here is working demo. http://jsfiddle.net/ax0bhyy6/ you can get the selected values like this: $("select option:selected").each(function (){ alert($(this).val()); });
has comment: http://stackoverflow.com/comment/46987923
has comment: http://stackoverflow.com/comment/46987948
has comment: http://stackoverflow.com/comment/47029856
score: 0
accepted answer of: http://stackoverflow.com/q/29406395
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47029827
has comment: http://stackoverflow.com/comment/47029871
type: Answer

http://stackoverflow.com/comment/47029129
type: AnswerComment
has text: I'm sure it's my fault, but I've placed you code in the inside the index.php page and it does nothing. What I'm doing wrong?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29429233

specifications
type: Tag
tags question: http://stackoverflow.com/q/29435262
tag name: specifications

http://stackoverflow.com/comment/47098588
type: Comment
has text: @SorinGeorgescu You could use a switch statement per form, checking which inputs have been selected. Then, at the end, use an if statement to grab whatever value (some variable/whatnot) to see which link should be used.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29434806

http://stackoverflow.com/comment/47020891
type: Comment
type: QuestionComment
has text: @Adam so I got a method of doing it to work but I can't seem to access the data.
comment on: http://stackoverflow.com/q/29424348
score: 0

http://stackoverflow.com/q/29498490
has comment: http://stackoverflow.com/comment/47156007
tagged with: jquery
has comment: http://stackoverflow.com/comment/47155768
favorite count: 0
has answer: http://stackoverflow.com/a/29498586
has body: Hey all I am trying to get the element from the HTML below: test2 test22 Delete Record The jQuery code I have tried: $("td[data-uid='" + uid + "']").parent().prev().fadeOut('slow'); The uid has the number 408bd653-c1bf value. So I am not sure why its not finding the previous TR parent.
has comment: http://stackoverflow.com/comment/47155772
has answer: http://stackoverflow.com/a/29498619
accepted answer: http://stackoverflow.com/a/29498619
answer count: 4
has answer: http://stackoverflow.com/a/29498572
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29498578
has title: jQuery get parent Element and hide it
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29498572
has comment: http://stackoverflow.com/comment/47155984
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/46942642
type: Comment
has text: I don't quite understand what you are saying.
comment on: http://stackoverflow.com/a/29381494
type: AnswerComment
score: 0

http://stackoverflow.com/q/29439392
upvote count: 1
score: 1
has title: Moment Timezone and _zones
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29439886
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/32869186
type: UnansweredQuestion
has body: I am a newbie in JavaScript. I just found below code in this page [https://developer.mozilla.org/en-US/Apps/Quickstart/Building_simple_functionality]. Although, I know what these functions do, but it is not clear to me what _zones is ? Could someone explain it in details? import Ember from 'ember'; export default Ember.Controller.extend({ /* create array of timezones with name &amp; offset */ init: function() { var timezones = []; for (var i in moment.tz._zones) { timezones.push({ name: moment.tz._zones[i].name, offset: moment.tz._zones[i].offset[0] }); } this.set('timezones', timezones); this._super(); }, selectedTimezone: null, actions: { /* save a timezone record to our offline datastore */ add: function() { var timezone = this.store.createRecord('timezone', { name: this.get('selectedTimezone').name, offset: this.get('selectedTimezone').offset }); timezone.save(); }, /* delete a timezone record from our offline datastore */ remove: function(timezone) { timezone.destroyRecord(); } } }); Thanks

http://stackoverflow.com/comment/52772143
has text: @torazaburo: No, `json` is a promise here, and we don't want to reject with the promise but with its result value.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29475662

calibration
tag name: calibration
tags question: http://stackoverflow.com/q/29482043
type: Tag

http://stackoverflow.com/comment/138092178
comment on: http://stackoverflow.com/a/29397769
has text: To be fair, `i` is a poor variable name when used in a construct which explicitly assigns a _property **name**_ to that variable. The documentation should make that clear -as should the multiple instances of the term _property **name**_ in the post above.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47226692
has text: Add some `CSS` to hide it by default like [this](http://jsfiddle.net/lshettyl/zn9y63hL/1/)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29514620

http://stackoverflow.com/q/29387511
tagged with: javascript
has comment: http://stackoverflow.com/comment/46953121
score: 0
tagged with: filter
answer count: 1
accepted answer: http://stackoverflow.com/a/29389877
has title: filter array items with respect to another array in angular controller
tagged with: angularjs
type: AnsweredQuestion
has body: I have an list as, $scope.list1= [{"name":"name1","id":1},{"name":"name2","id":2},{"name":"name3","id":3},{"name":"name4","id":4}]; I want to filter this list with respect to another list as, $scope.list2=[1,3]; Here I want filter list1 so that only those objects items are left ehich are in list2. i.e after filter $scope.list1= [{"name":"name1","id":1},{"name":"name3","id":3}]; I can do this by using the splice function . But I want to ask that whether this can be done using the $filter without using a loop.
type: Question
has answer: http://stackoverflow.com/a/29389877
tagged with: arrays

http://stackoverflow.com/comment/46947842
score: 2
has text: What you have tried first?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29384785

http://stackoverflow.com/q/29425273
has answer: http://stackoverflow.com/a/29430617
tagged with: bower
type: Question
score: 1
has body: Given the following simplified scenario, how could I best construct my reusable component so that it is correctly consumable by another application, such that foo.js prints 23? Reusable Component: /home.js /main.js /stuff foo.js -- /home.js: define([], function () { return 23; } /stuff/foo.js: define(['home'], function (home) { console.log(home); } // prints 23 Consumer Application: /app.js /main.js /home.js /views template.html /bower_components /myReusableComponent /home.js /main.js /stuff foo.js -- /home.js: define([], function () { return 17; } /bower_components/myReusableComponent/home.js: define([], function () { return 23; } /bower_components/myReusableComponent/stuff/foo.js: define(['home'], function (home) { console.log(home); } // now prints 17 Is there a consumer application requirejs config that sets the baseUrl of any module in /myReusableComponent to '/myReusableComponent'? My reusable component should not have/need access to the root level of the consumer application anyway. I have looked into the r.js optimizer, but it just outputs a bunch of define('stuff/foo', [], function ())... what happens if the consumer application has a stuff/foo.js too? The only solution I have found so far is forcing the use of relative paths in all of my modules: define(['../home'], function (home) { console.log(home); } but I am hoping there is a more elegant way to solve this problem. All feedback is very appreciated!
tagged with: amd
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/47022482
favorite count: 0
type: UnansweredQuestion
tagged with: requirejs
upvote count: 1
has title: Creating a reusable RequireJs library

http://stackoverflow.com/comment/137593533
type: Comment
comment on: http://stackoverflow.com/a/29440696
score: 0
type: AnswerComment
has text: This is the answer to the question as asked - namely "it is not possible". The other answer, and the linked duplicate answer what to do instead.

http://stackoverflow.com/comment/47109362
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29473834
has text: Still no. Your code will clear the input **every time** the label is clicked. Try it: http://jsfiddle.net/53eabt9g/
type: AnswerComment

http://stackoverflow.com/comment/47185107
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29514711
has text: thanks. but if user selected another 4 files when pervious 4 files is uploading then new files overlap on pervious 4 files to upload!

http://stackoverflow.com/comment/47023555
comment on: http://stackoverflow.com/a/29412378
score: 0
type: AnswerComment
type: Comment
has text: Hello @Jordi...Thank you so much for your patience,but am sorry to say that still the is path is incomplete.As you can see the source(green-dot) and destination(red-dot) are not met .Path line stops before reaching destination

http://stackoverflow.com/a/33581760
has body: If you use 0.97 (i'm not exactly sure) // Velocity has conflicts when loaded with jQuery, this will check for it var Vel; if ($) { Vel = $.Velocity; } else { Vel = Velocity; // change value with jQuery.Velocity }
type: Answer
answers question: http://stackoverflow.com/q/29432678
score: 0

http://stackoverflow.com/comment/47011605
type: QuestionComment
score: 0
has text: Please do not use `document.write('text');`. Use `document.body.innerHTML += 'text';` instead.
comment on: http://stackoverflow.com/q/29419717
type: Comment

http://stackoverflow.com/q/29406371
tagged with: javascript
has title: Why is an undefined value of an array of array that typeof returns as "undefined" not considered true by my conditional?
score: 0
has comment: http://stackoverflow.com/comment/46987285
tagged with: node.js
has body: Why does an undefined value of an array of array that typeof returns as "undefined" not considered true by my conditional? Is it something to do with the OR operator or what. It seems like my program is running the inner conditional even though it shouldn't be in the inner conditional. if(typeof elemData !== 'undefined' || typeof rich[elemData.value] !== 'undefined') { if(typeof rich[elemData.value]['title'] !== 'undefined') { //do something } } program returns the following: &gt; if(typeof rich[elemData.value]['title'] !== 'undefined') { &gt; &gt; TypeError: Cannot read property 'title' of undefined I'm checking if rich[elemData.value] is 'undefined' and it's saying it's not via my conditional. What's going on?
type: AnsweredQuestion
tagged with: conditional-statements
has answer: http://stackoverflow.com/a/29406421
accepted answer: http://stackoverflow.com/a/29406421
type: Question
tagged with: typeof
tagged with: arrays
answer count: 1

http://stackoverflow.com/q/29387066
favorite count: 0
score: 0
has title: populate newly added textbox with last texbox value
possible better answer: http://stackoverflow.com/a/29387143
has answer: http://stackoverflow.com/a/29387830
has answer: http://stackoverflow.com/a/29387143
type: AnsweredQuestion
has body: How can I populate newly added begin_date textbox with last end_date ? $('body').on('focus', ".dpicker", function () { $(this).datepicker(); }); JSFIDDLE here
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46953044
accepted answer: http://stackoverflow.com/a/29387830
tagged with: date
tagged with: jquery-ui-datepicker
has answer: http://stackoverflow.com/a/29387912
answer count: 3
has comment: http://stackoverflow.com/comment/46953463
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46982419
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29403422
has text: You're not defining your datasource in the MVC code? Can you post your grid source code please?

http://stackoverflow.com/a/29528995
has body: You can use this code: $("input").mouseenter(function() { $(this).focus(); }); http://jsfiddle.net/zfggtf3b/
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29528937
type: Answer
answers question: http://stackoverflow.com/q/29528937
score: 0

http://stackoverflow.com/comment/47395060
comment on: http://stackoverflow.com/a/29509042
score: 0
type: AnswerComment
has text: Oh, no i didnt. would widget.getContainer be sufficient for parameter
type: Comment

http://stackoverflow.com/comment/47021547
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29424876
has text: I just made this Fiddle http://jsfiddle.net/3g04wv2f/ but I couldn't reproduce the error... The fields are correct here.

http://stackoverflow.com/comment/47004456
comment on: http://stackoverflow.com/q/29393109
score: 0
type: Comment
type: QuestionComment
has text: (on load zoom out camera!) http://jsfiddle.net/QHssJ/16/ with tepthTest : 0 this i want on planet, but not affect on all neighborhood object (redball, floor). http://jsfiddle.net/QHssJ/17/ this is what i have, but i need to avoid partial covering. atmosphere must be always before the planet. not other objects.

http://stackoverflow.com/q/29431719
has comment: http://stackoverflow.com/comment/47033139
has comment: http://stackoverflow.com/comment/47033190
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/47033025
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47033137
has title: How to select the div that occupies more space in the viewport
has body: Situation- I have number of block elements div(s) in my document. Where each one of them is relatively aligned. I would want to select the one that occupies more space in the viewport than it's sibling blocks on scroll. See in image- I tried- $(window).scroll(function(){ $('.container div').each(function(){ if(isVisible($(this), $(window))){ console.log($(this).attr('class')+" is visible"); }; }); }); Calculating offset function isVisible( block, container ){ var elementTop = $(block).offset().top, elementHeight = $(block).height(), containerTop = container.scrollTop(), containerHeight = container.height(); return ((((elementTop - containerTop) + elementHeight) &gt; 0) &amp;&amp; ((elementTop - containerTop) &lt; containerHeight)); } Now if you note in console, I am displaying block which is visible on screen. Now when two or more blocks are visible on screen then only the one that occupies more space in the viewport. Currently, It is selecting both blocks. I have no idea how do I approach with it now. Here you find the fiddle- https://jsfiddle.net/13odrk4t/
has answer: http://stackoverflow.com/a/29432254
accepted answer: http://stackoverflow.com/a/29432254
has comment: http://stackoverflow.com/comment/47033201
has comment: http://stackoverflow.com/comment/47033169

http://stackoverflow.com/comment/46952590
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29385804
has text: thanks bro it did the job. The only thing left for me is how to interpret the return type which is a file with .csv format and .pdf. Thanks. This is awesome. The $.post returns a file. which is the main report.
score: 0

http://stackoverflow.com/q/29435991
has comment: http://stackoverflow.com/comment/47041006
tagged with: jquery-plugins
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29436710
accepted answer: http://stackoverflow.com/a/29436896
score: 0
possible better answer: http://stackoverflow.com/a/29436710
has body: I wrote a simple plugin to validate if input fields that needs to be number are indeed numbers. The plugin can be successfully loaded and triggered, but it doesn't do anything. However, if I manually type $(selector).validateNum(); in the console, it works perfectly. Anyone knows why? Please check this jsBin for the live version: jsBin: http://jsbin.com/tusunuweto/1/edit?html,js,console,output Code below: $.fn.validateNum = function () { console.log('validation started'); var numInputFields = this.find('input.number'); $(numInputFields).each(function () { if ( isNaN( Number( $(this).val() ) ) ) { $(this).keyup(function () { alert("This field must be a number"); }); } }); }; In my index.html file: &lt;script type="text/javascript"&gt; $(function() { $('#selector').validateNum(); }); &lt;/script&gt;
has answer: http://stackoverflow.com/a/29436896
has title: Self-made jQuery plugin triggered but not working
has comment: http://stackoverflow.com/comment/47041094
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/47128655
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29484142
score: 1
has text: possible duplicate of [How to detect if JavaScript is disabled?](http://stackoverflow.com/questions/121203/how-to-detect-if-javascript-is-disabled)

http://stackoverflow.com/comment/47006157
score: 0
type: Comment
type: QuestionComment
has text: I don't know. You didn't show us any relevant code.
comment on: http://stackoverflow.com/q/29416630

http://stackoverflow.com/q/29494631
has comment: http://stackoverflow.com/comment/47148756
has title: Display the thumbnail in this type of manner
has body: I want to create thumbnails in this way. I tried but success rate is very less . I am hoping that i can get the reply here I prepared my views in form of diagram to understand you and photo links overs the link..
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47148367
score: -4
type: Question
has comment: http://stackoverflow.com/comment/47148449
tagged with: javascript
has comment: http://stackoverflow.com/comment/47148346
downvote count: 4
has answer: http://stackoverflow.com/a/29495088
upvote count: 0
answer count: 1

http://stackoverflow.com/q/29420968
has answer: http://stackoverflow.com/a/29421150
tagged with: controller
score: 0
answer count: 1
tagged with: meteor
has body: I am having trouble with properly publishing, subscribing, and displaying a products detail page. I have a collection of Products with an attribute called productCode. Here is my Products collection: Products = new Mongo.Collection('products'); Here is my publish.js: Meteor.publish('tireDetails'), function(_id) { return { products: Products.findOne({_id: this.params._id}) }; }; Here is my controller: tireDetailsController = RouteController.extend({ waitOn: function () { Meteor.subscribe('tireDetails'); }, action: function() { this.render('tireDetails'); } }); My router.js: Router.route('/products/tires/:_id', {name: 'tireDetails', controller: 'tireDetailsController'}); And here is my template: &lt;template name="tireDetails"&gt; {{#with products}} &lt;p&gt;{{productCode}}&lt;/p&gt; {{/with}} &lt;/template&gt; I think the way that I am publishing my products is wrong. Furthermore, I typed in the browser console: Products.findOne(); Which returned undefined... please help!! Thank you!
tagged with: router
accepted answer: http://stackoverflow.com/a/29421150
type: AnsweredQuestion
type: Question
has title: Issue with publishing and subscribing product detail attributes in meteor / iron router
tagged with: javascript

http://stackoverflow.com/a/46216954
score: 61
downvote count: 0
has body: Meanwhile you can use the isSameOrAfter method: moment('2010-10-20').isSameOrAfter('2010-10-20', 'day'); Docs: https://momentjs.com/docs/#/query/is-same-or-after/
upvote count: 61
answers question: http://stackoverflow.com/q/29494528
type: Answer

http://stackoverflow.com/a/29407528
has body: function getDayNamesInUserOrder() { var dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; var weekStartDayIndex = 2; // user has set this to be 2 (Tuesday) return dayNames.concat(dayNames).slice(weekStartDayIndex, weekStartDayIndex + 7); }
score: -1
answers question: http://stackoverflow.com/q/29406926
downvote count: 1
type: Answer
upvote count: 0

http://stackoverflow.com/q/29454339
tagged with: javascript
score: 0
answer count: 1
has title: script redirect in php is recursive
tagged with: php
has comment: http://stackoverflow.com/comment/47073894
has body: Sorry:- another rank new-be! My code is placed on both mobile and desktop pages so as to redirect to the relevant page. However this seems to cause a recursive recall with the web page trying to reload over and over. Do I need to exit; Any other options? As i said don't seem to be able to use headers. &lt;?php $useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/(android...etc) {echo '&lt;script type="text/javascript"&gt; window.location = "http://mobile.tebb.com.au/" &lt;/script&gt;';} else {echo '&lt;script type="text/javascript"&gt; window.location = "http://www.tebb.com.au/" &lt;/script&gt;'; } ?&gt;
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47073893
type: Question
has answer: http://stackoverflow.com/a/29454360
accepted answer: http://stackoverflow.com/a/29454360

http://stackoverflow.com/a/29518294
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/29509955
has body: In your DB, when each point is created, call a function to buffer that point (ie create a circle around that point). Then, instead of sending the latlng to the client, send the polygon. The turf.js library is good for this if you're not sure about the math (geodesics are hard). The downside is anyone with a brain &amp; too much time can calculate the center VERY EASILY. Even if you randomize the point, I could rerun the calculation, determine the stdev, and find it with nothing more than a browser console &amp; excel. Random is not your friend here, as the promise of randomness hurts you. Another option is the hotwire approach. Basically, you pre-create a bunch of polygons as parts of the town (downtown, east-side, sketchy-south) then, when you create a point, run a $within to assign your point to a certain polygon. Return the polygon &amp; no one is the wiser. Meteor-specific point: Be super sure you have a {fields: {latLng: 0}} in your publish function.
answers question: http://stackoverflow.com/q/29509955

http://stackoverflow.com/comment/47058023
comment on: http://stackoverflow.com/q/29445264
score: 0
type: Comment
type: QuestionComment
has text: can you please add response you get in response variable ?

http://stackoverflow.com/comment/46980955
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29402730
has text: When using the change event in JQuery, it does not take effect until the input loses focus (for inputs). Keyup fires as soon as a key bounces back up after it goes down. The change event should work here, but as @nit pointed out, the selector doesn't look quite right. If you wanted it to fire on all inputs, you could use `$("input").change(function...`, but you'd be better off selecting by class or id: `$("#MyElementId")` or `$(".MyElementClass")`
score: 0

http://stackoverflow.com/comment/46961653
comment on: http://stackoverflow.com/a/29391903
type: AnswerComment
score: 0
type: Comment
has text: Maybe use `directive`?

http://stackoverflow.com/a/29373663
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46928117
answers question: http://stackoverflow.com/q/29373552
has body: You can pass in the element to perform granular toggling, $(document).ready(function () { $fa= $('.fa'); var z = 0; $fa.click(function () { if (z == 0) { turnUp($(this)); z++; } else { turnDown($(this)); z = 0; } }); }); function turnUp(el) { el.removeClass('fa-chevron-down'); el.addClass('fa-chevron-up'); }; function turnDown(el) { el.removeClass('fa-chevron-up'); el.addClass('fa-chevron-down'); };
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46927978

http://stackoverflow.com/comment/48340755
type: QuestionComment
comment on: http://stackoverflow.com/q/29465055
has text: for future reference: http://gis.stackexchange.com/
score: 0
type: Comment

http://stackoverflow.com/q/29462492
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: properties
score: 1
tagged with: refactoring
has body: Does WebStorm support pushing variable declarations into objects? For the following simplified example, refactor such that bar is a property of myObject. References to bar should be updated to resemble references to foo. var myObject = { foo : new foo() }; var bar = new bar(); myObject.foo.blah = "something"; bar.blah = "something else"; Find-Replace is not sufficient; I would like to capitalize on WebStorm's intelligent refactoring. Note that Refactor->Rename does not allow identifiers containing a period. In WebStorm 9 an inline Refactor->Rename allowed renaming a variable to include a period (but obviously wouldn't create the required property declaration).
type: Question
has title: Push properties/variables into an object in WebStorm (javascript refactoring)
tagged with: javascript
tagged with: variables
tagged with: webstorm
downvote count: 0

http://stackoverflow.com/a/29526650
score: 0
type: Answer
has body: Why don't you add unique id names to them and detect that instead?? Something like: HTML: I'm a product designer by trade Lorem Ipsum is dummy text so I'm typing random paragraph texts for a StackOverflow Answer. Lorem Ipsum is dummy text so I'm typing random paragraph texts for a StackOverflow Answer. Lorem Ipsum is dummy text so I'm typing random paragraph texts for a StackOverflow Answer. Lorem Ipsum is dummy text so I'm typing random paragraph texts for a StackOverflow Answer. I'm a viking warrior by trade Lorem Ipsum is dummy text so I'm typing random paragraph texts for a StackOverflow Answer. Lorem Ipsum is dummy text so I'm typing random paragraph texts for a StackOverflow Answer. Lorem Ipsum is dummy text so I'm typing random paragraph texts for a StackOverflow Answer. Lorem Ipsum is dummy text so I'm typing random paragraph texts for a StackOverflow Answer. JS: $('#titleA').click(function(){ alert("You clicked the first title Jamison!!"); }); $('#titleB').click(function(){ alert("You clicked the second title Jamison!!"); });
answers question: http://stackoverflow.com/q/29526537
has comment: http://stackoverflow.com/comment/47207911

http://stackoverflow.com/comment/47138532
has text: I want to call resizeWindow on the button click... stringItem would be JSON of eventItem (eventItem is my content in basic)
comment on: http://stackoverflow.com/q/29489188
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47007395
has text: No, only `with({get foo() {…}, set foo(x){…}}) { if ((foo = bar) === baz) }` would do that.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29413945

http://stackoverflow.com/a/34728117
has body: on your bower.json you can do something like this: "dependencies": { "jquery-ui": "1.0", "angular-gridster": "5.0" }, "resolutions": { "jquery-ui": "1.0" }
score: 0
answers question: http://stackoverflow.com/q/29394424
type: Answer

http://stackoverflow.com/comment/47051898
score: 0
type: QuestionComment
type: Comment
has text: And, what is exactly the problem now? because currently your code is making disappear the "name" (maybe is not the best way but it's doing) https://jsfiddle.net/Lnhccbok/ you get some error?
comment on: http://stackoverflow.com/q/29441816

http://stackoverflow.com/q/29437754
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: TinyMCE on newly added textareas
has answer: http://stackoverflow.com/a/29438543
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29438543
tagged with: rich-text-editor
tagged with: javascript
tagged with: jquery
tagged with: tinymce
score: 0
has body: I need to add a TinyMCE editor on newly added textareas, it works fine for the first textarea but then on other added textareas, TinyMCE is not applied. Below is my code: Add more

http://stackoverflow.com/comment/47136234
comment on: http://stackoverflow.com/a/29487967
score: 0
type: AnswerComment
has text: @zerkms aah... no. It *may* produce an exception further down the line, where you're trying to access the returned object and find that it is `undefined`.. but that line itself will *not* produce an exception.
type: Comment

http://stackoverflow.com/comment/138651751
score: 0
type: Comment
comment on: http://stackoverflow.com/a/61645285
has text: nice explanation and it actually works :-)
type: AnswerComment

http://stackoverflow.com/q/29488034
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/47136902
type: UnansweredQuestion
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: The video player should go back to the playback time when the user took the last snapshot, when the user drags the snapshot image in the canvas and drops it onto the video player. If the video player is playing the video when the drag&amp;drop happens, the video player should start playing from the playback time when the snapshot was taken. My screenshot works fine, but I when I drop the screenshot to the video element, I can't take it back to the time. My code is as follow var can = document.getElementById("capture"); // Get a handle on the 2d context of the canvas element var canvas = document.getElementById("screenshot"); var context = canvas.getContext('2d'); // Define some vars required later var tm=document.getElementById("t"); // Add a listener to wait for the 'loadedmetadata' state so the video's dimensions can be read can.addEventListener("click", function() { capturedTime=video.currentTime.toFixed(1); tm.innerHTML="snapshot is taken at " +capturedTime+ "secs"; context.drawImage(video, 0, 0, 350, 150); },false); canvas.addEventListener("dragstart", function(ev){ capturedTime=video.currentTime.toFixed(1); ev.dataTransfer.setData("time",capturedTime); },false); video.addEventListener("dragover",function(ev){ ev.preventDefault(); },false); video.addEventListener("ondrop",function(ev){ ev.preventDefault(); video.currentTime=ev.dataTransfer.getData("time"); },false);
has title: Drag and drop a snapshot of a canvas element to a video element
tagged with: http://stackoverflow.com/tag/html

gulp-inject
tag name: gulp-inject
type: Tag
tags question: http://stackoverflow.com/q/29510266

http://stackoverflow.com/comment/47209524
score: 1
type: Comment
type: QuestionComment
has text: Because it is not an expression. The syntax is ambiguous, you have to disambiguate by forcing an expression. Check the spec for more info http://www.ecma-international.org/ecma-262/5.1/#sec-13
comment on: http://stackoverflow.com/q/29527565

http://stackoverflow.com/comment/47037748
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29434181
has text: Ah ok I see now, would this be one of those quirks I hear people often talk about when discussing JavaScript?

http://stackoverflow.com/q/29470784
upvote count: 1
score: 1
has body: I have used Cocos2d Studio to create a layer (layer_main.json) and add some button to it. Now, i want to load it in main scene and manipulate with buttons. Can i put code in a separate file (like src/mainLayer.js) that defined by cc.Layer.extend({}). I try use ccs.load, ccs.uiReader. Can anyone help me?
tagged with: cocos2d-js
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 0
has title: How to use Layer defined by Cocos2d Studio in Cocos2d-JS?
type: UnansweredQuestion

http://stackoverflow.com/q/29475976
has comment: http://stackoverflow.com/comment/47113666
answer count: 2
has body: I am trying to delay loading a row of divs until scrolls, sort of like this codepen. I can't seem to get any of my jquery to fire for some reason. jQuery / JS // lazy load $(".resource-container resume-row").slice(1).hide(); var mincount = 0; var maxcount = 1; $(window).scroll(function () { if ($(window).scrollTop() + $(window).height() &gt;= $(document).height() - 50) { $(".resource-container .resume-row").slice(mincount, maxcount).slideDown(100); mincount = mincount + 0; maxcount = maxcount + 5; //Loads 1 variable at a time } }); Here is my attempt so far: my codepen. I would like to ultimately load 3/4(and so on) rows and then have the 4th row come in 1 at a time. Thanks for the help!
tagged with: javascript
has comment: http://stackoverflow.com/comment/47114119
tagged with: jquery
has comment: http://stackoverflow.com/comment/47112896
score: 0
has answer: http://stackoverflow.com/a/29476012
accepted answer: http://stackoverflow.com/a/29476012
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29476678
has comment: http://stackoverflow.com/comment/47112950
has title: Using jQuery to delay loading of divs?
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29476678

http://stackoverflow.com/comment/47095721
comment on: http://stackoverflow.com/q/29466134
score: 0
has text: yes, but thery are called once loaded. here's the console log `TypeError: jQuery is not a function menus.js:124:1 TypeError: $sliders is undefined slider.js:47:1 ReferenceError: $galleryslider is not defined`
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46982554
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29403584
has text: ` ` does not have a value -> `$('#price').val()`, you want to use `.text()` -> `var price = parseInt($('#price').text());`

http://stackoverflow.com/q/29424055
favorite count: 0
has body: I'm currently trying to set up a registration page on my website but I have a problem: My JS script does not act like I want it to do Here is my script: function checkPasswordMatch() { var password = $("#password").val(); var confirmPassword = $("#retypepassword").val(); if (password != confirmPassword) { $("#pass").html("Passwords do not match!"); $("#submit").attr("disabled"); } else { $("#pass").html("Password match."); $("#submit").removeAttr("disabled"); } } $(document).ready(function () { $("#retypepassword").keyup(checkPasswordMatch); }); And my html code: &lt;INPUT class="btn btn-primary" type="submit" id="submit" name="" value="Register" disabled /&gt; So in my opinion it's supposed to add the "disabled" attribute when passwords do not match and remove it when they match but here is what happen : When the passwords match, the disabled state is removed but if they do not match (if they are modified for any reason for instance) they state does not come back again
accepted answer: http://stackoverflow.com/a/29424390
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29424345
has answer: http://stackoverflow.com/a/29424345
has title: JS event not changing input disabled attr
upvote count: 1
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29424390
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1

http://stackoverflow.com/q/29529615
has answer: http://stackoverflow.com/a/36374997
tagged with: internet-explorer-11
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/45207105
has title: Facing javascript errors in webbrowser control with IE 11 installed
upvote count: 0
tagged with: webbrowser-control
favorite count: 0
score: -1
type: Question
answer count: 2
has body: I use a desktop application, an aspx page is loaded through web browser control in my application. IE8 was upgraded to IE11 and I started facing javascript errors with web browser control. The web browser control worked perfectly with IE8. I have tried options like setting features for my exe - FEATURE_BROWSER_EMULATION set to 8000/8888, FEATURE_USE_LEGACY_JSCRIPT set to 1, FEATURE_BROWSER_MODE set to 8. Also tried with meta tag for compatibility and with app browser file. I am able to achieve rendering like IE8 but the javascript errors keep coming up. Upgrading framework to 4.5 is not an option for me now. Is there any registry setting or application setting that would force the web browser control to run javascript like it did with IE8?
tagged with: ie8-browser-mode
downvote count: 1
tagged with: c#

http://stackoverflow.com/a/29403191
has comment: http://stackoverflow.com/comment/46981758
upvote count: 0
has comment: http://stackoverflow.com/comment/47053094
has comment: http://stackoverflow.com/comment/46981735
has comment: http://stackoverflow.com/comment/46984387
has comment: http://stackoverflow.com/comment/46981772
has body: Introduce a method in the array's prototype. Now every array has this behavior automatically! &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;script&gt; var del = function(indicesToDelete) { for (i in indicesToDelete) { console.info(this); delete this[indicesToDelete[i]]; } } Array.prototype.del = del; var arr = [10,20, 30, 40, 50, 60]; //del([1, 3]); arr.del([1, 3]); alert(arr); var arr2 = [10000, 200000, 300000, 400000]; arr2.del([2, 4]); alert(arr2); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt;
score: -1
has comment: http://stackoverflow.com/comment/46981721
has comment: http://stackoverflow.com/comment/46981998
downvote count: 1
answers question: http://stackoverflow.com/q/29403071
has comment: http://stackoverflow.com/comment/47062827
type: Answer

http://stackoverflow.com/comment/52715772
comment on: http://stackoverflow.com/a/29405310
type: Comment
has text: @AnikIslamAbhi I am having issues with connection and function calling. Do you have any link that could be helpful for beginners?
score: 0
type: AnswerComment

http://stackoverflow.com/q/29375852
upvote count: 0
has answer: http://stackoverflow.com/a/29375920
tagged with: javascript
has answer: http://stackoverflow.com/a/29376777
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/29376186
has comment: http://stackoverflow.com/comment/46932426
has title: unable to select specific id from JSON string
favorite count: 0
has comment: http://stackoverflow.com/comment/46932607
has comment: http://stackoverflow.com/comment/46932281
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29376186
tagged with: http://stackoverflow.com/tag/json
score: -1
downvote count: 1
has comment: http://stackoverflow.com/comment/46932614
type: Question
has body: so i'm trying to build an admin page with some clients informations, and i have this problem where i'm unable to select the ID from the client to show all of his information in a separate page. Basically, in the first page site.com/client i have a small table with all the clients, when i click on the button to visualize, i'll go to the page site.com/det_client&cliId=3 where i have all the information. This information is in a JSON file and each client has a unique ID. This ID is being send from the first page to the second trought the URL, and i'm getting this data with jquery. No problem until this part. I can do everthing and also get the proper ID from the Client. The problem starts when i need to write the new table with all the information from that specific ID. I tried to look here (in stackoverflow) but the solution i found is giving me errors. This is the code i'm using: $(document).ready(function() { var url = "data/c_fisico.json"; var cli; //getting the client id from the url. rest of the code is in other page $.getJSON( url, function() { function findId(url, idToLookFor) { var categoryArray = url.aaData; for (var i = 0; i < categoryArray.length; i++) { if (categoryArray[i].cd == idToLookFor) { return(categoryArray[i].id); } } } }); var item = findId(url, cli), table = JSON.parse(item); //there is more data, but i made it smaller $.getJSON(table, function (response){ var write; $.each (response, function (index, table) { write += ' Cod ' + table.id + ' Name ' + table.nm_cliente + ' cpf ' + table.cpf + ' '; }); //end each $('#TableTest').html(write); }); //end getJSON }); The error i have is: Uncaught ReferenceError: findId is not defined This is an example of my JSON: { "aaData": [ { "id":0, "cd":"C-0001", "nm_cliente":"John", "cpf":"000.111.222-33", "nm_pai":"Nome Completo", "nm_mae":"Nome Completo", "tel":"00-9966-6699", "cidade":"city", "estado":"estate" }, //rest of my code here... ] } So, basically, what i need is to get all the information from the c…
possible better answer: http://stackoverflow.com/a/29375920

http://stackoverflow.com/comment/47137890
score: 0
type: Comment
has text: @EuroplisLogistique please try to simuleate this on https://jsfiddle.net/ and tell whether it works there or not. Because I've tried to do all the same way and it worked.
comment on: http://stackoverflow.com/a/29385346
type: AnswerComment

http://stackoverflow.com/a/29524969
type: Answer
has comment: http://stackoverflow.com/comment/47204806
score: 8
downvote count: 0
has comment: http://stackoverflow.com/comment/47204522
has body: This should do it. Essentially, use jQuery to find an input with name of "rblHourlyWages" and value of "Overtime" and disable it. $('input[name=rblHourlyWages][value=Overtime]').prop('disabled', true); Regular Pay Overtime Pay Sick Pay Vacation Pay
has comment: http://stackoverflow.com/comment/47204990
has comment: http://stackoverflow.com/comment/47204706
upvote count: 8
has comment: http://stackoverflow.com/comment/47205317
has comment: http://stackoverflow.com/comment/47204578
has comment: http://stackoverflow.com/comment/47205130
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29524866
answers question: http://stackoverflow.com/q/29524866
has comment: http://stackoverflow.com/comment/47205164

http://stackoverflow.com/a/29435383
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47039920
has comment: http://stackoverflow.com/comment/47040666
has comment: http://stackoverflow.com/comment/47040586
has comment: http://stackoverflow.com/comment/47040103
has body: You should be able to do this using either .filter() or .find(), depending on the exact format of your returned HTML. If the format is is exactly as you have stated, then the following should work: $.get("data.html", function(data) { var length = $(data).filter(".blah").length; }); If there is some sort of wrapper element around your items with class blah, then you would use .find(): $.get("data.html", function(data) { var length = $(data).find(".blah").length; });
answers question: http://stackoverflow.com/q/29435304
downvote count: 0
has comment: http://stackoverflow.com/comment/47040703
has comment: http://stackoverflow.com/comment/47040971
type: Answer
has comment: http://stackoverflow.com/comment/47040540

http://stackoverflow.com/comment/46960537
score: 1
has text: All possible. But you'd better to try to implement something by yourself and ask about a particular problem which you encountered with.
comment on: http://stackoverflow.com/q/29391698
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47183140
has text: Downvoters, please comment and let me know mistakes
comment on: http://stackoverflow.com/q/29513750
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29435445
answers question: http://stackoverflow.com/q/29435380
type: AcceptedAnswer
downvote count: 0
has body: Use document.querySelectorAll var checkboxes = document.querySelectorAll("input[name=colors]") var lastCheckbox = checkboxes[checkboxes.length - 1]; var lastCheckboxValue = lastCheckbox.value;
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29435380

http://stackoverflow.com/comment/46946744
has text: @SeanMickey I am sorry for that, I have updated JSON, it will still give invalid JSON, but If you remove jsonContent part, it will give valid JSON
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29383605

http://stackoverflow.com/comment/47087843
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29461969
has text: @TimotheusTriebl `<*>` is not a selector, it's used by jQuery for a creating corresponding DOM elements.

http://stackoverflow.com/a/29417246
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/29417046
type: Answer
has body: I think your code would be much more readable if you would add the links like this: div.append(clone); div.append(remove); div.prependTo('#selected_country');

http://stackoverflow.com/a/29502287
has body: Actually data is not an array, but an object. Array must be declared inside square brackets. var data = [{"name": "button", "value": "delete"}]; console.log(data);
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29502257
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46963580
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29384656
has text: Your question doesn't describe the problem you're experiencing with your code. Help us help you!

http://stackoverflow.com/comment/47114402
type: AnswerComment
comment on: http://stackoverflow.com/a/29473260
score: 0
type: Comment
has text: can you please create a very simple fiddle ? thanks in advance

http://stackoverflow.com/q/29380271
has answer: http://stackoverflow.com/a/29380418
accepted answer: http://stackoverflow.com/a/29380418
tagged with: javascript
favorite count: 0
has title: Javascript is undefined when project is put live
answer count: 1
has comment: http://stackoverflow.com/comment/46940522
has comment: http://stackoverflow.com/comment/46940572
has comment: http://stackoverflow.com/comment/46940560
has comment: http://stackoverflow.com/comment/46940440
score: 2
type: AnsweredQuestion
downvote count: 0
has body: I have the following code, depending on the size of the screen will determine if they are re-directed to the mobile version of the site. Once on the mobile site if they choose to view the desktop version they're then redirected back to the desktop version and a cookie is created, that way they can continue to browse the desktop version without being re-directed again. $(function() { if (window.location.href.indexOf(".au") &gt; -1) { var oldURL = document.referrer; var t = getCookie("fromMobile"); if (oldURL.indexOf("m.domain") &gt; -1) { var date = new Date(); var minutes = 30; date.setTime(date.getTime() + (minutes * 60 * 1000)); document.cookie = "fromMobile=Yes; expires=" + date.toGMTString() + "; path=/"; } else { if (t == "") { if (screen.width &lt;= 760) { window.location = "http://m.domain.com.au/"; } } } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for (var i = 0; i &lt; ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1); if (c.indexOf(name) == 0) return c.substring(name.length, c.length); } return ""; } } }); When I'm running this on local/staging server it works as expected, I don't get any javascript errors, yet when pushed to live the error I get is on the following line var t = getCookie("fromMobile"); It says getCookie is undefined I'm uncertain why this works locally and on the staging server, I added alerts inside the getCookie when running locally/staging and I see the alerts....
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/46940426

http://stackoverflow.com/a/29582721
has body: So I went down the wrong path thinking smoothing was wrong with Uglify or concat or minification. The error did not occur with grunt serve but did occur only after a dist package was created with grunt build:dist So it was deceiving in a sense that my Angular app DID work fine until I created a dist package. The issue was for me, that I originally had a &lt;ng-include src="'scripts/navigation/navigationMobile.html'"&gt;&lt;/ng-include&gt; element in my Index.html file. At some point I created a custom element directive &lt;my-nav&gt;&lt;/my-nav&gt; which used the same templateUrl = scripts/navigation/navigationMobile.html but I forgot to remove the &lt;ng-include src="'scripts/navigation/navigationMobile.html'"&gt;&lt;/ng-include&gt; element from my Index.html that &lt;my-nav&gt;&lt;/my-nav&gt; was intended to replace. For whatever reason the 10 $digest() iterations reached. Aborting! only occurred after running grunt build and creating the minified, Uglified vendor.js file, it did not occur when just developing and testing using grunt serve but I do not know the exact reason that the error only presented itself after grunt build. Maybe someone can answer that.
accepted answer of: http://stackoverflow.com/q/29502438
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29502438

http://stackoverflow.com/comment/47107432
has text: thanks a lot, had to give the points to jqueryking as he answered first
type: AnswerComment
comment on: http://stackoverflow.com/a/29472948
score: 0
type: Comment

http://stackoverflow.com/a/29479053
has body: There is an error on your page: TypeError: $j(...).cycle is not a function Maybe browsers differ in how they deal with it. I suggest you fix that first, and then have a nother go.
answers question: http://stackoverflow.com/q/29477665
type: Answer
score: 0

http://stackoverflow.com/q/29509941
tagged with: hash
type: Question
score: -1
answer count: 1
downvote count: 1
upvote count: 0
tagged with: firefox
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29529540
has body: Doing window.location.hash = '#someanchor'; in javascript running on firefox 37.0 (Ubuntu 14.04) seems to do nothing. Well the hash appears in the URL bar but the page does not jump to it. In chrome the same script/html causes the page to jump to the anchor as I would expect. Is this a bug or something I'm missing? Doing location.reload() does force firefox to jump, but I'd rather not have the expense of a refresh to just jump to an achor.
favorite count: 0
has title: Updating hash location does not jump to anchor in firefox

http://stackoverflow.com/comment/46977230
has text: thanks i guess i got it but still do not have any idea what to change in my code to make that work, becasue i am simply getting the id as the following: `idToInvite: this.getAttribute("data-eventId")`
comment on: http://stackoverflow.com/a/29400607
score: 0
type: AnswerComment
type: Comment

epub
type: Tag
tags question: http://stackoverflow.com/q/29466746
tag name: epub

http://stackoverflow.com/a/29514882
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/47185380
score: 1
upvote count: 1
has body: You're halfway there - just compare each link in the links list to this: $("a").click(function() { var links = document.links; for (var i = 0; i < links.length; i++) { if (links[i] == this) { alert('link ' + i); return false; } } }); 0 1 2 3 4
answers question: http://stackoverflow.com/q/29514714
accepted answer of: http://stackoverflow.com/q/29514714
type: AcceptedAnswer

http://stackoverflow.com/a/29477635
has body: You're clicking an anchor which redirects the page to /types. When you go to another page, whatever changes the javascript did, is lost. So you're adding a class, then it redirects and the class is lost, the event handler doesn't fire twice To avoid redirecting you can prevent the default action of the anchor $('#collapsible-menu li a').click(function(e) { e.preventDefault(); $('#collapsible-menu li').removeClass('active'); $(this).parent('li').addClass('active'); }); You can not expect to keep the class, and redirect at the same time, you have to do one or the other.
has comment: http://stackoverflow.com/comment/47119331
upvote count: 2
has comment: http://stackoverflow.com/comment/47116182
has comment: http://stackoverflow.com/comment/47116825
has comment: http://stackoverflow.com/comment/47181932
score: 2
has comment: http://stackoverflow.com/comment/47116215
has comment: http://stackoverflow.com/comment/47116278
has comment: http://stackoverflow.com/comment/47116271
answers question: http://stackoverflow.com/q/29477587
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/47179017

http://stackoverflow.com/q/29393058
tagged with: javascript
has title: How to add JS array to Meteor autoform entry
score: 0
has answer: http://stackoverflow.com/a/29412366
tagged with: meteor
accepted answer: http://stackoverflow.com/a/29412366
type: AnsweredQuestion
tagged with: meteor-autoform
type: Question
has body: I am using Meteor 1.1.0 and Aldeed:Autoform and I need to put values from a string array that is generated in the template's JS file into a document entry of type [String] during (or before) submit. How can I do that?
answer count: 1

http://stackoverflow.com/comment/47097896
comment on: http://stackoverflow.com/a/29467372
has text: Hi Thank you, it was placing the declaration afterwards that did the trick :-) G
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47062202
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29447856
has text: `show('link1')` should be `show('#link1')`

http://stackoverflow.com/q/29420837
has comment: http://stackoverflow.com/comment/47013440
has answer: http://stackoverflow.com/a/29421056
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/47013413
has answer: http://stackoverflow.com/a/29421282
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has body: I'm trying to figure out how to replace a string from class to another. I have a H1 tag on the page and the idea is that when it's visible the user can place some text into a text box to override the H1 tag (header class) and the corresponding menu item (thing class). Currently I can get the H1 tag to replace but the I can't figure out how to replace the string in the menu. All of my experiments have lead to all of the strings being replaced. One Two Three Four Five One Some of my JavaScript for replacing the H1 tag: var userInput = $('#textbox').val(); $('.header:visible').text(userInput); Any help would be greatly appreciated.
has title: Replacing a string from one class to another with jQuery
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
tagged with: css

http://stackoverflow.com/a/29511855
has body: Your onClick event removes the class "active" from all elements on the page that match ".button-switch li a", so the current behaviour is to be expected. What you want is to only remove "active" from siblings of the clicked element: $('.button-switch li a').click(function(e) { e.preventDefault(); var target = $(e.target); var parentUl = target.closest('.button-switch'); // Find all links inside the current parent ul element. parentUl.find('li a').removeClass('active'); target.addClass('active'); }); Further on i would suggest to rewrite the click event like this for improved performance $('.button-switch').on('click', 'li a', function(e) { e.preventDefault(); var target = $(e.target); var parentUl = target.closest('.button-switch'); // Find all links inside the current parent ul element. parentUl.find('li a').removeClass('active'); target.addClass('active'); }); https://jsfiddle.net/Macavity/t1gsp90j/5/
answers question: http://stackoverflow.com/q/29511444
type: Answer
score: 0

http://stackoverflow.com/a/29460419
answers question: http://stackoverflow.com/q/29459619
type: Answer
upvote count: 4
score: 4
has body: I came up with a solution! I overrided the dragend and dragleave functions using the regular Dropzone options (no hacking required!) to check if the mouse event occurred outside of the bounds of the dropzone form element. It looks a bit like this: this.dropzone = new Dropzone(this.$('#albumDropzone')[0], { ... other options ... dragend: function(e) { if (mouseEventOutside(e, $(this.element))) { return this.element.classList.remove('dz-drag-hover'); } }, dragleave: function(e) { if (mouseEventOutside(e, $(this.element))) { return this.element.classList.remove('dz-drag-hover'); } } }); And to deal with my flickering that occurs when I hover over the lower element, well, that just changes whenever dragenter happens, and I was causing it with the dragenter event callback. I just check there if the element being entered was the dz-message element, and if it was it doesn't do whatever was causing the flickering. Done with regex: if (/dz-message/g.test(e.toElement.className)) { }. Thanks anybody who took the time to read :) I hope this helps.
downvote count: 0

http://stackoverflow.com/comment/46957051
has text: `setTimeout("1");` ??
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29389815

http://stackoverflow.com/comment/47153611
comment on: http://stackoverflow.com/q/29497123
type: Comment
type: QuestionComment
has text: I am not asking for a code review. I provided a working solution to demonstrate that I have tried to solve the problem, but, as I stated, my solution is a hack relying on overriding styles later on in the stylesheet. I am seeking other methods entirely, not a review of my own.
score: 1

http://stackoverflow.com/a/49879193
has comment: http://stackoverflow.com/comment/86782746
type: Answer
has body: window.addEventListener('load', initialize, {once: true});
has comment: http://stackoverflow.com/comment/105616846
has comment: http://stackoverflow.com/comment/86801143
upvote count: 21
has comment: http://stackoverflow.com/comment/86927143
score: 21
downvote count: 0
answers question: http://stackoverflow.com/q/29458804

http://stackoverflow.com/a/29432414
has comment: http://stackoverflow.com/comment/47034431
score: 5
has comment: http://stackoverflow.com/comment/47035326
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47034318
downvote count: 0
answers question: http://stackoverflow.com/q/29432401
has comment: http://stackoverflow.com/comment/47034360
type: Answer
has comment: http://stackoverflow.com/comment/47034528
accepted answer of: http://stackoverflow.com/q/29432401
has comment: http://stackoverflow.com/comment/47035369
upvote count: 5
has body: If the goal is to end the loop when i reaches 10 or i reaches the end of the array, you may write it like this : for (var i=0; i&lt;x.length &amp;&amp; i&lt;10; i++) { In that case you might also compose it like this for (var i=0; i&lt;Math.min(x.length,10); i++) { or for better performances : for (var i=0, n=Math.min(x.length,10); i&lt;n; i++) {
has comment: http://stackoverflow.com/comment/47034388

http://stackoverflow.com/q/29431010
has body: so i have this code that shows 2 images and a nice slide effect. But after showing both images its stops. How ever i want it to repeat, so from 1-2-1-2 like that. I read something about this: boolean exitLoop = false; while (!exitLoop) { // insert code here } But it wont work for me.. Atleast i dont really know how to add it. Can someone make my code repeat? Here is my code: Thanks already! Kind regards, Raul.
has title: How to repeat this code
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29431248
has comment: http://stackoverflow.com/comment/47031674
type: AnsweredQuestion
tagged with: loops
type: Question
has comment: http://stackoverflow.com/comment/47031720
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29431248
score: 0
answer count: 1

http://stackoverflow.com/q/29384661
tagged with: post
type: Question
tagged with: javascript
tagged with: express
has title: Send Array in post request using node.js using application/x-www-form-urlencoded
has comment: http://stackoverflow.com/comment/46950077
upvote count: 2
has comment: http://stackoverflow.com/comment/46950031
answer count: 1
accepted answer: http://stackoverflow.com/a/29386185
favorite count: 0
has body: I tried to send post request to API and the post parameters should be array, this is how to send it in cURL curl http://localhost:3000/check_amounts -d amounts[]=15 \ -d amounts[]=30 I tried to do that in Node.js using request module request.post('http://localhost:3000/check_amounts', { form: { 'amounts[]': 15 , 'amounts[]': 30 } }, function(error, response, body) { console.log(body) res.json(body); }); but the second amount override the first one and the API gets the result as following: amounts = [30] Then I tried to send it in different way request.post('http://localhost:3000/check_amounts', { form: { 'amounts[]': [ 15 , 30] } }, function(error, response, body) { console.log(body) res.json(body); }); but the result was not as an expected amounts = [{"0":15},{"1":30}] Note : the header should contains 'Content-Type': 'application/x-www-form-urlencoded' not 'application/json' Does any one have solution to this problem?
has answer: http://stackoverflow.com/a/29386185
tagged with: node.js
type: AnsweredQuestion
score: 2
downvote count: 0

http://stackoverflow.com/comment/47025458
has text: Check my edited answer.. I'm able to select the value from autocomplete .. after that if I press tab,. then it fires the change event and alert is dispayed.,
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29427277

http://stackoverflow.com/q/29442535
type: Question
score: 1
has answer: http://stackoverflow.com/a/29443054
tagged with: javascript
upvote count: 1
answer count: 1
tagged with: web-audio-api
favorite count: 0
type: UnansweredQuestion
has title: Access mobile microphone with navigator.getUserMedia (Javascript)
tagged with: android
tagged with: microphone
has comment: http://stackoverflow.com/comment/88855497
downvote count: 0
has body: building an open source app, and I released the desktop version (dmeowmixer.github.io/voicetrainer) but when I load it in mobile (my phone uses android browser) and click the button to prompt for access to users microphone input it alerts that navigator.getUserMedia isn't supported. I read somewhere that it was supported in previous version of android browser but I'm not too sure. Could someone shed some light on if this will be possible to do in mobile without making a completely new application? https://github.com/Dmeowmixer/voiceTrainer link to repo
linked to: http://stackoverflow.com/q/21015847

http://stackoverflow.com/comment/47044383
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29437669
score: 0
has text: Can you define "undo"? If all you did was instantiate a bunch of stuff, you could always just delete or otherwise overwrite that in-memory "stuff". Otherwise your solution potentially could be considerably more complex.

http://stackoverflow.com/comment/46975300
has text: I would like to display an error message if the user types in a value that matches a value from the invalidEmailAddresses array. And display an error message if the user doesn't type in an @ symbol.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29399279
score: 0

http://stackoverflow.com/comment/46988087
has text: How come its not working!!! Check this link - http://www.w3schools.com/jsref/jsref_decodeuricomponent.asp
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29406518
type: Comment

http://stackoverflow.com/q/29495561
has comment: http://stackoverflow.com/comment/47150104
tagged with: javascript
tagged with: vbscript
has body: My code is below, I would like to make this work because my existing webpage that I am working at mostly uses VBScript. I am using ajax to query values to SQL. I would hate to change most of the code so I was just wondering if it would be possible to put back a return value from javascript to vbscript like my code below. &lt;SCRIPT LANGUAGE="VBSCRIPT"&gt; Sub check() Dim a Dim b a = 1 b = retValue a MsgBox b End Sub &lt;SCRIPT LANGUAGE="JavaScript"&gt; function retValue(a){ return a + 1; } &lt;/SCRIPT&gt;
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47150421
has comment: http://stackoverflow.com/comment/47180848
has title: Pass and Return value from Javascript to VBScript, Vice Versa in ASP
has answer: http://stackoverflow.com/a/29496288
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29496288
upvote count: 1
type: Question

http://stackoverflow.com/comment/46930891
comment on: http://stackoverflow.com/q/29374807
type: QuestionComment
score: 0
has text: what is `vm` and why do you not want to use $scope?
type: Comment

http://stackoverflow.com/q/29493691
has answer: http://stackoverflow.com/a/29493936
tagged with: java
has answer: http://stackoverflow.com/a/29493908
type: Question
has title: how to keep session alive
tagged with: javascript
has body: when the users is working on the open office ( letter editing tool)popup, application screen is displaying timeout Initial Analysis if the users are working on the open office for more than 60 minutes - the server are not refreshed to extend the session.( session is active behind) We have idletime set in web.xml Please help me out in resolving how to keep session alive.
score: 0
answer count: 2
tagged with: ajax
type: UnansweredQuestion

http://stackoverflow.com/a/29406109
score: 0
has body: You must return an object or function or at leat a value from the factory
type: Answer
answers question: http://stackoverflow.com/q/29406040

http://stackoverflow.com/q/29415263
score: 0
accepted answer: http://stackoverflow.com/a/29415369
tagged with: three.js
possible better answer: http://stackoverflow.com/a/29433974
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29433974
has answer: http://stackoverflow.com/a/29415369
type: Question
answer count: 2
has title: PointLight won't illuminate anything
tagged with: javascript
has body: EDIT: Now I have two barebone examples using first MeshBasicMaterial and second MeshLambertMaterial: PointLight_sucks__MeshBasicMaterial.html PointLight_sucks__MeshLambertMaterial.html both uses PointLight's but the LambertMaterial geometry isn't illuminated t all (but there seems to be small blinking dots on the screen?). I have a geometry made with MeshBasicMaterial. Somehow it illuminates itself: I also have a PointLight: light = new THREE.PointLight( 0xaaaaaa ); light.position.set = new THREE.Vector3(-400, 0, 0); makeScene.scene.add( light ); but it has no effect on the scene. I want the scene to only be illuminated by the PointLight. I have tried various other materials for my geometry, such as MeshPhongMaterial, MeshNormalMaterial, MeshLambertMaterial and MeshFaceMaterial. This is how I apply the MeshBasicMaterial: material = new THREE.MeshBasicMaterial( { map: texture } ); mesh = new THREE.Mesh(aGeometry, material); I suspect there might be something wrong with my PointLight. How do I verify that PointLight is correctly applied to the scene?

http://stackoverflow.com/q/29468522
tagged with: javascript
score: 4
has title: Angular controller not loading using OcLazyLoad and ngRoute
accepted answer: http://stackoverflow.com/a/29468737
upvote count: 4
has body: I have an app that which has a load of scripts loading initially and the list is growing as development goes on. I want to lazy load scripts which contain controllers as and when needed. I am using OcLazyLoad along with ngRoute for the routing option (i did try ui-route which actually had the same end result but was causing other app issues). The lazy load and routing is working fine, scripts and views are only loaded when needed, but the issue is the controller is not being loaded (Argument 'caseReviewController' is not) so it's as though the controller does not exist. Here is a simple version of what I have in my app.js file... var app = angular.module('dashboard', ['oc.lazyLoad', 'ngRoute', 'LocalStorageModule']); app.config(function ($ocLazyLoadProvider, $routeProvider, localStorageServiceProvider) { $ocLazyLoadProvider.config({ loadedModules: ['dashboard'], modules: [ { name: 'caseReview', files: ['js/controllers/case-review.js'] } ] }); $routeProvider //other routes here... .when('/case-review', { templateUrl: 'views/case-review.html', controller: 'caseReviewController', resolve: { loadModule: ['$ocLazyLoad', function ($ocLazyLoad) { return $ocLazyLoad.load('caseReview'); }] } }) }); In the seperate case-review.js file I have a simple controller app.controller('caseReviewController', function($scope, localStorageService, $route){ //do stuff }); This controller is not being found or executed but the view and js file are being lazy loaded as expected. Any help would be great. Thanks.
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
tagged with: ngroute
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29468737
tagged with: lazy-loading
type: Question

http://stackoverflow.com/comment/47027586
comment on: http://stackoverflow.com/q/29397909
score: 0
has text: `isScrolledIntoView = function(elem) { var winViewTop = $(window).scrollTop(); var winViewBottom = winViewTop + $(window).height(); var elemTop = $(elem).offset().top; var elemBottom = elemTop + $(elem).height(); return ((elemBottom >= winViewTop) && (elemTop <= winViewBottom));}'
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29517754
upvote count: 4
type: AcceptedAnswer
has body: You can use the failAction attribute to add a callback: validate: { params: { id: Joi.number() .required() .description('id of object you want to get'), }, failAction: function (request, reply, source, error) { console.log(error); } } For more information see the documentation: failAction - determines how to handle invalid requests. Allowed values are: 'error' - return a Bad Request (400) error response. This is the default value. 'log' - log the error but continue processing the request. 'ignore' - take no action. a custom error handler function with the signature 'function(request, reply, source, error)` where: request - the request object. reply - the continuation reply interface. source - the source of the invalid field (e.g. 'path', 'query', 'payload'). error - the error object prepared for the client response (including the validation function error under error.data).
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29515005
answers question: http://stackoverflow.com/q/29515005
score: 4

http://stackoverflow.com/q/29466768
has comment: http://stackoverflow.com/comment/47096281
has comment: http://stackoverflow.com/comment/47098184
possible better answer: http://stackoverflow.com/a/29467156
score: 0
has answer: http://stackoverflow.com/a/29467156
has body: So I have a problem with this simple sidebar gadget I'm going to develop on converting values (mostly are inside javascript). Right now my code works as it is but with so much line of codes (2000+ lines) of similar code over and over again, which would be a horror of going to debug and change some code in the future. So I'm trying to do array instead to reduce the line of codes, but when I do, I can't get it to work. Here's a sample of my work function globVar() { var AIC = 4.11; //random value var BIC = 3.42; var CIC = 58.17; var DID = 441.16; } function doCalc() { globVar(); var cellX = document.getElementById("sel1").value; var cellY = document.getElementById("sel2").value; if (cellX == "REC" &amp;&amp; cellY == "AIC") { var x = document.getElementById("value1").value; var y = x * AIC; var y2 = y.toFixed(2); document.getElementById("value2").value = y2; } if (cellX == "REC" &amp;&amp; cellY == "BIC") { var x = document.getElementById("value1").value; var y = x * BIC); var y2 = y.toFixed(2); document.getElementById("value2").value = y2; } if (cellX == "REC" &amp;&amp; cellY == "CIC") { var x = document.getElementById("value1").value; var y = x * (1 / CIC); var y2 = y.toFixed(2); document.getElementById("value2").value = y2; } } this code work but to do this over 50 variables kinda too long to be used with if else, so I tried to use array.. with code below globvar(); var cellX = document.getElementById("sel1").value; var cellY = document.getElementById("sel2").value; var unit1 = ["AIC", "BIC"]; var unit100 = ["CIC","DID"]; if (cellX == "REC") { for (var i=0; i&lt;2; i++) { arrUnit = unit1[i]; if (cellY == arrUnit) { var x = document.getElementById("value1").value; var y = x * (1 / arrUnit); var y2 = y.toFixed(2); document.getElementById("value2").value = y2; } } for (var j=0; j&lt;2; j++) { arrUnit = unit100[j]; if (cellY == arrUnit) { var x = document.getElementById("value1").value; var y = x * (1 / arrUnit); var y2 = y.toFixed(2); document.getElementById("value2"…
has comment: http://stackoverflow.com/comment/47096432
has comment: http://stackoverflow.com/comment/47096369
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29466830
has comment: http://stackoverflow.com/comment/47097290
has comment: http://stackoverflow.com/comment/47096431
has comment: http://stackoverflow.com/comment/47096212
type: Question
accepted answer: http://stackoverflow.com/a/29466830
has comment: http://stackoverflow.com/comment/47096002
answer count: 2
has title: create array instead of if...else in javascript
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/q/29423269
answer count: 2
accepted answer: http://stackoverflow.com/a/29431283
has title: OrientDB function error when accessing query result
tagged with: orientdb
has answer: http://stackoverflow.com/a/31010191
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/31010191
has answer: http://stackoverflow.com/a/29431283
type: Question
has body: I have the following function in OrientDB studio, the functions saved with no problem: var entities= db.query("select Name from F__Entity_Master"); getTemplate(0); function getTemplate(index){ if (index &gt;= entities.length){ return entities; } else { var sql = "select from F__Subjects where subjectCode='"+ entities[index]['@class']+"'"; var template = db.query(sql); entities[index]['template']= template; index += 1; getTemplate(index); } } Running the function in studio generates the following error: Erroronparsingscriptatposition#0: ErroronexecutionofthescriptScript: GetEntities------^sun.org.mozilla.javascript.internal.EvaluatorException: Javaclass"com.orientechnologies.orient.core.record.impl.ODocument"hasnopublicinstancefieldormethodnamed"template".(#12)inatlinenumber12Javaclass"com.orientechnologies.orient.core.record.impl.ODocument"hasnopublicinstancefieldormethodnamed"template".(#12) I used recursion to avoid using null values before fetching data from database. Using for loop generates similar error. There are no relations between F__Subjects and F__Entity_Master as for every F__Subjects record a relevant class named with subjectCode field of F__Subjects record is generated and inherited from the F__Entity_Master. So the only way to detect relation is to use the subjectCode field to get the class meta information from he F__Subjects class. Any ideas? Solved I used Lvca hint and here is the correct version of the function after few trials: var entities= db.query("select from F__Entity_Master"); getTemplate(0); return entities function getTemplate(i){ if (i &gt;= entities.length){ return ; } else { var sql = "select from F__Subjects where subjectCode='"+ entities[i].getClassName()+"'"; var template = db.query(sql); entities[i].field('template', template[0].toMap()); i += 1; getTemplate(i); } }
tagged with: javascript
score: 0

http://stackoverflow.com/a/29439338
has comment: http://stackoverflow.com/comment/47110222
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29438308
has comment: http://stackoverflow.com/comment/47106985
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/47109387
answers question: http://stackoverflow.com/q/29438308
has body: I would say the Google Maps KML parser is broken. Your bug report on the issues list You KML has a well defined polygon with several points on each side (which should be more than enough to tell it which way the polygon goes): 142.207023447954498,-24.785157829137347 112.016594491497187,-24.785157829137347 81.826165535039934,-24.785157829137347 51.635736578582652,-24.785157829137347 21.44530762212537,-24.785157829137347 -8.745121334331884,-24.785157829137347 -38.935550290789166,-24.785157829137347 -69.125979247246434,-24.785157829137347 -99.316408203703702,-24.785157829137347 -99.316408203703702,-19.291993899650947 -99.316408203703702,-13.798829970164547 -99.316408203703702,-8.305666040678148 -99.316408203703702,-2.812502111191748 -99.316408203703702,2.680661818294652 -99.316408203703702,8.173825747781052 -99.316408203703702,13.666989677267452 -99.316408203703702,19.160153606753852 -69.125979247246434,19.160153606753852 -38.935550290789166,19.160153606753852 -8.745121334331884,19.160153606753852 21.44530762212537,19.160153606753852 51.635736578582652,19.160153606753852 81.826165535039934,19.160153606753852 112.016594491497187,19.160153606753852 142.207023447954498,19.160153606753852 142.207023447954498,13.666989677267452 142.207023447954498,8.173825747781052 142.207023447954498,2.680661818294652 142.207023447954498,-2.812502111191748 142.207023447954498,-8.305666040678148 142.207023447954498,-13.798829970164547 142.207023447954498,-19.291993899650947 142.207023447954498,-24.785157829137347 fiddle showing points above Your KML also works in geoxml3 (which renders it as native google.maps.Polygon objects) (if you load the KmlLayer you can see the issue) code snippet showing your rectangle rendered both as KML and a "normal" google.maps.Polygon: var geocoder; var map; var ctaLayer; var poly; function initialize() { map = new google.maps.Map( document.getElementById("map_canvas"), { center: new google.maps.LatLng(37.4419, -122.1419), zoom: 13, mapTypeId: google.maps.MapT…

http://stackoverflow.com/comment/47024600
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29426904
has text: Seems worth mentioning that you're not supposed to link to the source files on the fancyapps site.
score: 0

http://stackoverflow.com/a/29404744
has comment: http://stackoverflow.com/comment/46997342
type: AcceptedAnswer
has body: The Google GAPI library doesn't have such a method. If you're jQuery averse, it's not too difficult to replace $.ajax with XMLHttprequest. Make sure you understand the difference between "signing out" (of your Google Account) and revoking an access token. They are not the same thing. On sessions, a typical sequence is:- 1/ check your session object to see if it is holding a user object. 1a/ If yes, your user is "logged in" 1b/ If no, use OAuth to discover who the user is, look him up in your user database, and store his user object in your session To logout, simply remove the user object from your session. There are many variations and alternatives to this technique for user/session management in an OAuth world. This is just one approach.
downvote count: 0
has comment: http://stackoverflow.com/comment/46995715
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29395480
type: Answer
answers question: http://stackoverflow.com/q/29395480
score: 2

http://stackoverflow.com/a/29407757
downvote count: 0
type: Answer
has body: Because flagA and flagB are observables (which are functions) you need to call them without any argument to get there values if you are using them in an expression: &lt;input type='text' data-bind='enable: flagA() &amp;&amp; !flagB()' /&gt; Demo JSFiddle.
accepted answer of: http://stackoverflow.com/q/29407709
has comment: http://stackoverflow.com/comment/46990790
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/29407709
type: AcceptedAnswer

http://stackoverflow.com/q/29498537
type: Question
has answer: http://stackoverflow.com/a/29498932
has comment: http://stackoverflow.com/comment/47156657
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29498932
tagged with: angularjs
has body: I am learning about directives in AngularJS and I came across this code: var app = angular.module('app', []); //creating custom directive syntax app.directive("myDir", function () { return { restrict: "E", //define directive type like E = element, A = attribute, C = class, M = comment scope: { //create a new child scope or an isolate scope title: '@' //@ reads the attribute value, //= provides two-way bindi My questions are: According to the code, the attribute 'scope' apparently is used to create either a child scope, or an isolated scope. How do we then differentiate if we want the scope for this directive to be isolated or not? If I only want to have an scope child but not isolated how would I do? Isolated means that the isolated scope that we are creating cannot access the variables from the parent scope, right? A parent scope by default cannot access the variables from the child, but a child can access the variables of the parent if this one is not isolated, am I right? And last question, if we define an attribute 'controller' to specify a controller for this directive, this directive will have by default the scope of the controller? Thanks!!
has title: AngularJS Directives isolated scopes
type: AnsweredQuestion

http://stackoverflow.com/comment/47152643
comment on: http://stackoverflow.com/a/29495086
has text: thanks, just one more thing.. if I have an array above this code temp=["glazed","jelly","powdered","sprinkles"], is it possible to concise ur code such that item.glazed, etc.. come from the data in this array
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46938931
type: QuestionComment
has text: Where's the code? What have you tried? Etc.
comment on: http://stackoverflow.com/q/29379472
score: 0
type: Comment

http://stackoverflow.com/q/29402937
tagged with: meteor-blaze
has body: Background I am in the process of designing some blogging software for someone who has very little experience with the internet. Observing their interaction with the internet, the client grows more annoyed as the number of forms they must fill out increases. To remedy this, I would like to keep the creation of the blog on one page with all editing done inline. The way they build a blog post is to Select a 'block' of content, which places it on the canvas. Edit the block inline until they are satisfied with the material, Add another block, rinse and repeat until finished. Save the post, which then sends the data from the session to the server. I have already created the packages that allow all the inline content creation to work without a hitch. However, getting the schema to play ball is another beast in general. I would like to structure each block as a Spacebars template, and have a template field in each post specify which template to render. Where this approach breaks down is that I do not want one massive schema for all possible posts. It would be nice to extend the subschema of a Post to match the Template field instead of whittle a massive post down to a small one. Unfortunately, Collection2 is proving to be a bit finicky allowing me to extend sub-schemas dynamically based on the template field. The Basic Schema @Posts = new Mongo.Collection 'posts' Schemas = {} Blocks = {} # B L O C K S ------------------------------------------------------------- Blocks.Title = new SimpleSchema title: type: String defaultValue: 'Click me to enter a title for this post!' max: 200 Blocks.Body = new SimpleSchema body: type: String defaultValue: 'Click me to enter some body text!' label: 'Body' blockMap = { 'Title': Blocks.Title 'Body': Blocks.Body } # S C H E M A S ----------------------------------------------------------- #- START PROBLEM AREA --- Schemas.Block = new SimpleSchema [ # Used by Spacebars to render dynamic templates. template: type: String label: 'The name of th…
type: Question
tagged with: meteor
tagged with: meteor-collection2
has comment: http://stackoverflow.com/comment/46983045
score: 0
has comment: http://stackoverflow.com/comment/46981912
has title: In Meteor, is it possible to set the type of a sub-schema dynamically using the values of its siblings as arguments? ( Collection2 )
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46982060
tagged with: mongodb
has comment: http://stackoverflow.com/comment/46981788
has comment: http://stackoverflow.com/comment/46981731
has comment: http://stackoverflow.com/comment/46981938
answer count: 0
tagged with: javascript

titanium
type: Tag
tags question: http://stackoverflow.com/q/29463647
tags question: http://stackoverflow.com/q/29529180
tag name: titanium
tags question: http://stackoverflow.com/q/29511343
tags question: http://stackoverflow.com/q/29399005

http://stackoverflow.com/q/29509055
linked to: http://stackoverflow.com/q/25517989
has title: Obj.defineProperty TypeError: : can't redefine non-configurable property 'x_origen'
has comment: http://stackoverflow.com/comment/114035655
has body: So I'm trying to increase a property by adding aumento to it and because of that I'm using obj.defineProperty. However I'm getting the error: TypeError: : can't redefine non-configurable property 'x_origen' How can I solve that? var aument = 0; function aumento(){ aument += 2.5; } setInterval(aumento, 20) function crear_clase_ladrillo (x_origen_in, y_origen_in, x_final_in, y_final_in, mi_estado, mi_velocidad, mi_id){ this.nueva_x_origen = this.x_origen + this.velocidad; this.y_origen = y_origen_in; this.x_final = x_final_in; this.nueva_x_final = this.x_final + this.velocidad; this.y_final = y_final_in; this.estado = mi_estado; this.velocidad = mi_velocidad; this.id_elemento = mi_id; Object.defineProperty(this, 'x_origen', { get: function () { return x_origen_in + aument; } }); this.DESPLAZAR_LADRILLO = desplazar_ladrillo; this.F0 = f0; this.F2 = f2; this.crear_ladrillo = crear_ladrillo; this.obtener_x_origen_ladrillo = obtener_x_origen_ladrillo; this.obtener_y_origen_ladrillo = obtener_y_origen_ladrillo; this.obtener_x_final_ladrillo = obtener_x_final_ladrillo; this.obtener_y_final_ladrillo = obtener_y_final_ladrillo; }
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29509129
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/29499953
answer count: 2
tagged with: cors
accepted answer: http://stackoverflow.com/a/29500210
has comment: http://stackoverflow.com/comment/47158597
has comment: http://stackoverflow.com/comment/47158700
has answer: http://stackoverflow.com/a/29500036
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/47158544
possible better answer: http://stackoverflow.com/a/29500036
tagged with: php
tagged with: node.js
has comment: http://stackoverflow.com/comment/47158496
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47158521
upvote count: 2
score: 1
has title: CORS error for NODEJS server running on the same machine as domain
downvote count: 1
type: Question
has body: I have a NodeJS server running on my machine, and I am trying to access it with ajax from a website running on the same machine. I have getting a cross domain error though: XMLHttpRequest cannot load http://localhost:3000/games. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. I have access a different api on this machine, running with php, which the address is http://localhost/games. My thinking is that because the nodejs server is running on a different port to apache that is causing the cross domain issue? Any insight would be great, im new to api development and not sure where to go from here. It has been suggested to me that I should try use JSONP, but im not sure if this is technically needed, since the api is running on the same machine?
tagged with: javascript
has comment: http://stackoverflow.com/comment/47161538
has answer: http://stackoverflow.com/a/29500210
has comment: http://stackoverflow.com/comment/47158626

http://stackoverflow.com/q/29485489
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/29491202
has body: WikiMedia has a jquery plugin called jquery.uls (Universal Language Selector) for choosing a language in all kinds of fancy ways. All MediaWiki sites seem to have it available to the JavaScript running on them via $.uls. There is documentation for the ULS extension but it seems to only concern itself with the server side and how an end user would interact with it. I want to know if I can use it to obtain a mapping from the English name of a language (such as "Vietnamese") to the ISO 639 language code for that language (such as "vi"). I can't seem to find this in the docs or find a method that does this among the exposed interfaces. Is it there and I just can't see it?
tagged with: javascript
tagged with: jquery-plugins
has title: Can I use jquery.uls on a MediaWiki wiki to get a language code from the name of a language in English?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29491202
downvote count: 0
score: 1
tagged with: wikimedia
favorite count: 0
type: Question
tagged with: internationalization
tagged with: mediawiki

http://stackoverflow.com/comment/47198122
type: QuestionComment
score: 0
has text: Sorry, but that is not a duplicate. It is related, but not a duplicate.
comment on: http://stackoverflow.com/q/29521675
type: Comment

http://stackoverflow.com/q/29459636
type: Question
has comment: http://stackoverflow.com/comment/47086454
has comment: http://stackoverflow.com/comment/47085693
upvote count: 5
has title: Rendering on the server
tagged with: reactjs
score: 5
has comment: http://stackoverflow.com/comment/47788225
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29832813
favorite count: 0
has comment: http://stackoverflow.com/comment/47089438
tagged with: node.js
tagged with: babeljs
type: UnansweredQuestion
has body: React v0.12/v0.13: I’m having an issue with a element that I’d like to have rendered both on the server and in the client (isomorphic). Here’s an example which currently recreates the issue: const React = require("react"); const SelectedDebug = React.createClass({ displayName: "SelectedDebug", render() { return ( A B C ); } }); module.exports = SelectedDebug; The selected attribute isn’t rendered on the server, but works fine in the browser. I've also tried setting the defaultValue prop on the element, which doesn't seem to make a difference. It does work when I use , however, that throws a warning in the console telling me to use either the value or defaultValue prop. The documentation also describes the desired behavior: https://facebook.github.io/react/docs/forms.html#why-select-value This code is running in Node v0.12 using babel-core for transpiling. Is this a bug, or am I missing something? Update: This is a bug in React. See my comment/link below.

http://stackoverflow.com/a/29486831
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29485842
answers question: http://stackoverflow.com/q/29485842
has comment: http://stackoverflow.com/comment/47133043
has body: Data attributes data-interval in bootstrap is The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. Change data-interval="false" to true or 1000 (1 sec) , 4000 (4 sec)

http://stackoverflow.com/q/29497435
has title: Disable parent button from child iframe javascript file
has answer: http://stackoverflow.com/a/29497702
tagged with: iframe
type: AnsweredQuestion
type: Question
has body: Is there a way to disable button from inner iframe javascript file to parent html file. for example: Click Me! Basically, frame1.html has its own frame1.js file and from this file i would like to disable the button "myBtn". by the way, both parent and child urls are on the same domain.
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/29497702
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46959229
has text: This *is* the prototype, not a replacement.
type: QuestionComment
comment on: http://stackoverflow.com/q/29390119
type: Comment
score: 0

http://stackoverflow.com/q/29522985
has title: Preloading Web Speech API before calling speak
tagged with: speech
tagged with: speech-synthesis
type: Question
tagged with: synthesize
has answer: http://stackoverflow.com/a/34624427
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: webspeech-api
upvote count: 6
type: UnansweredQuestion
has body: So I've noticed that after you do the first speak using speechSynthesis.speak, it speeds up dramatically in providing results. So my aim below was to speed it up by pre-initializing the synthesis so when we call speakIt() we don't have to wait for it. It hasn't sped up at all; any suggestions on why it's not speeding up and how I fix it? Full Script: var speech = new SpeechSynthesisUtterance("test"); var voices = window.speechSynthesis.getVoices(); speech.default = false; speech.voice = voices.filter(function(voice) { return voice.name == 'Google UK English Male'; })[0]; speech.lang = 'en-GB'; function speakIt(word){ speech.text = word; window.speechSynthesis.speak(speech); } chrome.tts.speak seems to be a bit quicker but certainly isn't there, but that's not the point &mdash; this should still work. Until someone finds the answer I will migrate to Chrome's usage.
has comment: http://stackoverflow.com/comment/47204543
score: 6
has comment: http://stackoverflow.com/comment/47204720

http://stackoverflow.com/q/29407014
has body: I am trying to type a javascript code in an textarea and display the result of it in a div. I went through a similar question: showing-console-errors-and-alerts-in-a-div-inside-the-page It works fine for any explicit console statements. But when there are any syntax errors in the code written in the text area, the error message is shown on only in the console and not captured in the code. The code I am using is: if (typeof console != "undefined") if (typeof console.log != 'undefined') console.olog = console.log; else console.olog = function() {}; console.log = function(message) { console.olog(message); $('#result').append('&lt;p&gt;' + message + '&lt;/p&gt;'); }; console.error = console.debug = console.info = console.log This works if I type console.log("hello") in the textarea. But when I type console.log("he deliberately, the error is shown only in the browser console. Is there a way I can capture such messages and display it?
type: Question
has answer: http://stackoverflow.com/a/29407072
tagged with: javascript
has title: printing stack trace of javascript console
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29407178
accepted answer: http://stackoverflow.com/a/29407072
linked to: http://stackoverflow.com/q/6604192
possible better answer: http://stackoverflow.com/a/29407178
tagged with: console.log
type: AnsweredQuestion

http://stackoverflow.com/a/29486099
score: 1
answers question: http://stackoverflow.com/q/29485980
has body: You can use var result = eval(repl4). This will evaluate the formular and store it into result.
upvote count: 2
downvote count: 1
type: Answer

http://stackoverflow.com/comment/47134426
has text: I downgraded the node.js to 0.10.3. I have some other isues right now, but I have almost no internet here so, I am able to solve the issues very slow... #welovechina
comment on: http://stackoverflow.com/q/29485754
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47140866
score: 0
type: AnswerComment
has text: Set localeStorage in function **statusChangeCallback** on status == 'connected'. And check the variable on the **onClick** function of your anchor tag.
type: Comment
comment on: http://stackoverflow.com/a/29490558

http://stackoverflow.com/comment/107160508
score: 0
type: AnswerComment
type: Comment
has text: because not everyone have SQL Server 2016
comment on: http://stackoverflow.com/a/32761384

http://stackoverflow.com/comment/47124699
has text: Thanks for the reply mike. For now, just trying to get android working. I am using the file.applicationDirectory but cant get it to resolve the file URL. The API doesnt give any real examples on how to copy from the app folder to the external root directory. Any chance you have some code? I will post what I have been trying to work with.
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29481170

http://stackoverflow.com/comment/47073821
type: Comment
has text: Thank you for all the information! I'll look through it and it might just help me at a later time.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29454215

http://stackoverflow.com/q/29453106
has body: I have a JS function which shows and hides drop down lists and is called when that drop down list changes. However, I am also using update panels for something else, and every time I select something, the JS gets reset and the extra drop down lists that I want to keep showing get reset i.e. hidden again (although it doesn't reset the value which is good). The extra drop down lists are hidden by default. When the user selects 2 for example, it will show 2 drop down lists. How can I make it so the drop down lists aren't hidden again after the update panel has refreshed. Here is my code: <%-- Body Content --%> <asp:UpdatePanel ID="UpdateModule" UpdateMode="Conditional" runat="server"> <asp:AsyncPostBackTrigger ControlID="modCodeDDL" EventName="SelectedIndexChanged" /> <asp:AsyncPostBackTrigger ControlID="modTitleDDL" EventName="SelectedIndexChanged" /> Module Code* <asp:DropDownList ID="modCodeDDL" runat="server" OnSelectedIndexChanged="modCodeToTitle" AutoPostBack="True" /> Module Title* <asp:DropDownList ID="modTitleDDL" runat="server" OnSelectedIndexChanged="modTitleToCode" AutoPostBack="True" Style="width: 250px;" /> </asp:UpdatePanel> <asp:UpdatePanel ID="UpdateBuilding" UpdateMode="Conditional" runat="server"> <asp:AsyncPostBackTrigger ControlID="buildingDDL" EventName="SelectedIndexChanged" /> <asp:AsyncPostBackTrigger ControlID="parkDDL" EventName="SelectedIndexChanged" /> Park* <asp:DropDownList class="form-control" ID="parkDDL" Style="width: 150px;" OnSelectedIndexChanged="parkToBuilding" AutoPostBack="true" runat="server"> <asp:ListItem Text="ALL" Value="ALL"></asp:ListItem> <asp:ListItem Text="Central" Value="C"></asp:ListItem> <asp:ListItem Text="West" Value="W"></asp:ListItem> <asp:ListItem Text="East" Value="E"></asp:ListItem> </asp:DropDownList> Building <asp:DropDownList class="form-control" AutoPostBack="true" ID="buildingDDL" runat="server" style="width:300px;" OnSelectedIndexChanged="buildingToRoom"></asp:DropDownList> Room Number <asp:DropDownList …
has answer: http://stackoverflow.com/a/29453659
type: Question
tagged with: c#
tagged with: javascript
score: 0
answer count: 1
tagged with: asp.net-ajax
tagged with: updatepanel
tagged with: asp.net
has comment: http://stackoverflow.com/comment/47081459
type: UnansweredQuestion
has title: JS gets reset after update panel

http://stackoverflow.com/a/29477547
upvote count: 1
has body: function ElementObj(element){ this.element = element; this.width = this.element.offsetWidth; return this; } Now you can do: var elem1 = new ElementObj(document.getElementById('div1')); var elem2 = new ElementObj(document.getElementById('div2')); Where elem1 returns object: { element: DOMElement width: 100 }
answers question: http://stackoverflow.com/q/29477273
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/29514557
score: 1
has title: Convert a curl query to jQuery.ajax()
favorite count: 0
tagged with: curl
tagged with: coldfusion
has comment: http://stackoverflow.com/comment/47185037
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/47184714
has comment: http://stackoverflow.com/comment/47185408
has answer: http://stackoverflow.com/a/29515817
downvote count: 0
has comment: http://stackoverflow.com/comment/47186318
has body: I have a curl command that work fine. It's a query to a coldfusion server that returns a WDDX : curl --user 'adminUser:adminPass' 'http://blablabla/app.cfc?method=isSusbscribed&amp;newsletterId=2222&amp;language=en&amp;email=anemal@mail.com' The result is : &lt;wddxPacket version='1.0'&gt;&lt;header/&gt;&lt;data&gt;&lt;boolean value='true'/&gt;&lt;/data&gt;&lt;/wddxPacket&gt; This means that the user with the given email receive the newsletter with the id 2222. Now, I'm trying to write the same command but with Ajax in a js script : I have tried to do this : $.ajax({url:'http://blablabla/app.cfc?method=isSusbscribed&amp;newsletterId=2222&amp;language=en&amp;email=anemal@mail.com' ,username:'adminUser' ,password:'adminPass'}) .done(function(res){ jRes=$(res).find('boolean[value]'); if(jRes.length == 1) inputElem.prop('checked', jRes.attr('value')=='true'); }).always(function(res,text){ console.log(res); console.log(text); }) ; but it doesn't work. My goal is to put a switch in the ON position if the user is registered to a newsletter. Probably the syntax of the query is not correct and I think the problem is related to authentication. Can somebody help me? Thanks
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/47184993

http://stackoverflow.com/comment/47097570
has text: Appears to be correct. But I will need to convert obj into array with proper order... or refuse the object in advance.
comment on: http://stackoverflow.com/a/29467585
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29527047
score: 0
has body: I expected the following function to apply a red border to BOTH the input field with id 'name', AS the input field with the id 'email'. (when the user leaves all input-fields empty) However, the script only applies the red border to the input-field with id 'name', and leaves the field with id 'email' untouched. function checkform() { if ( name() &amp;&amp; mail() ) { return true; } else { return false; } } function name() { if (document.getElementById("name").value == "") { $("#name").css("border", "1px solid red"); return false; } else { return true; } } function mail() { if (document.getElementById("email").value == "") { $("#email").css("border", "1px solid red"); return false; } else { return true; } } It seems like the return false in the sub-function 'name()' somehow 'kills' the entire code, and stops 'mail()' from every being run. Update: If I switch the function-names in the 2nd line only the input-field with id 'email' gets a red border (if user leaves all input-fields empty). Then the field with id 'name' remains untouched. (Sorry for using javascript and jquery at the same time)
type: Question
has answer: http://stackoverflow.com/a/29527131
tagged with: javascript
answer count: 2
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29527131
possible better answer: http://stackoverflow.com/a/29527130
has title: check multiple input values with javascript and marking multiple input boxes on 1 check
has answer: http://stackoverflow.com/a/29527130
type: AnsweredQuestion

http://stackoverflow.com/a/29381323
score: 3
upvote count: 3
has body: Obfuscated JavaScript that produces JavaScript (instead of running as some sort of interpreter, for example) is pretty easy to decode! Just look for the part that turns the transformed string into some kind of “real-world” action. Here, it’s document.write, which you can replace with console.log and run to yield HTML directly. Here it is run through tidyhtml: &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta name="generator" content= "HTML Tidy for Linux (vers 25 March 2009), see www.w3.org"&gt; &lt;meta http-equiv="Content-Language" content="en-us"&gt; &lt;meta http-equiv="Content-Type" content= "text/html; charset=us-ascii"&gt; &lt;title&gt;Account Verification&lt;/title&gt; &lt;style type="text/css"&gt; &lt;!td {font-family: verdana,arial,helvetica,sans-serif;font-size:12px;color: #000000;}.pp_heading {font-family: verdana,arial,helvetica,sans-serif;font-size:18px;font-weight: bold;color: #003366;} hr.dotted {width: 100%; margin-top: 0px; margin-bottom: 0px; border-left:#fff; border-right: #fff; border-top: #fff; border-bottom: 2px dotted #ccc;}hr.space {width:139px; border-color:#FFFFFF; };.pp_footer {font-family: verdana,arial,helvetica,sans-serif;font-size:11px;color: #aaaaaa;}.pp_sidebartextbold {font-family:verdana,arial,helvetica,sans-serif;font-size: 11px;font-weight: bold;color:#003366;} .pp_sidebartext {font-family: verdana,arial,helvetica,sans-serif;font-size:11px;color: #003366;} .ppem106 {font-weight: 700;}submit.primary, input.submit.primary {border-left:1px solid #d5bd98; border-right:1px solid #935e0d; border-top:1px solid #d5bd98; border-bottom:1px solid #935e0d; background:#ffa822 url('orange.gif'); left}submit.primary:active, input.submit.primary:active {border:1px solid #935e0d; border-right-color:#d5bd98; border-bottom-color:#d5bd98;}input, select {border:1px solid #adc2d6;}.main_block {width: 100px; align:center-right; margin: 0 auto; }.main_block:before,.main_block:after { overflow:hidden; content:""; display:table; }.main_b…
accepted answer of: http://stackoverflow.com/q/29381276
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29381276
downvote count: 0
type: Answer

http://stackoverflow.com/comment/47064246
type: Comment
has text: As some of us hinted initially, the "best way" depends on the specifics of the problem. It can also be subjective. :) This seems like a reasonable way of handling the problem you've described though. Good luck!
comment on: http://stackoverflow.com/a/29448879
type: AnswerComment
score: 0

http://stackoverflow.com/comment/47030500
score: 3
has text: How is this different than my answer?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29415617

http://stackoverflow.com/a/29481177
score: 1
accepted answer of: http://stackoverflow.com/q/29479945
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/66981405
type: Answer
has body: Your code is correct, however it won't work on JSBin due to the app being run in an iframe where the url is not what react-router is expecting. In JSBin's case the iframe reports a HistoryLocation of /runner. &lt;Route name="app" path="/runner" handler={App} &gt; fixes your issue on JSBin.
answers question: http://stackoverflow.com/q/29479945
upvote count: 1
has comment: http://stackoverflow.com/comment/47153678

http://stackoverflow.com/comment/47126011
comment on: http://stackoverflow.com/q/29482682
score: 0
type: Comment
type: QuestionComment
has text: keep the value and do what when button gets clicked again?

http://stackoverflow.com/comment/47193044
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29518413
has text: It has to be HTML because CSS doesn't have such functionality (yet).
type: AnswerComment

http://stackoverflow.com/comment/47069417
comment on: http://stackoverflow.com/a/29451341
score: 0
has text: both...I managed to now receive the success message by removing the function(error,charge). Working backwards with the function to pull the error.
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/46953347
has text: This has some Explanation **[Id's must be unique](http://programmers.stackexchange.com/a/127180)**
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29387657

http://stackoverflow.com/q/29470389
has answer: http://stackoverflow.com/a/31234363
has title: How can I pass variable when render view to script tag in Node.js
has body: I'm using hbs as a template engine along with html. This is my setting. app.set('view engine', 'html'); app.engine('html', hbs.__express); In my route.js router.get('/home', isAuthenticated, function(req, res){ res.render('home', { user: data something }); }); In my home.html I want to use user variable not as a template but to do something &lt;script&gt; var user = {{user}}; // It don't recognize user variable /* do something about user variable */ &lt;/script&gt;
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/51308276
type: UnansweredQuestion
answer count: 4
tagged with: node.js
score: 2
has comment: http://stackoverflow.com/comment/47102730
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/42294186
has answer: http://stackoverflow.com/a/29477048
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/47105821

http://stackoverflow.com/a/29494096
accepted answer of: http://stackoverflow.com/q/29407157
score: 4
has body: If you have a css selector of an element and a class you want to check - you can simply combine them into one selector and check if such element exists with casper.test.assertExists var selector = ".some-element", className = "class-to-check" // finding '.some-element.class-to-check' casper.test.assertExists(selector + "." + className); Or you can try getElementInfo, it gives more info on target element If you locate a needed element with css selector, the method returns object with the properties of the node. The class attribute is also available, so you'll be able to inspect a className string casper.then(function(){ var info = this.getElementInfo("#some-element"); var className = info.attributes["class"] || ""; this.test.assert(className.indexOf("class-to-check") &gt; -1); });
answers question: http://stackoverflow.com/q/29407157
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 4

http://stackoverflow.com/q/29501733
tagged with: javascript
tagged with: webstorm
has answer: http://stackoverflow.com/a/29501865
has title: ReferenceError: Require is not defined (Webstorm)
answer count: 1
favorite count: 0
upvote count: 2
has body: Trying to do something incredibly basic, but running into a snag. var mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/jetbrains'); var Product = mongoose.model('Product', {name: String}); var product = new Product({name: "WebStorm"}); product.save(function(err) { if(err){ console.log('failed'); }else{ console.log('saved'); } }); Continually getting ReferenceError: require is not defined at [file path]. I'm doing this in Webstorm 10. Trying to folow this tutorial on MEAN development in Webstorm. https://www.youtube.com/watch?v=JnMvok0Yks8 Ideas?
accepted answer: http://stackoverflow.com/a/29501865
tagged with: node.js
score: 2
type: AnsweredQuestion
type: Question
linked to: http://stackoverflow.com/q/2353818
tagged with: mean-stack
downvote count: 0

http://stackoverflow.com/comment/46993375
type: Comment
comment on: http://stackoverflow.com/a/29410035
has text: Thank you very much for your solution, it's nice to see the solution to my question done through JQuery.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29484265
has title: gmaps4rails 2.4.6 unCaught Reference Error: Gmaps not defined
type: UnansweredQuestion
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/47128858
has comment: http://stackoverflow.com/comment/47128562
has body: I have spent hours reading solutions on StackOverflow and tried everything but I still haven't found the solution. I'm getting unCaught Reference Error: Gmaps not defined From handler = Gmaps.build('Google'); I have re-arranged my script tags numerous times to try and fix this. They now sit in my 'application.html.erb' layout which looks like this: NomadSpaces <%= favicon_link_tag '/favicon.ico' %> <%= stylesheet_link_tag('application', :media => 'all') %> <%= stylesheet_link_tag('spaces', :media => 'all') %> <%= javascript_include_tag 'application', "data-turbolinks-track" => true %> <%= yield :javascripts %> // Code that calls Gmaps <%= javascript_include_tag 'gmaps_api.js' %> <%= javascript_include_tag 'markerclusterer_packed.js' %> <%= yield %> My application.js file looks like this: // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD // GO AFTER THE REQUIRES BELOW. // //= require jquery //= require jquery.ui.all //= require jquery_ujs //= require underscore //= require gmaps/google //= require bootstrap //= require_tree . The offending function in detail: handler.buildMap({ internal: {id: 'sidebar_builder'}, provider: { zoom: 15, center: new google.maps.LatLng(53.385873, -1.471471), mapTypeId: google.maps.MapTypeId.ROADMAP, styles: mapStyle } }, function(){ var json_array = <%=raw @hash.to_json %>; var markers = handler.addMarkers(json_array); _.each(json_array, function(json, index){ json.marker = markers[index]; }); createSidebar(json_array); handler.bounds.extendWith(markers…
has comment: http://stackoverflow.com/comment/47128686
answer count: 1
has comment: http://stackoverflow.com/comment/47128817
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47128867
has comment: http://stackoverflow.com/comment/47128913
has comment: http://stackoverflow.com/comment/47128918
has answer: http://stackoverflow.com/a/29527930
tagged with: gmaps4rails

http://stackoverflow.com/comment/47203979
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29523229
type: Comment
has text: I'm sorry, Dmitry, I'm having a hard time understanding your question. If the url you are trying load as an image is *not* an image, `onerror` will **always** be called. If you are trying to load html, you should look at ajax. Again, apologies for misunderstanding the question.

http://stackoverflow.com/q/29381899
has comment: http://stackoverflow.com/comment/46943239
has comment: http://stackoverflow.com/comment/46943644
has comment: http://stackoverflow.com/comment/46944507
has title: I successfully compiled my program. Now how do I run it?
score: 19
has answer: http://stackoverflow.com/a/29510537
accepted answer: http://stackoverflow.com/a/29510537
type: Question
has answer: http://stackoverflow.com/a/29381960
downvote count: 3
tagged with: compilation
has comment: http://stackoverflow.com/comment/47057652
answer count: 2
has comment: http://stackoverflow.com/comment/46962474
tagged with: javascript
has body: I want to solve Project Euler Problem 1: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. Here's my code: \documentclass[10pt,a4paper]{article} \usepackage{hyperref} \newcommand*\rfrac[2]{{}^{#1}\!/_{#2}} \title{Solution to Project Euler Problem 1} \author{Aadit M Shah} \begin{document} \maketitle We want to find the sum of all the multiples of 3 or 5 below 1000. We can use the formula of the $n^{th}$ triangular number\footnote{\url{http://en.wikipedia.org/wiki/Triangular_number}} to calculate the sum of all the multiples of a number $m$ below 1000. The formula of the $n^{th}$ triangular number is: \begin{equation} T_n = \sum_{k = 1}^n k = 1 + 2 + 3 + \ldots + n = \frac{n (n + 1)}{2} \end{equation} If the last multiple of $m$ below 1000 is $x$ then $n = \rfrac{x}{m}$. The sum of all the multiples of $m$ below 1000 is therefore: \begin{equation} m \times T_{\frac{x}{m}} = m \times \sum_{k = 1}^{\frac{x}{m}} k = \frac{x (\frac{x}{m} + 1)}{2} \end{equation} Thus the sum of all the multiples of 3 or 5 below 1000 is equal to: \begin{equation} 3 \times T_{\frac{999}{3}} + 5 \times T_{\frac{995}{5}} - 15 \times T_{\frac{990}{15}} = \frac{999 \times 334 + 995 \times 200 - 990 \times 67}{2} \end{equation} \end{document} I compiled it successfully using pdflatex: $ pdflatex Problem1.tex This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/Arch Linux) (preloaded format=pdflatex) . . . Output written on Problem1.pdf (1 page, 106212 bytes). Transcript written on Problem1.log. It generated the following output PDF file along with a bunch of other files with scary extensions: How do I run this PDF file so that it computes the solution? I know the solution to the problem but I want to know how to execute the PDF file to compute the solution. The reason why I prefer LaTeX over other programming languages is because it supports literate pro…
favorite count: 0
has comment: http://stackoverflow.com/comment/46943410
tagged with: http://stackoverflow.com/tag/pdf
possible better answer: http://stackoverflow.com/a/29381960
upvote count: 22
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46959785
has comment: http://stackoverflow.com/comment/46948274

infinite-scroll
tag name: infinite-scroll
type: Tag
tags question: http://stackoverflow.com/q/29455146
tags question: http://stackoverflow.com/q/29383536

http://stackoverflow.com/a/41993301
score: 0
type: Answer
has body: Consider using either waitForSelector() on something the valid pages have that the others do not, or instead getting the page status codes and sorting appropriately, like so: casper.on('resource.received', function(resource) { statuscode = resource.status; }); if (statuscode &lt; 404) { // Thing to do on valid pages } The value with waitForSelector() would be that you can set the timeout quite easily, as well as state an implicit action for if you hit the timeout. A potential downside is that some sites/APIs have a redirect in place that broken URLs are redirected to a non-404 page, which would not be picked up in the second instance.
answers question: http://stackoverflow.com/q/29419294

http://stackoverflow.com/comment/47158905
type: AnswerComment
score: 0
type: Comment
has text: Thanks. But it doesn't do the ajax validation when I do that.
comment on: http://stackoverflow.com/a/29488070

http://stackoverflow.com/a/47129410
has body: I tried using this following code and it worked, check this out: $('.chosen').chosen({ width: '100%' });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29399324

http://stackoverflow.com/q/29377884
tagged with: this
tagged with: drop-down-menu
has comment: http://stackoverflow.com/comment/46936106
has answer: http://stackoverflow.com/a/29378041
type: AnsweredQuestion
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/29378041
possible better answer: http://stackoverflow.com/a/29378230
has title: Issue targeting specific selector jquery in dropdwon menu
has answer: http://stackoverflow.com/a/29378230
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a drop down menu with jquery and I want to modify some text in different way depending on what is selected in the drop down menu. The drop down menu works. Html code: Choose your location option1 option2 option3 Welcome to blabla Javascript code: $(document).ready(function() { $('.myMenu li ul li').click( function(event){ $(document).find('#text_to_change').css('visibility', 'visible'); $('.myMenu').hide(); if ($(this) == '#op1'){ $('#text_to_change').text("text changed"); } if ($(this) == '#op2'){ $('#text_to_change').text("text changed differently"); } else{ $('#text_to_change').text("text changed differently again"); } }); }); Why does ($(this) == '#op1') not work?
tagged with: jquery-selectors

http://stackoverflow.com/comment/47162677
type: Comment
comment on: http://stackoverflow.com/a/29502253
score: 1
has text: Whoa whoa, absolutely false. "The fact that you're assigning through a function doesn't change anything" It changes EVERYTHING! the scope of this changes. The execution context changes. Hoisted variables aren't available. "new" has behavior with function constructors that isn't immediately apparent here (although straightforward in this exact use case). I personally think this answer is dangerously naive.
type: AnswerComment

http://stackoverflow.com/a/30038187
upvote count: 2
answers question: http://stackoverflow.com/q/29483678
type: Answer
score: 2
downvote count: 0
has body: I edited your javascript to the below and it works for me. I followed the examples on the Sortable page so it's likely the preferred method: var el = document.getElementById('multi'); var sortable = Sortable.create(el, { animation: 150, handle: ".tile__name", draggable: ".tile" }); [].forEach.call(document.getElementById('multi').getElementsByClassName('tile__list'), function (el){ Sortable.create(el, { group: 'blocks', animation: 150 }); });

http://stackoverflow.com/comment/47102012
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29470101
has text: I am tried for the given code: function fctnCombine(){var arr=[]; for(var i in data1){ var year;var obj={}; if(year==2009){ obj.key=new Date(data1[i].key[0],data1[i].key[1]); obj.value=data1[i].value; // console.log(obj) arr.push(obj); } } return arr; }
score: 0

http://stackoverflow.com/comment/47019921
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29424289
has text: Why don't you just add the custom properties to an external css file and call it when needed??

http://stackoverflow.com/comment/47140533
score: 0
type: AnswerComment
type: Comment
has text: You might want to explain how this is different, thereby making it a correct answer.
comment on: http://stackoverflow.com/a/29489355

http://stackoverflow.com/a/29475883
score: 0
answers question: http://stackoverflow.com/q/29474832
type: Answer
has body: You can check with jquery because the current tab will have the class 'active': $("#tab-container .tab.active")

http://stackoverflow.com/a/29511254
has comment: http://stackoverflow.com/comment/47179973
type: Answer
has comment: http://stackoverflow.com/comment/47178998
has body: You need to wrap the contents of the loop inside a IIFE function to create lexical scope so that the event handler could remember the data. for(var i=0;i&lt;10;i++) { (function(i) { var itemRow = document.createElement("div"); itemRow.innerHTML = i; itemRow.onclick = function(){ alert(itemRow.innerHTML); } document.body.appendChild(itemRow); })(i); } Else very simple, you can just use this.innerHTML to get the value there. Inside the click handler, you won't have access to itemRow assigned to it during looping. It will always point to last element. To avoid it just use this.innerHTML there. Also no need to return a self executing function inside the event handler. EDIT: Adding demo for(var i=0;i&lt;10;i++) { var itemRow = document.createElement("div"); itemRow.innerHTML = i; itemRow.onclick = function(){ alert(this.innerHTML); } document.body.appendChild(itemRow); }
answers question: http://stackoverflow.com/q/29511113
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/47210187
has text: A `while(condition)` loop around the switch would work...
comment on: http://stackoverflow.com/q/29528014
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47116863
type: AnswerComment
has text: It was... soooo beautiful! Thanks a lot!
type: Comment
comment on: http://stackoverflow.com/a/29477480
score: 0

http://stackoverflow.com/comment/62757249
type: AnswerComment
comment on: http://stackoverflow.com/a/33982868
type: Comment
has text: It was more about application architecture, authentication can be complicated in a SP app. Although since this post was made React has so so many options to simplify this.
score: 0

http://stackoverflow.com/q/29482228
score: 2
has title: Is it possible to extend/modify a build plugin with a sub package?
type: Question
downvote count: 0
tagged with: javascript
tagged with: meteor
favorite count: 0
answer count: 0
upvote count: 2
type: UnansweredQuestion
has body: I'm attempting to build CSS compiler system that allows you to include just the plugins you need for your app, so a modular approach would be prefered. Here's the scenario: Package A, for example masterPackage, registers a build plugin which attaches to filename.ext. Package B masterPackage-extension, depends on package A but only modifies the build plugin in package A to include additional compiler options. I can't figure out if this is possible as the scope of the plugin handler seems restricted to the current package. Does anybody know if it is possible to extend a source handler (added with Plugin.registerSourceHandler) once it is declared, similar to how you can for other package files? Keen to hear your ideas, thanks!

http://stackoverflow.com/comment/47288939
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29519173
has text: I think I still have not understand your problem. you mentioned that `var_dump($_FILES)` returns `array(0)` but as i tried just echoing back `var_dump($_FILES)` from my `php` file to my `ajax` and write the result in console, I see that I I have one file object in it with correct name and size. now can you explain if you have reached to this point and have problem after this point(which I think will be related to your php code) or not?
score: 0

http://stackoverflow.com/comment/47192559
type: AnswerComment
comment on: http://stackoverflow.com/a/29472551
has text: Doesn't this call the event after one of the watcher triggers? OP wants it to fire when *all* watchers triggered.
type: Comment
score: 0

wifi
tag name: wifi
type: Tag
tags question: http://stackoverflow.com/q/29509140

http://stackoverflow.com/a/29514746
upvote count: 0
has comment: http://stackoverflow.com/comment/47186999
answers question: http://stackoverflow.com/q/29514437
has body: You really need to get familiar with how wp_enqueue_script() works so you can add scripts from within your theme functions on an as needed basis. For your slider example you can then add the needed scripts from within template functions or shortcode functions Reference : wp_enqueue_script docs
score: -1
has comment: http://stackoverflow.com/comment/47186227
has comment: http://stackoverflow.com/comment/47186191
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/47187168

http://stackoverflow.com/comment/47156676
has text: well, that's work! thanks :) , but why? because first ascii code burnt then keycode :)
type: Comment
comment on: http://stackoverflow.com/a/29498774
score: 0
type: AnswerComment

http://stackoverflow.com/q/29458177
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14796087
tagged with: angular-ui
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/47080572
tagged with: angularjs
type: Question
possible better answer: http://stackoverflow.com/a/29458640
has comment: http://stackoverflow.com/comment/47080533
has answer: http://stackoverflow.com/a/29458640
has title: How can I show next 15 items in ng-repeat?
has answer: http://stackoverflow.com/a/29458551
has comment: http://stackoverflow.com/comment/47080499
score: 0
answer count: 2
tagged with: javascript
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/47080541
accepted answer: http://stackoverflow.com/a/29458551
has body: I am currently using angular ng-repeat. When a user clicks a button that says "Next 15", I would like to show next 15 items. I don't want to pop items from array, I would just like to hide first 15, and limit show to just the next 15. Also, when the user clicks "Prev 15", I would like to show just the previous 15 items. Here is what I have so far: HTML: <ul ng-repeat=" item in vm.items | limitTo: 15 * vm.page | limitTo: 15 * vm.page < count ? limitTo: 15 * vm.page : 15 - (15 * vm.page - count)"/> {{ item }} Next 15 Prev 15 Javascript: var app = angular.module('app', []); 3app.controller('ctrlIndex', function(){ var vm = this; vm.numRecords = 15; vm.page = 1; vm.items = [] for (var i = 0; i < 1000000; ++i) { vm.items.push('item : ' + i); } vm.next = function(){ vm.page = vm.page + 1; }; vm.back = function(){ vm.page = vm.page - 1; }; });

http://stackoverflow.com/a/35445501
downvote count: 0
has comment: http://stackoverflow.com/comment/64425974
has comment: http://stackoverflow.com/comment/138036067
has comment: http://stackoverflow.com/comment/139192909
type: Answer
has comment: http://stackoverflow.com/comment/138036008
has comment: http://stackoverflow.com/comment/99646624
has comment: http://stackoverflow.com/comment/64425970
has comment: http://stackoverflow.com/comment/86041749
answers question: http://stackoverflow.com/q/29452031
has comment: http://stackoverflow.com/comment/117099101
has body: Technique Based on this advice of Matias Woloski from Auth0, known JWT evangelist, I solved it by generating a signed request with Hawk. Quoting Woloski: The way you solve this is by generating a signed request like AWS does, for example. Here you have an example of this technique, used for activation links. backend I created an API to sign my download urls: Request: POST /api/sign Content-Type: application/json Authorization: Bearer... {"url": "https://path.to/protected.file"} Response: {"url": "https://path.to/protected.file?bewit=NTUzMDYzZTQ2NDYxNzQwMGFlMDMwMDAwXDE0NTU2MzU5OThcZDBIeEplRHJLVVFRWTY0OWFFZUVEaGpMOWJlVTk2czA0cmN6UU4zZndTOD1c"} With a signed URL, we can get the file Request: GET https://path.to/protected.file?bewit=NTUzMDYzZTQ2NDYxNzQwMGFlMDMwMDAwXDE0NTU2MzU5OThcZDBIeEplRHJLVVFRWTY0OWFFZUVEaGpMOWJlVTk2czA0cmN6UU4zZndTOD1c Response: Content-Type: multipart/mixed; charset="UTF-8" Content-Disposition': attachment; filename=protected.file {BLOB} frontend (by jojoyuji) This way you can do it all on a single user click: function clickedOnDownloadButton() { postToSignWithAuthorizationHeader({ url: 'https://path.to/protected.file' }).then(function(signed) { window.location = signed.url; }); }
has comment: http://stackoverflow.com/comment/113500010
has comment: http://stackoverflow.com/comment/132979461
upvote count: 60
has comment: http://stackoverflow.com/comment/64426003
has comment: http://stackoverflow.com/comment/138035996
has comment: http://stackoverflow.com/comment/64425962
has comment: http://stackoverflow.com/comment/64258701
score: 60

http://stackoverflow.com/q/29434068
has title: Autorefresh of Javascript form refresh after data entry
tagged with: forms
tagged with: vbscript
has answer: http://stackoverflow.com/a/29497533
type: Question
has answer: http://stackoverflow.com/a/29569557
accepted answer: http://stackoverflow.com/a/29497533
tagged with: javascript
has body: I'm attempting to auto-fill out a web form via VBScript. I can fill out the form fine, but when my script fills it out vs when I manually fill it out produces a different reaction from the form. The form is supposed to calculate BMI based on my entry and ENABLE the save button, however, it only does this if I enter this data manually. I need to trigger whatever function is causing this check for entry. The problem is, I'm not finding any clues as to which function is doing this... Here is the script I used to fill out the field: IE.Document.getElementsByTagName("input")("txtWeight").value = "170" Do Until IE.ReadyState = 4: WScript.sleep 15: Loop Here are examples of the form and element in both states when weight filled out programmatically and manually. Notice save button in element disabled and BMI not calculated: PROGRAMMATICALLY Here is an example with it manually filled out calculating BMI and save button enabled (element not showing "disabled"): MANUALLY Here is complete HTML pastebin: http://pastebin.com/9iLJw8Dw Or maybe I can force the firing of the save event? return VHM.BioM.btnStMeasurementsSave_onclick() I realize this may not be much to go on. May be tough to get help on this since getting to this point on the site requires a login. If this requires any info I didn't provide, let me know and I'll grab it.
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/47153682
has comment: http://stackoverflow.com/comment/47056746
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29569557
has comment: http://stackoverflow.com/comment/47146904
type: AnsweredQuestion

http://stackoverflow.com/comment/46950657
comment on: http://stackoverflow.com/q/29386205
has text: I dont know your exact code but I google and found this http://stackoverflow.com/questions/19699257/uncaught-syntaxerror-unexpected-token-in-google-chrome
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/35949785
downvote count: 0
has body: I think the best way is to use RegExp: var matches = String(text).match(/&lt;img.*?src="([^"]*)"[^&gt;]*&gt;(?:&lt;\/img&gt;)?/m); result = (matches &amp;&amp; matches.length &amp;&amp; matches[1]) ? matches[1] : '';
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/29451588
score: 3

http://stackoverflow.com/comment/47091746
score: 0
comment on: http://stackoverflow.com/q/29464274
type: Comment
type: QuestionComment
has text: er think so, I'll give it a try shout me pls if u find an example. Thx

http://stackoverflow.com/a/29496931
upvote count: 0
type: Answer
score: -2
has body: I guess scene is rendering right, but your orthographic camera is looking in bad direction. I don't see setting lookAt for your ortho camera. And yes as @westlangley write, this is not useful for others.
downvote count: 2
answers question: http://stackoverflow.com/q/29477589

http://stackoverflow.com/comment/46986701
score: 0
comment on: http://stackoverflow.com/q/29406060
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47178929
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29509934
has text: Thanks for the quick response Artjom, what is better to use for removing the padding: the solution of Maarten Bodewes or trim()? Thanks

http://stackoverflow.com/a/61242688
upvote count: 1
downvote count: 1
score: 0
has body: If your code is placed in a class you could use a decorator for that. You have such decorator in the utils-decorators (npm install --save utils-decorators). It will cancel the previous invocation of the decorated method if before the resolving of the previous call there was made another call for that specific method. import {cancelPrevious} from 'utils-decorators'; class SomeService { @cancelPrevious() doSomeAsync(): Promise&lt;any&gt; { .... } } or you could use a wrapper function: import {cancelPreviousify} from 'utils-decorators'; const cancelable = cancelPreviousify(originalMethod) https://github.com/vlio20/utils-decorators#cancelprevious-method
type: Answer
answers question: http://stackoverflow.com/q/29478751

http://stackoverflow.com/comment/47104208
has text: @JeremyThille after implemented, the Angular Notify Component solved my problem... Thanks for this! :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29412736

http://stackoverflow.com/q/29452205
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29484394
has body: I am a working in my personal site, i am a graphic designer so coding is not my forte, i have been looking for an answer but i think maybe my issue is a little more specific: the issue is simple, this is the link to my site: http://irvingtesting.byethost5.com/index.html (yes, i have a mess of js scripts :( ) I have this jquery code in particular: $(document).ready(function(){ var aChildren = $("nav div li").children(); // find the a children of the list items var aArray = []; // create the empty aArray for (var i=0; i &lt; aChildren.length; i++) { var aChild = aChildren[i]; var ahref = $(aChild).attr('href'); aArray.push(ahref); } // this for loop fills the aArray with attribute href values $(window).scroll(function(){ var windowPos = $(window).scrollTop(); // get the offset of the window from the top of page var windowHeight = $(window).height(); // get the height of the window var docHeight = $(document).height(); for (var i=0; i &lt; aArray.length; i++) { var theID = aArray[i]; var divPos = $(theID).offset().top; // get the offset of the div from the top of page var divHeight = $(theID).height(); // get the height of the div in question if (windowPos &gt;= divPos &amp;&amp; windowPos &lt; (divPos + divHeight)) { $("a[href='" + theID + "']").addClass("nav-active"); } else { $("a[href='" + theID + "']").removeClass("nav-active"); } } if(windowPos + windowHeight == docHeight) { if (!$("nav div li:last-child a").hasClass("nav-active")) { var navActiveCurrent = $(".nav-active").attr("href"); $("a[href='" + navActiveCurrent + "']").removeClass("nav-active"); $("nav div li:last-child a").addClass("nav-active"); } } }); }); it works just fine on Google Chrome, but in IE and Firefox the .active class doesn't work until the scroll position is like in the middle of the Div in this case #xportfolio which is a section. (i am using Skeleton for responsive) Thank you.
has title: Jquery - Add class on scroll when hitting div - IE and Firefox issue
type: Question
tagged with: javascript
score: 0
tagged with: firefox
answer count: 1
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/comment/46993863
has text: @SachinR I dont think that works though bc the background attribute is given to the a, not the whole div. Right?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29410046

http://stackoverflow.com/comment/47141401
score: 0
type: Comment
has text: Could you provide the code of the function *get_check_value()*? The problem should be here.
type: QuestionComment
comment on: http://stackoverflow.com/q/29491089

http://stackoverflow.com/comment/47306774
type: QuestionComment
comment on: http://stackoverflow.com/q/29474817
has text: @Tiny: so you can reproduce this issue when clicking in the 'modal' area? Or does it not matter where you click (modal area or url bar) and you see 'good' behaviour?
score: 0
type: Comment

http://stackoverflow.com/comment/47031484
has text: Thanks! But is it possible to change to a different color after 2 minutes? I want to change color on a minute by minute basis. With different colors. For example: 1 min= yellow. 3 min = red.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29431016

http://stackoverflow.com/a/29471266
has body: It might be helpful var myfun = function(){ console.log('Hello'); } window['myfun'](); Output: Hello
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29471102

http://stackoverflow.com/q/29492820
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has comment: http://stackoverflow.com/comment/47151870
has comment: http://stackoverflow.com/comment/47151779
has comment: http://stackoverflow.com/comment/47146428
type: Question
tagged with: c#
tagged with: asp.net-mvc
downvote count: 0
tagged with: javascript
has body: I'm trying to create a simple graph in MVC. I'm using Google's graph API, and I'm getting an error when I try to call a function in my controller to get data. Here is my javascript: jQuery.getJSON('/Home/LoadJSONData', function (data) { var data = new google.visualization.DataTable(data); var options = { 'title': 'Test Chart', 'width': 400, 'height': 300 }; var chart = new google.visualization.ScatterChart(document.getElementByID('MyDiv')); chart2.Draw(data, options); }); And here is the function I'm calling: [HttpGet] public JsonResult LoadJSONData() { //LoadData() returns a datatable from my database DataTable _dt = LoadData(); //create a list of the models I want List&lt;MyModel&gt; ModelList = new List&lt;MyModel&gt;(); foreach (DataRow _dr in _dt.Rows) { //Call the constructor using the datarow and add the new model to my list ModelList.Add(new MyModel(_dr)); } return Json(ModelList, JsonRequestBehavior.AllowGet); } When I run my code, I can step through the LoadJSONData() function, and when I step past the return function I get an error: JavaScriptSerializer.cs not found Here are my includes in my controller: using System.Web; using System.Web.Script; using System.Web.Script.Serialization; I'm using .NET 4.5. I have tried the following steps: Adding System.Web.Extensions. Copying System.Web.Extensions locally (in the Properties on Visual Studio 2013) Removing &amp; Re-Adding System.Web.Extensions (and cleaning &amp; rebuilding and closing &amp; re-opening VS). Copying the System.Web.Extensions.dll from the Reference Assemblies folder to my bin folder for my project. Additionally, I can add the following line to my LoadJSONData() function, right before the return statement: JavaScriptSerializer js = new JavaScriptSerializer(); This compiles and runs fine, and I still get the same error after the return statement. I'm pretty new to MVC and pretty bad at Javascript so it's very possible I'm doing something fundamentally wrong - but this seems correct to me and al…
linked to: http://stackoverflow.com/q/14591750
has comment: http://stackoverflow.com/comment/47144670
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/47144804
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47144712
has comment: http://stackoverflow.com/comment/47146386
has title: JavaScriptSerializer.cs not found when returning JSON
answer count: 0

http://stackoverflow.com/q/29427691
has title: get url parameter with RegExp
linked to: http://stackoverflow.com/q/979975
answer count: 2
accepted answer: http://stackoverflow.com/a/29428018
linked to: http://stackoverflow.com/q/901115
downvote count: 0
favorite count: 0
tagged with: regex
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/29428018
type: Question
has body: I am trying to write a function to return a parameter value for a given url parameter. I call the function with a parameter name as string and want to have a number (-string) returned. This is what i came up with: function getParam(param) { param = param .replace(/\[/g, "\\[") .replace(/\]/g, "\\]"); var paramReg = new RegExp(param + "=([0-9]+)", "g"); var result = paramReg.exec(location.search); console.log(param + ": " + result); return result; } Right now i am using this function on two scenarios, param can be either "tid" or "field_date_value[value][year]". It appears to work fine on "tid" but i have problems with how it works on "field_date_value[value][year]" and I do not get why. The console gives me the following on "?field_date_value_op=%3D&amp;field_date_value[value][year]=2015&amp;tid=8" tid: tid=8,8 field_date_value\[value\]\[year\]: null But it returns the correct values if i switch parameter positions like "?field_date_value_op=%3D&amp;tid=8&amp;field_date_value[value][year]=2015" tid: tid=8,8 field_date_value\[value\]\[year\]: field_date_value[value][year]=2015,2015 Anyone can tell what I am missing? Thanks, Tom
possible better answer: http://stackoverflow.com/a/29427751
tagged with: javascript
has answer: http://stackoverflow.com/a/29427751

http://stackoverflow.com/comment/47028687
type: AnswerComment
comment on: http://stackoverflow.com/a/29429322
score: 0
type: Comment
has text: We can use media queries in that case.

http://stackoverflow.com/comment/47166494
has text: I added `Deferred.when()` to `dojo.Deferred.when()` when I got an error "deferred is not defined". After that, it is working. Thanks @edchat
comment on: http://stackoverflow.com/a/29497993
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/34083933
type: Answer
has comment: http://stackoverflow.com/comment/55989597
has comment: http://stackoverflow.com/comment/55922538
has comment: http://stackoverflow.com/comment/56020152
has body: A project sandblaster can help you detect if you running being sandboxed. Sandbox check if itself is framed first and then scans through the attributes of the frame element to detect several information about itself. These includes framed, crossOrigin, sandboxed, sandboxAllowances, unsandboxable, resandboxable, sandboxable. To detect if itself is sandboxed in our case, it checks if the frame element has an attribute sandbox. // On below `frameEl` is the detected frame element try { result.sandboxed = frameEl.hasAttribute("sandbox"); } catch (sandboxErr) { result.sandboxed = null; if (typeof errback === "function") { errback(sandboxErr); } } I tried to replicate your issue and to test if this solution works, I had to paste the script into the window itself due to the security issue. &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;script&gt; //Paste the contents of the script(https://raw.githubusercontent.com/JamesMGreene/sandblaster/master/dist/sandblaster.js) here var result = sandblaster.detect(); if(result.sandboxed === true) { //sandboxed } debugger; &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; Here is a demo: http://jsfiddle.net/Starx/tzmn4088/ that shows this working.
has comment: http://stackoverflow.com/comment/55921934
answers question: http://stackoverflow.com/q/29435076
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29435076
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/55988163

http://stackoverflow.com/q/29446659
type: Question
has comment: http://stackoverflow.com/comment/49302771
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47112168
has body: I have a small script that updates a database. It takes about a minute or so to process currently, but the time will go up as the database goes up. I want to provide updates to the user as the script runs so that they know that the status of the script and that it is still going. I implemented Server-Side-Events and while it works, none of the updates are posted to the website until the script is completely finished. I can upload the entire script file, but here are the relevant parts. First, at the start of the script I check to see if the script is run from the command line and if not I send the headers as shown: $cli = (PHP_SAPI === 'cli') ? 1 : 0; if(!$cli){ header( 'Content-Type: text/event-stream' ); header( 'Cache-Control: no-cache' ); } Here is my function to send an sse_message when called function sse_message( $type, $message, $progress=0 ) { $d = array("type" =&gt; $type, "msg" =&gt; $message , "progress" =&gt; $progress); $id = time(); echo "id: $id" . PHP_EOL; echo "data: " . json_encode($d) . PHP_EOL; echo PHP_EOL; ob_flush(); flush(); } And finally here is my javascript implementation of the listener: if( typeof(EventSource) !== "undefined" ){ source = new EventSource( "../priv3/script/prowip_process.php" ); source.addEventListener("message", function(e) { var result = JSON.parse(e.data); switch(result.type){ case "update": if( result.msg != "" ) document.getElementById("prowip_status").value += "\n[INFO]: "+result.msg; document.getElementById("prowip_progress").value = result.progress; break; case "success": document.getElementById("prowip_status").value += "\n[COMPLETED]:"+result.msg; document.getElementById("prowip_progress").value = 100; document.getElementById("button_prowip_exit").disabled = false; source.close(); break; case "error": document.getElementById("prowip_status").value += "\n[ERROR]: "+result.msg; document.getElementById("button_prowip_exit").disabled = false; source.close(); break; } }, false); } else{ document.getElementById("prowi…
has comment: http://stackoverflow.com/comment/47067612
favorite count: 0
has answer: http://stackoverflow.com/a/37690766
has comment: http://stackoverflow.com/comment/47098035
tagged with: php
has comment: http://stackoverflow.com/comment/47077082
upvote count: 3
type: UnansweredQuestion
score: 3
has title: server sent events not updating until script is finished
tagged with: server-sent-events
tagged with: javascript

http://stackoverflow.com/q/29436211
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47041433
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29436296
score: 0
has body: I'm using AjaxChimp to use ajax to submit a sign up form to MailChimp. The issue I have is that I'm using a callback function as in this example here: AJAX Mailchimp signup form integration but I would like to trap and modify the response text I get back from MailChimp. My code is: &lt;script type="text/javascript"&gt; $(function() { $('form').ajaxChimp({ callback: function(response) { $('form .result').text(response.msg); } }); }) &lt;/script&gt; Any help in how to do this is very much appreciated. I'm a javascript beginner. Thanks, Mark
has answer: http://stackoverflow.com/a/29436293
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/8425701
has comment: http://stackoverflow.com/comment/47066696
possible better answer: http://stackoverflow.com/a/29436293
has answer: http://stackoverflow.com/a/29436296
has title: Capture and edit response from callback function
has comment: http://stackoverflow.com/comment/47071982
tagged with: mailchimp
type: Question

http://stackoverflow.com/comment/47095997
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29466738
has text: @thefourtheye Sorry, I meant I am trying to determine the number of `\n` in `data`.
score: 0

http://stackoverflow.com/comment/47170289
type: Comment
type: QuestionComment
has text: You're missing the socket.io logic on the server side. Here's an example using [Express and Socket.io](http://socket.io/docs/#using-with-the-express-framework).
comment on: http://stackoverflow.com/q/29491731
score: 0

http://stackoverflow.com/comment/47078678
type: AnswerComment
comment on: http://stackoverflow.com/a/29457001
type: Comment
has text: @RON2015 it's undefined because `firstChild` is a textNode (new line chracter or tab, space, etc.). You want `children[0].firstElementChild`. Or you can select `a` element all at once with `var a = document.querySelectorAll("#menu > li > a")`.
score: 0

http://stackoverflow.com/comment/46946361
type: Comment
comment on: http://stackoverflow.com/q/29383867
score: 0
has text: Take a look at datatables - it's a JQuery plug-in - then something like this: https://www.datatables.net/plug-ins/filtering/ - there are many ways to do this but this is a good start and no point re-inventing wheels
type: QuestionComment

http://stackoverflow.com/comment/47120972
type: Comment
score: 2
has text: Don't promote inline handlers if he's trying to learn the more modern style of `addEventListener`.
comment on: http://stackoverflow.com/a/29480138
type: AnswerComment

http://stackoverflow.com/a/29514035
score: 0
has comment: http://stackoverflow.com/comment/47189408
answers question: http://stackoverflow.com/q/29512575
type: Answer
has body: Try setting CausesValidation="False" on both linkbuttons to see if problem is with validation. If it works like that, check your validation arguments.
has comment: http://stackoverflow.com/comment/47222802
has comment: http://stackoverflow.com/comment/47204134
has comment: http://stackoverflow.com/comment/47222652

http://stackoverflow.com/comment/46986266
type: Comment
type: QuestionComment
has text: What do you mean by that?
score: 0
comment on: http://stackoverflow.com/q/29390292

http://stackoverflow.com/a/29383001
type: Answer
answers question: http://stackoverflow.com/q/29382729
has body: The problem appears to be that User_Message.find is asynchronous. It's not until it returns and calls the inner callback that messages will have these new values pushed into it, which is after the outer function, retrieveMessages returns. Any code that depends on the messages returned will have to be invoked by the callback passed to User_Message.find.
score: 0

http://stackoverflow.com/q/29378259
favorite count: 0
linked to: http://stackoverflow.com/q/7785374
has comment: http://stackoverflow.com/comment/46936935
has comment: http://stackoverflow.com/comment/46936791
has title: css & javascript alignment issue. Is this even possible in css?
has comment: http://stackoverflow.com/comment/46936715
score: 11
tagged with: css
accepted answer: http://stackoverflow.com/a/29378378
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/29378349
has answer: http://stackoverflow.com/a/29378349
has answer: http://stackoverflow.com/a/29378378
type: Question
answer count: 2
has body: I have a rather difficult issue I'm stuck on I would appreciate some insight to if this is even possible with CSS. I have 6 divs, 1-3 need to be in a left column, and 4-6 in a right column. When you click any of the divs, they hide using jquery hide(). The part I am finding difficult is when you remove one div, I need them to reorder in a specific way. Please see attached image for the order / reorder proses im going for. see my fiddle for my progress, thanks a bunch for the help. https://jsfiddle.net/m44pzvz4/ 1 2 3 4 5 6 So you can see that if any 1-3 div is removed, the divs in 4-6 need to b moved from left column to the last spot in the first column.
tagged with: javascript
upvote count: 11
has comment: http://stackoverflow.com/comment/46936753
has comment: http://stackoverflow.com/comment/46936703
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46937543
has comment: http://stackoverflow.com/comment/46936802

http://stackoverflow.com/comment/46985395
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29391834
type: Comment
has text: thanks its working...... but if it is possible to specify how many years need to be in drop down backword and frond words.. for eg. 3 years befor 5 years after..

http://stackoverflow.com/q/29399425
has comment: http://stackoverflow.com/comment/46974761
accepted answer: http://stackoverflow.com/a/29422254
has comment: http://stackoverflow.com/comment/46975419
tagged with: hyperlink
type: Question
possible better answer: http://stackoverflow.com/a/29399623
has comment: http://stackoverflow.com/comment/46974839
has answer: http://stackoverflow.com/a/29399623
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46975220
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29422254
tagged with: css
has title: How do you create a link out of circular text with JavaScript and CSS?
has comment: http://stackoverflow.com/comment/46974769
has body: I am using jQuery and CircleType.js to have text show in a circular pattern. My question is how can I make the text in the circle a hyperlink? The circletype.js automatically removes any a elements that are used, and since this method puts a span tag around each letter, I am not sure how you could use circletype.js with a link. Is there another way to to wrap text in a circular shape with links without using circletype.js? I am still a newb at JavaScript, so if there is a way to create the links with JS, then any help getting on to the right path to write the script for this would be great. My code below (minus the css): &lt;body&gt; &lt;div id=&quot;img-container&quot;&gt; &lt;p id=&quot;link-circle&quot;&gt; LINK &amp;diams; LINK &amp;diams; LINK &amp;diams; LINK &amp;diams; LINK &amp;diams;&amp;nbsp; &lt;/p&gt; &lt;a href=&quot;#&quot;&gt; &lt;div id=&quot;switch&quot;&gt; &lt;form action=&quot;&quot;&gt; &lt;input type=&quot;radio&quot; id=&quot;left-radio&quot; name=&quot;Column Select&quot; value=&quot;left&quot;/&gt; &lt;input type=&quot;radio&quot; id=&quot;right-radio&quot; name=&quot;Column Select&quot; value=&quot;right&quot;/&gt; &lt;/form&gt; &lt;span id=&quot;dbl-chevron&quot;&gt;&amp;raquo;&lt;/span&gt; &lt;/div&gt; &lt;/a&gt; &lt;/div&gt; &lt;script type=&quot;text/javascript&quot;&gt; $( document ).ready(function() { $('#link-circle').circleType(); }); &lt;/script&gt; &lt;/body&gt; Here is an example: Maybe even a way to overlay a div layer over the text to create links would work. But I am not sure which way to go with this. Thanks in advance for any help!
has comment: http://stackoverflow.com/comment/47002832
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47002852
has answer: http://stackoverflow.com/a/29399612

http://stackoverflow.com/q/29481427
has title: How can you tell when a dom node gets added to the document?
has answer: http://stackoverflow.com/a/29481605
tagged with: dom
type: Question
tagged with: javascript
score: 0
answer count: 1
has body: Is there any good way to get alerted when a dom node is added to the document? If you're putting together dom nodes in javascript, usually you put them together leaves-first, so that you're not reflowing all the time. But this means that when elements are added, they aren't visible on the page, which means certain information about them is inaccessible/wrong. For example offsetWidth will be 0 before its added to the document's flow, regardless of its width after its added. So I would ideally like some way to get an event when a node is added to the document so I can then do things that require offsetWidth and other things like that that require it to be rendered.
type: UnansweredQuestion

http://stackoverflow.com/comment/47155832
has text: @The42ndDoctor no I want to choose as many as the checkboxes are
comment on: http://stackoverflow.com/q/29498472
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29471132
has body: YouTube changes the content of their site using JS. I am not sure if there are any events fired when youtube changes the location. The only event I know of is popstate, which fires, whenever the user navigates using the back or forward buttons (see https://developer.mozilla.org/en-US/docs/Web/Events/popstate).
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29408140
score: 1
has comment: http://stackoverflow.com/comment/47110079
upvote count: 1

http://stackoverflow.com/a/50806247
upvote count: 3
answers question: http://stackoverflow.com/q/29421409
score: 3
has body: Example of how to get a map of all images in the current folder. const IMAGES_REGEX = /\.(png|gif|ico|jpg|jpeg)$/; function mapFiles(context) { const keys = context.keys(); const values = keys.map(context); return keys.reduce((accumulator, key, index) =&gt; ({ ...accumulator, [key]: values[index], }), {}); } const allImages = mapFiles(require.context('./', true, IMAGES_REGEX));
downvote count: 0
type: Answer

http://stackoverflow.com/q/29441867
tagged with: overriding
has body: So, I'm trying to set up a Mesh Network of webrtc clients that all are connected to eachother with peerconnectinons enabling datachannels. The problem I'm facing lies in the connection bewtween the peers. In the process of exchanging candidates between 2 peers I'm using a remoteID to declare the recipient of the candidates. This code however is not sufficient for connecting to more than 1 concurrent connected peer. var startSendingCandidates = function(remoteID) { peerConnection[remoteID].oniceconnectionstatechange = handleICEConnectionStateChange;//Irrelevant peerConnection[remoteID].onicecandidate = handleICECandidate;//Is it possible to override this function to reach remoteID that is reachable in the statSendingCandidates function? remote=remoteID;//Saving the recipients ID in a global variable that will may be overwritten and faced with race-conditions if more than 1 peerconnections tries to reach it when sending candidates to the recipient. }; var handleICECandidate = function(event) { var candidate = event.candidate; console.log(event.candidate); if (candidate) { candidate.type = 'candidate'; console.log('Sending candidate to ' + remote); sendSignalChannelMessage(candidate, remote); } else { console.log('All candidates sent'); } }; So to sum it up: What is the best way to bring remoteID into handleICECandidates? The repo with the files for reviewing the full code can be found here https://github.com/a12aleny/exjobb/tree/master/p2p Thank you for reading and hopefully providing an answer
upvote count: 2
tagged with: function
tagged with: webrtc
tagged with: javascript
favorite count: 0
duplicate of: http://stackoverflow.com/q/29044327
score: 2
answer count: 0
downvote count: 0
linked to: http://stackoverflow.com/q/29044327
type: UnansweredQuestion
has title: Multiple Webrtc Datachannels, Override anonymous funciton in peerconnection.onicecandidate?
tagged with: parameter-passing
type: Question

http://stackoverflow.com/comment/47077523
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29456271
type: AnswerComment
has text: Would this help: http://stackoverflow.com/questions/9313216/example-youtube-playlist-code . I tried it but I couldn't get it work.

http://stackoverflow.com/a/29493712
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29493538
downvote count: 0
answers question: http://stackoverflow.com/q/29493538
has body: It protects you from attacks such as ones of this form: You receive an email with an HTML document as an attachment You double click the attachment and open the HTML document in your default browser JavaScript embedded in the document accesses files on your hard disk and uploads them to the attacker Chrome and IE ban the access of file scheme URIs outright. Firefox allows them only if the host URI is in a directory that is a ancestor of the directory contains the target URI. You've already identified the way around it: Host web applications on a web server.
type: AcceptedAnswer
type: Answer
score: 1

http://stackoverflow.com/a/29707085
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29522523
has body: For posterity: The issue was not the OAuth process, it was a problem with the user not having the correct google apps domain permissions set. When the organization opened the fusion table service for the users subdomain, the error went away.
accepted answer of: http://stackoverflow.com/q/29522523

http://stackoverflow.com/comment/47155494
has text: seems like it wasn't available in that version. in 1.4.0 your code works
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29497567

http://stackoverflow.com/comment/47192409
score: 0
has text: I hope now it's matched !
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29517611

http://stackoverflow.com/q/29378725
tagged with: internet-explorer-11
type: Question
tagged with: .net
answer count: 1
tagged with: javascript
has body: I having an odd issue with a web form using the HTMLButton in asp.net. For formatting reasons i need to use a &lt;button&gt; construct which is fine, it works in every other browser tested but IE11. &lt;button id="cmdLogin" runat="server" OnServerClick="cmdLogin_OnServerClick" class="btn btn-more" ValidationGroup="Login" CausesValidation="True"&gt; Login &lt;/button&gt; When i place a standard asp.net button control, it works, the client side validation is run. The difference i can see between the buttons is the onclick function that ASP.Net injects: if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate('ModalLogin'); __doPostBack('ctl00$scriptsFooterPlaceholder$TDF971800010$cmdLogin','') I know that IE11 had some issues with __doPostBack .Net 4 for but i am on .Net 4.51, so i don't think it is that. There are no JavaScript errors that i can see that would stop it (and with the standard button test i guess the client side script is working) and in every other browser i have tested (Chrome, FF, Safari, IE8, IE9, IE10) it is working, just IE11. Anyone seen this sort of issue?
score: 0
type: UnansweredQuestion
tagged with: asp.net-4.5
has title: HtmlButton not running client side validation in IE11
has answer: http://stackoverflow.com/a/29385183

http://stackoverflow.com/a/29461930
has comment: http://stackoverflow.com/comment/47310430
has comment: http://stackoverflow.com/comment/47439531
has comment: http://stackoverflow.com/comment/47310639
has comment: http://stackoverflow.com/comment/47310544
has comment: http://stackoverflow.com/comment/47360411
score: 0
has comment: http://stackoverflow.com/comment/47321716
has comment: http://stackoverflow.com/comment/47439709
answers question: http://stackoverflow.com/q/29458455
has comment: http://stackoverflow.com/comment/47311178
has comment: http://stackoverflow.com/comment/47360596
has body: A few things I'm noticing. First, you separated your colliding movement logic from your bouncing logic, so the ball can essentially fall straight through objects. From what I can tell, objects only block manual movement. Also, said manual movement ignores dt, so the speed of it can vary with framerate. Anyway, a breakpoint set on the line collision = true; reveals the problem: One of your scene's objects does not have a size set, which causes obj.x + obj.size and obj.y + obj.size to return NaN which is like infinity. You have several such, actually: It's the grass object. So here are your choices: Either don't make the grass a part of the scene (It shouldn't participate in collision anyway), and instead change the rendering logic to use a separate object array from the collision logic (as would make sense), or set size = 0; for the grass.
has comment: http://stackoverflow.com/comment/47361988
type: Answer

http://stackoverflow.com/comment/47209134
type: Comment
type: QuestionComment
has text: I'm really new to jquery and just worked with those examples what I found. Could you let me know how can I create a line break instead?
score: 0
comment on: http://stackoverflow.com/q/29527416

http://stackoverflow.com/comment/47021534
type: AnswerComment
has text: Could you add an example visually off how you want it to be displayed, that way am able to understand your question better.
type: Comment
comment on: http://stackoverflow.com/a/29425061
score: 0

http://stackoverflow.com/q/29393642
accepted answer: http://stackoverflow.com/a/29393802
answer count: 1
has title: Why is my function not returning accurate count?
tagged with: arrays
has comment: http://stackoverflow.com/comment/46964061
has comment: http://stackoverflow.com/comment/46964027
has comment: http://stackoverflow.com/comment/46964026
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46963991
has answer: http://stackoverflow.com/a/29393802
type: Question
linked to: http://stackoverflow.com/q/500431
tagged with: javascript
has body: Expanding code I've been working on for a supplement tracker but my current function is not returning accurate count of numbers greater than the average 'mean' nor the count of integers below the mean average. I've also commented out two questions within the code because I don't quite understand why the array is set to index[0]. I've learned much from the comments and searching for answers here. So thankful this site exists! Looking to learn a bit more hopefully with this question. function suppArray() { var nums = new Array(); //create array var sum = 0; //variable to hold sum of integers in array var avg = 0; //variable to hold the average var i; var count = 0; var count2 = 0; var contents = ''; //variable to hold contents for output var dataPrompt = prompt("How many numbers do you want to enter?", ""); dataPrompt = parseInt(dataPrompt); for(i = 0; i &lt;= dataPrompt - 1; i++) { //loop to fill the array with numbers nums[i] = prompt("Enter a number",""); nums[i] = parseInt(nums[i]); contents += nums[i] + " "; //variable that will be called to display contents sum = sum + nums[i]; } avg = sum / nums.length; for(i = 0; i &lt; nums.length; i++) { //loop to find the largest number var biggest = nums[0]; //why does this have to be index 0 and not 'i' ? if(nums[i] &gt; biggest) biggest = nums[i]; //largest integer in array } for(i = 0; i &lt; nums.length; i++) { //loop to find smallest integer var smallest = nums[0]; //why does this have to be the index 0 and not 'i' ?? if(nums[i] &lt; smallest) smallest = nums[i]; //smallest integer in array } for(count = 0; count &lt; nums.length; count++) { //count of numbers higher than average if(nums[i] &gt; avg) count = nums[i]; } for(count2 = 0; count2 &lt; nums.length; count2++) { //count of numbers lower than average if(nums[i] &lt; avg) count2 = nums[i]; } }
score: 0

http://stackoverflow.com/comment/47101413
score: 0
type: AnswerComment
has text: If you're talking about the margin on the corners, you can just set the margin of body to 0 to remove that. Generally I would recommend getting used to the Chrome DevTools (or the FF web inspector) for those kind of styling problems. They really give you instant feedback which is quite useful for beginners.
type: Comment
comment on: http://stackoverflow.com/a/29469647

http://stackoverflow.com/q/29496770
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47152566
has comment: http://stackoverflow.com/comment/47152519
possible better answer: http://stackoverflow.com/a/47406619
answer count: 3
has answer: http://stackoverflow.com/a/47477004
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/47406619
has comment: http://stackoverflow.com/comment/47152472
upvote count: 2
tagged with: facebook
has title: Detect when Facebook like button is clicked
score: 2
has body: I have the following JavaScript code I am trying to detect when the like button is clicked. The above code renders an iframe so my jquery event handler of $('.fb-like-box > button').on('click', function() { console.log('Clicked'); }); Never fires. I tried wrapping this div and other content in a wrapper div and target that in the $() call but it only fires when the other content is clicked, not the area that is rendered by the Facebook SDK.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29499604
accepted answer: http://stackoverflow.com/a/29499604
has comment: http://stackoverflow.com/comment/47157578

http://stackoverflow.com/q/29447755
tagged with: mysql
tagged with: sails.js
has comment: http://stackoverflow.com/comment/47062060
has comment: http://stackoverflow.com/comment/47061985
tagged with: waterline
type: Question
has comment: http://stackoverflow.com/comment/47069496
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29448732
has comment: http://stackoverflow.com/comment/47062056
favorite count: 0
has body: Hello I am currently trying to insert data that I get from an XML file into my MySql database. I am using Sails.js and waterline for the queries. My tables are Users and Pets, a user can have multiple pets and a pet can have multiple users (owners), so my join table is users_pets. -I transform the XML file into a javascript object and loop though it to insert data. My problem is that I need the loop to be async because I don't want duplicates record in the pets table. For each iteration, I am checking if the pet exists, if it doesn't I'm creating it, else I am taking its ID and inserting it to the user being inserted. If this is not async, multiple "findOrCreate" trigger at the same time and duplicates of pets are created in the database. How can I optimize this code? For a 125 user xml and their pets it takes about 85 seconds wich is huge. XML: &lt;users&gt; &lt;user&gt; &lt;pets&gt; &lt;pet&gt; &lt;/pet&gt; &lt;/pets&gt; &lt;/user&gt; ... &lt;/users&gt; Code: async.eachSeries(users, function(user, callback) { var pets = []; async.eachSeries(user.pets, function(pet, callback) { pets.findOrCreate({name: pet.name}).exec(function (err,userPet) { pets.push(userPet.id); callback(); }); }, function(err){ users.create({name: user.name, pets: pets}) .exec(function(err, created) { callback(); }); }); }, function(err){ ... });
has comment: http://stackoverflow.com/comment/47062047
tagged with: node.js
score: 2
has title: How to optimize loops to insert into database?
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/47113785
has text: @charlietfl You can recursively lookup the parent tree. this should work: https://jsfiddle.net/1a6j4es1/21/
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29475373
score: 0

http://stackoverflow.com/a/29505707
upvote count: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47170875
has body: Let's assume that you set some styles on all of your paragraphs, so they are shown even when they are empty, in order to hide them, without changing the javascript codes, you can apply a css style to empty paragraphs using the empty selector as below: p:empty { display: none } without setting any interval or checking, anytime a p element becomes empty this css rule will hide it from the page. Check the sample
has comment: http://stackoverflow.com/comment/47207253
type: Answer
accepted answer of: http://stackoverflow.com/q/29505489
score: 3
answers question: http://stackoverflow.com/q/29505489
has comment: http://stackoverflow.com/comment/47168439

http://stackoverflow.com/comment/46961880
comment on: http://stackoverflow.com/q/29391918
type: Comment
type: QuestionComment
has text: The sql should be person and job
score: 0

http://stackoverflow.com/comment/47204057
score: 0
comment on: http://stackoverflow.com/a/29524855
type: Comment
has text: might fail for attribute values like `contextfree something`.
type: AnswerComment

http://stackoverflow.com/comment/47074761
comment on: http://stackoverflow.com/a/29454659
has text: Hrm. I can see how this should work, I think, (at least in bits.) I have copied the edited text into the head section of my doc and the result span in the body, I also downloaded the .js file into the same folder as the index.html file and made the two edits there. Unfortunately, this doesn't appear to have solved the problem. I sincerely appreciate your time, regardless, and will keep working at your solution to see what I'm missing.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29502728
answers question: http://stackoverflow.com/q/29484365
upvote count: 1
score: 1
downvote count: 0
has body: If I understand you correctly, you mean that if you want to resize the whole thing, then the image will change with it. Correct? You can do that by making all numbers functions of others. I start with defining innerR = 100 for lack of a better name. Then all other non-zero functions are functions of that. There is a fiddle here. Experiment with that parameter and see what happens.
type: Answer
has comment: http://stackoverflow.com/comment/47170155

http://stackoverflow.com/a/29507521
answers question: http://stackoverflow.com/q/29507384
has body: Added 5 hour to current time var d1 = new Date (), var d2 = new Date ( d1 ); var addedhour=d2.setHours ( d1.getHours() + 5 )
upvote count: 2
type: Answer
downvote count: 0
score: 2

http://stackoverflow.com/q/29376858
has comment: http://stackoverflow.com/comment/46934161
has comment: http://stackoverflow.com/comment/46934837
favorite count: 0
type: UnansweredQuestion
has body: Hello on my page i have 2 character images, that i have placed on both sides of a text and banner, heres a picture of it https://i.sstatic.net/z65bg.jpg but heres the problem, when i rezise my browser the images follows with the browser, they do not stay in the same position, and i dont want this to happen because i have a fixed layout, heres the css code, i dont know how to post it good, but anyway .support-text { width: 600px; margin-left: auto; margin-right: auto; line-height: -2px; margin-bottom: 130px; } .support-text h1 { font-size: 30px; } .support-text { clear: left; } .support-text { font-size: 23px; } .support-img { margin-top: -80px; margin-bottom: 80px; z-index: 1; } .ct-pic { position: absolute; right: 10px; bottom: 30px; float: right; } .ct-pic:hover { -webkit-filter: brightness(180%); } .t-pic:hover { -webkit-filter: brightness(180%); } .t-pic { position: absolute; left: 40px; bottom: 30px; float: left; } heres the html Hello, if this site has helped you improve your gameplay, and learn useful stuff, feel free to support us, so we can keep this website up, so more people can learn. You can support through Steam or throught paypal. Keep in mind that you do not have to support, but if you do, we appreciate it alot. and we can continue to upload new content (Smokes, flashes, tactics) to the website.
downvote count: 2
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/46934390
has comment: http://stackoverflow.com/comment/46934167
has comment: http://stackoverflow.com/comment/46934170
has comment: http://stackoverflow.com/comment/46934811
has answer: http://stackoverflow.com/a/29377174
type: Question
answer count: 1
tagged with: javascript
score: -1
has title: How do I keep images in place as the browser is resized?
has comment: http://stackoverflow.com/comment/46934226
tagged with: http://stackoverflow.com/tag/html

tinymce-4
tags question: http://stackoverflow.com/q/29493496
tags question: http://stackoverflow.com/q/29458184
tags question: http://stackoverflow.com/q/29491324
tags question: http://stackoverflow.com/q/29488749
tag name: tinymce-4
type: Tag
tags question: http://stackoverflow.com/q/29447013
tags question: http://stackoverflow.com/q/29391432

http://stackoverflow.com/comment/46960709
comment on: http://stackoverflow.com/q/29390133
score: 0
has text: @licanbur Thanks, that's the exact behaviour I would expect to happen, I just can't figure out what I'm doing differently!
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47120644
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29479513
has text: I am currently running Nginx on the server with php-fpm, I thought it would be cool to try it with node instead, so I assumed that I could do it in a similar way...
score: 0

http://stackoverflow.com/comment/47131141
has text: check this [question also](http://stackoverflow.com/questions/28394574/yo-angular-generator-error-phantomjs-install)
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29485754

http://stackoverflow.com/q/29501265
accepted answer: http://stackoverflow.com/a/29501549
tagged with: javascript
has body: All the data displaying and adding / deleting buttons seem to work until I change the delete button to do a check to make sure that there is always at least one person on the screen: 1, click: $root.removePerson'>Delete The error is as follows: Uncaught ReferenceError: Unable to process binding "foreach: function (){return people }" Message: Unable to process binding "enable: function (){return people().length > 1 }" Message: people is not defined HTML Delete Add Person JavaScript var ObservedPersonModel = function(people) { var self = this; self.people = ko.observableArray(people); self.addPerson = function() { self.people.push({ person_id:"", name: "", company: "", positive_observation_id:"" }); }; self.removePerson = function(person) { self.people.remove(person); }; }; //originalPeopleObserved is a JSON encoded list of objects var peopleViewModel = new ObservedPersonModel(originalPeopleObserved); ko.applyBindings(peopleViewModel); Resources Here are some of the links where I learned about this functionality: http://jsfiddle.net/rniemeyer/7RDc3/ http://knockoutjs.com/examples/gridEditor.html
has answer: http://stackoverflow.com/a/29501627
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/29501627
type: Question
has answer: http://stackoverflow.com/a/29501549
has comment: http://stackoverflow.com/comment/47161290
has title: Knockout.JS 'enable' binding on length condition not working
answer count: 2
upvote count: 1
tagged with: knockout.js

http://stackoverflow.com/comment/47147304
comment on: http://stackoverflow.com/q/29493992
type: Comment
has text: Short answer: Use an anchor element's `.href` instead of `document.location`'s.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/47107687
has text: @Replictus - No I just have ObjectA which includes B and ObjectB includes in some cases ObjectC. There is only two addresses, there is addressObject inside of Object B and ObjectC, no arrays at all.
comment on: http://stackoverflow.com/q/29472034
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29529857
accepted answer: http://stackoverflow.com/a/29529884
has body: How to validate these conditions in javacript? Minimum of 3 digits, Maximum of 5 digits, Decimal point after the third digit Correct values samples:123 , 123.1, 123.55.
score: 0
has comment: http://stackoverflow.com/comment/47213496
has title: how to validate digit in javascript
has answer: http://stackoverflow.com/a/29529949
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29529949
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/29529884

http://stackoverflow.com/a/29489594
has body: CodeMirror will re-run its mode on pieces of the document that are changed, you do not need your own change detection. Read this blog post for an explanation of CodeMirror modes.
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47193230
accepted answer of: http://stackoverflow.com/q/29424933
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29424933

http://stackoverflow.com/comment/46984646
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29403575
has text: Yes, it does. But I don't see where in your question you specified that no dependency on jQuery UI as a condition.

http://stackoverflow.com/comment/46930523
type: Comment
type: QuestionComment
has text: @Demodave yes it is included as part of the main header page.
comment on: http://stackoverflow.com/q/29374540
score: 0

http://stackoverflow.com/comment/47198301
type: Comment
type: QuestionComment
score: 0
has text: @Legends Thanks for catching that error! the "dd" was an accidental input from vim. However 'token' is a legitimate variable I needed to pass in alongside my_var
comment on: http://stackoverflow.com/q/29521761

http://stackoverflow.com/comment/47004402
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29415926
has text: Seriously an entire library for this small of a JSON packet?

http://stackoverflow.com/q/29526556
tagged with: http://stackoverflow.com/tag/html
duplicate of: http://stackoverflow.com/q/16258892
has comment: http://stackoverflow.com/comment/47207595
has body: I am trying to create a link, which looks and feels like an tag item, but runs a function instead of using the href. When I try to apply the onclick function to the link it immediately calls the function regardless of the fact that the link was never clicked. Any attempt to click the link thereafter fails. What am I doing wrong? HTML Send Javascript startFunction(); function secondFunction(){ window.alert("Already called!?"); } function startFunction() { var sentNode = document.createElement('a'); sentNode.setAttribute('href', "#"); sentNode.setAttribute('onclick', secondFunction()); //sentNode.onclick = secondFunction(); sentNode.innerHTML = "Sent Items"; //Add new element to parent var parentNode = document.getElementById('parent'); var childNode = document.getElementById('sendNode'); parentNode.insertBefore(sentNode, childNode); } JsFiddle As you can see I tried two different ways of adding this onclick function, both of which have the same effect.
tagged with: onclick
accepted answer: http://stackoverflow.com/a/29526602
has comment: http://stackoverflow.com/comment/47207590
type: AnsweredQuestion
upvote count: 9
has comment: http://stackoverflow.com/comment/47207654
type: Question
has title: Javascript onclick function is called immediately (not when clicked)?
score: 9
has comment: http://stackoverflow.com/comment/47207559
answer count: 1
has answer: http://stackoverflow.com/a/29526602
linked to: http://stackoverflow.com/q/11757075
downvote count: 0
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/16258892

http://stackoverflow.com/comment/47058290
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29439941
has text: Thanks Buddy. :) This One Helped Me. :)
type: Comment

http://stackoverflow.com/comment/46963912
has text: http://xyproblem.info/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29393628
score: 4

http://stackoverflow.com/q/29376140
has comment: http://stackoverflow.com/comment/46934746
score: -3
has comment: http://stackoverflow.com/comment/46934347
has comment: http://stackoverflow.com/comment/46933340
type: AnsweredQuestion
upvote count: 0
has title: Comparing session variables with javascript variables
has comment: http://stackoverflow.com/comment/46933906
has comment: http://stackoverflow.com/comment/46933328
downvote count: 3
has comment: http://stackoverflow.com/comment/46932767
type: Question
tagged with: c#
accepted answer: http://stackoverflow.com/a/29376189
tagged with: session
tagged with: javascript
linked to: http://stackoverflow.com/q/359494
has answer: http://stackoverflow.com/a/29376189
has body: The most logical way that came to my mind was doing var example2 = "Jake" if (&lt;%=Session["example1"]%&gt; == example2){ Code } However i get this error: The value of what is written inside that session variable is "undefined"... so if it were a name(Bob) that's inside that session variable, it would say Bob is undefined Anyone got a solution for me?
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46945660

http://stackoverflow.com/comment/47011125
has text: As a note, it's not necessary to have ".js" at the end of your `require` calls. That's implied.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29416606
score: 0

http://stackoverflow.com/q/29411776
downvote count: 2
has comment: http://stackoverflow.com/comment/46996802
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46996546
has comment: http://stackoverflow.com/comment/46996750
has answer: http://stackoverflow.com/a/29411903
score: -1
has body: How can I convert a string into a number in HTML? I wanted to convert an input value into a number and pass it into the script code. Pressing the button should do this conversion and pass the variable. Enter a number: <% for(int i = 1; i <= **X**; i++) { %> Number <%= i %> <% } %>
type: Question
answer count: 2
has title: How to convert a string to a number in html? and how to pass a variable into scriptlet code?
tagged with: jsp
has comment: http://stackoverflow.com/comment/46996850
tagged with: javascript
has answer: http://stackoverflow.com/a/29411990
favorite count: 0
tagged with: type-conversion
accepted answer: http://stackoverflow.com/a/29411903
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29411990
has comment: http://stackoverflow.com/comment/46996875

http://stackoverflow.com/comment/47061938
type: Comment
score: 0
type: AnswerComment
has text: thnks and apologies to @siguza. thnks Lajos Arpad.
comment on: http://stackoverflow.com/a/29447233

http://stackoverflow.com/comment/126765227
type: AnswerComment
type: Comment
has text: I dont really get the use of "!ref". Can you please explain? I did a similar code and worksheet[cellRef] = cell; seems to be sufficient
comment on: http://stackoverflow.com/a/32928595
score: 0

http://stackoverflow.com/comment/46933004
comment on: http://stackoverflow.com/q/29375944
score: 0
type: Comment
type: QuestionComment
has text: Yes thats what I thought. How should i send the value input in the input field to the search event?

http://stackoverflow.com/a/29474866
upvote count: 1
has body: First of all if you're not aware you should read oatuh 2.0 protocol documentation. But I'm warning you that it can be quite complex and how you implement it, it's up to you. This is package for PHP but in it's wiki it sums pretty well the four types of grant that you can achieve with oauth: Authorisation code grant Implicit grant Resource owner credentials grant Client credentials grant In your case I think that Resource Owner Password Credentials Grant is enough, but then again that it's up to you. I have found this two npm packages, that maybe can help you out node-oauth20-provider and Sails-OAuth2-API
has comment: http://stackoverflow.com/comment/47267077
type: Answer
has comment: http://stackoverflow.com/comment/47112871
downvote count: 0
has comment: http://stackoverflow.com/comment/47133620
has comment: http://stackoverflow.com/comment/47114795
score: 1
has comment: http://stackoverflow.com/comment/47137572
has comment: http://stackoverflow.com/comment/47137032
answers question: http://stackoverflow.com/q/29471398
has comment: http://stackoverflow.com/comment/47111797
has comment: http://stackoverflow.com/comment/47137333
has comment: http://stackoverflow.com/comment/47263413

http://stackoverflow.com/comment/46956592
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29389222
has text: Please help me ... If someone are looking it

http://stackoverflow.com/comment/46957999
has text: I'm not sure that using the user-agent can work. The iPhone model is not specified. And if user updates his iOS or Safari version, the user-agent will change.
type: Comment
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/29380966

http://stackoverflow.com/comment/84375760
type: Comment
comment on: http://stackoverflow.com/a/29703558
has text: how did you set this?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46959508
type: AnswerComment
score: 0
type: Comment
has text: Well, http will for sure not automatically detect changes done in the backend, lets say the database except for when you activally poll it from the client or doing push from the backend
comment on: http://stackoverflow.com/a/29391002

http://stackoverflow.com/q/29468775
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47099755
has title: Webiopi multiple button css
has body: I'm want to change background color of buttons with different color but it end up with overlap css in button and .bd Javascript: var restart = webiopi().createMacroButton("macro", "restart", "myMacroWithoutArgs1"); $("#restart").append(restart); var shutdown = webiopi().createMacroButton("macro", "shutdown", "myMacroWithoutArgs2"); $("#shutdown").append(shutdown); var schedule_set = webiopi().createMacroButton("debug", "debug"); $("#debug").append(schedule_set); var back = webiopi().createMacroButton("back", "หน้าหลัก"); $("#back").append(back); CSS: HTML: Hope anyone can tell me how to properly fixed this issue? Thank you
has comment: http://stackoverflow.com/comment/47099925
has answer: http://stackoverflow.com/a/33044201
has comment: http://stackoverflow.com/comment/47099831
tagged with: webiopi
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/47100156

http://stackoverflow.com/q/29524818
has body: I have an element which has many data types, for example: &lt;div class="marker" data-type="industry context history society" data-lat="53.411028" data-lng="-1.4152860" id="1023"&gt;&lt;/div&gt; And I have this little bit of jQuery/JS that if the data type is a certain 'word' it changes the colour of the marker, for example: if ($marker.data('type') == 'context') { icon = 'http://maps.google.com/mapfiles/ms/icons/green-dot.png'; } else { icon = 'http://maps.google.com/mapfiles/ms/icons/red-dot.png'; } However, this only works if there is only one 'data-type' word. Is it possible to write this so if the data-type contains the word it will change the icon? I thought there might've been an operator for this but alas there doesn't seem to be.
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/29524855
answer count: 1
tagged with: jquery
has title: jQuery/JS contain operator or similar
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29524855
has comment: http://stackoverflow.com/comment/47204047
type: Question
has comment: http://stackoverflow.com/comment/47204301

http://stackoverflow.com/a/29486318
score: 5
accepted answer of: http://stackoverflow.com/q/29486250
answers question: http://stackoverflow.com/q/29486250
type: AcceptedAnswer
upvote count: 5
type: Answer
has body: When you do select ng-model="countSelector", you are binding your select to $scope.countSelector So, inside your controller, if you want to have an access to your selected value, you use the following : $scope.countSelector edit : according to your requirements, you might want to have directly the value inside $scope.countSelector. To do so, you can adapt your ng-options to the following : ng-options="opt.id as opt.label for opt in options"
downvote count: 0

http://stackoverflow.com/comment/46991713
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29408341
type: Comment
has text: This is similar to: function test() { alert('test'); } <?php echo ' '; ?> And it works 100%. If it doesn't that means your have some error, try to validate your website here: http://validator.w3.org/ Also, make sure you load jquery before this function.

http://stackoverflow.com/comment/47107501
comment on: http://stackoverflow.com/a/29472962
has text: Also, in your *PHP* script, the `$_REQUESTS` should be for `area` and `sector`, not `item_id` and `cat_id`.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47002337
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29412736
has text: @Joel the problem is if I create this DIV with absolute positioning, the user can use the another div's beside that...
score: 0

http://stackoverflow.com/comment/47088965
type: QuestionComment
type: Comment
has text: You can cache the `this` object: `var reloader = this;` and then in your nested function `reloader.enabled`. Or use the `Function.prototype.bind` function.
comment on: http://stackoverflow.com/q/29462672
score: 0

http://stackoverflow.com/comment/47041591
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29436335
score: 2
has text: You are missing jQuery. The jQuery source code must be loaded first before main.js

http://stackoverflow.com/comment/47064680
type: Comment
has text: I apologize for the delay in getting back to you! Around 3am, I decided to go to bed. This makes a TON of sense to me, or at least is the most logical suggestion. I will test this using the delay and post results this afternoon. If the setTimeourt proves you are right, I should be able to pull the emails when the form initially loads and put them in an object. If I loop through the object, I shouldn't get any delays from the server. Thank you SO SO much for the suggestion, I really appreciate the time you put into thinking about my long post.
type: AnswerComment
comment on: http://stackoverflow.com/a/29443437
score: 0

http://stackoverflow.com/comment/47126070
score: 0
type: AnswerComment
has text: Works... i see my mistake... WOW! easy fix! thank you
comment on: http://stackoverflow.com/a/29482760
type: Comment

http://stackoverflow.com/a/29522761
has body: You should do something like this: $http.jsonp('http://api.rottentomatoes.com/api/public/v1.0/movies.json?[apyKeyBlaBla]&amp;q=Toy+Story+3&amp;page_limit=1&amp;callback=JSON_CALLBACK').success(function(data) { $scope.items = data; }); Important is to have callback=JSON_CALLBACK in the request url
answers question: http://stackoverflow.com/q/29522370
downvote count: 0
score: 1
upvote count: 1
type: Answer

http://stackoverflow.com/a/29473525
answers question: http://stackoverflow.com/q/29473453
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29473453
has body: Try to cast that particular element into int before feeding/puhsing it: $sector_final = array(); array_push($sector_final, array("Sector", "Amount")); foreach( $sector_data as $row){ $row['amount'] = (int) $row['amount']; // cast it array_push($sector_final, array_values($row)); }
upvote count: 3
score: 3

http://stackoverflow.com/a/29450818
has body: Not sure why you need that timer reset behaviour but you could do it like this. Add your shell controller and ng-mousemove to the body-tag and style your body/html to fill the whole page with css width: 100%; height:100%. Please have a look at the demo below and this jsfiddle. var app = angular.module('myApp', ['ui.bootstrap']); app.controller('shell', function($scope, $interval, $modal) { $scope.test = 'hello world'; this.counter = 0; var vm = this; this.moveHandler = function() { console.log('mouse moved, reset counter!'); vm.counter = 0; }; var timer = function(iterCount) { console.log('timer tick', vm.counter); vm.counter++; }; var intervalPromise = $interval(timer, 100); $scope.$on("$destroy", function handler() { // destruction code here $interval.cancel(intervalPromise); // stop interval on destroy of ctrl. }); $scope.items = ['item1', 'item2', 'item3']; $scope.open = function (size) { var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: 'ModalInstanceCtrl', size: size, resolve: { items: function () { return $scope.items; } } }); }; }); // modal code from angular-ui-bootstrap demo app.controller('ModalDemoCtrl', function ($scope, $modal, $log) { $scope.items = ['item1', 'item2', 'item3']; $scope.open = function (size) { var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: 'ModalInstanceCtrl', size: size, resolve: { items: function () { return $scope.items; } } }); modalInstance.result.then(function (selectedItem) { $scope.selected = selectedItem; }, function () { $log.info('Modal dismissed at: ' + new Date()); }); }; }); // Please note that $modalInstance represents a modal window (instance) dependency. // It is not the same as the $modal service used above. app.controller('ModalInstanceCtrl', function ($scope, $modalInstance, items) { $scope.items = items; $scope.selected = { item: $scope.items[0] }; $scope.ok = function () { $modalInstance.close($scope.selected.item); }; $scope.cancel = function () {…
answers question: http://stackoverflow.com/q/29418227
type: Answer
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/comment/47390619
comment on: http://stackoverflow.com/a/29620933
score: 0
type: AnswerComment
has text: @user4656677 so possibly error in `"Transaction", "Desktop"`? Are you sure that this action return different result depends on `id` parameter? Can you provide code for this action in your OP?
type: Comment

http://stackoverflow.com/comment/47116936
type: Comment
has text: i have added the ajax code
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29477906

http://stackoverflow.com/a/29497910
has comment: http://stackoverflow.com/comment/47171612
score: 0
has body: There is no such thing as three way ratios. A ratio has exactly two parties. Now that we have this out of the way, let's split the ratio. We can define x:y with x number of available threads (CPUs/cores) and y number of PhantomJS processes. Then we can define y:z with z number of page instances. Cores vs. processes You can run as many PhantomJS processes as you like as long as the hardware supports it (mainly RAM). But for most architectures (all?), you will get a drop in relative performance (y/x) when y > x. When you have many processes and not as many cores then at least two processes must share one core (or thread if you have multi-threading). So those two processes won't be done as fast as the others. This has nothing to do with PhantomJS, but normal multi-process behavior. If you have y >> x then even context switching of the processes might become a bottleneck and everything will be extremely slow. Always look to spawn only as many processes as you have cores/threads (maybe even less). For almost all cases, PhantomJS processes run independently by default. Only if the pages they are running on use localStorage, then you may run into problems. localStorage is always persisted on disk and there is no way to change that. PhantomJS process vs. page instances PhantomJS runs JavaScript scripts. Since JavaScript is single-threaded as a whole, you cannot get any parallel processing, but you can get concurrency through the normal JavaScript event loop. PhantomJS supports multiple page instances per process and this works rather well, but of course since JavaScript is single-threaded, the execution of multiple pages is interlaced. This means that opening two pages at the "same time" should result in more or less the same time it would take to open them one after the other. This is not strictly the case, because waiting for resources of one page enables other pages to do further processing. When pages are opened sequentially, then the time that one page is waiting for r…
has comment: http://stackoverflow.com/comment/47173982
has comment: http://stackoverflow.com/comment/47170737
has comment: http://stackoverflow.com/comment/48160937
answers question: http://stackoverflow.com/q/29488620
type: Answer
has comment: http://stackoverflow.com/comment/47224038

http://stackoverflow.com/comment/132957223
type: Comment
comment on: http://stackoverflow.com/a/30101977
type: AnswerComment
score: 0
has text: All these answers give a gradient on the canvas level, did anyone achieve a consistent gradient in each bar of the bar chart?

http://stackoverflow.com/q/29464479
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29464505
has title: splitting words defined in a variable
has body: I'm using the following code for profanity filter in an input field $(function() { $("#buttonid").on("click",function() { var badInput = $("input#inputid").val(); var badwords = ["freak", "bad"]; if($.inArray(badInput, badwords) !==-1) { alert("You cannot use the word " + badwords); return false; } }); }); If the user enters the word freak, then it should output: You cannot use the word freak. However, it output the following: You cannot use the word freak,bad So, I think I need to split words defined in the variable badwords or to use another way. I just want the output to show the word that the user used in the input field. Any answer would be appreciated.
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/29464505
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/47035886
type: QuestionComment
has text: @geocodezip I am using http://knockoutjs.com/documentation/json-data.html in my ASP MVC application. All the ko.toJS does is converts the object from my API to a usable format, in this case float.
comment on: http://stackoverflow.com/q/29431735
score: 0
type: Comment

http://stackoverflow.com/a/29520616
score: -1
has body: You can use bool contains = document.getElementById('ask').value.indexOf("time") &gt; -1 function askQuestion { if (document.getElementById('ask').value.indexOf("time") &gt; -1) { /*tell time*/} }
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/29520548
upvote count: 0

http://stackoverflow.com/q/29445853
tagged with: scope
score: 0
has answer: http://stackoverflow.com/a/29445951
has title: Transform an object into a context in Javascript
has body: I have an Object like this: var context = { "myBoolean" : true, "myNumber" : 5, "myObject" : { "attr1" : "value1" } } I have a String which is a condition: var condition = "myBoolean == true &amp;&amp; myNumber &gt; 3 &amp;&amp; myObject.attr1 == 'value1'" I want to eval the String condition with myBoolean, myNumber, myObject taking their values inside context. I was close to an answer with these lines : eval("function doTest() { return " + condition + ";};" + "var answer = doTest.apply(context);"); But I need to add this. in front of my variable name. So it's not exactly what I want to do. I know this doesn't sounds very nice/secure to do something like this, but I think an answer coule be interesting.
accepted answer: http://stackoverflow.com/a/29445951
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/47102238
score: 0
comment on: http://stackoverflow.com/q/29470290
type: QuestionComment
type: Comment
has text: take a look at Datetime.Parse

http://stackoverflow.com/comment/47012557
type: AnswerComment
comment on: http://stackoverflow.com/a/29420399
has text: Thanks, and I appreciate both your answers! My apologies on my quick edits and causing you to answer twice.
type: Comment
score: 0

http://stackoverflow.com/comment/47013632
comment on: http://stackoverflow.com/q/29420796
has text: what?.. so your AJAX works fine, and your alert works fine.. what are you trying to accomplish? do you want to alert the results of your Ajax, everytime the user clicks on #livesearch?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47062137
type: AnswerComment
has text: Here we are adding a watch event to hide the visible message on clicking of radio http://plnkr.co/edit/GVYuI47TKlAVqkVDUDOq?p=preview
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29447485

http://stackoverflow.com/a/29509122
type: Answer
has comment: http://stackoverflow.com/comment/47178272
has comment: http://stackoverflow.com/comment/47174812
has comment: http://stackoverflow.com/comment/47182253
has comment: http://stackoverflow.com/comment/47186674
has comment: http://stackoverflow.com/comment/47184892
has comment: http://stackoverflow.com/comment/47175245
has comment: http://stackoverflow.com/comment/47184787
answers question: http://stackoverflow.com/q/29508678
has comment: http://stackoverflow.com/comment/47175241
has body: Since your post data is JSON, the Request.Form won't be filled in, so you will have to use Request.BinaryRead and convert this result as a string. See here to convert this JSON string into an object.
score: 0
has comment: http://stackoverflow.com/comment/47183393
has comment: http://stackoverflow.com/comment/47175321

http://stackoverflow.com/q/29522895
tagged with: html5-video
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has body: Is it possible to track mouse position within a video that is playing? I want to make this video with video.js and i want to save the location of the mouse within the video. For example based on ratio of the video - or something similar to detect when the mouse is over left part of the video, right top bottom -- basically a location x y. In the same time i might need a solution to convert this location x y if i run this video on a different size. Thanks a lot for your help. George
favorite count: 0
tagged with: mouseover
upvote count: 3
has answer: http://stackoverflow.com/a/29527843
accepted answer: http://stackoverflow.com/a/29527843
has answer: http://stackoverflow.com/a/29527395
has title: Javascript - Track mouse position within video
downvote count: 2
tagged with: mouse
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29527395

http://stackoverflow.com/q/29510453
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29510818
has title: Dynamic Tabs in bootstrap on .aspx pages?
tagged with: asp.net
has body: I have a piece of code. I wrote a javascript in order to move to next tab when you click on tabs. However i want to move to next tab also when i click on a given button. my code fulfills my requirement, except, the moment i press next button on my one dynamic tab, page starts refreshing, although i have moved to next dynamic tab but as page refreshes i am thrown back to my initial tab. help please.(i am running this script on an aspx page, works fine on a html page) (attached picture shows my dynamic tabs. i want to move to section b with a click on button on section a) my code: $(document).ready(function(){ $("#myTab a").click(function(e){ e.preventDefault(); $(this).tab('show'); }); $(".btn-style").click(function () { var target = $(".nav-tabs li.active"); var sibbling; if ($(this).text() === "Next") { sibbling = target.next(); } else { sibbling = target.prev(); } if (sibbling.is("li")) { sibbling.children("a").tab("show"); } }); }); and a button like: Next
type: AnsweredQuestion
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29510818
type: Question
tagged with: javascript

http://stackoverflow.com/q/29432148
has answer: http://stackoverflow.com/a/29432593
tagged with: arrays
downvote count: 0
tagged with: javascript
answer count: 6
has title: Find difference in two arrays
possible better answer: http://stackoverflow.com/a/29432593
has comment: http://stackoverflow.com/comment/47033885
has body: I have two arrays of email addresses and I am trying to find the difference in the two. One of the arrays contains current email address. The other contains current group members email address. I am updating the group list with the current email addresses and removing the address in the group that are not in the current email addresses. I cannot wrap my head around how I get my for loop to accomplish this. Here is my code so far... for(i = 0; i &lt; GROUP_USERS.length; i++){ var currentMember = GROUP_USERS[i]; for(x = 0; x &lt; DOMAIN_USERS.length; x++){ if(DOMAIN_USERS[x] != currentMember){ continue; } else { } } It seems like I need to test the end of my loop, or something. EDIT I am using Google Apps Script (SDK). I will have to push all of the emails that need to be deleted to an array and then use the GroupApps class to remove those emails from the group. Then I will need to push the DOMAIN_USERS email address that do not already reside in the group, to the group. So, essentially, I will have two arrays. One array of emails that need to be removed from the group and one array of emails that need to be added to the group. Hopefully, that makes more sense.
accepted answer: http://stackoverflow.com/a/29432264
has comment: http://stackoverflow.com/comment/47033891
favorite count: 0
has answer: http://stackoverflow.com/a/29433841
has comment: http://stackoverflow.com/comment/47033851
upvote count: 1
has answer: http://stackoverflow.com/a/29434407
has answer: http://stackoverflow.com/a/29432561
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29432960
score: 1
has answer: http://stackoverflow.com/a/29432264
type: Question

http://stackoverflow.com/q/29491709
has answer: http://stackoverflow.com/a/29499111
tagged with: ajax
has body: I have an issue with my login script where I have implemented ajax so the message will display on the same page if there was an invalid login but I have some issue when user puts the right information nothing happens, I have to refresh the page then its says welcome user but when user puts wrong information it displays invalid login message immediately. index.php <?php if (!isset($_SESSION['uid'])) { echo " Welcome to our homepage. you can be part of our awesome community by signing up. "; }else{ echo " You are now logged in and able to post comments in our site "; } ?> <?php if (!isset($_SESSION['uid'])) { echo " Username: Password: "; echo " "; echo " "; echo "&nbsp"; echo " "; echo " "; } else { echo " "; echo " You are logged in as ".$_SESSION['username'].""; echo " "; echo " "; echo "&nbsp"; echo " "; echo " "; echo " "; echo "&nbsp"; echo " "; echo " "; } ?> ajax.js function hello2(){ var username = encodeURIComponent(document.getElementById('username').value); var password = encodeURIComponent(document.getElementById('password').value); var url = "login.php?username="+username+"&password="+password; HTTP.onreadystatechange=function() { if (HTTP.readyState==4 && HTTP.status==200) { document.getElementById("ack1").innerHTML=HTTP.responseText; } }; HTTP.open("POST", url ,true); HTTP.send(); } login.php <?php session_start(); include_once("connect.php"); if (isset($_REQUEST['username'])) { $username = mysql_real_escape_string( $_GET["username"]); $password = mysql_real_escape_string( md5 ($_GET["password"])); $sql = "SELECT * FROM users WHERE username='".$username."' AND password='".$password."' LIMIT 1"; $res = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($res) == 1) { $row = mysql_fetch_assoc($res); $_SESSION['uid'] = $row['id']; $_SESSION['username'] = $row['username']; header("location: index.php"); exit(); } else{ echo "INVALID login information."; exit(); } } ?> to get around this issue I tried refreshing the page using header function in logi…
has comment: http://stackoverflow.com/comment/47144410
answer count: 5
possible better answer: http://stackoverflow.com/a/29491786
tagged with: php
has comment: http://stackoverflow.com/comment/47142701
has title: I tried using ajax in login script but the page wont redirect
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47142516
has answer: http://stackoverflow.com/a/29491844
accepted answer: http://stackoverflow.com/a/29499111
type: Question
has answer: http://stackoverflow.com/a/29491793
has comment: http://stackoverflow.com/comment/47142502
tagged with: javascript
has answer: http://stackoverflow.com/a/29491965
score: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/29491786

http://stackoverflow.com/a/29462792
has body: You can do this. In html hello In Javascript, var text = $('#my-text').html().split(''); for(var i=0; i<text.length; i++){ $('#split-span').append(''+text[i]+''); }
upvote count: 1
answers question: http://stackoverflow.com/q/29462701
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/29398093
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29392502
has comment: http://stackoverflow.com/comment/46972924
has comment: http://stackoverflow.com/comment/46972694
downvote count: 0
has body: img tags don't have href properties. You need to wrap the image in an anchor and assign the url to that, or do a custom redirect. Notice your image html on inspection of element: &lt;img src="https://placekitten.com/g/200/300" id="1" class="btnClick" href="google.com"&gt; &lt;!-- not valid! --&gt; This isn't valid because imgs aren't anchors! function first() { this.src = 'https://placekitten.com/g/200/300'; $(this).unbind("click"); $(this).on("click", second); } function second() { window.location.href = "https://www.google.com"; $(this).unbind("click"); $(this).on("click", first); } $('.btnClick').on('click', first); (I tried to make a fiddle but it wouldn't save, but this should work) You need to store your actions in functions so you can revert if need be. First action is the change the source, then change the event to redirect you like a link.

http://stackoverflow.com/q/29462743
score: 0
answer count: 1
has body: How can I create a function in PHP, which works with a textarea to print the text with the equivalent color by entering something like [color:red]?? This function actually works similar to facebook's @[profile_id:0] stuff.
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/29462781
type: Question
tagged with: javascript
has title: How to create a function in php which works with a textarea to print the text with the equivalent color by entering something like [color:red]

http://stackoverflow.com/a/29484140
type: Answer
has body: It's a litle complex. You can send the from fields to server to save as a 'draft' when the form fields changed. eg: setInterval(autoSave, 1000); function autoSave() { if form is changed { use ajax to post form fields to server to save as a draft } } when user reloads the page, fill the form fields with your saved draft.
score: 0
answers question: http://stackoverflow.com/q/29484070

http://stackoverflow.com/comment/47149177
has text: Oh I mean Google Slides! Updated my question. However, they simply preventDefault() on the scroll gesture. I need keep scrolling, but disable the page navigation gesture.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29494082
score: 0

http://stackoverflow.com/comment/47073606
type: Comment
has text: @ChadJohnson, that's the beauty of `ng-model` - the user of your directive can put `ng-required` on the `<custom-control>` element and it would just work. Of course, you could also force this behavior by adding a `$validator`.. but that is beyond the scope of the question
score: 1
comment on: http://stackoverflow.com/a/29453770
type: AnswerComment

http://stackoverflow.com/comment/47205282
type: AnswerComment
has text: Please take a look @: http://stackoverflow.com/questions/29525469/how-do-i-enable-dynamodb-local-logging/29525470#29525470
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29491728

http://stackoverflow.com/q/29388797
favorite count: 0
accepted answer: http://stackoverflow.com/a/29388902
tagged with: http://stackoverflow.com/tag/html
score: -1
has title: Trigger an event on changing value in an input using JAVASCRIPT
has body: I want to trigger a function that changes the state of my button in a webpage. My input initially looks like this:- Now when I type something in the text box, I want it to change like this:- Notice the call button getting activated. I am using the onblur method to listen for changes, but this does not happen dynamically. I enter something in the box, and then click outside. That is the point when onblur executes. How do I call the onblur method as soon as the user changes the value in box? Here is the javascript code I am using function toggleCallButton() { if (document.getElementById('dialArea').value == '') { document.getElementById('callButton').classList .add('input-group-addon-disabled'); document.getElementById('callButton').classList .remove('input-group-addon-active'); } else { document.getElementById('callButton').classList .remove('input-group-addon-disabled'); document.getElementById('callButton').classList .add('input-group-addon-active'); } }
has comment: http://stackoverflow.com/comment/46955107
downvote count: 1
type: Question
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/29388902
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46956724

http://stackoverflow.com/comment/46932965
comment on: http://stackoverflow.com/q/29375938
type: Comment
type: QuestionComment
has text: If none of the answers work for you: The cookie _should_ be deleted, from the info you provided. There seems to be something else that goes wrong. Please create a new blank HTML page, and try to reproduce the problem with the smallest amout of (unnecessary) code.Then, add it to your question so we can play with it and find what's wrong.
score: 0

http://stackoverflow.com/q/29389953
has comment: http://stackoverflow.com/comment/46957416
tagged with: javascript
has comment: http://stackoverflow.com/comment/46959431
score: 0
answer count: 0
type: UnansweredQuestion
tagged with: php
has title: Play audio file on the server side using ElFinder
has body: I am trying to play an .mp3 file on the server side using ElFinder. I have created two instances of ElFinder. How should I play a file from one of the instances on the server side? Here is the code handlers : { select : function(event, elfinderInstance) { var selected = event.data.selected; if (selected.length&gt;0) { var filenamex=elfinderInstance.file(selected[0]).name; console.log(filenamex); var path=elfinderInstance.path(selected[0]); console.log(path); if(filenamex.indexOf(".mp3") == filenamex.length - 4) { console.log("Mp3 file"); } } } }, lang : 'en', customData : {answer : 42}, rememberLastDir :false, debug:true }).elfinder('instance'); I first try to check whether the selected file is a mp3 file or not. If it is a mp3 file then I should be able to play it.
tagged with: elfinder
type: Question

http://stackoverflow.com/a/29414811
has body: I have an another option for you. you can use jquery autocomplete to get this done. But may be there is a chance that you have to change the html from list elements to something else.Just go through the below example and that might help. Never mind if this is not what you desired. https://jqueryui.com/autocomplete/#multiple
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29410401

http://stackoverflow.com/comment/46929888
comment on: http://stackoverflow.com/q/29374664
type: Comment
type: QuestionComment
score: 1
has text: You're looking for AJAX.

http://stackoverflow.com/comment/46989596
comment on: http://stackoverflow.com/q/29407699
type: Comment
type: QuestionComment
has text: I forgot to delete the n, thank you
score: 0

http://stackoverflow.com/comment/47028329
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29428763
score: 0
has text: Please check console for errors and post them here if there are any

http://stackoverflow.com/a/29467585
has comment: http://stackoverflow.com/comment/47097570
type: Answer
downvote count: 0
score: 1
has body: use call or apply functionsContainer["f1"].call(this, args)
answers question: http://stackoverflow.com/q/29467558
has comment: http://stackoverflow.com/comment/47098404
upvote count: 1
has comment: http://stackoverflow.com/comment/47097638

http://stackoverflow.com/comment/47829006
comment on: http://stackoverflow.com/a/29552654
type: AnswerComment
score: 0
type: Comment
has text: It works, however, I prefer to pass the logs to the backend to have one entry for logging.

http://stackoverflow.com/q/29456720
type: Question
has comment: http://stackoverflow.com/comment/47081015
has comment: http://stackoverflow.com/comment/47081004
tagged with: javascript
has comment: http://stackoverflow.com/comment/47081228
score: 0
has body: This is my code in javascript to parse a document but I want it to parse the document on the given url and not the one I'm coding on. I am using location.href to redirect it to the desired url but its not working and the current url displayed is of my web from (the one I'm working on) &lt;script type="text/javascript" &gt; function wordcount () { //location.href='http://www.w3schools.com'; window.location.href = "http://www.google.com"; alert(window.location.toString().toLowerCase()); var words = document.getElementsByTagName('body')[0].innerHTML.replace(/&lt;.*?&gt;/g,''); alert( words.match(/\S+/g)); //alert("hi"); } &lt;/script&gt;
linked to: http://stackoverflow.com/q/2067472
has title: how to read the desired page using document.getelement
has comment: http://stackoverflow.com/comment/47078202
has comment: http://stackoverflow.com/comment/47078624
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47080601
has comment: http://stackoverflow.com/comment/47078734
answer count: 0
has comment: http://stackoverflow.com/comment/47078946

http://stackoverflow.com/comment/47042272
score: 0
has text: Codeacademy and many other's use jQuery built in since it's become "hand-in-hand" with js over the past few years.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29436388

http://stackoverflow.com/a/29415021
type: Answer
answers question: http://stackoverflow.com/q/29406361
has body: Here's my approach: _(collection) .map(_.keys) .flatten() .uniq() .map(function(item) { return { field_name: item, sample: _.pluck(collection, item) }; }).value(); The first three calls to map(), flatten(), and uniq(), gets you an array of keys to work with. The next call to map() generates the output collection. Since you're mapping the keys, the field_name property is just the item argument. The sample property uses pluck() to sample all the field values from the original collection.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29406361
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/47171612
has text: @soda You probably mean `z > y`. My reasoning is that, because JavaScript is single-threaded, there won't be any parallelism (only concurrency) to increase performance. This comes at the expense of programmatically managing those `page` instances in addition to managing the multiple processes. I haven't done any benchmarks, because as I said, this highly depends on the page you request and how you actually do manage multiple `page` instances.
type: Comment
comment on: http://stackoverflow.com/a/29497910
score: 0
type: AnswerComment

http://stackoverflow.com/a/29458357
upvote count: 1
has body: You're comparing apples to oranges. Controllers call services to retrieve the models and attach them to your $scope (in other words, they initialize scope). Directives are re-usable components that you can use in your views. The two are not mutually exclusive: you can use controllers with directives, controllers without directives, and directives without controllers. It is meaningless to compare them with regards to approach.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29457901
score: 1

http://stackoverflow.com/q/29415373
score: 2
type: AnsweredQuestion
has title: How can I hide infowindow on markers which are inside marker cluster
tagged with: markerclusterer
accepted answer: http://stackoverflow.com/a/29427474
type: Question
tagged with: google-maps
tagged with: javascript
has answer: http://stackoverflow.com/a/29427474
tagged with: google-maps-api-3
downvote count: 2
tagged with: infowindow
answer count: 1
favorite count: 0
has body: I am having few markers which have infowindow and markerclusters. I want to hide the infoWindow of the markers when they become part of marker clusters in the map and show tem when they are actually shown individually rather than in a cluster. The code for markers and infowindow is something like: var marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map, ... }); var myOptions = { ....... }; infowindow = new InfoBox(myOptions); infowindow.open(map, marker); markers.push(marker); Then I have marker cluster var markerCluster = new MarkerClusterer(map, markers,markerClustererOptions); Can someone provide code/suggestions/link on how to approach this
upvote count: 4

http://stackoverflow.com/comment/47123559
has text: Hi Plato, I am not sure, but I don't think so -- the factory is callable from the controller.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29481125
type: QuestionComment

http://stackoverflow.com/a/29504022
score: 1
has body: If you're happy with how well it works to call .play() on both videos at once, then the simplest solution may be to not use loop="true" to make the videos loop. Instead, detect when both videos have ended (using the onended event), and then play them both again. (You might need to seek to the beginning of both, then wait for onseeked on both, to make sure they're both ready to play.) There is still a danger that one video will get behind the other, mainly because of buffering issues. You can detect where each video is in its playback by looking at .currentTime. If the two values of .currentTime are too far apart, then you'd want to assign one to be the value of the other. (Don't expect them to be exactly equal.) The "correct" way to synchronize two videos is using a MediaController, but as far as I know, no browser has implemented that yet. When they do, you can easily synchronize videos by setting the same value of the mediagroup attribute for both video elements (this automatically creates a MediaController and attaches it to both videos).
answers question: http://stackoverflow.com/q/29502686
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47165859
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29502686

http://stackoverflow.com/comment/46948519
score: 2
comment on: http://stackoverflow.com/a/29384832
type: AnswerComment
type: Comment
has text: For 2 reasons: 1. automatic type declaration (string with `"`, int without, array with [] etc.) 2. for automatic escaping

http://stackoverflow.com/q/29403963
tagged with: php
has answer: http://stackoverflow.com/a/29404110
answer count: 1
has title: Calling JS function from PHP not working
accepted answer: http://stackoverflow.com/a/29404110
tagged with: javascript
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1
has body: Using a method recommended by a user in a previous question I used just one document (index.php) to show different contents instead of creating one file for each one. This is the code: HTML Home More info Contact Us ...index content... ...more info content... JS $(document).ready(function(){ function more_info(){ $('#index').hide(); $('#more_info').show(); } }); PHP <?php if (isset($_GET['id_page'])) { $id = $_GET['id_page']; if ($id == 1) { ?> <?php } } ?> That's not working. But if I change for: It works. Why is this?
favorite count: 0
type: Question
upvote count: 1

http://stackoverflow.com/a/29432096
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29428219
accepted answer of: http://stackoverflow.com/q/29428219
type: Answer
has body: I have made some modification on your ajax request .. changed it get to post let me know its work for you or not. //function that reads a form and create list of parameters function submitajaxform(formid, btnid, wid, rid, url, fsuccess, ferror) { var elem = document.getElementById(formid).elements; var params = new Array(); for (var i = 0; i &lt; elem.length; i++) { if (elem[i].tagName == "SELECT") { //check if valid value exists if (elem[i].options[elem[i].selectedIndex].value != '') { params.push([elem[i].id, encodeURIComponent(elem[i].options[elem[i].selectedIndex].value)]); } } else if (elem[i].type == "checkbox" || elem[i].type == "radio") { params.push([elem[i].id, encodeURIComponent(elem[i].checked)]); } else if (elem[i].type == 'textarea' &amp;&amp; elem[i].className == 'ckeditor') { params.push([elem[i].id, window.escape(CKEDITOR.instances[elem[i].id].getData())]); } //element none of select, checkbox &amp; radio else { params.push([elem[i].id, encodeURIComponent(elem[i].value)]); } } ajaxmethod = "POST"; globalajax(btnid, wid, params, url, rid, fsuccess, ferror); } //function that creates ajax request and sends it function globalajax(btn, wid, prm, url, rid, fsuccess, ferror) { //if already running, reschedule to run after 1 second if (ajaxfinish == 1) { setTimeout("globalajax('" + btn + "','" + wid + "','" + JSON.stringify(prm) + "','" + url + "','" + rid + "','" + fsuccess + "','" + ferror &amp; "')", 500); return; } //very important to put this here: ajaxfinish = 0; //================================ //disable button if supplied if (btn != '' &amp;&amp; document.getElementById(btn) != null) { document.getElementById(btn).disabled = true; } //shows wait msg if container supplied if (wid != '' &amp;&amp; document.getElementById(wid) != null) { document.getElementById(wid).innerHTML = "&lt;img src='/images/loading.gif' class='imginline' alt='Please Wait...' /&gt;" } //shows wait box on result container if (rid != '' &amp;&amp; document.getElementById(rid) …
has comment: http://stackoverflow.com/comment/47041725

http://stackoverflow.com/comment/47017405
type: Comment
comment on: http://stackoverflow.com/a/29402272
score: 0
type: AnswerComment
has text: The reason I need to do the check on the server is because I need to check if the file upload is allowed based on contractual agreements which reside in the database. The condition to allow a contract upload override has nothing to do with the file itself so it can not be done on the client side. It has to do with a contractual state which may no longer allow document changes thus no new contract can be uploaded. This state changes frequently and may be incorrect or unknown at render time and must be checked before initating the upload.

http://stackoverflow.com/a/29434317
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29434258
has comment: http://stackoverflow.com/comment/47039407
score: 4
accepted answer of: http://stackoverflow.com/q/29434258
has comment: http://stackoverflow.com/comment/47037967
type: Answer
has comment: http://stackoverflow.com/comment/47039200
has comment: http://stackoverflow.com/comment/47038132
upvote count: 4
has comment: http://stackoverflow.com/comment/47038891
has comment: http://stackoverflow.com/comment/47038066
has comment: http://stackoverflow.com/comment/47037991
has comment: http://stackoverflow.com/comment/47039366
downvote count: 0
has comment: http://stackoverflow.com/comment/47038187
has comment: http://stackoverflow.com/comment/47039238
has comment: http://stackoverflow.com/comment/47038117
has body: This line is outside of the function. var guessNumber = document.getElementById("guessNumber").value; It gets the value once, it does not update as the text changes. Move it inside the method. Second issue, you are comparing a number and a string. The value of an input is a string. You are trying to compare a number and a string. Type console.log("3"===3); into your console. var randomNumber = Math.floor((Math.random() * 6)); function check() { var guessNumber = parseInt(document.getElementById("guessNumber").value, 10); if (guessNumber === randomNumber) { alert("you are correct"); } else { alert("you are wrong"); } } click here Maybe if you run a test like this you will understand var randomNumber = Math.floor((Math.random() * 6)); var initialValue = document.getElementById("guessNumber").value; var currentValue; function check() { currentValue = document.getElementById("guessNumber").value; alert("initialValue: " + initialValue + " | currentValue: " + currentValue + " | randomNumber : " + randomNumber); var guessNumber = parseInt(currentValue, 10); if (guessNumber === randomNumber) { alert("you are correct"); } else { alert("you are wrong"); } } click here
has comment: http://stackoverflow.com/comment/47039048
has comment: http://stackoverflow.com/comment/47038973

http://stackoverflow.com/comment/47118601
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29473842
type: Comment
has text: Thanks for the help. But I want the file dialog open automatically after the page is loaded without clicking anything.

http://stackoverflow.com/q/29491106
has answer: http://stackoverflow.com/a/29491501
has title: OnEventSave triggering multiple times in dhtmlx scheduler
accepted answer: http://stackoverflow.com/a/29493234
answer count: 2
downvote count: 0
tagged with: dhtmlx-scheduler
favorite count: 0
tagged with: dhtmlx
has body: Hi I started using Dhtmlx scheduler and it is really cool. I am checking for empty event name or event name already saved in a scheduler object. I am throwing alert based on this check and for the first time it is good. When i close the scheduler and try to add events with same name, the alert is shown multiple times. On tracking the issue, i noticed that "scheduler.attachEvent("onEventSave")" is getting fired multiple times and hence the alert is shown multiple times. How to stop this multiple occurrences on saving a single event. My code: scheduler.attachEvent("onEventSave",function(id, ev, is_new){ var event_name_array = []; var events_JSON_Array = JSON.parse(scheduler.toJSON()); for(var i = 0; i &lt; events_JSON_Array.length; i++) { var event = events_JSON_Array[i]; event_name_array.push(scheduler.getEvent(event.id).text); } if (!ev.text || (event_name_array.indexOf(ev.text) &gt; -1) &amp;&amp; (event_name_array.length &gt; 1)) { alert('Bad input'); return false; } return true; }) Thanks in advance!!!
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29493234
score: 1
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/29491501
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29501437
has answer: http://stackoverflow.com/a/29501567
score: 0
tagged with: canvas
has body: Why is this happening? the left is suppose to be a whiteboard and the right canvas contains a barchart? Basically the first half of the javascript code wont execute. I dont know much about debugging. But I have a notion that the 'window.onload' might be an issue.I want to get both canvas functional, with the barchart showing and the sketch functionality. var mycanvas, mycontext; var SnapCanvas, mycontext; var bchart, mycontext; var drawing = false; function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { do { curleft += obj.offsetLeft; curtop += obj.offsetTop; } while (obj = obj.offsetParent); return [curleft, curtop]; } } function getMouseCoords(event) { if (!event) var event = window.event; var posx = 0; var posy = 0; if (event.pageX || event.pageY) { posx = event.pageX; posy = event.pageY; } else if (event.clientX || event.clientY) { posx = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; posy = event.clientY + document.body.scrollTop + document.documentElement.scrollTop; } var totaloffset = findPos(mycanvas); var totalXoffset = totaloffset[0]; var totalYoffset = totaloffset[1]; var canvasX = posx - totalXoffset; var canvasY = posy - totalYoffset; // return coordinates in an array return [canvasX, canvasY]; } function draw(e) { if (drawing) { var coords = getMouseCoords(e); mycontext.lineTo(coords[0], coords[1]); mycontext.stroke(); if (e.shiftKey) { mycontext.fill(); } } } function startdraw(e) { drawing = true; mycontext.beginPath(); coords = getMouseCoords(e); mycontext.moveTo(coords[0], coords[1]); } function stopdraw() { mycontext.closePath(); drawing = false; } function reset() { mycontext.clearRect(0, 0, mycanvas.clientWidth, mycanvas.clientHeight); mycontext.strokeStyle = "black"; var myImage = new Image(); myImage.onload = function() { mycontext.drawImage(myImage, 0, 0, 333, 500); mycontext.save(); } myImage.src = mona; } function downloadPanel() { document.getElementById('downloadpic').src = mycanvas.toDat…
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
has title: Why don't both these javascript files run at the same time? Why do they clash/overwrite?
has answer: http://stackoverflow.com/a/29501619
type: Question
has answer: http://stackoverflow.com/a/29501669
has answer: http://stackoverflow.com/a/29501530
tagged with: javascript

http://stackoverflow.com/comment/47043789
score: 0
type: AnswerComment
has text: What does the /.*today*/ do?
type: Comment
comment on: http://stackoverflow.com/a/29436682

http://stackoverflow.com/comment/47169397
score: 0
type: Comment
type: QuestionComment
has text: @Anita In any case, I get `Error: [$rootScope:inprog] $digest already in progress` or `Error: [$rootScope:inprog] $apply already in progress`. I tried sticking the $apply everywhere - does not work.
comment on: http://stackoverflow.com/q/29506103

http://stackoverflow.com/q/29472909
tagged with: asp.net-mvc
tagged with: javascript
tagged with: extjs
has answer: http://stackoverflow.com/a/29478877
type: AnsweredQuestion
type: Question
has body: Using ASP.NET MVC action method to return Json to a view in order to display the data in a EXT JS form. I am always getting the "record" value as null in the function everythingLoaded even though i can see the action method is returning the JSON data after the Ext.Create. What i am trying to achieve is populate the firstName and lastName param's passed back from the action method to the textbox inside the panel. Can you help? Below is the code ->App.JS Ext.onReady(function() { //Define Store Ext.define('StudentModel', { extend: 'Ext.data.Model', idProperty: 'Id', fields: [ { name: 'Id', type: 'int' }, { name: 'firstName', type: 'string' }, { name: 'lastName', type: 'string' }, { name: 'birthDate', type: 'date' }, { name: 'street', type: 'string' }, { name: 'apartment', type: 'string' }, { name: 'city', type: 'string' }, { name: 'state', type: 'string' }, ], validations: [{ type: 'presence', field: 'firstName' }] }); var store = Ext.create('Ext.data.Store', { model: 'StudentModel', storeId: 'StudentStoreId', proxy: { type: 'ajax', url: '/Home/GetStudentSubmissions', reader: { type: 'json', rootProperty: 'data' } }, autoLoad: { callback: everythingLoaded } } ); function everythingLoaded() { var record = store.getAt(0); //Here record is always null Ext.form('MyPanel').getForm().loadRecord(record); } Ext.define('StudentView', { extend: 'Ext.form.Panel', id: 'MyPanel', alias: 'widget.StudentView', title: 'Student Information', resizable: false, collapsible: true, store:store, bodyPadding: '5', buttonAlign: 'center', border: false, trackResetOnLoad: true, layout: { type: 'vbox' }, defaults: { xtype: 'textfield', msgTarget: 'side', labelAlign: 'top', labelStyle: 'font-weight:bold' }, items: [{ xtype: 'fieldcontainer', layout: 'hbox', defaultType: 'textfield', width: '100%', fieldDefaults: { labelAlign: 'top', labelStyle: 'font-weight:bold' }, items: [{ fieldLabel: 'First Name', name: 'firstName', allowBlank: false }, { fieldLabel: 'Last Name', name: 'lastName', allowBlank:…
accepted answer: http://stackoverflow.com/a/29478877
score: 0
tagged with: http://stackoverflow.com/tag/json
has title: Populating EXT JS Store in a EXT form Panel
answer count: 1
tagged with: c#

http://stackoverflow.com/q/29474673
favorite count: 0
has title: Passing a number to a component
score: 50
has answer: http://stackoverflow.com/a/63230376
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29474674
type: Question
has body: I am trying to pass a number to a React component but it is getting parsed as string (jsfiddle). How do I make React understand that I am passing a number? Should I cast the string to a number in the component? var Rectangle = React.createClass({ render: function() { return {this.props.intValue + 10} {this.props.stringValue + 10} ; } }); React.render(<Rectangle intValue="10" stringValue="Hello" /> , document.getElementById('container'));
has answer: http://stackoverflow.com/a/29474674
possible better answer: http://stackoverflow.com/a/63230376
tagged with: reactjs
answer count: 2
downvote count: 0
upvote count: 50
tagged with: javascript

http://stackoverflow.com/a/29389877
score: 0
accepted answer of: http://stackoverflow.com/q/29387511
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29387511
type: Answer
has body: You can easily do that with the open source project jinqJs http://www.jinqJs.com See Fiddle var list1= [{"name":"name1","id":1},{"name":"name2","id":2},{"name":"name3","id":3},{"name":"name4","id":4}]; var list2= [1,3]; var result = jinqJs().from(list1).where(function(row){ return (list2.indexOf(row.id) &gt; -1); }).select(); OR this way //Use jsJinq.com open source library var list1= [{"name":"name1","id":1},{"name":"name2","id":2},{"name":"name3","id":3},{"name":"name4","id":4}]; var list2= [1,3]; var result = jinqJs().from(list1).join(list2).on('id').select(); document.body.innerHTML += '&lt;pre&gt;' + JSON.stringify(result, null, 4) + '&lt;/pre&gt;'; &lt;script src="https://rawgit.com/fordth/jinqJs/master/jinqjs.js"&gt;&lt;/script&gt;

http://stackoverflow.com/a/29383999
type: AcceptedAnswer
has body: Based on what you have so far, I'll make it like so : • Set a global array containing your walls (right now you are comparing with your function called Wall). • Set a global variable to define a grid size for your rows and your columns. • Make a call to checkIfPlayerMovingIntoWall() in the keydown handler. Add to this function an attribute to tell him where we want to go. If it's in a wall, return false and don't move. // Code goes here function Player(col, row) { this.isUpKey = false; this.isRightKey = false; this.isDownKey = false; this.isLeftKey = false; this.row = row; this.col = col; this.color = "#f00"; this.width = 25 this.height = 25 this.leftX = this.row; this.rightX = this.row + this.width; this.topY = this.col; this.bottomY = this.col + this.height; } function Wall(row, col) { this.row = row; this.col = col; this.color = "#000"; this.width = 25 this.height = 25 this.leftX = this.row; this.rightX = this.row + this.width; this.topY = this.col; this.bottomY = this.col + this.height; } function drawWalls(x,y) { walls.push( new Wall(x, y)); for (var b = 0; b &lt; walls.length; b++) { ctxWall.fillStyle = walls[b].color; // color the box that is on count which is being created by adding a new box to the count ctxWall.fillRect(walls[b].row * gridSize, walls[b].col * gridSize, walls[b].width, walls[b].height); // the box is a rectangle with a length of 50 and a width of 50 and when a new line is added time the row by 50 and col by 50 } } function checkIfPlayerMovingIntoWall(direction) { var playerPos = []; switch (direction) { case 'up': playerPos = [currentPlayer.col, currentPlayer.row - 1]; break; case 'down': playerPos = [currentPlayer.col, currentPlayer.row + 1]; break; case 'left': playerPos = [currentPlayer.col - 1, currentPlayer.row]; break; case 'right': playerPos = [currentPlayer.col + 1, currentPlayer.row]; break; default: playerPos = [currentPlayer.col, currentPlayer.row]; } for (i = 0; i &lt; walls.length; i++) { var Wall = walls[i]; if (playerPos[0] *…
type: Answer
accepted answer of: http://stackoverflow.com/q/29381324
score: 3
answers question: http://stackoverflow.com/q/29381324
downvote count: 0
upvote count: 3

http://stackoverflow.com/comment/50849024
has text: Have you found out yet or are you still waiting or do you not care anymore?
comment on: http://stackoverflow.com/q/29484465
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47002673
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29412409
score: 0
has text: ...and if I add more than two tags the images all disappear again.

http://stackoverflow.com/q/29449581
tagged with: javascript
tagged with: jasmine
has body: I'm new at Javascript, starting for the first time. I am trying to use Jasmine to test objects and their methods. I have the following code: function Monkey(x, y) { this.x = x; this.y = y; this.goteam = new function () { return x; }; } describe("Cool", function () { it("should work", function () { var monkey = new Monkey(1, 2); var value = monkey.goteam(); expect(value).toBe(1); }); }); The test Cool it should work gives me "[object Object] is not a function on the line value = monkey.goteam(); I have spent an hour reading tutorials and searching, but have come up dry no matter what I try. Any help is much appreciated.
has title: Can't Call Javascript Function in Jasmine
has comment: http://stackoverflow.com/comment/47065279
type: AnsweredQuestion
tagged with: oop
accepted answer: http://stackoverflow.com/a/29449702
type: Question
score: 0
has answer: http://stackoverflow.com/a/29449702
tagged with: function
answer count: 1

http://stackoverflow.com/comment/55165523
type: QuestionComment
comment on: http://stackoverflow.com/q/29375553
type: Comment
has text: Do you have an updated URL for your code?
score: 1

http://stackoverflow.com/q/29446534
has body: I have defined this routing rules in my app: .config(function($stateProvider, $urlRouterProvider) { // Ionic uses AngularUI Router which uses the concept of states // Learn more here: https://github.com/angular-ui/ui-router // Set up the various states which the app can be in. // Each state's controller can be found in controllers.js $stateProvider .state('signin', { url: '/sign-in', templateUrl: 'templates/sign-in.html', controller: 'SignInCtrl' }) .state('tab', { url: "/tab", abstract: true, templateUrl: "templates/tabs.html" }) .state('tab.map', { url: '/map', views: { 'tab-map': { templateUrl: 'templates/tab-map.html', controller: 'MapCtrl' } } }) .state('tab.mic', { url: '/mic', views: { 'tab-mic': { templateUrl: 'templates/tab-mic.html', controller: 'MicCtrl' } } }) .state('tab.camera', { url: '/camera', views: { 'tab-camera': { templateUrl: 'templates/tab-camera.html', controller: 'CameraCtrl' } } }) .state('tab.video', { url: '/video', views: { 'tab-video': { templateUrl: 'templates/tab-video.html', controller: 'VideoCtrl' } } }) .state('tab.message', { url: '/message', views: { 'tab-message': { templateUrl: 'templates/tab-message.html', controller: 'MessageCtrl' } } }) .state('tab.account', { url: '/account', views: { 'tab-account': { templateUrl: 'templates/tab-account.html', controller: 'AccountCtrl' } } }); // if none of the above states are matched, use this as the fallback $urlRouterProvider.otherwise('/sign-in'); In one of my controllers, I try to do this: $state.go('signin'); But this apparently redirects to 'tab.video'. Any idea of why this should be happening?
tagged with: javascript
has title: $state.go going to a different state from the specified one
score: 0
has comment: http://stackoverflow.com/comment/47060133
has comment: http://stackoverflow.com/comment/47059959
tagged with: angularjs
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/47080563
type: Question
tagged with: angular-ui-router

http://stackoverflow.com/comment/47007983
comment on: http://stackoverflow.com/q/29417959
has text: What PhantomJS version do you have? Please register to the [`onConsoleMessage`](http://phantomjs.org/api/webpage/handler/on-console-message.html), [`onError`](http://phantomjs.org/api/webpage/handler/on-error.html), [`onResourceError`](http://phantomjs.org/api/webpage/handler/on-resource-error.html), [`onResourceTimeout`](http://phantomjs.org/api/webpage/handler/on-resource-timeout.html) events. Maybe there are errors.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/58451552
type: AnswerComment
has text: @GreenAsJade: There is a way to set specs dynamically thru command line arguments. Protractor now processes cmd line args via optimist module which means that, in your config file, you can process command line arguments (via process.argv array) and then define the value of config.specs array dynamically.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29407351

http://stackoverflow.com/comment/46970393
comment on: http://stackoverflow.com/a/29396955
score: 0
type: AnswerComment
has text: yeap, i was looking for that, problem solved, thanks everybody
type: Comment

http://stackoverflow.com/comment/46953072
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29387368
has text: Using OnChange is fine. But, not focusing on the text box after clicking "ok".
type: QuestionComment

http://stackoverflow.com/q/29386262
has answer: http://stackoverflow.com/a/29386587
accepted answer: http://stackoverflow.com/a/29386587
upvote count: 4
has title: Passing props to parent in React JS
favorite count: 0
downvote count: 0
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/41386711
linked to: http://stackoverflow.com/q/22639534
has answer: http://stackoverflow.com/a/41386711
type: Question
has comment: http://stackoverflow.com/comment/46950903
tagged with: reactjs
answer count: 2
tagged with: javascript
score: 4
has body: Here I have a text field with a default number "3", and I want it to be updated when I input a value and click the button. Since, I'm updating the value in Child, I don't know how to pass props to Parent. var Game = React.createClass({ getInitialState: function() { return { input: 3 }; }, setSize: function() { //here it should update "input" this.setState({input: /* value from Child */ }) }, render: function() { return( ) } }); var Menu = React.createClass({ render: function() { return ( Try it ) } })
has comment: http://stackoverflow.com/comment/46950770

http://stackoverflow.com/comment/47180869
comment on: http://stackoverflow.com/a/29486702
type: AnswerComment
score: 0
type: Comment
has text: What is happening when you say its not working? Can you create a fiddle for the above ?

http://stackoverflow.com/a/29472425
answers question: http://stackoverflow.com/q/29472214
has body: Be more precise why you are trying to achive this and why. User can prevent javascript from executing in his browser, it is bad use it for these kind of security checks. User can also click on x button and not to confirm.
score: 0
type: Answer

http://stackoverflow.com/q/29428788
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47027641
favorite count: 0
has answer: http://stackoverflow.com/a/29428851
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47027722
has answer: http://stackoverflow.com/a/29428850
type: UnansweredQuestion
tagged with: php
has title: Stop form from refreshing but do post
has comment: http://stackoverflow.com/comment/47027650
downvote count: 0
score: 1
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/29428827
upvote count: 1
has body: I am working on a radio website, with a player, and a bunch of banners where you can click on to play a radio. The ideal behavior in my opinion would be that if i click on the button to play a radio, it'll jump to the player. But now its refreshing the page, and jumping to the top of the page. which is a bit annoying. I got an form with multiple buttons, those buttons contain the ID of the radio from the database. Then i got my player, without the form being posted, printing a default player, on submit of the form, it'll load all the information needed from the database with the ID that's being posted to the player. Now my question is, how to stop the form from refreshing and jumping back to the top of the page, while it does post to the player. if you guys need any code, i am wiling to post it here, but since it a shitload of code on my index.php i need a site where i can put this on.

http://stackoverflow.com/q/29423459
upvote count: 1
type: Question
tagged with: javascript
has body: I have this mustache template: {{#pages}} {{title}} {{/pages}} Now there are more than 50 pages but I want to be able to show only 10 pages. How to do that in mustache eg limiting the iterations to specific number something like: <-- 10 added here as example {{title}} {{/pages}} I searched the documentation but could not find the solution. Thanks for the help
answer count: 1
downvote count: 0
favorite count: 0
tagged with: mustache
has comment: http://stackoverflow.com/comment/47018505
accepted answer: http://stackoverflow.com/a/29423526
tagged with: mustache.php
type: AnsweredQuestion
has title: how to limit iterations in mustache
score: 1
has answer: http://stackoverflow.com/a/29423526

http://stackoverflow.com/comment/47013136
type: Comment
type: QuestionComment
has text: Looks fine at first glance. Have you tried putting in ".00" at the end of the price?
score: 1
comment on: http://stackoverflow.com/q/29410867

http://stackoverflow.com/a/29515002
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/29514412
upvote count: 1
has body: Because each time you attach a new image, the document.readyevent fires and attaches a new mousedown handler to the canvas. $.fn.canvasAreaDraw = function (options) { this.each(function (index, element) { init.apply(element, [index, element, options]); }); } var init = function (index, input, options) { var points, activePoint, settings; var $reset, $canvas, ctx, image; var draw, mousedown, stopdrag, move, resize, reset, resot, rightclick, record, previewImage; mousedown = function (e) { console.log('mousedown'); console.log(points); console.log(points.length); var x, y, dis, lineDis, insertAt = points.length; e.preventDefault(); if (!e.offsetX) { e.offsetX = (e.pageX - $(e.target).offset().left); e.offsetY = (e.pageY - $(e.target).offset().top); } x = e.offsetX; y = e.offsetY; points.splice(insertAt, 0, Math.round(x), Math.round(y)); activePoint = insertAt; $(this).on('mousemove', move); record(); return false; }; record = function () { $(input).val(points.join(',')); }; settings = $.extend({ imageUrl: $(this).attr('data-image-url') }, options); points = []; //I expected this to reset the points list!!!, but no.... if (!$(this).is('canvas')) { $canvas = $('&lt;canvas&gt;'); } else { $canvas = $(this); } ctx = $canvas[0].getContext('2d'); image = new Image(); $(this).prev().prev().val(''); resize = function () { $canvas.attr('height', image.height).attr('width', image.width); draw(); }; if (settings.imageUrl) { image.src = settings.imageUrl; } else { image.src = options; } $canvas.css({ background: 'url(' + image.src + ')' }); $(input).after('&lt;br&gt;', $canvas); $(document).ready(function () { alert('attaching a new mousedown event!'); $canvas.on('mousedown', mousedown); }); }; //LOAD IMAGE previewImage = function () { var aux = $(this).prev(); if (this.files &amp;&amp; this.files[0]) { var reader = new FileReader(); reader.onload = function (e) { aux.canvasAreaDraw(e.target.result); } reader.readAsDataURL(this.files[0]); } } $(document).ready(function () { $('.c…

http://stackoverflow.com/q/29457475
has title: Pass PHP array to js variable
tagged with: php
has comment: http://stackoverflow.com/comment/47079353
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47079329
has answer: http://stackoverflow.com/a/29457773
accepted answer: http://stackoverflow.com/a/29457773
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/47079377
has comment: http://stackoverflow.com/comment/47079366
score: 0
tagged with: arrays
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/47079308
has body: I know there are at least 100 pages regarding this issue, and I did try a lot of them still with no luck. It might be a very silly thing I might be missing some where but I'll grateful if someone can help me with it. This is the php code: &lt;?php $std_res = array(); $thumb_res = array(); $hashtag = $_GET['hashtag']; if ($hashtag != "") get_hashtag($hashtag); function get_hashtag($hashtag){ $access_token = ACCESS_TOKEN; $instagram = new Instagram(INSTA_CLIENT_ID, INSTA_CLIENT_SECRET, $access_token); try { $feed = $instagram-&gt;get('tags/'.$hashtag.'/media/recent'); }catch(InstagramApiError $e) { die($e-&gt;getMessage()); } $counter = 0; //$std_res = array(); //$thumb_res = array(); foreach($feed-&gt;data as $item){ $std_res[$counter] = $item-&gt;images-&gt;standard_resolution-&gt;url; $thumb_res[$counter] = $item-&gt;images-&gt;thumbnail-&gt;url; $counter++; } print_r ($std_res); //echo "&lt;script&gt; trial(); &lt;/script&gt;"; } ?&gt; Then in javascript I trying access the content of $std_res &lt;script type="text/javascript"&gt; //public function trial(){ var std_resol = &lt;?php echo htmlspecialchars(json_encode($std_res), ENT_NOQUOTES); ?&gt;; //var std_resol = &lt;?php echo json_encode($std_res ); ?&gt;; //var std_resol = &lt;?php echo '["' . implode('", "', $std_res) . '"]' ?&gt;; for(var i=0;i&lt;20;i++){ alert(std_resol[i]); } &lt;!-- //var viewer = new PhotoViewer(); //viewer.add('images/1.jpg'); //viewer.add('images/2.jpg'); //viewer.add('images/3.jpg'); //--&gt; //} &lt;/script&gt; I have tried lots of methods trying to access the array in javascript, it always throws a alert with undefined. This is an example of the result in $std_res: Array ( [0] =&gt; https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/e15/11098632_1592161574372304_946830181_n.jpg [1] =&gt; https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/e15/11137792_375372262654484_983054129_n.jpg )

http://stackoverflow.com/q/29496290
tagged with: css
has title: Open CSS3 / HTML5 modal dialog relative to mouse position
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29496528
tagged with: javascript
has body: I created a modal dialog using CSS3, it works perfectly. But my site is responsive and the modal has to appear on several items inside an iframe (see here: http://labs.tageswoche.ch/interaktives/filmPortraits/ and here: http://master.tw.felix.sourcefabric.net/de/2014_11/international/652865/Drei-Jahre-B%C3%BCrgerkrieg-und-kein-Ende-in-Sicht.htm). In the iframe it doesnt work, but it works as expected on the real site. The modal dialog is implemented on the first two pictures. And here the code: .modalDialog { position: fixed; font-family: Arial, Helvetica, sans-serif; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.8); z-index: 99999; opacity:0; -webkit-transition: opacity 400ms ease-in; -moz-transition: opacity 400ms ease-in; transition: opacity 400ms ease-in; pointer-events: none; } .modalDialog:target { opacity:1; pointer-events: auto; } .modalDialog &gt; div { width: 400px; position: relative; margin: 10% auto; padding: 5px 20px 13px 20px; border-radius: 10px; background: #fff; background: -moz-linear-gradient(#fff, #999); background: -webkit-linear-gradient(#fff, #999); background: -o-linear-gradient(#fff, #999); } .close { background: #606061; color: #FFFFFF; line-height: 25px; position: absolute; right: -12px; text-align: center; top: -10px; width: 24px; text-decoration: none; font-weight: bold; -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px; -moz-box-shadow: 1px 1px 3px #000; -webkit-box-shadow: 1px 1px 3px #000; box-shadow: 1px 1px 3px #000; } .close:hover { background: #00d9ff; } Here is a jsfiddle I used to implement the modal dialog: http://jsfiddle.net/kumarmuthaliar/GG9Sa/1/ What i want to achieve is that the modal appears where the mouse click was (or more or less) so that also on mobile devices on the last images of the wall. Right now the modal appears on top. How can I implement this? I have no clue.
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/47217061
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29530478
has text: @AdamThomson see my update answer. You can forcefully hide it using targetted css but remember it can affect other areas as well. I have check it safe here on this page but you can make it more targetted so it does not affect other areas.

http://stackoverflow.com/comment/47004905
has text: Unrelated to the question, but calendar is spelled with an a.
score: 0
comment on: http://stackoverflow.com/q/29415950
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47112872
type: AnswerComment
has text: @mohamedrias `getElementsbyClassName()` returns an `HTMLCollection` and not a `NodeList`
type: Comment
comment on: http://stackoverflow.com/a/29475431
score: 0

http://stackoverflow.com/q/29386988
tagged with: javascript
tagged with: ui-select
upvote count: 3
answer count: 1
has body: Using Angular and multi ui-select, the select box shows an unwanted "extra" box (see picture). How can I remove this? Code: {{$item.name}} {{template.name}}
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/46952372
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46952626
score: 3
has title: how to remove unwanted box in ui-select?
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/30814229

http://stackoverflow.com/a/29434523
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29431649
downvote count: 0
score: 1
has body: Without seeing your HTML, the best guess is: you're not going to be able to do this. The issue is that, once you move your mouse into an iframe that has an origin different from your page, mouse events will not fire out to your script, and therefore you won't be able to update the position of your iframe. DEMO: Note how the mouse coordinates stop updating once you move your mouse pointer inside the iframe. function mouseMoveListener() { var outputX = document.querySelector('#mouseX'); var outputY = document.querySelector('#mouseY'); return function(ev) { outputX.innerText = ev.clientX; outputY.innerText = ev.clientY; }; } function test(ev) {console.log('ev::', ev.clientX);} document.addEventListener('mousemove', mouseMoveListener()); Mouse position: , If you don't need to let your users interact with the content of the iframe, you can cheat this by overlaying a transparent div on top of the iframe. That prevents mouse events from "falling through" to the iframe beneath them, while still showing the content of the iframe. DEMO: But note that the iframe doesn't allow you to scroll, since mouse events (like clicks on the scroll bar or wheel events) are captured by the overlay div. function mouseMoveListener() { var outputX = document.querySelector('#mouseX'); var outputY = document.querySelector('#mouseY'); return function(ev) { outputX.innerText = ev.clientX; outputY.innerText = ev.clientY; }; } function test(ev) {console.log('ev::', ev.clientX);} document.addEventListener('mousemove', mouseMoveListener()); #iframe-wrapper { position: relative; } #iframe-wrapper iframe { position: relative; z-index: 0; } #iframe-wrapper .overlay { position: absolute; background: transparent; top: 0; left: 0; bottom: 0; right: 0; z-index: 2; } Mouse position: , However, if you're displaying a YouTube video, it's unlikely this will satisfy your requirements, since user interaction is a key part of the viewing experience.

geojson
tags question: http://stackoverflow.com/q/29392414
tag name: geojson
tags question: http://stackoverflow.com/q/29498069
tags question: http://stackoverflow.com/q/29381952
type: Tag

http://stackoverflow.com/q/29476072
score: 0
answer count: 2
tagged with: angularjs
type: UnansweredQuestion
tagged with: php
tagged with: timeline.js
has body: I am trying to embed a timeline, using an Angular directive, which loads data from a php-generated JSON file (timeline.json.php). var app = angular.module("timeline", []); app.controller('timelineCtrl', ['$scope', '$http', function ($scope, $http) { $http.get('timeline.json.php').success(function(data) { $scope.results = data; console.log($scope.results); }); }]); app.directive('timelineJs', function ($timeout) { return { restrict: 'A', link: function (scope, elem, attrs) { postpone = $timeout(function() { createStoryJS({ width: '100%', hash_bookmark: true, height: '600', source: scope.results, embed_id: 'my-timeline', css: 'http://cdn.knightlab.com/libs/timeline/latest/css/timeline.css', js: 'http://cdn.knightlab.com/libs/timeline/latest/js/timeline-min.js' }); }, 0); } } }); The timeline does not load the PHP file, even though it works when loading it without the plugin, or entering it directly as the Source (instead of 'scope.results'). I am also able to load a normal JSON file without issue, and my generated JSON validates perfectly. I need to be able to use the json.php file. Thanks.
tagged with: http://stackoverflow.com/tag/json
has title: TimelineJS and AngularJS
has answer: http://stackoverflow.com/a/29476773
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/31122114

http://stackoverflow.com/q/29436653
has answer: http://stackoverflow.com/a/29436737
accepted answer: http://stackoverflow.com/a/29436737
upvote count: 1
has title: Why does .textContent add unexpected content to the document body
type: Question
has comment: http://stackoverflow.com/comment/47042235
has answer: http://stackoverflow.com/a/29436733
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/29436733
has body: I was recently playing around and noticed some strange behaviour involving the .textContent property. // I understand that .innerHTML should be used here. document.body.textContent += 'string&lt;br /&gt;'; document.body.textContent += 'string&lt;br /&gt;'; My question is not how to prevent this from happening, the question is: What is causing the code to be added to the document body, why is this happening only for the first .textContent and not the second? Also note that string&lt;br /&gt; is being added to the body. Other curiosities: This behaviour is reproducible in firefox and chrome, both in code snippits and normal web pages but not in FIDDLE
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/47209364
type: QuestionComment
comment on: http://stackoverflow.com/q/29527576
has text: Why do you expect the counter to ever increase?
score: 0
type: Comment

http://stackoverflow.com/comment/47193987
type: Comment
comment on: http://stackoverflow.com/a/29519337
has text: I tried adding this script to my result.html page but when I click submit on the webstorage.html page, the next page still has empty fields.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47180639
has text: I'm not expert at this. Ive googled many site and apply some sample to solve my matters,, but I couldn't get what I want..
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29512057

http://stackoverflow.com/comment/47103186
type: Comment
has text: Thats correct, its common practice to include/require a common php file at the top of each page.. something like header.php and have that contain items like session_start(). You are correct, you need to have this called in a script before you can access them
type: AnswerComment
comment on: http://stackoverflow.com/a/29470701
score: 0

http://stackoverflow.com/q/29447286
score: 0
has body: everyone.I want my hidden_div img to change after clicking prev. or next.Is it possible using this JS code? prev next function show(element) { var hidden = document.getElementById("hidden_div"); var imgURL = element.style.backgroundImage.replace('url(','').replace(')',''); var imgElement = " " hidden.innerHTML = imgElement; }; var step=1; var total=3; function next(x){ var image=document.getElementById("hidden_div"); step=step+x; if(step > total){step=1;} if(step <1 ){step=total;} image.src= 'css/images1/img/img " + step + ".jpg'; };
has comment: http://stackoverflow.com/comment/47062882
has answer: http://stackoverflow.com/a/29448614
accepted answer: http://stackoverflow.com/a/29448614
has title: Changing images when next or previous are clicked
possible better answer: http://stackoverflow.com/a/29447461
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47061880
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/47062650
has comment: http://stackoverflow.com/comment/47063075
tagged with: javascript
has answer: http://stackoverflow.com/a/29447461

http://stackoverflow.com/comment/47135443
type: AnswerComment
has text: the if and the else is not recognized even if msg == ok but thanks anyway i'll take note for future use
comment on: http://stackoverflow.com/a/29487819
type: Comment
score: 0

http://stackoverflow.com/comment/46946756
type: Comment
has text: split them and use `$myArray = explode(',', $myString);`
type: AnswerComment
comment on: http://stackoverflow.com/a/29383240
score: 0

http://stackoverflow.com/comment/47123676
score: 0
type: Comment
has text: It still has an initial jerk upward or downward. But I'm sure it will do! Thank's again shikkediel !
type: AnswerComment
comment on: http://stackoverflow.com/a/29466789

http://stackoverflow.com/q/29459522
has answer: http://stackoverflow.com/a/29460342
upvote count: 2
accepted answer: http://stackoverflow.com/a/29460342
duplicate of: http://stackoverflow.com/q/632475
type: AnsweredQuestion
has body: var str = '"testStr, 10.0 pl",NA,4.6'; var rawLine = str.split(','); console.log(rawLine[0]); console.log(rawLine[1]); console.log(rawLine[2]); It is giving result as: ""testStr" "10.0 pl"" "NA" Where I am looking for below result: "testStr, 10.0 pl" "NA" "4.6"
possible better answer: http://stackoverflow.com/a/29460526
has title: Split string in javascript by skipping split character
score: 1
has answer: http://stackoverflow.com/a/29460526
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29459874
tagged with: javascript
has comment: http://stackoverflow.com/comment/47085123
has comment: http://stackoverflow.com/comment/47082995
linked to: http://stackoverflow.com/q/632475
answer count: 3
favorite count: 0
has comment: http://stackoverflow.com/comment/47083636

http://stackoverflow.com/a/29418869
has comment: http://stackoverflow.com/comment/47009624
has comment: http://stackoverflow.com/comment/47009678
has body: try to add the attribute onkeydown = "cancelBack()" also on the textbox? if you need to do it in javascript : $(":text[readonly]").keydown(function() { cancelBack(); });
has comment: http://stackoverflow.com/comment/47010028
score: 0
accepted answer of: http://stackoverflow.com/q/29418814
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29418814
type: Answer
has comment: http://stackoverflow.com/comment/47010820
has comment: http://stackoverflow.com/comment/47010152

http://stackoverflow.com/comment/137062335
comment on: http://stackoverflow.com/a/30425462
score: 1
type: AnswerComment
has text: This solution is not correct anymore. On the given and valid documentation, there are no "annotations" prop.
type: Comment

http://stackoverflow.com/comment/47088132
type: Comment
type: QuestionComment
has text: Are you asking us to debug the code you wrote?
comment on: http://stackoverflow.com/q/29462199
score: 2

http://stackoverflow.com/comment/46928090
type: QuestionComment
has text: Did you mean you want to access the attributes in the [link](https://docs.angularjs.org/guide/directive#creating-a-directive-that-manipulates-the-dom) function? Why do they need to be in the controller?
comment on: http://stackoverflow.com/q/29373610
type: Comment
score: 1

http://stackoverflow.com/a/29486871
type: Answer
answers question: http://stackoverflow.com/q/29486577
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47133373
has body: JavaScript has arrays: var anArray = [ 1, 2, 3, 4 ]; and associative arrays (also known as maps): var anAssociativeArray = { first: "No. 1", second: 2, somethingElse: "Other" }; both of these data structures can be accessed via []: anArray[3] // will get the element of the array in position 3 // (starting counting frrom 0). anAssociativeArray['first'] // will get the element of the associative array with the // key 'first'. Associative arrays can also be accessed via the .key notation: anAssociativeArray.first // will also get the property with key 'first'. The . notation can be used if you know the key you want to access but if you want to dynamically select which key then you need to use the [] notation. var whichOptionToPick = 'somethingElse'; var value = anAssociativeArray[ whichOptionToPick ]; // will get the value "Other".
upvote count: 1

http://stackoverflow.com/comment/47171255
type: Comment
has text: If you could, please edit this typo in your answer: What `this` refers to depends on how the function is called, which you shouldn't [=> don't] show.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29377423

http://stackoverflow.com/comment/47101149
type: Comment
has text: Yep, any idea why I need to declare "$scope.selected_file = {'id' : ''};" inside function and not anywhere in controller scope .. say first line in controller. It doesn't work in the latter case.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29467842

http://stackoverflow.com/comment/46951910
comment on: http://stackoverflow.com/a/29385532
type: Comment
has text: @ShaikRasool why do you think I know it?
score: 0
type: AnswerComment

http://stackoverflow.com/q/29435947
tagged with: debugging
tagged with: javascript
score: 0
tagged with: this
answer count: 1
has title: Why "This" does act as a private member in a javascript function in this case?
has answer: http://stackoverflow.com/a/29436146
accepted answer: http://stackoverflow.com/a/29436146
tagged with: private-members
type: AnsweredQuestion
has body: I try to call a public member in a function, and it appears as 'undefined' however the function works... -- EDIT -- As pointed out by @Shane Voisard this is acting as a member of the parent of my function. Solution is to give a name to the function (as Shane underlined in answer). ... or to attach the function to a name : MySite.Public.Logo = { inject : function(target){ this.name = 'Logo'; ... } } In console : MySite.Public.Modules.Logo.name; //return "Logo" and so on... thx SO -- /EDIT -- My file system is like this root folder : -rw-r--r-- 1 www-data www-data 1921 avril 3 17:31 0.js drwxr-xr-x 9 www-data www-data 4096 avril 3 17:37 public public folder : -rw-r--r-- 1 www-data www-data 214 avril 3 17:37 0.js drwxr-xr-x 2 www-data www-data 4096 avril 3 17:40 modules drwxr-xr-x 2 www-data www-data 4096 avril 3 17:40 factories drwxr-xr-x 2 www-data www-data 4096 avril 3 17:40 functions drwxr-xr-x 2 www-data www-data 4096 avril 2 22:22 singleton module folder : -rw-r--r-- 1 www-data www-data 28 mars 31 06:07 1.js -rw-r--r-- 1 www-data www-data 348 avril 3 17:51 logo.js Loading is made in this order : root/0.js initializes MySite = {} public/0.js initializes MySite.Public = {} module/1.js initializes MySite.Public.Modules = {} When all others needed files are loaded, public/0.js calls MySite.Public.Modules.Logo(), which has been initialized when logo.js has been loaded into the browser. The function works, I can get a return from logo.js. But none of the this members are publicly accessibles... Content of logo.js : MySite.Public.Modules.Logo = function(){ this.name = 'Logo'; this.build = function(){ var logo = MySite.Public.Factories.HTML.make('logo'); return logo; }; this.inject = function(target){ var logo = this.build(); var target = MySite.Public.Functions.ToolBox.getElementByName(target); //getElementByName is a custom function target.appendChild(logo); }; } In the console : MySite.Public.Modules.Logo.inject('body'); // undefined is not a function... MySite.Public…
type: Question

http://stackoverflow.com/a/29387134
answers question: http://stackoverflow.com/q/29386906
type: Answer
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: The thing is, you can't always be certain that your direct parent, is the one you want to call. It's easy to break your code with that kind of anti-pattern. And you must agree that $scope.$parent.$parent.$parent.doSomething(); Is pretty ugly. Instead you can $emit an event upwards, now it doesn't matter how far up the chain your parent controller is, as long as it is listening and reacting. This gives you nice loose coupling between controllers, and just acts like a message pump. The same goes for $broadcast, just downwards instead, and here I would argue that it is even more important.
score: 1
accepted answer of: http://stackoverflow.com/q/29386906

http://stackoverflow.com/q/29405487
type: Question
tagged with: javascript
tagged with: parse-cloud-code
has comment: http://stackoverflow.com/comment/46985751
has body: I have a class Store that has a relation itemsInStore that contains multiple Item objects on Parse. I'm currently trying to Parse Cloud Code to retrieve all Items in a Store, but don't know what a common practice for this is. In particular, I couldn't find articles that really answer my question here, e.g. how the query should be. Parse.Cloud.define("retrieveNearbyLocationsAndItemsWithCurrentLocation", function(request, response) { var Store = Parse.Object.extend("Store"); var store = new Store(); var query = new Parse.Query(Store); var userGeoPoint = new Parse.GeoPoint(request.params.lat, request.params.long); query.near("geopoint", userGeoPoint); query.limit(1); query.find({ success: function(httpResponse) { response.success(httpResponse[0].get("itemsInStore")); console.log(httpResponse[0].get("itemsInStore")); }, error: function(httpResponse) { response.error("Error: retrieveNearbyLocationsAndItemsWithCurrentLocation"); } }); }); Console log would return {"__type":"Relation","className":"Item"} In order to dig into this Relation and retrieve all Item objects in it, what should be done next?
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47002352
has comment: http://stackoverflow.com/comment/46987561
favorite count: 0
tagged with: parse-platform
has title: How can I retrieve a list of objects from a class relation?
has answer: http://stackoverflow.com/a/29414853
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/29414853

http://stackoverflow.com/a/29407655
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29407327
has body: name 2 will change as you type in the input box. You can see this by adding {{name2}} to your html the controller will not see the change in name2 unless you watch for it, you can do this using $watch, add this to your controller $scope.$watch('name2', function() { console.log($scope.name2); });

http://stackoverflow.com/comment/47171207
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29490128
has text: routing is fine, the exact issue is that once I hit from two windows of same browser it hangs because of the this 5 second delay, however when I hit the same thing from different browsers (incognito mode) it works fine.

http://stackoverflow.com/q/29410046
linked to: http://stackoverflow.com/q/14567354
has body: i've looked around a bit but most of the solutions are specific to the links background, and not the div's background. I'm trying to understand how to image swap backgrounds for an entire div by hovering over a link in that specific div. By visiting this page: http://splash.org/, and scrolling down to "Today we served" section, you can hover over the content there and the background image will change. Thanks!
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29410328
tagged with: background-image
tagged with: image
accepted answer: http://stackoverflow.com/a/29410328
type: Question
answer count: 1
tagged with: javascript
has title: Change Div background image and content on link hover?
has comment: http://stackoverflow.com/comment/46993863
has comment: http://stackoverflow.com/comment/46993492
score: 0
tagged with: css

http://stackoverflow.com/comment/46943885
type: QuestionComment
score: 0
has text: yes.actually, and send automatically when the page loads.
type: Comment
comment on: http://stackoverflow.com/q/29382304

http://stackoverflow.com/a/59946879
upvote count: 1
downvote count: 0
has body: 1) first remove cordova cmd npm uninstall -g cordova 2) After that remove ionic npm uninstall -g ionic
type: Answer
score: 1
answers question: http://stackoverflow.com/q/29428929

http://stackoverflow.com/a/46997022
answers question: http://stackoverflow.com/q/29454824
score: 17
upvote count: 17
downvote count: 0
has body: This worked for me although I have never found it in the docs. Should have been published but it works. Try: moment(currentTime).format("hh:mm"));or var currentTime = moment(); console.log("CURRENT TIME: " + moment(currentTime).format("hh:mm"));
type: Answer

http://stackoverflow.com/comment/47039366
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29434317
has text: I know THANK YOU should not be used as a comment in SO,but I will do so if i din't do it its a shame for me.THANK YOU sir I really respect you patience for helping a dumb stranger.May God Bless you..My wishes :)

http://stackoverflow.com/comment/47171028
type: AnswerComment
comment on: http://stackoverflow.com/a/29507166
has text: Only if vanilla JS had something to do that... :P
type: Comment
score: 0

http://stackoverflow.com/a/32488827
answers question: http://stackoverflow.com/q/29473426
has comment: http://stackoverflow.com/comment/52839097
has comment: http://stackoverflow.com/comment/60349188
has comment: http://stackoverflow.com/comment/52865689
score: 45
type: Answer
has body: Here's a somewhat cleaner approach that relies on response.ok and makes use of the underlying JSON data instead of the Promise returned by .json(). function myFetchWrapper(url) { return fetch(url).then(response =&gt; { return response.json().then(json =&gt; { return response.ok ? json : Promise.reject(json); }); }); } // This should trigger the .then() with the JSON response, // since the response is an HTTP 200. myFetchWrapper('http://api.openweathermap.org/data/2.5/weather?q=Brooklyn,NY').then(console.log.bind(console)); // This should trigger the .catch() with the JSON response, // since the response is an HTTP 400. myFetchWrapper('https://content.googleapis.com/youtube/v3/search').catch(console.warn.bind(console));
upvote count: 45
downvote count: 0

http://stackoverflow.com/comment/46969191
type: QuestionComment
type: Comment
score: 0
has text: you can use the interval option with the methods start() and stop()
comment on: http://stackoverflow.com/q/29396077

http://stackoverflow.com/a/29422947
has comment: http://stackoverflow.com/comment/47017404
has body: var count = 0; var length = data.length; for (var x = 0; x &lt; length; x++) { if (data[x].code == 20) count++; } console.log('Final count: ' + count); Probably something like that. If you want a function you could use this: var getCount = function(data, val) { var count = 0; var length = data.length; for (var x = 0; x &lt; length; x++) { if (data[x].code == val) count++; } return count; } Then call it like this: var count = getCount(data, 20); // should return 3
score: 0
has comment: http://stackoverflow.com/comment/47017461
has comment: http://stackoverflow.com/comment/47017904
has comment: http://stackoverflow.com/comment/47017683
answers question: http://stackoverflow.com/q/29422792
has comment: http://stackoverflow.com/comment/47017826
type: Answer
has comment: http://stackoverflow.com/comment/47017698

http://stackoverflow.com/q/29455909
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29455960
has title: Input Type Button Go Back with History and Back to Top
accepted answer: http://stackoverflow.com/a/29456487
has answer: http://stackoverflow.com/a/29455960
has body: I'm very new to JavaScript. I'm trying to make an HTML button to do 2 things (at the same time) when clicked: 1) Go back while retaining user inputs (there is a form in the previous page). 2) Go to the top of the previous page. Here is what I have: &lt;input type="button" value="Go Back" onclick="javascript:history.go(-1); location.href='#'" /&gt; UPDATE: &lt;script type="text/javascript"&gt; function goBack() { window.history.go(-1); window.location.href = "#"; } &lt;/script&gt; &lt;input type="button" value="Go Back" onclick="goBack()"&gt; The button does not do anything when clicked though.
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/2638292
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29456487

http://stackoverflow.com/comment/46982647
has text: @David yes. This was for demonstration purposes.
comment on: http://stackoverflow.com/q/29403655
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29386879
has comment: http://stackoverflow.com/comment/46952093
type: Question
has title: Content not appear in body
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29387535
score: 0
has comment: http://stackoverflow.com/comment/46952001
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46952080
has comment: http://stackoverflow.com/comment/46951926
has body: I have a file a.html, which has the following content: &lt;script&gt; var x=document.URL.substring(document.URL.indexOf('#')+1); document.write(x); alert(document.body.innerHTML); &lt;/script&gt; &lt;body&gt; &lt;/body&gt; When I am browsing to a.html#somevalueh;alert(1)&lt;/script&gt;, why only "somevalueh;alert(1)" but not the &lt;/script&gt; portion appeared inside the body? I am using chrome btw.

http://stackoverflow.com/comment/46930708
type: AnswerComment
comment on: http://stackoverflow.com/a/29374780
score: 0
type: Comment
has text: This makes sense, kinda. Ill update the question with all the code

http://stackoverflow.com/comment/47055518
type: Comment
has text: RETURN: Uncaught ReferenceError: friends is not defined
type: AnswerComment
comment on: http://stackoverflow.com/a/29443826
score: 0

http://stackoverflow.com/q/29444932
has title: dynamic adding of checkbox and input box jquery
has comment: http://stackoverflow.com/comment/47057409
has answer: http://stackoverflow.com/a/29444995
tagged with: jquery
has comment: http://stackoverflow.com/comment/47057249
has answer: http://stackoverflow.com/a/29445064
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47057337
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/29444969
type: Question
has comment: http://stackoverflow.com/comment/47057901
has comment: http://stackoverflow.com/comment/47057722
tagged with: javascript
has comment: http://stackoverflow.com/comment/47057795
has body: for (var i = 0; i < Object.keys(value.material).length; i++) { var newRow = $(' '); newRow.append(' Others Delete '); } $("#tbl > tbody > tr:last").after(newRow); Supposed i have this kind of dynamic adding how can i prevent the first loop from adding the delete button. The reason for this is because the default screen has one row without the button and when i dynamically add these new rows i delete the first one. So i need the first dynamically added row to have no button so that it will look like i only added button and i did not delete the first one.
has comment: http://stackoverflow.com/comment/47057279
has comment: http://stackoverflow.com/comment/47057996
score: 0
has answer: http://stackoverflow.com/a/29445491
has comment: http://stackoverflow.com/comment/47057590

http://stackoverflow.com/comment/47178461
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29498111
has text: I used Python but the problem persists!

http://stackoverflow.com/a/29540691
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29519556
answers question: http://stackoverflow.com/q/29519556
upvote count: 1
type: AcceptedAnswer
has body: Your jQuery code has 2 main issues: In your first selector (the one you are binding your click event to), you have a misspelling. .nav.navpills.nav-stacked .forclick should be .nav.nav-pills.nav-stacked .forclick. Your find jQuery function limits the search to the descendants of your this element. You can see that the elements you want to target are siblings. Just the selector will work in this case. jQuery $('.nav.nav-pills.nav-stacked .forclick').click(function() { $('.nav.nav-pills.nav-stacked .hiden').slideToggle('slow'); }); Live example http://jsfiddle.net/6wazs6xj/
type: Answer

http://stackoverflow.com/a/29443449
score: 1
has body: remove this line margin-left: -3em; in your .grid-wrap class .grid-wrap { margin-left: -3em; //remove this line /* the same as your gutter */ overflow: hidden; clear: both; } add this css .your-class { padding-left: 2em; } SEE DEMO
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/47054539
answers question: http://stackoverflow.com/q/29443381
downvote count: 0

http://stackoverflow.com/comment/47171544
comment on: http://stackoverflow.com/q/29507384
type: Comment
type: QuestionComment
has text: this is also not working var d = new Date(); datetext=datetext+" "+d.setHours(d.getHours()+5)+": "+d.getMinutes();
score: 0

http://stackoverflow.com/comment/47214230
comment on: http://stackoverflow.com/a/29513138
type: AnswerComment
score: 0
type: Comment
has text: i would like to know if there is a way to do track by `ID` instead of text. Is it possible to match it via `option label not option value`. Option value could be value of cities `ID`.

http://stackoverflow.com/comment/47197790
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29518301
has text: What is the value of `$productOptions`? What's the error that `json_decode` produces (if any, see http://php.net/manual/en/function.json-last-error.php)?

flux
tag name: flux
tags question: http://stackoverflow.com/q/29378717
tags question: http://stackoverflow.com/q/29470583
tags question: http://stackoverflow.com/q/29416208
type: Tag

http://stackoverflow.com/comment/47181146
type: AnswerComment
has text: When I do the console.log($scope.employees[nextIndex]) it returns undefined. I have installed ng-inspector but do not have a great understanding. Apologies I am still rather new to AngularJS so I am still picking things up as I am developing
type: Comment
comment on: http://stackoverflow.com/a/29509318
score: 0

http://stackoverflow.com/a/29513138
type: Answer
downvote count: 0
score: 1
has body: On init you should find a value of the city form right side text ng-init="rawSelect = (vm.cities| filter: {Text: city.Text})[0]" then Also do change track by for selecting option on init it should be track by po.Text Markup {{city.Text}} Match later {{rawSelect}} Working Plunkr Hope this could help you, Thanks.
has comment: http://stackoverflow.com/comment/47214230
has comment: http://stackoverflow.com/comment/47182245
has comment: http://stackoverflow.com/comment/47216192
answers question: http://stackoverflow.com/q/29512410
has comment: http://stackoverflow.com/comment/47215164
upvote count: 1
has comment: http://stackoverflow.com/comment/47183126
has comment: http://stackoverflow.com/comment/47182196

http://stackoverflow.com/comment/55972081
type: AnswerComment
comment on: http://stackoverflow.com/a/34073811
type: Comment
has text: Damn, it seemed to work well on Firefox for different domain too, but only [because of caching](http://shouldiblamecaching.com/). Sorry Chrome for blaming you for not doing it well. Then this answer becomes somewhat superfluous. I will think if I can improve it someway, or otherwise I may delete it.
score: 0

http://stackoverflow.com/q/29517467
has answer: http://stackoverflow.com/a/42219104
has comment: http://stackoverflow.com/comment/47193553
favorite count: 0
has comment: http://stackoverflow.com/comment/47192489
has comment: http://stackoverflow.com/comment/47190529
type: UnansweredQuestion
score: 11
linked to: http://stackoverflow.com/q/5690269
tagged with: cross-browser
has comment: http://stackoverflow.com/comment/47190344
linked to: http://stackoverflow.com/q/14969315
has answer: http://stackoverflow.com/a/29517834
downvote count: 0
has body: Pretty straight-forward, I'm developing an MVC5 application and have noticed (lately) that my Browser appears to be caching the JavaScript code I have on the view within @section Scripts { }. Currently I am developing with Chrome and I have tried CTRL+F5 &amp; CTRL+SHFT+R which reloads the page, but the alert() I uncommented within the javascript code is still rendering as commented. I also tried going to my localhost through Incognito Mode as well as other Browsers (Firefox, IE) and am getting the same behavior. This is my /Home/Index.cshtml View, which is the default View which loads when the application starts. I have also tried adding some extra HTML text into the page and again the new code is not taking effect/showing. My current Chrome version is Version 41.0.2272.118 m if anyone has any ideas what might be going on? UPDATE: I have gone under the Developer Tools => General Settings in Chrome and checked [X] Disable cache (while DevTools is open) and then repeatedly (with DevTools still open) tried CTRL+SHFT+R and CTRL+F5 with the same results of before where my changes are not taking effect. UPDATE 2: With DevTools open I have also held the Refresh button down and tried Normal/Hard/and Empty Cache &amp; Hard Reload options all with the same result. For simplicity of testing I added an alert in the below to dispaly as soon as the page loads (and currently no alert comes up): $(document).ready(function () { alert("Test"); // Other Code/Functions -- No Error showing in Console });
has answer: http://stackoverflow.com/a/29519141
type: Question
tagged with: browser-cache
has comment: http://stackoverflow.com/comment/47190312
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/47193742
upvote count: 11
has title: Force browser to refresh javascript code while developing an MVC View?
tagged with: browser
answer count: 3
has comment: http://stackoverflow.com/comment/47193350

quickbase
tags question: http://stackoverflow.com/q/29386945
type: Tag
tag name: quickbase

http://stackoverflow.com/comment/47146256
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29493262
score: 1
has text: @lyjackal both Underscore and Lodash are pretty smart if you're passing an object to `reduce()`

http://stackoverflow.com/q/29450756
has answer: http://stackoverflow.com/a/29450981
tagged with: css
has title: custom selectbox bug with bootstrap modal box
downvote count: 0
score: 1
type: AnsweredQuestion
type: Question
has body: I'm trying to use a custom select box with some different css and search feature in a bootstrap modal box. This is simply the code for select: United States United Kingdom Afghanistan Aland Islands Albania Algeria The question is, the select looks just fine when used outside of the modal box. However, when used in a modal box, everything's width for select is like 10px. What am I missing? Any help is appreciated. Edit: I just tried setting it's width by jquery, didn't work.
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/29450981
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46982669
comment on: http://stackoverflow.com/q/29403655
score: 0
type: Comment
type: QuestionComment
has text: Exactly the same - nope.

http://stackoverflow.com/comment/47090700
type: AnswerComment
has text: **I don't want to to copy browser features, I want to invoke them!** But just logging the stack explicitly is a good backup plan if what I want turns out to be impossible. Thanks for pointing out the possibility.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29463767

http://stackoverflow.com/comment/47183222
has text: Also, I would say you need to format your question better. Why you use a quote formatting to talk about the issue yourself? :|
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29513750

http://stackoverflow.com/comment/47169594
type: Comment
has text: Why do you have the `show_header` function directly in your code in the first place? I thought the whole point was that it would be in `header.php`, so it could be loaded by all the different pages.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29441660

http://stackoverflow.com/comment/47139761
comment on: http://stackoverflow.com/a/29489698
type: AnswerComment
has text: passid.focus(); puts focus back on the password control
type: Comment
score: 1

http://stackoverflow.com/a/29436428
has comment: http://stackoverflow.com/comment/47041765
has body: You need a closure, i keeps changing because og is async Thing.find(function(err, result) { for (var i = 0; i &lt; result.length; i++) { if ( result[i].attachment &amp;&amp; result[i].attachment.embed_type == 'vine') { (function(res) { og(res.attachment.embed_url, function(err, meta) { res.attachment.preview_image = meta.image; res.save(); }); }(result[i])); } } });
has comment: http://stackoverflow.com/comment/47041833
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47041743
type: Answer
has comment: http://stackoverflow.com/comment/47041714
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47041963
has comment: http://stackoverflow.com/comment/47042007
accepted answer of: http://stackoverflow.com/q/29436354
has comment: http://stackoverflow.com/comment/47041793
answers question: http://stackoverflow.com/q/29436354

http://stackoverflow.com/q/29373552
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has body: I am attempting to use Bootstrap's Collapse feature with custom icons from font-awesome. I am able to get the collapse to work but the problem I am having is that all of the icons are being triggered with Jquery's click, I want to scale this because at any given time the amount of "containers" can change. Any suggestions are appreciated. $(document).ready(function () { $faChevronDown = $('.fa-chevron-down'); var z = 0; $faChevronDown.click(function () { if (z == 0) { turnUp(); z++; } else { turnDown(); z = 0; } }); }); function turnUp() { $faChevronDown.removeClass('fa-chevron-down'); $faChevronDown.addClass('fa-chevron-up'); }; function turnDown() { $faChevronDown.removeClass('fa-chevron-up'); $faChevronDown.addClass('fa-chevron-down'); }; JS Fiddle Thank you Edit : Thank you for the great answers!
has answer: http://stackoverflow.com/a/29373738
favorite count: 0
tagged with: twitter-bootstrap
has title: Jquery click firing on all elements
tagged with: css
answer count: 4
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29373663
has answer: http://stackoverflow.com/a/29373674
accepted answer: http://stackoverflow.com/a/29373738
upvote count: 1
possible better answer: http://stackoverflow.com/a/29373611
type: Question
has answer: http://stackoverflow.com/a/29373611
has comment: http://stackoverflow.com/comment/46927987

http://stackoverflow.com/q/29485803
has answer: http://stackoverflow.com/a/29490136
type: AnsweredQuestion
has title: Adjust Zoom Window Height Elevate Zoom
accepted answer: http://stackoverflow.com/a/29490136
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: zooming
score: 0
has body: I use elevatezoom plugin in my app. What I want to do is just change zoomwindow height according to image hovering over. I could find a way but it does not work efficiently. It does not work when the page is first loaded. If I go to another page and see another product then elevatezoom is working as i want. Here is my code with laravel url assignments: image)}}" alt="{{$product->title($product->id)}}" class="zoomInner img-responsive" data-zoom-image="{{URL::to($product->image)}}"> image)}}" data-zoom-image="{{URL::to($product->image)}}"> title($product->id)}}" src="{{URL::to($product->image)}}"> @if(isset($images) && $images) @foreach($images as $image) image)}}" data-zoom-image="{{URL::to($image->image)}}"> title($product->id)}}" src="{{URL::to($image->image)}}"> @endforeach @endif And here is thejavascript which initiates zoom and changes zoomwindow height: (function() { $(".product-main-image img").on("load",function() { var mainImgHeight=$(this).height(); /*var src=$(this).attr("src"); alert(src);*/ $('.zoomInner').elevateZoom({ gallery:'gallery_01', zoomType: "window", cursor: "crosshair", zoomWindowWidth:"400", zoomWindowHeight:mainImgHeight, zoomWindowFadeIn: 500, zoomWindowFadeOut: 750 }); $(".product-main-image img").data("zoom-image","false").elevateZoom(); }); })(); If I remove last row code snippet, zoom is working on first load However data-zoom-image does not change when product other images are clicked. How can I handle the problem. I think when i assign a global value ot "mainImgHeight" in load() function problem might be solved. But i could not get it work after one day hassle. Maybe someone has a clue.
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29396324
has body: Looks like you're doing a lot more work than you need to. Your split() call searches for the bad character, so you could stop there and see if the string was split or not. But that's not a very clear way of expressing your intent. If you're looking for a specific character, you don't need a regex. Why not just if ( $("input[name='emailAddress']").val().indexOf('@') &gt; -1 ) { /* we found an '@' character; handle as you like */ } else { /* NOT FOUND, handle as appropriate */ alert("Missing a required '@' character"); } indexOf returns a non-negative value if it finds the string. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/46971666
has comment: http://stackoverflow.com/comment/46972500
downvote count: 0
answers question: http://stackoverflow.com/q/29396153
type: Answer

http://stackoverflow.com/comment/47211133
type: Comment
score: 1
has text: i think the quickest workaround would be to over-query the extra hour and filter client-side using UTC-compensated dates (js can adjust DST based on the calendar). presuming you have real dates in the full item coming in the response. like making the same mistake twice to cancel out both.
comment on: http://stackoverflow.com/q/29528284
type: QuestionComment

http://stackoverflow.com/q/29438870
tagged with: cakephp
accepted answer: http://stackoverflow.com/a/29460464
has title: Accessing Api with Javascript using Oauth
answer count: 1
tagged with: javascript
tagged with: backbone.js
score: 0
tagged with: oauth
tagged with: oauth-2.0
type: Question
has body: Having issues accessing data from my api once i have created a access token with a simple javascript client. Here is my Js app object, as you can see i return a new access_token from my api - this works fine up to this point. I store the access_token into app.AccessToken for me to use in any other api calls i make throughout the app. But for some reason when i request anything the response is always the login page, so basically i am getting redirected when i try access anything even though i passing over a working in-date access_token. var app = (function(){ /** * Api * @type Object */ var api = { AccessToken : null, views: {}, models: {}, collections: {}, content: null, router: null, documents: null, init: function() { this.content = $("#content"); this.documents = new api.collections.Documents(); Backbone.history.start(); return this; }, changeContent: function(el) { this.content.empty().append(el); return this; }, title: function(str) { // set page title } }; /** * ViewFactory * @type Object */ var ViewFactory = { documents: function() { this.documentsView = new api.views.documents({ model: api.documents }); return this.documentsView; } }; /** * AppRouter * @type Object */ var Router = Backbone.Router.extend({ routes: { '' : 'documents' }, documents: function() { var view = ViewFactory.documents(); api.changeContent(view.$el); view.render(); } }); /** * OAuth * @type Object * @return string */ var OAuth = { title : 'Js Client', clientId : 'NTUxNTY4YWE1NWUxMzI4', username : 'john@globallcoach.com', password : 'password', init: function() { var provision = OAuth.provision(); if(provision.hasOwnProperty('success')) { var authenticate = OAuth.authenticate(); if(authenticate.hasOwnProperty('access_token')) { api.AccessToken = authenticate['access_token']; } } }, provision: function() { var response; $.ajax({ async: false, url : 'http://customer-server-2.dev/oauth/provision/.json', type : 'get', data : { title : OAuth.title, client_id : OAuth.clientId }, success:functi…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29460464

http://stackoverflow.com/q/29507364
answer count: 2
tagged with: firefox
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29507975
accepted answer: http://stackoverflow.com/a/29507975
has answer: http://stackoverflow.com/a/29507603
linked to: http://stackoverflow.com/q/12275153
tagged with: http://stackoverflow.com/tag/html
has title: jQuery .on() method woking on Firefox but not on Chrome
has comment: http://stackoverflow.com/comment/47171557
has comment: http://stackoverflow.com/comment/47172146
tagged with: google-chrome
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29507603
has body: I am trying to create a specific functionality on my web page, which uses jQuery to iterate over a JSON object, populates a combo box with its values, and also attach click event handlers to the options using jQuery's .on() method. All seemed to be working fine, until I decided to test the functionality on Google Chrome. (I had been developing on Firefox Developer Edition till now). The .on() method from jQuery does not seem to be working on Google Chrome at all. Here is the HTML code snippet for my web page Select a Pretty Redirection to edit it, or add a new one below -Add New- Infibeam Redirection Mozilla Developers Redirection SnapDeal Redirection Service Name* Target URL* Pretty URL* Redirect Type* -Redirection Type- Temporary(307) Permanent(301) Found(302) NoFollow this link Save Update Delete Reset And here is the jQuery code that does all the work var $select = $('#serviceNameList'); var $firstOption = $(" "); $firstOption.attr("value", 0); $firstOption.text("-Add New-"); $firstOption.on('click', function() { $('#name').val(""); $('#serviceUrl').val(""); $('#prettyUrl').val(""); $('#redirectType').val(""); $('#nofollow').removeAttr('checked'); $('#saveRIP').show(); $('#updateRIP').hide(); $('#delete').hide(); }); $select.append($firstOption); $(jsonResponse).each(function (index, o) { var $option = $(" "); $option.attr("value", o.id); $option.on('click', function() { $('#name').val(o.service_name); $('#serviceUrl').val(o.service_url); $('#prettyUrl').val(o.pretty_url); $('#redirectType').val(o.redirect_type); if (o.no_follow == 1) { $('#nofollow').prop("checked", true); } else { $('#nofollow').prop("checked", false); } $('#saveRIP').hide(); $('#updateRIP').show(); $('#delete').show(); }); $option.text(o.service_name); $select.append($option); }); if ($("#serviceNameList option:selected").val() == 0) { $('#saveRIP').show(); $('#updateRIP').hide(); $('#delete').hide(); } And here is the JSFiddle link- http://jsfiddle.net/6uy1quLg/5/ (Try running it on both Goo…
type: Question
score: 0

http://stackoverflow.com/a/29378629
has comment: http://stackoverflow.com/comment/46963513
upvote count: 3
has comment: http://stackoverflow.com/comment/46937675
score: 3
has comment: http://stackoverflow.com/comment/46937759
answers question: http://stackoverflow.com/q/29378593
has comment: http://stackoverflow.com/comment/46937606
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You cannot mix Angular's ng-model and the regular HTML value attributes. If you want to initialize your model, do it in your controller (or using ng-init but it is not recommended). And remove that value from your HTML. $scope.var1 = 3; $scope.var2 = 4; Also, ng-init is evaluated after the controller is first read, so if you want to display the value from the ng-init you need to $watch for it: it will not be there the first time your controller is executed.
has comment: http://stackoverflow.com/comment/46937632
accepted answer of: http://stackoverflow.com/q/29378593

http://stackoverflow.com/q/29460146
favorite count: 0
has comment: http://stackoverflow.com/comment/47084065
has comment: http://stackoverflow.com/comment/47088212
type: Question
accepted answer: http://stackoverflow.com/a/29460207
possible better answer: http://stackoverflow.com/a/29523219
answer count: 3
downvote count: 3
has comment: http://stackoverflow.com/comment/47086636
has answer: http://stackoverflow.com/a/29523219
has answer: http://stackoverflow.com/a/29460294
has comment: http://stackoverflow.com/comment/47088136
upvote count: 5
has body: I would like to know how to open a page, and then on that page, run javascript (that is set by the link on the first page). I have tried this: LINK DISPLAY NAME HERE Does anyone know how to achieve this?
has comment: http://stackoverflow.com/comment/47088151
tagged with: hyperlink
has comment: http://stackoverflow.com/comment/47088164
tagged with: javascript
has answer: http://stackoverflow.com/a/29460207
has comment: http://stackoverflow.com/comment/47084098
has title: Link that opens a NEW page and runs javascript
type: AnsweredQuestion
score: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/116582889

http://stackoverflow.com/q/29392655
has body: I am putting some Japanese text in a div at run time but these characters are shown as boxes and triangles.. here is the head portion of my html page &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt; &lt;meta name="viewport" content="initial-scale=1.0"&gt; and here is how I am putting text in div if (getQSComponent(QSKeys.LangId) == 1) { $('#title').text("情報"); $('#message').text("プロセスが正常に完了しました。"); }
linked to: http://stackoverflow.com/q/19484325
upvote count: 2
answer count: 1
linked to: http://stackoverflow.com/q/11476014
has answer: http://stackoverflow.com/a/29392831
tagged with: javascript
has comment: http://stackoverflow.com/comment/46962763
type: UnansweredQuestion
has title: JS not recoganizing Japanese characters
has comment: http://stackoverflow.com/comment/46962491
has comment: http://stackoverflow.com/comment/46962326
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46962161
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/46962942
linked to: http://stackoverflow.com/q/3598028
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46962595
has comment: http://stackoverflow.com/comment/46962249

http://stackoverflow.com/q/29478103
answer count: 2
accepted answer: http://stackoverflow.com/a/29478679
tagged with: javascript
has comment: http://stackoverflow.com/comment/47117402
has answer: http://stackoverflow.com/a/29478210
score: 0
possible better answer: http://stackoverflow.com/a/29478210
has comment: http://stackoverflow.com/comment/47117114
has title: Javascript, change inner html when body_class() = logged-in
has comment: http://stackoverflow.com/comment/47116994
tagged with: wordpress
linked to: http://stackoverflow.com/q/6369313
has comment: http://stackoverflow.com/comment/47117463
has comment: http://stackoverflow.com/comment/47117155
has answer: http://stackoverflow.com/a/29478679
has body: Attempting to write some Javascript for a Wordpress install. I have this in my header: You Must Log In To See Pricing and then .logged-in #loginWarningRed {display:none;} and it's working fine, but I would like to write some Javascript to welcome the user when logged in. Something like: if (jQuery('body').hasClass('logged-in')) { document.getElementById(loginWarningRed);innerHTML = "Welcome %USER%"; } However, when I put this snippet in my custom js text-area, nothing happens. I have no error message in the console. Also, for the record, I have changed css to /*.logged-in {display:none;}*/.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47116973
has comment: http://stackoverflow.com/comment/47117097
type: Question

http://stackoverflow.com/comment/46939703
score: 0
comment on: http://stackoverflow.com/q/29379842
type: Comment
type: QuestionComment
has text: If you add `console.log($(document).foundation)` at the top of your function call, does it log out `undefined` or what?

http://stackoverflow.com/a/30176881
has comment: http://stackoverflow.com/comment/72902305
type: Answer
score: 6
downvote count: 0
answers question: http://stackoverflow.com/q/29459420
has body: Not sure this is what you need, and I don't have that much experience with DFP, but I just ran into a similar problem that I solved by managing the size of the iframe manually. Maybe this can help you too. The DFP API has an event you can listen to that lets you know that the ad has finished rendering, upon which I would suggest you change the iframe properties to be full width, and a whatever height would work for the placement. Assuming you have jQuery on your page, this can be done quite easily. After setting up the DFP plugin (calling defineSlot etc.) you can add a listener for this event like so: googletag.pubads().addEventListener('slotRenderEnded', function(){ var $adFrame = $('#id-of-the-iframe'); $adFrame.css({width: '100%', height: '500px'}); }); This is outlined in DFP docs here. Hope this helps. EDIT: After posting I realized that the code example I posted is from the DFP GPT library. Perhaps you are not using this. This SO question has a link to a library that someone has created to listen to events that DFP fires. Perhaps you can use that and use the technique I described? Again - hope this helps :)
upvote count: 6
has comment: http://stackoverflow.com/comment/48570496

http://stackoverflow.com/comment/47215030
type: Comment
comment on: http://stackoverflow.com/a/29530478
has text: I can't change display: inline; because I can't find the source, and when I try to overwrite with display: none; in the css of the child theme, wordpress, and in the plugin, nothing is helping.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29414564
linked to: http://stackoverflow.com/q/10724876
has answer: http://stackoverflow.com/a/29415955
has body: Server running at http://localhost:3000/ /home/sankar/Cloud/config/strategies/local.js:26 if (!(user.authenticate(password))) ^ TypeError: Object { firstName: 'raju', lastName: 'raju', email: 'raju@070', username: 'raju', password: 'raju', _id: 551b7ca79177c00c1342a3ee, __v: 0 } has no method 'authenticate' at Promise.&lt;anonymous&gt; (/home/sankar/Cloud/config/strategies/local.js:26:15) at Promise.&lt;anonymous&gt; (/home/sankar/Cloud/node_modules/mongoose/node_modules/mpromise/lib/promis e.js:177:8) at Promise.EventEmitter.emit (events.js:95:17) at Promise.emit (/home/sankar/Cloud/node_modules/mongoose/node_modules/mpromise/lib/promis e.js:84:38) at Promise.fulfill (/home/sankar/Cloud/node_modules/mongoose/node_modules/mpromise/lib/promis e.js:97:20) at /home/sankar/Cloud/node_modules/mongoose/lib/query.js:1400:13 at model.Document.init (/home /sankar/Cloud/node_modules/mongoose/lib/document.js:254:11) at completeOne (/home/sankar/Cloud/node_modules/mongoose/lib/query.js:1398:10) at Object.cb (/home/sankar/Cloud/node_modules/mongoose/lib/query.js:1155:11) at Object._onImmediate (/home/sankar/Cloud/node_modules/mongoose/node_modules/mquery/lib/utils.js :137:16) I am getting this error only when i am trying to signin with correct details means for incorrect username it is explicitly throwing error,but for not for correct credintials. It is working fine for SignUp . Local.js code: var passport = require('passport'), LocalStrategy = require('passport-local').Strategy, User = require('mongoose').model('User'); module.exports = function() { passport.use(new LocalStrategy(function(username, password, done) { User.findOne( { username: username }, function(err, user) { if (err) { return done(err); } if (!user) { return done(null, false, { message: 'Unknown user' }); } if (!(user.authenticate(password))) { return done(null, false, { message: 'Invalid password' }); } return done(null, user); }); })); } In my user.js i have added the method for authentication. UserSchema.met…
score: 0
has comment: http://stackoverflow.com/comment/47005276
has comment: http://stackoverflow.com/comment/47002886
answer count: 1
tagged with: mongoose
tagged with: javascript
tagged with: passport.js
tagged with: express
has title: Error while authenticating(sign in) password using passport-local module in node js
has comment: http://stackoverflow.com/comment/47012763
has comment: http://stackoverflow.com/comment/47013604
tagged with: node.js
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/29398201
score: 1
answers question: http://stackoverflow.com/q/29396038
upvote count: 1
downvote count: 0
type: Answer
has body: You should be able to use instanceof Mongo.Collection.Cursor (not Mongo.Cursor). From my console: &gt; a = Meteor.users.find() &lt;- LocalCollection.Cursor {collection: LocalCollection, sorter: null, _selectorId: undefined, matcher: Minimongo.Matcher, skip: undefined…} &gt; a instanceof Mongo.Collection.Cursor &lt;- true

http://stackoverflow.com/comment/77974672
score: 4
type: Comment
type: QuestionComment
has text: For charting in React Native and React, use Victory: https://formidable.com/open-source/victory/gallery
comment on: http://stackoverflow.com/q/29442037

http://stackoverflow.com/q/29472883
type: Question
has comment: http://stackoverflow.com/comment/47107464
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29473910
has body: You can replace "javascript" with other languages here. Basically what I've found from reading is that python actively encourages the use of exceptions and a series of if tests to manage code. Often readability is cited as well as cleaner looking code when 'duck-typing' However, often when working in javascript or some other languages, it seems that best practices suggest trying to 'code defensively' and cover as much as you can in if statements and return types in order to avoid using exceptions. The reason most often cited is because exceptions are a very expensive operation. Here's an example: https://stackoverflow.com/a/8987401/2668545 Does python face the same exceptions cost as javascript and the best practices are such because there's more emphasis about readability/debuggability than performance? Does python have a different way of handling exceptions than javascript or other languages that don't recommend using exceptions? Am I misinterpreting the advice? Or is it something else?
answer count: 1
linked to: http://stackoverflow.com/q/8986958
has answer: http://stackoverflow.com/a/29473910
favorite count: 0
has comment: http://stackoverflow.com/comment/47109270
has comment: http://stackoverflow.com/comment/47107050
tagged with: exception
has title: Why are using exceptions more acceptable in python than javascript
tagged with: python
type: AnsweredQuestion
score: 3
upvote count: 3

http://stackoverflow.com/comment/47105148
score: 0
type: QuestionComment
has text: This might be something you need to do with a cookie.
type: Comment
comment on: http://stackoverflow.com/q/29471930

http://stackoverflow.com/comment/47127463
comment on: http://stackoverflow.com/a/29483381
score: 0
type: AnswerComment
type: Comment
has text: *"along with a few other ACII characters"* Actually, unicode letters are allowed as well as you can see in the question you linked to).

http://stackoverflow.com/a/29514033
type: Answer
score: 2
has body: It looks like you are doing this all in your controller, so try this following pattern for now. You should be able to see what is going on here, basically we're placing a $watch on $scope.signuser which will keep track of it's value so we can log it out after our promise has resolved. $scope.signuser = null // for now - until promise is resolved Login.query({ email: $scope.user.signemail }).then(function(response) { $scope.signuser = response.data[0]; }); $scope.$watch('signuser', function(newValue, oldValue) { console.log(newValue); });
upvote count: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29513740
answers question: http://stackoverflow.com/q/29513740

http://stackoverflow.com/comment/47140524
type: Comment
has text: The shim is loaded on application startup, so it shouldn't be lazy-loaded. I can access `Promise.reject` just fine from the debugger, too. Here's the full trace: `TypeError: undefined is not a function {stack: "TypeError: undefined is not a function↵ at reject (native)", message: "undefined is not a function"}`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29475662

grand-central-dispatch
type: Tag
tag name: grand-central-dispatch
tags question: http://stackoverflow.com/q/29414038

http://stackoverflow.com/comment/47176786
has text: Thank you mohamedrias, for your explanations which are very good, step by step. But I try it, it doesn't work, strange.
type: Comment
comment on: http://stackoverflow.com/a/29510176
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46986032
has text: @dfsq The docs just say that it does work, not how it works. My question is more how javascript deals with arguments than about angular's dependency injection.
score: 1
comment on: http://stackoverflow.com/q/29405544
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29420070
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: end-to-end
favorite count: 0
has comment: http://stackoverflow.com/comment/47011965
has answer: http://stackoverflow.com/a/29439872
downvote count: 0
type: UnansweredQuestion
tagged with: selenium
has comment: http://stackoverflow.com/comment/47035117
has comment: http://stackoverflow.com/comment/47015201
type: Question
tagged with: testing
tagged with: protractor
score: 1
has body: I have an element with inner text on my page I want to extract. So I do: element(by.xpath('//*[@id="searchQuery"]')).getText().then(function (text){ return text; }); but I always get an undefined return value. Is there another way of extracting text?
has comment: http://stackoverflow.com/comment/47015138
has title: Selenium Protractor in Javascript: Extracting getText keeps returning undefined

http://stackoverflow.com/comment/138103858
type: AnswerComment
has text: The fact that JavaScript/NodeJS array indices are strings makes me wonder if it treats arrays the same way as objects in terms of memory (a hashmap, rather than a true array). Do you know whether that's the case?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29397769

http://stackoverflow.com/q/29442654
answer count: 1
has title: how to handle scroll in outer height of a div for specific condition
has answer: http://stackoverflow.com/a/29443248
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47053270
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47053292
score: 0
has body: I got the outer height of a div, now I am trying to give scroll for that div when the outer height reached on 450. The if part is working smoothely but when the height is below 450 the scroll is still there. How to handle this problem I am pasting my code here $('.mydiv li a').click(function () { var popupOuter_height = $(".commondiv").outerHeight(true); alert(popupOuter_height); if ((popupOuter_height) &gt; 450) { $(".commondiv").css({ "height": "380", "overflow-y": "scroll" }); } else if ((popupOuter_height) &lt; 450) { $(".commondiv").css({ "height": "auto", "overflow-y": "auto" }); } });

http://stackoverflow.com/comment/47154994
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29498087
type: Comment
has text: That example uses php, as i'm building an application in phonegap i cannot use php files for data transfer

http://stackoverflow.com/q/29406999
tagged with: http://stackoverflow.com/tag/html
has title: Javascript adding an additional unnecessary double quotes in string
has comment: http://stackoverflow.com/comment/46990359
answer count: 0
type: UnansweredQuestion
tagged with: javascript-objects
has comment: http://stackoverflow.com/comment/46997220
has comment: http://stackoverflow.com/comment/46994680
has comment: http://stackoverflow.com/comment/46997110
has comment: http://stackoverflow.com/comment/46996700
has comment: http://stackoverflow.com/comment/46998728
tagged with: jqgrid-formatter
has comment: http://stackoverflow.com/comment/46988484
has body: I am having a formatter function for a jqgrid column and I am creating an anchor tag through a string inside the formatter function and calling a function inside the onclick attribute of anchor tag. I am trying to pass a javascript object as a function argument. The code of which is as under: function Popupformatter(cellvalue, options, rowdata, action) { return '' + rowdata.UpdateName + ''; } However, the above code is generating the column tag in jqgrid as under: <a href="#" onclick="ShowNotification([object" object])") My New Notification I am unable to trace from where did the additional double quote(") is getting generated in the rendered html. I tried changing the double quotes to single quotes and vice-versa, still not able to find out the problem inside the code. Any help would be greatly appreciated.
type: Question
has comment: http://stackoverflow.com/comment/46997751
tagged with: javascript
has comment: http://stackoverflow.com/comment/47000732
score: 0

http://stackoverflow.com/q/29481891
tagged with: delay
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29481965
has body: I have a div I want to show when I click an tag, I want to wait for like 10 seconds before redirecting, but it just shows me the div and redirects without waiting. Html code: Click here to go" Jquery code:
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29481963
accepted answer: http://stackoverflow.com/a/29481963
type: Question
has title: Jquery not delaying properly when clicking on tag
possible better answer: http://stackoverflow.com/a/29481965
answer count: 2

http://stackoverflow.com/a/29397230
type: Answer
answers question: http://stackoverflow.com/q/29397069
has body: Your test is wrong because the prompt my return space-like characters or an empty string (which actually happens when the user just clicks on OK). I would write: var tag = prompt("you must enter one keyword to approve this post"); if (tag != null) tag = tag.trim(); // assuming here you really want to do this if (!tag) { // a non-empty value :
score: 0

http://stackoverflow.com/comment/47142950
has text: I wish none of this is true. I've tried even with recalling `tooltip` method inside `experiment_restore` with timeout 100ms...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29491673
score: 0

http://stackoverflow.com/comment/47080314
has text: just about there but for some reason only does every other row :S -> i added it here in live view for you http://mr-tipster.com/pages/newcard.php
comment on: http://stackoverflow.com/a/29418450
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29422704
score: 2
has comment: http://stackoverflow.com/comment/47017200
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/47016957
answers question: http://stackoverflow.com/q/29422661
type: Answer
has body: You are using labels, not assignments i = 0; a: while(i &lt; 2) { j = 0; i = (i || 0) +1; console.log('hi'); while(j &lt; 2) { j++; console.log("there"); if (i &lt; 1) continue a; console.log("hello"); } } See also: How can I use goto in Javascript?

concurrency
tag name: concurrency
tags question: http://stackoverflow.com/q/29488620
type: Tag

http://stackoverflow.com/comment/47081477
score: 0
has text: What model? There is absolutely no angular code in question whatsoever and we have no idea how you implement code shown
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29458574

http://stackoverflow.com/comment/47044525
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29437734
has text: I still have issues... as well with finding the option of sending private messages here :)
type: AnswerComment

http://stackoverflow.com/a/29517387
has body: For native input elements, you can simply set the disabled attribute. $('input').attr('disabled', true); For jQuery UI input elements, you can set the disabled option. $('.datepicker').datepicker('option', 'disabled', true); So, when an option is selected: // Initialize selectmenu $('.select').selectmenu({ // Do stuff when .select has changed change: function(e) { // Enable another input element: .datepicker $('.datepicker').datepicker('option', 'disabled', false); } });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29516843

http://stackoverflow.com/q/29471102
linked to: http://stackoverflow.com/q/359788
has answer: http://stackoverflow.com/a/29471986
has body: I would like to call a function within a function from a string variable with arguments. Let me demonstrate what I would like with adding some code var myFunction = function() { var innerFunction = function(data) { alert(data); } return { run: function(data) { innerFunction(data); } } }; var myString = "myFunction.run()"; If I don't want to pass variable than it is quite easy; var callFunction = new Function(myString); callFunction(); If I can pass a variable without using function within a function; function myFunction(data) { alert(data); } var myString = "myFunction"; window[myString]("Hello World!"); However this is not what I want. Could anyone enlighten me about calling a function within a function from a string variable with passing arguments to it?
score: 1
type: Question
tagged with: javascript
has title: Calling function within function from a string variable with arguments
has answer: http://stackoverflow.com/a/29471266
has comment: http://stackoverflow.com/comment/47103911
answer count: 2
has comment: http://stackoverflow.com/comment/47105093
upvote count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47103844
has comment: http://stackoverflow.com/comment/47104782
linked to: http://stackoverflow.com/q/29162944

mocha.js
tags question: http://stackoverflow.com/q/29390644
tags question: http://stackoverflow.com/q/29401840
tags question: http://stackoverflow.com/q/29481333
tags question: http://stackoverflow.com/q/29413769
tags question: http://stackoverflow.com/q/29433949
tags question: http://stackoverflow.com/q/29494589
tags question: http://stackoverflow.com/q/29403842
tags question: http://stackoverflow.com/q/29472696
tags question: http://stackoverflow.com/q/29475798
tag name: mocha.js
type: Tag
tags question: http://stackoverflow.com/q/29464849
tags question: http://stackoverflow.com/q/29387724

http://stackoverflow.com/comment/47178998
type: Comment
type: AnswerComment
score: 0
has text: down voter could you please care to tell the reason also for the down vote. So that i can understand and correct :)
comment on: http://stackoverflow.com/a/29511254

http://stackoverflow.com/a/29530131
type: Answer
accepted answer of: http://stackoverflow.com/q/29528918
has comment: http://stackoverflow.com/comment/47218570
score: 1
answers question: http://stackoverflow.com/q/29528918
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: I did it like this: controller: $scope.selectChange = function() { switch($scope.confirmed) { case '1': $scope.selected = '1';break; case '2': $scope.selected = '2';break; } } html: 1 2 {{selected}} plnkr: http://plnkr.co/edit/N85UYTeHwRInfp60ZLsJ?p=preview

http://stackoverflow.com/a/29527265
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29525467
score: 1
type: AcceptedAnswer
downvote count: 0
has body: First, SO "is not a converting service", but I got curious myself. Second, your regex is totally fine for use in VB.NET. Third, you can leverage Regex.Matches rather than checking matches sequentially. And lastly, you cannot name a variable 'sub', it is a reserved word in VB.NET. Now, this is your function in VB.NET: Private Function maxRepeat(input As String) As String maxRepeat = String.Empty Dim reg As String = "(?=((.+)(?:.*?\2)+))" For Each m As Match In Regex.Matches(input, reg) If m IsNot Nothing And m.Groups(2).Value.Length &gt; maxRepeat.Length Then maxRepeat = m.Groups(2).Value End If Next End Function Or, with LINQ (do not forget System.Linq reference): Private Function maxRepeat(input As String) As String maxRepeat = String.Empty Dim reg As String = "(?=((.+)(?:.*?\2)+))" Dim matches As IEnumerable(Of Match) = Regex.Matches(input, reg).Cast(Of Match)().Select(Function(m) m) maxRepeat = (From match In matches Let max_val = matches.Max(Function(n) n.Groups(2).Value.Length) Where match.Groups(2).Value.Length = max_val Select match.Groups(2).Value).FirstOrDefault() End Function The function may be called the following way: Dim res As String = maxRepeat("324234241122332211345435311223322112342345541122332211234234324") Result: 1122332211234234
accepted answer of: http://stackoverflow.com/q/29525467

http://stackoverflow.com/comment/47060886
type: Comment
score: 0
type: AnswerComment
has text: @Shashank: Well, it now accepts commas too... but code became quite dirty. Not a real solution, actually.
comment on: http://stackoverflow.com/a/29438693

http://stackoverflow.com/comment/46964030
comment on: http://stackoverflow.com/q/29393661
score: 0
has text: Why would it be the name?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29397277
upvote count: 2
has body: The error you get back in the console is Refused to display 'https://vimeo.com/63534746' in a frame because it set 'X-Frame-Options' to 'sameorigin'. so Vimeo is blocking you from doing what you are trying to do. There are three possible values for X-Frame-Options: DENY - The page cannot be displayed in a frame, regardless of the site attempting to do so. SAMEORIGIN - The page can only be displayed in a frame on the same origin as the page itself. ALLOW-FROM uri - The page can only be displayed in a frame on the specified origin. Instead of embedding that whole page, you can use the embed code provided by Vimeo (found by clicking the 'Share' button). Light Bikes from Eric Corriel on Vimeo.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29397237
type: Answer
answers question: http://stackoverflow.com/q/29397237
score: 2

http://stackoverflow.com/q/29404287
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46983684
has comment: http://stackoverflow.com/comment/46984351
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46983563
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/46983636
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has body: I have a date-time picker from here. For some reason I need to include these CSS and JS files: <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl;?>/bootstrap/js/jquery.min.js"> <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl;?>/bootstrap/js/datetimepicker/moment-with-locales.js"> <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl;?>/bootstrap/js/datetimepicker/bootstrap-datetimepicker.js"> `<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/bootstrap/tablesorter/docs/css/bootstrap.min.css"> <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/bootstrap/tablesorter/docs/css/bootstrap.min.css"> <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/bootstrap/js/datetimepicker/bootstrap-datetimepicker.css"> <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl;?>/bootstrap/js/bootstrap.min.js"> And My code is : And my real problem is here: Header got too bold and second image no any image for arrow in time. I want to give it new style for this, anyone can help?
has comment: http://stackoverflow.com/comment/46983586
has answer: http://stackoverflow.com/a/29404846
accepted answer: http://stackoverflow.com/a/29404846
has comment: http://stackoverflow.com/comment/46983671
has title: Datetimepicker jQuery customize CSS
type: Question
has comment: http://stackoverflow.com/comment/46984166

http://stackoverflow.com/q/29392221
has comment: http://stackoverflow.com/comment/46964945
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29392270
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29392270
type: AnsweredQuestion
upvote count: 3
tagged with: forms
has body: I am having a list of stuff that the user can select. The way it's currently made, we have an integer as name, a price as value but i need to add a color. It's not unique so i cannot use ID. example : 6 Orange(30.95$/month) 6 Green(33.95$/month) 10 Orange(32.95$/month) 10 Green(35.95$/month) I need to combine two non-unique values and them to be accessible by jQuery / Javascript I would like not to make two selects. I know it's straightforward the easiest solution but if i could stick to a single one that would give better results. Is it safe to create a custom tag like "prodcolor" with any non-reserved nametag or is there a smarter way to achieve this? Many thanks once again.
type: Question
has comment: http://stackoverflow.com/comment/46961719
has title: custom tag containing data in option
tagged with: javascript
score: 3
downvote count: 0
answer count: 1

http://stackoverflow.com/q/29512533
has comment: http://stackoverflow.com/comment/47180879
has comment: http://stackoverflow.com/comment/47180814
has comment: http://stackoverflow.com/comment/47181138
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47181112
has answer: http://stackoverflow.com/a/29512850
has comment: http://stackoverflow.com/comment/47180759
has comment: http://stackoverflow.com/comment/47181479
type: Question
has comment: http://stackoverflow.com/comment/47181306
has comment: http://stackoverflow.com/comment/47181090
has comment: http://stackoverflow.com/comment/47180793
has body: I am building a web-app in JQuery that needs to communicate with a server. I have used this exact same code several times, the only thing that's changed is the data and the code performed on success. For some reason, whenever I run this function I get the error Uncaught TypeError: Illegal invocation. I have no idea what this error means, nor how to fix it. function addCourse(course){ console.log("Starting add course"); var data = { "fn" : "cAdd", "name": course, "ajax" : "true" }; console.log("Starting AJAX call"); $.ajax({ type: "GET", url: SERVICE_URL, data: data, contentType: "application/json", success: function(response) { console.log("Success!"); console.log(response); alert("the course "+ course + "has been added"); loadAllCourses(); } }); console.log("end of mod retrieval") } the function is bound to a button, using this code, from inside the $(document).ready() function $(document).on("click", "#saveNCourse", function(event){ var name = $("#ncName"); addCourse(name); }); If somebody could briefly explain what an Illegal Invocation is and/or show me where I have gone wrong in this code I would really appreciate it. Thanks
has comment: http://stackoverflow.com/comment/47181288
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/47181269
has title: Illegal Invocation in AJAX call
accepted answer: http://stackoverflow.com/a/29512850
has comment: http://stackoverflow.com/comment/47181256
has comment: http://stackoverflow.com/comment/47181311
answer count: 1
has comment: http://stackoverflow.com/comment/47181272
has comment: http://stackoverflow.com/comment/47180741

http://stackoverflow.com/a/29413418
answers question: http://stackoverflow.com/q/29413330
accepted answer of: http://stackoverflow.com/q/29413330
has body: Because in jsFiddle, the code runs inside the DOMReady event (look at the drop down under the jQuery version in the fiddle). Wrap all your code inside $(function(){ // you code here });
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47013213
score: 0
type: Answer

http://stackoverflow.com/a/29498481
answers question: http://stackoverflow.com/q/29498029
score: 4
has comment: http://stackoverflow.com/comment/47164675
type: Answer
upvote count: 4
downvote count: 0
has body: Pass data using Session Storage or Local Storage: (basic example) You can pass data from one page to the next using sessions storage. Alternatively you can also use local storage which behaves in similar fashion. Except local storage will not be cleared when the session is closed. For local storage just replace sessionStorage with localStorage. Array to store: var testArray = ['test']; Storing the Array: $('#store').on('click', function(){ sessionStorage.setItem('myArray', testArray); }); Getting the Array: $('#get').on('click', function(){ var myArray = sessionStorage.getItem('myArray'); alert(myArray); }); Clearing the Session Storage: $('#clear').on('click', function(){ sessionStorage.clear(); }); HTML: Store Array Get Array Clear Checking to see stored session in chrome: If storing stringified data, make sure to convert back to JSON: var mydata = localStorage.getItem("GoogleLatLng"); var myObject = JSON.parse(mydata); DEMO: http://jsfiddle.net/mdktpmw2/ Supporting older versions of Internet Explorer: http://modernizr.com/docs/ https://github.com/pamelafox/lscache http://amplifyjs.com/ Some Resources: http://caniuse.com/#feat=namevalue-storage http://davidwalsh.name/html5-storage

http://stackoverflow.com/a/29493698
type: Answer
has body: You can use the CSS3 rotate property how this: HTML: &lt;input type="button" value="button" id="button"&gt; CSS: .rotate-180 { -moz-transform: rotate(180deg); -webkit-transform: rotate(180deg); -o-transform: rotate(180deg); -ms-transform: rotate(180deg); } JS: $("#button").click(function(){ $(this).toggleClass("rotate-180"); }) DEMO: http://jsfiddle.net/1x84r9p6/
score: 0
answers question: http://stackoverflow.com/q/29493483

http://stackoverflow.com/a/29405009
type: AcceptedAnswer
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29404531
has comment: http://stackoverflow.com/comment/46987241
score: 1
answers question: http://stackoverflow.com/q/29404531
has comment: http://stackoverflow.com/comment/46987115
downvote count: 0
has body: This is what you need: JSfiddle - change img on reload. In this example I'm using images from the internet but what you should do is to change the elements names on the array and everything will work fine. Example: change this "http://images4.fanpop.com/image/photos/22200000/-ZORO-one-piece-22288454-414-479.jpg" for this "YTpic2.gif". This is the HTML code: &lt;img src="d" id="myImg"/&gt; This is the JavaScript code: var images = [ "http://images4.fanpop.com/image/photos/22200000/-ZORO-one-piece-22288454-414-479.jpg", "http://3.bp.blogspot.com/-VOiVpheXW_g/UmkqgPZFMZI/AAAAAAAAASU/0BF1y4ox4Bw/s1600/nico_robin_2y_by_deiviscc-d3jdk02.png", "http://www.renders-graphiques.fr/image/upload/normal/Zoro_calendrier_2013_by_Kakarot.png", "http://img2.wikia.nocookie.net/__cb20120302234410/onepiece/es/images/archive/9/90/20130106193654!Timeskip_Zoro.png", "http://st-listas.20minutos.es/images/2013-07/364756/4091397_640px.jpg?1373467101", "http://i615.photobucket.com/albums/tt232/Celtanor/Manga%20and%20Anime%20Renders/One%20Piece/RoronoaZoro17B.png" ]; (function () { document.getElementById("myImg").src = images[Math.ceil(Math.random() * images.length)-1]; })()

http://stackoverflow.com/a/51959031
type: Answer
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29452651
has body: As of 2018, onFileUploadComplete(file, req, res) is no longer part of multer.
downvote count: 0
has comment: http://stackoverflow.com/comment/90868602

http://stackoverflow.com/q/29462721
has comment: http://stackoverflow.com/comment/47089005
answer count: 1
has body: I am trying to retrieve data from a JSON file and creating an array of objects (works fine), but I also want to add an item to each object in the array while doing so. This is my code: var linklist = []; $.getJSON('links.json').success(function (json) { $.each(json, function(i, obj) { linklist.push(obj); $(obj).extend({ status:'Downloaded' }); }); }) If I try to output data in status, I get 'undefined' as a value.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47089035
has title: JSON to array of objects, and adding item to each object
has comment: http://stackoverflow.com/comment/47089145
score: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29463848
type: Question
tagged with: arrays
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29503898
has title: show/hide elements based on title of clicked link?
has answer: http://stackoverflow.com/a/29504077
type: Question
possible better answer: http://stackoverflow.com/a/29504077
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29503992
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/47165472
has body: I am trying to show and hide elements (DIVs) based on the title of the hyperlinks in jquery. my html looks like this: booz books sam something here something here something here something here something here another thing here another thing here another thing here oh well oh well oh well and this is the jquery code: $('.netro').click(function(event) { var title = $(this).attr('title'); var allElems = $('"' + title + '"').not(this); allElems.show(); }); however, my code doesn't do anything at all. could someone please advise on this issue? I have to add that all the div's with the class drag have the CSS of display:none; to begin with.
has answer: http://stackoverflow.com/a/29503945
accepted answer: http://stackoverflow.com/a/29503945
type: AnsweredQuestion

http://stackoverflow.com/comment/47013733
type: Comment
type: QuestionComment
has text: @Ramesh have you tried the answer "developerwjk" gave you?
score: 0
comment on: http://stackoverflow.com/q/29420796

http://stackoverflow.com/a/29418706
score: 4
has comment: http://stackoverflow.com/comment/47009565
type: AcceptedAnswer
has body: Change your code like below var currentImageIndex = 0; setInterval(function() { var imageArrayIds = ["01BrunetteGirl", "02ManAndWife", "03GlassesMan", "04BlondeGirl"]; if(currentImageIndex &gt; 3) { currentImageIndex = 0; } for(var index in imageArrayIds) { document.getElementById(imageArrayIds[index]).style.opacity = (currentImageIndex == index ? "1" : "0"); } currentImageIndex++; }, 3000); Working Demo Working Demo with jQuery animate effect
has comment: http://stackoverflow.com/comment/47009433
answers question: http://stackoverflow.com/q/29418483
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29418483
downvote count: 0
has comment: http://stackoverflow.com/comment/47009476
has comment: http://stackoverflow.com/comment/47009494

http://stackoverflow.com/a/29394238
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/46965137
answers question: http://stackoverflow.com/q/29394153
score: -1
accepted answer of: http://stackoverflow.com/q/29394153
upvote count: 0
type: AcceptedAnswer
has body: Yes, its OK. Whether its the best method or not is a whole other subject. http://getbootstrap.com/getting-started/#license-faqs License FAQs Bootstrap is released under the MIT license and is copyright 2015 Twitter. Boiled down to smaller chunks, it can be described with the following conditions. It requires you to: Keep the license and copyright notice included in Bootstrap's CSS and JavaScript files when you use them in your works It permits you to: Freely download and use Bootstrap, in whole or in part, for personal, private, company internal, or commercial purposes Use Bootstrap in packages or distributions that you create Modify the source code Grant a sublicense to modify and distribute Bootstrap to third parties not included in the license It forbids you to: Hold the authors and license owners liable for damages as Bootstrap is provided without warranty Hold the creators or copyright holders of Bootstrap liable Redistribute any piece of Bootstrap without proper attribution Use any marks owned by Twitter in any way that might state or imply that Twitter endorses your distribution Use any marks owned by Twitter in any way that might state or imply that you created the Twitter software in question It does not require you to: Include the source of Bootstrap itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it Submit changes that you make to Bootstrap back to the Bootstrap project (though such feedback is encouraged) The full Bootstrap license is located in the project repository for more information.

http://stackoverflow.com/comment/47164496
type: AnswerComment
has text: I want to thank you guys for taking time out of your busy schedule to help. I got the code working and I took time to understand everything you gentlemen mentioned.
score: 0
comment on: http://stackoverflow.com/a/29480155
type: Comment

http://stackoverflow.com/a/29465690
type: Answer
has comment: http://stackoverflow.com/comment/47380940
answers question: http://stackoverflow.com/q/29465242
has comment: http://stackoverflow.com/comment/47407359
has body: This accomplishes both of the things that you wanted using the optional callback parameter in the animate function. It checks first to see if the variable C (the 0-based index of the current slide) is equal to 2 (3 in 1-based indexing), and shows an alert if it is. Then it checks to see if C is equal to 10 (which would mean that the slide currently being shown is the 9th one; The 9th image is just a duplicate of the 1st one) If it is on the 9th one, then jump back to the first one and trigger $("#right").click();. $('#left, #right').click(function() { C = (this.id == 'right' ? ++C : --C) &lt; 0 ? N - 1 : C % N; $('#slider').stop().animate({ left: -C * W }, 300, function() { if (C == 2){alert("3rd");} if (C == 10) { $('#slider').css("left", "0"); $('#right').click(); } }); }); JSFiddle (Because CodePen's layout is weird to me)
has comment: http://stackoverflow.com/comment/47120956
has comment: http://stackoverflow.com/comment/47094268
has comment: http://stackoverflow.com/comment/47407444
has comment: http://stackoverflow.com/comment/47380765
has comment: http://stackoverflow.com/comment/47123426
has comment: http://stackoverflow.com/comment/47123137
has comment: http://stackoverflow.com/comment/47124148
has comment: http://stackoverflow.com/comment/47318150
accepted answer of: http://stackoverflow.com/q/29465242
has comment: http://stackoverflow.com/comment/47118087
has comment: http://stackoverflow.com/comment/47317747
score: 0
has comment: http://stackoverflow.com/comment/47292454
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47118020
has comment: http://stackoverflow.com/comment/47409997

http://stackoverflow.com/comment/47048347
comment on: http://stackoverflow.com/q/29439790
type: Comment
type: QuestionComment
has text: @acontell what's the end goal of validating js-valid numbers?
score: 0

http://stackoverflow.com/comment/46958624
score: 0
comment on: http://stackoverflow.com/a/29390766
has text: Thank you. As I wrote in the last part of my question I know how to make the php part. What I don't know is what I have to change in the Extjs code in order to send the parameter.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/76363428
upvote count: 1
score: 1
has body: You say that you tried with basic scene. And problem is that you are getting black screen. I have see you code. And I have found this mistake. You had not called render method also. renderer.render(scene, camera); Also you have not added any Geometry (Mesh) to threejs scene. (Basic thing)* so you might getting black screen after all, you want to change black to white screen. then set scene.background = new THREE.Color(0xffffff);
downvote count: 0
answers question: http://stackoverflow.com/q/29422118
type: Answer

http://stackoverflow.com/comment/46984184
has text: I previously did a project that combined angular and webgl/canvas. Basically, I targeted a canvas element with a directive that would handle the drawing.
comment on: http://stackoverflow.com/q/29404583
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47090255
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29463329
has text: There is no element with an ID of *Date*. There is *CurrentDate* and *Current_Date*, perhaps you meant one of those. Likely the function *currentDate* is calling *Date*, and since you have trashed the built–in Date constructor by declaring your own *Date* function… the rest should be obvious.
type: Comment

http://stackoverflow.com/comment/47175501
type: AnswerComment
has text: Thanks Issac.Got that.But in order to show the latest value selected in one window, I have to refresh it manually by F5 to reflect the change in other window.It cant do automatically.Same text box is there for whole application.This should be displayed all the time.If the user changes the textbox value in one tab,where or not I navigate to other tabs,it should change the value in all the opened tabs.It can do refresh or anything.That thing it cant do.Tries with localstorage.Not able to do it.
type: Comment
comment on: http://stackoverflow.com/a/29507198
score: 0

http://stackoverflow.com/q/29475587
has title: Returning true doesn't allow default action in Knockout "event" binding
has answer: http://stackoverflow.com/a/41969330
tagged with: javascript
upvote count: 2
possible better answer: http://stackoverflow.com/a/59017849
answer count: 3
has answer: http://stackoverflow.com/a/59017849
has body: According to the Knockout docs for the "event" binding: By default, Knockout will prevent the event from taking any default action. .... However, if you do want to let the default action proceed, just return true from your event handler function. This doesn't seem to be working for me. Here's my view: and the event handler in my ViewModel: onInputKeydown = function(e) { console.log(e.which); return true; } This handler is preventing any characters from being entered into the element. What am I doing wrong?
favorite count: 0
type: AnsweredQuestion
tagged with: data-binding
score: 2
downvote count: 0
tagged with: keydown
tagged with: knockout.js
type: Question
has answer: http://stackoverflow.com/a/29475588
accepted answer: http://stackoverflow.com/a/29475588

http://stackoverflow.com/a/29496675
type: Answer
upvote count: 1
downvote count: 0
score: 1
has body: First, the ajax request will not be fired from your page A to your page B. When you make a request or an ajax request you are sending a message from a client to a server. Answering your question: no, if the javascript that makes the ajax request is in your page A, the request will be fired just when the user open the page A, unless you treat what you need on the server side, when you get the page.
answers question: http://stackoverflow.com/q/29496558

http://stackoverflow.com/comment/47152308
has text: Thanks for you time, I change it to <=450, it actually works as I expect if the <450, button show up, >450, button hide, stuff showed. But still a little problem here, in <450, if I click the button, once I go back to bigger screen >450, stuff will not show in >450, but when I click the screen, the stuff showed
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29496422

http://stackoverflow.com/comment/47102058
score: 0
has text: @NirrajSingh May you post it in formatted code? May be as a fiddle. Please don't post the whole question in comment.
type: Comment
comment on: http://stackoverflow.com/a/29427429
type: AnswerComment

http://stackoverflow.com/a/29486711
has comment: http://stackoverflow.com/comment/47137794
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/29486401
type: Answer
has body: I have created a fiddle, check it out below https://jsfiddle.net/512baL7k/6/ Assuming element with id as MovingContent, as follows &lt;div id="MovingContent" style="background: red; height: 10px; width: 10px; left: 1px; position: relative;" /&gt; EDIT Looks like code was not saved. I have updated fiddle
upvote count: 0
has comment: http://stackoverflow.com/comment/47137469

http://stackoverflow.com/comment/47202023
type: Comment
type: AnswerComment
has text: The Chrome Console, and injected JavaScript in general, is locked into a single page scope to prevent abuse. If it wasn't this way, you could theoretically use JavaScript to make a spam-bot in less than ten minutes, or use Chrome to send information from future pages that the user navigates. If you're that insistent on spamming, you'll have to look into automation, something like Selenium, Coded UI, Water, or the like.
comment on: http://stackoverflow.com/a/29503598
score: 0

http://stackoverflow.com/comment/47479811
score: 0
has text: Well it is true my data was updated only after the second click. So I tried to add in my changeSVG function, before the svgPanZoom() call : `document.getElementById("svgElement").setAttribute("data", fileName);` and to check `alert(document.getElementById("svgElement").getAttribute("data"));`. I also edited my post to show a few other things I tried. Then, the data was up to date. But I still don't have the zoom/pan/controlIcons nutil I click a second time.
type: Comment
comment on: http://stackoverflow.com/q/29518756
type: QuestionComment

http://stackoverflow.com/comment/47194075
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29519295
type: Comment
has text: It looks like in your jsFiddle you've not included the external resources. Here's a forked version which includes them: http://jsfiddle.net/cgmeL350/

http://stackoverflow.com/comment/47137609
type: QuestionComment
comment on: http://stackoverflow.com/q/29486782
has text: But my real recommendation is not to switch between bs and materialise at all. It's too much work unless you feel it's absolutely necessary
score: 0
type: Comment

http://stackoverflow.com/comment/96743903
type: Comment
comment on: http://stackoverflow.com/a/29520508
has text: I think I've tried that before and it didn't work. Unfortunately, I didn't write this code, so I am unable to tell you what would work and what wouldn't. Your best bet would be to try and see. If your original image is too large dimension wise, that would be a problem. Try with something small first.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29528290
score: 1
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: filter
linked to: http://stackoverflow.com/q/13216115
has comment: http://stackoverflow.com/comment/47211458
has answer: http://stackoverflow.com/a/29528441
duplicate of: http://stackoverflow.com/q/13216115
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
has body: I have an array of objects, and in the object I have an element {url:"that happens to have the word search in it"} , so when filtering if you type "arch", this link field doesn't allow for filtering as one would expect for the rest of objects. It's a pretty big object and I would like to search all of it, I just want to exclude the url element. I can't remove it, as it pertains to a link used in the ng-repeat. I also have a location search that I probably need to reevaluate in order to create a filter function that handles both. Any help would much appreciated thanks. Heres a Plunker
has title: angular filter exclude element

http://stackoverflow.com/a/44457884
type: Answer
answers question: http://stackoverflow.com/q/29374909
has body: Another thing to keep in mind is that some minifiers cannot deal with "special" keywords... Consider to check your Code if it contains "fancy" stuff like let, const special loops like for(var a of myData) special checks such as if("MyProperty" in myObject) At least in my case, this was the real problem
score: 0

http://stackoverflow.com/q/29485463
has answer: http://stackoverflow.com/a/29485551
favorite count: 0
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has answer: http://stackoverflow.com/a/29485528
accepted answer: http://stackoverflow.com/a/29485517
has title: How to get elements from nested document?
has answer: http://stackoverflow.com/a/29485517
type: AnsweredQuestion
type: Question
upvote count: 1
has body: Welcome #document For above html code I want to set value to text field "LoginUserId". I tried document.getElementsByName("LoginUserId")[0].value = "MyValue"; but it returns the error Cannot set property 'value' of undefined. I can only get elements upto "login_page" and count of child elements of "login_page" returns 0. var ele = document.getElementsByName("login_page")[0].childNodes; alert(ele.length); How can I get elements of this nested html document?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29485551

http://stackoverflow.com/a/29515817
type: Answer
score: 2
upvote count: 2
has body: Pretty sure when you do --user in a curl request then it's using Basic Authentication. So you need to use Basic Authentication in your jQuery call. You will also need to Base64 encode your username and password. Something like this: $.ajax({ url:'...', beforeSend: function(xhr) { xhr.setRequestHeader("Authorization", "Basic YWRtaW5Vc2VyOmFkbWluUGFzcw=="); } }).done(function(res){ // handle success... });
has comment: http://stackoverflow.com/comment/47189667
has comment: http://stackoverflow.com/comment/47191340
has comment: http://stackoverflow.com/comment/47189512
downvote count: 0
answers question: http://stackoverflow.com/q/29514557

http://stackoverflow.com/comment/46998746
type: Comment
comment on: http://stackoverflow.com/a/29410484
score: 0
type: AnswerComment
has text: Yes i do, but i am using "$user_list.find("li").each(function(){})" instead of you using "ul li". Is this wrong?

http://stackoverflow.com/a/29434584
score: 0
answers question: http://stackoverflow.com/q/29434050
type: Answer
has body: You can do something like this. Upload all the country flags in one folder with the country code names like: it.png for Italy (let's say you have them saved here: public_html\skin\frontend\ .. \images\countries). You can download a standard set from here. Then use something like this code to retrieve them: echo $this-&gt;__('Shipping to'). ': '; if ($this-&gt;getCountryCode()) { echo '&lt;img src="' . $this-&gt;getSkinUrl('images/countries/' . strtolower($this-&gt;getCountryCode()) . '.png') .'" alt="' . $this-&gt;getCountryName() . '" /&gt; ';
has comment: http://stackoverflow.com/comment/47102501
has comment: http://stackoverflow.com/comment/47083595

http://stackoverflow.com/comment/47174857
score: 0
has text: You can't do it that way. You need to upload the image into the browsers memory to be able to display it. Have a look [here](http://www.html5rocks.com/en/tutorials/file/dndfiles/), it has some more information but also how to upload your file to the browser.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29509272

http://stackoverflow.com/comment/46967229
comment on: http://stackoverflow.com/q/29394494
type: Comment
score: 0
type: QuestionComment
has text: @dystroy - nah, I don't think it's necessary.

http://stackoverflow.com/comment/47111629
score: 1
comment on: http://stackoverflow.com/q/29475187
type: Comment
has text: Your jsfiddle works correctly. It isn't producing the results you show in your question.
type: QuestionComment

http://stackoverflow.com/q/29380033
has body: I want to style different parts of text on the same line in different ways. I'd like to assign items from the values array to a different class than items from the percentages array while still drawing them on the same line, but I'm not sure how. Right now I have: var labels = svg.selectAll(".labels").data(values).enter(); labels.append("text") .attr("class", "labels") .text(function (d, i) { var labelText = values[i] + " (" + percentages[i] + "%)"; return labelText; }) .attr("x", function (d, i) { return labelXLeft; }) .attr("y", function (d, i) { return labelYBottom; }); How would I assign values[i] to the class valuesLabels and percentages[i] to the class percentageLabels while still drawing the percentage text right after the values text? I don't want to try to calculate the width of the values text because the font isn't monospace.
answer count: 0
tagged with: d3.js
type: UnansweredQuestion
has title: How do you make text different classes on the same line in d3.js?
upvote count: 1
score: 1
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: css
has comment: http://stackoverflow.com/comment/46940531

http://stackoverflow.com/q/29384471
linked to: http://stackoverflow.com/q/27834217
upvote count: 1
answer count: 1
has body: This question is related to this (basically, MPEG works, but wanna try and achieve a better solution) I have been trying out kurento's magic mirror Requirement: output stream must blur all areas of input stream except face. my plan to achieve this, Input stream passes to custom filter( sink). first detect and copy face areas, blur the image overlay copied faces on blurred image. now, this images would be overlayed on whole video( instead of only on face as in the case of FaceOverlayFilter). filter output(src) is given out as webRTC output( sink), this gets would get transmitted to others. Are there any filters already available that can be combined to achieve this, or must I make my own custom filter? Is this( my custom filter) even feasible( and is it the right way to fulfill the requirement)?
tagged with: kurento
has answer: http://stackoverflow.com/a/30993285
type: AnsweredQuestion
downvote count: 0
tagged with: webrtc
tagged with: javascript
accepted answer: http://stackoverflow.com/a/30993285
has title: Kurento: how to make custom filter?
type: Question
score: 1
favorite count: 0

http://stackoverflow.com/a/29403664
answers question: http://stackoverflow.com/q/29403584
has comment: http://stackoverflow.com/comment/46982687
downvote count: 0
has comment: http://stackoverflow.com/comment/46983778
type: Answer
score: 2
upvote count: 2
has body: &lt;td id="price"&gt; is a table cell and as such, you cannot access its value as you are trying to do here var price = parseInt($('#price').val()); .val() method is intended for input, select, and textarea elements, not td elements. You have a couple of options based on what you actually want to do. I suggest using .text instead of .val(). Also, it is good to note that you need to call .keyup() only after the element #num has loaded. To guarantee this, use $(document).ready(). Full javascript code is as follows: $(document).ready(function(){ $('#num').keyup(function(){ var price = parseInt($('#price').text()); var num = parseInt($('#num').val()); price = price * num; $('#total').html(price); }); });

http://stackoverflow.com/q/29498951
tagged with: javascript
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29499292
has body: I have following script showing a nice listing of the content of a directory on the server. But how do I make this script open the file, as if it where in a html anchor tag, instead of show its name (with alert), when clicking on a filename? The source of the code is at http://labs.abeautifulsite.net/archived/jquery-fileTree/demo/ Default options
type: AnsweredQuestion
has title: how retrieve file from server from filelist (JavaScript)
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29499292
score: -1
upvote count: 0
answer count: 1

http://stackoverflow.com/q/29483794
possible better answer: http://stackoverflow.com/a/29483890
has title: How can I stop infinite cloning of a form field within JavaScript?
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29483918
has body: I'm more of an HTML/CSS person so JavaScript is still very new to me. I'll appreciate any help that can be given! I found a JavaScript snippet on JSfiddle that almost completely meets my needs. I was looking for a way to clone a form field on a button click. Here's the problem. This code infinitely adds a new field every time I click the button. I really need the limit to be 2 new fields (so there would be 3 fields total). Then I'd like the button to disappear after the last field has been cloned so the user doesn't try to repeatedly click on it. I've attempted to tweak this all day with no luck. Here is the link: JS Fiddle link Here is the JavaScript: document.getElementById('button').onclick = duplicate; var i = 0; var original = document.getElementById('duplicater'); function duplicate() { var clone = original.cloneNode(true); clone.id = "duplicetor" + ++i; original.parentNode.appendChild(clone); } Thanks!
tagged with: field
has comment: http://stackoverflow.com/comment/47127971
accepted answer: http://stackoverflow.com/a/29483918
has answer: http://stackoverflow.com/a/29484004
type: AnsweredQuestion
tagged with: clone
tagged with: forms
has answer: http://stackoverflow.com/a/29483890
type: Question
tagged with: javascript

http://stackoverflow.com/comment/47092928
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29464911
has text: Without the complete picture a solution may not be possible... for now as a hack you can try `$("#new_comment:not(.ajaxified)").addClass('ajaxified').on("ajax:success", (e, data, status, xhr) ->`
score: 0

http://stackoverflow.com/comment/47129175
type: AnswerComment
comment on: http://stackoverflow.com/a/29466273
has text: [this is it](https://i.sstatic.net/2Q0IH.jpg), this is what i want to make on bigger screen, the paper is on the bootom, and I will put a jquery toogle() for it.
type: Comment
score: 0

http://stackoverflow.com/q/29397613
has body: I have a conventional recommended Intern directory structure: MyProject ├── node_modules │ ├── intern-geezer │ │ ├── client.html ├── src │ ├── myFunction.js ├── tests │ ├── intern.js │ ├── unit │ │ ├── ps.js with a very simple config: useLoader: { 'host-node': 'dojo/dojo', 'host-browser': 'node_modules/dojo/dojo.js' }, loader: { packages: [] }, suites: [ 'tests/unit/ps' ] and tests: define(function (require) { var tdd = require('intern!tdd'); var assert = require('intern/chai!assert'); // Global function to test, not an AMD module var parseF = require('src/myFunction.js'); var he = require('tests/he'); tdd.suite('My tests', function() { //etc }); }); ```` but when I open the browser client the loader is looking for the test suite inside the intern-geezer directory: I am not setting a baseUrl in the config (or in the browser URL). I didn't have this trouble going through the regular (non-geezer) intern tutorial. Since the baseUrl defaults to two directories up from client.html I don't see what I'm doing wrong. Thanks for any help. (Yes, I will need geezer for ancient IE. No, I do not want to rewrite the function I'm testing as an AMD module.)
tagged with: javascript
score: 0
has title: Intern path error in browser client
has answer: http://stackoverflow.com/a/29416276
answer count: 1
tagged with: intern
type: UnansweredQuestion
tagged with: unit-testing
type: Question

http://stackoverflow.com/comment/47032966
comment on: http://stackoverflow.com/q/29429037
type: Comment
type: QuestionComment
has text: Yes, It works for smaller content
score: 0

http://stackoverflow.com/q/29528611
has body: I have a grid, with one of the columns containing a textbox, where a user can type in a dollar amount. The text boxes are declared as: &lt;input class="change-handled" sub-category-id="83" data-id="" style="text-align: right; width: 100%" type="number" value=""&gt; Some are all decorated with the class "change-handled". What I need to do, is, using javascript/jquery, sum up all the boxes which are using that class, and display the total elsewhere on the screen. How can I have a global event, that would allow this to occur when ever I exit one of the boxes (i.e: Tab out, or ENTER out). At the moment, I have an event which doesn't do much at the moment, which will be used: $('body').on('change', 'input.change-handled', SaveData); function SaveData() { var dataId = $(this).attr('data-id'); var categoryId = $(this).attr('sub-category-id'); var value = $(this).val(); } How can I use that SaveData event, to find all the editboxes with the 'change-handled' class, sum up their values, and display it somewhere?
tagged with: twitter-bootstrap
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29528692
type: Question
accepted answer: http://stackoverflow.com/a/29528692
downvote count: 0
possible better answer: http://stackoverflow.com/a/29528805
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29528805
has title: Sum up all text boxes with a particular class name?
answer count: 3
has answer: http://stackoverflow.com/a/29528659

http://stackoverflow.com/comment/46939285
has text: yes...something like that. I thought i could use php to echo something simple on the page.... ok then let me try using jQuery form validation@PeterKA
comment on: http://stackoverflow.com/q/29379522
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46936382
comment on: http://stackoverflow.com/q/29377169
has text: i find only for one marker http://tutsme-webdesign.info/tutorials/maps/infobox.html
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47192051
comment on: http://stackoverflow.com/a/29518403
score: 0
type: AnswerComment
has text: The code I had would eventually be wrapped up in a method that returns the output and would then be sent to the browser, I suppose the `handleData()` function could do the sending back.
type: Comment

http://stackoverflow.com/comment/49849032
has text: @danjarvis Could just call: $scope.nav.replacePage('page1.html', { animation : 'none' } ); Without pop, according to documentation, navigator.replacePage substitutes the current page. No hiccups
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29482859
type: AnswerComment

http://stackoverflow.com/comment/47141315
comment on: http://stackoverflow.com/q/29491065
type: QuestionComment
type: Comment
score: 2
has text: maybe you're overdoing the wildcards, `**/*.js` should match any depth.

http://stackoverflow.com/a/29470659
accepted answer of: http://stackoverflow.com/q/29470101
upvote count: 1
answers question: http://stackoverflow.com/q/29470101
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You can achieve this by iterating over the given 2 arrays using forEach loops. Working code snippet: var data = [{ "key": 2000, "value": 10000 }, { "key": 2001, "value": 50000 }]; var data1 = [{ "key": [2000, 0], "value": 1000 }, { "key": [2000, 1], "value": 1500 }, { "key": [2000, 3], "value": 2000 }, { "key": [2001, 0], "value": 2500 }, { "key": [2001, 1], "value": 3000 }, { "key": [2001, 3], "value": 4000 }]; data.forEach(function(parentObj){ // loop over data parentObj.children = []; // initialize the children data1.forEach(function(childObj){ // loop over data1 if(parentObj["key"] === childObj["key"][0]) parentObj.children.push(childObj); }); }); console.dir(data); Please check your browser's console now. Source Read up: Array.prototype.forEach() | MDN
score: 1

http://stackoverflow.com/comment/47105972
comment on: http://stackoverflow.com/q/29471947
score: 0
type: Comment
type: QuestionComment
has text: I don't see where your controller is located, are you sure the scope is shared? Also, are you setting "gaps" to the same reference object each time you get a response from competenceStatService.getGaps()?

http://stackoverflow.com/a/29484220
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/47128568
upvote count: 2
has comment: http://stackoverflow.com/comment/47129609
has comment: http://stackoverflow.com/comment/47128811
has comment: http://stackoverflow.com/comment/47129917
accepted answer of: http://stackoverflow.com/q/29484126
has comment: http://stackoverflow.com/comment/47128980
answers question: http://stackoverflow.com/q/29484126
has comment: http://stackoverflow.com/comment/47129722
type: AcceptedAnswer
downvote count: 0
has body: Here is my code for my own blog. Hope, you want similar one: $('#icox').on('click', function() { $(this).children().toggleClass('active'); $('#menux').toggleClass('active'); }); Then in CSS you just have to play with margin-left: -300px; or with css3 transform: translate. After Edit: Here is the Working Demo
has comment: http://stackoverflow.com/comment/47129045

http://stackoverflow.com/a/29525886
has comment: http://stackoverflow.com/comment/47206293
upvote count: 1
score: 1
has body: Growth This will call your javascript function instead of executing the url.
has comment: http://stackoverflow.com/comment/47231024
answers question: http://stackoverflow.com/q/29525081
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47208783
accepted answer of: http://stackoverflow.com/q/29525081
has comment: http://stackoverflow.com/comment/47217784
type: Answer

http://stackoverflow.com/comment/46983673
type: AnswerComment
type: Comment
has text: That said, if he is adding and removing .content items with ajax, event delegation is absolutely the right approach. While jquery is overused in many places, it has a really nice api for that which makes it a lot easier to manage the selectors.
comment on: http://stackoverflow.com/a/29404162
score: 0

http://stackoverflow.com/a/29480885
downvote count: 0
score: 1
has body: try row += "&lt;input type='text' name='fname' value='' class='fedit' /&gt;\n"; you're mixing single and doble quotes
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29480864

http://stackoverflow.com/q/29528174
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/34833134
has title: React Native: ListView not displaying all rows
has answer: http://stackoverflow.com/a/30525876
accepted answer: http://stackoverflow.com/a/29532443
has body: I'm trying to display a list of rows in a React Native ListView, but it only shows the entries that fit in a single screen, ie, I can't scroll down to see more rows. Here are the styles: styles = StyleSheet.create({ container: { flex: 1, marginTop: 60 }, rowContainer: { flexDirection: 'row', justifyContent: 'space-around' } }) ListView: return ( &lt;View style={styles.container}&gt; {this.getHeader()} &lt;ListView dataSource = {this.state.dataSource} renderRow = {this.renderRow.bind(this)}/&gt; &lt;/View&gt; ) Row: return ( &lt;View style={styles.rowContainer}&gt; &lt;Text&gt;{text}&lt;/Text&gt; &lt;/View&gt; ) What am I doing wrong?
answer count: 5
score: 6
upvote count: 6
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/31492526
has answer: http://stackoverflow.com/a/29536120
has answer: http://stackoverflow.com/a/37760200
type: Question
tagged with: react-native
has answer: http://stackoverflow.com/a/29532443
possible better answer: http://stackoverflow.com/a/29536120
tagged with: javascript

http://stackoverflow.com/q/29406640
has body: In the below code I want to set height and width to 50 px to this image. Please help me to do this. $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "InvoiceDetailsNew2.aspx/GenerateNewBarcodeImage", data: "{'BarCodeNumber':'" + Barcode + "'}", dataType: "json", async: false, success: function (data) { var orders = JSON.parse(data.d); //alert(data); var height = 50; alert(orders); //imgContent = orders; imgContent = "&lt;img " + "src='" + "data:image/jpg;base64," + orders + "'/&gt;"; }, error: function (result) { alert("Error in Product Loading"); } });
tagged with: http://stackoverflow.com/tag/html
answer count: 4
possible better answer: http://stackoverflow.com/a/29406706
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29406814
has answer: http://stackoverflow.com/a/29406706
has answer: http://stackoverflow.com/a/29406676
has answer: http://stackoverflow.com/a/29406750
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29406814
has title: To set height an width to the img
score: 0

webview
tags question: http://stackoverflow.com/q/29485339
tags question: http://stackoverflow.com/q/29505050
tags question: http://stackoverflow.com/q/29394953
tag name: webview
tags question: http://stackoverflow.com/q/29445797
tags question: http://stackoverflow.com/q/29517170
tags question: http://stackoverflow.com/q/29488208
tags question: http://stackoverflow.com/q/29505838
type: Tag
tags question: http://stackoverflow.com/q/29407501
tags question: http://stackoverflow.com/q/29474481

http://stackoverflow.com/comment/47165322
score: 0
type: Comment
has text: Do you have any examples of cases where this works/doesn't work?
type: QuestionComment
comment on: http://stackoverflow.com/q/29419804

http://stackoverflow.com/comment/47207475
has text: Well you still need to explain expected behavior . It's impossible to tell what you want this code to do. Use `@` before user names to ping them in comments
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29525608
score: 0

http://stackoverflow.com/comment/47133578
type: QuestionComment
has text: I found a similar question: http://stackoverflow.com/questions/13466133/how-can-i-conditionally-require-form-inputs-with-angularjs
comment on: http://stackoverflow.com/q/29486891
score: 0
type: Comment

http://stackoverflow.com/comment/47120956
type: AnswerComment
score: 0
type: Comment
has text: P.s I fixed [jsfiddle](http://jsfiddle.net/wnrmp3n4/2/) but still the auto start function does not work in jsfiddle.
comment on: http://stackoverflow.com/a/29465690

http://stackoverflow.com/comment/47117097
type: Comment
comment on: http://stackoverflow.com/q/29478103
score: 0
type: QuestionComment
has text: @d79 what is the typo? you typed the same as I had...

http://stackoverflow.com/comment/47097946
comment on: http://stackoverflow.com/q/29467865
has text: Please post your code! Let us know what you have done??
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/47025373
has text: @Banana, that's makes sense but most browsers have this feature disabled and throw error : `Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.`
comment on: http://stackoverflow.com/q/29427189
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29385063
favorite count: 0
tagged with: mapbox
type: Question
answer count: 2
upvote count: 6
tagged with: leaflet
has answer: http://stackoverflow.com/a/29398498
has title: How to zoom on marker click event in Mapbox Leaflet?
has answer: http://stackoverflow.com/a/29398406
possible better answer: http://stackoverflow.com/a/29398498
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46948843
score: 6
has body: I want to zoom on a marker when it is clicked. I am using Mapbox and leaflet. I tried: marker.on('click', function(e){ map.setView([e.lat, e.lng], 12); }); But it gives me some kind of error: TypeError: t is null I even tried: marker.on('click', function(e){ map.fitBounds(marker.getBounds()); });
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/29398406

http://stackoverflow.com/a/29528566
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/29528030
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29528030
type: Answer
has body: To answer part of your question, you can add the "titleText":"total" option to your "valueAxes", ie: "valueAxes": [{ "stackType": "regular", "axisAlpha": 0.3, "gridAlpha": 0, "totalText": "total" }], http://www.amcharts.com/tips/using-categoryaxis-totaltext-display-total-value-stacked-chart/ That will show the totals at the top of each stack. As far adding the "this was obtained by" part... good luck.

http://stackoverflow.com/q/29461791
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: handlebars.js
has title: Handlebars not rendering?
tagged with: laravel
has body: I've been following this tutorial in order to develop a chat system to my Laravel application, but some things seem outdated and I'm really new into Handlebars and JS. On step "Creating an interface", I've tried to adapt the code provided in the tutorial to the syntax required in Handlebars 3.0 but everything I get is a blank page. Looks like the Handlebars views are not rendering at all and I'm probably stuck in some very basic issue. Here are my codes. chat.blade.php Laravel 4 Chat shared.js: // 1 var App = Ember.Application.create(); // 2 App.Router.map(function() { this.resource("chat", { "path" : "/chat/" }); }); // 3 App.Message = DS.Model.extend({ "user" : DS.attr("string"), "text" : DS.attr("string") }); // 4 App.ApplicationAdapter = DS.FixtureAdapter.extend(); // 5 App.Message.FIXTURES = [ { "id" : 1, "user" : "Chris", "text" : "Hello World." }, { "id" : 2, "user" : "Wayne", "text" : "Don't dig it, man." }, { "id" : 3, "user" : "Chris", "text" : "Meh." } ]; Thanks in advance!
has answer: http://stackoverflow.com/a/29462280
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46971850
comment on: http://stackoverflow.com/a/29397883
has text: You should be using `.text()` on the anchor tag. Otherwise, you're not escaping the title, opening yourself up to invalid HTML and injection issues.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47061163
comment on: http://stackoverflow.com/a/29446360
type: AnswerComment
score: 0
type: Comment
has text: @RickHitchcock When tried, but the phone and fax send the latest applied param variables (i.e. sendFax). See https://jsfiddle.net/L13ntntv/

http://stackoverflow.com/a/29522928
answers question: http://stackoverflow.com/q/29522629
downvote count: 0
has body: Just do a clearRect() in the same area over your text, in this case I'm going to have the width of that rectangle be the same as the max-width of the text (you can change it if you wish). if (this.checked) { oCtx.font = "15px VonnesReg"; oCtx.fillStyle = "#ff0000"; oCtx.textBaseline = "top"; oCtx.fillText(document.getElementById("iconTel").value, 260, 172, 225); } else { // Clear Text oCtx.fillStyle = "#00ffff"; oCtx.clearRect(260, 172, 225, 15); } Fiddle Example If you have items in the way of the rectangle over the canvas then what you will want to do is redraw your content after you changed the text. If you have a static background on your canvas (one that doesn't change over time), then you just need to save that context at the start and other than clearing the canvas, replace it with the starting context. For example: // Initial Drawing Code initImgData=oCtx.getImageData(0,0,canvas.width, canvas.height); if (this.checked) { ... } else { oCtx.putImageData(initImgData,0,0); } Here is a fiddle for that
score: 1
type: AcceptedAnswer
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/29522629
has comment: http://stackoverflow.com/comment/47201766

http://stackoverflow.com/comment/47702894
type: Comment
has text: Up-voting this answer, as well, because having all options available for debugging code only increases developer fun/satisfaction.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29396073

http://stackoverflow.com/comment/47050148
type: Comment
score: 1
has text: Your code is poorly designed, to start with. You should attach Events only to the pertinent Elements, and use one `$(document).ready()`, then get back to us.
comment on: http://stackoverflow.com/q/29440674
type: QuestionComment

http://stackoverflow.com/q/29499674
has comment: http://stackoverflow.com/comment/47158473
has answer: http://stackoverflow.com/a/29499887
type: UnansweredQuestion
type: Question
has title: escaping \ in jsp's scripts
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/1470768
tagged with: jsp
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29499758
has body: I am searching on a list by value on jquery and did this to escape spaces and find an input based on its values: value.replace(/([^A-Z0-9])/g, '\\$1')) but, after the page is rendered by the server, the result script end up as value.replace(/([^A-Z0-9])/g, '\$1')) notice the replace value has now only one \, and it doesn't work as I wanted. Why the page rendering does that? If I move the JavaScript out of the jsp page, will it still do that once imported into the page?

http://stackoverflow.com/q/29433303
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47036027
tagged with: persistence
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: In page A of my website I setup a var in localStorage, and I can't retrieve it from page B! Pages A and B are in same domain and same subfolder within wwwroot. btr is an array with {7,8,9} for instance. Here is code from page A: var btr= JSON.stringify(btr); localStorage.setItem("btr", btr); Later, before changing location to page B, I try this code: var btr = localStorage.getItem("btr"); var storedbtr = JSON.parse(btr); alert(storedbtr[0]); // This works fine and shows value "7". window.location.href = "http://www.example.com/pageB.html"; Now in page B I have the same code as just above to read the btr value, and I get a btr "null" error. I have read that localStorage is available throughout the entire domain???
has comment: http://stackoverflow.com/comment/47036215
answer count: 0
has comment: http://stackoverflow.com/comment/47036214
tagged with: local-storage
has title: localStorage issue on multiple pages
type: Question
has comment: http://stackoverflow.com/comment/47036080
has comment: http://stackoverflow.com/comment/47036455

http://stackoverflow.com/comment/47191606
score: 0
comment on: http://stackoverflow.com/q/29518200
type: QuestionComment
has text: Have a look at http://www.quirksmode.org/js/contents.html, specifically http://www.quirksmode.org/js/introevents.html, http://www.quirksmode.org/dom/intro.html and http://www.quirksmode.org/js/placejs.html
type: Comment

http://stackoverflow.com/q/29477481
has comment: http://stackoverflow.com/comment/47115930
tagged with: angularjs
linked to: http://stackoverflow.com/q/1773069
linked to: http://stackoverflow.com/q/7837456
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/29477628
possible better answer: http://stackoverflow.com/a/29478163
type: Question
has comment: http://stackoverflow.com/comment/47116101
has title: How to find the match case using for loop in array
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/47115833
has body: I have two arrays var arr1 = [ {'id':'1','name':'test1','value':'star','role':['monitor']}, {'id':'2','name':'test2','value':'player','role':['monitor','Supervisor']}, {'id':'3','name':'test3','value':'saviour','role':['Supervisor']}, {'id':'4','name':'test4','value':'rock','role':['monitor']}, {'id':'5','name':'test5','value':'rocky','role':['boxer','monitor']} ] var arr2 = ['Supervisor','monitor']; I want to get the result where arr2 values is properly matched with arr1 roles values Persons having both the category should be pushed to arr3. So result should be {'id':'2','name':'test2','value':'player','role':['monitor','Supervisor']}. if arr2 has one value then we can use arr1.indexOf(arr2[0])!='-1' but how to satisfy the "and" condition in the for loop.. I don't want to use this if possible, but it's all I can think of: if( arr1.indexOf(arr2[0])!='-1' &amp;&amp; arr1.indexOf(arr2[1])!='-1'){ return arr1[i]; }
answer count: 3
downvote count: 1
has answer: http://stackoverflow.com/a/29478163
tagged with: jquery
has answer: http://stackoverflow.com/a/29478170
favorite count: 0
accepted answer: http://stackoverflow.com/a/29478170

http://stackoverflow.com/comment/47118229
type: QuestionComment
has text: The plugin is for v2 of isotope, not the version you are using. Your main problem is that isotope's masonry layout is designed to layout items like a brick wall (hence "masonry"), i.e., it fits items in where they will fit best, not in specific order. There are other isotope layouts that will layout in order.
score: 0
comment on: http://stackoverflow.com/q/29451228
type: Comment

file
type: Tag
tags question: http://stackoverflow.com/q/29479411
tags question: http://stackoverflow.com/q/29436603
tags question: http://stackoverflow.com/q/29393628
tags question: http://stackoverflow.com/q/29465180
tags question: http://stackoverflow.com/q/29504962
tag name: file
tags question: http://stackoverflow.com/q/29485486
tags question: http://stackoverflow.com/q/29467588
tags question: http://stackoverflow.com/q/29428839
tags question: http://stackoverflow.com/q/29497347
tags question: http://stackoverflow.com/q/29506563
tags question: http://stackoverflow.com/q/29381317
tags question: http://stackoverflow.com/q/29486747

http://stackoverflow.com/a/29405198
has comment: http://stackoverflow.com/comment/46985517
has comment: http://stackoverflow.com/comment/46985718
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/46985644
has comment: http://stackoverflow.com/comment/47023348
score: -1
answers question: http://stackoverflow.com/q/29404396
downvote count: 1
has body: One way to rewrite: if (!flag) {flag = true;} is flag = (!flag ? true: flag ); This is not necessarily better, as an assignment will be made at each iteration.
has comment: http://stackoverflow.com/comment/46985601

http://stackoverflow.com/q/29448021
has answer: http://stackoverflow.com/a/34206826
has answer: http://stackoverflow.com/a/29453059
answer count: 9
has title: Convert strings to numbers in multidimensional array
has body: I have an array MyArray = [ ["Oswaldo","21749"], ["Mao","19580"], ["Angeline",'53692'] ] How do I convert the numbers from strings to actual numbers and save in the same array or in the new one.
accepted answer: http://stackoverflow.com/a/29448062
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29448429
has answer: http://stackoverflow.com/a/77512704
has answer: http://stackoverflow.com/a/29448078
type: Question
has answer: http://stackoverflow.com/a/29448105
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/29448124
possible better answer: http://stackoverflow.com/a/29448427
has answer: http://stackoverflow.com/a/29448062
has answer: http://stackoverflow.com/a/29448427

http://stackoverflow.com/q/29502380
tagged with: javascript
tagged with: ubuntu
has answer: http://stackoverflow.com/a/29505575
favorite count: 0
tagged with: terminal
has answer: http://stackoverflow.com/a/29502595
has comment: http://stackoverflow.com/comment/47163016
type: UnansweredQuestion
upvote count: 1
linked to: http://stackoverflow.com/q/19103735
tagged with: google-chrome
has answer: http://stackoverflow.com/a/29552330
type: Question
has comment: http://stackoverflow.com/comment/47254756
score: 1
has comment: http://stackoverflow.com/comment/47162882
has body: Is it possible for me to write html/css/javascript to have a button that'll open up the terminal program on my computer and run some scripts? The scenario I want is: On my ubuntu laptop, run my node-webkit app, click a button on the screen, a terminal opens, and start executing some scripts. Thanks
tagged with: bash
answer count: 3
has title: Node-webkit app talk to terminal
downvote count: 0

http://stackoverflow.com/q/29510317
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/29511284
has comment: http://stackoverflow.com/comment/47176916
score: 0
has title: How to address data from external url?
has comment: http://stackoverflow.com/comment/47176731
downvote count: 1
tagged with: response
tagged with: javascript
type: UnansweredQuestion
has body: Now I have that code: $(document).ready(function() { $.ajax({ type: "POST", url: "http://steamcommunity.com/market/priceoverview/?currency=3&amp;appid=730&amp;market_hash_name=StatTrak%E2%84%A2%20P250%20%7C%20Steel%20Disruption%20%28Factory%20New%29", data: {}, dataType: "jsonp", crossDomain: true, success: function(data) { console.log(data) } }); }); and get this error: Uncaught SyntaxError: Unexpected token : I can see the right response from the url in my console and tried different dataTypes. What could be wrong?
type: Question
tagged with: external
favorite count: 0
has comment: http://stackoverflow.com/comment/47179780

http://stackoverflow.com/comment/47135527
comment on: http://stackoverflow.com/q/29487946
has text: Yup it's not required. But its a good practice to avoid polluting the global namespace. But the real error is in controller code. OP has a typo in referencing `expenseFactory`
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46949833
comment on: http://stackoverflow.com/a/29385798
has text: I would but its built from the database and i do not have access to the database.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29456897
score: 5
tagged with: javascript
favorite count: 0
upvote count: 5
tagged with: angularjs
answer count: 4
tagged with: cordova
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/45832277
has answer: http://stackoverflow.com/a/31151052
has answer: http://stackoverflow.com/a/30091131
type: Question
has answer: http://stackoverflow.com/a/36219239
has body: I am having trouble converting an image to base64 format that has been selected using the ngCordova imagePicker. To keep things simple, the code provided on the Cordova site (which works) is this: module.controller('ThisCtrl', function($scope, $cordovaImagePicker) { var options = { maximumImagesCount: 10, width: 800, height: 800, quality: 80 }; $cordovaImagePicker.getPictures(options) .then(function (results) { for (var i = 0; i &lt; results.length; i++) { console.log('Image URI: ' + results[i]); } }, function(error) { // error getting photos }); }); The results array returns an array of results like: file///... but how to convert from here? I would like a function that you pass in a value to (the file) and returns the base64 string. Here is a function that attempts this: function convertImgToBase64URL(url, callback, outputFormat){ var canvas = document.createElement('CANVAS'), ctx = canvas.getContext('2d'), img = new Image(); img.crossOrigin = 'Anonymous'; img.onload = function(){ var dataURL; canvas.height = img.height; canvas.width = img.width; ctx.drawImage(img, 0, 0); dataURL = canvas.toDataURL(outputFormat); callback(dataURL); canvas = null; }; img.src = url; }; But how to integrate it into the code? I have tried this (only need to pick one image): $cordovaImagePicker.getPictures(options) .then(function (results) { convertImgToBase64URL(results[0], function(base64Img){ self.chosenImage = base64Img; }); }, function(error) { console.log(error); }); but self.chosenImage gets set to blank. Might be an async issue but how best to resolve it?
has title: Cordova Image Picker convert to base64

http://stackoverflow.com/comment/47128635
score: 0
comment on: http://stackoverflow.com/a/29484292
has text: the problem is not in the event raising because I can achieve another work on page load, my problem just in scrolling down
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47044332
has text: @Jhawins Might be, but when I logged the object in the console I saw that it both contained the variable **and** the function. So I thought there would be a way to call them regardless of the same name,
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29435891

http://stackoverflow.com/a/29466486
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29465414
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29465414
has body: I think that the following changes will fix the issue you have. Change your checkbox code to this: &lt;input type="checkbox" id="id_remove_photograph" name="remove_photograph" class="checkbox_resize" onchange="remove_photograph_change();" photograph-remove-confirm="Your Photograph will be removed only after you save the form!"&gt; Remove Photograph&lt;/input&gt; Change your modal code to this: // START: photograph remove modal code. $('[photograph-remove-confirm]').click(function(ev) { if (!$('#photographRemoveConfirmModal').length) { $('body').append('&lt;div id="photographRemoveConfirmModal" class="modal modal-confirm-small-width hide fade" role="dialog" aria-labelledby="miscConfirmLabel" aria-hidden="true"&gt;&lt;div class="modal-header"&gt;&lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&lt;icon class="icon-remove"&gt;&lt;/icon&gt;&lt;/button&gt;&lt;h4 class="modal-title" id="miscConfirmLabel"&gt;{% trans "Confirm" %} - {% trans "Remove" %} {% trans "Photograph" %}&lt;/h4&gt;&lt;/div&gt;&lt;div class="modal-body"&gt;&lt;/div&gt;&lt;div class="modal-footer"&gt;&lt;button class="btn" data-dismiss="modal" aria-hidden="true"&gt;{% trans "Cancel" %}&lt;/button&gt;&amp;nbsp;&amp;nbsp;&lt;a class="btn-u btn-u-blue" id="photographRemoveConfirmOK"&gt;{% trans "Remove" %} {% trans "Photograph" %}&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;'); } $('#photographRemoveConfirmModal').find('.modal-body').text($(this).attr('photograph-remove-confirm')); $('#photographRemoveConfirmModal').modal({show: true}); return false; }); // FINISH: photograph remove modal code.

http://stackoverflow.com/q/29498657
answer count: 1
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/47160438
has body: I'm trying to make a "Read more/Read less" function with data loaded from a database. My jQuery function works very well with data that already exists in my HTML page but does not work with data loaded from the database. My code: <?php //connexion to data base config while ( /* condition */) { //other config ?> <?php news_affiche_fiche($newsId); ?> <?php } ?> Storea owner Steve Witmere previously arrested for blackmarket bazooka trading. Confesses to involvement in Russian mafia. CSS file: .morecontent span { display: none; } .morelink { display: block; }
tagged with: php
has answer: http://stackoverflow.com/a/29513146
has comment: http://stackoverflow.com/comment/47156094
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47160559
score: 0
type: Question
has title: Jquery (read more/read less) did not work after entire data loaded from dataBase
accepted answer: http://stackoverflow.com/a/29513146
tagged with: javascript
has comment: http://stackoverflow.com/comment/47156415
has comment: http://stackoverflow.com/comment/47156211
has comment: http://stackoverflow.com/comment/47156190

http://stackoverflow.com/q/29387140
has body: I'm working on a piece of code for web development where I have a page that is using a date range and a number range filter of the Google Visualization API. At the same time I'm making use of AngularJS throughout the page. Now, my problem is as follows: I have a table with a certain amount of entries. When applying one of the filters, I would like the number of entries (== # of rows) to be shown somewhere on the HTML page. My intent to realize this is by using the getNumberOfRows() method from the Google API and storing the result in a $scope variable to be used on the page, ideally to be updated every time one of the range filters change state. I have added 3 listeners, one for clicks on table rows (using a selectHandler()) and one to handle state changes of the range filters (using a separate function stateChangeHandler()). I'm storing the value in the variable $scope.numberOfRowsShown. The whole thing works for the clicks (selectHandler). So when clicking a table row, I get the updated correct number of rows shown calling the variable on the HTML page with {{numberOfRowsShown}} (AngularJS). Doing the exact same thing except calling the function and storing it to the variable $scope.numberOfRowsShown inside the stateChangeHandler() does give me the correct output in the console, but it doesn't let me access the variable by calling {{numberOfRowsShown}} anymore. Any ideas? Here's the JS code: function selectHandler() { // this works!! $scope.numberOfRowsShown = table.getDataTable().getNumberOfRows(); }; function stateChangeHandler() { // this does not work.. $scope.numberOfRowsShown = table.getDataTable().getNumberOfRows(); // correct output in the console.. console.log(table.getDataTable().getNumberOfRows()); }; // Setup listener to listen for clicks on table rows and process the selectHandler. google.visualization.events.addListener(table, 'select', selectHandler); // Setup listeners for statechange in the slider range filters. google.visualization.events.addList…
has title: AngularJS & Google Visualization - Visibility of $scope variables (JS) on an HTML page using a state change handler (Google API)
tagged with: google-visualization
has answer: http://stackoverflow.com/a/31343655
answer count: 1
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/31343655
tagged with: angularjs
favorite count: 0
score: 2
upvote count: 2
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/47206461
has text: Vohuman, the answer to your question is "because I don't know a thing about JS". Thank you for the information, I'll keep that in mind.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29525608
score: 0

http://stackoverflow.com/comment/47184710
type: Comment
comment on: http://stackoverflow.com/a/29514196
has text: Thanks @Richard , I tried this .. I am getting undefined something like this js-bson: Failed to load c++ bson extension, using pure JS version Connected correctly to server undefined
type: AnswerComment
score: 0

http://stackoverflow.com/q/29423229
tagged with: html-parsing
type: Question
accepted answer: http://stackoverflow.com/a/29423376
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
tagged with: parsing
favorite count: 0
has answer: http://stackoverflow.com/a/29423376
has body: What I am doing: In NodeJS I am creating an email template by using MustacheJS, using data from an array of JSON objects. The text/message that goes in the template can contain text along with basic html tags (such as b p & a). Due to limitation of space I need to only show an excerpt of the message. For that I do a word count, and after lets say 20 words (checked by spaces) I truncate the string and append View more anchor tag. This links it to the website's post page, that contains the complete post. Something like: Hey this is a sample post text message. Lorem ipsum dolor sit amit... View more The problem: During word count and truncation, it is possible that I truncate the string in between an html tag as I am simply calculating words on basis of space. Something like: I am sharing a link with you. <a style="color:... View more Now this will break the html. Possible solution: Before truncating string, run a regex on it to find all the html tags in it. Use indexOf() (or some other method) to find starting and ending indices of each tag. After word count, get the index where I need to truncate it. Now see that if the index intersects with any of the tags region. If it does intersect, simply move the truncate index to the start or end of the html tag. Question: Is there a better way to do this. I don't know what search terms I should be searching on google, to get help with this. P.S. The code is flexible and I can change the flow if there is a significantly better solution. Also, I am not good with post titles. If you can, please modify it to something that reflects the question. EDIT: This is what I came up with after Alex's answer. Hope it helps someone else: /** * Counter: Takes a string and returns words and characters count * @param value * @returns obj: { * 'wordCount': (int), * 'totalChars': (int), * 'charCount': (int), * 'charCountNoSpace': (int) * } */ var counter = function(value){ var regex = /\s+/gi; if (!value.length) { return { wordCount: 0, totalCha…
upvote count: 1
has title: How do I break up a string without creating malformed HTML tags?
tagged with: node.js
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/29456614
has body: Two ways to recreate material, one is open your model file and change material here in source file manually. Or when usilg object loader or json loader, use "for" syntax to go trough each material and set another values var jsonLoader = new THREE.JSONLoader(); jsonLoader.load(model, addthree1ToScene); function addthree1ToScene( geometry, materials ) { var materiall = new THREE.MeshFaceMaterial( materials ); for ( var i = 0; i &lt; materials.length; i ++ ) { var material = materials[i]; material.side = THREE.DoubleSide; /// there you can set attributes } three1 = new THREE.Mesh( geometry, materiall ); three1.position.set(x,y,z); scene.add( three1 ); console.log(three1); }
answers question: http://stackoverflow.com/q/29446991
score: 0
type: Answer

http://stackoverflow.com/comment/47087429
has text: By looking at your code, all your logic is inside the click event on your `.add_button` element. You might have to post more of your code on here that way we can see what you're trying to achieve here.
type: AnswerComment
comment on: http://stackoverflow.com/a/29461766
type: Comment
score: 0

http://stackoverflow.com/q/29405780
type: Question
has answer: http://stackoverflow.com/a/29407078
tagged with: javascript
has comment: http://stackoverflow.com/comment/46986408
downvote count: 0
has answer: http://stackoverflow.com/a/29405810
has answer: http://stackoverflow.com/a/29406552
has title: Javascript Date to String Conversion
has answer: http://stackoverflow.com/a/29406271
favorite count: 0
answer count: 5
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29405998
upvote count: 1
has body: I have string 02-APR-15 11:08 AM which i have to convert DateTime format in javascript.I am used var date = Date.parse('02-APR-15 11:08 AM'); alert(date); which shows NaN .How to convert this string to DateTime Format.

http://stackoverflow.com/comment/47201286
type: Comment
comment on: http://stackoverflow.com/a/29523199
type: AnswerComment
has text: $('#sentence').text("Your favourite animals are ");
score: 0

http://stackoverflow.com/a/29514472
type: Answer
has comment: http://stackoverflow.com/comment/47186677
downvote count: 1
has comment: http://stackoverflow.com/comment/47220639
has comment: http://stackoverflow.com/comment/47216831
has comment: http://stackoverflow.com/comment/47221315
answers question: http://stackoverflow.com/q/29513779
upvote count: 0
has comment: http://stackoverflow.com/comment/47221784
score: -1
has body: You should be able to make the OData call synchronously by passing async as false to ODataModel method read. E.g: oModel.read{"path", {async: false}}; If you implement this inside utils.oDataCalls.read, it might also require reworking the promise in that function.

x-editable
tags question: http://stackoverflow.com/q/29474136
type: Tag
tag name: x-editable
tags question: http://stackoverflow.com/q/29501452
tags question: http://stackoverflow.com/q/29395588
tags question: http://stackoverflow.com/q/29393784
tags question: http://stackoverflow.com/q/29516446

http://stackoverflow.com/a/29457012
answers question: http://stackoverflow.com/q/29456980
has body: Why not using document.querySelectorAll for this. It is wide supported: http://caniuse.com/#feat=queryselector And it is easy to query like in css style. Hope it help. Here is the documentation of how to use it: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll Also can be interested in this for selecting single item: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector var childNodes = document.querySelectorAll("#menu &gt; li");
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47078631
type: Answer

http://stackoverflow.com/q/29413581
tagged with: javascript
has answer: http://stackoverflow.com/a/29413732
favorite count: 0
type: Question
tagged with: time
has title: input time in 24h:mm format cross-browser
tagged with: http://stackoverflow.com/tag/html
tagged with: input
tagged with: css
accepted answer: http://stackoverflow.com/a/29422782
upvote count: 2
answer count: 2
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29422782
possible better answer: http://stackoverflow.com/a/29413732
downvote count: 0
has body: I am trying to create a cross-browser time input. &lt;input type="time" value="22:14" tabindex="0"&gt;&lt;/input&gt; The problem is it decides whether to display time in am/pm format or in 24h format on its own. And some browsers do not support it and display a text input instead. Is there a library for this purpose? Or the only way is to write a custom script for a text input to make it look like a time input?

http://stackoverflow.com/a/52848281
answers question: http://stackoverflow.com/q/29375188
score: 0
type: Answer
has body: I faced the same problem while using Datatable in a Laravel application. But in my case, I fixed it by changing the CSS of the bootstrap-datetimepicker.min.css Problem: Changed the following code: .bootstrap-datetimepicker-widget.dropdown-menu { display:block; margin:2px 0; padding:4px; width:19em } to .bootstrap-datetimepicker-widget.dropdown-menu { display:block; margin:2px 0; padding:4px; width:21em } file directory: \public\plugins\datepicker\bootstrap-datetimepicker.min.css After fixing:

http://stackoverflow.com/comment/47087919
has text: @Mikey It did solve the OP's problem though. Seriously.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29457580
type: Comment

http://stackoverflow.com/q/29514400
has answer: http://stackoverflow.com/a/29515363
has answer: http://stackoverflow.com/a/29514553
tagged with: vb.net
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47188238
accepted answer: http://stackoverflow.com/a/29515363
has body: So I have my post method like such: &lt;form method = "post"&gt; And in the post, I have this: &lt;input name="insertInto" type="submit" value="Insert"&gt; To "catch" that the Insert button has been clicked, I used this in my VB.NET code: If (request.Form("insertInto") = "Insert") End If Now this works near perfectly...except when I refresh the page. When I refresh the page, the post seems to "post" again. As in, the Insert button seemingly gets hit again just by me simply refreshing the page. How do I prevent this?
type: Question
answer count: 2
has title: Refreshing causes my post to "post" again
tagged with: javascript
tagged with: asp.net
score: 0
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/12353461
possible better answer: http://stackoverflow.com/a/29514553

http://stackoverflow.com/comment/47235375
type: AnswerComment
score: 0
type: Comment
has text: Hmm, I don't really get that. If i passed in a regular function, I wouldn't have to use that getter. Why is passing a function that returns a function requiring one? I mean, in plain JS, passing a function name (like `documentSave`) should be equivalent to passing a function that returns a function (like `documentSave('name')`). Does Angular have special logic that wraps it in this manner?
comment on: http://stackoverflow.com/a/29526061

http://stackoverflow.com/q/29457035
has body: While working with React Native I noticed some strange convention by its' contributors and in examples - to leave trailing comma everywhere, as an example: http://url.brentvatne.ca/1hCiI https://github.com/facebook/react-native/blob/master/Examples/Movies/MoviesApp.js#L20-L24 What's the point?
downvote count: 0
tagged with: jshint
type: Question
has answer: http://stackoverflow.com/a/49211305
has answer: http://stackoverflow.com/a/29457068
accepted answer: http://stackoverflow.com/a/29457068
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29457094
upvote count: 3
answer count: 3
favorite count: 0
tagged with: conventions
has title: React Native - What's the point of leaving trailing comma everywhere?
has answer: http://stackoverflow.com/a/29457094
type: AnsweredQuestion
score: 3
tagged with: react-native

http://stackoverflow.com/q/29424013
has comment: http://stackoverflow.com/comment/47037959
has comment: http://stackoverflow.com/comment/47274585
favorite count: 0
score: 13
type: AnsweredQuestion
tagged with: performance
downvote count: 0
accepted answer: http://stackoverflow.com/a/29562128
has title: Strange JavaScript performance
type: Question
has body: When I was implementing ChaCha20 in JavaScript, I stumbled upon some strange behavior. My first version was build like this (let's call it "Encapsulated Version"): function quarterRound(x, a, b, c, d) { x[a] += x[b]; x[d] = ((x[d] ^ x[a]) &lt;&lt; 16) | ((x[d] ^ x[a]) &gt;&gt;&gt; 16); x[c] += x[d]; x[b] = ((x[b] ^ x[c]) &lt;&lt; 12) | ((x[b] ^ x[c]) &gt;&gt;&gt; 20); x[a] += x[b]; x[d] = ((x[d] ^ x[a]) &lt;&lt; 8) | ((x[d] ^ x[a]) &gt;&gt;&gt; 24); x[c] += x[d]; x[b] = ((x[b] ^ x[c]) &lt;&lt; 7) | ((x[b] ^ x[c]) &gt;&gt;&gt; 25); } function getBlock(buffer) { var x = new Uint32Array(16); for (var i = 16; i--;) x[i] = input[i]; for (var i = 20; i &gt; 0; i -= 2) { quarterRound(x, 0, 4, 8,12); quarterRound(x, 1, 5, 9,13); quarterRound(x, 2, 6,10,14); quarterRound(x, 3, 7,11,15); quarterRound(x, 0, 5,10,15); quarterRound(x, 1, 6,11,12); quarterRound(x, 2, 7, 8,13); quarterRound(x, 3, 4, 9,14); } for (i = 16; i--;) x[i] += input[i]; for (i = 16; i--;) U32TO8_LE(buffer, 4 * i, x[i]); input[12]++; return buffer; } To reduce unnecessary function calls (with parameter overhead etc.) I removed the quarterRound-function and put it's contents inline (it's correct; I verified it against some test vectors): function getBlock(buffer) { var x = new Uint32Array(16); for (var i = 16; i--;) x[i] = input[i]; for (var i = 20; i &gt; 0; i -= 2) { x[ 0] += x[ 4]; x[12] = ((x[12] ^ x[ 0]) &lt;&lt; 16) | ((x[12] ^ x[ 0]) &gt;&gt;&gt; 16); x[ 8] += x[12]; x[ 4] = ((x[ 4] ^ x[ 8]) &lt;&lt; 12) | ((x[ 4] ^ x[ 8]) &gt;&gt;&gt; 20); x[ 0] += x[ 4]; x[12] = ((x[12] ^ x[ 0]) &lt;&lt; 8) | ((x[12] ^ x[ 0]) &gt;&gt;&gt; 24); x[ 8] += x[12]; x[ 4] = ((x[ 4] ^ x[ 8]) &lt;&lt; 7) | ((x[ 4] ^ x[ 8]) &gt;&gt;&gt; 25); x[ 1] += x[ 5]; x[13] = ((x[13] ^ x[ 1]) &lt;&lt; 16) | ((x[13] ^ x[ 1]) &gt;&gt;&gt; 16); x[ 9] += x[13]; x[ 5] = ((x[ 5] ^ x[ 9]) &lt;&lt; 12) | ((x[ 5] ^ x[ 9]) &gt;&gt;&gt; 20); x[ 1] += x[ 5]; x[13] = ((x[13] ^ x[ 1]) &lt;&lt; 8) | ((x[13] ^ x[ 1]) &gt;&gt;&gt; 24); x[ 9] += x[13]; x…
has answer: http://stackoverflow.com/a/29562128
answer count: 1
tagged with: javascript
upvote count: 13

http://stackoverflow.com/comment/46964169
has text: Thanks alot ,that worked. is there a reason i should not let javascript throw out HTML commands? @ray
comment on: http://stackoverflow.com/a/29393239
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46946915
comment on: http://stackoverflow.com/q/29384207
type: Comment
type: QuestionComment
score: 1
has text: Yes. Its in the HTML tag.

http://stackoverflow.com/q/29389042
tagged with: php
type: AnsweredQuestion
has title: Php\Javascript web-app on Windows 8.1 issue
score: 0
type: Question
has answer: http://stackoverflow.com/a/29515764
tagged with: windows-8
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 1
accepted answer: http://stackoverflow.com/a/29515764
has body: I have small web-app in PHP with some minor Javascript i wrote on Windows 7 using XAMPP as server which was showing spinner when Ajax was loading. It worked fine on Win7. Now when i'm setting same environtment on Windows 8.1 the loading spinner is : in case of IE11, always running in left-bottom region of the page. in case of other browsers it's firstly hidden but when i run one and only Javascript function it pop up in left-bottom region and stays there same as with IE11. Anyone could point me what i'm doing wrong and what i'm missing so it would behave normally? here's code: php page element : Trwa ładowanie, proszę czekać... Javascript: jQuery.fn.center = function () { this.css("position","absolute"); this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px"); this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px"); return this; } $(function() { // pokaż spinner w czasie wykonywania żądań AJAX $('#ajaxLoading') .hide() .ajaxStart(function() { $(this).center(); $(this).show(); }) .ajaxStop(function() { $(this).hide(); }) ; }); function usunpoz(idnadstan, link) { var odp = confirm("Czy na pewno chcesz usunąć tą pozycję?"); if(odp) { $.post( "nadstan.usun.php", { id : idnadstan}, function(response) { if(response == 'ok') { $(link).parent().parent().find('td').css('textDecoration', 'line-through'); $(link).parent().html(""); location.reload(); } else { alert('Wystąpił błąd przy przetwarzaniu zapytania. Prosimy spróbować ponownie.'); } } ); } } Thank you in advance.

http://stackoverflow.com/a/29452931
answers question: http://stackoverflow.com/q/29452870
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47071509
has body: Without jQuery: You could listen to the element's input event, match the characters following the . character, and then set the value of the sibling select element: Updated Example document.getElementById('domain').addEventListener('input', function (e) { var match = e.target.value.match(/\.(?=[A-Za-z])[A-Za-z]{2,3}/g); e.target.nextElementSibling.value = match ? match[0].toLowerCase() : ''; }); .com .net .org Without regex, you could also use the following: Updated Example document.getElementById('domain').addEventListener('input', function (e) { var match = e.target.value.split('.'); e.target.nextElementSibling.value = match ? '.' + match[match.length - 1].toLowerCase() : ''; }); Original Code .com .net .org
upvote count: 1
type: Answer

http://stackoverflow.com/a/29414087
answers question: http://stackoverflow.com/q/29400881
accepted answer of: http://stackoverflow.com/q/29400881
has body: you are given time parameter as 19hr 2min 53sec 948671msec and 1second = 1000 millisecond when you convert the above milliseconds to standard time it is 948671 millisecond = 15min 48sec 671millisecond when you add this millisecond parameter to your time parameter it would be, 19hr 2min 53sec + 0hr 15min 48sec 671millisecond ----------------------------------------- 19hr 18min 41sec 671millisecond ----------------------------------------- google app script will automatically sort the time constraint. thats why you get different time in input and output of script.
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/47134106
comment on: http://stackoverflow.com/a/29486357
type: AnswerComment
score: 0
type: Comment
has text: I updated my JSBin [here](http://jsbin.com/zibegejade/1/). You simply had a lot of errors in your JavaScript. Always leave your developer console open when you're writing JavaScript so you can see and fix errors.

http://stackoverflow.com/comment/47093082
type: Comment
type: QuestionComment
score: 0
has text: I was just directing you to the correct syntax instead of giving you the answer so that you would learn. Nothing else. If you would have specified the resources you used I wouldnt have commented. :)
comment on: http://stackoverflow.com/q/29464688

http://stackoverflow.com/comment/47119667
has text: Ok, let me look into that.
type: AnswerComment
comment on: http://stackoverflow.com/a/29463960
type: Comment
score: 0

http://stackoverflow.com/comment/47188278
comment on: http://stackoverflow.com/q/29515485
score: 0
type: Comment
type: QuestionComment
has text: @ElliotM How do I find those?

http://stackoverflow.com/comment/47086354
type: QuestionComment
has text: Java ! == javascript
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29461096

http://stackoverflow.com/comment/46952949
type: Comment
type: QuestionComment
score: 1
has text: You're actually focusing the textbox every millisecond, but when you click the "Ok" button you're blurring it, therefore you're in an endless loop. you should rather listen to the change event or to the input event instead.
comment on: http://stackoverflow.com/q/29387368

http://stackoverflow.com/comment/46958388
score: 0
type: AnswerComment
has text: @RoryMcCrossan:- Updated my answer to remove it from the DOM as well.
comment on: http://stackoverflow.com/a/29390452
type: Comment

http://stackoverflow.com/comment/47228533
has text: No problem. :) I had lot of this madness in my life... :D
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29526186
type: AnswerComment

http://stackoverflow.com/a/29433559
accepted answer of: http://stackoverflow.com/q/29395263
answers question: http://stackoverflow.com/q/29395263
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: Ok, I found a way to dispaly a simple D3 bar chart in my Active Admin pages. This is what I did to display the chart in to the /admin/users page: #app/admin/user.rb ActiveAdmin.register User do ... collection_action :data, :method => :get do respond_to do |format| format.json { render :json => [1,2,3,4,5] } end end #app/views/admin/_charts.html.erb User chart Then, to display it the dashboard : #app/admin/dashboard.rb ActiveAdmin.register_page "Dashboard" do ... section do div do render 'admin/users/charts' end end ... end I hope this will be usefull for you. Now, I am going to try to pass data to another kind of chart.
type: Answer

http://stackoverflow.com/comment/138035915
comment on: http://stackoverflow.com/a/43133108
type: Comment
score: 1
type: AnswerComment
has text: This answer should be edited to clearly state that the download will NOT be managed by the browser, which leads to unexpected behavior (from the standpoint of a junior engineer).

http://stackoverflow.com/a/29475105
type: Answer
has body: I would set the div as fixed always and define a height size, and the only change I would do if I want to start any effect. header{ position: fixed; width: 100%; height: 108px; // set animation -webkit-transition: all 0.4s ease; transition: all 0.4s ease; } Look here for more info: http://www.webdesignerdepot.com/2014/05/how-to-create-an-animated-sticky-header-with-css3-and-jquery/
score: 0
answers question: http://stackoverflow.com/q/29474835

http://stackoverflow.com/comment/47103413
type: QuestionComment
comment on: http://stackoverflow.com/q/29470240
has text: @ArunPJohny - Argh I see what you mean now, your example makes perfect sense and Thank you so much for the fiddle. Can you add it as an answer so I can mark it solved?
score: 0
type: Comment

http://stackoverflow.com/comment/47093788
comment on: http://stackoverflow.com/a/29465284
type: Comment
has text: I've updated the answer now. You mean that if any element has itemId filled, then move it to the last?
score: 0
type: AnswerComment

http://stackoverflow.com/q/29378730
has body: Been searching for Tutorials, videos or examples of Thunderbird add-ons programming using Mozilla Jetpack Anybody know of a good source for tutorials/videos/examples for Thunderbird add-ons programming using Mozilla Jetpack I've been searching through the net and cant find nothing that is relevant, actual (less than a year old) and well explained (good examples)... ?anybody know of a good source of info about this... Please do not point to MDN or other Mozilla sites... no good samples there for Thunderbird... just a few usable samples for Firefox...
favorite count: 0
answer count: 0
type: UnansweredQuestion
has title: Tutorials/video/examples for Thunderbird add-ons programming using Mozilla Jetpack
score: 1
tagged with: mozilla
type: Question
tagged with: javascript
upvote count: 1
tagged with: email
downvote count: 0

http://stackoverflow.com/a/29383240
upvote count: 3
has comment: http://stackoverflow.com/comment/46946756
has comment: http://stackoverflow.com/comment/46947647
has comment: http://stackoverflow.com/comment/46947077
type: Answer
has comment: http://stackoverflow.com/comment/46946657
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/29383013
has comment: http://stackoverflow.com/comment/46949902
has comment: http://stackoverflow.com/comment/46947054
has comment: http://stackoverflow.com/comment/46946592
has body: In a function you can only return ONE value. You should concatenate the results for each iteration and then return $productId= ""; foreach($cart-&gt;getAllItems() as $item) { $productId.= $item-&gt;getProduct()-&gt;getId(); $productPrice = $item-&gt;getProduct()-&gt;getFinalPrice(); } return 'ID: '.$productId; or use an array $productId =array(); foreach($cart-&gt;getAllItems() as $item) { $productId['id']= $item-&gt;getProduct()-&gt;getId(); $productId['price'] = $item-&gt;getProduct()-&gt;getFinalPrice(); } $productId =array_filter($productId); //remove empty array for($index=0; $index&lt;count($productId); $index++){ echo $productId[$index]['id']; echo $productId[$index]['price']; }

http://stackoverflow.com/comment/47176001
comment on: http://stackoverflow.com/a/29508566
has text: Hello @RameshRajendran offcause it's worked. I am Date object so it's checked if leave use 366 days otherwise 365 days in year.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29430830
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29431440
favorite count: 0
linked to: http://stackoverflow.com/q/26346263
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29433531
upvote count: 1
has body: I want to use an event handler to redirect a user to another route in reactJS but I have not figured out how i can pass down it's props to the event handler function. &lt;button onClick={ChallengeActions.OpenChallenge(item.title) }&gt;Start&lt;button&gt; This is what my event listener looks like onOpenChallenge: function(url) { window.location.href = url; } The problem is that the function automatically fires up whenever i load the page instead of waiting for the event handler, I also get the following error. Uncaught Error: Invariant Violation: Expected onClick listener to be a function, instead got type object
has title: how to pass props to a function from a button in reactjs
score: 1
has comment: http://stackoverflow.com/comment/47033018
type: Question
tagged with: reactjs
answer count: 2

http://stackoverflow.com/q/29455837
accepted answer: http://stackoverflow.com/a/29455934
has title: have multiple snap-drawes and snap-contents in a page
type: AnsweredQuestion
type: Question
downvote count: 0
tagged with: snap.js
tagged with: javascript
has answer: http://stackoverflow.com/a/29455934
answer count: 1
score: 1
favorite count: 0
has body: I have a list of movies in a page, and I want to add slide left to show movie times and slide right to show movie cinemas. I tried to have snap-drawers and snap-content for each item in the list, but that didn't work. Does anyone have idea how to make that possible. The code: http://plnkr.co/edit/eFMdPBlWRKbCNYN3tzPx?p=preview Movie times Movie cinemas Movie 1 Movie times Movie cinemas Movie 2 Movie times Movie cinemas Movie 3 Thanx,
tagged with: angularjs
upvote count: 1

http://stackoverflow.com/comment/47143291
has text: Generally, I prefer documenting everything carefully so the user knows what to expect and allowing more flexibility than having obscure actions happening in the background to surprise the user. Have a look at the node API, I think it's a good example of how things should be done. This is a recurring issue when you have connections that need to be established and usually this is the way to handle it (either callbacks or events).
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29490597

http://stackoverflow.com/comment/46949937
score: 1
type: QuestionComment
has text: @Jasper ... he is asking how to do it....
comment on: http://stackoverflow.com/q/29385749
type: Comment

http://stackoverflow.com/comment/47097095
has text: I have just tried the link but it lead me nowhere as well :-(
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29467123

http://stackoverflow.com/q/29404605
score: -3
upvote count: 1
type: Question
has title: How to Implement Cut,Copy and Paste functions in Javascript
tagged with: javascript
downvote count: 4
has answer: http://stackoverflow.com/a/29404701
has body: I have an visual Tree in which I have to apply Cut,Copy and paste functions to cut the vertex,copy the vertex and paste it. I want the code to work in IE. Could someone help me in code for cut,copy and paste in java script. Thanks in Advance
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/29469630
accepted answer of: http://stackoverflow.com/q/29469341
has comment: http://stackoverflow.com/comment/47101759
upvote count: 1
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29469341
downvote count: 0
score: 1
has body: There are display:inline-box; not supported in Mozilla. So, you can done this type of code: .maincontainer{ display:inline-block; } .event_image{ display:inline-block; vertical-align: top; } .event_content{ display:inline-block; vertical-align: top; } .plus{ display:inline-block; vertical-align: top; }

http://stackoverflow.com/a/29375532
score: 0
has comment: http://stackoverflow.com/comment/46947252
has comment: http://stackoverflow.com/comment/46938806
type: Answer
has body: This _instance object, is it part of some framework? or is it just some local variable somewhere and you don't know how it was created? Regardless, if its dispatchEvent method behaves as defined in the EventTarget interface, then the object referenced by _instance is the target. An object doesn't need to be a node, or in the DOM, to be a valid event target, it only needs to implement EventTarget. For example, XHR objects and EventSource objects can listen to DOM events, yet those events will not traverse the HTML DOM to get there. Can you not just add your listener to _instance or keep a global reference to _instance?
answers question: http://stackoverflow.com/q/29374694
has comment: http://stackoverflow.com/comment/46957412
has comment: http://stackoverflow.com/comment/47004075

http://stackoverflow.com/comment/79535732
type: AnswerComment
type: Comment
has text: @Pacerier also your link is not the right one, I think you meant https://stackoverflow.com/questions/154724/when-would-you-use-a-weakhashmap-or-a-weakreference/25241986#comment56035762_25241986
comment on: http://stackoverflow.com/a/29413402
score: 0

http://stackoverflow.com/q/29442889
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47053597
has title: Trying to learn For loops the right way
tagged with: node.js
has body: I've been teaching my self Node.JS recently, and its been fun. However I've hit a road block that is really killing me here. I've come to realize that I can't wrap my head around For loops in JS. Whenever I've gone to use for loops I end up just using jquery $.each() to spare my head. Well I can't rely on .each for what I'm attempting and I'm stuck trying to wrap my head around For loops. Here is what I'm working with. Just for some context, I've been playing around with websockets in node.js. Its a lot of fun! I started with the standard ChatApp that you find everywhere, and now I'm attempting to build a multiplayer Tic-Tac-Toe game. When a player clicks on the grid, the grid choice is stored in a list inside the player object on the node.js websocket server. The last thing I'm trying to do is compare the list of picked board nodes to a master list of possible tic-tac-toe solutions: //i'm sure this can be formatted better.... var solutions = { 'vert':{ 1:[[0,0],[0,1],[0,2]], 2:[[1,0],[1,1],[2,1]], 3:[[2,0],[2,1],[2,2]] }, 'hor':{ 1:[[0,0],[1,0],[2,0]], 2:[[0,1],[1,1],[2,1]], 3:[[0,2],[1,2],[2,2]] }, 'diag':{ 1:[[0,0],[1,1],[2,2]], 2:[[2,0],[1,1],[0,2]] } }; // player selected grid coordinates var player1 = { 'picked':[[0,0],[1,1],[2,2]] }; // the big dumb function that I hate. function winCondition(solutions){ var win = ''; console.log('-------------------------------------------------------'); if(win === ''){ $.each(solutions, function(index, solution){ $.each(solution, function(index, winCon){ console.log('testing Win Condition ' + index,winCon); matches = 0; if(matches !== 3){ console.log('current match value = ' + matches); $.each(winCon, function(index, gridSlot){ console.log('Testing ' + index,gridSlot); $.each(player1.picked, function(index,gridChoice){ console.log('does '+ gridSlot + ' = ' + gridChoice); if(gridSlot[0] == gridChoice[0] &amp;&amp; gridSlot[1] == gridChoice[1]){ matches = matches + 1; console.log('match! ' + matches + '/3 left'); if(matches =…
score: 1
has comment: http://stackoverflow.com/comment/47060226
upvote count: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29443247
has comment: http://stackoverflow.com/comment/47053604
answer count: 1

http://stackoverflow.com/q/29482617
tagged with: kendo-ui
type: Question
tagged with: http://stackoverflow.com/tag/html
upvote count: 1
has answer: http://stackoverflow.com/a/29482826
has title: Kendo Ui Grid disable button when in edit inline mode
has body: I have a kendo grid with create, edit and delete buttons. I also have a next button outside the grid. What I want to do is prevent the user from clicking on the next button, if the user doesn't at least create/edit one record first. Next Back app.controller('inputFiscalYearController', ['$scope', function ($scope) { $scope.isDisabled = false; $scope.gridOptionsFiscalYear = { toolbar: ["create"], editable: true, pageable: true, edit: function(){ alert(); }, columns: [ { field: "Name", title: "Name", width: "250px", }, { field: "Surname", title: "Surname", width: "250px", }, { title: "", command: ["edit", "destroy"], width: "105px" }, ], editable: "inline", dataSource: { data: [ ], pageSize: 10, schema: { model: { id: "id", fields: { id: { editable: false }, Name: { type: "string", validation: { required: { message: "*Required" } } }, Surname: { type: "string", validation: { required: { message: "*Required" } } }, } } } }, } }]);
tagged with: kendo-grid
answer count: 1
tagged with: button
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 1
favorite count: 0

http://stackoverflow.com/a/29423590
has comment: http://stackoverflow.com/comment/47018977
has comment: http://stackoverflow.com/comment/47019182
has comment: http://stackoverflow.com/comment/47020444
has comment: http://stackoverflow.com/comment/47043757
has comment: http://stackoverflow.com/comment/47042426
has comment: http://stackoverflow.com/comment/47033589
answers question: http://stackoverflow.com/q/29423501
score: 0
has body: You have several problems 1) You're not getting updated airport code on button click 2) input variable is the html control and the the airport code itself. You have to use ìnput.value function capable() { var input = document.getElementById("input"); var airportNumber = airports[input.value]; // get user airport code input.toLowerCase; alert(airportNumber) if (airportNumber &gt;= 10200) { alert("YES") } else { alert("NO") } } BTW: there is no need to do a global loading of input as you do on the second line, I moved that logic to capable method
has comment: http://stackoverflow.com/comment/47019257
type: Answer
has comment: http://stackoverflow.com/comment/47041325
has comment: http://stackoverflow.com/comment/47020528
has comment: http://stackoverflow.com/comment/47039756

http://stackoverflow.com/q/29393170
has body: I have a text box and Search Button in UI. I want to validate it like only Numbers should be entered on button click. I didn't use it in Form(I got to know lot of ways to validate form control). But simply i've designed it(independent) in my div. So can you pls guide me to validate my control in Angular. Please enter the Movie Id
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29393280
has comment: http://stackoverflow.com/comment/46963030
has title: How to validate text box in Angular js
type: Question
tagged with: javascript
tagged with: angularjs-validation
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/47111141
comment on: http://stackoverflow.com/q/29474865
score: 1
has text: assumes that a calendar will even show up. Not all browsers do. Would use datepicker plugin for this myself and use the API to set second date
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47284785
comment on: http://stackoverflow.com/q/29493496
type: Comment
type: QuestionComment
score: 0
has text: Can't reproduce in Firefox 37.0.1 on OS X.

http://stackoverflow.com/a/29562128
accepted answer of: http://stackoverflow.com/q/29424013
answers question: http://stackoverflow.com/q/29424013
type: AcceptedAnswer
score: 28
has body: Regression happens because you hit a bug in one of the passes in V8's current optimizing compiler Crankshaft. If you look at what Crankshaft does to the slow "inlined" case, you will notice that getBlock function constantly deoptimizes. To see that you can either just pass --trace-deopt flag to V8 and read the output it dumps to the console or use a tool called IRHydra. I collected V8 output for both inlined and uninlined cases, you can explore in IRHydra: inlined case: http://mrale.ph/irhydra/2/#gist:1fefdc70567a924d4cf2 encapsulated case: http://mrale.ph/irhydra/2/#gist:be3de64f860c78ca640b Here is what it shows for "inlined" case: Each entry in the function list is a single optimization attempt. Red color means that optimized function later deoptimized because some assumption made by an optimizing compiler was violated. This means getBlock is constantly optimized and deoptimized. There is nothing like this in the "encapsulated" case: Here getBlock is optimized once and never deoptimizes. If we look inside getBlock we will see that it is array load from Uint32Array that deoptimizes because result of this load is a value that does not fit into int32 value. The reasons for this deopt are a bit convoluted. JavaScript's only number type is a double precision floating point number. Doing all calculations with it would be somewhat inefficient so optimizing JITs usually try to keep integer vlaues represented as actual integers within optimized code. Crankshaft's widest integer representation is int32 and half of uint32 values are not representable in it. To partially mitigate this limitation Crankshaft performs an optimization pass called uint32 analysis. This pass tries to figure out whether it is safe to represent uint32 value as an int32 value - which is done by looking at how this uint32 value is used: some operations, e.g. bitwise ones, do not care about the "sign" but only about individual bits, other operations (e.g. deoptimization or convertion from integer to do…
type: Answer
downvote count: 0
upvote count: 28

http://stackoverflow.com/comment/47100149
has text: Yes, it did work for chrome. But for sure it is better to do it from code, that is not a good solution to ask customers do this for their browsers. Now that it is worked for chrome and IE from browser settings how can I do that from script or code ? Firefox is now working for now (I believe it will be fixed once I could do it from code or script)
score: 0
comment on: http://stackoverflow.com/q/29428672
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29488192
favorite count: 0
tagged with: css
downvote count: 0
has comment: http://stackoverflow.com/comment/47137729
score: 6
tagged with: scroll
has comment: http://stackoverflow.com/comment/47135799
has comment: http://stackoverflow.com/comment/47135881
tagged with: google-chrome
type: Question
has title: .scroll() function positioning flickering in google chrome after its last update
has answer: http://stackoverflow.com/a/29489490
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29489490
has comment: http://stackoverflow.com/comment/47135676
has comment: http://stackoverflow.com/comment/47136892
has comment: http://stackoverflow.com/comment/47136358
has comment: http://stackoverflow.com/comment/47136917
answer count: 1
upvote count: 6
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47136906
has body: to be honest, i'm a little bit desperate. After my Google Chrome Browser updated – from i think Version 39 to 41 – one of my clients websites is absolutely disfigured in Chrome. You can see it here: http://prinovis-media-day.com/ If you scroll down, all the »parallax« elements are flickering. I've checked it on my macbook on Version 39 — it's absolutely fine in Version 39. Basically, what i'm doing to create this effect is very simple: $("window").scroll(function(){ var move_value = Math.round(scroll_top * 0.3); var opacity_value = *some other value*; $(".parallax-container__content").css({ 'opacity': opacity_value, 'padding-top': move_value +'px' }); }); Does anyone know whats the matter? It worked like a charm before this update... Thanks a lot in advance, i really appreciate any answer!

http://stackoverflow.com/q/29502141
has comment: http://stackoverflow.com/comment/47166955
downvote count: 0
has comment: http://stackoverflow.com/comment/50810879
tagged with: jquery
favorite count: 0
has title: YouTube API causing "an error occurred" message on IE9 and IE10
upvote count: 2
type: UnansweredQuestion
tagged with: youtube
score: 2
answer count: 0
has comment: http://stackoverflow.com/comment/47162470
type: Question
has body: Basically I'm using YouTube API and when you click on the first video in the library, it plays fine, when the second thumbnail is clicked, however, I'm receiving "an error occurred" message. It's as if the video didn't exit. It works fine on IE11 and all other browsers. (function () { $('#video-navbar').slick({ arrows: true, infinite: false, speed: 300, slidesToShow: 3.3 }); $('.video-slide').click(function () { var item = $(this); item.parent().find('.selected').removeClass('selected'); item.addClass('selected'); var videoId = item.data('video'); tipsVideoData = item.data('ga-data'); tipsPlayer.cueVideoById(videoId); tipsPlayerStarted = false; tipsPlayer.playVideo(); }); }); var tag = document.createElement('script'); tag.src = "http://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var commercialPlayer, commercialPlayerStarted = false; var tipsPlayer, tipsPlayerStarted = false, tipsVideoData; function onYouTubeIframeAPIReady() { tipsVideoData = { "category": "Custom", "action": "How-To-Videos", "label": "Intro-to-Potatoes" }; tipsPlayer = new YT.Player('player', { height: '205', width: '365', videoId: 'vA3smKNBGUQ', playerVars: { modestbranding: 1, rel: 0, showinfo: 0 }, events: { onStateChange: function (event) { if (event.data == YT.PlayerState.PLAYING && !tipsPlayerStarted) { tipsPlayerStarted = true; UDM.evq.push(['trackEvent', tipsVideoData.category, tipsVideoData.action, 'Play-' + tipsVideoData.label]); } else if (event.data == YT.PlayerState.ENDED) { tipsPlayerStarted = false; UDM.evq.push(['trackEvent', tipsVideoData.category, tipsVideoData.action, 'Completed-' + tipsVideoData.label]); } } } }); } Farmer's Market Hey Muffin Frenchman Shocked Turkey Time Lobstah
tagged with: javascript

http://stackoverflow.com/q/29420796
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29420902
has comment: http://stackoverflow.com/comment/47013450
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47013682
tagged with: php
has comment: http://stackoverflow.com/comment/47013426
has comment: http://stackoverflow.com/comment/47013765
has comment: http://stackoverflow.com/comment/47013733
has comment: http://stackoverflow.com/comment/47013361
has comment: http://stackoverflow.com/comment/47013632
has title: Ajax: link in ajax response is not working
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/47013519
has body: I have tried all possible solutions suggested, but it is still not working for me. I am using ajax call to a php page, say livesearch.php, from index page to get live search result. This is just a dummy text to check if result div overshadow this line or not. It works fine and list possible search. Now from search results, a user can click on a page to browse it - simple. As soon as one click's on the link, I want to catch that and do some processing. See below section in above code: $("#livesearch").on("click", "a.alert", function() { alert("here"); }); To begin with, I am testing, if I am able to capture click on this link returned from ajax search or not - so alert("here"), but it is not working. Please hep
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29421073
tagged with: ajax
score: 0

http://stackoverflow.com/comment/47045010
comment on: http://stackoverflow.com/a/29438069
type: Comment
has text: You mean "true"? Yes, like this http://plnkr.co/edit/iyw30hy8Y5T3w8yuVrKL?p=preview. But if you want to set attribute value it's also possible, but I would avoid it, it required node recompiling. But possible.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47069301
score: 0
type: AnswerComment
has text: Thank you, your first answer was correct I just forgot to close the brackets
comment on: http://stackoverflow.com/a/29451534
type: Comment

jqwidget
tags question: http://stackoverflow.com/q/29407234
type: Tag
tag name: jqwidget
tags question: http://stackoverflow.com/q/29406972

http://stackoverflow.com/q/29400881
has body: In Google Apps Script I am directly inputting the arguments into a Date object constructor and the returned date is incorrect for the minutes and seconds. The returned minutes and seconds are consistent, i.e., it always returns the same incorrect numbers when given the same input. Also, the output changes for different inputs. Has anybody seen this before or have any debugging tips to isolate the problem?
score: 0
has title: Google Apps Script returning wrong minute from Date object
accepted answer: http://stackoverflow.com/a/29414087
possible better answer: http://stackoverflow.com/a/29400991
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29400991
type: Question
tagged with: google-apps-script
answer count: 2
has answer: http://stackoverflow.com/a/29414087
tagged with: javascript

http://stackoverflow.com/comment/47131222
type: QuestionComment
has text: you can change it through js.
comment on: http://stackoverflow.com/q/29485842
score: 0
type: Comment

http://stackoverflow.com/a/47261960
upvote count: 5
type: Answer
downvote count: 0
score: 5
answers question: http://stackoverflow.com/q/29487133
has body: As of today, Facebook still does not support it. However, since I had this issue due to immediate redirect, I used the following solution: basically I set on localStorage the variable I needed to track => window.localStorage.setItem('documentTitle', document.title); then I did the redirect, and on the targeted page I used the following to properly track fb event if (typeof(fbq) !== 'undefined' &amp;&amp; window.localStorage.getItem('documentTitle')) { fbq('track', 'Lead', {content_name: window.localStorage.getItem('documentTitle')}); window.localStorage.removeItem('documentTitle');} Hope this helps someone ;) PS: this will work only if the redirected page is on the same host of the initial page, since localStorage is unique per: protocol://host:port

http://stackoverflow.com/q/29384325
tagged with: javascript
type: Question
has title: In my application Popup blocked is coming when I am using targent as_blank
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29384439
score: 0
answer count: 1
type: UnansweredQuestion
has body: target="_blank" not working in my application and here is my fiddlejsfiddle. But it works fine here and when I am using this in my application popup blocked alert is coming.

http://stackoverflow.com/q/29524609
tagged with: css
has comment: http://stackoverflow.com/comment/47203940
has comment: http://stackoverflow.com/comment/47205033
has comment: http://stackoverflow.com/comment/47207398
has comment: http://stackoverflow.com/comment/47204379
has comment: http://stackoverflow.com/comment/47205801
answer count: 0
has comment: http://stackoverflow.com/comment/47204597
has body: So I want to have a very simple system where it frequently updates a list with a maximum of 10 items. The code is not done, but I'm getting a problem. index.html style.css @charset "utf-8"; /* CSS Document */ li { font-size: 0vh; -webkit-transition: opacity 1s, font-size 1s; /* Safari */ transition: opacity 1s, font-size 1s; } When I call the addText() function, it adds the new li. But there are two problems. The timeout for the removal of the oldest element doesn't work. If there is an 11th element, it will remove it instantly instead of waiting one second. The new added text should come in with a nice animation. But after it is added, the new font-size isn't updated, which is supposed to be done in the last line of the sendText function. However, when I copy and paste the last line in the console, it works perfectly. Why is Javascript not excecuting this line? Thank you so much for you help guys!
has title: Javascript not changing style of new added element
type: Question
has comment: http://stackoverflow.com/comment/47204305
tagged with: settimeout
tagged with: javascript
tagged with: dom
score: 0
has comment: http://stackoverflow.com/comment/47205320
has comment: http://stackoverflow.com/comment/47204189
has comment: http://stackoverflow.com/comment/47204330
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29476931
accepted answer of: http://stackoverflow.com/q/29476651
type: Answer
answers question: http://stackoverflow.com/q/29476651
has comment: http://stackoverflow.com/comment/47114753
type: AcceptedAnswer
has body: If I get what you're trying to do, you're simply trying to go through the entire string, character by character, and sort them into categories of letter, number, or junk, right? If that is the case, you don't even have to split the string at all — .match() will simply generate an array of matches from your string based on the regular expression you provide it, and you can manipulate the resulting array in any way you want. In this case, you want to join them into a string, using .join(). The regular expressions you want to use for each category would be: /[a-z]/gi, meaning match all alphabets from A through Z /[0-9]/gi, meaning match all numberical characters from 0 through 9 /[^a-z0-9]/gi, meaning characters that do not match the A-Z or 0-9 character set, i.e. whatever that is not selected in the first two. Here's the JS code: function manipulateString(string) { var letter, numbers, junk; letter = string.match(/[a-z]/gi).join(''); numbers = string.match(/[0-0]/gi).join(''); junk = string.match(/[^a-z0-9]/gi).join(''); console.log(letter); console.log(numbers); console.log(junk); } See fiddle here: http://jsfiddle.net/teddyrised/ueb2bu9o/8/
score: 0

http://stackoverflow.com/q/29430271
tagged with: javascript
score: 0
has body: I am trying to push the details from textbox to an array in AngularJS. But it doesn't work AppName.factory('sampleFactory', function(){ var customerdetails=[ {name:'John Smith', country:'Denmark', worth:'5000000'}, {name:'John Lewis',country:'England',worth:'10000000'}, {name:'Rick Evans',country:'America',worth:'6000000'} ]; var factory={}; factory.getCustomers=function(){ return customerdetails; }; return factory; }); AppName.controller('homeController', function($scope, sampleFactory){ $scope.customers= sampleFactory.getCustomers(); $scope.addCustomer = function(){ $scope.customerdetails.push({ name:$scope.customerName, country:$scope.customerCountry, worth:$scope.customerWorth }); }; }); The page has a button with ng-click="addCustomer". But it doesn't add to the array. The factory part works fine. I am sure I have made an error in the addCustomer function. Can somebody spot it? Thanks!
answer count: 1
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Angular pushing into an array gives: TypeError: Cannot read property 'push' of undefined
has answer: http://stackoverflow.com/a/29430329
accepted answer: http://stackoverflow.com/a/29430329
type: Question

http://stackoverflow.com/comment/47012492
type: Comment
type: QuestionComment
has text: @aw04 Can you explain how it is odd? I'm not great with JS yet.
comment on: http://stackoverflow.com/q/29420168
score: 0

http://stackoverflow.com/q/29424844
tagged with: php
type: AnsweredQuestion
score: 1
tagged with: mysql
upvote count: 1
has comment: http://stackoverflow.com/comment/47021046
type: Question
accepted answer: http://stackoverflow.com/a/29424908
tagged with: javascript
has body: Currently trying to take a row with a specific ID number and, if the row is checked, allow the user to click a button and append these specific rows to a new table in order to do comparisons, etc. The rows are all generated in a table using php and my code is only about half complete but I'm not sure where to go from here. Here is my current jquery: $(function(){ var rows = []; $('compareRowButton').click(function(){ $('.compareRow:checked').each(function(){ var ele_id = $(this).attr('id'); $.ajax({ type : 'post', url : 'compare.php', //query data : 'post_id='+ ele_id, // passing id via ajax success : function(data){ rows.push(data); } }); }); $('.displayTable').click(function(){ // append to table or divs }); }); }); }); and here is what I have in compare.php: <?php include_once('functions.php'); include_once('link_costreport_2013.php'); sec_session_start(); if(isset($_POST['post_id'])){ $id = $_POST['post_id']; } $query = $link->prepare("SELECT * FROM `s10` WHERE `id` = :id"); $query->bindParam(':id', $id, PDO::PARAM_INT); $query->execute(); $results = $query->fetch(); ?> I'll admit I had some help with the jquery/ajax so my understanding of how it works is lacking a little, but a few things I don't understand fundamentally are: How can I turn my fetched results into the 'data' parameter that gets pushed into the 'rows' array. I'm guessing this is on the PHP side. How do I parse the 'data' and have it display in my table in elements under the right headers and such? The ID is obviously just one part of the entire query but there are about 6-7 columns worth of data for each ID. At the end I'm just trying to display the new table with the selected rows and hide the old one. If I can provide any additional information I'd be glad to, wasn't sure what else to include. Thanks in advance ::EDIT:: while ($results = $query->fetch()) { $id = $results['id']; $rowID = $results['id']; if($results['301_cost_of_uncomp_care'] != 0){ $charityPortion = ($results['233_net_charity_c…
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29424908
has title: Using ajax to send rowID and append selected rows to new table

http://stackoverflow.com/a/29437656
answers question: http://stackoverflow.com/q/29437513
type: Answer
has body: Simply call executeQueries() inside the labelPoints callback? and remove the geometryService.on("label-points-complete else {geometryService.labelPoints([searchedGraphic.geometry], function (labelPoints) { console.log("in contains else "); var searchedGraphicLabelPoint = new Graphic(labelPoints[0], markerSymbol); map.graphics.add(searchedGraphicLabelPoint); useThisPointToInitiateClick = labelPoints[0]; console.log(useThisPointToInitiateClick); executeFromSearchedPoint = "Yes"; console.log("before execute queries, after adding center points"); executeQueries(); }); }
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29437513
has comment: http://stackoverflow.com/comment/47044245
score: 0

http://stackoverflow.com/q/29474082
has body: I have several ul's, and I want to only display 1 at a time with a previous and next button to cycle through them. I'm using a foreach with PHP to generate each ul with a maximum of 6 li's. As well as to get a unique id for each (itemX). Item 1 Item 2 // ETC I want to use jquery to set all 'itemWrap' to display none, then set id 'item1' to display block on page load. Then when clicking the next/prev buttons set the current ul to display none and set the next/prev ul to display block. jQuery(document).ready(function(){ jQuery(".itemWrap").css("display", "none"); jQuery("#item1").css("display", "block"); var count = 1; var item = jQuery("#item" + count); jQuery(".prev").click(function(){ // do previous tab jQuery.each(item, function() { item.css("display", "none"); }); count--; jQuery.each(item, function() { item.css("display", "block"); }); }); jQuery(".next").click(function(){ // do next tab jQuery.each(item, function() { item.css("display", "none"); }); count++; jQuery.each(item, function() { item.css("display", "block"); }); });}); This is what I have, it works to set the current ul to display none, but only if there is nothing telling it to set the next/previous ul to display block.
has answer: http://stackoverflow.com/a/41317700
type: Question
has comment: http://stackoverflow.com/comment/47109770
has title: jQuery simple pagination
tagged with: pagination
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29474741
answer count: 3
accepted answer: http://stackoverflow.com/a/29474741
has answer: http://stackoverflow.com/a/29474763
tagged with: jquery
tagged with: foreach
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29474763

http://stackoverflow.com/q/29429202
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47029761
has body: I'm develping a website and I made all the design and the styling upon bootstrap and it is working fine. Then I wanted to add a panel for the mobile menu. the panel is the one on the right of this example:jQuery Mobile panels, click on the plus sign I took the panel that comes out clicking on the plus, and I worked to add it to my website (with my menu instead of the form inside the panel). It works fine, but adding the jQuery Mobile JS completely destroyed my layout, adding lot of ui-* classes around my code and the styles attached to them. I've tried those things: disabling the css whole (but the panel does not work anymore) renaming selectively only the classes that makes more mess, but it is way too much work, just to fix a checkbox I had to rename several ui classes. fiddling with the js (the panel stopped working) I just need the panel. I don't need all the creepy styling on the forms or other unwanted stuff. Now I don't know what to do. There is another way to get this panel working withour all the mess? Why they did this js so intrusive?
has comment: http://stackoverflow.com/comment/47033983
type: Question
has comment: http://stackoverflow.com/comment/47029416
has title: JQuery Mobile destroyed my layout: how to disable autostyling?
has answer: http://stackoverflow.com/a/29429233
tagged with: javascript
score: 0
tagged with: jquery-mobile
answer count: 1
has comment: http://stackoverflow.com/comment/47029231
accepted answer: http://stackoverflow.com/a/29429233
has comment: http://stackoverflow.com/comment/47030640
tagged with: css

http://stackoverflow.com/comment/47027445
type: QuestionComment
comment on: http://stackoverflow.com/q/29428629
score: 0
has text: Did you really identify that digest cycle as having a performance cost ? Deferring the continuation call is a fundamental property of promises and doesn't seem to be costly in other implementations (I don't know AngularJS promises).
type: Comment

http://stackoverflow.com/comment/47094374
type: QuestionComment
has text: @ShaunakD, it's better, but now default image is displayed way to often, original image is displayed after page refresh though...
comment on: http://stackoverflow.com/q/29465536
score: 0
type: Comment

http://stackoverflow.com/a/29382319
type: Answer
has body: el.innerHTML += el.innerHTML + '...'; The error is in above line.You're adding the el.innerHTML twice. At first you are adding it with ... and then adding it with itself because of shorthand += operator. It should be just el.innerHTML += '...'; It's present in multiple places, you may need to edit all those.
answers question: http://stackoverflow.com/q/29382296
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/47215622
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29515541
score: 0
has text: The class is not in the ascx control, only the javascript. If I should use the fully qualified name would it not fail in design time as well?

http://stackoverflow.com/comment/46981835
type: Comment
comment on: http://stackoverflow.com/a/29403139
has text: Put your code inside `$(document).ready()`. Your Javascript block is before the body, so the `#messages` element doesn't exist when you try to bind the click handler.
score: 2
type: AnswerComment

http://stackoverflow.com/a/29524787
has body: other way or way that i prefer with angular js is to keep a track of current item on scope, this works better if you the fields being edited are in large number $scope.currentitem; setting current item equal to the item tha's being edited Edit Now you can have an form filled in like
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29524560
score: 1
upvote count: 1

http://stackoverflow.com/comment/47113617
comment on: http://stackoverflow.com/a/29469936
score: 0
type: AnswerComment
type: Comment
has text: Yes (if I remove the debugger )The error is still exist I see that in the console.the error is "Unfinished promise chain in method run"

http://stackoverflow.com/comment/47110837
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29459508
has text: Fair enough. If that's the case then you're correct in using the renderer. I'm still not understanding the issue because here's how rendering and the context menu work: when you render something, it calls this function. Initially it looks like it sets colors correctly. After you remove the row, it should trigger the 'afterChange' event which would call renderers again. At this point, that row no longer exists so it should not be getting called at all, right?

http://stackoverflow.com/comment/47263413
has text: Ok so I successfuly stored my accessToken that is created when a user signs up in the localStorage when a user logins. That means that on every request from now on I pass the token as a parameter and compare it with the user token on the backend am I right?. Although I'm using tokens now they are only access Tokens. I dont use refresh tokens at all. Are they are truely necessary? I could just build a page that creates a new token if it somehow get stolen.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29474866
type: Comment

http://stackoverflow.com/q/29485158
has title: Disabling ctrl F it is not working on first keypress of ctrl F in chrome
upvote count: 1
tagged with: google-chrome
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47138970
has answer: http://stackoverflow.com/a/29485225
score: 0
has body: on first key press ctrl f not working code if (e.keyCode === 114 || (e.ctrlKey &amp;&amp; e.keyCode === 70)) { e.preventDefault();
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47130162
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47139360

http://stackoverflow.com/comment/47212923
comment on: http://stackoverflow.com/q/29529574
score: 3
has text: you cannot use push for json object. But this will work $scope.comments = [ ]; if you initialize this as array.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47190008
has text: How are you including your javascript? If its in the head, you need to wrap it like this: `$(function(){ /* Your code here */ })`
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29517061
type: AnswerComment

http://stackoverflow.com/a/29521639
answers question: http://stackoverflow.com/q/29521032
has body: You have to use the .set() method of Vector3 class. var brushPosition = intPosition.clone().add(new THREE.Vector3(0.5, 0.5, 0.5) ); brush.position.set(brushPosition.x, brushPosition.y, brushPosition.z); You might also be able to use the copy function of Vector3 class. brush.position.copy(intPosition.clone().add(new THREE.Vector3(0.5, 0.5, 0.5)); EDIT: the reason is that the position property of object3D is non-writable. it may not be set with an assignment operator.
type: Answer
score: 7
upvote count: 7
has comment: http://stackoverflow.com/comment/47199183
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29521032
downvote count: 0

http://stackoverflow.com/comment/47127462
comment on: http://stackoverflow.com/a/29464140
type: AnswerComment
has text: Hello, thanks for your solution it works perfectly, but for some reason wordpress is not picking up/running the script.
score: 0
type: Comment

http://stackoverflow.com/q/29385198
tagged with: javascript
has answer: http://stackoverflow.com/a/29398663
has title: Cannot screen scrape site
score: 0
type: UnansweredQuestion
tagged with: http-redirect
tagged with: http
type: Question
tagged with: cookies
tagged with: screen-scraping
has body: I am trying to screen scrape the contents of the following page (lists all medical specialties) and the contents of the links contained in this page (all the universities that offer training in a given specialty). Here is the main page with all the specialties: https://services.aamc.org/eras/erasstats/par/index.cfm The first link on the page is for the specialty Adolescent Medicine (Pediatrics) and the URL is https://services.aamc.org/eras/erasstats/par/display8.cfm?NAV_ROW=PAR&amp;SPEC_CD=321 When I try to directly navigate to the above URL, the server redirects me back to the main page. However, clicking on the link for Adolescent Medicine takes me to the page that I want to access. I am confused as to why clicking on the link takes me to the correct page, but navigating to the same URL does not. Here are my thoughts: Javascript issues- I disabled JS and I still keep getting redirected to the main page. Moreover, clicking the link in the table still takes me to the correct page. Cookies- I disabled all cookies but still ran into the same problem when trying to access the Adolescent Medicine page using the direct URL. Interestingly, navigating using the table links still works with all cookies disabled. HTTPS- Not really sure how to check if this is causing the problem. I have spent quite a lot of time looking at the developer's console on Chrome and have not been able to find a reason as to why I cannot access the specialty pages using the direct URL. Any help or guidance will be very much appreciated!
answer count: 1

http://stackoverflow.com/q/29497569
has comment: http://stackoverflow.com/comment/47177313
tagged with: highcharts
tagged with: javascript
tagged with: jquery
duplicate of: http://stackoverflow.com/q/29487587
score: 0
has body: I can't find an answer inside the documentation: Series in high charts: series: [{ name: 'Asia', data: [502, 635, 809, 947, 1402, 3634, 5268] }, { name: 'Africa', data: [106, 107, 111, 133, 221, 767, 1766] }, { name: 'Europe', data: [163, 203, 276, 408, 547, 729, 628] }, { name: 'America', data: [18, 31, 54, 156, 339, 818, 1201] }, { name: 'Oceania', data: [2, 2, 2, 6, 13, 30, 46] }] See jsFiddle Example image The question is : how to move series names in the jsFiddle link chart(asia, africa, europe ....) on to the chart from the bottom of the chart?
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
downvote count: 1
tagged with: charts
has comment: http://stackoverflow.com/comment/47153946
has comment: http://stackoverflow.com/comment/47153986
type: Question
has title: Highcharts. How to series name on line of area?
linked to: http://stackoverflow.com/q/29487587
has comment: http://stackoverflow.com/comment/47180306

http://stackoverflow.com/a/29503902
type: AcceptedAnswer
has body: Problem background Canvas uses anti-aliasing to make drawings appear more smooth which is why it fills in semi-transparent pixels here and there (see this explanation for how that works). Smoothing (aka interpolation) can be turned off, but only for images (ctx.imageSmoothingEnabled = false, as the name implies). Solutions For this a "line renderer" needs to be implemented. However, the typical line algorithms only supports lines of 1 pixel in width. This includes Bresenham as well as the EFLA (Extremely Fast Line Algorithm by Po-Han Lin), latter is faster than Bresenham. For lines thicker than 1 pixel you would need to find tangent angle and then render each segment along the main line. I provide both implementations below which I have optimized to some degree. None of them require access to the bitmap itself, just supply the context. The only thing you need to remember is to use fillStyle (and fill()) instead of strokeStyle (and stroke()) to set its color. You can generate several lines before filling, which is generally faster than filling each line segment, provided they use the same color. Optionally you could use image data and set pixels there directly, but that is slower and requires CORS in case you use images (use such a bitmap with a Uint32 view if this is preferred. There are also special tricks to speed up this approach, but they are not addressed here). EFLA (Extremely Fast Line Algorithm) This algorithm is intended where you want to draw continuous polygon lines, ie. the last point is not set. But in the following implementation we set it manually so it can be used for single line segments. Visit the linked site above for a more in-depth explanation of it (as well as for license). Just make sure input values are integer values: function lineEFLA(ctx, x1, y1, x2, y2) { var dlt, mul, yl = false, i, sl = y2 - y1, ll = x2 - x1, lls = ll &gt;&gt; 31, sls = sl &gt;&gt; 31; if ((sl ^ sls) - sls &gt; (ll ^ lls) - lls) { sl ^= ll; ll ^= sl; sl ^= ll; yl = true…
answers question: http://stackoverflow.com/q/29499013
score: 4
accepted answer of: http://stackoverflow.com/q/29499013
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/29517661
has comment: http://stackoverflow.com/comment/47190604
duplicate of: http://stackoverflow.com/q/275931
score: 0
upvote count: 1
favorite count: 0
has title: Flashing text on value change
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47190615
linked to: http://stackoverflow.com/q/275931
has comment: http://stackoverflow.com/comment/47190745
answer count: 0
has comment: http://stackoverflow.com/comment/47190670
downvote count: 1
has body: Hi i have a snippet of javascript/JQuery that is reading from a and putting the values in to corresponding div's what i want to know is with what i currently have would it be possible to detect when the value has changed and flash the text or background or something along those lines, here is my code. $(document).ready( function () { setInterval(function () { $.getJSON("../../../UpdatedData/MachineCounts/MachineCounts.json", function (data) { $(".Midbox").empty().removeClass("YellowBackground").removeClass("redBackground"); $.each(data, function (key, val) { var DID = "#" + val.controllerID + "D"; var NID = "#" + val.controllerID + "N"; var DSID = "#" + val.controllerID + "DS"; var NSID = "#" + val.controllerID + "NS"; var DayScrapPercent = val.ScrapCountDay / val.GoodCountDay * 100; var NightScrapPercent = val.ScrapCountNight / val.GoodCountNight * 100; if (isNaN(DayScrapPercent) == true) { DayScrapPercent = 0; } if (isNaN(NightScrapPercent) == true) { NightScrapPercent = 0; } var DayClass = ""; var NightClass = ""; if (DayScrapPercent &gt; 3) { DayClass = "yellowBackground"; } else if (DayScrapPercent &gt; 5) { DayClass = "redBackground"; } if (NightScrapPercent &gt; 3) { NightClass = "yellowBackground"; } else if (NightScrapPercent &gt; 5) { NightClass = "redBackground"; } $(DID).empty(); $(DID).append(Math.abs(val.GoodCountDay)).addClass(DayClass); $(NID).empty(); $(NID).append(Math.abs(val.GoodCountNight)).addClass(NightClass); $(DSID).empty(); $(DSID).append(Math.abs(DayScrapPercent) + "%"); $(NSID).empty(); $(NSID).append(Math.abs(NightScrapPercent) + "%"); }); }); }, 5000); }); when this looks wit puts data in to divs the data is just numbers, what i need to do is detect when those numbers change and if they have changed flash when they change.
type: Question
has comment: http://stackoverflow.com/comment/47190818
has comment: http://stackoverflow.com/comment/47190819
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46960690
score: 0
type: AnswerComment
has text: I think you need to explain the context more - I don't know what UI5 is I'm afraid. Or perhaps provide a JSFiddle if possible.
type: Comment
comment on: http://stackoverflow.com/a/29387301

wikipedia-api
tag name: wikipedia-api
type: Tag
tags question: http://stackoverflow.com/q/29442008

http://stackoverflow.com/comment/47194291
type: QuestionComment
comment on: http://stackoverflow.com/q/29519553
has text: This is definitely something you can use jQuery for. jQuery is an incredibly useful library. I would recommend going through a couple of tutorials. This might be a good starting point: http://www.w3schools.com/jquery/
score: 0
type: Comment

http://stackoverflow.com/a/29411990
answers question: http://stackoverflow.com/q/29411776
score: 0
type: Answer
has body: There is no link between variables set in JavaScript and those set in Java scriptlet code in a JSP (well there can be but not in the way you are trying). If you want to use scriptlet code to display your table rows based on the number entered, you will have to add a form and post it back to the page. You would also need to add a name value to your text field. Then you would use request.getParameter("name of the text field") to get the value they entered and replace **X** with that value. You probably also want to make the changes that @mohamedrias proposes.

http://stackoverflow.com/comment/47112303
type: QuestionComment
comment on: http://stackoverflow.com/q/29475258
has text: right so I have to state for example .css-320 { width: 320px; } and so on for further styles ?
score: 0
type: Comment

http://stackoverflow.com/a/29509357
answers question: http://stackoverflow.com/q/29509272
upvote count: 5
has body: You can use FileReader API. The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer. Its method FileReader.readAsDataURL() The readAsDataURL method is used to read the contents of the specified Blob or File. Note: It works in Modern browsers $(document).ready(function() { $('#file').change(function(e) { var reader = new FileReader(); reader.onload = function(e) { $('#imagedisplay').attr('src', e.target.result); } reader.readAsDataURL(this.files[0]); }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="file" id="file" name="file" /&gt; &lt;img id="imagedisplay" src="" /&gt;
type: Answer
downvote count: 0
score: 5

http://stackoverflow.com/comment/47087067
has text: this should solve your problem: http://stackoverflow.com/questions/1409649/how-to-change-the-height-of-a-br
score: 1
comment on: http://stackoverflow.com/q/29461593
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47074188
has text: EDIT: responding to your edit: sum(1)(2) should return a function that, when called with no arguments, would return 0 (or, alternatively, would return another function if given arguments). Then, this function would be used to make the expression 1 + 2 + 0, or 3. The expected result is for `sum(1)(2)(3)();` would be 6, since `sum(1)` would return a function to be called with 2, which would become 1 + sum(2) which would do the same thing (2 + sum(3)) which would become 3 + 0, returning 3, returning 5, returning 6. (jeez, that's hard to explain)
type: QuestionComment
comment on: http://stackoverflow.com/q/29454470
score: 0
type: Comment

http://stackoverflow.com/comment/47188958
type: QuestionComment
type: Comment
has text: Do you have any console output, problems maybe network activity?
comment on: http://stackoverflow.com/q/29516885
score: 0

http://stackoverflow.com/a/29484012
has comment: http://stackoverflow.com/comment/47128194
answers question: http://stackoverflow.com/q/29483526
downvote count: 0
score: 1
type: Answer
has body: How about this i used svg <image xlink:href="https://placekitten.com/g/200/302" width="300" height="200" x="-100" /> <image xlink:href="https://placekitten.com/g/200/300" width="300" height="200" x="-100" /> <image xlink:href="https://placekitten.com/g/200/301" width="300" height="200" x="-100" /> <image xlink:href="https://placekitten.com/g/200/302" width="300" height="300" x="-100" y="10" /> <path d="m 100 20 l 100 0 -20 100 -100 0" stroke="orange" fill="url(#image1)" /> <path d="m 80 120 l 100 0 -20 100 -100 0" stroke="green" fill="url(#image2)" /> <path d="m 60 220 l 100 0 -20 100 -100 0" stroke="blue" fill="url(#image3)" /> <path d="m 210 60 l -50 260 100 0" fill="url(#image4)" /> <path d="m 350 20 l -130 40 15 80 130 -40" fill="url(#image1)" /> <path d="m 365 100 l -100 30 20 90 100 -30" stroke="green" fill="url(#image2)" /> <path d="m 385 190 l -100 30 20 90 100 -30" stroke="green" fill="url(#image3)" />
upvote count: 1

http://stackoverflow.com/comment/47281237
type: Comment
has text: And I've just solved it ... I needed to have resizeWindow like this `my.resizeWindow = function (stringItem, isResized)`
comment on: http://stackoverflow.com/a/29564995
type: AnswerComment
score: 0

http://stackoverflow.com/a/29461716
type: Answer
answers question: http://stackoverflow.com/q/29461628
has comment: http://stackoverflow.com/comment/47087307
has comment: http://stackoverflow.com/comment/47087360
has body: You have a small problem with the JavaScript JavaScript var colors = ['#3399FF', '#44A1FF', '#55AAFF', '#65B2FF', '#76BBFF', '#87C3FF', '#98CCFF', '#A9D4FF', '#BADDFF', '#CAE5FF', '#DBEEFF', '#ECF6FF'], elems = document.getElementsByClassName('sub-header'), i; for (i = 0; i &lt; elems.length; i += 1) { var color = color = colors[Math.floor(Math.random() * colors.length)]; elems[i].style.backgroundColor = color; } Fiddle Explanation The error with your code was that you had types sub-header.style the compiler assumes sub-header is a variable but it isn't defined. What we have done is added the variable (elems), looped through it, and applied the color. Another issue is that - aren't supported for variable names. I hope this helped
score: 0

http://stackoverflow.com/q/29524416
tagged with: node.js
accepted answer: http://stackoverflow.com/a/29525893
tagged with: typescript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29525893
type: Question
answer count: 2
tagged with: javascript
score: 0
has title: How to introduce typescript on a big nodeJS code basis step by step?
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/29536470
has answer: http://stackoverflow.com/a/29536470
favorite count: 0
has body: I do own quite a big code basis implemented in JavaScript based on NodeJS. I do want to give typescript a try and want to implement all new modules in typescript. Just to see how it performs and how I like the idea. I do need to be able to revert back at any time so I do not want to put to much effort into the migration. I started by using WebStorm and Gulp to support typescript. I created a new module and used the import / require combination. import settings = require("./settings"); import _ = require("lodash-node"); By doing so I receive a couple of errors. Error:(22, 27) TS2307: Cannot find external module './settings'. Error:(23, 20) TS2307: Cannot find external module 'lodash-node'. Those modules have no typescript definition file and are plain javascript modules (lodash is obviously a external library). I do have a couple of dependencies and I do not want to create definitions manually even if they are just empty stubs. As mentioned I do want to keep the integration as simple as possible. Is there a general flag or something like that I can set?

http://stackoverflow.com/comment/46928772
type: AnswerComment
has text: *they will **always** be executed before...*
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29374106

http://stackoverflow.com/q/29474823
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/47150399
linked to: http://stackoverflow.com/q/10888610
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/47147961
type: UnansweredQuestion
tagged with: node.js
has answer: http://stackoverflow.com/a/29495852
type: Question
linked to: http://stackoverflow.com/q/17303564
has comment: http://stackoverflow.com/comment/47150914
has body: I'm trying to connect to a remote server using nodejs 0.12, and i keep getting the response SELF_SIGNED_CERT_IN_CHAIN. I have looked at similar questions 1 2 but somehow their solutions don't work on my server. I am connecting to a test environment outside of my control setted up with a self signed certificate. This is my request: var https = require("https"); var fs = require('fs'); start(); function start() { var listadebancos = { language:"es", command:"GET_BANKS_LIST", merchant: { apiLogin:"111111111111111", apiKey:"11111111111111111111111111", }, test:true, bankListInformation: { paymentMethod:"PSE", paymentCountry:"CO" } }; var listadebancosString = JSON.stringify(listadebancos); var headers = { 'Content-Type': 'application/json', 'Content-Length': listadebancosString.length }; var options= { host: 'stg.api.payulatam.com', rejectUnauthorized: false, agent:false, path: '/payments-api/4.0/service.cgi', method: 'POST', cert: fs.readFileSync('./stg.gateway.payulatam.crt'), } process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; var req= https.request(options, funcionRespuesta); req.write(listadebancosString); req.end(); function funcionRespuesta(res) { console.log(res); } } Am i missing something obvious?
has title: https.request ignoring rejectUnauthorized
has comment: http://stackoverflow.com/comment/47125955
tagged with: ssl
tagged with: javascript

http://stackoverflow.com/comment/47176466
type: Comment
has text: setInterval(function(){ var value = localStorage.getItem('key'); $('#objRemTxtBoxId').val(value); },1000);
type: AnswerComment
comment on: http://stackoverflow.com/a/29507198
score: 0

http://stackoverflow.com/comment/47033683
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29431985
score: 0
has text: What exception do you get in Java console when you do POST request?

http://stackoverflow.com/comment/47121788
comment on: http://stackoverflow.com/q/29480427
score: 0
has text: Awesome! Glad to help, good luck, have fun!
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/122865591
has text: You might also check this simple process out: https://stackoverflow.com/questions/69512244/back-button-does-not-allow-re-selection-in-dropdown-select
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29500804
type: AnswerComment

http://stackoverflow.com/q/29384785
has comment: http://stackoverflow.com/comment/46948325
has answer: http://stackoverflow.com/a/29385064
type: Question
score: -2
tagged with: javascript
downvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/46947858
has title: Refresh a select tag to default value
favorite count: 0
type: UnansweredQuestion
has body: I have 2 select tag. I want to refresh the values in the 2nd select tag to default , when the user click on the first select tag. How do I achieve it in Javascript
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46947842
upvote count: 0

http://stackoverflow.com/a/29472732
type: Answer
has body: $('#toggle_view').click(function() { $.get(window.location.href.replace('&amp;collapsible=true', '&amp;collapsible=false'), function(data) { document.getElementById('myTable').innerHTML = $(data).find('#myTable'); }); }); Thats the answer - u can find by jQuery selector in ur data
downvote count: 0
has comment: http://stackoverflow.com/comment/47106998
has comment: http://stackoverflow.com/comment/47107038
score: 1
has comment: http://stackoverflow.com/comment/47107030
accepted answer of: http://stackoverflow.com/q/29472707
answers question: http://stackoverflow.com/q/29472707
type: AcceptedAnswer
upvote count: 1

http://stackoverflow.com/comment/46999289
type: QuestionComment
has text: Try using `timeout` property in ajax options to trigger the error callback
type: Comment
comment on: http://stackoverflow.com/q/29412865
score: 0

http://stackoverflow.com/comment/46990368
has text: `opened` should be in your cotnroller.
score: 0
comment on: http://stackoverflow.com/q/29408192
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46960991
type: QuestionComment
comment on: http://stackoverflow.com/q/29391686
has text: @Anand I am using media quearys, i need to make the div scroll.
score: 0
type: Comment

http://stackoverflow.com/a/29387283
score: 1
downvote count: 0
has body: From the design and usability perspective you should not allow any pop-up on your web page to exceed the given view-port limit, for example half of the window height. Try to make the pop-up div with fixed height and with overflow-y: scroll, so if there is more content - the user will be able to scroll down and read it. In general, you should use Pop-ups carefully. Unfortunately, the bad pop-ups give all pop-ups a bad name. Some users even turn off JavaScript in their browsers or download special software utilities to kill all pop-up windows. Many do this in desperation because pop-up windows are stalking them wherever they go on the Web - and most people don't realize that they are partly to blame. Often, they've downloaded some free utility or music-sharing program that contains a scum-ware program that tracks your movements online, steals your personal information, and makes your online life miserable by continually harassing you with pop-up advertising! See this, this article and this SO question.
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29387130

http://stackoverflow.com/q/29429223
has answer: http://stackoverflow.com/a/29429322
accepted answer: http://stackoverflow.com/a/29429322
type: Question
tagged with: javascript
upvote count: 2
answer count: 1
has title: Jasny bootstrap Off Canvas menu: how to force menu slide under the navbar?
favorite count: 0
has body: I want to add static (not movable) header to the off canvas push menu. here is what I have for now: codePen link This text should not move Project name Slide in Push Reveal Off canvas navbar -------------------- navbar should not move ----------------------- Content that should move. Menu should slide from the left side UNDER the navbar the problem is that I don't know how to force menu slide under the 'navbar'. Any ideas?
tagged with: css
tagged with: jasny-bootstrap
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/133428330
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).
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/75582493
score: 0

http://stackoverflow.com/q/29399834
type: AnsweredQuestion
has title: Associating select value with model via id attribute using serializeJSON jquery plugin
type: Question
has answer: http://stackoverflow.com/a/29400366
tagged with: javascript
score: 0
has body: EDIT: I realized I originally posted an incoherent question as the behavior was specific to a jquery plugin called serializeJSON, and not Marionette. I have a form that's defined in a template file. The input fields are collecting the input data via their id attribute like so: Eventually the object 'objectName' is being deserialized into a Java object on our back-end with attributes that match those like 'objectAttribute'. However, when I try to accomplish the same affect with a 'select' element, the data from the option element isn't passed back to the back end. I was doing something like this: New Copy Does someone know how to accomplish that affect, or can point me to a relevant question or documentation?
answer count: 1
tagged with: marionette
accepted answer: http://stackoverflow.com/a/29400366

http://stackoverflow.com/comment/47155100
has text: well. thanks. i get what was the problem
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29498053

http://stackoverflow.com/a/29433581
score: 1
has comment: http://stackoverflow.com/comment/47037467
has comment: http://stackoverflow.com/comment/47037953
answers question: http://stackoverflow.com/q/29433469
accepted answer of: http://stackoverflow.com/q/29433469
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/47036627
has body: 1/ class='user-connecte' is not valid to call your directive, you should use it as an attribute instead, like this : &lt;div user-connecte&gt;&lt;/div&gt; 2/ ng-bind-html is not enough to interpret angular attributes (like a call to a directive, like your case) ; you need to $compile it. For this point, this topic will help you to compile your template. So use the 'dynamic' directive given by the author as a "runtime compiler", without modifying your directive 'userConnecte'. In a second time, call this "runtime compiler" in your ng-repeat like this : &lt;div dynamic="currentModule.template"&gt;&lt;/div&gt; Then, the attribute user-connecte in your string will be interpreted thanks to the compiler, and your directive userConnecte will be called, loading your templateUrl (that was your initial need).
downvote count: 0

http://stackoverflow.com/a/29476841
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29476703
has body: Use .split() to split a string on spaces: var manufacturer = resultArray[i].selector_buttongroup_classes.split(' ')[0]; You can also do it in the MySQL query with the SUBSTRING_INDEX function SELECT SUBSTRING_INDEX(selector_buttongroup_classes, ' ', 1) AS manufacturer DEMO
has comment: http://stackoverflow.com/comment/47201284
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47206992
answers question: http://stackoverflow.com/q/29476703

http://stackoverflow.com/a/29480909
accepted answer of: http://stackoverflow.com/q/29480864
answers question: http://stackoverflow.com/q/29480864
type: AcceptedAnswer
downvote count: 0
has body: You should escape your quotes. What's happening is that the compiler thinks your string has ended once you've added the ' to avoid this escape your string using \ such as \' this allows you to type 'Foo\'s Bar' Code row += '&lt;input type=\'text\' name=\'fname\' value=&quot;&quot; class=\'fedit\' /&gt;\n'; Details The compiler sees a few parts String: '&lt;input type=' Code: text String: 'name=' Code: fname String: 'value=&quot;&quot; class=' Code: fedit String: '/&gt;\n' The newline (\n) is unnecessary because HTML strings don't need them, you might want to put a &lt;br/&gt; instead.
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/47151260
comment on: http://stackoverflow.com/q/29496190
score: 0
type: Comment
type: QuestionComment
has text: Get rid of the width check and add the event all the time. Other option would be to listen to window resize and add/remove the event.

http://stackoverflow.com/comment/47156460
has text: just a sec @charlietfl
score: 0
comment on: http://stackoverflow.com/q/29498575
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29498730
has comment: http://stackoverflow.com/comment/47156498
has comment: http://stackoverflow.com/comment/47156458
answers question: http://stackoverflow.com/q/29498575
has comment: http://stackoverflow.com/comment/47157047
has comment: http://stackoverflow.com/comment/47156241
type: Answer
has comment: http://stackoverflow.com/comment/47157150
has comment: http://stackoverflow.com/comment/47156524
has comment: http://stackoverflow.com/comment/47156308
has body: Per the documentation for IE 10 - IE 8, you have to use jQuery's attr() function. on this line, var action = $(element).data('popup'); You need var action = $(element).attr('data-popup');
score: 0

http://stackoverflow.com/a/29463481
answers question: http://stackoverflow.com/q/29463333
score: 1
has body: You should read Logical Operators from MDN. According to the documentation The logical operator OR (||) expr1 || expr2 Returns expr1 if it can be converted to true; otherwise, returns expr2. Thus, when used with Boolean values, || returns true if either operand is true; if both are false, returns false. In a nutshell, logical operators evaluate from left to right. In your situation, since you have declare q as an empty array ([]), it evaluates to true and immediately goes and assigns w to that. If you want q2 to take precedence, you can simply do var w = q2 || q; so that way only if q2 evaluates to falsey will it assign w to be q instead. The other option is to not declare q at all or declare it as something falsey. You can find out what evaluates to false here.
upvote count: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46958047
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29390276
has text: If you want to buid a web application (not a website) good example is ***plunker***. In general all SPA sites should work with Angular. also there's a good REST integration with Angular

http://stackoverflow.com/comment/47027042
score: 0
type: Comment
has text: can't it be mouseenter and mouseleave event??
type: AnswerComment
comment on: http://stackoverflow.com/a/29428413

http://stackoverflow.com/a/29387964
downvote count: 0
has comment: http://stackoverflow.com/comment/46953789
has comment: http://stackoverflow.com/comment/46953872
answers question: http://stackoverflow.com/q/29387878
upvote count: 2
has body: Change var form = $(sFormId); to var form = $('#'+sFormId); # - jQuery ID selector Also, alternatively if this is the only form you have, use : var inputs = $('form :input'); $('form :input').each(function(){ var key = this.id; var val = this.value; ..... });
type: Answer
score: 2

http://stackoverflow.com/q/29455766
has body: I am making an audio app. When I click over the Play button, then its id should be changed dynamically - like id = "paused". Then by clicking over that, it should pause, but which is not working. $('#pauses').click(function()) When I click the pause button, it still plays. Please take look over example: https://jsfiddle.net/shivam_sh/4zL4en10/2/
has comment: http://stackoverflow.com/comment/47076421
upvote count: 1
type: AnsweredQuestion
tagged with: jquery-ui
score: 1
accepted answer: http://stackoverflow.com/a/29455903
type: Question
has comment: http://stackoverflow.com/comment/47076348
has comment: http://stackoverflow.com/comment/47076466
has answer: http://stackoverflow.com/a/29455903
downvote count: 0
tagged with: jquery-mobile
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: jQuery mobile not going through ID
tagged with: cordova

http://stackoverflow.com/q/29473206
tagged with: random
has body: var eieren = 0; var eieren = Math.floor((Math.random() * 4) + 1); var imgArray = [ 'img/ei1.png' , 'img/ei2.png' , 'img/ei3.png', 'img/ei4.png' ]; imgArray.length; var eiImg = imgArray[eieren - 1]; console.log( eiImg ); document.getElementsByTagName( 'img' )[0].src = eiImg; document.getElementsByTagName( 'img' )[0].addEventListener( "click", changeImage ); var counter = eieren - 1; function changeImage() { //Load new image if this is not the last image if ( counter < imgArray.length - 1 ) { document.getElementsByTagName( 'img' )[0].src = imgArray[ ++counter % imgArray.length]; } }; Document I am new on this website and I'm having struggles with a project of mine. Let me explain what I want to make. I have an array with 4 images. Every time the page refreshes, a random image (so a random image from the array) appears. I'm making a very simple game where you have to click on images of eggs with 1 crack, 2 cracks, 3 cracks and one where a chick is coming out of an egg. The goal of the game is to get all the chicks out of the eggs. So the page is refreshed and for example, the image with the egg with 2 cracks shows up. That means you have to click 2 times (array: img1(egg with 1 crack), img2(egg with 2 cracks), img3(egg with 3 cracks), img4(image with chick coming out the egg) to show the image with the chick out of the egg. At the end of the game (i still have to make a timer) all of the pictures have to be the chick coming out of the egg. So with I think with a For loop, it will check at the end of the game if all images are img4. It's working a little bit, but there is a problem. When I refresh the page a random image shows up. For example img2. I have to click 2 times to get to the chick. But in my case, when i click, it changes first in to the first image of the array, img1. And then when you click it again it will go from img1 to 2 to 3 to 4 and if you click again to 1 again. What I want is if the page for example shows img2, and you click on the image, it will go…
has answer: http://stackoverflow.com/a/29473437
accepted answer: http://stackoverflow.com/a/29473437
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47108064
tagged with: image
has comment: http://stackoverflow.com/comment/47107897
type: Question
has title: Problems with random images in array
tagged with: arrays
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/47133181
type: Comment
type: AnswerComment
has text: ok I updated it, didn't notice the fact that it was transarent on top,
score: 0
comment on: http://stackoverflow.com/a/29401804

http://stackoverflow.com/q/29488495
score: 0
tagged with: angularjs-filter
answer count: 1
has title: how to get domain name from URL string in IE
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29488565
has body: I have an AngularJs filter returning the domain name of a given URL string. app.filter('domain', function() { return function(input) { if (input) { // remove www., add http:// in not existed input = input.replace(/(www\.)/i, ""); if (!input.match(/(http\:)|(https\:)/i)) { input = 'http://' + input; }) var url = new URL(input); return url.hostname; } return ''; }; }); the problem is that because I doesn't support URL() method, it doesn't work in IE.
type: Question
has answer: http://stackoverflow.com/a/29488565
tagged with: internet-explorer
tagged with: javascript

http://stackoverflow.com/comment/47024496
type: QuestionComment
score: 1
has text: I suppose that you have `content-length` header ? You could check that from `request.headers` instead of reading the payload
comment on: http://stackoverflow.com/q/29423886
type: Comment

http://stackoverflow.com/comment/47204471
comment on: http://stackoverflow.com/a/29524757
score: 0
type: Comment
has text: @william.taylor.09 Thank you. It looks pretty clean and makes a lot more sense now. I realize this may not have been the best example to work from, but my only question is, with the new ActiveXObject, would it work? The ActiveXObject as far as I understand requires params. I'd test it out, but I don't have an early enough version of IE. If not that's fine I can just use this an educational example because it does do a great job to make light of the theory behind a short circuit eval.
type: AnswerComment

http://stackoverflow.com/a/29454261
upvote count: 3
has comment: http://stackoverflow.com/comment/47074079
has comment: http://stackoverflow.com/comment/125459716
score: 3
answers question: http://stackoverflow.com/q/29454005
accepted answer of: http://stackoverflow.com/q/29454005
type: AcceptedAnswer
downvote count: 0
has body: You can't. The purpose of this hash is specifically to prevent applications from installing extensions behind the user's back. If you want the user to install an extension, upload the extension to the Chrome Store and provide the user with the URL to install it.
type: Answer
has comment: http://stackoverflow.com/comment/98032320
has comment: http://stackoverflow.com/comment/47073922

http://stackoverflow.com/a/29381554
score: 0
type: Answer
has body: This regex works allows two decimals and numbers greater than 0.50 ^((?!0*(\.0+)?$)[0-9]+|[0-9]+[0-9]\.[0-9]{1,2}+|[1-9]\.[0-9]+|0\.[5-9][0-9]?)$
answers question: http://stackoverflow.com/q/29379786

http://stackoverflow.com/q/29402926
tagged with: angularjs
answer count: 0
has body: I am trying to build accessibility feature on the bootstrap popover window for Angular. I have something like Open a popover in my directive angular.module('myApp').directive('popElem', ['$popover', function($popover) { return { restrict: 'A', link: function(scope, elem) { $popover(elem, { scope: scope, trigger: 'focus', template: 'test.html' }); } }; } ]); Test.html Item 1 Item 2 I am not sure how to build accessibility on the popover in my case. Everytime I press Tab key the popover will disappear. Can anyone help me about it? Thanks a lot!
type: UnansweredQuestion
has title: How to add accessibility feature to my element
tagged with: css
type: Question
has comment: http://stackoverflow.com/comment/47067636
tagged with: javascript
has comment: http://stackoverflow.com/comment/46981852
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29391111
tagged with: karma-runner
has answer: http://stackoverflow.com/a/33578273
upvote count: 39
type: Question
has answer: http://stackoverflow.com/a/33324529
has title: Karma, PhantomJS and es6 Promises
tagged with: es6-promise
tagged with: javascript
has answer: http://stackoverflow.com/a/45760202
has body: I am writing a JavaScript library that uses the new es6 promises. I can test the library in Firefox because promises are defined. However, when I try to test my code with Karma and PhantomJS, I get the error Can't find variable: Promise.. I am guessing this is because the PhantomJS browser doesn't support es6 promises yet. How can I configure Karma to bring in the polyfill for promises?
downvote count: 0
has answer: http://stackoverflow.com/a/31166888
has answer: http://stackoverflow.com/a/29391237
favorite count: 0
score: 39
tagged with: karma-mocha
answer count: 5
type: UnansweredQuestion
tagged with: phantomjs

http://stackoverflow.com/comment/46965999
comment on: http://stackoverflow.com/q/29394728
score: 0
type: Comment
type: QuestionComment
has text: Sidenote: You do have a closing ` ` tag, right? It's not in your code.

http://stackoverflow.com/comment/47122797
type: QuestionComment
has text: In that case, you could try resetting the Firebase connection via `Firebase.goOffline()` and Firebase.goOnline()`.
type: Comment
comment on: http://stackoverflow.com/q/29480384
score: 2

http://stackoverflow.com/comment/46996670
type: Comment
type: QuestionComment
has text: An older verion of http://fineuploader.com/ required a button element (for init), and it then inserted the input element @A.Wolff
comment on: http://stackoverflow.com/q/29411630
score: 0

http://stackoverflow.com/comment/47200319
comment on: http://stackoverflow.com/q/29519811
type: Comment
has text: If you know which indexes are where and don't need to iterate all, manually will obviously be faster. You can read about the `sort` function on MDN, here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort. It explains how `a` and `b` are passed in and how it handles negative, positive or 0 returns.
type: QuestionComment
score: 1

http://stackoverflow.com/a/29491650
downvote count: 0
type: AcceptedAnswer
upvote count: 2
type: Answer
score: 2
has body: Answer: monthDict = { 'janv': '01', 'févr': '02', 'mars': '03', 'avr': '04', 'mai': '05', 'juin': '06', 'juil': '07', 'août': '08', 'sept': '09', 'oct': '10', 'nov': '11', 'déc': '12' } ts.addParser({ id: "shortDate", is: function (s, table, cell) { return false; }, format: function (s, table, cell, cellIndex) { var dat = s.split('.'); var dates = dat[1].trim().split(' '); dat[0] = (/^\d{2}$/.test(dates[0])) ? dates[0] : '0' + dates[0]; return monthDict[dates[1]]+dat[0] }, type: "numeric" });
accepted answer of: http://stackoverflow.com/q/29489371
answers question: http://stackoverflow.com/q/29489371

http://stackoverflow.com/comment/47176514
has text: [This](http://stackoverflow.com/questions/20194722/can-you-get-a-users-local-lan-ip-address-via-javascript) might help you.
score: 0
comment on: http://stackoverflow.com/q/29510171
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47036204
score: 1
has text: What does the code look like where you tried to add the markerclusterer? Have you looked at any of the similar questions on SO?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29432426

http://stackoverflow.com/q/29473156
answer count: 2
tagged with: arrays
tagged with: javascript
has title: Get object from array?
has comment: http://stackoverflow.com/comment/47108331
score: 0
accepted answer: http://stackoverflow.com/a/29473209
tagged with: object
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29473398
has answer: http://stackoverflow.com/a/29473398
has comment: http://stackoverflow.com/comment/47107437
has body: I'm working on a JavaScript chat app. I'm trying to retrieve chat messages from a history array. Currently I have 1 object in this array but there will be more objects. When I stringify the array this comes out: [[{"chatName":"Piet","time":"13:00","message":"asdasdasd"}], "14282568276220321","14282568276220321"] In console it looks like this: [Array[1], "14282568276220321", "14282568276220321"] 0: Array[1] 0: Object chatName: "Piet" message: "asdasdasd" time: "13:00" __proto__: Object length: 1 __proto__: Array[0] 1: "14282568276220321" 2: "14282568276220321" length: 3 __proto__: Array[0] I would like to retrieve all messages from the array in a way that I can style it width css, like this for example per message: Piet 13:00 asdasdasd
type: Question
has answer: http://stackoverflow.com/a/29473209

http://stackoverflow.com/comment/47204675
comment on: http://stackoverflow.com/a/29502364
type: AnswerComment
has text: @Legends only the name should be unique is suffiecent for me
score: 0
type: Comment

http://stackoverflow.com/comment/47109087
score: 0
has text: try `extraAllowedContent`? http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-extraAllowedContent
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29473847

http://stackoverflow.com/q/29417241
tagged with: node.js
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14598426
has answer: http://stackoverflow.com/a/29434890
type: Question
has title: Obtain geographic coordinate from another one and a distance
tagged with: mongodb
answer count: 2
tagged with: mongoose
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29417489
score: 0
has answer: http://stackoverflow.com/a/29417489
accepted answer: http://stackoverflow.com/a/29434890
has body: I want to retrieve from my mongoDb every point inside a certain distance range. Each element stores its position this way : [latitude, longitude] where latitude and longitude are float value. Ex : I want every point from my db at max 100km from [48.862586, 2.352210] Calculate the distance between my reference point and all the other to know if the its under the limit distance doesn't sound like a good idea... Is there a way to ask google map API or another one (or by myself) to do that ?

http://stackoverflow.com/comment/47090989
has text: What does the `router()` function do? Are you clearing the session reference on a disconnect event?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29461972

http://stackoverflow.com/comment/47065382
has text: Every thing is working fine but design is not as expected. the inner html is ` EmpID'
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29446943

http://stackoverflow.com/a/29460839
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29455528
has body: Glad that you've got your issue sorted. :-) I'll post my "2-cents" since I'm a big fan of using a single requestAnimationFrame loop to create animations. Create an array of javascript objects that represents each individual step in your timeline Sequentially "play" each step in a single requestAnimationFrame loop. Here's an annotated example and Demo: // canvas related variables var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); var cw=canvas.width; var ch=canvas.height; // define step1 in the timeline var step1={ startX:0, endX:100, currentX:0, onDraw:function(){ ctx.fillStyle='blue'; ctx.fillRect(this.currentX,50,75,60); }, onAnimate:function(){ this.currentX++; // or however you want myRect1 moved this frame if(this.currentX>=this.endX){ this.currentX=this.endX; this.isCompleted=true; } }, isCompleted:false }; // define step2 in the timeline var step2={ startX:200, endX:100, currentX:200, onDraw:function(){ ctx.fillStyle='gold'; ctx.fillRect(this.currentX,50,75,60); }, onAnimate:function(){ this.currentX--; // or however you want myRect1 moved this frame if(this.currentX<=this.endX){ this.currentX=this.endX; this.isCompleted=true; } }, isCompleted:false } // put all steps in an array var steps=[ step1, step2 ]; // nextTime is used to trigger re-rendering var nextTime=0; // each animated frame will occur every 50 ms var delayPerFrame=1000/60*3; // start the animation loop requestAnimationFrame(animate); // the animation loop function animate(time){ // return if 50ms has not elapsed if(time<nextTime){requestAnimationFrame(animate); return;} // set the next elapsed time nextTime=time+delayPerFrame; // clear the canvas ctx.clearRect(0,0,cw,ch); // redraw all steps and also // find the active step in steps[] & run it's onAnimate var isAnimating=false; for(var i=0;i<steps.length;i++){ var s=steps[i]; if(!isAnimating && !s.isCompleted){ s.onAnimate(); isAnimating=true; } s.onDraw(); } // request another loop if all steps are not yet completed…
upvote count: 1
has comment: http://stackoverflow.com/comment/47097578
type: Answer

http://stackoverflow.com/comment/47022203
has text: Your jquery should return #000
score: 0
comment on: http://stackoverflow.com/q/29425476
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29503885
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29503794
answers question: http://stackoverflow.com/q/29503794
type: Answer
downvote count: 0
has body: A quick use of console.log($(this).css("color")); tells you that the color of the paragraph is "rgb(255, 0, 0)", at least according to Chrome. As noted in the documentation cited below, different browsers may return colors in a different format. I've modified the if statement to include what I believe to be the most common versions of "red": $("p").click(function () { if ($(this).css("color").toLowerCase() == "rgb(255, 0, 0)" || $(this).css("color").toLowerCase() == '#ff0000' || $(this).css("color").toLowerCase() == '#f00') { alert("this is red"); } else { alert("this is not red"); } }); Important section from the documentation, as pointed out by user Vohuman: "Note that the computed style of an element may not be the same as the value specified for that element in a style sheet. For example, computed styles of dimensions are almost always pixels, but they can be specified as em, ex, px or % in a style sheet. Different browsers may return CSS color values that are logically but not textually equal, e.g., #FFF, #ffffff, and rgb(255,255,255)." Demo: https://jsfiddle.net/BenjaminRay/7mdxmhoy/
score: 1
has comment: http://stackoverflow.com/comment/47165567

http://stackoverflow.com/comment/47013212
type: Comment
has text: JavaScript is an interpreted language...? Are you asking how to incorporate the code from this event hack into the script you already have?
comment on: http://stackoverflow.com/q/29420730
score: 0
type: QuestionComment

http://stackoverflow.com/a/29507143
score: 3
type: Answer
has comment: http://stackoverflow.com/comment/47188142
has comment: http://stackoverflow.com/comment/47171209
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29506603
has body: Another, still compact (moreso, even) but more readable and efficient way to do it would be: var str = 'hello'; for(var i=(dr?0:str.length-1), d=(dr?1:-1); str[i]; i+=d) do_something(); And if you put 1 or -1 in dr, which makes sense I think: for(var i=+(dr===-1&amp;&amp;str.length-1); str[i]; i+=dr) do_something();
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29506603

http://stackoverflow.com/a/29504288
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/47166144
downvote count: 0
answers question: http://stackoverflow.com/q/29504196
has comment: http://stackoverflow.com/comment/47166748
has body: More jQuery'ish $('.userList').append(function() { return $.map(users, function(user) { return $('&lt;li /&gt;', { 'class' : 'user', text : user }) }); }); FIDDLE
has comment: http://stackoverflow.com/comment/47166755
has comment: http://stackoverflow.com/comment/47166715

http://stackoverflow.com/a/29458460
answers question: http://stackoverflow.com/q/29382656
downvote count: 0
score: 1
has body: That's also depends on how are going to do that? Should it be programmatically? If so the best solution is proxy depending, and the best tool could be used with all selenium/webdriver tools is browserMobProxy, If you want to do it from the outside, I would recommend to use any external Traffic shapers/proxies also. Eg: http://vaurien.readthedocs.org/en/1.8/ and vaurien --protocol http --proxy nonexistingproxy.com:8000 --backend website.com:80 Why shouldn't you use 9n0browser capabilities? First of all, you will need to reload the page to see them in action, second one is you will not redefine the proxy settings in protractor with them. As for the plugins, it's not so easy to interact with them programmatically and I see no any benefits, while you should append a lot of the for different browsers.
type: Answer
upvote count: 1

http://stackoverflow.com/comment/47049012
type: AnswerComment
comment on: http://stackoverflow.com/a/29439991
type: Comment
has text: @ChrisGciso - no, second !
score: 2

http://stackoverflow.com/comment/47004061
type: AnswerComment
comment on: http://stackoverflow.com/a/29413006
score: 0
type: Comment
has text: Nice one. Cheers for that.

variables
tag name: variables
tags question: http://stackoverflow.com/q/29441097
tags question: http://stackoverflow.com/q/29447468
tags question: http://stackoverflow.com/q/29415880
tags question: http://stackoverflow.com/q/29426582
tags question: http://stackoverflow.com/q/29404723
tags question: http://stackoverflow.com/q/29440905
tags question: http://stackoverflow.com/q/29400132
tags question: http://stackoverflow.com/q/29498957
tags question: http://stackoverflow.com/q/29442167
tags question: http://stackoverflow.com/q/29450948
tags question: http://stackoverflow.com/q/29384139
tags question: http://stackoverflow.com/q/29453794
type: Tag
tags question: http://stackoverflow.com/q/29528148
tags question: http://stackoverflow.com/q/29381317
tags question: http://stackoverflow.com/q/29415033
tags question: http://stackoverflow.com/q/29440835
tags question: http://stackoverflow.com/q/29378993
tags question: http://stackoverflow.com/q/29462492
tags question: http://stackoverflow.com/q/29439228
tags question: http://stackoverflow.com/q/29379405
tags question: http://stackoverflow.com/q/29404754
tags question: http://stackoverflow.com/q/29482682
tags question: http://stackoverflow.com/q/29502582
tags question: http://stackoverflow.com/q/29449085
tags question: http://stackoverflow.com/q/29399887

http://stackoverflow.com/a/29396667
has comment: http://stackoverflow.com/comment/46989652
has body: Something quite equivalent but using Graph API: var db = orient.getGraph(); var member = db.addVertex("class:Member"); member.setProperty("name", "robin"); member.setProperty("password", "robin"); db.commit(); return;
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29396417
answers question: http://stackoverflow.com/q/29396417
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46991456
has comment: http://stackoverflow.com/comment/47003638
score: 1

http://stackoverflow.com/q/29515632
has body: There is an MVC 4 Web Application deployed on a server with specific date format (ex. US date format 02/02/2015). How can i display a date on the client machine by respecting his local date culture (ex. Uk format 02-02-2015) so that when I retrive from the server the value 02/02/2015 on the client side it will be 02-02-2015? I tried to use: date.toLocaleDateString() but whatever format i choose for my client machine the output remains the same. Or if it is possible, how can i get the clients system date to pass it to my controller without asking to choose a format?
score: 1
linked to: http://stackoverflow.com/q/2404247
type: Question
tagged with: javascript
tagged with: jquery
tagged with: validation
has answer: http://stackoverflow.com/a/29516170
answer count: 1
downvote count: 0
has title: Return client specific date format to server MVC4
favorite count: 0
accepted answer: http://stackoverflow.com/a/29516170
upvote count: 1
tagged with: asp.net-mvc-4
tagged with: model-view-controller
type: AnsweredQuestion

http://stackoverflow.com/comment/47209256
type: QuestionComment
has text: @epascarello it still breaks the line : https://jsfiddle.net/h0dzc21u/
score: 0
comment on: http://stackoverflow.com/q/29527416
type: Comment

http://stackoverflow.com/comment/47174273
comment on: http://stackoverflow.com/q/29508143
score: 0
has text: Use explicit wait till element comes visible to click.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47204189
type: QuestionComment
has text: You are calling `document.getElementsByTagName('li')` several times, which is very inefficient. It's a live collection, so you only need to get it once and it will be automatically updated as *li* elements are added and removed from the document. Also, it's assigned to an implicit global variable, *li_array*. So do it once globally, then you can do: `li_array[0].parentNode.removeChild(li_array[0])`.
comment on: http://stackoverflow.com/q/29524609
score: 0
type: Comment

http://stackoverflow.com/a/40233730
has body: https://github.com/tomauty/react-native-chart has been available for a while.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/67731116
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29442037

http://stackoverflow.com/comment/47168832
type: QuestionComment
has text: `var confirm = confirm("..` wont work. Assign a different variable.
type: Comment
comment on: http://stackoverflow.com/q/29505925
score: 0

http://stackoverflow.com/a/29528692
has body: I think what you're looking for is the blur event. $('body').on('blur', 'input.change-handled', UpdateTotal); function UpdateTotal() { var total = 0; var $changeInputs = $('input.change-handled'); $changeInputs.each(function(idx, el) { total += Number($(el).val()); }); $('.total').text(total); } Total: $0
score: 1
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29528611
type: Answer
accepted answer of: http://stackoverflow.com/q/29528611
downvote count: 0

http://stackoverflow.com/q/29477677
tagged with: cordova
type: UnansweredQuestion
tagged with: php
has title: Posting phonegap image to php/mysql - image field disappears from post request?
score: 0
tagged with: mysql
type: Question
tagged with: javascript
tagged with: base64
has body: I am retrieving an image from a user's gallery, and trying to post the base64 encoded version to a server using php and mysql. The base64 string returned is: [binary] The code used to post (base64 string is cameraPic): $.post("https://www.domaintopostto.co.uk/API/users.php", { user: usernamePost, userID: result.id, gender: gender, image: cameraPic }, function (data) { console.log(data); console.log("HERE"); if (data.result = "Added") { window.location = "sportsSelector.html"; } }); PHP code on the server: $image = $_POST['image']; $base64img = str_replace('data:image/jpeg;base64,', '', $image); $sql = "INSERT INTO userActivityLocation(user, userID, gender, image)VALUES('$user', '$userID', '$gender', '$base64img')"; The base64 string does not appear in the db. In fact, the image: cameraPic pasrt of the request entirely disappears.....it isnt there in the network view in chrome. The other fields fire off okay and show up in chrome. No errors in console, none echoed from the server. Any advice would be greatly appreciated thankyou!
has answer: http://stackoverflow.com/a/29478512
answer count: 1

http://stackoverflow.com/comment/47178054
has text: It was working earlier fine. But suddenly stopped functioning
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29510993

http://stackoverflow.com/comment/101403121
has text: @TylerH so is the point of editing to fix typos and the like? Or to update information as it becomes outdated? I'm new to the ability to edit other people's posts privilege.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/57459509

http://stackoverflow.com/comment/46979875
type: QuestionComment
score: 0
has text: So that was the answer? It was just an outdated version?
comment on: http://stackoverflow.com/q/29401264
type: Comment

liferay
tags question: http://stackoverflow.com/q/29427301
tag name: liferay
tags question: http://stackoverflow.com/q/29486756
type: Tag
tags question: http://stackoverflow.com/q/29413937
tags question: http://stackoverflow.com/q/29512686

http://stackoverflow.com/a/29425544
has comment: http://stackoverflow.com/comment/47022421
downvote count: 0
answers question: http://stackoverflow.com/q/29425483
score: 1
accepted answer of: http://stackoverflow.com/q/29425483
has comment: http://stackoverflow.com/comment/47022308
upvote count: 1
type: AcceptedAnswer
has body: orangeBlock is a string. You need a DOM node to use insertBefore. You can convert it like below. var orange = document.createElement('div'); orange.innerHTML = orangeBlock; document.getElementsByClassName get list of nodes. So you need to select one out of them greyBlock[0] Something like this finally. var orangeBlock = 'Try out the New Version of CLO'; var orange = document.createElement('div'); orange.innerHTML = orangeBlock; var greyBlock = document.getElementsByClassName('grey-block'); function insertAfter(newNode, referenceNode) { referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); } insertAfter(orange, greyBlock[0]);
has comment: http://stackoverflow.com/comment/47022354
type: Answer

http://stackoverflow.com/comment/47160506
has text: getBoundingClientRect seems buggy indeed. Try using getComputedStyle. See my answer below
comment on: http://stackoverflow.com/q/29500716
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29453992
has title: How to make a web API private
has answer: http://stackoverflow.com/a/29454217
score: 0
has answer: http://stackoverflow.com/a/29454208
accepted answer: http://stackoverflow.com/a/29454217
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29454208
has body: I have an API that I would like to restrict access to. I can provide access keys and check them with each request, but I'm not sure how far this is really going to go. The API is used by applications, but it is also used by a web app which someone can just view the source of. If they did, they would have the key and could easily make API calls. Is there a more reliable way to secure access? I'm not sure what the standard practice here is. Edit: After thinking about it, I could use a two-prong approach. The web app can use POST with CSRF, and applications can use API keys. Any other ideas, or is this a generally accepted solution? (Note, this still wouldn't work for third-party web apps.)
tagged with: security
tagged with: rest
type: AnsweredQuestion
type: Question
answer count: 2

http://stackoverflow.com/q/29528330
accepted answer: http://stackoverflow.com/a/29528554
type: AnsweredQuestion
score: 1
has body: I have an element which selenium picks up as disabled. It is however, enabled. As such I click on it using javascript. Below is the snippet I use: IWebElement button = driver.FindElement(By.XPath(ButtonXpath)); ((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].click()", button); When I exeucte this code, nothing happens. It steps over these lines, and the button (anchor actually in this case) doesnt get clicked. I cant use id as the anchor has none. What should I do to enforce a click? Thanks, Rahul
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29528554
tagged with: selenium-webdriver
upvote count: 1
has title: Selenium - click on button using javasacript not working
type: Question

http://stackoverflow.com/comment/47345400
type: Comment
has text: I checked the [PDF reference 1.7 at adobe.com](https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf), and the "PDF is not a programming language" quote seems to actually be in page 166, section 3.9.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29510537

http://stackoverflow.com/a/29388093
downvote count: 0
score: 1
has body: I'll give you a hint from one of my recent projects. Form: &lt;form method="post" action="" id="form"&gt; &lt;input type='text' class='textInput' name="One" id="one" value='0'&gt; &lt;input type='text' class='textInput' name="Two" id="two" value='0'&gt; &lt;input type='text' class='textInput' name="Three" id="three" value='0'&gt; &lt;input type='text' class='textInput' name="Four" id="four" value='0'&gt; &lt;input type='text' class='textInput' name="Five" id="five" value='0'&gt; &lt;input type='text' class='textInput' name="Six" id="six" value='0'&gt; &lt;input type='text' class='textInput' name="Seven" id="seven" value='0'&gt; &lt;input type='text' class='textInput' name="Eight" id="eight" value='0'&gt; &lt;input type="submit" id='submit' value="Submit"&gt; &lt;/form&gt; &lt;p id='output'&gt;&lt;/p&gt; And JavaScrpipt: $('form').submit(function(){ $('.textInput').each(function(){ if($(this).val() != '0') { $('#output').text($('#output').text()+ ' ' + $(this).attr('name') + ':' + $(this).attr('value') ); } }); return false; }); I hope it helps...
answers question: http://stackoverflow.com/q/29387878
upvote count: 1
type: Answer

http://stackoverflow.com/a/29389435
type: Answer
has comment: http://stackoverflow.com/comment/46956902
accepted answer of: http://stackoverflow.com/q/29388921
downvote count: 0
has comment: http://stackoverflow.com/comment/46956832
score: 1
has body: What is the whole point of the sendAjaxQuery method ? It just recreates what the $.post does Just use // url and data should be whatever you pass to sendAjaxQuery now $.post(url, data, refreshResults); whenever you want to make an ajax call.. Update Seeing that you are submitting the contents of a form, the problem might be that you allow the form to be submitted the normal way as well (which causes a refresh of the page). You will need to cancel the normal action of the button that started this action.. Since you are using jQuery, it is better to use that for binding the event handlers change var sendButton = document.getElementById('sendButton'); sendButton.onclick = sendData; to $('#sendButton').on('click', function(e){ e.preventDefault(); sendData(); });
has comment: http://stackoverflow.com/comment/46956661
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46956519
answers question: http://stackoverflow.com/q/29388921
upvote count: 1

http://stackoverflow.com/comment/47235911
has text: Please see ["Should questions include “tags” in their titles?"](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles), where the consensus is "no, they should not"!
comment on: http://stackoverflow.com/q/29530183
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47173477
comment on: http://stackoverflow.com/a/29508057
type: AnswerComment
score: 0
type: Comment
has text: well i wouldnt say copy exactly, rather do a creative reformulation ;)

http://stackoverflow.com/a/29415482
has body: Use Request.Form.AllKeys at your server side code to read all textbox data that are generated dynamically with javascript foreach (string name in Request.Form.AllKeys) { string value = Request.Form[name]; }
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29415370
score: 3
answers question: http://stackoverflow.com/q/29415370
has comment: http://stackoverflow.com/comment/47008880
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29490766
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29490490
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/29490490
has body: below working for me &lt;script&gt; var jsonArr = { "28": { "controllerID": "28", "DateDiff": "147", "CycleTime": "-52" }, "30": { "controllerID": "30", "DateDiff": "117", "CycleTime": "-59" }, "37": { "controllerID": "37", "DateDiff": "71", "CycleTime": "-56" }, "40": { "controllerID": "40", "DateDiff": "59", "CycleTime": "-56" } }; $.each(jsonArr, function(key, val){ console.log(key); console.log(val.controllerID); var html = '&lt;div class="col-md-12 Top"&gt;'+val.controllerID+'&lt;/div&gt;&lt;div id="'+val.controllerID+'" class="col-md-12 Midbox"&gt;&lt;/div&gt;' $('.box').append(html); }); &lt;/script&gt;
score: 4

http://stackoverflow.com/q/29509793
tagged with: adsense
has answer: http://stackoverflow.com/a/29518506
tagged with: forms
type: Question
has body: I'm using this code: I'm putting it on a WP site, I tried changing the id, but the watermark is still not showing on the searchbox. Appreciate your help on this! :)
tagged with: javascript
tagged with: search
score: 0
has answer: http://stackoverflow.com/a/29509893
answer count: 2
has title: Google Watermark not showing in custom search box
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion

http://stackoverflow.com/comment/47191583
comment on: http://stackoverflow.com/q/29518146
type: Comment
has text: Nope, I was able to get it working when I turned off the HttpOnly flag.
score: 0
type: QuestionComment

http://stackoverflow.com/q/29523695
favorite count: 0
has answer: http://stackoverflow.com/a/29523737
type: Question
has title: Having trouble with specific function in javascript
has comment: http://stackoverflow.com/comment/47202111
score: -1
has comment: http://stackoverflow.com/comment/47201861
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/47201824
has answer: http://stackoverflow.com/a/29523789
has body: I have a question concerning javascript. I have created a function which prompts the user to enter a string, and once the string is entered will perform a for loop to go through the entire length of the string, looking for the character "B" and then return the number of "B"s found in the result variable. As far as my knowledge, I feel that the code I have should work, however not matter how many "B" are present within my code, the function consistently returns 2. Any ideas on why this would be happening function countBs(string) { var result = 1; var string = prompt("Please Enter a String"); for (count = 0; count &lt; string.length; string++) { if (string.charAt(count) == "B") { result += 1; return result; } } };
type: UnansweredQuestion
answer count: 4
has answer: http://stackoverflow.com/a/29523846
has answer: http://stackoverflow.com/a/29524203
tagged with: javascript

http://stackoverflow.com/a/29417505
downvote count: 0
type: AcceptedAnswer
score: 4
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/29417410
accepted answer of: http://stackoverflow.com/q/29417410
has body: Change this: $('.selectpicker').refresh(); To this: $('.selectpicker').selectpicker('refresh'); Calling the non-existent refresh() method prevented the remaining code from being executed. Corrected fiddle: http://jsfiddle.net/BenjaminRay/83k458Lz/11/

http://stackoverflow.com/q/29429546
type: Question
accepted answer: http://stackoverflow.com/a/29430449
has comment: http://stackoverflow.com/comment/47029278
tagged with: javascript
has comment: http://stackoverflow.com/comment/47029882
score: 0
has title: using single function how to call two different input fields
answer count: 1
has body: Hi in the below code I am going to upload the image using following java script function.for the first input working fine.In the same way how to call second input field when I am passing the id it's got changes the first one and second one images are displaying same. html Please upload your photo Please upload your family photo javascript function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#blah') .attr('src', e.target.result) .width(150) .height(200); }; reader.readAsDataURL(input.files[0]); } if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#blah1') .attr('src', e.target.result) .width(150) .height(200); }; reader.readAsDataURL(input.files[0]); } }
linked to: http://stackoverflow.com/q/1017224
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29430449

http://stackoverflow.com/a/29425073
answers question: http://stackoverflow.com/q/29425025
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: Your curValueField doesn't have a name, so its value is never sent to your PHP. Try this : &lt;input type="hidden" id="curValueField" name="curValueField" value=""/&gt;
has comment: http://stackoverflow.com/comment/47049000

http://stackoverflow.com/comment/47117557
comment on: http://stackoverflow.com/q/29478005
score: 0
type: QuestionComment
type: Comment
has text: That's the thing, I don't know. Any of the objects can contain more/less information than what is displayed in my example. It all depends on when the JSON file is being read.

http://stackoverflow.com/q/29416010
type: Question
possible better answer: http://stackoverflow.com/a/52559612
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/52559612
favorite count: 0
tagged with: security
has answer: http://stackoverflow.com/a/34449778
answer count: 3
score: 10
has comment: http://stackoverflow.com/comment/47004307
has body: I'm loading [site1]/script.js on [site2]/page.html with script tag. And the browser does not send cookies while requesting a JS file. Response headers: HTTP/1.1 200 OK Server: nginx Date: Thu, 02 Apr 2015 14:45:38 GMT Content-Type: application/javascript Content-Length: 544 Connection: keep-alive Content-Location: script.js.php Vary: negotiate,Accept-Encoding TCN: choice Set-Cookie: test_id=551d5612406cd; expires=Sat, 02-Apr-2016 14:45:38 GMT; path=/ Content-Encoding: gzip Request headers - no cookies: GET /script.js HTTP/1.1 Host: [site1] Connection: keep-alive Cache-Control: max-age=0 Accept: */* User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36 Referer: [site2]/page.html Accept-Encoding: gzip, deflate, sdch Accept-Language: ru,en-US;q=0.8,en;q=0.6,sk;q=0.
tagged with: google-chrome
accepted answer: http://stackoverflow.com/a/34449778
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47004258
has answer: http://stackoverflow.com/a/29416168
tagged with: cookies
has title: Why the browser doesn't send cookies while requesting a JavaScript file?
upvote count: 10
has comment: http://stackoverflow.com/comment/47004502

http://stackoverflow.com/comment/47194157
comment on: http://stackoverflow.com/q/29519146
score: 0
type: Comment
type: QuestionComment
has text: Thank you, didn't even notice that.

http://stackoverflow.com/a/29498991
upvote count: 2
has body: I got this as a solution. I think this is the best solution to get random tracks out of Spotify. Let me know what you guys think of this. It isn't completely random, but it's a kind of.:) //make a variable with some search queries and put it in an array. (you can create more search queries. $getRandomSongsArray = array('%25a%25', 'a%25', '%25e%25', 'e%25', '%25i%25', 'i%25', '%25o%25', 'o%25'); //This will get a random result out of the array above $getRandomSongs = $getRandomSongsArray[array_rand($getRandomSongsArray)]; //This will get a random offset number between 1 and 1000. So you get a random track. (you can change the numbers btw) $getRandomOffset = rand(1, 1000); //This is the url that gets the results out of the Spotify API. You have to put in the variables you created above. $url = "https://api.spotify.com/v1/search?query=$getRandomSongs&amp;offset=$getRandomOffset&amp;limit=1&amp;type=track&amp;market=NL";
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29379603

http://stackoverflow.com/a/29377215
downvote count: 0
has body: I think some() does exactly what you're looking for.
upvote count: 8
answers question: http://stackoverflow.com/q/29374497
type: Answer
score: 8
has comment: http://stackoverflow.com/comment/46936887

http://stackoverflow.com/comment/46962205
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29392670
score: 0
has text: Just Append i with Key. like : alert1, alert2, alert3

http://stackoverflow.com/a/29445115
has comment: http://stackoverflow.com/comment/47057721
score: 3
has body: As you've mentioned, When you try onload, this will refer to the window object. Hello You can try that using:
downvote count: 0
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/29445092

http://stackoverflow.com/comment/47174290
comment on: http://stackoverflow.com/q/29508143
type: Comment
has text: Have all scripts and styles on the page finished loading when this error occurs?
score: 0
type: QuestionComment

http://stackoverflow.com/q/29408997
type: Question
type: AnsweredQuestion
tagged with: jquery-ui
has body: I've gotten on board to using the Widget Factory for creating plugins. However I can't seem to find a way to destroy the plugin from within. In all the examples and tutorials I've found so far they destroy the plugin from the DOM. Which is all good and well but I would also like to be able to destroy the plugin from within my prototype. Say for example the plugin is invoked with incorrect parameters or a incorrect element or after some time it does not validate. I would like to be able to call this.destroy() afterwards and destroy the plugin. When i call this.destroy() it does call the $.Widget.prototype.destroy() and my subsequent _destroy() method but the instance is still on the DOM element. Only when calling $(el).pluginName('destroy') does it get truly destroyed. Quick example here Say we have some html Lorem ipsum and our jQuery UI widget, which aims to destroy it as soon as it's created $.widget('ns.test', { _create: function() { this.destroy(); }, _destroy: function() {} }); and we invoke the pluging so $('p').test(); I would expect that the instance would not be set on the $('p') but it is $('p').data(); >> Object {ns-test: $.widget.$.(anonymous function).(anonymous function)} Only when calling the method from the DOM it gets destroyed $('p').test('destroy'); >> Object {} Any thoughts anyone?
has comment: http://stackoverflow.com/comment/46996779
tagged with: jquery-ui-widget-factory
tagged with: destroy
has answer: http://stackoverflow.com/a/36461482
answer count: 1
has comment: http://stackoverflow.com/comment/46994922
tagged with: javascript
accepted answer: http://stackoverflow.com/a/36461482
score: 0
has title: How to destroy a jQuery UI widgets from within it's prototype

http://stackoverflow.com/comment/47129494
type: QuestionComment
comment on: http://stackoverflow.com/q/29484698
has text: try this $(window).scrollTop
score: 0
type: Comment

http://stackoverflow.com/q/29384371
has answer: http://stackoverflow.com/a/29384444
possible better answer: http://stackoverflow.com/a/29384433
has answer: http://stackoverflow.com/a/29384398
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29384433
linked to: http://stackoverflow.com/q/17768295
has comment: http://stackoverflow.com/comment/46947263
tagged with: javascript
has comment: http://stackoverflow.com/comment/46947160
linked to: http://stackoverflow.com/q/48239
has body: In the fiddle linked below there's some example code I need to troubleshoot. I've simplified it a bit from the original code (didn't write) for demo purposes in the fiddle. $(document).ready(function(){ $("ul").children().each(function(i){ $(this).click(function(){ var indexItem = i; if(indexItem == 0){ displayId(); } if(indexItem == 1){ displayNode(); } if(indexItem == 2){ displayNodevalue(); } }); }); }) function displayId(event){ // below returns undefined not what I want // var $listID = jQuery(this).attr("id"); var $listID = event.target.id; alert($listID); } function displayNode(event){ var listNodename = event.target.nodeName; alert(listNodename); } function displayNodevalue(event){ var listValue = event.target.nodeValue; alert(listValue); } How do I get the event.target properties for these items? The console displays: Uncaught TypeError: Cannot read property 'target' of undefined I've googled various possible solutions below. They are good but I'm not finding the answer. How to pass the event object to a named function Getting the ID of the element that fired an event https://api.jquery.com/event.target/ If I've missed the answer in those threads, please let me know. Seems this question should be answered somewhere, but I'm having trouble locating it. If not, I'd appreciate some help telling me what is wrong with this code and how to get the event target. Thanks. FIDDLE LINK
tagged with: targeting
score: 0
answer count: 3
has title: Unable to get the event target property of a named function
tagged with: events
accepted answer: http://stackoverflow.com/a/29384398
tagged with: jquery

http://stackoverflow.com/a/29396661
has body: You're passing three arguments to Products.find, but it only expects two. {limit: 10}, {fields: {memberPrice: 0}} should be {limit: 10, fields: {memberPrice: 0}}.
answers question: http://stackoverflow.com/q/29396425
score: 2
downvote count: 0
type: Answer
upvote count: 2

sharepoint-2013
tags question: http://stackoverflow.com/q/29373893
type: Tag
tags question: http://stackoverflow.com/q/29380452
tag name: sharepoint-2013
tags question: http://stackoverflow.com/q/29417632

http://stackoverflow.com/comment/46998267
type: QuestionComment
type: Comment
has text: if i give the same drill down for both of thm, the drill down comes in green color which i do not want
comment on: http://stackoverflow.com/q/29390292
score: 0

http://stackoverflow.com/a/34123510
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29487628
has body: As i searched on the google, there is no way to send one request for multiple "dropzone" with the same URL, so i solved this problem manually by the following steps: 1) Dropzone actually change the images to Base64 string for thumbnail preview and then it add that string to the source of "img" tag. So you need to read that image "src" and "alt", and also add them to the input type hidden dynamically as the following: $('#btnUpload').on('click', function () { $.each($("img[data-dz-thumbnail]"), function( index, value ) { $('&lt;input&gt;').attr({ type: 'hidden', name: 'myHiddenFiles[' + index + '].Key', value: $(value).attr("alt") }).appendTo('#newsForm'); $('&lt;input&gt;').attr({ type: 'hidden', name: 'myHiddenFiles[' + index + '].Value', value: $(value).attr("src") }).appendTo('#upload-Invoices'); }); $("#upload-Invoices").submit(); }); Repeat this codes for each dropzone you need to post their data. 2) On your action method, you need to add a parameter with type "Dictionary" in order to get file name and file content with Base64 string format. Then you can parse the Base64 string as image, store it as a file and save your form data to the database. You can see the related snippet code as following: [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create(ModelClass model, IDictionary&lt;string, string&gt; myHiddenFiles) { if (ModelState.IsValid) { foreach (var file in myHiddenFiles) { var base64 = file.Value.Substring(file.Value.IndexOf(',') + 1).Trim('\0'); var bytes = Convert.FromBase64String(base64); var saveFile = Server.MapPath("~/Images/" + file.Key); System.IO.File.WriteAllBytes(saveFile, bytes); // Save your model to database.... } } return View(); }
has comment: http://stackoverflow.com/comment/82579417
upvote count: 2
has comment: http://stackoverflow.com/comment/82551769
downvote count: 0

http://stackoverflow.com/q/29489008
tagged with: parse-platform
has title: Parse - why does user.getSessionToken() return undefined
type: AnsweredQuestion
upvote count: 3
type: Question
score: 3
has answer: http://stackoverflow.com/a/29498557
tagged with: javascript
has comment: http://stackoverflow.com/comment/47140850
has body: I'm using cloud function to fetch user's sessionToken. The documentation says, this method only returns correct value when a user object is fetched with the master key. However, even if I use the master key, I still get the undefined result. What's wrong with my code? Parse.Cloud.define("hello", function(request, response) { Parse.Cloud.useMasterKey(); Parse.Promise.as().then(function(){ var query = new Parse.Query(Parse.User); return query.first({useMasterKey:true}); }).then(function(user){ return user.fetch({useMasterKey:true}); }).then(function(user){ response.success(user.getSessionToken()); }); });
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29498557

http://stackoverflow.com/comment/128320903
has text: @Sandi You might want to add a [mre] to get more attention to this question.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29429392

http://stackoverflow.com/q/29481323
has comment: http://stackoverflow.com/comment/47123267
has title: Angular UI Modal moves the page when is open
upvote count: 2
type: UnansweredQuestion
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47125328
score: 2
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/30602221
tagged with: angular-ui
favorite count: 0
has body: In angular ui, even in the source page example when you open the modal the page behind is moved about 5 px more or less. Open the modal in the page and look at how the page is moved. https://angular-ui.github.io/bootstrap/ Somebody knows why or how to workaround this issue. I tested in two of my monitors. It is the best angular modal or there's other better modals?
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47189942

http://stackoverflow.com/q/29465452
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: three.js
upvote count: 1
answer count: 0
score: 1
has title: Threejs :: determine if an object is screened by others
type: Question
tagged with: javascript
has body: I have been developing an 3d model viewer with three.js but I have encountered this problem and I cannot seem to find any solution to it. I want to have 2d overlay tracking a sphere while it's rotating. I managed to code the overlay tracking the sphere referring to http://zachberry.com/blog/tracking-3d-objects-in-2d-with-three-js. But I want to hide the tracking overlay while the sphere is screened by the cude. So I tried to caculate intesects between camera and the sphere to determine is visible from camera. But rayCaster.intersectObjects always return 0. Here is my code. How can i determain the sphere is visible or not? $(function() { // Some defaults/hardcoded values: var DEFAULT_VIEW_ANGLE = 45; var DEFAULT_CAMERA_X = 0; var DEFAULT_CAMERA_Y = 0; var DEFAULT_CAMERA_Z = 200; var PERSPECTIVE_NEAR = 0.1; var PERSPECTIVE_FAR = 10000; var WIDTH = $('#viewport').width(); var HEIGHT = $('#viewport').height(); // state var rotate = true; // three.js objects: var renderer; var scene; var camera; var projector; var container; var cube; var sphere; var pointLight; var rayCaster; // elements var $trackingOverlay = $('#tracking-overlay'); // create three.js elements projector = new THREE.Projector(); renderer = new THREE.WebGLRenderer(); rayCaster = new THREE.Raycaster(); scene = new THREE.Scene(); camera = new THREE.PerspectiveCamera(DEFAULT_VIEW_ANGLE, WIDTH / HEIGHT, PERSPECTIVE_NEAR, PERSPECTIVE_FAR); camera.position.set(DEFAULT_CAMERA_X, DEFAULT_CAMERA_Y, DEFAULT_CAMERA_Z); pointLight = new THREE.PointLight(0xFFFFFF); pointLight.position.set(10, 50, 150); container = new THREE.Object3D(); cube = new THREE.Mesh( new THREE.BoxGeometry(50, 50, 50), new THREE.MeshLambertMaterial({wireframe: false, color: 0x00CC00}) ); cube.position.set(0, 0, 0); sphere = new THREE.Mesh( new THREE.SphereGeometry(4, 32, 32), new THREE.MeshLambertMaterial({wireframe:false, color: 0xCCCC00}) ); sphere.position.set(0, 64, 0); container.add(cube); container.add(sphere); scene.add(container); scen…

http://stackoverflow.com/a/29439447
has body: I might take a different approach to this entirely, but I'm not quite sure how you are building your data either. The middle name, if it exists, will be the 2nd element in first_array, so you can start by checking that. var nickname, nameToDisplay = first_array[1]; if (first_array[2]) { // split on `=` if we have a middle name nickname = first_array[2].split("="); } If the = exists, then the person's nickname will be the 1st element in nickname. if (nickname[1]) { nameToDisplay = nickname[1]; } If the = is not there, then nickname[1] will not exist and the conditional will fail.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47048333
has comment: http://stackoverflow.com/comment/47048544
accepted answer of: http://stackoverflow.com/q/29439228
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/47048621
upvote count: 1
answers question: http://stackoverflow.com/q/29439228

http://stackoverflow.com/a/29499012
score: 4
has comment: http://stackoverflow.com/comment/47156850
type: Answer
has body: Not that it would really make a difference performance-wise, but you could keep them out of global scope but still only define them once: (function() { var a = "a"; var b = "b"; window.test = function() { console.log(a); }; })();
answers question: http://stackoverflow.com/q/29498957
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/47109334
type: QuestionComment
comment on: http://stackoverflow.com/q/29466073
has text: well simple one try like this http://jsfiddle.net/supercool/gm545Lt8/9/ . gave extended comments hope that helps . cheers
score: 0
type: Comment

http://stackoverflow.com/comment/47114498
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29476518
has text: @LarsKotthoff thanks a lot for this. It is somewhat buggy still but works like 90% of the time
score: 0

http://stackoverflow.com/comment/47064261
type: Comment
comment on: http://stackoverflow.com/q/29442592
score: 0
has text: I can't mark your comment as the answer...
type: QuestionComment

http://stackoverflow.com/tag/q
tags question: http://stackoverflow.com/q/29493429
type: Tag
tag name: q
tags question: http://stackoverflow.com/q/29428249
tags question: http://stackoverflow.com/q/29387231
tags question: http://stackoverflow.com/q/29469434
tags question: http://stackoverflow.com/q/29395077

http://stackoverflow.com/q/29422838
has comment: http://stackoverflow.com/comment/47018125
tagged with: generator
possible better answer: http://stackoverflow.com/a/29423144
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29423144
type: Question
upvote count: 2
tagged with: ecmascript-6
answer count: 2
accepted answer: http://stackoverflow.com/a/29423192
tagged with: javascript
has comment: http://stackoverflow.com/comment/47017445
has answer: http://stackoverflow.com/a/29423192
has comment: http://stackoverflow.com/comment/47017344
has comment: http://stackoverflow.com/comment/47017410
favorite count: 0
has body: If I supply a value to the next method on a generator, in addition to supplying an expression to the right of the yield keyword, how is the return value of the yield resolved? function* go() { console.log(yield 'a'); console.log(yield 'b'); } var g = go(); g.next(); g.next('one'); g.next('two'); Output: one two Object {value: undefined, done: true} In light of the output, it is the value supplied to the next method that is used over the value returned by the expression to the right of yield. Edit: code updated to better reflect my question.
has title: Resolution of yield return value in JavaScript generators

http://stackoverflow.com/q/29431225
answer count: 2
tagged with: arrays
score: 18
has body: I know there's plenty of questions related to this error and I've checked most of them and none help me solve my issue. (Which seems so easy to debug...) I have an array (which is empty aat first): var words = []; And my function hasLetter, checks if we find a letter (object) in the array (that I call here: d) words. function hasLetter(letter,d){ // if words[0] not null should return object of letter "a", here we getting // the index of the letter (since ascii of "a" is 97, I substract 97) var ascii = letter.charCodeAt(0)-97; //Trying to not get an error with this but still creates an err if(typeof d[ascii ] !== "undefined" &amp;&amp; d[ascii ] !== null &amp;&amp; d[ascii ].length &gt; 0){ if(d[ascii].letter == letter){ return true; } } return false; } and I have a function called addLetter which checks if hasLetter returns true/false and then creates or not accordingly a new node. function addLetter(letter,d){ var ascii = letter.charCodeAt(0)-97; if(!hasLetter(letter,d)){ document.write("This letter" + letter + " hasn't been found in words."); d[ascii] = new Node(letter); } document.write("This letter " + letter + " already exists in words."); document.write(d[ascii].letter); } and if I test: addLetter("a",words); it returns: Uncaught TypeError: Cannot read property '0' of undefined I don't know what to do to say "if it's undefined then don't look into it or something along those lines... Thanks
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/29431405
possible better answer: http://stackoverflow.com/a/29431359
has title: Javascript Uncaught TypeError: Cannot read property '0' of undefined
tagged with: typeerror
has comment: http://stackoverflow.com/comment/108386981
has comment: http://stackoverflow.com/comment/47032015
upvote count: 18
has comment: http://stackoverflow.com/comment/47032790
has answer: http://stackoverflow.com/a/29431405
has comment: http://stackoverflow.com/comment/47032010
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47032025
downvote count: 0
tagged with: error-handling
type: Question
has answer: http://stackoverflow.com/a/29431359

http://stackoverflow.com/a/29454392
answers question: http://stackoverflow.com/q/29447832
score: 0
type: Answer
has body: When the articles are uploaded to the servlet, they have to be saved in some database. On the client side you have to provide a hyperlink or menu option to view all the articles. When the user clicks on the 'View All Articles' link it should call the servlet. The servlet has to fetch the records from the DB and put them in a list. This list then has to be added to a response object such as response.setAttribute("articleList",&lt;your_list_of_articles&gt;) Now use the requestDispatcher object to forward the response to a jsp page. In the Jsp page iterate through the list and display the articles. If you want to display only specific articles, then instead of hyperlink to the 'View All Articles' page you can provide a form which takes the title of the article as parameter and submits to the servlet.

http://stackoverflow.com/comment/46935693
type: QuestionComment
comment on: http://stackoverflow.com/q/29376648
score: 0
has text: @user3312767 I still can't make this work: http://jsbin.com/wuramanuxi/1/edit?js,output
type: Comment

http://stackoverflow.com/comment/47090621
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29400607
has text: No problem! Glad I could help. Feel free to select this answer so that people will know that your problem was solved. :)
score: 0

http://stackoverflow.com/a/29510993
has body: When are you calling addClickEventListenerToAllAnchorTag function ? Have you logged the list of selected anchor elements ? Is it an empty array ? If it is an empty array then you JavaScript code is getting executed before the page loads.
type: Answer
has comment: http://stackoverflow.com/comment/47178593
has comment: http://stackoverflow.com/comment/47178307
has comment: http://stackoverflow.com/comment/47178054
has comment: http://stackoverflow.com/comment/47178385
has comment: http://stackoverflow.com/comment/47178823
score: 0
has comment: http://stackoverflow.com/comment/47177898
answers question: http://stackoverflow.com/q/29510866
has comment: http://stackoverflow.com/comment/47178705
has comment: http://stackoverflow.com/comment/47178195
has comment: http://stackoverflow.com/comment/47178620
has comment: http://stackoverflow.com/comment/47178123

http://stackoverflow.com/q/29385656
tagged with: casperjs
type: UnansweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46951790
type: Question
tagged with: phantomjs
tagged with: javascript
has comment: http://stackoverflow.com/comment/46951187
has comment: http://stackoverflow.com/comment/46949954
answer count: 2
has title: CasperJS (phantom 1.9.7), connection https is not possible since yesterday
downvote count: 0
has answer: http://stackoverflow.com/a/29406177
has answer: http://stackoverflow.com/a/36853747
favorite count: 0
has comment: http://stackoverflow.com/comment/46951719
has comment: http://stackoverflow.com/comment/46951722
has comment: http://stackoverflow.com/comment/46966082
has body: Since yesterday, I have a problem with CasperJS and one site. It's actually impossible to connect server since yesterday. BUT, my script on windows works fine. I have this error on my production server: 2015-04-01T09:46:02 [DEBUG] WebPage - updateLoadingProgress: 10 2015-04-01T09:46:02 [DEBUG] Network - Resource request error: 2 ( "Connection closed" ) URL: "https://www.mysite.fr/" [error] [phantom] Resource https://www.mysite.fr/ failed to load (null) 2015-04-01T09:46:02 [DEBUG] WebPage - updateLoadingProgress: 100 I use: casperjs --ssl-protocol=tlsv1 --ignore-ssl-errors=yes --web-security=no --debug=yes script.js So, in windows (1.9.7) function perfect but since yesterday, script on my linux doesn't work as seen by the output above.

http://stackoverflow.com/comment/46988161
comment on: http://stackoverflow.com/a/29406897
type: Comment
has text: I am trying to achieve this in using mongo db as my time is stored in database in milliseconds and i am getting wrong result
score: 0
type: AnswerComment

http://stackoverflow.com/q/29406400
has comment: http://stackoverflow.com/comment/46987622
upvote count: 5
type: Question
answer count: 2
score: 5
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29406518
tagged with: urldecode
has body: Following is my JS code: window.location.href = 'products.php?price_range=-INFto2000,2001to5000'; My question is how do I encode the URL in javascript &amp; decode it in PHP, such that my browser's navigation bar will show "products.php?price_range=-INFto2000%2C2001to5000" instead of "products.php?price_range=-INFto2000,2001to5000" and my php code will be able to work with the proper value of -INFto2000,2001to5000 in $_GET['price_range']
has title: How to encode URL in JS and Decode in PHP?
has comment: http://stackoverflow.com/comment/46988136
possible better answer: http://stackoverflow.com/a/33924559
tagged with: php
accepted answer: http://stackoverflow.com/a/29406518
has answer: http://stackoverflow.com/a/33924559
type: AnsweredQuestion
tagged with: urlencode
linked to: http://stackoverflow.com/q/75980

http://stackoverflow.com/a/29475449
answers question: http://stackoverflow.com/q/29475375
has body: You can reduce what you have to: $(function () { $(':input').on('change keyup',function () { $('#result').html($('#numberInput').val() * $('#lengthInput').val()); }) }); jsFiddle example
has comment: http://stackoverflow.com/comment/47113139
score: 4
upvote count: 4
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47113084
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29475375

http://stackoverflow.com/q/29515624
has answer: http://stackoverflow.com/a/29515759
has comment: http://stackoverflow.com/comment/47186840
has answer: http://stackoverflow.com/a/29515878
has comment: http://stackoverflow.com/comment/47186900
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29515904
has answer: http://stackoverflow.com/a/29515736
has title: How would I change the background color of an HTML file if the screen size is too small using a javascript function?
has comment: http://stackoverflow.com/comment/47840433
has comment: http://stackoverflow.com/comment/47188126
has body: How would I change the background color of an HTML file if the screen size is too small using a javascript function? For example I need the background of my HTML file to be gray but if the window size is less than 600px it turns red. I did it with CSS but need to do it in java script. Here is what I have in CSS &lt;style&gt; body { background-color: gray; } @media screen and (max-width: 600px) { body { background-color: red; } } &lt;/style&gt;
type: Question
has answer: http://stackoverflow.com/a/29515904
has answer: http://stackoverflow.com/a/29515781
linked to: http://stackoverflow.com/q/3437786
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29515979
possible better answer: http://stackoverflow.com/a/29515736
score: 0
has answer: http://stackoverflow.com/a/29515767
tagged with: http://stackoverflow.com/tag/html
answer count: 7
has comment: http://stackoverflow.com/comment/47186710
has comment: http://stackoverflow.com/comment/47186689

object
tags question: http://stackoverflow.com/q/29470300
tags question: http://stackoverflow.com/q/29477273
tags question: http://stackoverflow.com/q/29393587
tag name: object
tags question: http://stackoverflow.com/q/29503137
tags question: http://stackoverflow.com/q/29423257
tags question: http://stackoverflow.com/q/29467340
tags question: http://stackoverflow.com/q/29423501
tags question: http://stackoverflow.com/q/29479782
tags question: http://stackoverflow.com/q/29403535
tags question: http://stackoverflow.com/q/29527514
tags question: http://stackoverflow.com/q/29381538
tags question: http://stackoverflow.com/q/29492778
tags question: http://stackoverflow.com/q/29492689
tags question: http://stackoverflow.com/q/29524475
tags question: http://stackoverflow.com/q/29459515
tags question: http://stackoverflow.com/q/29475553
tags question: http://stackoverflow.com/q/29496270
tags question: http://stackoverflow.com/q/29528457
tags question: http://stackoverflow.com/q/29528945
tags question: http://stackoverflow.com/q/29403919
tags question: http://stackoverflow.com/q/29411714
tags question: http://stackoverflow.com/q/29499491
tags question: http://stackoverflow.com/q/29439905
tags question: http://stackoverflow.com/q/29502218
tags question: http://stackoverflow.com/q/29528346
tags question: http://stackoverflow.com/q/29461664
tags question: http://stackoverflow.com/q/29448313
tags question: http://stackoverflow.com/q/29498175
tags question: http://stackoverflow.com/q/29440301
tags question: http://stackoverflow.com/q/29514181
type: Tag
tags question: http://stackoverflow.com/q/29528148
tags question: http://stackoverflow.com/q/29473156

http://stackoverflow.com/q/29454611
tagged with: javascript
linked to: http://stackoverflow.com/q/31353887
tagged with: windows-runtime
type: AnsweredQuestion
has title: Windows 8 Javascript app XML Object
accepted answer: http://stackoverflow.com/a/29497948
tagged with: http://stackoverflow.com/tag/xml
type: Question
answer count: 1
has body: I'm currently trying to make a HTML/JavaScript Windows 8 modern application in which I want to access a local XML file that is in the installation directory. After reading many ideas and code snippets around the web, I came up with a convoluted asynchronous method of accessing the file, which works. However, is this the best/correct way to do something as simple as accessing a local XML file? Additionally, I'd like to be able to have a function load the xml file, and save the XMLDocument object as a "global" variable, so that on button presses and other triggers, the XMLDocument object can be accessed and parsed. This is where all the problems start, since one method is async, and then the variables are undefined, etc.... (function () { "use strict"; WinJS.UI.Pages.define("/pages/reader/reader.html", { // This function is called whenever a user navigates to this page. It // populates the page elements with the app's data. ready: function (element, options) { // TODO: Initialize the page here. var button = document.getElementById("changeText"); button.addEventListener("click", this.buttonClickHandler, false); var dropdown = document.getElementById("volumeDropdown"); dropdown.addEventListener("change", this.volumeChangeHandler, false); var loadSettings = new Windows.Data.Xml.Dom.XmlLoadSettings; loadSettings.prohibitDtd = false; loadSettings.resolveExternals = false; //previous attempt, also didn't work: //this.xmlDoc = null; //this.loadXMLdoc(this, this.testXML); //also not working: this.getXmlAsync().then(function (doc) { var xmlDoc = doc; }); //this never works also, xmlDoc always undefined, or an error: //console.log(xmlDoc); }, buttonClickHandler: function (eventInfo) { // doesn't work, xmlDoc undefined or error: console.log(xmlDoc); }, volumeChangeHandler: function (eventInfo) { var e = document.getElementById("volumeDropdown"); // of course doesn't work, since I can't save the XMLDocument object into a variable (works otherwise): var nodelist2 = xmlDoc.selectNo…
score: 0
tagged with: winapi
has answer: http://stackoverflow.com/a/29497948
tagged with: windows-8

http://stackoverflow.com/comment/47094721
score: 0
type: Comment
type: QuestionComment
has text: can you give an example of what you want the json to look like?
comment on: http://stackoverflow.com/q/29465929

http://stackoverflow.com/q/29496257
tagged with: node.js
type: AnsweredQuestion
has title: Knowing request IP in Hapi.js Restful API
type: Question
possible better answer: http://stackoverflow.com/a/33637313
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/29497870
accepted answer: http://stackoverflow.com/a/29497870
upvote count: 4
answer count: 2
downvote count: 0
tagged with: hapi.js
has body: I'm working on a Restful API with node.js and hapi.js. I'm trying to log the IP of the clients that request one of my routes. This is my current code: function(request, reply){ var ip = request.headers['x-forwarded-for'] || request.connection.remoteAddress; console.log('IP: ' + ip); //more code... } But ip is undefined when I watch my logs. How can I solve my problem?
favorite count: 0
has answer: http://stackoverflow.com/a/33637313

http://stackoverflow.com/a/29418052
has body: You can use: 'blah blah #this.is.example.'.replace(/#([^#\s@]*[^.])/g, "#$1") "blah blah #this.is.example."
score: 1
answers question: http://stackoverflow.com/q/29417983
upvote count: 1
downvote count: 0
type: Answer

http://stackoverflow.com/q/29434868
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/40732004
has body: I have a below function which works fine in Chrome but its giving the below error in IE10 SCRIPT438: Object doesn't support property or method 'endsWith' function getUrlParameter(URL, param){ var paramTokens = URL.slice(URL.indexOf('?') + 1).split('&amp;'); for (var i = 0; i &lt; paramTokens.length; i++) { var urlParams = paramTokens[i].split('='); if (urlParams[0].endsWith(param)) { return urlParams[1]; } } } Can someone tell me whats wrong with this function?
has comment: http://stackoverflow.com/comment/47038892
type: Question
has comment: http://stackoverflow.com/comment/47039061
score: 20
has answer: http://stackoverflow.com/a/29435149
accepted answer: http://stackoverflow.com/a/29435149
has comment: http://stackoverflow.com/comment/47046780
tagged with: internet-explorer
upvote count: 20
has comment: http://stackoverflow.com/comment/47038941
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/40732004
answer count: 3
has comment: http://stackoverflow.com/comment/47039045
favorite count: 0
has title: SCRIPT438: Object doesn't support property or method 'endsWith' in IE10
has answer: http://stackoverflow.com/a/53376468

http://stackoverflow.com/a/29531594
downvote count: 0
type: Answer
upvote count: 1
has body: There is a tool from Facebook that called ATC (A tool to simulate network conditions). It allows you to control bandwith, latency, packet loss and packet corruption rates in your network. Since it's open source, I think you can extend the functionality in order to use different "error" profiles, or set up integration with Webdriver. You can find general information about ATC here. ATCs github repo is here.
score: 1
answers question: http://stackoverflow.com/q/29382656

http://stackoverflow.com/comment/46964622
comment on: http://stackoverflow.com/q/29393922
score: 2
type: Comment
type: QuestionComment
has text: The bootstrap module (here `myApp`) needs to depend on the other (`myApp.filters`) for the services provided by the second to be active. So make it: `angular.module('myApp', ['myApp.filters']);`

http://stackoverflow.com/comment/47456497
type: Comment
has text: Justin this is truly impressive. I very hope we get to work together someday, I have alot to learn from you.
type: AnswerComment
comment on: http://stackoverflow.com/a/29638358
score: 0

http://stackoverflow.com/q/29478245
favorite count: 0
upvote count: 1
has title: calling different functions in the same javascript event handler
type: AnsweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/47117341
answer count: 1
downvote count: 0
has body: I have a table which contains dropdown lists in one column and when you select a number it gets multiplied by price and saves the answer in another cell. there are 4 columns and I want to calculate the total and save in another table while the values in the other 4 cells change. can I call the function which does this with onChange in the dropdownlist (onChange has been already assigned with another function return value too)
has answer: http://stackoverflow.com/a/29478382
tagged with: javascript
tagged with: event-handling
accepted answer: http://stackoverflow.com/a/29478382

minify
tags question: http://stackoverflow.com/q/29463252
tag name: minify
type: Tag
tags question: http://stackoverflow.com/q/29526177

http://stackoverflow.com/q/29473641
has body: I want to show the file dialog once the page is loaded. I tried using JS to trigger the click event on the file input in jQuery document ready event. But this approach only works in IE11, it doesn't work in Chrome (41.0.2272.118). How can I make it work in Chrome? Here is my code which doesn't work in Chrome but work in IE: My HTML File
has answer: http://stackoverflow.com/a/29473956
linked to: http://stackoverflow.com/q/12134014
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/47108498
has answer: http://stackoverflow.com/a/29473842
type: UnansweredQuestion
upvote count: 1
linked to: http://stackoverflow.com/q/210643
tagged with: google-chrome
has title: How to show file dialog with JavaScript once the page is loaded in Chrome
score: 1

http://stackoverflow.com/a/29467798
answers question: http://stackoverflow.com/q/29467541
has body: Just got the answer, all I need to do is just put the data in the img tag, like below. &lt;div id="gallery"&gt; &lt;a href="http://i.imgur.com/7Osllxil.jpg"&gt; &lt;img src="http://i.imgur.com/7Osllxil.jpg" data-name="Kitty" data-age="2"/&gt; &lt;/a&gt; &lt;a href="http://i.imgur.com/YACmI1G.jpg"&gt; &lt;img src="http://i.imgur.com/YACmI1G.jpg" data-name="Tom" data-age="3"/&gt; &lt;/a&gt; &lt;a href="http://i.imgur.com/af4ZDy8.jpg"&gt; &lt;img src="http://i.imgur.com/af4ZDy8.jpg" data-name="Felix" data-age="4"/&gt; &lt;/a&gt; &lt;/div&gt; And in the event, I can use e.galleriaData.original. Galleria.on('image', function(e){ var o = $(e.galleriaData.original); var name = o.data('name'); var age = o.data('age'); $('#caption').html('Hi, my name is ' + name + '. My age is ' + age); }); Working answer can be seen in this http://jsfiddle.net/petrabarus/pajn8q3z/
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/47170039
type: Comment
has text: @Gael thanks for Reply but no need access jest checking file exist or not .First tell me it's possible or not .Please guide me
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29506563

http://stackoverflow.com/a/29498071
score: 0
has body: The client has no access to a directory's list of files. Which makes it impossible to 'directly' get a list of possible files to download. If you keep a consistent filename protocol (like textfile01.txt, textfile02.txt etc...) you can easily just go through a loop counting upwards. var totalFiles = 99; for (var i = 0; i &lt; totalFiles; i++){ var number = (i &lt; 10) ? '0' + i : i; var filename = "textfile" + number + ".txt"; $.get(filename, function(datafil) { var bookings = datafil.split("\n"); // Display $("#divname").append(bookings); }); } Or if you'd rather use files where each is named differently, a simple array with filenames would suffice. var files = ["hello.txt", "world.txt"]; files.forEach(function(file, index){ $.get(file, function(datafil) { var bookings = datafil.split("\n"); // Display $("#divname").append(bookings); }); }); Mind you, the $.get() functions will be called pretty much simultaneously, which means there's no guarantee the content of the files will be appended to #divname in the same order.
type: Answer
has comment: http://stackoverflow.com/comment/47156067
accepted answer of: http://stackoverflow.com/q/29497347
answers question: http://stackoverflow.com/q/29497347
has comment: http://stackoverflow.com/comment/47155348
type: AcceptedAnswer

http://stackoverflow.com/q/29486716
has body: I'm trying to implement a vertical timeline, but I don't know how to get the data in the correct form from the db using php. the code to add the events is the following: $(function() { $("#element").timeline({ data: [ {time: new Date(), color: '#555', css: 'success', content: 'jquery.timeline Demo Event 1'}, {time: new Date(), color: '#00ff00', css: 'success', content: 'jquery.timeline Demo Event 2'}, {time: new Date(), color: '#000', css: 'success', content: 'jquery.timeline Demo Event 3'}, {time: new Date(), color: '#000', css: 'success', content: 'jquery.timeline Demo Event 4'} ] }); I set up a get.php and I can get the data from db in this way: &lt;?php $servername = "localhost"; $username = ""; $password = ""; $dbname = ""; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn-&gt;connect_error) { die("Connection failed: " . $conn-&gt;connect_error); } $sql = "SELECT NAME, TEXT, DATE FROM TABLE"; $result = $conn-&gt;query($sql); if ($result-&gt;num_rows &gt; 0) { // output data of each row while($row = $result-&gt;fetch_assoc()) { echo "id: " . $row["NAME"]. " - Name: " . $row["TEXT"]. " " . $row["DATE"]. "&lt;br&gt;"; } } else { echo "0 results"; } $conn-&gt;close(); ?&gt; How would I put all the retrieved contents inside the event handler? $(function() { $("#element").timeline({ data: [ {time: date_event_1, color: color_event_1, css: 'success', content: content_event_1}, ... ... ] }); Thanks in advance.
tagged with: php
has comment: http://stackoverflow.com/comment/47135093
has title: send data from php to javascript using jquery
type: Question
has comment: http://stackoverflow.com/comment/47134235
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has comment: http://stackoverflow.com/comment/47149340
type: UnansweredQuestion

http://stackoverflow.com/a/29439595
answers question: http://stackoverflow.com/q/29435003
type: Answer
has body: Here's my solution using Waypoints, in case anyone else has this issue. $(document).ready(function(){ $('.anchor').each(function () { new Waypoint({ element: this, handler: function(direction) { var previousWaypoint = this.previous(); var nextWaypoint = this.next(); if (this != this.group.last()){ document.getElementById('blog-next').setAttribute('href','#' + nextWaypoint.element.id) $('#blog-next').show(); } else { $('#blog-next').hide(); }; } }) }) });
score: 0

ember-data
tags question: http://stackoverflow.com/q/29484468
type: Tag
tags question: http://stackoverflow.com/q/29519075
tags question: http://stackoverflow.com/q/29517197
tags question: http://stackoverflow.com/q/29428858
tag name: ember-data
tags question: http://stackoverflow.com/q/29513240
tags question: http://stackoverflow.com/q/29417466
tags question: http://stackoverflow.com/q/29415439

http://stackoverflow.com/comment/47017659
type: Comment
has text: now the error change to this SyntaxError: Unexpected end of input
type: AnswerComment
comment on: http://stackoverflow.com/a/29423049
score: 0

http://stackoverflow.com/q/29440301
tagged with: function
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29440524
score: 0
answer count: 1
has body: I hope this question was not already asked :p Cutting straight to the point, i'm learning knockout and would like to do something extra in their tutorial. This picture link should be very useful: https://i.sstatic.net/cHL7M.png ... On an airplane, there are meals which cost money and a selection box updates the cost automatically. I want to add an input box which multiplies the meal cost by the quantity, but I don't know how to do this with knockout. // Class to represent a row in the seat reservations grid function SeatReservation(name, initialMeal) { var self = this; self.name = name; self.meal = ko.observable(initialMeal); } // Overall viewmodel for this screen, along with initial state function ReservationsViewModel() { var self = this; // Non-editable catalog data - would come from the server self.availableMeals = [ { mealName: "Standard (sandwich)", price: 0 }, { mealName: "Premium (lobster)", price: 34.95 }, { mealName: "Ultimate (whole zebra)", price: 290 } ]; // Editable data self.seats = ko.observableArray([ new SeatReservation("Steve", self.availableMeals[2]), new SeatReservation("Bert", self.availableMeals[1]) ]); //Something extra I want to know how to do with knockout, i just want the "total" to be the "quantity" times the price of the "meal" var mealPrice = //what should go here?!?!?! this.quantity = ko.observable(1) //is this correct? var quantity = this.quantity var finalPrice = function() { quantity * mealPrice; } self.addSeat = function() { self.seats.push(new SeatReservation("", self.availableMeals[0])); } } ko.applyBindings(new ReservationsViewModel()); //end Your seat reservations Passenger name Meal Quantity Total Reserve another seat The 5th comment in the view model is the part where I want to put the new function. Sorry about the easy question, i'm very new to all of this in general.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29440524
tagged with: knockout.js
has title: Knockout JS and simple functions
type: Question
tagged with: object

http://stackoverflow.com/comment/47141789
type: QuestionComment
has text: @Andy good catch. I meant to say they're all under `src`. I edited
comment on: http://stackoverflow.com/q/29491065
score: 0
type: Comment

http://stackoverflow.com/comment/47074046
comment on: http://stackoverflow.com/a/29454426
score: 0
type: AnswerComment
type: Comment
has text: "*`String.toUpperCase()` is NOT bang method*" - what does that mean? What's a "bang method"?

http://stackoverflow.com/comment/47143035
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29491802
has text: It appears that something is calling `encodeURI()` on your string and changing a space into `%20` can you try `.replace(/%20/g,'')`? I'm not 100% sure though, sorry.

http://stackoverflow.com/comment/47206840
type: AnswerComment
type: Comment
has text: @robben issue is with psuedo selector not with empty lists, see my answer
comment on: http://stackoverflow.com/a/29525946
score: 0

http://stackoverflow.com/comment/47099686
type: QuestionComment
type: Comment
has text: heres the jsfiddle http://jsfiddle.net/Qy6Sj/1598/
comment on: http://stackoverflow.com/q/29467811
score: 0

http://stackoverflow.com/q/29475375
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29475449
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/29475428
has comment: http://stackoverflow.com/comment/47112159
possible better answer: http://stackoverflow.com/a/29475428
has answer: http://stackoverflow.com/a/29475449
score: 2
type: AnsweredQuestion
downvote count: 0
has body: I have a form that is somewhat like a calculator. A number is entered into a text box and using a dropdown, the user selects a number that is used as a multiplier. I can capture the value from the text box properly, however having capturing the value from the select input is tricky. I'd like this function to be run when the user changes the number in the textbox or changes the option they've selected in the select field. FIDDLE # HTML 1 2 # JS $(function () { var amount = $('#numberInput').val(); var length_value = '' $('#lengthInput').on("change", function () { var length = document.getElementById("lengthInput"); var length_value = length.options[length.selectedIndex].value; }).change(); var calculatedAmount = amount * length_value; document.getElementById('result').innerHTML = amount });
tagged with: javascript
tagged with: jquery
has title: Capture values from select and text inputs using JS and return output to HTML
favorite count: 0

mongodb
tags question: http://stackoverflow.com/q/29392453
tags question: http://stackoverflow.com/q/29416795
tags question: http://stackoverflow.com/q/29455559
tags question: http://stackoverflow.com/q/29518398
tags question: http://stackoverflow.com/q/29417241
tags question: http://stackoverflow.com/q/29445740
tags question: http://stackoverflow.com/q/29402937
tags question: http://stackoverflow.com/q/29513717
tags question: http://stackoverflow.com/q/29500874
tags question: http://stackoverflow.com/q/29497965
tags question: http://stackoverflow.com/q/29378692
tags question: http://stackoverflow.com/q/29508399
tags question: http://stackoverflow.com/q/29526160
tags question: http://stackoverflow.com/q/29459541
tags question: http://stackoverflow.com/q/29494231
tag name: mongodb
tags question: http://stackoverflow.com/q/29451442
tags question: http://stackoverflow.com/q/29464668
tags question: http://stackoverflow.com/q/29481403
tags question: http://stackoverflow.com/q/29486287
tags question: http://stackoverflow.com/q/29529130
tags question: http://stackoverflow.com/q/29436582
tags question: http://stackoverflow.com/q/29411526
tags question: http://stackoverflow.com/q/29482014
tags question: http://stackoverflow.com/q/29421988
tags question: http://stackoverflow.com/q/29375134
tags question: http://stackoverflow.com/q/29400245
tags question: http://stackoverflow.com/q/29460880
tags question: http://stackoverflow.com/q/29489229
tags question: http://stackoverflow.com/q/29481874
type: Tag
tags question: http://stackoverflow.com/q/29418588
tags question: http://stackoverflow.com/q/29494037
tags question: http://stackoverflow.com/q/29491731
tags question: http://stackoverflow.com/q/29409074
tags question: http://stackoverflow.com/q/29394444
tags question: http://stackoverflow.com/q/29435005
tags question: http://stackoverflow.com/q/29404271
tags question: http://stackoverflow.com/q/29458095
tags question: http://stackoverflow.com/q/29443513
tags question: http://stackoverflow.com/q/29427385
tags question: http://stackoverflow.com/q/29391073
tags question: http://stackoverflow.com/q/29467971
tags question: http://stackoverflow.com/q/29525530
tags question: http://stackoverflow.com/q/29527492
tags question: http://stackoverflow.com/q/29488287
tags question: http://stackoverflow.com/q/29506814
tags question: http://stackoverflow.com/q/29379584
tags question: http://stackoverflow.com/q/29396038
tags question: http://stackoverflow.com/q/29443791
tags question: http://stackoverflow.com/q/29458258
tags question: http://stackoverflow.com/q/29382993

http://stackoverflow.com/q/29417228
type: Question
duplicate of: http://stackoverflow.com/q/26838839
has comment: http://stackoverflow.com/comment/47007218
tagged with: javascript
tagged with: jquery
has body: I need to enable jquery validation on readonly fields that is disabled by default in jquery validator 1.13.0. Following is my code: jQuery(".profile-forms").validate({ errorElement: "span", errorClass: "error", errorPlacement: function(error, element) { if(element[0]) { jQuery('#'+element[0].id+'-error').replaceWith(error); } }, rules: { first_name:{ required:true, restrictEmail:true, noDigit: true }, last_name:{ required:true, restrictEmail:true, noDigit: true }, location: { required:true, restrictEmail:true, restrictPhoneNumber:true }, city: { required:true, }, state: { required:true, } }); I am using jQuery Validator 1.13.0. Kindly Help!! I need to apply required validation on 'City' and 'State' fields
tagged with: jquery-validate
linked to: http://stackoverflow.com/q/26838839
score: 0
has title: How to disable ignore readonly field for validation using jquery validator 1.13.0
has comment: http://stackoverflow.com/comment/47007322
has comment: http://stackoverflow.com/comment/47007034
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47007185
answer count: 0
has comment: http://stackoverflow.com/comment/47007411

http://stackoverflow.com/q/29441326
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29572178
has comment: http://stackoverflow.com/comment/47050955
tagged with: adsense
tagged with: local-storage
has title: Show website content differently depending on how the user came to the site (cookies)?
tagged with: cookies
type: Question
has body: The Problem: I've worked out an agreement with one of my website clients that for every lead that I generate and push to the website, I'll get a % of the sale. So my plan is to setup a custom landing page w/ a "Get Quote" form, a custom phone number (for tracking w/ Google Voice), and starting it off by running a Google Adwords campaign, then analyzing the data through Google Analytics for optimum ROI. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: The catch is... Direct Input (typing into url bar: www.mysite.com) Organic Search Results Backlinks linking to your website X - DO NOT COUNT. Advertising on Google Adwords Advertising on Social Media Advertising w/ Affiliate Softare backlinks ✓ - DO COUNT. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: So... that means I'll need to change out the content of the website depending on how the user arrived. I imagine that their are a few ways to handle this (cookies?, local storage?, javascript trickery?). What's the best way to handle this in 2015? My Requirements: Depending on how the user arrived, change out the Phone Number with custom Google Voice number for tracking Depending on how the user arrived, change out the "Get Quote" form with customized form for tracking If the user returns to the website by Direct Input or Organic Search or Backlink after the fact of them clicking through by my advertising, the website content should stay as my customized content. Any thoughts?
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/426825
tagged with: seo

http://stackoverflow.com/q/29385765
tagged with: javascript
tagged with: jquery
score: 4
has comment: http://stackoverflow.com/comment/61465555
has comment: http://stackoverflow.com/comment/46949781
answer count: 1
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/33059777
has comment: http://stackoverflow.com/comment/61443742
has title: How to maintain login session across multiple tabs?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46950286
has comment: http://stackoverflow.com/comment/46950399
has body: I am developing a website and i am having a problem in finding the best solution to maintain user login session. Currently i am using Html5 web storage "session storage" to store whether user is logged in or not. But problem in this is that this only works in a single tab not across multiple tabs of a browser. What should i use either Cookies or LocalStorage or i should maintain server side session and check every times a page loads on server whether the user is logged in or not ? What is the best solution? please guide me. I am using Node.js and mongodb in the backend and Angular and jquery in frontend.
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/46950149
accepted answer: http://stackoverflow.com/a/33059777
tagged with: session
downvote count: 0

http://stackoverflow.com/comment/46934458
has text: @cr0ss 'value_ingot' is outputting '' if the input is empty. I need it to stay '0' if the input is empty
comment on: http://stackoverflow.com/q/29376941
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29441910
has title: Accurate JS library to convert lat-lon to pixels (offline)
tagged with: javascript
has comment: http://stackoverflow.com/comment/47112656
score: 0
type: UnansweredQuestion
tagged with: gis
answer count: 0
has body: I try to convert lat-lon values to pixels, I tried this excellent example, here the solution (converted to JS): 0 But I dont get accurate values; if I test this: I get: As you can see, the marker (I use a simple number) was out. Update: By the way, I used MOBAC to get the further extreme point (the image is just illustrative, because the point, I got it with the highest zoom to get good precision)
has comment: http://stackoverflow.com/comment/47119217
linked to: http://stackoverflow.com/q/2103924
type: Question

http://stackoverflow.com/a/59027086
type: Answer
downvote count: 0
has body: in test2.js you can write this to make the function global window.abc = function(){...} and then in test1.js yo can access it like this window.parent.abc(); I hope it will help you
score: 21
upvote count: 21
answers question: http://stackoverflow.com/q/29514382

http://stackoverflow.com/q/29493483
possible better answer: http://stackoverflow.com/a/29493698
has answer: http://stackoverflow.com/a/29493698
type: Question
has comment: http://stackoverflow.com/comment/47146710
linked to: http://stackoverflow.com/q/19799846
tagged with: javascript
has answer: http://stackoverflow.com/a/29493825
accepted answer: http://stackoverflow.com/a/29493679
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: Rotate button [HTML] [JS]
has body: how to make a button with javascript when the user presses it to rotate an object 180 moires? (for my site) &lt;input type="button" value="button"&gt; I have no idea how to do it.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29493679

http://stackoverflow.com/a/29489355
answers question: http://stackoverflow.com/q/29489189
has comment: http://stackoverflow.com/comment/47140533
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/47140608
downvote count: 0
has body: function getSerial (){ var getValue = $(serial).val()+ ",\n"; var showValue = "#showSerial"; $(showValue).val(getValue); }
has comment: http://stackoverflow.com/comment/47140688
type: Answer

http://stackoverflow.com/q/29492390
score: 0
has title: LocalStorage phonegap camera image
type: UnansweredQuestion
tagged with: phonegap-build
tagged with: local-storage
linked to: http://stackoverflow.com/q/6150289
has answer: http://stackoverflow.com/a/29492590
has body: i'm trying to use localStorage to save an image, or multiple images for retrieval at a later date to upload to a server. The current camera code is as follows: function capturePhoto() { navigator.camera.getPicture(onCameraSuccess, onCameraFail, {quality: 70, destinationType : Camera.DestinationType.DATA_URL}); } function onCameraSuccess(imageData) { //In our success call we want to first process the image to save in our image box on the screen. var image = document.getElementById('image'); image.src = "data:image/jpeg;base64," + imageData; //Create a new canvas for our image holder var imgCanvas = document.createElement("canvas"), imgContext = imgCanvas.getContext("2d"); // Make sure canvas is as big as the picture imgCanvas.width = image.width; imgCanvas.height = image.height; // Draw image into canvas element imgContext.drawImage(image, 0, 0, image.width, image.height); // Get canvas contents as a data URL var imgAsDataURL = imgCanvas.toDataURL("image/png"); // Save image into localStorage try { // localStorage.setItem(“savedImage”, imgAsDataURL); localStorage.setItem("savedImage", imageData); alert('Image Saved'); } catch (e) { alert("Storage failed: " + e); } var imageStorage = localStorage.getItem("savedImage"); // myCardHolder= document.getElementById(“m1-cardStorage-image1″); // Reuse existing Data URL from localStorage var imageInfo = document.getElementById('image'); imageInfo.src = "data:image/jpeg;base64," + imageStorage; } This triggers the camera, and the image captured is displayed into &lt;img id="image" src=""&gt;&lt;/img&gt; It also draws a canvas to output the image into. What i'm really trying to achieve is to capture the images base64 data to be able to store it into an array so that it may be uploaded/downloaded from a server. Ideally i'd like to completely avoid having to display the image to the user, and simply store the images data I may have misunderstood the localStorage/camera api a little, so any pointers would be great. Does the image H…
has answer: http://stackoverflow.com/a/29492602
type: Question
answer count: 2
tagged with: camera
tagged with: javascript

http://stackoverflow.com/comment/47201292
type: Comment
type: AnswerComment
has text: K..if UTC -5 is not in effect currently. But I change the time to UTC -5 EST in my system properties, shouldnt my code give me -5 instead of -4 because my system clock has UTC -5.
comment on: http://stackoverflow.com/a/29522931
score: 0

http://stackoverflow.com/comment/47091447
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29455037
has text: @user1914292 there is, just that I did not add it here. and the function is stored as a standalone js file and linked to the main page.
score: 0

http://stackoverflow.com/comment/46993291
type: Comment
comment on: http://stackoverflow.com/a/29408611
has text: This should show a toast in your example: String loadingUrl = "javascript:showAndroidToast('" + text + "')"; webView.loadUrl(loadingUrl);
type: AnswerComment
score: 0

http://stackoverflow.com/q/29478265
favorite count: 0
has answer: http://stackoverflow.com/a/29478482
has answer: http://stackoverflow.com/a/29478484
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47117446
downvote count: 3
upvote count: 1
type: Question
score: -2
has body: var DateObj = new Date(dateString); var Date = new Date(DateObj); What actually is the Date? Is it still a date object like this? I just saw this code in the project which I'm working on, so I'm curious what it actually does. Also, I would not do this, but I want to know why don't do it?
tagged with: javascript
tagged with: date
has title: What will it return new Date( DateObject )?
answer count: 2

http://stackoverflow.com/q/29496386
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29496682
upvote count: 1
answer count: 1
favorite count: 0
has body: // controller defined // // data is not access controller {{data.name}}-{{data.city}} /Is this way is correct to define controller/
has title: why ng-controller is not calling or working or function is not working
tagged with: angularjs
has answer: http://stackoverflow.com/a/29496682
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/26646941
has comment: http://stackoverflow.com/comment/47151601
score: 1
type: Question

http://stackoverflow.com/a/29483946
downvote count: 0
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29483803
has body: You can hide the image at a specified time using jQuery setTimeout function, Demo : http://jsfiddle.net/stanze/kdk6kkLv/ $(function() { var hidden = $('.hidden'); setTimeout(function(){ $(hidden).hide() }, 2000); })
has comment: http://stackoverflow.com/comment/47204901
type: Answer

http://stackoverflow.com/q/29458030
has answer: http://stackoverflow.com/a/29458471
has comment: http://stackoverflow.com/comment/47080394
has comment: http://stackoverflow.com/comment/47080287
has body: I have written these two javascript functions: function getDateFromDateAtHourOfDay(date, hour) { var year = date.getFullYear(); var month = date.getMonth(); var day = date.getDate(); var newDate = new Date(year, month, day, hour, 0, 0); return (newDate); } and function getDateDescriptionFromDate(date) { var year = date.getFullYear(); var month = date.getMonth(); var day = date.getDate(); return ( (day &lt; 10 ? ("0" + day) : (day)) + "." + (month &lt; 10 ? ("0" + month) : (month)) + "." + year); } The first one should return a new date with the same year/month/day but with a different hour of the day (e.g. switch 2015-04-05 15:00 to 2015-04-05 16:00). The second one should just return a date-string in the format dd.MM.yyyy. Now if I call var selectedDate = new Date(); // normally function parameter var startDate = getDateFromDateAtHourOfDay(selectedDate, hour); document.getElementById("dateLabel").innerHTML = getDateDescriptionFromDate(startDate); Where hour is a function parameter and for example 15 (tested with alert), in my "dateLabel" it says 05.01.2015. But if I do alert (selectedDate); the result is: Sun Apr 05 2015 15:52:26 GMT+0200 (CEST) => now. selectedDate is not modified between the calls (alert and set the innerHTML). I think the two functions do not do what I suppose them to, but maybe you find the mistake. Thank you ! EDIT: I tried this code: selectedDate = new Date(); alert(selectedDate); // Sun Apr 05 2015 16:36:07 GMT+0200 (CEST) var startDate = getDateFromDateAtHourOfDay(selectedDate, hour); alert(hour); // 8 alert(startDate); // Thu Mar 05 2015 08:00:00 GMT+0100 (CET) document.getElementById("datumLabel").innerHTML = getDateDescriptionFromDate(startDate); // 05.01.2015
accepted answer: http://stackoverflow.com/a/29458129
has comment: http://stackoverflow.com/comment/47080964
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29458129
possible better answer: http://stackoverflow.com/a/29458471
has comment: http://stackoverflow.com/comment/47080371
has title: Javascript Date Modifiying
type: Question
answer count: 2
tagged with: function
tagged with: javascript
tagged with: date
score: 0

http://stackoverflow.com/q/29463229
upvote count: 1
answer count: 1
has title: AngularJS and serverside filter and pagination
tagged with: filtering
accepted answer: http://stackoverflow.com/a/29463906
tagged with: pagination
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/29463906
has body: I'm looking to use Angular JS with WebAPI - will be returning a large number of results from the WebAPI and so want to use some sort of server-side pagination and filtering. Most of the tutorials i've seen are for client side filtering which isn't what i'm looking for. Not really used AngularJS before, so looking for a simple example which can show how to utilise this - effectively i have a list of products and want to be able to for example filter by price. As it's a large data set i'd want to utilise pagination as well. At the moment, in my controller I have: app.controller("MyController", function ($scope, $http){ $http.get('/api/ProductResults'). success(function (data, status, headers, config) { $scope.results = data.results; }). error(function (data, status, headers, config) { // log error }); which will return a list of products and i will use to output a list. The WebAPI will take parameters for page number and filters etc. but i'm not sure how to implement this in the code. $http.get('/api/Products?page=1&amp;minPrice=10') I'd expect that i would get the current page number and min price from the URL parameters?

http://stackoverflow.com/comment/46944887
score: 0
comment on: http://stackoverflow.com/a/29382923
type: AnswerComment
type: Comment
has text: Isn't that just the compiled CSS, and doesn't support theming?

http://stackoverflow.com/a/29396951
accepted answer of: http://stackoverflow.com/q/29396755
score: 0
answers question: http://stackoverflow.com/q/29396755
type: AcceptedAnswer
type: Answer
has body: Don't JSON encode the arrays individually, just encode your complete data structure at the end, otherwise when decoding on client-side, your nested JSON will just be treated like a string. So do this: $Error[] = "Error1"; $Error[] = "Error2"; $Error[] = "Error3"; $Good[] = "Good1"; $Good[] = "Good2"; $Good[] = "Good3"; $Data["Error"] = $Error; $Data["Good"] = $Good; echo json_encode($Data); You would then work with the data on client side like this: $.ajax( { url: $(this).attr("action"), type: "POST", data: $(this).serializeArray(), dataType: 'json', success: function(data) { var $result = $('#Result'); $result.empty(); $.each(data.Error, function(idx, item) { $result.append('&lt;p class="error"&gt;' + item + '&lt;/p&gt;'); }); $.each(data.Good, function(idx, item) { $result.append('&lt;p class="good"&gt;' + item + '&lt;/p&gt;'); }); } }); Note I added class names to paragraphs in case you wanting to control CSS display of them via convenient classes.

http://stackoverflow.com/comment/47150807
has text: they are never the same ? there is any pattern? it always will be val[i]a for the first obj and val[i]b for the second obj?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29495492
score: 0

http://stackoverflow.com/q/29432401
possible better answer: http://stackoverflow.com/a/29432891
has answer: http://stackoverflow.com/a/29432891
accepted answer: http://stackoverflow.com/a/29432414
tagged with: javascript
has body: I was wondering if it's possible to state 2 statements as a FOR loop's condition in JavaScript. for (var i = 0; i &lt; x.length || 10; i++) { } instead of writing for (var i = 0; i &lt; x.length; i++) { if(i&lt;10) { } } Used references (didn't help too much): Multiple conditions in for loop Multiple conditions in for statement
has comment: http://stackoverflow.com/comment/47034634
answer count: 2
has comment: http://stackoverflow.com/comment/47224425
favorite count: 0
has comment: http://stackoverflow.com/comment/47034594
has comment: http://stackoverflow.com/comment/47036559
linked to: http://stackoverflow.com/q/19546312
has comment: http://stackoverflow.com/comment/47034493
linked to: http://stackoverflow.com/q/6719238
has comment: http://stackoverflow.com/comment/47036488
has answer: http://stackoverflow.com/a/29432414
has title: Complex condition in FOR loop in JavaScript
type: AnsweredQuestion
upvote count: 2
score: 0
downvote count: 2
type: Question

http://stackoverflow.com/a/29441824
score: 1
upvote count: 1
has body: The link provided in comments explains it all, basicly it works with :checked + label and absolute position for input. /* styling*/ .optionlabel { display:table; border-collapse:collapse; border:1px solid lightblue; } .optionlabel [type="radio"] { position:absolute; left:-9999px } .optionlabel label { display:table-cell; width:100px; height:50px; border-left:inherit; text-align:center; vertical-align:middle; } /* your magic ? */ :checked + label {background:#7ED321;} Option 1 Option 2 Option 3 (next time if you provide your html/bootstrapped we use it to demonstrate)
accepted answer of: http://stackoverflow.com/q/29441649
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29441649
type: Answer

http://stackoverflow.com/a/29742138
upvote count: 1
has comment: http://stackoverflow.com/comment/47617692
has body: Follow this (http://www.hacksparrow.com/handle-file-uploads-in-express-node-js.html) to upload an image to server in nodejs. Once you followed. It will return response like this File uploaded to: ./public/images/85d15c2f7e812a03faa44bdef0ce41f5.png - 278070 bytes The response shows that your image is stored in the public/images directory Image Name : 85d15c2f7e812a03faa44bdef0ce41f5.png Image Path : ./public/images/85d15c2f7e812a03faa44bdef0ce41f5.png You can load the image with the server ip by removing the public from the URL. Because we can directly access the content from the public directory without specifying public. So the following link is enough to load the image from the URL. your-local-ip:port/images/85d15c2f7e812a03faa44bdef0ce41f5.png eg: http://localhost:3000/images/85d15c2f7e812a03faa44bdef0ce41f5.png
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29512363
answers question: http://stackoverflow.com/q/29512363
type: Answer
score: 1

http://stackoverflow.com/a/29403426
has comment: http://stackoverflow.com/comment/47071890
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29402179
accepted answer of: http://stackoverflow.com/q/29402179
type: Answer
has body: There is a GitHub library for PHP, if your site happens to use PHP github.com php-google-spreadsheet-client There are a few options: Google Sites - With a Google Stand Alone HTML Apps Script in a Apps Script Gadget Google Stand Alone HTML Apps Script Website that Uses the Sheets API If you try to access a Google sheet from a website with a different domain name, you will get a CORS error. CORS is a Cross Origin Resource Sharing. Each option for connecting to a spreadsheet has it's own issues. If you use a Stand Alone HTML App with Apps Script, you can't have a domain name. A free Google Site, doesn't have a domain name, but it's a nicer URL, and a Google Site can be mapped to a domain name. A website with a regular domain name, will require an API to do something with Sheets. The documentation for the Sheets API show examples written in Protocol, Java, and .Net. But, the documentation states: A number of client libraries are provided in various languages. These client libraries make it easier to interact with the Sheets API. But I don't see any reference to where all these various languages are. I don't know of any easy to understand documentation for using a Google spreadsheet as a data source from a website. So, unfortunately, I don't know of an easy answer. The answer depends on what you want/need, and how much time and skill you have to set it up. So, do you need a domain name or not? You can map a Google Site to a domain name: https://support.google.com/sites/answer/99448?hl=en But the documentation also states: You can't map your domain to what is known as a naked domain, such as http://example.com If you need to use a website and connect to the Google spreadsheet with an API, you'll need to run an authorization. Otherwise, any website could read/write to your spreadsheet. Obviously there are websites that write data to Google spreadsheets, so it's possible. You can also look at posts like this: google-spreadsheet-api-with-php how-do-i-access-the-google-spread…
has comment: http://stackoverflow.com/comment/47017042
has comment: http://stackoverflow.com/comment/47020415
score: 1
has comment: http://stackoverflow.com/comment/47009967
has comment: http://stackoverflow.com/comment/47019552

http://stackoverflow.com/a/29464425
has comment: http://stackoverflow.com/comment/47092015
score: -2
has comment: http://stackoverflow.com/comment/47092123
has comment: http://stackoverflow.com/comment/47092345
has comment: http://stackoverflow.com/comment/47092231
downvote count: 2
has comment: http://stackoverflow.com/comment/47091899
has comment: http://stackoverflow.com/comment/47091951
has comment: http://stackoverflow.com/comment/47092265
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/29464369
has comment: http://stackoverflow.com/comment/47091910
has body: Here is how you can simply do it using jinqJs to randomly shuffle the colors property array. var data = [ { name: 'Apple', colors: ['red', 'green', 'yellow'] }, { name: 'Orange', colors: ['orange'] } ]; var result = jinqJs().from(data).select(function(row){ row.colors = row.colors.sort(function() {return .5 - Math.random();}); return row; }); document.body.innerHTML += '&lt;pre&gt;' + JSON.stringify(result, null, 2) + '&lt;/pre&gt;&lt;br&gt;&lt;br&gt;'; &lt;script src="https://rawgit.com/fordth/jinqJs/master/jinqjs.js"&gt;&lt;/script&gt;

http://stackoverflow.com/q/29470064
tagged with: geolocation
score: 2
downvote count: 0
tagged with: baidu
tagged with: chinese-locale
has title: Showing navigator.geolocation.getCurrentPosition in Baidu Maps
type: Question
upvote count: 2
tagged with: google-maps
answer count: 1
tagged with: javascript
has body: We know that due to the infamous China GPS offset problem, GPS (WSG-84) map coordinates don't correspond exactly to the coordinate system that state-approved Chinese maps use (GCJ-02). The question is, how does one make sure that placing a marker via the Baidu Maps API at the coordinates reported by navigator.geolocation.getCurrentPosition() will match reality? Would the GPS chip of a device manufactured or approved for use in China return coordinates that don't match the actual position of a user, in order to instead match he GJC-02 maps? Does it matter if the user runs a Chinese navigator (e.g. Maxthon, or Google Chrome localized in Chinese), vs. a non-Chinese browser, e.g. Firefox in English? Here's a JSBin that tests geolocation and uses the Baidu Maps coordinates conversion API. Unfortunately I'm not located in China so I can't test. Here's the question: Does the app above need to run the Baidu coordinates conversion on the coordinates it gets from navigator.geolocation.getCurrentPosition() in order to show the location correctly on the Baidu Map, or not? Could someone located in China test, ideally with both a Chinese browser on a Chinese-manufactured device, and with a non-Chinese browser on a non-Chinese device?
linked to: http://stackoverflow.com/q/29444803
favorite count: 0
has answer: http://stackoverflow.com/a/29475698
type: UnansweredQuestion

http://stackoverflow.com/q/29410665
tagged with: metacharacters
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29410743
accepted answer: http://stackoverflow.com/a/29410744
has answer: http://stackoverflow.com/a/29410743
answer count: 3
tagged with: regex
favorite count: 0
upvote count: 2
has body: I am working with js (javascript) regex literal expressions but I guess the answer applies to all regex in some form. I simply want to know if it is possible to do this: /\w+[more characters]/g (please disregard the incorrect expression, it is for illustration only) or are we locked in the finality of the meaning of meta-characters and if we what \w to hold more characters we have to write the entire range construct i.e. [a-Z...more characters]? Since this is a yes/no question, I would appreciate examples to make this question of any use for future help. Thanks.
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/29410744
has title: Is it possible to extend the range of a regex meta character?
has answer: http://stackoverflow.com/a/29410944
type: Question

http://stackoverflow.com/q/29404397
has comment: http://stackoverflow.com/comment/46983957
has answer: http://stackoverflow.com/a/29404511
score: 0
has comment: http://stackoverflow.com/comment/46984224
answer count: 3
linked to: http://stackoverflow.com/q/11784612
has comment: http://stackoverflow.com/comment/46983939
has body: I am doing some site crawling, and right now, I find this string of a JSON object { "results" : [ { id: 775664, status: "In-Stock", ffmtCenterId: '10601', altText: "In-Stock", qty: 6 } ]} and I wan't to convert that to a object using JSON.parse() but this doesn't work because there are syntax errors, like you need quotes around the key values. I tried eval() but it didn't work. Does anyone know whats a good way to fix this string so that I can convert it into an object? Thanks
has title: Whats the cleanest way to repair this JSON object string in javascript?
has comment: http://stackoverflow.com/comment/46983839
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29404451
has comment: http://stackoverflow.com/comment/46983818
has answer: http://stackoverflow.com/a/29405352
has comment: http://stackoverflow.com/comment/46984109
type: Question
has comment: http://stackoverflow.com/comment/46983836

http://stackoverflow.com/comment/70950608
type: Comment
type: QuestionComment
score: 2
has text: (late to the party) I'm going to side with you that this is not a duplicate question. It's going to be asked often even though it's the same beast underneath. JS classes are somewhat similar to that of ruby. I use a similar method to throw an error if something was not implemented, but do not check on instantiation (many ruby developers do the same). It's clear code in my opinion. Create a NotImplementedClass [(second answer)](http://stackoverflow.com/questions/31089801/extending-error-in-javascript-with-es6-syntax). Then in your base class `mymethod(){throw new NotImplementedError()}`
comment on: http://stackoverflow.com/q/29480569

http://stackoverflow.com/comment/47044258
comment on: http://stackoverflow.com/q/29437487
type: Comment
has text: The code you have pasted will only update load.php every 5 seconds. To reload the whole page, you must use the following meta tag: ` `
score: 0
type: QuestionComment

http://stackoverflow.com/comment/47033149
has text: http://stackoverflow.com/questions/9709374/knockout-js-incredibly-slow-under-semi-large-datasets I suppose this is a reason why ReactJS is on fire right now with it's virtual dom which seems to shine in these situations.
comment on: http://stackoverflow.com/q/29430263
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/47077144
comment on: http://stackoverflow.com/a/29455650
type: AnswerComment
has text: Actually, I've tried this with my confirm and prompt functions and it works fine, but when I attempt to call different kinds of dialogues, it will either just do the same kind or give me a 'range error: call stack overflow' (lol)
score: 0
type: Comment

http://stackoverflow.com/q/29425463
type: Question
has title: Using LocalStorage in Javascript
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29425560
has comment: http://stackoverflow.com/comment/47022177
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47022168
accepted answer: http://stackoverflow.com/a/29425560
tagged with: local-storage
has body: I have a side navigation bar: Items Clients Quotes jQuery: $(document).ready(function(){ $('.side-nav-tab').on('click', function(){ var arrow = $(this).find('span').attr('class'); if ((arrow == undefined) || (arrow == '')) { $('.side-nav-tab').find('span').not(this).removeClass('fa arrow'); $(this).find('span').addClass('fa arrow'); } }) }) The code above works (adds the class 'fa arrow' to the span) but it's only temporary. The problem is that when you click $('.side-nav-tab'), it directs you to that route, does a page reload, and I lose the 'fa arrow' class I just added. After doing some research, it appears I could use localStorage, but have been unsuccessful in trying: var storage = localStore.getItem(arrow) Any thoughts? Thanks
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47022194

http://stackoverflow.com/a/35060945
answers question: http://stackoverflow.com/q/29417632
has body: Create a custom NewForm.aspx and add a new button and mention {} in redirect. &lt;input type="button" class="contact-button" value="Submit and Create New Request" name="btnSaven" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={}')}" /&gt;
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/53869519
has body: If p is a variable that contains a Promise, then p.then(empty); should dismiss the promise when it eventually completes or if it is already complete (yes, I know this isn't the original question, but it is my question). "empty" is function empty() {} . I'm just a beginner and probably wrong, but these other answers seem too complicated. Promises are supposed to be simple.
type: Answer
answers question: http://stackoverflow.com/q/29478751
score: 0

http://stackoverflow.com/a/38921222
type: Answer
has body: In your log4j properties, activate spring debug logs so that you will be able to see what is wrong with your object sent in request. Add the following line to your log4j properties: log4j.logger.org.springframework.web=debug For example, my error text: org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Unrecognized field "date" (class org.joda.time.DateTime), not marked as ignorable Here, I can see that my "date" field is causing a problem and I will fix it by investigating around it.
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29379947
downvote count: 0

http://stackoverflow.com/a/29464907
type: Answer
has body: Because 'D' from 'Downloaded' comes before 'N' from 'Not downloaded' you can do a standard string comparison on the status, followed by one based on title if they're equal. if (a.status == b.status) { return a.title.localeCompare(b.title); } else { return a.status.localCompare(b.status); }
answers question: http://stackoverflow.com/q/29464731
score: 0

http://stackoverflow.com/comment/47100903
score: 0
comment on: http://stackoverflow.com/q/29469537
type: Comment
type: QuestionComment
has text: [Works for me](http://jsfiddle.net/7vmckqzk/), are you sure the width really is `600`

http://stackoverflow.com/a/29510745
answers question: http://stackoverflow.com/q/29495057
accepted answer of: http://stackoverflow.com/q/29495057
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has body: Example: http://jsfiddle.net/tu67e1ce/1/ chart: { marginTop: -25, events: { load: function() { this.exportSVGElements[0].toFront(); this.exportSVGElements[1].toFront(); } } }, So method toFront() will bring items on top of the SVG container. this.exportSVGElements[0]/[1] are button/symbol. Of course both of them are inner object of the Highcharts core.
has comment: http://stackoverflow.com/comment/47197451
upvote count: 2

http://stackoverflow.com/comment/46937444
comment on: http://stackoverflow.com/a/29378349
type: AnswerComment
has text: @nick Does it work after adding a `border-box` reset like this? https://jsfiddle.net/2mrwe1x1/
score: 0
type: Comment

http://stackoverflow.com/q/29493126
possible better answer: http://stackoverflow.com/a/29493225
has comment: http://stackoverflow.com/comment/47145564
upvote count: 1
has answer: http://stackoverflow.com/a/29493262
type: AnsweredQuestion
tagged with: underscore.js
score: 1
accepted answer: http://stackoverflow.com/a/29493259
type: Question
downvote count: 0
tagged with: javascript
has title: Underscore.js Sum of all methods of some objects
has comment: http://stackoverflow.com/comment/47145486
favorite count: 0
has comment: http://stackoverflow.com/comment/47145415
answer count: 5
has answer: http://stackoverflow.com/a/29493261
has answer: http://stackoverflow.com/a/29493225
has answer: http://stackoverflow.com/a/29493259
has answer: http://stackoverflow.com/a/29493421
has body: Is there a simple way to sum object methods. var obj = { a: { aa: 12, bb: 4 }, b: { aa: 5, bb: 100 }, c: { aa: 1, bb: 150 } } I need to sum all 'aa' together and 'bb' as well. Should be something like var res = { aa: 18, bb: 254 }

http://stackoverflow.com/comment/47097727
type: Comment
type: QuestionComment
score: 1
has text: might have to create a new Audio object to play the same sound clip
comment on: http://stackoverflow.com/q/29467758

http://stackoverflow.com/a/29374811
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29374722
accepted answer of: http://stackoverflow.com/q/29374722
upvote count: 2
type: AcceptedAnswer
has body: You can try to get the current top property value, and then add 1%; var currentTop = $("#label").css("top"); var topAdded = parseInt(currentTop.replace("%","")) + 1; $("#label").css("top", topAdded + "%");
type: Answer
has comment: http://stackoverflow.com/comment/46931093

http://stackoverflow.com/comment/47135577
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29486782
has text: It would be difficult to switch between css and materialise since they use very different classes and structures. Can't imagine there's an easy way to do it. You'd have to use a lot of if else blocks
score: 0

http://stackoverflow.com/a/29475020
has body: For a pure CSS solution try adding: td:hover { background-position:something; } Then change the something to what you desire or add more attributes. Hope this helped!
answers question: http://stackoverflow.com/q/29474925
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/47111050
downvote count: 0
has comment: http://stackoverflow.com/comment/47111525
score: 1

http://stackoverflow.com/a/30193248
answers question: http://stackoverflow.com/q/29406628
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/66295299
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/29406628
has body: I am not familiar with the way .NET works, but my guess is it simply swaps the HTML contents of the specified element with the one loaded from the AJAX call. Since the instance is already created on the node (#treeView), the second jstree call does nothing (actually it simply retrieves the already existing instance). I am guessing and have not tested this, but give it a try: function TreeViewChangeOnComplete() { $('#treeView').jstree(true).destroy(true); $('#treeView').jstree(); }
downvote count: 0

openlayers-3
type: Tag
tags question: http://stackoverflow.com/q/29469273
tags question: http://stackoverflow.com/q/29496868
tag name: openlayers-3
tags question: http://stackoverflow.com/q/29498069

http://stackoverflow.com/comment/46989956
comment on: http://stackoverflow.com/q/29407699
type: Comment
score: 0
type: QuestionComment
has text: @mplungjan fun interactive (and stylish link). I tried posting progress of my working app on the original post - couldn't get it to run like it does in browser... but When run properly goes beyond 億

http://stackoverflow.com/comment/47039238
score: 0
type: Comment
has text: Yes because the string stored in the variable only holds the value when the line was run. It is not auto updated to the newly entered value so you need to do that check inside the function. I updated the answer above with code that hopefully shows that.
comment on: http://stackoverflow.com/a/29434317
type: AnswerComment

http://stackoverflow.com/q/29450537
has answer: http://stackoverflow.com/a/29450633
has body: Gradually working teaching myself JS with a couple books and now am at Arrays. If this question isn't up to standards please ignore and I'll delete. I'm sure it is possible to simultaneously output elements of an array to an HTML table as a user enters them but I have run out of ideas and exhausted my search of this site for answers. I have a 3x3 HTML table for now, a 2d array ("array of arrays"). Want to prompt the user to enter a positive integer and load it into each corresponding cell () locations. Eventually I will write code to test if the sum of rows, columns and diagonals are the same. Looking for a few pointers where I need to modify my current code/function. Here is what I have thus far. Appreciate the comments. Enter positive numbers
accepted answer: http://stackoverflow.com/a/29450623
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has title: Can I output the elements of a 2d array as user inputs numbers into a HTML table?
has answer: http://stackoverflow.com/a/29561983
possible better answer: http://stackoverflow.com/a/29450684
has answer: http://stackoverflow.com/a/29450684
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29450623
type: Question
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/47208056
type: Comment
comment on: http://stackoverflow.com/q/29462510
has text: Thanks @JMM for the suggestions. I tried .transform(...), but it still randomly fails, but it does seem to be about 20% faster using that, so thanks for that. I haven't tried your other suggestion yet.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/47203279
comment on: http://stackoverflow.com/a/29502444
score: 0
type: AnswerComment
has text: HI, I got new problem, How can i make array to accept only unique item ? i wrote a boolen method here to check but its not working, can you check this here plz http://jsfiddle.net/pewn1d4m/9/
type: Comment

http://stackoverflow.com/comment/47032790
type: Comment
type: QuestionComment
score: 0
has text: Which browser are you using?
comment on: http://stackoverflow.com/q/29431225

http://stackoverflow.com/comment/47175023
type: Comment
comment on: http://stackoverflow.com/a/29509174
has text: Where do you have the problem ?
score: 0
type: AnswerComment

http://stackoverflow.com/q/29443595
linked to: http://stackoverflow.com/q/500606
has comment: http://stackoverflow.com/comment/47075980
type: UnansweredQuestion
score: 1
has body: In Javascript, if I have a very large array, myArray And I add to it by calling myArray.push() And I remove indexes using something like delete myArray[102] Is there some benefit or reason to create a separate array like myArrayGaps that holds which indexes in myArray are not being used so that if there are unused ones, I add to the array by defining a specific index like myArray[102] = newValue; instead of calling .push() and accumulating unused indexes? Or is that impractical and pointless because of some aspect of Javascript's memory handling? The reason I am deleting instead of splicing is because I don't want to reorder the indexes of the array; I am using them to identify specific objects at specific indexes. I'm primarily asking if there is any reason to optimize my use of the gaps made when using delete.
tagged with: javascript
has title: Deleting and reusing array indexes
type: Question
has comment: http://stackoverflow.com/comment/47054977
has comment: http://stackoverflow.com/comment/47055025
upvote count: 1
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/29443702
favorite count: 0

http://stackoverflow.com/a/29502496
upvote count: 1
answers question: http://stackoverflow.com/q/29438669
type: Answer
has body: I've been having a look into this and I'm not sure there is any configuration based solution, but a programmatic approach I've found to work is to for each relevant click completely reapply the fancybox() function, after first looping through all the links, keeping a dictionary of each href and setting rel="gallery" only for the unique urls, making sure that the clicked item is one of them by adding it first. $('.fancybox').click(function(e) { var uniques = {}; $(this).attr('rel', 'gallery'); uniques[$(this).attr('href')] = true; $('.fancybox').not(this).each(function() { href = $(this).attr('href'); if(!uniques[href]) { $(this).attr('rel', 'gallery'); uniques[href] = true; } else { $(this).attr('rel', ''); } }); $('.fancybox').fancybox({ helpers : { thumbs : { width : 50, height : 50 } } }); }); Hope that helps. See https://jsfiddle.net/gL6578m3/ for a demo.
has comment: http://stackoverflow.com/comment/52687409
downvote count: 0
score: 1

http://stackoverflow.com/q/29405936
has comment: http://stackoverflow.com/comment/46990280
score: 0
has answer: http://stackoverflow.com/a/29406746
has title: is it possible to call a .vbs file from javascript in html?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47007831
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47005772
linked to: http://stackoverflow.com/q/17483782
has comment: http://stackoverflow.com/comment/46986908
has comment: http://stackoverflow.com/comment/47008318
tagged with: vbscript
type: Question
answer count: 1
tagged with: javascript
has body: 1)test.vbs Function demo() msgbox "Welcome to Follow Tutorials" End Function 2)test1.html Follow Tutorials Placement of VBScript in head section Click to see event Above is the code i am trying to run as a simple example .The function demo() is in separate file test.vbs which i want to call fro html page on click of button. I am using IE11 and vbscript is not supported by IE11.So is there a way i can call a vbs file from javascript in html? Please note if removed html tag in this post as it dint allow me to post the question

http://stackoverflow.com/q/29479366
upvote count: 4
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29479456
has answer: http://stackoverflow.com/a/29479456
tagged with: android
has answer: http://stackoverflow.com/a/29479729
has body: I need to detect how far from top the document has been scrolled and for that I used scrollTop(). Unfortunatelly it doesn't work on some versions of Android and therefor I need a different solution. Is there a way I could get the $(document).scrollTop without scrollTop function?
type: Question
tagged with: scrolltop
accepted answer: http://stackoverflow.com/a/29479729
type: AnsweredQuestion
tagged with: javascript
has title: jQuery alternative to scrollTop?
score: 4

http://stackoverflow.com/q/29513750
has comment: http://stackoverflow.com/comment/47183789
tagged with: c#
linked to: http://stackoverflow.com/q/5825165
has comment: http://stackoverflow.com/comment/47183951
has comment: http://stackoverflow.com/comment/47183222
has comment: http://stackoverflow.com/comment/47185722
tagged with: javascript
has answer: http://stackoverflow.com/a/29513907
has comment: http://stackoverflow.com/comment/47183185
has body: I am trying to give an alert message in a class file i.e. .cs file, instead of in the Code Behind of page. But any regular ways are not working to achieve the same! Also tried these Solutions... ClientScript OR ScriptManager.RegisterStartupScript both asks for Control as first parameter, which I don't understand what to provide! Is it really possible? :| If yes then... What is available way to give Alert from a class file?
answer count: 1
has comment: http://stackoverflow.com/comment/47183140
tagged with: asp.net
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/29513907
has comment: http://stackoverflow.com/comment/47183318
has title: alert in class file of ASP.NET not on Code Behind
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3803630
score: 1
has comment: http://stackoverflow.com/comment/47184739
has comment: http://stackoverflow.com/comment/47183453
downvote count: 1
has comment: http://stackoverflow.com/comment/47183196
type: Question

http://stackoverflow.com/q/29468047
has title: How to implement binary search in JavaScript
upvote count: 5
accepted answer: http://stackoverflow.com/a/29468199
tagged with: binary-search
has comment: http://stackoverflow.com/comment/47098359
tagged with: javascript
has answer: http://stackoverflow.com/a/29468143
favorite count: 0
has answer: http://stackoverflow.com/a/31118693
possible better answer: http://stackoverflow.com/a/29468143
duplicate of: http://stackoverflow.com/q/22697936
answer count: 4
has answer: http://stackoverflow.com/a/29468199
score: 4
type: AnsweredQuestion
tagged with: bisection
has comment: http://stackoverflow.com/comment/47098584
downvote count: 1
has body: https://www.khanacademy.org/computing/computer-science/algorithms/binary-search/p/challenge-binary-search I was following the pseudo code to implement algorithm on the link but don't know what's wrong with my code. Here is my code : /* Returns either the index of the location in the array, or -1 if the array did not contain the targetValue */ var doSearch = function(array, targetValue) { var min = 0; var max = array.length - 1; var guess; while(min &lt; max) { guess = (max + min) / 2; if (array[guess] === targetValue) { return guess; } else if (array[guess] &lt; targetValue) { min = guess + 1; } else { max = guess - 1; } } return -1; }; var primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]; var result = doSearch(primes, 2); println("Found prime at index " + result); //Program.assertEqual(doSearch(primes, 73), 20);
type: Question
has answer: http://stackoverflow.com/a/32251388
tagged with: algorithm

http://stackoverflow.com/comment/47012327
type: Comment
type: AnswerComment
has text: @Pheta I've added extra recommendation; also if the question is answered for you, please mark it as such.
score: 0
comment on: http://stackoverflow.com/a/29420214

http://stackoverflow.com/a/29501169
type: Answer
answers question: http://stackoverflow.com/q/29499180
score: 1
upvote count: 1
has body: The line return Parse.Promise.when(merchantDuty) is executing before there are any promises in the merchantDuty array (initialized as empty). So the whole function is terminating before your query find success function. I think if you create and add query promises to the merchantDuty array you will fix your bug. I also suggest you to use promise callbacks for the query methods. Like: query.find().then(function(){ //success }, function(error){ //error }); You can then chain them by returning another promise and make the code better structured.
has comment: http://stackoverflow.com/comment/47162745
downvote count: 0

http://stackoverflow.com/comment/47157115
has text: @tpie: Uh, do you really have 10m values that are *digits* (from 0 to 9) only? If so, that drastically changes the answer.
comment on: http://stackoverflow.com/q/29498313
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29486199
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/47134352
upvote count: 1
answer count: 1
downvote count: 1
has body: I have a jsp page. In jsp page i have array of objects say history. In the jquery, i have got the index.Now i want to pass history[index] object to the action class in struts2. Here is the code which i have tried but it is showing error. $(document).ready(function() { $(function() { var rateDialog = $("#rateDialog").dialog({ autoOpen: false, minHeight:250, width: 400, height: 265, open: function( event, ui ) { $("#showDialogMessage").hide(); $('#reviewArea').val(''); } }); $(".rate").on("click", function() { // Display the dialog rateDialog.dialog("open"); alert( $(this).attr("id") ); var index = $(this).attr("id"); alert("${history.get(index)}"); }); }); $("#submit").click(function(e) { $("#showDialogMessage").hide(); var xmlhttp; $("#submit").prop('disabled',true); alert("called"); var url="rate?object="+${history.get(index)}; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { $("#submit").removeAttr('disabled'); document.getElementById("showPasswordMessage").innerHTML=xmlhttp.responseText; $("#showPasswordMessage").show(); } } xmlhttp.open("GET", url, true); xmlhttp.send(); }); });
favorite count: 0
has comment: http://stackoverflow.com/comment/47169782
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29488577
has comment: http://stackoverflow.com/comment/47137396
has title: passing array object to action class in struts2
has comment: http://stackoverflow.com/comment/47132511
tagged with: java
has comment: http://stackoverflow.com/comment/47135951
type: Question

http://stackoverflow.com/comment/47105363
type: AnswerComment
has text: @DusanJovicic `i want to avoid any changes in form that may occur in that input` Surely it's better to standardise it (`d.toISOString().split('T')[0]` or set to midnight and `+d`), tell it back to them in a wordy way (`d.toDateString()`) and use your standardised form in the _localStorage_? otherwise you could end up with many entries for the same date but formatted differently
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29462702

http://stackoverflow.com/a/29453490
answers question: http://stackoverflow.com/q/29453363
upvote count: 5
has body: dc.js depends on d3.js, so d3.js should appear first. crossfilter.js seems to be independent, so it can appear anywhere. Right order is Don't forget to include dc.css, or your plots will be ugly PS Look at the section External resources on jsfiddle, you will find there all needed references.
score: 5
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/47072678
accepted answer of: http://stackoverflow.com/q/29453363

http://stackoverflow.com/comment/47000977
score: 0
has text: I was not the downvoter but likely its because you could have find this out yourself with a simple google search. There is a trend to downvote questions that can be trivially answered with obvious searches.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29414053

http://stackoverflow.com/comment/47085269
score: 0
type: AnswerComment
has text: You know jquery a little bit but move to angularjs what you compleatly dont know?
type: Comment
comment on: http://stackoverflow.com/a/29460518

http://stackoverflow.com/a/29462894
type: AcceptedAnswer
downvote count: 0
has body: Your script is working based on the code you provided. Given that they are all sibling elements, you could do this with pure CSS by making use of the general sibling combinator, ~: Example Here .photo-info:nth-of-type(5) ~ .photo-info { display: none; } Alternatively, you could also use .eq(4) (0 index based): Updated Example $('.photo-info').eq(4).nextAll('.photo-info').addClass('hidden'); You could also use :gt(4): Updated Example $('.photo-info:gt(4)').addClass('hidden'); For what it's worth, you may need to wrap your jQuery in a DOM ready handler: $(document).ready(function () { $('.photo-info:gt(4)').addClass('hidden'); });
answers question: http://stackoverflow.com/q/29462877
type: Answer
upvote count: 6
score: 6
accepted answer of: http://stackoverflow.com/q/29462877

http://stackoverflow.com/q/29478786
type: UnansweredQuestion
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/4968406
score: 1
has answer: http://stackoverflow.com/a/29478810
answer count: 1
tagged with: javascript
has title: javascript push item into object by variable name
favorite count: 0
has body: Sorry for the newbie question but I must be overlooking something. How do I set obj.{this.name} = property so obj.sandwich = off. My object would look something like: obj { sandwich: off, soup: off } http://jsfiddle.net/naaua4b5/ List of checkboxes: &lt;input type = "checkbox" name = "sandwich" /&gt; &lt;input type = "checkbox" name = "soup" /&gt; js code: var obj = {} ; $('input[type=checkbox]:not(:checked)').map(function() { var item_name = this.name; var value = 'off'; obj.item_name = value; }).get(); console.log (obj);
linked to: http://stackoverflow.com/q/2241875
duplicate of: http://stackoverflow.com/q/2241875
upvote count: 2

http://stackoverflow.com/comment/47136079
score: 0
type: Comment
has text: If you find that my answer works best, press the green checkmark next to my answer to approve of my answer. Until then, I will not have received any reputation from my answer. Thanks.
type: AnswerComment
comment on: http://stackoverflow.com/a/29470843

http://stackoverflow.com/q/29394444
has answer: http://stackoverflow.com/a/29394879
has comment: http://stackoverflow.com/comment/46965816
type: Question
has comment: http://stackoverflow.com/comment/46965698
tagged with: mongodb
has body: I have to run a dynamic query on collections in such a way that user enters collection name, field name and field value and I have to first of all check whether the field name supplied by user exists in the collection , if not then I have to run another query as shown in the example below. For example: If user enters collection name user, field name is type and field value is article. And based on parameters I have to query as follows: 1) If type field exists in collection user, my query will be: query = user.find({type:'article'}) 2) If type is not field of collection user, my query will be: query = user.find() I tried $exists but it is not working for me. And how can I use $exists before querying? because my collection, field name and field value all are dynamic. And How can I check that type field exists or not in user collection? I already tried the solution with $exists, but I want to know if there is another way to do it.
score: 0
accepted answer: http://stackoverflow.com/a/29394879
answer count: 1
tagged with: javascript
tagged with: node.js
type: AnsweredQuestion
has title: How can I check field exist or not in mongo db before querying to mongodb?

http://stackoverflow.com/q/29456440
has title: How do I import CSS just for some classes or ids?
has answer: http://stackoverflow.com/a/29456809
tagged with: javascript
has comment: http://stackoverflow.com/comment/47077395
has comment: http://stackoverflow.com/comment/47077414
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: Say, I have this HTML structure: Header Body Footer And an external CSS file (/styles.css), which contains #header{ color:red; } #footer{ color:red; } Now with the help of javascript I can easily load the whole CSS, so as the text color of #header and #footer becomes red. Using javascript, is it possible to load only styles which refer to #header and filter out any other styles in my stylesheet (styles for #footer in my case)?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 3
type: Question
score: 3

http://stackoverflow.com/q/29530003
type: AnsweredQuestion
tagged with: woocommerce
tagged with: wordpress
has body: As seen on any product at alcapparel.com: http://www.alcapparel.com/shop/clothing/looter-crop-tee/ As you can see the word "Expand" is located in the upper left of the product image. I've reinstalled the YITH WooCommerce Magnifier plugin, they reportedly patched it two days ago, and I can't find the source of the word anywhere in the files. I've also tried hiding it with .pp_expand {display: none !important;} but that doesn't work either. I'm quite baffled. Please help?
type: Question
tagged with: javascript
score: 0
has title: Unwanted "Expand" link won't go away. Can't trace source. display:none; not working. (Wordpress)
answer count: 1
has answer: http://stackoverflow.com/a/29530478
accepted answer: http://stackoverflow.com/a/29530478
tagged with: php

http://stackoverflow.com/comment/46970593
comment on: http://stackoverflow.com/q/29397069
type: QuestionComment
has text: Use jQuery UI modal dialog instead of this which can only be stopped in Chrome if the user wants to not stay
score: 0
type: Comment

http://stackoverflow.com/q/29381113
has comment: http://stackoverflow.com/comment/46941803
tagged with: triggers
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46942235
tagged with: javascript
has comment: http://stackoverflow.com/comment/46941941
downvote count: 0
has title: Run function after download begins Javascript
favorite count: 0
tagged with: download
type: UnansweredQuestion
has body: Is it possible to detect download in the browser, and run a function when the download starts?
has comment: http://stackoverflow.com/comment/46941778
tagged with: detect
has comment: http://stackoverflow.com/comment/46941851
answer count: 0
score: 1

http://stackoverflow.com/comment/47094525
score: 0
type: Comment
type: QuestionComment
has text: @AlexanderSupertramp if it calling ajax then check this jquery function http://api.jquery.com/ajaxComplete/
comment on: http://stackoverflow.com/q/29465821

http://stackoverflow.com/q/29501722
has body: We are trying to implement one project where we are using webRTC to stream videos from mobile devices and a agent on desktop can monitor those streams. Our Requirement says we should we able to record the stream video streamed from mobile devices. Currently we are using RecordRTC solution to record the streamed video. its working fine if the stream is generating from pc . but if we try to record the stream generated from mobile(android/iOS) Firefox is crashing after 3-4 seconds. this crash is not happening in chrome. I tried hard to debug the problem behind the crash but i am unable to have any information from firefox browser. But When I monitored the chrome://webrtc-internals/ it showed that the height and width of video is changing after 3-4 seconds. Can this be the reason behind the firefox crash. Please help us in resolving this issue. as according to requirements provided to us we have to use Firefox browser only. Any suggestion will be of great help to us Thanks var audioConfig = {}; if (!isRecordOnlyAudio) { audioConfig.onAudioProcessStarted = function() { // invoke video recorder in this callback // to get maximum sync videoRecorder.startRecording(); }; } audioRecorder = RecordRTC(stream, audioConfig); if (!isRecordOnlyAudio) { // it is second parameter of the RecordRTC var videoConfig = { type: 'video' }; videoRecorder = RecordRTC(stream, videoConfig); } audioRecorder.startRecording();
downvote count: 0
tagged with: webrtc
favorite count: 0
has comment: http://stackoverflow.com/comment/47164305
has comment: http://stackoverflow.com/comment/47418760
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/47163865
upvote count: 1
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/47418790
has comment: http://stackoverflow.com/comment/47162125
has title: Firefox Crash while recording remote stream from mobile (webRTC)
tagged with: javascript
tagged with: mozilla

http://stackoverflow.com/a/29507317
has body: 'f(x)=3x;g(x)=sin(x);2x;cos(x)'.replace(/\w+\(x\)=/g, '');
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29507279
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29507279
downvote count: 0
type: Answer

http://stackoverflow.com/a/29452085
has body: You need to wrap the function parameter in quotes since it is a string openDialog(&lt;?php echo $_pagi_resultSubLider -&gt;fields['id'];?&gt;) Should be openDialog('&lt;?php echo $_pagi_resultSubLider -&gt;fields['id'];?&gt;')
accepted answer of: http://stackoverflow.com/q/29452063
score: 0
answers question: http://stackoverflow.com/q/29452063
type: Answer
type: AcceptedAnswer

http://stackoverflow.com/a/29451346
has comment: http://stackoverflow.com/comment/47071070
answers question: http://stackoverflow.com/q/29450077
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29450077
has comment: http://stackoverflow.com/comment/47070975
downvote count: 0
type: AcceptedAnswer
score: 1
has body: You need to scroll the #boxMaster element relative to the link's position within the element and relative to the #boxMaster element's top position within the body element. You can do this by adding the #boxMaster element's scrollTop() value with its top position, and then subtracting that from the link's offset top value: $(this.hash).offset().top - $('#boxMaster').position().top + $('#boxMaster').scrollTop() Updated Example var $boxMaster = $('#boxMaster'); $boxMaster.animate({ scrollTop: $(this.hash).offset().top - $boxMaster.position().top + $boxMaster.scrollTop() }, 700); You may also need to prevent the link element's default behavior using e.preventDefault(), and then manually scroll the html/body element to the #boxMaster element: Updated Example $('html, body').animate({ scrollTop: $boxMaster.offset().top }, 700);
type: Answer

http://stackoverflow.com/comment/46950399
type: Comment
has text: Can you explain me little bit how it works? or may be send me some link from where i can refer or can get to know how to implement what you said
type: QuestionComment
comment on: http://stackoverflow.com/q/29385765
score: 0

http://stackoverflow.com/q/29425108
has body: Here's my code to limit the number of visible list items in a ul: $wnd.$(el) .find('li:gt(9)') .hide() .end() .append( $wnd.$(' +More ').click( function(){ $wnd.$(this).siblings(':hidden').show().end().remove(); }) ); When +More is clicked it will show all the items immediately. What should be added in the code such when +More is clicked it will not show everything yet, just the next 10 items? Then, when all items are shown, a +Less option should be shown to just show the first 10 items, as it was before.
downvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29425146
answer count: 3
upvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29425146
favorite count: 0
has title: Limit the items shown in a ul element
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29425426
score: -1
has answer: http://stackoverflow.com/a/29425309
has answer: http://stackoverflow.com/a/29425426

http://stackoverflow.com/comment/47064375
comment on: http://stackoverflow.com/q/29448943
score: 0
has text: See https://jqueryui.com/autocomplete/ , https://twitter.github.io/typeahead.js/examples/
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47196930
type: Comment
score: 1
has text: I don't think there should be a double quote followed by a single quote. Use one or the other.
comment on: http://stackoverflow.com/a/29520942
type: AnswerComment

http://stackoverflow.com/q/29459397
has body: I'm trying to build a chrome extension that involve sending request for data from popup script to Content script (through background script) analyze the request on the content script side and send back a response (again through the background script). The popup script code: chrome.runtime.sendMessage({action:"getLanguages",data:"hi hi",}, function(response) { document.write(response.msg); }); The background script: chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { var returnedLangs; if (request.action == "getLanguages"){ returnedLangs = getLangs(); alert("got langs " + returnedLangs); //sendResponse({msg: "goodbye"}); } }); function getLangs() { var langs; chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { chrome.tabs.sendMessage(tabs[0].id, {action: "getLanguages"}, function(response) { langs = response.langs; alert(langs); return langs; }); }); } The content script code: chrome.extension.onMessage.addListener( function(request, sender, sendResponse) { getLanguages(sendResponse,sendBackLangs); }); function getLanguages(sendResponse,callback) { var acceptLangs = []; chrome.i18n.getAcceptLanguages(function(langs) { langs.forEach( function(lang) { acceptLangs.push(lang); }); callback(sendResponse,acceptLangs); }); } function sendBackLangs(sendResponse, acceptedLangs) { sendResponse({langs: "acceptedLangs"}); } With the current content script code no response is sent back to the background but if i do sendResponse directly from the chrome.extension.onMessage... function the response is arriving back to the background. Can anyone help me understand what causes ths behavior and how can i fix it ?
tagged with: jquery
has answer: http://stackoverflow.com/a/29460177
has title: How to get Messages sent between popup script to content script and back
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
type: Question
tagged with: javascript
score: 0
tagged with: google-chrome-extension
answer count: 1

http://stackoverflow.com/comment/47189805
type: Comment
comment on: http://stackoverflow.com/a/29515797
has text: I select 4/27/15 til 4/29/15 my console log came out to this ("2015-04-08" application.js:71:0) but in my view it still came out like this Mon Apr 27 2015 00:00:00 GMT-0400 (EDT) Tue Apr 28 2015 00:00:00 GMT-0400 (EDT) Wed Apr 29 2015 00:00:00 GMT-0400 (EDT) @Nikos M.
score: 0
type: AnswerComment

http://stackoverflow.com/a/29509294
has body: Give this HTML: 1 2 To move the 1 below the 2: $("ul li:first").insertAfter($("ul li:last")) Or given this HTML: 1 2 3 4 5 Move the 2nd li into the number 4 spot: $("ul li:nth-child(2)").insertAfter($("ul li:nth-child(4)")) Wrapping it up into a function: function moveListItemTo(list, from, to) { list.find("li:nth-child(" + from + ")").insertAfter(items.find("li:nth-child(" + to + ")")) } Usage: moveListItemTo($("ul"), 2, 4)
type: Answer
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29509150
score: 1

http://stackoverflow.com/a/58540177
upvote count: 1
has body: You could simply do this: const { spawn } = require('child_process'); const gulp = require('gulp'); gulp.task('list', function() { const cmd = spawn('ls'); cmd.stdout.on('data', (data) =&gt; { console.log(`stdout: ${data}`); }); return cmd; });
answers question: http://stackoverflow.com/q/29511491
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/29410794
score: 2
downvote count: 0
has body: Do it in each loop. $('.item').each(function(idx) { var rel = $(this).attr('rel'); var bg = $(this).css('background'); $('.recieve[rel="' + rel + '"]').css('background', bg); }); I suppose that's what you want. You can loop over .item or .recieve, it doesn't matter at the end of the day. Here is a fiddle to show that it works: http://jsfiddle.net/Lg6yw7bj/1/
accepted answer of: http://stackoverflow.com/q/29410570
answers question: http://stackoverflow.com/q/29410570
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/29482489
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/47152059
upvote count: 1
has comment: http://stackoverflow.com/comment/47156274
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29483614
has body: So I'm trying to make a chrome extension. My code works fine when I run it as a normal html page, but when I use browser action, my enable/disable button doesn't work. It doesn't do anything when I press enable (Which it should switch to disable). Was wondering if there is something I don't know about like permissions or something. I haven't set any permissions in my json page but I didn't think it was the problem. Was wondering if you guys can take a look and see what I'm missing. Here's my code. Enabled Disabled You must refresh the page for the change to take effect. Thanks to @duskwuff I have fixed my problem. I created a separate js file and used the following code. function enableBtn(){ document.getElementById("btn1").style.display = "none"; document.getElementById("btn2").style.display = ""; return false; } function disableBtn(){ document.getElementById("btn2").style.display = "none"; document.getElementById("btn1").style.display = ""; return false; } document.addEventListener('DOMContentLoaded', function () { document.getElementById("btn1").addEventListener("click", enableBtn); document.getElementById("btn2").addEventListener("click", disableBtn); });
has comment: http://stackoverflow.com/comment/47126923
has title: HTML/Javascript for Chrome Extension not quite working
accepted answer: http://stackoverflow.com/a/29483614
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
tagged with: google-chrome-extension

http://stackoverflow.com/q/29432997
has comment: http://stackoverflow.com/comment/47035410
score: 7
has body: I'm making an ajax call to the IMDb API to get the movie data for 'The Shawshank Redemption'. I want this data to be put in the div I created. My js code currently: $(init); function init() { $.ajax({ dataType: "json", url: "http://www.omdbapi.com/?i=tt0111161", success: function (data) { console.log(data); $("#movie-data").append(data); } }); It doesn't give any response. However, I can see the data in my console. When I append Test instead of data it does return 'Test' to the screen.
answer count: 6
duplicate of: http://stackoverflow.com/q/73160454
has title: append ajax result to div
has answer: http://stackoverflow.com/a/63559512
has answer: http://stackoverflow.com/a/29433601
has comment: http://stackoverflow.com/comment/47035491
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29433294
has comment: http://stackoverflow.com/comment/47035617
has comment: http://stackoverflow.com/comment/47035464
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/49910364
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29433024
has answer: http://stackoverflow.com/a/29433438
linked to: http://stackoverflow.com/q/21474410
upvote count: 7
type: Question
linked to: http://stackoverflow.com/q/73160454

postback
tag name: postback
type: Tag
tags question: http://stackoverflow.com/q/29449989
tags question: http://stackoverflow.com/q/29432193

http://stackoverflow.com/q/29436125
tagged with: jquery
has comment: http://stackoverflow.com/comment/47041374
type: UnansweredQuestion
tagged with: input
has title: .val() is returning undefined .text returning random code
has body: I am having an issue with .val() returning an unexpected output I am using an item in an array to create a selector for an ID of a number input and then retrieving its value. The input this should point to: Strength javaScript / jQuery: $.each(traitName, function (key, value) { if (binConv(traitRaces[key], 12).charAt(race) + binConv(traitClasses[key], 4).charAt(baseClass) == 00 && $("#startrunes li[data-value='" + key + "']").length <= 0) { $("#startrunes") .append($(" ") .text(value)); } else if (binConv(traitRaces[key], 12).charAt(race) + binConv(traitClasses[key], 4).charAt(baseClass) != 00) { $("#startrunes li[data-value='" + key + "']").remove(); } if (traitRequireStat0[key].length > 0) { alert(parseInt($('#' + traitRequireStat1[key]).val(),10)); if ($('#'+traitRequireStat0[key]).val() < traitRequireValue0[key]) { $("#startrunes li[data-value='" + key + "']").remove(); } } else if (traitRequireStat1[key].length > 0) { if ($('#' + traitRequireStat1[key]).val() < traitRequireValue1[key]) { $("#startrunes li[data-value='" + key + "']").remove(); } } The alert in the jQuery return NaN if I alert the val without parse int it comes back as undefined and if I use .text() I get random code all the arrays in here are equivalent length arrays and I don't believe them to be the root of the issue I am trying to get the current user input value not the value attribute. Edit: forgot to mention the environment is jQuery / Bootstrap / jQuery UI
type: Question
has answer: http://stackoverflow.com/a/29436212
has comment: http://stackoverflow.com/comment/47041783
tagged with: javascript
score: 0
tagged with: arrays
answer count: 1

http://stackoverflow.com/a/29503492
score: 1
answers question: http://stackoverflow.com/q/29501491
upvote count: 1
type: Answer
has body: The short answer to your question is no - the placement/order of the code does not not ensure that hide-hidden are "fired" in that order. It is entirely possible to delay the execution of all or part of hide.bs.dropdown() until after hidden.bs.dropdown() has fired. Browsers have an inner loop called an event loop that processes queued events/functions/etc. The "the placement of code" in your example merely shows the order in which those functions/events are added to this queue. Here's an example of pushing a function to the end of the queue using setTimeout(): // the timeout delay is 0, but it still moves the 'delayEvent' to the end of the queue: $(document).on("delayEvent", { foo: "bar" }, function(event) { setTimeout(function() { console.log(event.data.foo); }, 0); }); $(document).on("fifoEvent", { bim: "baz" }, function(event) { console.log(event.data.bim); }); $(document).trigger("delayEvent"); // bar $(document).trigger("fifoEvent"); // baz &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
downvote count: 0

http://stackoverflow.com/a/29459125
has comment: http://stackoverflow.com/comment/47097732
type: Answer
answers question: http://stackoverflow.com/q/29443350
has comment: http://stackoverflow.com/comment/47097893
downvote count: 0
score: 1
has body: I guess the answer to your question is this: That attribute allows Durandal to keep track of where, relative to the root directory of the application are views located. data-view="views/shell" basically lets Durandal know that the shell.html template(view) is located in the views/ directory, and whenever something triggers a full application refresh, Durandal knows where to pull this exact view. The shell view basically means the outer shell of the web application. Here are the logs when reloading the application/clicking on the Flickr tab: Debug:Enabled Application:Starting Plugin:Installed plugins/router Plugin:Installed plugins/dialog Application:Started XHR finished loading: GET "http://localhost:8000/app/views/shell.html". Navigation Complete ctor {displayName: "Welcome to the Durandal Starter Kit!", description: "Durandal is a cross-device, cross-platform client … Applications (SPAs) easy to create and maintain.", features: Array[11], __moduleId__: "viewmodels/welcome"} Object {fragment: "", queryString: null, config: Object, params: Array[0], queryParams: null} Binding views/shell Object {router: Object, search: function, activate: function, __moduleId__: "viewmodels/shell"} XHR finished loading: GET "http://localhost:8000/app/views/welcome.html". Using CSS3 animations. Binding views/welcome ctor {displayName: "Welcome to the Durandal Starter Kit!", description: "Durandal is a cross-device, cross-platform client … Applications (SPAs) easy to create and maintain.", features: Array[11], __moduleId__: "viewmodels/welcome"} See those "XHR finished loading" messages? That's where Durandal is loading the views by fetching their paths from data-view attributes. Clicking on the "Flickr" tab gives us the following: Activating Object {displayName: "Flickr", images: function, activate: function, select: function, canDeactivate: function…} Navigation Complete Object {displayName: "Flickr", images: function, activate: function, select: function, canDeactivate: function…} …
has comment: http://stackoverflow.com/comment/47097636
has comment: http://stackoverflow.com/comment/47506574
has comment: http://stackoverflow.com/comment/47507303
upvote count: 1

http://stackoverflow.com/comment/46961443
type: QuestionComment
has text: I found some article with a workaround for your scenario: https://coderwall.com/p/d_aisq/speeding-up-angularjs-s-digest-loop
score: 0
comment on: http://stackoverflow.com/q/29392200
type: Comment

http://stackoverflow.com/comment/47167384
type: AnswerComment
has text: for some reason it doesn't put nav Div under 'logoMobileTop' but its putting everything above it and below it. Like a glitch that does not want to include that php code.
comment on: http://stackoverflow.com/a/29441660
type: Comment
score: 0

http://stackoverflow.com/comment/47099766
type: Comment
has text: Ok.. can you provide a fiddle with simple html?? I'll try to edit that!!
comment on: http://stackoverflow.com/a/29466131
score: 0
type: AnswerComment

http://stackoverflow.com/comment/77718040
has text: I asked a related question: [Why does Promise not have a get() function?](https://stackoverflow.com/questions/45378267/why-does-promise-not-have-a-get-function)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29516390

http://stackoverflow.com/q/29392599
favorite count: 0
accepted answer: http://stackoverflow.com/a/29392645
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/15491894
downvote count: 3
has comment: http://stackoverflow.com/comment/46961993
upvote count: 1
duplicate of: http://stackoverflow.com/q/15491894
type: Question
has answer: http://stackoverflow.com/a/29392645
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/46961977
has title: regex for date in javascript
has comment: http://stackoverflow.com/comment/46962198
answer count: 1
has body: how come when searching for dd/mm/yyyy in a string this works: /(\d\d?)\/(\d\d?)\/(\d{4})/ but this doesnt: /\d{2}\/\d{2}\/d{4}/

http://stackoverflow.com/comment/47144775
type: QuestionComment
comment on: http://stackoverflow.com/q/29486472
has text: have you checked these docs: http://sailsjs.org/#!/documentation/concepts/ORM/Models.html ?
score: 0
type: Comment

http://stackoverflow.com/comment/47181387
has text: @ mindfreak yes like this but you would require two spans for each input
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29486698
type: Comment

http://stackoverflow.com/comment/47209596
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29527565
type: Comment
has text: Thanks, this is one more reason for throwing away function declaration and always using expression form. I can use methods directly, no hoisting...

http://stackoverflow.com/q/29381669
score: 1
favorite count: 0
has title: Javascript comparing line ending values
type: Question
has answer: http://stackoverflow.com/a/29381828
has body: I am trying to compare the line ending values that are saved in a DB, with '\r\n', '\r' and '\n'. Is this possible? Or is there another way. This is doesn't work... if (value === "\r\n") { return "carriageReturnNewLine"; } if (value === "\r") { return "carriageReturn"; } if (value === "\n") { return "newLine"; }
tagged with: character
has comment: http://stackoverflow.com/comment/46945104
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/29381828
has comment: http://stackoverflow.com/comment/46943093
type: AnsweredQuestion
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/30411150
has comment: http://stackoverflow.com/comment/49226865
has comment: http://stackoverflow.com/comment/49255577
has comment: http://stackoverflow.com/comment/49228920
has comment: http://stackoverflow.com/comment/52890377
answers question: http://stackoverflow.com/q/29435806
downvote count: 0
has body: well, youtube and soundcloud use html players for sharing. "https://www.youtube.com/embed/xPR-Ej-ENbk". So it should be possible, I am working on the same issue here, but when rendered on facebook am getting a div with class name "me-cannotplay", and am still trying to figure out if this something related to getting white listed by facebook or if there is something wrong with the html player i am using.
type: Answer
has comment: http://stackoverflow.com/comment/49223575
has comment: http://stackoverflow.com/comment/52875198
score: 2
upvote count: 2

http://stackoverflow.com/comment/47013357
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29418878
has text: Ok, can you create a codepen or plnkr of what you have now so we can work on that.

http://stackoverflow.com/a/29477311
downvote count: 0
has comment: http://stackoverflow.com/comment/47210559
answers question: http://stackoverflow.com/q/29472696
score: 4
accepted answer of: http://stackoverflow.com/q/29472696
type: AcceptedAnswer
has body: You can create scenario objects and wrap the execution in for each loop (I'm using lodash in this example): describe("should count the number of combinations correctly", function () { var scenarios = { "2-item arrays": { arrays: { vowels: ['a', 'e'], consonants: ['b', 'c'] }, combinations: [ {pattern: "CV", result: 4}, {pattern: "CVC", result: 8}, {pattern: "CVCV", result: 16} ] }, "3-item arrays": { arrays: { vowels: ['a', 'e', 'i'], consonants: ['b', 'c', 'd'] }, combinations: [ {pattern: "CV", result: 9}, {pattern: "CVC", result: 27}, {pattern: "CVCV", result: 81} ] } }; _.forEach(scenarios, function (scenario, key) { describe("with " + scenario.key, function () { beforeEach(function () { scope.vowels = scenario.arrays.vowels; scope.consonants = scenario.arrays.consonants; }); _.forEach(scenario.combinations, function(combination) { it("with " + combination.pattern.length + " letters in pattern", function() { scope.pattern = combination.pattern; expect(scope.combinationCounter()).to.equal(combination.result); }); }) }); }); }); This way you can add more scenarios without duplicating describe() / beforeEach() / it() for each combination and it will produce the same messages.
type: Answer
upvote count: 4

http://stackoverflow.com/comment/47168431
has text: JavaScript doesn't really care about that stuff. `var a = "abc";a=5;` is valid code
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29505705

http://stackoverflow.com/comment/47077077
score: 1
type: AnswerComment
has text: Never a problem, i'm glad to help it was just a simple typo/mistake anyways. Just want to make sure that the answer is correct, because it's important that users get good answers.
type: Comment
comment on: http://stackoverflow.com/a/29456263

http://stackoverflow.com/a/29452872
type: Answer
has body: $li.find("a") return a jQuery object known as the "wrapped set," which is an array-like structure that contains all the selected DOM elements $li.find("a")[0].setAttribute it contain good description about jQuery Selector
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/29452837

http://stackoverflow.com/q/29458940
tagged with: javascript
tagged with: jquery
has body: I have an aspx page the get a value from url . the page's code is like this : &lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="confirmpayment.aspx.cs" Inherits="AccidentCongress.UserPortal.confirmpayment" %&gt; &lt;div id="bankform"&gt;&lt;/div&gt; &lt;script language="javascript" type="text/javascript"&gt; function postRefId(refIdValue) { var form = document.createElement("form"); form.setAttribute("method", "POST"); form.setAttribute("action", "&lt;% System.Configuration.ConfigurationManager.AppSettings["PgwSite"].ToString(); %&gt;"); form.setAttribute("target", "_self"); var hiddenField = document.createElement("input"); hiddenField.setAttribute("name", "RefId"); hiddenField.setAttribute("value", refIdValue); form.appendChild(hiddenField); document.getElementById("bankform").appendChild(form); form.submit(); document.getElementById("bankform").removeChild(form); } &lt;/script&gt; &lt;% if (Request.QueryString["po"] == "true") { Response.Write("&lt;script language='javascript' type='text/javascript'&gt; postRefId('" + Request.QueryString["rid"] + "');&lt;/script&gt;"); } %&gt; But when i call this page the page is refreshed ,and this part of code is executed every time : &lt;% if (Request.QueryString["po"] == "true") { Response.Write("&lt;script language='javascript' type='text/javascript'&gt; postRefId('" + Request.QueryString["rid"] + "');&lt;/script&gt;"); } %&gt; Why? Best regards
has answer: http://stackoverflow.com/a/29458985
score: 0
has title: the page is refreshed every time when is loaded
tagged with: asp.net
has comment: http://stackoverflow.com/comment/47082078
has comment: http://stackoverflow.com/comment/47082202
type: UnansweredQuestion
type: Question
answer count: 1

http://stackoverflow.com/q/29524985
answer count: 0
has comment: http://stackoverflow.com/comment/47207877
tagged with: smil
type: Question
has comment: http://stackoverflow.com/comment/47206134
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47213116
has comment: http://stackoverflow.com/comment/47209839
has body: This is for the SVG animation experts: I'm trying to read the properties of a &lt;g&gt; element that I'm animating along a path using &lt;animateMotion&gt;. My understanding is that animateMotion applies a transform to the element, instead of simply changing one property at a time (x, y, rotation, etc). According to my notes, you can access the current animated value of any SVG attribute in Javascript with the animVal sub-property of the relevant property. For example, element.cx.animVal.value or element.cx.animVal.valueAsString. But for transforms, the corresponding property is element.transform, which is of type SVGAnimatedTransformList. The animVal of the transform returns an SVGTransformList. Reading through the spec at that link, I should be able to get these properties from my animated element: element.transform.animVal.numberOfItems should return the number of items in the transform list. But instead, it returns 0. element.transform.animVal.getItem(0) should return the first value in the transform list. Since it's apparently empty, I get an error when trying to access this property. So, has anyone successfully used these properties and sub-properties to read values during animation, are they known to be problematic or unsupported, or am I doing something wrong? Other things to note about my script: tested in Firefox and Chrome i'm logging out the properties every second with a `setInterval` the animation itself works fine. how I got there shouldn't matter too much but I can answer your questions with more details
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47206359
has title: Can't read .animVal during SVG SMIL animation

http://stackoverflow.com/comment/47041194
comment on: http://stackoverflow.com/q/29435517
score: 0
type: Comment
type: QuestionComment
has text: No, `.toISOString()` returns UTC. Printing the Date object as is shows local time.

http://stackoverflow.com/a/29485225
answers question: http://stackoverflow.com/q/29485158
type: Answer
has body: Try this: window.addEventListener("keydown",function (e) { if (e.keyCode === 114 || (e.ctrlKey &amp;&amp; e.keyCode === 70)) { e.preventDefault(); } }) You can use this jquery plugin as well.
has comment: http://stackoverflow.com/comment/47130177
has comment: http://stackoverflow.com/comment/47130350
score: 0
has comment: http://stackoverflow.com/comment/47130073

http://stackoverflow.com/a/29454840
type: Answer
has comment: http://stackoverflow.com/comment/47075138
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47074891
has comment: http://stackoverflow.com/comment/47074819
has body: There really isn't much of a difference aside from example one using a named function as the callback and the second example using an anonymous function as the callback. Named callbacks are useful if you need to reuse them or if you just want to have more control over the organization of your callbacks. Either way, the functions will be called after the execution of 'on' is complete. For more information about callbacks have a look at http://javascriptissexy.com/understand-javascript-callback-functions-and-use-them/
downvote count: 0
answers question: http://stackoverflow.com/q/29454768

http://stackoverflow.com/comment/47115818
comment on: http://stackoverflow.com/a/29477130
type: AnswerComment
score: 0
has text: @Zidrep:- You need to understand the fact that your location is 1 hour ahead of the GMT time due to which you are getting the difference in time. The toISOString() returns the string in simplified extended ISO format. If you want to check the time without difference then check my answer!
type: Comment

http://stackoverflow.com/comment/47194739
comment on: http://stackoverflow.com/q/29519855
has text: i think when you write in integer n = n+ 1 , that means you add 1 in n, but in string when you write n= n+ a , that means you concatenating a in n and in integer you don't get split method i hope you got your answer.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29378315
type: UnansweredQuestion
score: 1
tagged with: e2e-testing
upvote count: 1
tagged with: google-chrome
type: Question
has body: I have some e2e tests set up with Protractor and CucumberJS, but and struggling a lot with Chrome. The tests pass fine on Firefox but in Chrome they randomly stop in any step. Some times it just hangs up loading and url, other times sending keys it suddenly stops, other times it hangs up trying to "click" a button. Does any one have any idea? Everything works fine on Firefox. I've tried a lot of things: ignoreSyncronization, waitForAngular withoud any luck... This is my steps definition: module.exports = function() { var login = new Login(); this.Given('I go on "$url"', function(url, callback) { browser.get(url); callback(); }); this.Given('I logged in with user "$userName" and password "$password"', function(userName, password, callback) { browser.element(by.id('userName')).sendKeys(userName).then(function() { browser.element(by.id('password')).sendKeys(password).then(function() { browser.element(by.id('btnLogin')).click().then(callback); }); }); }); this.Then('The user is redirected to the Dashboard page on "$dashboardUrl"', function(dashboardUrl, callback) { this.expect(browser.getCurrentUrl()).to.eventually.equal(dashboardUrl).and.notify(callback); }); this.Then('I log the user out', function(callback) { login.getUserProfileMenuElement().click().then(function() { login.getLogUserOutElement().click(); callback(); }); }); }; Here two different screenshot where it stopped, first time, stopped loading the url, second time, sending keys: https://dl.dropboxusercontent.com/u/1437542/run1.jpg https://dl.dropboxusercontent.com/u/1437542/run2.jpg
has title: Protractor tests randomly stopping on Chrome
tagged with: protractor
tagged with: javascript
downvote count: 0
favorite count: 0
tagged with: cucumberjs
answer count: 0

http://stackoverflow.com/q/29386039
linked to: http://stackoverflow.com/q/1732348
score: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
has title: Regex to escape HTML Tag
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46950416
has answer: http://stackoverflow.com/a/29386560
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has body: I want to extract from an html tag string name only. I would like to obtain this result: Farm 1 STAGING STAGING_SYSTEM_10 what type regular expression can I use? Farm 1 STAGING STAGING_SYSTEM_10
favorite count: 0

http://stackoverflow.com/comment/47147961
has text: i decided to use another library called needle and it solved the problem. Thanks for your suggestion anyway
comment on: http://stackoverflow.com/q/29474823
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/47075639
comment on: http://stackoverflow.com/q/29455356
has text: If want to use jquery can use .promise().done
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/47139967
score: 2
has text: Do you already have the DIV or should it be created as well? Also, what have you tried? We're not exactly a code writing service.
comment on: http://stackoverflow.com/q/29490490
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29505256
type: AnsweredQuestion
has body: I'm using FlexSlider 2 on a WordPress site. The back and forth nav buttons are not working--the back nav button is just an orange box and the forward nav button looks weird. Check it out here: http://www.friendshipart.net/artists-acf/ CSS is here: http://www.friendshipart.net/wp-content/themes/colored-friendshipart/flexslider.css Here is the script (in header.php): &lt;script type="text/javascript" charset="utf-8"&gt; $(window).load(function() { $('.flexslider').flexslider({ // Primary Controls directionNav: true, animation: "slide", controlsContainer: ".flex-nav-container", }); }); &lt;/script&gt; How can I make the nav buttons appear normally?
tagged with: wordpress
type: Question
accepted answer: http://stackoverflow.com/a/29508069
has title: Flexslider nav buttons not visible on hover, with orange box
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: flexslider
has answer: http://stackoverflow.com/a/29508069
tagged with: css

http://stackoverflow.com/comment/47027481
comment on: http://stackoverflow.com/a/29415264
has text: Thank you, it works. I've had problems in the function ajaxHandler jQuery, so I thought that the reason in AngularJs.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29508702
has comment: http://stackoverflow.com/comment/47222750
upvote count: 1
has body: The documentation specifically states that getSelection() Returns an array with the ids of the selected nodes. Returns an empty array if no nodes are selected. The selections are not ordered. Since at present, the way to select multiple nodes is to long-press them, you can keep selection-order yourself, by listening to the selection event: var mySelectionOrder = []; var previouslySelected = {}; network.on('select', function(p) { var selected = {}; // add newly-selected nodes at end of mySelectionOrder p.nodes.forEach(function(n) { if ( ! previouslySelected[n]) { mySelectionOrder.push(n); } selected[n] = true; }); // remove newly-unselected entries from mySelectionOrder mySelectionOrder = mySelectionOrder.filter( function(e, i, a) { return selected[e]; }); // prepare for next run previouslySelected = selected; // output to console to make sure it works console.log("Selection updated", mySelectionOrder); }); (Edited to fix JS code; tested to work with this example)
answers question: http://stackoverflow.com/q/29491930
has comment: http://stackoverflow.com/comment/47261066
has comment: http://stackoverflow.com/comment/47255034
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47255780
has comment: http://stackoverflow.com/comment/47258694
has comment: http://stackoverflow.com/comment/47262244
has comment: http://stackoverflow.com/comment/47255275

http://stackoverflow.com/q/29407408
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46989750
tagged with: css
possible better answer: http://stackoverflow.com/a/29407792
has title: How to implement CSS file style on selected div
score: -4
accepted answer: http://stackoverflow.com/a/29407468
type: AnsweredQuestion
type: Question
downvote count: 4
answer count: 2
upvote count: 0
has body: I want to use CSS files on paricular div style. and all other site design style not effect with my CSS files. inline styling or !important in not possible because i have thousands lines of code.
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29407792
has answer: http://stackoverflow.com/a/29407468

http://stackoverflow.com/q/29420475
has answer: http://stackoverflow.com/a/29420556
has comment: http://stackoverflow.com/comment/47012855
type: Question
has title: Can't get scrolltop to work correctly
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29420556
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: AnsweredQuestion
has body: I've created a fiddle to show what is happening. I am using jquery to fade in a link to the top of the page when the user is scrolling down. I can get it to work on jsfiddle if I place the code in the javascript window, but if I put it in script tags where my $( window ).load(function() is in the HTML window, it doesn't work at all. Does anybody know why? $('#slide').bind("scroll", function() { if ($(this).scrollTop() &gt; 20) { $("#top").fadeIn(); } else { $("#top").stop().fadeOut(); } }); $('#top').on("click",function(){ $('#slide').animate({scrollTop:0}, 'slow'); }); here's the fiddle: https://jsfiddle.net/8130fdhm/2/ Any help would be most appreciated.

http://stackoverflow.com/comment/47028504
score: 0
type: QuestionComment
type: Comment
has text: @SergioTulentsev I've updated the jsbin code
comment on: http://stackoverflow.com/q/29428740

http://stackoverflow.com/q/29424366
tagged with: return-value
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/29424472
has body: i need to get and check the values from each array and place it after in html textbox. thanks for anybody who can help. var office = [ {display: "11*23", value: "11*23",id:"11*23" }, {display: "11.4x16.2", value: "11.4x16.2" }, {display: "13*19", value: "13*19" }, {display: "15*22", value: "15*22" }, {display: "16.2*23.7", value: "16.2*23.7" }, {display: "18*25", value:"18*25" }]; var dorina = [ {display: "11*23", value:"11*23" }, {display: "13*19", value: "13*19" }, {display: "15*22", value: "15*22" }, {display: "", value: "" }]; var pocket= [ {display: "18*25", value: "18*25" }, {display: "20*30", value: "20*30" }, {display: "24*30", value: "24*30" }, {display: "24*34", value: "24*34" }, {display: "26*36", value: "26*36" }, {display: "30*40", value: "30*40" }, {display: "32*42", value: "32*42" }, {display: " ", value: " " }, {display: " ", value: " " }];
type: Question
answer count: 2
upvote count: 0
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/47020177
favorite count: 0
has answer: http://stackoverflow.com/a/29424465
has title: get values from array list in javascript
score: -2

http://stackoverflow.com/q/29450839
upvote count: 0
score: -5
answer count: 1
tagged with: meteor
favorite count: 0
has title: How do i build a real time app with Meteorjs?
has body: How do I build an app like this: https://jsfiddle.net/ZwartyZ/83tLc8md/ Look into the jsfiddle. with Meteor JS?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29451959
type: Question
accepted answer: http://stackoverflow.com/a/29451959
downvote count: 5
tagged with: javascript

http://stackoverflow.com/comment/47077532
has text: There should be some more constraints (at least one more like the distance from P1P2) because the conditions you've mentioned works for any point lying on a line perpendicular to P1P2 and going through P2.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29456466
score: 0

http://stackoverflow.com/comment/47121649
score: 0
comment on: http://stackoverflow.com/q/29480427
type: Comment
type: QuestionComment
has text: nvm I see the note about invoking it like you are. my only other guess is you aren't setting "Content-Type: application/json" header in php?

http://stackoverflow.com/q/29452791
has title: Is there a way to detect the ios < > form navigation buttons using jquery and trigger actions?
type: Question
has answer: http://stackoverflow.com/a/29452846
tagged with: ios
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29452846
tagged with: twitter-bootstrap
has body: I am trying to create a form that when the next and previous (&lt; >) form navigation buttons are pressed, they are detected and can trigger various actions, for example trigger a bootstrap modal and focus on the first input element, or open a collapsible element without the virtual keyboard closing so that the form navigation seems to flow naturally. Is there any way to detect this? I've been searching for a couple of hours with no luck whatsoever...
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/111846954
comment on: http://stackoverflow.com/a/45537392
type: Comment
has text: That ternary looks quite verbose to me. If you need a string representation of a boolean you can do `\`${true}\` // "true"`
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46960208
comment on: http://stackoverflow.com/q/29391481
type: Comment
has text: Oh. 10 works ok for me :-)
score: 0
type: QuestionComment

http://stackoverflow.com/q/29410570
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29410790
answer count: 2
has body: 1 2 1 2 .item[rel='a'] { width:50px; height:50px; background: pink; } .item[rel='b'] { width:50px; height:50px; background: orange; margin-left:20px; } .receive { margin-top:20px; border:1px solid; width:50px; height:50px; } How can I make the receiver to receive the color of the items? I can do bg = $('.item').css('background'); $('.receive').css('background',bg); but I want it to be able to match using the 'rel' attribute, I have multiple receiver. Should I loop?
downvote count: 0
possible better answer: http://stackoverflow.com/a/29410790
favorite count: 0
has answer: http://stackoverflow.com/a/29410794
has comment: http://stackoverflow.com/comment/46994423
type: AnsweredQuestion
score: 1
tagged with: loops
upvote count: 1
type: Question
has title: match multiple items with attribute within a loop
has comment: http://stackoverflow.com/comment/46994444
accepted answer: http://stackoverflow.com/a/29410794

http://stackoverflow.com/a/29528425
has body: If you have a DATE and a TIME value, and you know the geographic timezone used when you recorded these dates and times, you can use CONVERT_TZ() to retrieve the UTC times from the local time data. First you use ADDTIME() to combine your DATE and TIME data into a DATETIME value. This gets you 07:00 on May 5. ADDTIME(DATE('2015-05-01'), TIME('07:00:00')) Then you convert that from your local geographic time to UTC. CONVERT_TZ( ADDTIME(DATE('2015-05-01'), TIME('07:00:00')), 'America/New_York', 'UTC') Try this MySQL statement, and you'll see that America/New_York conversion handles the daylight savings time correctly. select CONVERT_TZ( ADDTIME(DATE('2015-05-01'), TIME('07:00:00')), 'America/New_York', 'UTC'), CONVERT_TZ( ADDTIME(DATE('2015-01-01'), TIME('07:00:00')), 'America/New_York', 'UTC') This works for all sorts of time zones. See, for example, here, for a list. If you're doing a database design from scratch, it's smart to record all times in the same time zone. In fact, set up your servers to run in UTC, not local time. The easy way to do this is to use MySQL's TIMESTAMP data type: it always records times internally in UTC. It converts from local time when recording, and back to local time when retrieving. It uses the connection's time zone setting to do this. Edit Suppose you have an event table with user_id, evdate, evtime, and description columns. Suppose also you have a user table with user_id and user_tz columns. Then you can find the events between two dates, utc, with a query like this. SELECT u.user_name, e.description, CONVERT_TZ( ADDTIME(e.evdate, e.evtime), u.user_tz, 'UTC') start FROM event.e JOIN user.u ON e.user_id = u.user_id WHERE CONVERT_TZ( ADDTIME(e.evdate, e.evtime), u.user_tz, 'UTC') &gt;= '2015-03-01 00:00:00' This assume that each user has an assigned time zone, and that all the dates and times for the user are stored in that user's assigned time zone.
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/29528284
answers question: http://stackoverflow.com/q/29528284
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47211809
type: Answer

http://stackoverflow.com/a/39872208
type: AcceptedAnswer
downvote count: 0
has body: I had the same problem and I solve it this way (found the solution here: https://datatables.net/forums/discussion/27035/how-to-disable-sorting-click-event-on-table-header-children): If you supose the checkbox has the ID #chkbx, this code should work: $('#chkbx').click(function(event){ //Your code here event.stopPropagation(); }); With the event.stopPropagation() prevent the sorting of the column.
type: Answer
score: 6
upvote count: 6
accepted answer of: http://stackoverflow.com/q/29463645
answers question: http://stackoverflow.com/q/29463645

http://stackoverflow.com/comment/47142392
type: Comment
type: QuestionComment
has text: Trying to figure this out for you, but we're going to need a semi-working demo. Can you please code something up in JSBin.com or JSFiddle.net for us to look at?
comment on: http://stackoverflow.com/q/29489188
score: 0

http://stackoverflow.com/comment/73005943
score: 2
type: Comment
comment on: http://stackoverflow.com/a/29463039
has text: Just FYI, ES6 allows using `\u{...}`, so `'\u{1D120}'` or `String.fromCodePoint(...codepoints)` (added in ES6 too) will do the same as the given function. And codepoints between `0xD800` and `0xDFFF` are reserved by UTF-16 in Unicode (though ECMAScript 6 doesn't throw any exceptions for that).
type: AnswerComment

http://stackoverflow.com/comment/47015872
has text: _e_ is the name I gave to the first argument of my event handler function - in JS this is always the event itself. The event has all sorts of properties (mouse position, event type, target etc) - and you can read about it here: https://developer.mozilla.org/en/docs/Web/API/Event.Since I used a form in my example, the default action on the "click" submit event is to submit the form to the URL specified in the form.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29419738
type: Comment

http://stackoverflow.com/q/29506603
possible better answer: http://stackoverflow.com/a/29506639
tagged with: loops
type: Question
tagged with: conditional-statements
has answer: http://stackoverflow.com/a/29507143
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/29506664
upvote count: 4
has body: I know I can do an IF ELSE, but I need to know if it is possible to set conditional loop, like so: for ( i=0; i&lt;la; dr?(i++):(i--) ) {} or for ( if (dr) { i=0; i&lt;length; i++ } else { i=length-1; i--} ) {}
downvote count: 0
has title: Javascript: conditional increment or decrement inside for loop properties
favorite count: 0
accepted answer: http://stackoverflow.com/a/29507143
has answer: http://stackoverflow.com/a/29506982
has answer: http://stackoverflow.com/a/29506639
has comment: http://stackoverflow.com/comment/47169985
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/q/29379786
has title: Regex to allow number greater than 0.5
has answer: http://stackoverflow.com/a/29387038
tagged with: javascript
has answer: http://stackoverflow.com/a/29379888
score: 0
has body: Hi i'm working on some regex now and i want to add the conditional to allow only numbers greater than 0.5 here is my regex ^(?![.0]*$)[0-9]+(?:\.[1-9]{1,2})?$ i just want to values between 0 and 0.5 don't match this. Thanks
has comment: http://stackoverflow.com/comment/46941761
has answer: http://stackoverflow.com/a/29379823
favorite count: 0
has comment: http://stackoverflow.com/comment/46939432
has answer: http://stackoverflow.com/a/29379903
has comment: http://stackoverflow.com/comment/46939434
answer count: 5
type: UnansweredQuestion
tagged with: regex
has answer: http://stackoverflow.com/a/29381554
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/comment/121092714
score: 2
has text: Those 1000 requests comes through a single ethernet/wifi card. The hardware itself can only process bytestreams. There is no such thing as 1000 parallel network requests unless you have multiple ethernet cards trunked on your machine connected to multiple modems to your ISP (usually this means multiple internet accounts). What actually exists in the real world is 1000 network request **taking turns** sending bits down a single connection - do this fast enough and you have the illusion of 1000 parallel requests..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29404784

http://stackoverflow.com/q/29416795
score: 0
answer count: 1
type: UnansweredQuestion
has title: Retrieving strings from an array in Meteor
has body: I am using meteor and ajduke:bootstrap-tagsinputfor my tagging system. ajduke:bootstrap-tagsinput example page I am inserting the tags as arrays using True Multiple Value from the above link. My tags are inserted into the collection as following Posts tags (array) 0: sometag (string) 1: sometag (string) 2: sometag (string) //and so forth I need to find a way to retrieve each strings to the following format so that I can re-input these values to the tags input. I need to do this because I want my users to be able to edit their tags when they edit their posts. ["sometag", "sometag", "sometag", and so forth]
tagged with: mongodb
has answer: http://stackoverflow.com/a/29440454
tagged with: arrays
tagged with: javascript
tagged with: jquery
type: Question
tagged with: meteor

http://stackoverflow.com/q/29455865
has comment: http://stackoverflow.com/comment/47076647
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47076659
tagged with: javascript
has comment: http://stackoverflow.com/comment/47076628
tagged with: express
upvote count: 3
has answer: http://stackoverflow.com/a/29455974
has comment: http://stackoverflow.com/comment/47076693
has body: I am new to node.js (and mysql in combination with that) and trying to update my database based on request parameter and a request body. My beginning of the file looks like this: var express = require('express'); var bodyParser = require('body-parser'); var mysql = require('mysql'); var connection = mysql.createConnection({ host: 'localhost', user: 'root', password: 'root', database: 'm3ttulat0r', debug: true }); var app = express(); app.use(bodyParser.json()); My request looks like this: http://localhost:8080/mettmeister/1 The request body looks like this: { "mettmeister": "Jonas" } The connection to the database is successful. Then I have the following code: app.post('/mettmeister/:mettwochId', function(req, res) { var mettmeister = req.body.mettmeister; var mettwochId = req.params.mettwochId; var query = 'UPDATE mettwoch SET mettmeister = "'+ mettmeister +'" WHERE mettwoch_id = "'+ mettwochId +'"'; console.log(mettmeister, mettwochId); connection.query(query, function(err, result) { if (!err) { res.status(201); } else { res.status(500); } }); }); console.log(mettmeister, mettwochId); returns Jonas 1 which is fine. The problem is that it sends the request and the server gets the message according to the log but nothing happens. The server "stops" at executing the query apparently. I have debugging turned on and the query looks fine. --&gt; ComQueryPacket { command: 3, sql: 'UPDATE mettwoch SET mettmeister = "Jonas" WHERE mettwoch_id = "1"' } If I execute the query manually in my database, it works.. I am really happy for any help. Thank you! :)
has comment: http://stackoverflow.com/comment/47076670
has comment: http://stackoverflow.com/comment/78075568
has comment: http://stackoverflow.com/comment/47076463
favorite count: 0
has comment: http://stackoverflow.com/comment/47076495
has comment: http://stackoverflow.com/comment/47076520
has comment: http://stackoverflow.com/comment/47076699
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47076539
has comment: http://stackoverflow.com/comment/47076405
has answer: http://stackoverflow.com/a/29456102
tagged with: node.js
score: 3
has comment: http://stackoverflow.com/comment/47076404
has comment: http://stackoverflow.com/comment/47076524
has comment: http://stackoverflow.com/comment/47076386
has comment: http://stackoverflow.com/comment/47076667
tagged with: mysql
has comment: http://stackoverflow.com/comment/47076452
has comment: http://stackoverflow.com/comment/47076439
has title: Executing UPDATE query in node.js mysql not working
type: Question

http://stackoverflow.com/comment/47107863
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29472034
has text: Tony H - The addresses are coming from the same form. There is two different address fields, address1 and address2. I need to create dynamically dropdown where is only those two addresses so that address two is as a default one.

http://stackoverflow.com/a/29463105
has body: Hm, typo I guess: 'ary' hasn't been stored. You stored "testObject". var retrievedObject = localStorage.getItem('testObject'); should do the trick.
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29463053
downvote count: 0

http://stackoverflow.com/comment/47095716
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29466593
has text: @pankajparkar an expression being parsed. Raw `src` attribute cannot have a valid value with extra quotes
type: AnswerComment

http://stackoverflow.com/comment/47102699
has text: i tried this also but it gets same impact and in alert there is still \n instead of getting new line
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29470511
type: AnswerComment

http://stackoverflow.com/a/29404511
score: 2
downvote count: 0
type: Answer
upvote count: 2
has body: how did you try eval()? eval("var a = " + incoming_string); var fixed = JSON.stringify(a); a is the object, I don't think you need that fixed string. Of course, eval an unknown string is not safe.
answers question: http://stackoverflow.com/q/29404397

http://stackoverflow.com/a/29399130
answers question: http://stackoverflow.com/q/29398826
has body: You can get the result from the result1 variable. In order to get the first meetingName returned you can do results1[0].meetingName Although it's best to check if the array returned has any elements so this will work better var endOutput2 = null; if (results1.length) endOutput2 = results1[0].meetingName
has comment: http://stackoverflow.com/comment/46974528
has comment: http://stackoverflow.com/comment/46975182
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46979543
type: Answer
has comment: http://stackoverflow.com/comment/46974210
has comment: http://stackoverflow.com/comment/46974268
upvote count: 1
has comment: http://stackoverflow.com/comment/46974949
score: 1
accepted answer of: http://stackoverflow.com/q/29398826

http://stackoverflow.com/comment/47152537
has text: Looking at your example I can't find a single place where you embedded the solution I posted. There is still a lot of jQuery stuff around doing `attr()` and `toggleClass()` which will not work for the reasons stated in my answer. Try to incorporate the proposed changes. Providing a stripped down fiddle might also be valuable in finding a solution to your problem.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29495933

http://stackoverflow.com/comment/47031349
has text: Do you get any errors? Does your AjaxFactory return the right data?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29430884
score: 0

http://stackoverflow.com/a/29464160
answers question: http://stackoverflow.com/q/29464135
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
has body: No. innerHTML is a string, not a function. You cannot invoke strings with round parentheses as you can invoke functions. There is no array involved in document.getElementById('kirk').innerHTML.substr(6, 3) or document.getElementById('kirk').innerHTML.substring(6, 9), and those are the most efficient way to code what you tried to do in your OP.
has comment: http://stackoverflow.com/comment/47091493
accepted answer of: http://stackoverflow.com/q/29464135
score: 1
has comment: http://stackoverflow.com/comment/47091445

http://stackoverflow.com/q/29457227
linked to: http://stackoverflow.com/q/15268661
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/29457313
favorite count: 0
duplicate of: http://stackoverflow.com/q/203198
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47078780
accepted answer: http://stackoverflow.com/a/29457313
upvote count: 1
has body: An external script that I use, generates divs of a certain class from time to time, it can happen unlimited amount of times. I'm trying to run a function each time such element is being created. I tried using $('selector').live(function(){}) and $('selector').waitUntilExists(function(){}) but it's only valid for the first time it's created. how can I create some kind of a listener that will call a function each time a new element of this class is being created? Thanks
type: AnsweredQuestion
has title: javascript event for each time element exists

http://stackoverflow.com/q/29448794
has title: Sharing Data between pages in AngularJS returning empty
has answer: http://stackoverflow.com/a/29481213
accepted answer: http://stackoverflow.com/a/29481213
has answer: http://stackoverflow.com/a/29451389
favorite count: 0
upvote count: 5
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47064075
tagged with: angular-services
has body: Typically i write SPA's and sharing data between controllers is simple with a service. I am not using an SPA format (not using ng-view), and trying to share data between pages but on load of the second page (to get data) its empty. PAGE1 (index.html): Share PAGE2: {{ sharedData }} JS: app.controller('CreateList', function($scope, $location, $http, serviceShareData) { $scope.share= function (selectedValue) { if (selectedValue === undefined ) { console.log ("its undefined"); } else { console.log (selectedValue); serviceShareData.addData(selectedValue); window.location.href = "PAGE2.html"; } } }); app.controller('GeList', function($scope, $location, $http, serviceShareData) { $scope.sharedData = serviceShareData.getData(); console.log($scope.sharedData); }); app.service('serviceShareData', function() { var myData = []; var addData = function(newObj) { myData.push(newObj); } var getData = function(){ return myData; } return { addData: addData, getData: getData }; }); Here's a plunkr: http://plnkr.co/edit/6VHJhirnHZxBpKOvqzI6?p=preview
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/29451389
tagged with: angularjs-scope
type: Question
has comment: http://stackoverflow.com/comment/47064061
answer count: 2
score: 5
tagged with: javascript

http://stackoverflow.com/a/29484000
upvote count: 1
answers question: http://stackoverflow.com/q/29483343
accepted answer of: http://stackoverflow.com/q/29483343
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has body: You can use the jQuery :contains selector. And since 0 is a falsy value, you can directly compare. if ($("a:contains('Accounts')").length) { $("#accounts").hide(); } else { $("#accounts").show(); }

http://stackoverflow.com/comment/98963907
has text: @VigneshManogar Thank you for pointing out the mistake, it's now fixed. Changes to code are best suggested with a comment first, as you did here.
comment on: http://stackoverflow.com/a/29437339
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/134834426
comment on: http://stackoverflow.com/a/71586074
score: 0
has text: Works like magic!
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29446140
tagged with: angularjs
type: Question
score: 0
has answer: http://stackoverflow.com/a/29446307
answer count: 1
has comment: http://stackoverflow.com/comment/47071315
tagged with: javascript
tagged with: ckeditor
accepted answer: http://stackoverflow.com/a/29446307
type: AnsweredQuestion
tagged with: jquery
has title: html tags are not applying in angularjs ckeditor instead of it is showing html element tag code in ediator
has body: //My controller code //I am getting values from database into angular js ckeditor but html tags are not applying in editor instead of it is showing html element tag code in ediator myApp.directive('ckEditor', [function () { return { require: '?ngModel', link: function ($scope, elm, attr, ngModel) { var ck = CKEDITOR.replace(elm[0]); ck.on('pasteState', function () { $scope.$apply(function () { ngModel.$setViewValue(ck.getData()); }); }); ngModel.$render = function () { ck.setData(ngModel.$modelValue); }; } }; }]) myApp.controller('editcontentcontroller', function ($scope, $http) { $scope.ckEditors; $http({ method: 'POST', url: 'pageedit.php' }).success(function (data) { // response data $scope.id = data[0]['id']; $scope.page = data[0]['page']; $scope.ckEditors = data[0]['pagecontent']; }). error(function (data) { console.log(data); }); });

http://stackoverflow.com/comment/46968879
type: Comment
has text: Ok, if you would be that pedant please consider another example such as `var numberType = (number % 2 == 0) ? "even" : "odd" ;`.
type: AnswerComment
comment on: http://stackoverflow.com/a/29396264
score: 0

http://stackoverflow.com/comment/46935425
type: Comment
has text: I have put a GIF and also jqgrid config in pastebin. So issue is when ever you select a subgrid Row the page looses focus from the grid and jumps up to the chart generated. So a user have to go back down again to select more subgrid Rows.
comment on: http://stackoverflow.com/a/29375090
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46950104
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29385779
has text: You need to define the function before you assign it to onClick. See here, I have updated your fiddle. https://jsfiddle.net/e1qnsxkb/11/

http://stackoverflow.com/comment/47213708
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29530000
has text: You need to write some code to achieve it. It is not right out of the box in JavaScript

cycle
tags question: http://stackoverflow.com/q/29522245
type: Tag
tag name: cycle

http://stackoverflow.com/q/29406040
tagged with: javascript
has body: When I use the code below, I am getting the following error: Provider 'Login' must return a value from $get factory method. I've reviewed the stackoverflow posts here and here, but can't figure out what I'm doing wrong. myApp.factory('Login', function($location, $firebaseAuth, Ref, Auth) { var authData = Ref.getAuth(); if (authData) {console.log('already logged in with ' + authData.uid)} else { return Auth.$authAnonymously({rememberMe: true}).then(redirect, showError); function redirect() { $location.path('/account'); } function showError(err) { Login.err = err; } } });
score: 0
accepted answer: http://stackoverflow.com/a/29406077
linked to: http://stackoverflow.com/q/27738903
tagged with: angularjs
linked to: http://stackoverflow.com/q/2846283
has answer: http://stackoverflow.com/a/29406109
has title: Fixing AngularJS error: Provider must return value from $get factory method
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29406109
has answer: http://stackoverflow.com/a/29406077
type: Question
answer count: 2

http://stackoverflow.com/q/29378548
tagged with: arrays
has body: I have a web page which uses jQuery to fetch data from a JSON file that contains a location name, latitude, and longitude. I then push the retrieved data into an array. var weatherSites = []; function weather() { $.getJSON('json/LOCS.json', function(data) { $.each(data.locations, function() { var locationLatitude = this.latitude; var locationLongitude = this.longitude; var locationName = this.location; // -- If the latitude and longitude are 0,0 then skip to the next iteration -- if (locationtLatitude == +0 || locationLatitude == -0 &amp;&amp; locationLongitude == +0 || locationLongitude == -0) { return true; } // Populate array with site name, latitude, and longitude weatherSites.push({name: locationName, latitude: locationLatitude, longitude: locationLongitude}); }); }); }; The code retrieves the data and populates the array as required. However, there are a number of locationName items which are the same, even though the locationLatitude and/or locationLongitude are different. I need to remove from the array elements where the locationNames are the same, regardless of the latitude or longitude. I have tried using a number of methods seen here but have had no luck. For example: function removeDupes() { var uniques = _.map(_.groupBy(weatherSites,function(doc){ return doc.id; }),function(grouped){ return grouped[0]; }); This example requires underscore.js. This did not work for me. I am new to programming and GIS in general. I would appreciate an answer which contains the full code necessary and hopefully the logic behind what is happening. This would be very helpful for me and will of course help me to learn. Thank you for your help.
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: multidimensional-array
answer count: 1
has title: Remove Duplicate Items From Multidimensional Array Using Javascript, jQuery, & underscore.js
favorite count: 0
linked to: http://stackoverflow.com/q/9229645
upvote count: 2
has comment: http://stackoverflow.com/comment/46937586
has answer: http://stackoverflow.com/a/29378764
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/29378764
tagged with: underscore.js
type: Question

http://stackoverflow.com/a/29376407
has comment: http://stackoverflow.com/comment/46933800
has comment: http://stackoverflow.com/comment/46933775
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46933470
has comment: http://stackoverflow.com/comment/46933600
type: Answer
has comment: http://stackoverflow.com/comment/46933899
accepted answer of: http://stackoverflow.com/q/29375228
has comment: http://stackoverflow.com/comment/46933708
upvote count: 2
answers question: http://stackoverflow.com/q/29375228
has body: I've tested your code in a fiddle, and it works by it self. But when I add some code from your unminified js file, it halts all execution. So, while I can't point to every possible error in that huge production.min.js file, I know there are errors and they are stopping the code from progressing. This is a few lines, that was easy to find, that syntax error (might be encoding issue, but there are errors reported regardless): // JQuery Twitter Feed. Coded by... $(document).ready(function () { Â Â Â Â Â var displaylimit = 3; Â Â Â Â var twitterprofile = "vlrprbttst"; Â Â Â Â var screenname = "v ... I'm sure there are others. That file doesn't look very stable edit: Apparently the error was due to.. $(window).resize(function() { navHeight(); })(); Should be: $(window).resize(function() { navHeight(); }); Full credits to @Grundy for finding and correcting the error.
has comment: http://stackoverflow.com/comment/46933750

http://stackoverflow.com/a/29433167
score: 0
type: Answer
has body: I found the answer to my own problem. I altered the Redirect URI in the Google Developers Console. so that is the following: Redirect URIs http://localhost:9000/auth/google/callback
answers question: http://stackoverflow.com/q/29417876

http://stackoverflow.com/comment/119602151
has text: This here is trill. Very legit. Works with ts-node as well.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/57318673
type: AnswerComment

http://stackoverflow.com/q/29400235
upvote count: 1
tagged with: regex
has answer: http://stackoverflow.com/a/29400318
type: AnsweredQuestion
score: 1
has body: Replace specific character only when within a boundary. For example replace html entity only when enclosed inside single quotes. Input: Hello 'How are you' Output: Hello 'How are you'
type: Question
answer count: 2
has title: Replace specific character only when within a boundary
accepted answer: http://stackoverflow.com/a/29400318
tagged with: javascript
linked to: http://stackoverflow.com/q/1732348
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/29400403
has answer: http://stackoverflow.com/a/29400403

http://stackoverflow.com/q/29376702
favorite count: 0
has comment: http://stackoverflow.com/comment/46933893
has comment: http://stackoverflow.com/comment/46934179
tagged with: tail-recursion
has title: Tail function in javascript
duplicate of: http://stackoverflow.com/q/5832891
has comment: http://stackoverflow.com/comment/46934065
has comment: http://stackoverflow.com/comment/46933938
has comment: http://stackoverflow.com/comment/46934345
tagged with: recursion
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46934454
has answer: http://stackoverflow.com/a/29376983
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46933980
type: Question
has body: I want to make a function which adds arguments. Invoking this function should be functionAdd(2)(3)(4)...(n); And the result 2+3+4...+n I'm trying this function myfunction(num){ var summ =+ num; if(num !== undefined){ return myfunction(summ); } }; But it doesn't works, an error of ovwerflow. And I don't understand where I should out from this function;
has comment: http://stackoverflow.com/comment/46933954
tagged with: javascript
has comment: http://stackoverflow.com/comment/46933898
accepted answer: http://stackoverflow.com/a/29376983
score: 0
has comment: http://stackoverflow.com/comment/46934153
answer count: 2
possible better answer: http://stackoverflow.com/a/29377043
linked to: http://stackoverflow.com/q/33923
has answer: http://stackoverflow.com/a/29377043
linked to: http://stackoverflow.com/q/5832891

http://stackoverflow.com/q/29454436
tagged with: http://stackoverflow.com/tag/html
has title: How can I pause a web page?
possible better answer: http://stackoverflow.com/a/71586074
type: AnsweredQuestion
score: 15
has answer: http://stackoverflow.com/a/71586074
accepted answer: http://stackoverflow.com/a/29454441
type: Question
upvote count: 15
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29454441
has body: I would like to inspect a web page which has a lot of DOM animation on it. Is there a Chrome plugin or any way to pause the webpage? For example a Chrome button to pause the Javascript would do the trick.

http://stackoverflow.com/comment/47168023
type: Comment
has text: So basically something like this: <?php echo ' '; ?>. Is that right? @www139
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29505266

http://stackoverflow.com/comment/49658058
has text: Hi Jesup, I did. There is something about reversing SSL roles. See here: https://code.google.com/p/webrtc/issues/detail?id=4525&q=fabian&sort=id&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20Area%20Status%20Owner%20Summary
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29530757

http://stackoverflow.com/a/29415694
has comment: http://stackoverflow.com/comment/47004202
has body: You could do: $(document).bind("click touchstart", function(event) { var $openBox = $(event.target).closest('.open'); $('.info-box__content').not($openBox).slideUp(function(){ $(this).parents('.info-box').removeClass('open'); }); }); This will select all boxes other than the one related to the click event. Bonus explanation The reason your current solution doesn't work is that your just checking to see if the open box exists, since it does, it then closes all elements with the class `.info-box__content'. Hope that makes sense!
score: 0
answers question: http://stackoverflow.com/q/29415598
type: Answer

http://stackoverflow.com/comment/46983878
comment on: http://stackoverflow.com/q/29404282
has text: I have written more information.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47004255
type: QuestionComment
has text: I want to change the tint of the image when the image is hovered. Also, I'm importing the image URL from an `.xml` file so I can't hardcode the url into the css.
comment on: http://stackoverflow.com/q/29415950
score: 0
type: Comment

http://stackoverflow.com/comment/46933537
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29375938
score: 0
has text: Nope, still doesn't work. I created the "fresh" page only with one cookie and when I create it in dev tools it says Duration:Sesion, and after I close tab and open the page in new there's still that cookie. Here's the code http://pastie.org/10065425

http://stackoverflow.com/a/29415800
upvote count: 1
has comment: http://stackoverflow.com/comment/47003914
has comment: http://stackoverflow.com/comment/47005770
answers question: http://stackoverflow.com/q/29415598
has comment: http://stackoverflow.com/comment/47004033
has comment: http://stackoverflow.com/comment/47004932
type: Answer
has comment: http://stackoverflow.com/comment/47005179
has comment: http://stackoverflow.com/comment/47004729
has body: Here is a solution. $('.info-box__title').click(function() { var sibling = $(this).siblings('.info-box__content'); if(!sibling.is(':visible')){ $('.info-box__content:visible').slideUp(); sibling.slideDown(); } else sibling.slideUp(); }); $(document).bind("click touchstart", function(e) { var open_content = $(".info-box__content:visible"); if (!open_content.parent().is(e.target) && open_content.parent().has(e.target).length === 0) { open_content.slideUp(); } }); .info-box__title{background:grey;} .info-box__content{ height:100px; display:none; background:red; } Title content Title content Title content
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47003829
has comment: http://stackoverflow.com/comment/47005467
has comment: http://stackoverflow.com/comment/47004487

http://stackoverflow.com/a/29374118
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46929383
answers question: http://stackoverflow.com/q/29373975
has comment: http://stackoverflow.com/comment/46928944
has comment: http://stackoverflow.com/comment/46928967
type: Answer
has body: Try splicing the array based on the index in the array ($index), like this: {{T.name}}
accepted answer of: http://stackoverflow.com/q/29373975
upvote count: 1
has comment: http://stackoverflow.com/comment/46928915
has comment: http://stackoverflow.com/comment/46928828
has comment: http://stackoverflow.com/comment/46929066

http://stackoverflow.com/comment/46933328
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29376140
has text: Why would i need to post anything about html? my question didn't even concern html, @dai
type: Comment

http://stackoverflow.com/q/29511971
type: Question
has comment: http://stackoverflow.com/comment/47179859
tagged with: javascript
has body: I am using bootstrap collapse that will show when click on the related button. the problem is this collapse does not work mutually. I want that only one collapse will be shown at a time and hide all others. although the Accordion example is available it will not work on buttons. I am a newbie in bootstrap maybe I am doing in the wrong way. this is my jsfiddle Button with data-target 2nd div how I show collapse only one at a time.
answer count: 1
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29512287
type: UnansweredQuestion
has title: bootstrap collapse visible only one at a time
upvote count: 1
has comment: http://stackoverflow.com/comment/47180171

http://stackoverflow.com/comment/47004739
comment on: http://stackoverflow.com/q/29400106
score: 0
type: Comment
has text: [yes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators#Logical_NOT_.28.21.29)
type: QuestionComment

http://stackoverflow.com/comment/47203841
has text: @Igor that condition allows the letters to disappear after being displayed
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29418300

http://stackoverflow.com/a/29412360
upvote count: 2
score: 1
downvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29412103
has body: You can use JQuery toggle - JQuery toggle JSFiddle example: A working toggle exaple JS $('nav.primary').prepend(' Menu '); $('nav.primary #menu-button').on('click', function(){ var menuItems = $(".menu-header-container"); menuItems.toggle(); }); CSS .menu-header-container { display:none; }
has comment: http://stackoverflow.com/comment/46997582
answers question: http://stackoverflow.com/q/29412103

http://stackoverflow.com/q/29384885
has answer: http://stackoverflow.com/a/29385023
tagged with: angularjs
has title: AngularJS State routing
has comment: http://stackoverflow.com/comment/46950128
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46948386
has comment: http://stackoverflow.com/comment/46948362
has comment: http://stackoverflow.com/comment/46948345
type: Question
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46952466
has body: I have three states - app, app.devices, app.devices.device. App and app.devices states are working, but app.devices.device isn't. Code: http://pastebin.com/r1kYuExp http://pastebin.com/uEcV7Chv

http://stackoverflow.com/a/29489827
answers question: http://stackoverflow.com/q/29483741
score: 1
downvote count: 3
has body: Take a look at spread properties: You could use them like this for example: var extras = { }; if (this.state.liveUrl) { extras.href = this.state.liveUrl; } return <a {...extras} >My link; The values are merged with directly set properties. If they're not on the object, they're excluded.
has comment: http://stackoverflow.com/comment/63157044
has comment: http://stackoverflow.com/comment/63146569
type: Answer
upvote count: 4

http://stackoverflow.com/comment/46975960
comment on: http://stackoverflow.com/q/29399636
score: 0
has text: @prodigitalson I've tried doing the json_decode both ways with and without the true and the ->. I've looked that up and both ways didn't work.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29498578
type: Answer
has body: You can pass a selector to the parent method, something like this: $("td[data-uid='" + uid + "']").parent("tr").prev().fadeOut('slow');
answers question: http://stackoverflow.com/q/29498490
upvote count: 1
downvote count: 0
score: 1

http://stackoverflow.com/comment/47180717
score: 1
comment on: http://stackoverflow.com/q/29512519
type: Comment
type: QuestionComment
has text: `console.log` is shown in the console of the browsers developer tools. If not there might be a filter set, which logs are shown.

http://stackoverflow.com/q/29408140
tagged with: firefox
has body: I am building a small add-on that interacts with the youtube website. For injecting a custom script inside the page I use the convenient page-mod like so : var pageMod = require("sdk/page-mod"); pageMod.PageMod({ include: "*", contentScript: "window.alert('injected');", contentScriptWhen : 'start', attachTo: ["existing", "top"], onAttach: function(worker) { console.log(worker.tab.url); } }); When I navigate through pages, the 'injected' message shows up each time a new page is loaded. But when it comes to youtube I got no result. My visited urls are in order : https://www.google.com -> injected https://www.google.com/?q=youtube -> injected https://www.youtube.com -> injected https://www.youtube.com/watch?v=lnUeovQ68Tw -> nothing https://www.youtube.com/results?search_query=dark+side+of+the+moon -> nothing and now on I never get an injected message if I stay on Youtube... I noticed that when changing from video to video the url change but the webpage doesn't seem to reload... I was able to get the injected message on a youtube video when I manually reload it (cmd+r or f5). As I searched I found this article on page-mod's attachTo which could have been a solution, but event with the attachTo: ["existing", "top"] line, the result was the same... Do you have any idea ? Thanks
possible better answer: http://stackoverflow.com/a/29471132
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29471132
accepted answer: http://stackoverflow.com/a/29474670
tagged with: firefox-addon-sdk
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/29474670
type: AnsweredQuestion
score: 2
type: Question
answer count: 2
has title: Firefox Addon Pagemod not executed for youtube

http://stackoverflow.com/q/29447856
score: 0
has answer: http://stackoverflow.com/a/29447946
answer count: 1
has body: I'm trying to make a standard hamburger icon on a phone show a menu when clicked and make the menu disappear when clicked again. What I have does make the menu appear but not disappear when clicked again. This code doesn't seem to be doing it: Javascript/Jquery: HTML/PHP <?php phoneMenu(); ?>
has title: Making a menu appear and disappear by clicking the same icon
has comment: http://stackoverflow.com/comment/47062202
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29447946
type: Question
has comment: http://stackoverflow.com/comment/47062344
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46984144
type: Comment
has text: Remove the invoking parenthesis -- `$("#Division").on('click', onChangeFilter);`. This will pass the function itself as a reference to be invoked later by the event.
type: QuestionComment
score: 8
comment on: http://stackoverflow.com/q/29404568

http://stackoverflow.com/comment/47021382
score: 0
has text: @Daedalus the url im using is my rest service i own. This rest service is a database interaction rest service. Thus I'm writing a java script library to do dynamic put get delete post statements to the rest server that will add, retrieve and update the database with no server code. if you look at the console output I listed its listed under Here is the breakdown for the_data.data: Object {data: null, setData: function} data: Array[62] setData: function (data){ this.data = data;} __proto__: Object Then if I do the_data.data.data because data is where my array of info works but returns null.
comment on: http://stackoverflow.com/q/29424348
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29502494
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47163442
has title: Jquery Modal form login with AJAX - ASP Classic on IE 9
accepted answer: http://stackoverflow.com/a/29521631
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29521631
type: Question
tagged with: asp-classic
has comment: http://stackoverflow.com/comment/47171203
has comment: http://stackoverflow.com/comment/47196565
tagged with: javascript
tagged with: jquery
has body: I am having quite a bit of trouble getting a particular login form to work with Jquery using classic asp on IE 9. On my index.asp page I have the following form: &lt;%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%&gt; &lt;!--#include file="Connections/LogisticsConnection.asp" --&gt; &lt;% Dim RS_User Dim RS_User_cmd Dim RS_User_numRows Set RS_User_cmd = Server.CreateObject ("ADODB.Command") RS_User_cmd.ActiveConnection = MM_LogisticsConnection_STRING RS_User_cmd.CommandText = "SELECT UserName, Password FROM Users" RS_User_cmd.Prepared = true Set RS_User = RS_User_cmd.Execute RS_User_numRows = 0 %&gt; &lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt; &lt;title&gt;Training Prioritization&lt;/title&gt; &lt;/head&gt; &lt;link rel="stylesheet" type="text/css" href="img/css/site.css"/&gt; &lt;link rel="stylesheet" type="text/css" href="img/scripts/jquery-ui-1.11.4/jquery-ui.css"/&gt; &lt;link rel="stylesheet" type="text/css" href="img/scripts/chosen/chosen.css"/&gt; &lt;script src="img/scripts/jquery-1.11.2.min.js"&gt;&lt;/script&gt; &lt;script src="img/scripts/jquery-ui-1.11.4/jquery-ui.js"&gt;&lt;/script&gt; &lt;script src="img/scripts/chosen/chosen.jquery.js"&gt;&lt;/script&gt; &lt;script src="img/scripts/siteScript.js"&gt;&lt;/script&gt; &lt;body&gt; &lt;div id="wrapper"&gt; &lt;div id="header"&gt; &lt;div id="logo"&gt;&lt;/div&gt; &lt;div id="title"&gt;Training Prioritization&lt;/div&gt; &lt;div id="login"&gt;&lt;img src="img/loginBtn.png" id="Login-Img"&gt;Login&lt;/img&gt;&lt;/div&gt; &lt;/div&gt;&lt;!--END HEADER--&gt; &lt;div id="menu"&gt; &lt;div id = "menuItems"&gt; &lt;img src="img/editBtn.png" id="Menu-edit"&gt;Edit&lt;/img&gt; &lt;img src="img/saveBtn.png" id="Menu-save"&gt;Save&lt;/img&gt; &lt;img src="img/cancelBtn.png" id="Menu-cancel"/&gt;Cancel&lt;/img&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="body"&gt; &lt;div id="formBody"&gt; &lt;table id="formTable"&gt; &lt;tbody&gt; &lt;tr id="Table-Heading-titleG…
tagged with: ajax

http://stackoverflow.com/a/29460824
has comment: http://stackoverflow.com/comment/47413893
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29460704
has comment: http://stackoverflow.com/comment/47126930
type: Answer
has body: Also, you should use $urlRouterProvider $urlRouterProvider.otherwise('/');
accepted answer of: http://stackoverflow.com/q/29460704
has comment: http://stackoverflow.com/comment/47114390

http://stackoverflow.com/comment/47220827
has text: It is not possible using client script the alternate way is via workflow provided that you are setting the field as mandatory/non mandatory on custom form/standard form.
comment on: http://stackoverflow.com/a/29528958
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47120275
comment on: http://stackoverflow.com/a/29479450
type: AnswerComment
score: 0
type: Comment
has text: You seem to have named your variable `request`, so you might try looking for `window.request` or just `request`. Of course the received you can read the response headers only after the asynchronous request has completed executing.

http://stackoverflow.com/comment/46930552
has text: @D4V1D I have read that post and it does not answer my question of using Ajax within an PHP page A to pass data to php Page B.
score: 0
comment on: http://stackoverflow.com/q/29374540
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29499280
upvote count: 2
accepted answer: http://stackoverflow.com/a/29500690
tagged with: sencha-cmd
has title: d3.js run as app with cordova
type: Question
type: AnsweredQuestion
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/29500690
downvote count: 0
has body: Anyone know the commands to make my d3.js directory a cordova project and then run it on a device? When using Sencha cmd I ran sencha cordova init com.mycompany.MyApp MyApp to create the project, then sencha app run native to run the app on my device. But what's the commands for d3.js? Thanks,
favorite count: 0
tagged with: d3.js
score: 2
tagged with: cordova

http://stackoverflow.com/q/29464688
accepted answer: http://stackoverflow.com/a/29464706
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47331482
answer count: 4
has title: JQuery .attr();
has comment: http://stackoverflow.com/comment/47093082
type: AnsweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/47092780
type: Question
has answer: http://stackoverflow.com/a/29464706
has comment: http://stackoverflow.com/comment/47092395
has answer: http://stackoverflow.com/a/29464703
tagged with: javascript
has answer: http://stackoverflow.com/a/29464729
has body: I have the following HTML for consideration... Here #1 Here #2 Here #3 Here #4 The problem is that I have an anchor tag that does not have an href in the first list item tag. I want to use JQuery to add the href to the tag. I tried doing it like this (it did not work): var fooBar; fooBar = $('li.bar').children().first(); fooBar.attr('a', 'href="#1"'); I thought maybe I needed to pass in the index, but I figured the .first() would grab the correct element. Either way my code fails to do what I want. I would greatly appreciate any direction and/or input.
has answer: http://stackoverflow.com/a/45876275
possible better answer: http://stackoverflow.com/a/29464703
downvote count: 4
upvote count: 0

http://stackoverflow.com/comment/47203886
score: 0
comment on: http://stackoverflow.com/q/29524773
type: Comment
type: QuestionComment
has text: What's ur current code?

http://stackoverflow.com/comment/47199834
type: Comment
type: QuestionComment
has text: Don't tell us what isn't wrong. Post all of the code or make a plunkr so you can get help.
score: 0
comment on: http://stackoverflow.com/q/29521844

http://stackoverflow.com/q/29407188
tagged with: locale
has comment: http://stackoverflow.com/comment/46990233
tagged with: javascript
score: 4
upvote count: 4
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/69390795
favorite count: 0
tagged with: pdf.js
has body: I'm using Mozilla's pdf.js plugin. I want to know how to localize the toolbar into my native language. Which function will help?
has comment: http://stackoverflow.com/comment/47077698
has title: How to localize pdf.js toolbar?
type: UnansweredQuestion
tagged with: localization
type: Question
has answer: http://stackoverflow.com/a/29456671

http://stackoverflow.com/q/29377485
has answer: http://stackoverflow.com/a/29377656
answer count: 2
has body: I have a set of divs in my HTML document and use jQuery to show them one by one after every 15000ms. I would also like to include some links inside some of the divs so I want to pause or delay the div on hover. Here is my script code. Can somebody show me how to pause on hover? &lt;script&gt; var ct = 0; function showElem2() { var length = $('.t1').length; $('.t1').hide(); $('.info span').text(ct); $('.t1').eq(ct).fadeIn(900); (ct &gt;= (length-1)) ? ct = 0: ct++; setTimeout(showElem2, 1600); } $(document).ready(function(){ showElem2(); }); &lt;/script&gt;
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29377656
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29377678
upvote count: 1
has answer: http://stackoverflow.com/a/29377678
type: Question
tagged with: javascript
tagged with: jquery
has title: how do I pause on hover on a div and continue on mouseout?

http://stackoverflow.com/comment/47265878
has text: Thanks but I'm getting this error XMLHttpRequest cannot load file:///C:/Users/Hillary/Desktop/Mums%20website/text.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource. do you know what the problem is?
type: Comment
comment on: http://stackoverflow.com/a/29503076
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47122788
type: Comment
comment on: http://stackoverflow.com/q/29481068
has text: "a bit more information to follow" 1. Check console and network tabs 2. Put the "same origin policy" into google
score: 0
type: QuestionComment

http://stackoverflow.com/a/29434181
has comment: http://stackoverflow.com/comment/47037992
has body: Surely if x was a string then Math.floor(x) === x should return a TypeError? Nope. Most mathematical functions and operations return NaN if one of the operand cannot be converted into number and then operated upon. So, it becomes Math.floor("asd") === "asd" is essentially NaN === "asd" // which is obviously false
type: Answer
accepted answer of: http://stackoverflow.com/q/29434133
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/29434133
has comment: http://stackoverflow.com/comment/47037947
has comment: http://stackoverflow.com/comment/47037748
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47037795

http://stackoverflow.com/comment/46934837
comment on: http://stackoverflow.com/q/29376858
type: QuestionComment
has text: i do not want the images to change when i rezise i want the mthe same as size all the time, and at the same position
score: 0
type: Comment

http://stackoverflow.com/q/29502965
has comment: http://stackoverflow.com/comment/47172572
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/47166044
has title: Knockout.JS labels not working inside foreach
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47166070
has body: I have used the HTML5 label 'for' attribute in the past, and it works well in that you can click it and it will change the focus to the relevant form item. However, in this case where the name of each item is partially determined by its index, the label does not seem to respond to clicks. HTML Name Company 1, click: $root.removePerson'>Delete Outputted Source Name As you can see, the 'for' and 'name' attributes match. But clicking on the label does nothing.
has answer: http://stackoverflow.com/a/29523762
upvote count: 1
tagged with: knockout.js
tagged with: laravel-blade
has comment: http://stackoverflow.com/comment/47166662
type: Question
has comment: http://stackoverflow.com/comment/47175106
score: 1
has comment: http://stackoverflow.com/comment/47166746
has comment: http://stackoverflow.com/comment/47166728
accepted answer: http://stackoverflow.com/a/29523762
has comment: http://stackoverflow.com/comment/47166827
answer count: 1
downvote count: 0

http://stackoverflow.com/a/29418492
score: -1
type: Answer
downvote count: 1
has body: We are working on a Cordova plugin for azure AD. We will release it soon, please keep an eye on blogs.technet.com/ad for announcements.
answers question: http://stackoverflow.com/q/29407948
upvote count: 0

http://stackoverflow.com/a/29539926
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: A possible soltion is the usage of pointer-events. The CSS property pointer-events allows authors to control under what circumstances (if any) a particular graphic element can become the target of mouse events. When this property is unspecified, the same characteristics of the visiblePainted value apply to SVG content. When you apply #selector { /* ... */ pointer-events: none; } All content of #selector and the element itself are no more interactive. Content may not be selected and events like :hover or click are not applicable. Here is the demo with the above css: http://jsfiddle.net/s94cnckm/6/
accepted answer of: http://stackoverflow.com/q/29518070
upvote count: 3
answers question: http://stackoverflow.com/q/29518070
has comment: http://stackoverflow.com/comment/47233347
score: 3

http://stackoverflow.com/a/30025814
type: Answer
answers question: http://stackoverflow.com/q/29453671
has body: Is there any place where we can check the js error? if you are building a Mediawiki skin using bootstrap then you can start from one of the existing ones. I developed the skin MediaWikiBoostrap (https://github.com/nasirkhan/mediawiki-bootstrap) i hope this will help you to solve the issue.
score: 0

http://stackoverflow.com/q/29471179
has title: calling controller function from javascript in ruby on rails using ajax call
tagged with: ruby-on-rails
answer count: 0
type: Question
tagged with: javascript
has body: i have function get_rule(rulename) in controller/team/index_controller.rb which is returnig a map and i have javascript from which i want to call this function . Right now i am doing an ajax call from this script jQuery.ajax({ url: "&lt;%= Rails.configuration.url_prefix %&gt;/team/index/get_rule_attribute_values", type: "POST", dataType : "json", success: function(){ console.log("success"); }, error: function(jqXHR, textStatus,errorThrown){ var requestResponse = { httpStatus: jqXHR.status, error:jqXHR.statusText, }; console.log("requestResponse"); // Notify the user so he might not wonder. alert('Something went wrong, Please try again'); // Report it back for fixing it // Only for debuggify users var ajaxErrors = debuggify.Logger.get('ajax_errors'); ajaxErrors.attach(requestResponse); ajaxErrors.error('Caught ajax error'); } }); my getrule func def getrule(rule_attribute_name) # rule_attr_value = RuleAttribute.get_rule_attributes rule_attribute_name # rule_attribute_values_hash = JSON.parse(rule_attr_value) # rule_attr_values = rule_attribute_values_hash["rule_attribute_values"] # rule_attribute_values = Hash.new # rule_attr_values.each do |value| # rule_attribute_values.store(value["internal_name"],value["display_name"]) # end respond_to do |format| format.json {render :json =&gt;{:error =&gt; false, :message =&gt; "test"}} return rule_attribute_values end please provide me some suggesstion or code so that i can make a call . i spent whole day on single but don't want to waste more time on this.And i want the map returning from controller function in a variable i.e. i want response of ajax into a variable
has comment: http://stackoverflow.com/comment/47104299
score: 0
has comment: http://stackoverflow.com/comment/47104488
has comment: http://stackoverflow.com/comment/47104686
tagged with: ajax
type: UnansweredQuestion

http://stackoverflow.com/comment/47114512
type: Comment
score: 0
type: QuestionComment
has text: @Brodie not entirely sure what you mean. There's a fiddle in the question, if you didn't see it! :)
comment on: http://stackoverflow.com/q/29476017

http://stackoverflow.com/q/29465688
has comment: http://stackoverflow.com/comment/47094623
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/47094602
has comment: http://stackoverflow.com/comment/47094243
has comment: http://stackoverflow.com/comment/47094330
type: Question
has answer: http://stackoverflow.com/a/29466273
has comment: http://stackoverflow.com/comment/47094682
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47094505
has title: Responsive Circle images?
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47094285
linked to: http://stackoverflow.com/q/19057513
score: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/47094161
linked to: http://stackoverflow.com/q/29506527
accepted answer: http://stackoverflow.com/a/29466273
tagged with: twitter-bootstrap
has body: I am trying to make an responsive web page. I have used this question and answer, to form mine icon circle for this project. But I would like to make it more responsive, because I need to wrap some jQuery toggle() inside. /* Position icons into sircle */ .circle-container { position: relative; width: 35em; height: 35em; padding: 2.8em; /*= 2em * 1.4 (2em = half the width of an img, 1.4 = sqrt(2))*/ border: none; border-radius: 50%; margin: 1.75em auto 0; } .circle-container a { display: block; overflow: hidden; position: absolute; top: 50%; left: 50%; width: 6em; height: 6em; margin: -2em; /* 2em = 4em/2 */ /* half the width */ } .circle-container img { display: block; width: 100%; } .deg0 { transform: translate(18em); } /* 12em= half the width of the wrapper */ .deg45 { transform: rotate(45deg) translate(18em) rotate(-45deg); } .deg135 { transform: rotate(135deg) translate(18em) rotate(-135deg); } .deg180 { transform: translate(-18em); } .deg225 { transform: rotate(225deg) translate(18em) rotate(-225deg); } .deg315 { transform: rotate(315deg) translate(18em) rotate(-315deg); } .circle-container a.deg45:hover, a.deg45:activate { img-size: 150%; } CSS for this div: /* Position icons into sircle */ .circle-container { position: relative; width: 35em; height: 35em; padding: 2.8em; /*= 2em * 1.4 (2em = half the width of an img, 1.4 = sqrt(2))*/ border: none; border-radius: 50%; margin: 1.75em auto 0; } .circle-container a { display: block; overflow: hidden; position: absolute; top: 50%; left: 50%; width: 6em; height: 6em; margin: -2em; /* 2em = 4em/2 */ /* half the width */ } .circle-container img { display: block; width: 100%; } .deg0 { transform: translate(18em); } /* 12em= half the width of the wrapper */ .deg45 { transform: rotate(45deg) translate(18em) rotate(-45deg); } .deg135 { transform: rotate(135deg) translate(18em) rotate(-135deg); } .deg180 { transform: translate(-18em); } .deg225 { transform: rotate(225deg) translate(18em) rotate(-225deg); } .deg315 { trans…
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/12813573

http://stackoverflow.com/comment/47122504
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29480730
has text: i am getting this Uncaught TypeError: Cannot read property 'animate' of undefined
score: 0

http://stackoverflow.com/q/29424375
type: Question
answer count: 2
tagged with: firefox
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: firefox-addon
has answer: http://stackoverflow.com/a/29455474
has body: I'm trying to send data to a sidebar. I've had a look at the following documentation, but I could not figure out how to properly send data over to the bar when it is already opened. Communicating with sidebar scripts Communicating with other scripts Using ports My current approach is to save the worker object I get when the sidebar is attaching in a global variable, but I'm sure there is a better way. Minimal example showcasing my current approach: var BARWORKER = undefined; require("sdk/ui/sidebar").Sidebar({ id: "mybar", url: "./sidebar.html", onReady: function (worker) { BARWORKER = worker; } }); // lots of code if (BARWORKER) { BARWORKER.port.emit("message", payload); } // lots of code
type: UnansweredQuestion
upvote count: 7
score: 7
has answer: http://stackoverflow.com/a/29486684
has title: How to properly send data to an opened Firefox sidebar?

http://stackoverflow.com/comment/47101096
has text: `x` is the data returned from the server, generally a string unless you specifiy JSON and get it parsed. Why would it have a statusCode and responseMsg. You seem to be using XMLHttpRequest syntax in jQuery ?
comment on: http://stackoverflow.com/q/29469683
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29450477
has comment: http://stackoverflow.com/comment/75637013
downvote count: 1
answers question: http://stackoverflow.com/q/29450399
has body: function countVowels(subject) { return subject.match(/[aeiou]/gi).length; } You don't need to convert anything, Javascript's error handling is enough to hint you on such a simple function if it will be needed.
type: Answer
has comment: http://stackoverflow.com/comment/68710874
score: 7
upvote count: 8

http://stackoverflow.com/q/29515960
type: AnsweredQuestion
upvote count: 0
linked to: http://stackoverflow.com/q/500504
has body: I have two an object which contains 2 arrays. I want to create loop in such a way that each element of first array gets concated to each element of second array. {'array1':['a','b'],'array2':['1','2']} it should create new array ['a,1':{'prop1':""},'a,2':{'prop1':""},'b,1':{'prop1':""}, 'b,2':{'prop1':""}] How to do this in javascript.
tagged with: arrays
favorite count: 0
possible better answer: http://stackoverflow.com/a/29540011
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29540011
has answer: http://stackoverflow.com/a/29516139
score: -1
has comment: http://stackoverflow.com/comment/47187368
downvote count: 1
accepted answer: http://stackoverflow.com/a/29516139
tagged with: javascript
has title: javascript: Array looping

http://stackoverflow.com/q/29419118
score: 0
has answer: http://stackoverflow.com/a/29419216
has body: I'm creating a little ticker on my page to display instructions to the user programmatically. I've got it working nicely: var ticker = document.getElementById('ticker'); function instruct (message) { var message = message; var letters = message.split(''); var part = ''; function animate () { if (letters.length !== 0) { ticker.textContent = ''; part += letters.shift(); ticker.textContent = part; return requestAnimationFrame(animate); } } animate(); } It's cute, it looks like it's typing the message out to the user very quickly. So here are a couple of sample messages: instruct('Great, thanks!'); instruct('What\'s next?'); One message at a time works just fine, but when two come at once, the longer one wins out. I need which ever one comes second to cancel, or override, any that are still running. Not sure how to pull this off cleanly. Any help would rock!
tagged with: animation
has title: How to override a requestAnimationFrame loop?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29419216
type: Question
tagged with: requestanimationframe
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/47091909
comment on: http://stackoverflow.com/q/29464253
has text: id have to see a fiddle or something then.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47176380
type: QuestionComment
has text: You could randomise the exact point you send to the client. Ie add 0.0001 to the latlng or take away 0.000..3 etc..
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29509955

http://stackoverflow.com/comment/47133074
type: Comment
comment on: http://stackoverflow.com/q/29486838
type: QuestionComment
has text: You need to add **jQuery** in your jsFiddle this can be added under Frameworks & Extensions on the left panel.
score: 0

http://stackoverflow.com/comment/46978611
comment on: http://stackoverflow.com/a/29400349
has text: Thank you so much for this, looking at what you came up with really showed me how convoluted I was trying making it. My variable naming was terrible and I will have to improve on that. The comments actually make this pretty straightforward. My next question is if there is a good way with change event listeners to avoid having to hit enter or click on blank space to get it to fire? I realize that setting it to keyup would cripple the radio boxes. Would it be a case of breaking up the eventlisteners? One for keyup on the text inputs and one for radios?
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/29511272
has comment: http://stackoverflow.com/comment/47178441
has comment: http://stackoverflow.com/comment/47178494
has body: You can use toggleClass. $(function() { $('.swap').click(function() { $('.a, .b').toggleClass('a b'); }); }); .a { background: red; } .b { background: blue; } # # You can create a function to pass classes to it to swap. Here's an example: $(function() { swapClasses('red', 'blue'); function swapClasses(a, b) { $('.' + a + ', ' + '.' + b).toggleClass(a + ' ' + b); } }); body { color: white; font-weight: bold; } div { padding: 4px; margin: 4px; } .red { background: red; } .blue { background: blue; } RED BLUE The fiddle: https://jsfiddle.net/z2ogcs3x/
has comment: http://stackoverflow.com/comment/47178656
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29511032
answers question: http://stackoverflow.com/q/29511032
score: 0
has comment: http://stackoverflow.com/comment/47179700
has comment: http://stackoverflow.com/comment/47179382
has comment: http://stackoverflow.com/comment/47179065
has comment: http://stackoverflow.com/comment/47178870
has comment: http://stackoverflow.com/comment/47178740
type: Answer

http://stackoverflow.com/a/29513167
score: 2
answers question: http://stackoverflow.com/q/29485728
downvote count: 0
has body: I've tried to run your scenario by using JXcore (fork of Node.JS, and an open source project now on github), which offers multitasking (among many other new features). var task = function (item) { var http = require('http'); var uuid = require('node-uuid'); var uniqueId = uuid.v4() + "-" + process.threadId; console.time(uniqueId); var options = { host: 'google.com', port: '80', path: '/', method: 'GET' }; var req = http.request(options, function (res) { var msg = ''; res.setEncoding('utf8'); res.on('data', function (chunk) { msg += chunk; console.timeEnd(uniqueId); }); res.on('end', function () { process.release(); }); }); req.end(); process.keepAlive(); }; jxcore.tasks.setThreadCount(4); console.time("total"); process.on('exit', function () { console.timeEnd("total"); }); for (var i = 0; i &lt; 1000; i++) jxcore.tasks.addTask(task, i); The sample is not really optimized, but still the total 1000 requests runs with JXcore a little bit faster for me (I was able to measure up to 20% gain on my platform). That may vary depending on the machine, since multitasking is using different threads/instances within one single process (no need for clustering any more). My machine has just 4 threads, that's why I used jxcore.tasks.setThreadCount(4);. You can try with your 32 :) The way of handling each single request is not significantly different, so I'm not saying that each request takes less time, but the key might be hidden in different queuing mechanism as opposite to "async" module. And of course thanks to multitasking.
upvote count: 2
type: Answer

http://stackoverflow.com/q/29421311
downvote count: 1
has comment: http://stackoverflow.com/comment/47014404
has answer: http://stackoverflow.com/a/29421412
has comment: http://stackoverflow.com/comment/47016026
has title: loading content ajax into html popup
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/47014574
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/47014773
tagged with: http://stackoverflow.com/tag/html
has body: So I'm trying to make this thing with the IMDb API. When you press the film title, it's supposed to show a popup with some information about that movie. I've been doing some things, but I don't know how to continue. How do I send the movie data I retrieved into the HTML popup I created? So, this is my HTML code: Plugin ... Lorem ipsum dolor sit amet, consectetur adipiscing elit. The Shawshank Redemption sed metus tortor, condimentum at mi non, scelerisque bibendum ante. Suspendisse dictum eget turpis nec condimentum. fermentum mauris. My PHP file looks like this: <?php $jsonText = file_get_contents('http://www.omdbapi.com/?i=tt0111161'); $imdb = json_decode($jsonText, true); $results[] = [ 'Title' => $imdb['Title'], 'Year' => $imdb['Year'], 'imdbRating' => $imdb['imdbRating'] ]; echo json_encode($results); ?> And finally my main.js: (which isn't much really) function getJson() { $.ajax({ dataType: "json", url: 'imdb.php', success: }); }
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47014628
has comment: http://stackoverflow.com/comment/47014831
has answer: http://stackoverflow.com/a/29421586
upvote count: 1
tagged with: php

http://stackoverflow.com/a/29522931
has comment: http://stackoverflow.com/comment/47202341
has comment: http://stackoverflow.com/comment/47241004
has comment: http://stackoverflow.com/comment/47203446
has comment: http://stackoverflow.com/comment/47207594
has comment: http://stackoverflow.com/comment/47207392
has comment: http://stackoverflow.com/comment/47202188
has body: Right now (April 8, 2015) EST – Eastern Standard Time (-05:00 UTC) is not in effect, however, EDT – Eastern Daylight Time is (-04:00 UTC). The values being returned by the JavaScript Date object are correct. The line "(UTC-05:00) Eastern Time (US &amp; Canada)" in the Date and Time Dialog is misleading. That line is not stating the current offset, just the offset for the time zone when DST is not in effect. Also you can simplify your JavaScript, there is no need to parse the return of toString(), in fact it is considered bad practice. var offset = new Date().getTimezoneOffset(); document.write("UTC offset in minutes: " + offset + ", offset in hours: " + offset / 60); Just some food for thought. I am not a date and time expert by any means but I generally find it helpful to think of a time zone as something different then a UTC offset. From Wikipedia A time zone is a region that has a uniform standard time for legal, commercial, and social purposes. It is convenient for areas in close commercial or other communication to keep the same time, so time zones tend to follow the boundaries of countries and their subdivisions. From Wikipedia The UTC offset is the difference in hours and minutes from Coordinated Universal Time (UTC) for a particular place and date. This distinction is important, take the Canadian province of Saskatchewan for example. From Wikipedia The Canadian province of Saskatchewan is geographically located in the Mountain Time Zone. However, most of the province observes Central Standard Time year-round. As a result, it is effectively on daylight saving time (DST) year round, as clocks are not turned back an hour in autumn. So here is an example of one time zone (Mountain Time Zone) having multiple UTC offsets at the same time. Or if you prefer Saskatchewan belongs to the Mountain Time Zone from March to November and the Central Time Zone for the rest of the year.
score: 4
accepted answer of: http://stackoverflow.com/q/29518570
upvote count: 4
has comment: http://stackoverflow.com/comment/47201492
answers question: http://stackoverflow.com/q/29518570
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47202286
has comment: http://stackoverflow.com/comment/47202418
type: Answer
has comment: http://stackoverflow.com/comment/47201292
has comment: http://stackoverflow.com/comment/47202246
has comment: http://stackoverflow.com/comment/47208371

http://stackoverflow.com/q/29429219
has title: How put a texture on pixi.js polygon?
score: 1
has answer: http://stackoverflow.com/a/29662629
accepted answer: http://stackoverflow.com/a/29662629
tagged with: webgl
type: Question
tagged with: javascript
upvote count: 2
answer count: 1
downvote count: 1
favorite count: 0
has body: Can I fill a polygon with a texture in pixi.js? I need to create a polygon with points and fill it with a texture. How can I do this? Thanks for your help!
tagged with: pixi.js
type: AnsweredQuestion

http://stackoverflow.com/a/29485983
has body: You can't use ActiveXObject in IE11: http://msdn.microsoft.com/en-us/library/ie/dn423948%28v=vs.85%29.aspx Starting with IE11, the navigator object supports plugins and mimeTypes properties. In addition, the window.ActiveXObject property is hidden from the DOM. (This means you can no longer use the property to detect IE11.)
score: 0
has comment: http://stackoverflow.com/comment/49063813
type: Answer
answers question: http://stackoverflow.com/q/29485904

http://stackoverflow.com/comment/47012880
score: 0
comment on: http://stackoverflow.com/q/29408418
type: QuestionComment
has text: Your question is in conflict with itself, "It should be a date object and not a string", but you ask about removing part of the string representation...
type: Comment

http://stackoverflow.com/a/29420399
has comment: http://stackoverflow.com/comment/47012868
accepted answer of: http://stackoverflow.com/q/29420075
answers question: http://stackoverflow.com/q/29420075
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/47012754
has comment: http://stackoverflow.com/comment/47012557
has body: The first snippet and the last, does the same thing, one uses a named function the other an anonymous function, it makes no real difference. This [].forEach.call(document.querySelectorAll('.two'), function(el){ el.addEventListener('click', function(event){ .... gets all elements matching the selector .two and iterates over them and adds event listeners to all of them. This however document.querySelector('.one').addEventListener('click', function(event){ only gets the first element matching the selector .one and adds an event handler to it, any other elements matching that class is not gotten. That's the only real difference!
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29390356
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29418087
score: 1
type: Question
tagged with: sdp
has comment: http://stackoverflow.com/comment/88673328
tagged with: javascript
has comment: http://stackoverflow.com/comment/46960608
has title: Are IceCandidate and SDP static?
answer count: 2
has answer: http://stackoverflow.com/a/29418087
has body: Are IceCandidate and SDP fixed values? Is this a good idea to store them in a server database instead of retrieving on every connection? If updating these data is unavoidable, when should I do it?
downvote count: 0
tagged with: webrtc
tagged with: candidate
favorite count: 0
possible better answer: http://stackoverflow.com/a/43128335
upvote count: 1
has answer: http://stackoverflow.com/a/43128335
linked to: http://stackoverflow.com/q/19675165

http://stackoverflow.com/q/29501534
has answer: http://stackoverflow.com/a/29501777
tagged with: python
has body: I'm developing a template that will be included into a larger template, and for some reason the template is not accepting any arguments in Javascript. Everything is fine if the argument is accessed from the html. Here's an example: test.tpl: from html: {{arg}} From another template, I include test.tpl and pass it with a arg value: main.tpl: % include('test.tpl', arg='some value') The end result is that, the argument in html is displayed fine: from html: some value But the windows alert gives something weird: [object HTMLLIElement] What is going on?
tagged with: bottle
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47161411
type: Question
tagged with: javascript
has title: Bottlepy - How to access bottle arguments {{var}} from javascript?
accepted answer: http://stackoverflow.com/a/29501777
upvote count: 1
answer count: 1
favorite count: 0

http://stackoverflow.com/a/29466273
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29465688
answers question: http://stackoverflow.com/q/29465688
has comment: http://stackoverflow.com/comment/47102419
has comment: http://stackoverflow.com/comment/47135648
type: Answer
has comment: http://stackoverflow.com/comment/47129175
downvote count: 0
has comment: http://stackoverflow.com/comment/47216609
has comment: http://stackoverflow.com/comment/47137406
has comment: http://stackoverflow.com/comment/47128618
score: 3
has comment: http://stackoverflow.com/comment/47128512
has comment: http://stackoverflow.com/comment/47143833
has body: Can you check the JsFiddle I created for you https://jsfiddle.net/1et5s06h/ to check try to resize the preview pane. FYI my answer depends on bootstrap's Grid system and Responsive utilities. You may want to read them to get a better understanding of the grid system and responsive utility classes and to customize my answer to better fit into your needs. Refer to the below code (that uses your css): Strange book here :) Update: I made a little enhancement here that is to show grid interface only in extra small devices (xs) and centered the images within their containers by adding the following css: div.container.hidden-lg.hidden-md.hidden-sm div.row div.col-sm-4.col-xs-4 a img.img-circle { display:block;margin:10px auto; } and I thought I'd better state the idea behind my answer more vivid: I basically create two instances of your content and using responsive utility classes I made your circle of images visible for: Large devices (large desktops, 1200px and up) (lg) Medium devices (desktops, 992px and up) (md) Small devices (tablets, 768px and up) (sm) and hide circle placement and made grid placement visible in: Extra small devices (phones, less than 768px) (xs) Of course, to emphasize again, my update note explains the altered code presented here.
has comment: http://stackoverflow.com/comment/47129429
upvote count: 3

http://stackoverflow.com/q/29510764
tagged with: node.js
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: express
tagged with: saml-2.0
downvote count: 0
favorite count: 0
has title: node.js http request using SAML
has body: i am facing an architectural problem with node.js using express for saml authentication against ms adfs. my problem is, that i have to call a webservice from within my node.js application that expects saml authentication (using the same idp as express). i have no idea how to realize this scenario. would be great to get some hints on how to solve this problem. is there any chance to extract the saml assertion from the express library and pass it to the webservice i am calling ? thanks!
type: UnansweredQuestion

http://stackoverflow.com/a/29387316
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29386966
has body: For fallback compatibily purpose: var a = ["42.00", 33, 12.02, "30", 10]; var out; if (typeof(Array.prototype.map == 'function')) { out = a.map(function(el){ return typeof(el) !== 'number' ? parseFloat(el) : el }); } else { out = []; for (var i = 0; i &lt; a.length; ++i) { out[i] = typeof(a[i]) !== 'number' ? parseFloat(a[i]) : a[i]; } } console.log(out); if the element is already a number it won't parse it, else it will. if the .map function is not defined, it will procede using a regular for loop. This should be done because some browsers does not support some ECMA functions (like IE9): fiddle :: http://jsfiddle.net/kndgcty8/1/
has comment: http://stackoverflow.com/comment/46953183
accepted answer of: http://stackoverflow.com/q/29386966
has comment: http://stackoverflow.com/comment/46953069
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46953680

http://stackoverflow.com/comment/47130152
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29485247
has text: Do you have a specific controller attached with model ?

http://stackoverflow.com/q/29526678
has comment: http://stackoverflow.com/comment/47209197
has title: No longer able to create Wordpress pages
has answer: http://stackoverflow.com/a/29535088
tagged with: wordpress
has comment: http://stackoverflow.com/comment/47208286
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47222776
score: 0
tagged with: blogs
has body: I'm using Wordpress for my blog and from some weeks I'm no longer able to create pages !! I try to create a new page and when I clic on Publish, nothing happens. I also tried to use Google Chrome to inspect the Publish button I get this error : An invalid form control with name='' is not focusable. I use Wordpress 4.1.1
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/22148080
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/46960829
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29391698
has text: @phts. Guess everything is possible :) I don't think it currently has this functionality, however, and I will need to create my own script.
score: 0

http://stackoverflow.com/comment/47100420
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29469073
has text: satish rajak... still i can`t get :(

http://stackoverflow.com/a/29656958
answers question: http://stackoverflow.com/q/29527128
type: AcceptedAnswer
has body: The string format was wrong. I ended up using Entity Framework. So my code behind looks something like: using (myEntities myEntitiesContainer = new myEntities()) { var alldata = myEntitiesContainer.myData(id).ToList(); foreach (myData i in alldata) { if (alldata.IndexOf(i) == alldata.Count - 1) { sb.Append("['").Append(i.DateData.ToString("yyyy-MM-dd HH:mmtt")).Append("', ").Append(i.SomeData.ToString()).Append("]"); } else { sb.Append("['").Append(i.DateData.ToString("yyyy-MM-dd HH:mmtt")).Append("', ").Append(i.SomeData.ToString()).Append("], "); } } myReturnString = sb.ToString(); } The return string: [['2015-03-31 16:00PM', 30.00], ['2015-03-31 14:00PM', 40.00], ['2015-03-31 13:00PM', 50.00]] The Javascript looks like: var renderGraph = function () { var plot var line1 = plot = $.jqplot('chart', [line1], { axes: { xaxis: { renderer: $.jqplot.DateAxisRenderer, tickOptions: { min: 0, formatString: '%b&nbsp;%#d' }, tickInterval: '1 day' }, yaxis: { tickOptions:{ formatString: '%d'} } }, highlighter: { show: true, yvalues: 1, xvalues: 1, formatString: 'Date: %s Level: %s' }, cursor: { show: false, tooltipLocation: 'sw' }, legend: { show: false } }); }
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29527128

http://stackoverflow.com/a/29472300
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29472203
type: AcceptedAnswer
downvote count: 0
has body: You should put this two lines: var nameval = $('#name').val(); var numberval = $('#number').val(); inside the submit function like this $("form#contact").submit(function(){ var nameval = $('#name').val(); var numberval = $('#number').val(); because if you set the values of the variables before the submission of the form the inputs will most likely be empty.
answers question: http://stackoverflow.com/q/29472203
type: Answer
score: 2

http://stackoverflow.com/a/29446324
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/29446266
type: Answer
answers question: http://stackoverflow.com/q/29446266
has comment: http://stackoverflow.com/comment/47059503
has comment: http://stackoverflow.com/comment/47451458
upvote count: 4
has body: As you said: The problem that I'm having with that is that I don't know how to properly pass this to the original method, to be honest. In order to change function scope (this) there are two Function Prototype methods, called call() and apply() References to documentation of these two methods: Function.prototype.call() Function.prototype.apply() So, your code should now looks like this: var original = $.fn.offset; $.fn.offset = function() { var o = original.apply(this, arguments); return typeof o === 'undefined' ? {} : o; }; and return typeof o === 'undefined' ? {} : o; It's just a better (IMO) shorter version of: if (typeof o === 'undefined') { return {}; } else { return o; }
type: AcceptedAnswer

http://stackoverflow.com/comment/129894754
has text: And in ES6: `import { Dimensions } from 'react-native';`
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/33560760

http://stackoverflow.com/a/29449746
downvote count: 0
has body: Put the video element in a variable such as myVideo. ex: var myVideo = document.getElementById( 'myVideo' ) Then: function hide(){ video.removeAttribute( 'controls' ); } Here is a snippet showing it in action: Hide Controls Show Controls
answers question: http://stackoverflow.com/q/29449711
type: Answer
has comment: http://stackoverflow.com/comment/47065726
upvote count: 1
score: 1

http://stackoverflow.com/comment/47140608
comment on: http://stackoverflow.com/a/29489355
type: AnswerComment
has text: @ rfornal need to use `.val()` not `append()`
score: 0
type: Comment

http://stackoverflow.com/comment/46963015
type: Comment
type: QuestionComment
has text: Won't work from a Browser (at least a standard one with good security), because all you doing is Triggering an Event in the Browser's JavaScript engine, not in the Win32API that handles all the Windows Events. This is on purpose, for security reasons. You would need a plugin, like ActiveX to or some unstandardised browser that elevates events to the OS.
comment on: http://stackoverflow.com/q/29393141
score: 0

http://stackoverflow.com/a/29477586
score: 0
answers question: http://stackoverflow.com/q/29477546
type: Answer
has body: This question should be more technical, but i think this is what you are looking for. https://jqueryui.com/datepicker/

http://stackoverflow.com/comment/47114007
type: QuestionComment
has text: have you tried applying the transition to the width of the elements? since the width is what is getting adjusted here. Not sure what it's going to look like with a bunch of them changing at the same time though.
comment on: http://stackoverflow.com/q/29476017
score: 0
type: Comment

header
type: Tag
tags question: http://stackoverflow.com/q/29434991
tags question: http://stackoverflow.com/q/29434050
tag name: header

http://stackoverflow.com/a/29505170
type: Answer
has body: Here is my code for my own blog. Hope, you want similar one: $('#first').on('click', function() { $(this).children().toggleClass('active'); $('#second').toggleClass('active'); }); Then in CSS you just have to play with margin-left: -300px; or with css3 transform: translate. Here is the Working Demo
score: 0
has comment: http://stackoverflow.com/comment/47167541
answers question: http://stackoverflow.com/q/29505096

http://stackoverflow.com/a/29385346
has comment: http://stackoverflow.com/comment/46951262
has body: Your onclick="$.fancybox.close();" doesn't see your main fancybox object. Try to do something like this &lt;input type="button" value="Save" style="margin-top:30px;" class="button closeFancybox"&gt; And in your main document $(function(){ $(document).on('click','.closeFancybox',function(){ $.fancybox.close(); }) }) Update Please try to simulate similar behaviour on https://jsfiddle.net I've tried example that you've wrote and it worked.
has comment: http://stackoverflow.com/comment/47137890
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/46951706
downvote count: 0
has comment: http://stackoverflow.com/comment/47134880
has comment: http://stackoverflow.com/comment/46949196
answers question: http://stackoverflow.com/q/29385240
score: 3

http://stackoverflow.com/a/29381335
accepted answer of: http://stackoverflow.com/q/29380703
type: Answer
answers question: http://stackoverflow.com/q/29380703
has body: I looked over the source code of WOW.js and it doesn't look like there's a way to specify an offset as a percentage rather than in pixels. So here's how to do it in javascript: window.onload = function() { var elements = document.getElementsByClassName("offsetme50"); var i; for (i = 0; i &lt; elements.length; i++) { var offset = elements[i].clientHeight * .5; //.5 = 50% elements[i].setAttribute("data-wow-offset", offset); } } This code will run automatically after the page is loaded. Set class="offsetme50" to all the HTML elements you want.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47120991
has comment: http://stackoverflow.com/comment/46952143
has comment: http://stackoverflow.com/comment/47092804
has comment: http://stackoverflow.com/comment/46977976
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47120014

http://stackoverflow.com/comment/91541290
type: Comment
comment on: http://stackoverflow.com/a/43133108
score: 1
has text: This worked fine for me in chrome. For firefox it worked after I added the anchor to the document: document.body.appendChild(anchor); Did not find any solution for Edge...
type: AnswerComment

http://stackoverflow.com/q/29508637
downvote count: 0
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/29509042
upvote count: 2
has body: At work we have a popup dialog system that i would like to use to edit the contents of a widget in CKEditor. Is there any way of going about this? Does CKEditor have a way of calling outside and get a callback setting values on the Widget? I have googled it for quite a while now with no success :(
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29509042
tagged with: widget
tagged with: dialog
type: Question
has title: Integrate external dialogs with CKEditor Widgets
tagged with: javascript
tagged with: ckeditor

http://stackoverflow.com/comment/47050631
type: QuestionComment
comment on: http://stackoverflow.com/q/29441097
score: 0
has text: Use AJAX to get the contents of the text file into a Javascript string variable.
type: Comment

http://stackoverflow.com/comment/47178732
type: QuestionComment
comment on: http://stackoverflow.com/q/29511113
type: Comment
has text: possible duplicate of [How to pass an object to an onclick event](http://stackoverflow.com/questions/12501867/how-to-pass-an-object-to-an-onclick-event)
score: 0

http://stackoverflow.com/comment/47050624
type: Comment
comment on: http://stackoverflow.com/q/29441097
score: 0
type: QuestionComment
has text: @Typo do you mean the format of how the numbers are displayed like 123? because if so it doesn't matter as long as it follows, so it could also be like 1 2 3 4 5 6 etc. or 1,2,3,4,5,6 etc. as long as the function still gets the last value of the .txt file in this case 6.

http://stackoverflow.com/q/29410850
has body: I am using angular-facebook to login users to my app using facebook. Here is the code that logs users in: Facebook.login(function (response) { $scope.access_token = response.authResponse.accessToken; }); and then in order to get the facebook id of the user I send a request like this: Facebook.api('/me', function(response) { $scope.user = response; } Then I save this user in my database. After this, in $scope.user.id, I have let's say ID abcd. Then I use this id to get the page access token by sending a request to the following url: https://graph.facebook.com/'+$scope.user.id+'/accounts This is giving me this error: Unsupported get request. Please read the Graph API documentation Then, in order to check whether my ID is correct, I manually typed the following url in the browser: https://graph.facebook.com/me?access_token=123123123asdas To my surprise, I get a different ID here, let's say, 'xyz!' What am I doing wrong? Why did I get different IDs?
score: 0
answer count: 1
tagged with: facebook-graph-api
tagged with: angularjs
has title: Get a page access token with Facebook graph api
type: UnansweredQuestion
tagged with: facebook
has answer: http://stackoverflow.com/a/29411287
type: Question
tagged with: javascript

http://stackoverflow.com/comment/47026324
has text: @squiroid I tried that method, it didn't work. Mohamedrias, how would I do that? could you give me an example?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29427948

http://stackoverflow.com/q/29467541
tagged with: galleria
tagged with: javascript
answer count: 2
has body: I have a data, something like below [ { "picture": "http://i.imgur.com/7Osllxil.jpg", "name": "Kitty", "age": 2 } //and so on ] From the data above, I want to show a gallery using Galleria. In the gallery, every time the user see an image, I want to process the data above. The code is like below. The full code can be see in JsFiddle http://jsfiddle.net/petrabarus/pajn8q3z/4/ &lt;div id="gallery"&gt; &lt;a href="http://i.imgur.com/7Osllxil.jpg" data-name="Kitty" data-age="2"&gt; &lt;img src="http://i.imgur.com/7Osllxil.jpg"/&gt; &lt;/a&gt; &lt;a href="http://i.imgur.com/YACmI1G.jpg" data-name="Tom" data-age="3"&gt; &lt;img src="http://i.imgur.com/YACmI1G.jpg"/&gt; &lt;/a&gt; &lt;a href="http://i.imgur.com/af4ZDy8.jpg" data-name="Felix" data-age="4"&gt; &lt;img src="http://i.imgur.com/af4ZDy8.jpg"/&gt; &lt;/a&gt; Galleria.run('#gallery'); Galleria.on('image', function(e){ var name = 'Kitty'; //Where to get this? var age = 2; //Where to get this? $('#caption').html('Hi, my name is ' + name + '. My age is ' + age); }); Since Galleria will construct its own DOM, how to pass the name and age data above to the image event? If I use console.dir(e.imageTarget); it will show &lt;img width="153" height="230" style="display: block; min-width: 0px; min-height: 0px; max-width: none; max-height: none; transform: translate3d(0px, 0px, 0px); width: 153px; height: 230px; position: absolute; top: 0px; left: 164px; opacity: 1;" src="http://i.imgur.com/7Osllxil.jpg"&gt;
upvote count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29467798
has title: How to pass data from JSON or HTML to Galleria 'image' event?
type: Question
has answer: http://stackoverflow.com/a/29467592

http://stackoverflow.com/q/29445740
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47059823
has title: References in MongoDB / Mongoose / nodejs - parallelization
type: Question
tagged with: mongodb
accepted answer: http://stackoverflow.com/a/29447223
tagged with: mongoose
tagged with: javascript
has body: I want to get references in mongoDB using nodejs/mongoose. In the documentation I read that there are two options: Manual References or DBRefs. Since they state, its recommended to use Manual References, I decided to set up a schema in the following way: var schema = new mongoose.Schema({ name : String, reference : mongoose.Schema.ObjectId }); Question: If I retrieve an array of these objects from my collection, how do I resolve the references in a good practice way? My Idea was to use Nimble and parallelize the necessary requests. I wanted to do something like flow.parallel(functions, function() { return result; }); where I dynamically fill an array of functions var functions = [] which I pass then to nimble. (kind of this SO-question: Javascript Array of Functions) Question: Is this practical? The array of functions-thing seems kind of not really the way to go to me. But I don't see any alternative, since nimble needs to be called with a static number of functions.
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/28712248
has comment: http://stackoverflow.com/comment/47058839
linked to: http://stackoverflow.com/q/4908378
tagged with: reference
has answer: http://stackoverflow.com/a/29447223

http://stackoverflow.com/q/29382914
tagged with: javascript
has answer: http://stackoverflow.com/a/29383769
favorite count: 0
score: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: file-upload
linked to: http://stackoverflow.com/q/246801
accepted answer: http://stackoverflow.com/a/29383769
downvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29384334
has answer: http://stackoverflow.com/a/29384334
has title: getting base64 string from html file upload element
has body: I want to convert image from file upload element to base64 string. I found a solution here How can you encode a string to Base64 in JavaScript? The @SunnyMilenov answer but I am not sure what to pass to function encode : function (input) {...}
type: Question
upvote count: 4
linked to: http://stackoverflow.com/q/7370943
answer count: 2

http://stackoverflow.com/comment/47074983
type: QuestionComment
comment on: http://stackoverflow.com/q/29454673
has text: Do you want to delete the link to the file or the linked file?
score: 0
type: Comment

http://stackoverflow.com/comment/47109936
type: AnswerComment
comment on: http://stackoverflow.com/a/29469871
has text: @AlexMan, you should apply the style to the first-child of the `a` tag in your parent. See this [plunkr](http://plnkr.co/edit/lU3mFaXfEhFUxIomPV1S?p=preview). Consider to open a new question, if you have any further question because it's far out of your original question.
score: 0
type: Comment

http://stackoverflow.com/q/29523533
accepted answer: http://stackoverflow.com/a/29523715
upvote count: 3
possible better answer: http://stackoverflow.com/a/29523696
type: Question
linked to: http://stackoverflow.com/q/29564383
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: In short I have a list of div created with ng-repeat. {{value.keys}} Which display something like this: Plunker But is this possible to make them stacked something like this? : I guess I have to dynamically set the positions and z-index for each div. But I'm not sure if this can be even possible and if so then how? This will be great if there is any solution for this. If need jQuery/js it will be fine too.
has comment: http://stackoverflow.com/comment/47201659
has answer: http://stackoverflow.com/a/29523720
has comment: http://stackoverflow.com/comment/47201616
has answer: http://stackoverflow.com/a/29523715
favorite count: 0
has answer: http://stackoverflow.com/a/29523629
has title: angularjs How to create stack of divs with ng-repeat
tagged with: angularjs
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29523696
score: 3

http://stackoverflow.com/q/29432863
possible better answer: http://stackoverflow.com/a/29433108
has answer: http://stackoverflow.com/a/46648391
has answer: http://stackoverflow.com/a/29433108
tagged with: arrays
has answer: http://stackoverflow.com/a/29432889
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29433122
has title: how to use lodash _ without operator with an array rather than multiple args
tagged with: lodash
answer count: 4
upvote count: 12
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/29432889
has body: I was expecting the lodash without function to take an array of values, but instead takes multiple args. How do I pass it an array and make it work. Example: var bar = { foo: ['a', 'b', 'c'] }; _.without(bar.foo, 'c', 'a'); // works; _.without(bar.foo, ['c', 'a']); // doesn't work My exclusion list has to be passed in as an array or variable so it would be useful to know how to use an array with the without function.
score: 12
type: Question

http://stackoverflow.com/a/32109580
score: 2
has body: To improve @rtpHarry's answer, the JavaScript SDK he is referencing has seen better days. It hasn't been updated in 2 years, and doesn't work in IE11. Now this is a shameless plug, full disclosure, I am the author of this module; But Node-QuickBase is much, much easier to use and works both in the browser and on the server - no code change. Here is an example: Within Nodejs: var QuickBase = require('quickbase'); var quickbase = new QuickBase({ realm: 'www', appToken: '*****' }); quickbase.api('API_Authenticate', { username: '*****', password: '*****' }).then(function(result){ return quickbase.api('API_DoQuery', { dbid: '*****', clist: '3.12', options: 'num-5' }).then(function(result){ return result.table.records; }); }).map(function(record){ return quickbase.api('API_EditRecord', { dbid: '*****', rid: record[3], fields: [ { fid: 12, value: record[12] } ] }); }).then(function(){ return quickbase.api('API_DoQuery', { dbid: '*****', clist: '3.12', options: 'num-5' }); }).then(function(result){ console.log(result); }).catch(function(err){ console.error(err); }); Within the Browser: &lt;script type="text/javascript" src="quickbase.browserify.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var quickbase = new QuickBase({ realm: 'www', appToken: '*****' }); quickbase.api('API_Authenticate', { username: '*****', password: '*****' }).then(function(result){ return quickbase.api('API_DoQuery', { dbid: '*****', clist: '3.12', options: 'num-5' }).then(function(result){ return result.table.records; }); }).map(function(record){ return quickbase.api('API_EditRecord', { dbid: '*****', rid: record[3], fields: [ { fid: 12, value: record[12] } ] }); }).then(function(){ return quickbase.api('API_DoQuery', { dbid: '*****', clist: '3.12', options: 'num-5' }); }).then(function(result){ console.log(result); }).catch(function(err){ console.error(err); }); &lt;/script&gt;
answers question: http://stackoverflow.com/q/29386945
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/comment/47064063
comment on: http://stackoverflow.com/q/29448880
score: 0
type: QuestionComment
has text: What do you see wrong in second way..you want to get `item3` to be written in document.right?
type: Comment

http://stackoverflow.com/q/29465930
tagged with: http://stackoverflow.com/tag/xls
linked to: http://stackoverflow.com/q/8238407
score: 7
has body: Can we read large local xls/xlsx file in angularjs/Javascript without using any liabrary, if not then which is most suitable library?
has answer: http://stackoverflow.com/a/40395933
downvote count: 1
type: Question
tagged with: javascript
has title: Read local xls/xlsx file in javascript
answer count: 2
has answer: http://stackoverflow.com/a/44107380
favorite count: 0
tagged with: angularjs
upvote count: 8
tagged with: http://stackoverflow.com/tag/xlsx
type: UnansweredQuestion

http://stackoverflow.com/a/29536470
score: 0
type: Answer
has body: You can use webpack's typescript-loader and start from there. Make sure you put target: 'node' on your webpack config so you don't have all the browser junk.
answers question: http://stackoverflow.com/q/29524416

http://stackoverflow.com/comment/47150181
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29494873
has text: can you give an example?
type: Comment

http://stackoverflow.com/a/29404746
type: Answer
answers question: http://stackoverflow.com/q/29404723
score: 1
upvote count: 1
has body: No, nothing like this. May be developer using this variable later in page as this is global variable. He is calling function from setInterval hence its going to called repeatedly. So, he is keeping that value in some global variable as it will be lost if kept inside function. Name is like that just to know what was the intention of variable.Its simple variable. This line is changing the location :- divAdvert.style.left = newLocation + "px"; When switchDirection is false , auther is adding value:- if (!switchDirection) { newLocation = currentLeft + 2; Once it is more that 400 , author changing the variable value if (currentLeft &gt;= 400) { switchDirection = true; } Then he is moving it in other direction and again vice versa, newLocation = currentLeft - 2; if (currentLeft &lt;= 0) { switchDirection = false; } Instead of giving value true false , s/he could have used values left and right or ltr and rtl but as he has only 2 values, he used true and false. Its simple variable , you can give any name like dir or xyz it will work in same way. And if you change all the false with true and true with false code will work same.
downvote count: 0
has comment: http://stackoverflow.com/comment/46997830

http://stackoverflow.com/comment/46997735
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29411626
has text: ok i will try .. but better you can check this http://www.a2zwebhelp.com/multiple-file-upload .. its same like you want
score: 0

http://stackoverflow.com/q/29403460
has body: $(function() { var retrievedtext1 = localStorage.getItem('t1'); var retrievedtext2 = localStorage.getItem('t2'); retrievedtext1=JSON.parse(retrievedtext1); retrievedtext2=JSON.parse(retrievedtext2); document.getElementById("option1").innerHTML = retrievedtext1; document.getElementById("option2").innerHTML = retrievedtext2; var changeq=0; var obj= OS.length; console.log(obj); document.getElementById("element").src =OS[changeq].image ; $('#Fairly1').click(function() { alert('value = 1'+"--"+OS[changeq].image); changeq +=1; document.getElementById("element").src = OS[changeq].image ; if (changeq&gt;=OS.length){ window.location.assign("start.html"); } }); $('#between').click(function() { alert('value = 2'+"--"+OS[changeq].image); changeq +=1; document.getElementById("element").src = OS[changeq].image ; }); $('#Both').click(function() { alert('value = 5'+"--"+OS[changeq].image); changeq +=1; document.getElementById("element").src = OS[changeq].image ; }); $('#Non').click(function() { alert('value = 6'+"--"+OS[changeq].image); changeq +=1; document.getElementById("element").src = OS[changeq].image ; }); $('#x').click(function() { alert('value = 4'+"--"+OS[changeq].image); changeq +=1; document.getElementById("element").src = OS[changeq].image ; }); $('#Fairly2').click(function() { alert('value = 3'+"--"+OS[changeq].image); changeq +=1; document.getElementById("element").src = OS[changeq].image ; }); }); function goBack() { window.history.back(); } I keep getting this error: Uncaught TypeError: Cannot read property 'image' of undefined. I want it so that after I loop through the JSON object, I redirect to another page and save what user did in one array to send it later to db.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29403628
has comment: http://stackoverflow.com/comment/46982268
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46982274
has comment: http://stackoverflow.com/comment/46982478
downvote count: 1
type: Question
tagged with: javascript
score: -1
has title: Uncaught TypeError: Cannot read property 'image' of undefined
has comment: http://stackoverflow.com/comment/46982461
has answer: http://stackoverflow.com/a/29403628
upvote count: 0
answer count: 1
favorite count: 0
tagged with: frontend

http://stackoverflow.com/a/29505510
answers question: http://stackoverflow.com/q/29505444
has comment: http://stackoverflow.com/comment/47185572
has body: As noted in the documentation for indexOf: "indexOf() compares searchElement to elements of the Array using strict equality (the same method used by the ===, or triple-equals, operator)." So you won't be able to match an array item's object property using it. What you need is find or findIndex. However both are only available in ECMA6 so you would need to use one of the polyfills noted in the documentation. Example using findIndex: pos = eventObjs.findIndex(function (e) { return e.personId === 2 &amp;&amp; e.jobId === 1; });
downvote count: 0
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/47185234

http://stackoverflow.com/q/29404396
has comment: http://stackoverflow.com/comment/46985330
has comment: http://stackoverflow.com/comment/47023709
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46984139
has body: So this is what I have right now: var flag = false; (function() { for (var i = 0; i &lt; 5; i += 1) { // some code .... // How can I rewrite the following? if (!flag) { flag = true; // can't break } } })(); console.log(flag); http://jsfiddle.net/btc6wjw9/ My goal is set the flag to true when the function executes. What is the more elegant syntax with the same or better performance? Thanks! Update: I have since learned that changing a boolean value is faster than checking it: http://jsfiddle.net/xq7n7bry/
favorite count: 0
has answer: http://stackoverflow.com/a/29404549
possible better answer: http://stackoverflow.com/a/29405198
has answer: http://stackoverflow.com/a/29405198
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46983943
has title: best syntax to set a global boolean variable in a loop in a function in javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/46984363
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46984302
has comment: http://stackoverflow.com/comment/46984830
accepted answer: http://stackoverflow.com/a/29404549
tagged with: javascript
has comment: http://stackoverflow.com/comment/46983844

http://stackoverflow.com/comment/55945865
has text: @IlmariKaronen Interesting, w3c says browsers should throw but whatwg says they should return null. I will update my answer.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/34073811
type: AnswerComment

http://stackoverflow.com/a/44709894
has comment: http://stackoverflow.com/comment/106107510
has body: This worked for me: image: { flex: 1, aspectRatio: 1.5, resizeMode: 'contain', } aspectRatio is just width/height (my image is 45px wide x 30px high).
score: 55
has comment: http://stackoverflow.com/comment/96764096
downvote count: 0
upvote count: 55
has comment: http://stackoverflow.com/comment/88947775
answers question: http://stackoverflow.com/q/29476165
type: Answer

http://stackoverflow.com/q/29481484
has comment: http://stackoverflow.com/comment/47123753
has comment: http://stackoverflow.com/comment/47123651
has comment: http://stackoverflow.com/comment/47125639
type: Question
tagged with: for-loop
upvote count: 0
score: -2
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have a general question about a script to automate value inputs &amp; clicking. The purpose is to select a site in the sites variable/concat into ns1 - ns2, click id add_gridVanity place the values into the input field and submit/close then repeat the process until the end of the array. I can't seem to get the for loop running. Sorry for the basic question. sites = ["stonegrillla.com","schoolfoodbloomingroll.com","chapmanpizzeria.net","sushimasu.com","hmsbountyla.com","pailinthaicuisine.net","fullhouseseafood.com","cjssgourmetdelicatessen.com","bullsheadexpress.net","breakingbreadsf.net","lscaffe.net","latortagorda.org","pinecrestdiner.net","sunriserestaurant.net","tressf.net","hanazensf.com","piperade.org","mazzatsf.net","gaylordindia.net","thegrovefillmore.com","itstopscoffeeshop.net"] for (i=0; i&lt;sites.length; i++){ var base = 'ns1,ns2.'; var full = base.concat(sites[i]); var sub1 = "ns1.".concat(sites[i]); var sub2 = "ns2.".concat(sites[i]); var both = sub1+'\n'+sub2; $("#add_gridVanity").click(); $("#name").val(full); $("#servers").val(both); $("#sData").click(); $("#cData").click(); console.log(sites[i]); //test };
favorite count: 0
has comment: http://stackoverflow.com/comment/47123631
has title: Looping through array and input value into field
has answer: http://stackoverflow.com/a/29481548
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/a/29411682
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46997004
has comment: http://stackoverflow.com/comment/47001164
accepted answer of: http://stackoverflow.com/q/29411569
has comment: http://stackoverflow.com/comment/46997071
answers question: http://stackoverflow.com/q/29411569
has body: Example example js function resize() { $(".test").css({ width: $(window).width(), height: $(window).height() }); } resize(); $(window).resize(function(){ resize(); }); if you want minus some pixels function resize() { $(".test").css({ width: $(window).width() - 15, height: $(window).height() - 15 }); }
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46996380
type: Answer
has comment: http://stackoverflow.com/comment/46996788

http://stackoverflow.com/q/29464189
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29464565
has body: When the users presses the button, I need the program to populate the text field with a string variable from an API (JSON). Here is what I have, but it is not working: YVR Weather
linked to: http://stackoverflow.com/q/10204420
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29464565
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Populating a text area with a variable(string) from a JSON file

http://stackoverflow.com/q/29407968
has title: evt argument inside a function in javaScript
favorite count: 0
type: Question
score: 5
has body: evt argument inside a function in javaScript Hello stackoverflow community. I need to know how is the evt argument used in these functions. There are some examples in the internet which have the argument evt inside of a function, but I don't see them using the argument. document.getElementById("creator").addEventListener("click", function(evt){ alert("created"); }); document.getElementById("change").addEventListener("click", function(evt){ alert("changed"); }); I guess the evt argument is just set as undefined because those functions are never called with a value for the argument. So what is the reason for setting the argument variable evt? can it be hello instead of evt? if it is predefined to the event listeners, how can I find a list of predefined arguments?
answer count: 1
accepted answer: http://stackoverflow.com/a/29408076
tagged with: function
upvote count: 5
tagged with: addeventlistener
downvote count: 0
tagged with: javascript
tagged with: predefined-variables
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29408076
tagged with: arguments

http://stackoverflow.com/comment/47107437
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29473156
has text: do you want to create divs for each message as given above ?
score: 0

http://stackoverflow.com/comment/47004596
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29416036
has text: Yes, but `linear-gradient` defines an image, so you can't use it as a value for `background-color` property.

http://stackoverflow.com/comment/46990312
type: Comment
has text: on my browser chrome(42) Date.UTC() returns NaN
comment on: http://stackoverflow.com/a/29408166
type: AnswerComment
score: 0

http://stackoverflow.com/comment/47142766
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29491761
score: 0
has text: @epascarello There is no whitespace in selectValue

meteor-helper
tag name: meteor-helper
tags question: http://stackoverflow.com/q/29443513
tags question: http://stackoverflow.com/q/29411570
tags question: http://stackoverflow.com/q/29529409
tags question: http://stackoverflow.com/q/29445915
type: Tag

http://stackoverflow.com/comment/47243454
score: 0
type: Comment
has text: I've figured out half of the problem, the only script that isn't working is the one using the web audio API, is it on the raspberry pi?
comment on: http://stackoverflow.com/a/29511010
type: AnswerComment

http://stackoverflow.com/q/29442357
has comment: http://stackoverflow.com/comment/47052738
type: Question
has comment: http://stackoverflow.com/comment/47079031
has answer: http://stackoverflow.com/a/29443437
tagged with: validation
has comment: http://stackoverflow.com/comment/47071203
downvote count: 0
has comment: http://stackoverflow.com/comment/47052727
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47067211
has comment: http://stackoverflow.com/comment/47053489
favorite count: 0
has comment: http://stackoverflow.com/comment/47054009
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: How can I debug this validation error when I cannot seem to reproduce it?
has comment: http://stackoverflow.com/comment/47066798
type: UnansweredQuestion
score: 3
has body: I built a sign up form on my website that has been (seemingly) randomly erroring for about 3% of my users (just an estimate). The error disallows the user from signing up for my service, and they often have to call the office so that we can manually add them as a new customer. This costs us quite a bit of time on the phone, and potentially costs us business for those users that decide not to call in, and instead go to a competitor. I have tried debugging this many times, and even rebuilt the sign up system this past year out of frustration, but I am still encountering the bug. I just don't have any more ideas on how to debug it, and was hoping someone had an idea about a new way to test why this might be happening (or force the error to happen for me), or a better way of handling it. *I tried to trim down my code to just include the relevant pieces (they are long files), so please let me know if there is something else I need to include EDIT: @Greg Watters suggested that I write shared functions which multiple 'blur' handlers can use to manage the state for multiple inputs (like student password and confirm student password). I will be trying that next, but if anyone else has additional ideas, I am all ears. UPDATE This has no change on the issue EDIT2 I created an email which allows me to see which inputs are marked as "invalid" right after the user clicks submit on the form, but prior to actual button firing. The inputs that were marked "invalid" were seemingly random EDIT 3 A friend suggested that it might be an autofill issue. Because I have triggered the validation with a blur event, and the autocomplete may not trigger this event. I have added redundant validation on the submission button to check if this may fix the problem How the sign up form and validation work All required inputs start with a class of "invalid" When a user fills in the input, I validate it using js, and if everything is okay, I remove the class "invalid". If it is not validated, I display…
upvote count: 3
has comment: http://stackoverflow.com/comment/47052706
has comment: http://stackoverflow.com/comment/47053818
tagged with: forms

http://stackoverflow.com/a/29389415
has comment: http://stackoverflow.com/comment/46990310
has comment: http://stackoverflow.com/comment/47584741
has body: Meteor already gzips and minifies (in production mode) your app. Just not to cause the confusion your main app file the root file available at xxx.meteor.com is not impacted by this (the one containing the HTML similar to index.html). Also this index.html LIKE file is the bare one containing the references to your js &amp; css files. The actual js file containing your app's HTML is indeed gzipped too. The rest of your static assets (css, js, images, etc) are all gzipd. In production mode your css &amp; js are also minified. Your site at gzipminify.meteor.com has no static assets nor CSS. On the other hand Is the web page compressed : YES for http://test.meteor.com/5166d4fcc07e1605cbe979ef217942271d8badac.js Is the web page compressed: NO for (http://test.meteor.com) For a custom server side rendered route with iron router you can gzip files by including middleware with Router.onBeforeAction instead of app.use with the compression middleware of your choice (nodejs).
has comment: http://stackoverflow.com/comment/46991081
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46991004
type: Answer
accepted answer of: http://stackoverflow.com/q/29389060
answers question: http://stackoverflow.com/q/29389060
score: 2
has comment: http://stackoverflow.com/comment/46990539
upvote count: 2

http://stackoverflow.com/comment/47677146
type: Comment
comment on: http://stackoverflow.com/a/29433709
score: 0
type: AnswerComment
has text: @AlexuGoku I added some explanation to the answer. I've also managed to fix the bug and updated the fiddle for that.

http://stackoverflow.com/q/29424392
has title: How to format date in javascript
has answer: http://stackoverflow.com/a/29424716
has answer: http://stackoverflow.com/a/29424506
has body: I am trying to add time in my code below. Is it possible to display the time in a new line? I am going to display it in a table row. document.getElementById("date").value = new Date().toJSON().slice(0,10); Arr_date:
tagged with: javascript
tagged with: datetime-format
score: 0
answer count: 2
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/29408196
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29406972
accepted answer of: http://stackoverflow.com/q/29406972
upvote count: 2
type: AcceptedAnswer
has body: There is not built-in method for this purpose, so I've wrote simple possible function here it is: we get total row count, and removing all ids from selected items (selected items are calculated upon selection, not when calling this method, thus does not take any meaning effort). Here is the method: function getUnselectedIndexes(selector) { var selectedIndexes = $(selector).jqxGrid('getselectedrowindexes'); var meta = $(selector).jqxGrid('getdatainformation'); var total = meta.rowscount; var unSelectedIndexes = new Array(); for (i = 0; i &lt; total; i++) { if (selectedIndexes.indexOf(i) !== -1) { continue; } unSelectedIndexes.push(i); } console.log(unSelectedIndexes); return unSelectedIndexies; } And you can get all unselected indexes by calling it this way: getUnselectedIndexes("#userProfiles");

http://stackoverflow.com/q/29463999
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29464140
tagged with: wordpress
type: Question
accepted answer: http://stackoverflow.com/a/29464140
has title: How can I modify code to work with a different HTML table format?
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I am trying to use some javascript that will colour in red any dates in a row of a HTML table that have thirty days or less to run. The following example works fine, but I need to use the javascript code on a wordpress site using a plugin called tablepress, which uses a different table layout. Can anybody please help me to modify the javascript code to work with the tablepress layout? Many thanks. HTML Format that does work: 1 Face Cream 23-05-2015 2 Aspirin 05-10-2015 3 Arnica Cream 23-04-2015 4 Vitamin C 06-04-2015 HTML Format that does not work: Item Expiry Date Face Cream 23/05/2015 Aspirin 5/10/2015 Arnica Cream 23/04/2015 Vitamin C 6/04/2015 javascript expiry date colouring code: function colorDate(){ var parents = document.getElementsByTagName("tr") for (var i = 0, ii = parents.length; i < ii; i++) { var parent = parents[i], children = parent.children for (var j = 0, jj = children.length; j < jj; j++) { var elem = children[j] if (j % 3 === 2) { var dateElement = elem.innerHTML; var dateArray = dateElement.split("-"); var prevTime = new Date( dateArray[2],dateArray[1]-1,dateArray[0]); var thisTime = new Date(); var diff = prevTime.getTime() - thisTime.getTime(); var days = 1000*60*60*24; var diffInDays = Math.ceil(diff / days); if (diffInDays > 30) { elem.style.color = "#008000"; } else if (diffInDays <= 30) { elem.style.color = "#ff0000"; } if(dateElement=="00-00-0000"){ elem.style.color = "#0000ffr"; } } } } } colorDate();

symfony
tags question: http://stackoverflow.com/q/29415197
tags question: http://stackoverflow.com/q/29439115
tag name: symfony
tags question: http://stackoverflow.com/q/29509899
tags question: http://stackoverflow.com/q/29409074
tags question: http://stackoverflow.com/q/29472359
type: Tag

http://stackoverflow.com/a/29523696
answers question: http://stackoverflow.com/q/29523533
has body: The following would repeat across a list of cards, increase the z-index,top, and left all by 1 for each iteration, using $index as the reference for place of the current cards. Depending on how your cards need to be laid out, you may needs to do some cards.length - $index stuff to reverse it.
type: Answer
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/29382394
type: Question
score: 0
tagged with: mobile
answer count: 1
has body: I have a main website that redirects to the mobile site when necessary. The mobile site looks completely different and is stored in the sub-directory. When mobile users choose to view main(full) website, I'd like to: redirect to the full site have the full site detect the redirect (so it will display as the full site) be able to toggle back to mobile version if desired. What is the most efficient way to accomplish all of this? This is how I redirect to the mobile version from the main: if (screen.width &lt; 1280) { window.location = "http://mainSite.com/mobile/home.html"; } Thanks!
tagged with: javascript
has answer: http://stackoverflow.com/a/29382598
accepted answer: http://stackoverflow.com/a/29382598
tagged with: http-redirect
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46944033
has title: Detect redirect and display website accordingly

http://stackoverflow.com/q/29479922
has title: Map-Reduce in Node
tagged with: async.js
tagged with: javascript
answer count: 3
possible better answer: http://stackoverflow.com/a/29480188
tagged with: asynchronous
has answer: http://stackoverflow.com/a/29480188
favorite count: 0
has answer: http://stackoverflow.com/a/29480197
accepted answer: http://stackoverflow.com/a/29480197
has answer: http://stackoverflow.com/a/29480451
tagged with: node.js
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/47120677
has body: I have my array=[{id:"1"}, {id:"2"}, {id:"3"}] and want to convert it to object: {"1":true, "2", true, "3":true}; so I have done the following: async.reduce(myArray, {}, function (memo, item, callback) { memo[item.id] = true; callback(null, memo); }, function (err, myObj) { console.log("converted object", myObj); } It does the job, however I'm not sure if this makes sense in terms of performance or it is pointless? Here they have suggested to use map reduce, but still I'm confused how I can do it with map and reduce to improve the performance; any help is appreciated. Thanks
has comment: http://stackoverflow.com/comment/47121368
tagged with: mapreduce
type: Question
upvote count: 2

http://stackoverflow.com/q/29393633
tagged with: javascript
has title: Need help checking if a value exist using JQuery .inArray()
answer count: 3
upvote count: 1
tagged with: arrays
has answer: http://stackoverflow.com/a/29394214
has body: I would like to display an error message when a user types a value in an input field (emailaddressVal) that matches a value in my array (invalidEmailAddresses). But I don't know how to go about it. Thanks for your help! $(document).ready(function(){ $("input[name='emailAddress']").blur(function(){ // Actual Email Validation function var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var hasError = false; var emailaddressVal = $("input[name='emailAddress']").val(); var invalidEmailAddresses = ['aol.com', 'yahoo.com', 'yahoo.fr', 'juno.com', 'hotmail.com', 'gmail.com']; if($.inArray(invalidEmailAddresses,emailaddressVal) == -1) { alert('The email provided is not from a business related domain'); } }); });
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46964995
has comment: http://stackoverflow.com/comment/46963825
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29394690
has answer: http://stackoverflow.com/a/29394436
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/comment/47074500
type: AnswerComment
has text: I did not detect comments,when writing
type: Comment
comment on: http://stackoverflow.com/a/29454697
score: 0

http://stackoverflow.com/a/29439434
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29439396
has body: Wrap your script in a load handler. It will ensure jquery is loaded before it executes. window.addEventListener("load", function(){...});

http://stackoverflow.com/a/29491874
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29491317
downvote count: 0
type: Answer
has body: You can try this and this is perfectly working as checked on w3schools.com $(document).ready(function () { function makeText(textVal){ var index = textVal.length; var arr=''; for(var i = 0; i < index; i++){ if(i % 2 == 0){ arr=arr+""+textVal[i]+""; } else{ arr=arr+textVal[i]; } } $('#raspuns').html(arr); } $('#afisare').click(function () { var textWrite = $('#textValue').val(); makeText(textWrite); }); }) and html is Afisati

http://stackoverflow.com/comment/47027340
score: 0
comment on: http://stackoverflow.com/q/29428464
type: QuestionComment
type: Comment
has text: You can check here (http://caniuse.com/#feat=audio) to see what are all the browsers that support `Audio`, there are only two that don't which are IE8 and Opera Mini, which both make like 5% as global usage.

http://stackoverflow.com/a/29529210
answers question: http://stackoverflow.com/q/29529095
score: 0
has body: maybe a better approach is to attach your function to onchange event like this &lt;input type="text" onchange="checkTextField" /&gt;
has comment: http://stackoverflow.com/comment/47212398
type: Answer
has comment: http://stackoverflow.com/comment/47212487

http://stackoverflow.com/q/29457759
downvote count: 2
linked to: http://stackoverflow.com/q/6346849
has answer: http://stackoverflow.com/a/29532255
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29546617
accepted answer: http://stackoverflow.com/a/29546617
has answer: http://stackoverflow.com/a/29656299
has comment: http://stackoverflow.com/comment/47080155
score: 12
type: Question
tagged with: browser
tagged with: javascript
has body: I set a setTimeout for example 10s, and during that 10s, I suspend/sleep the PC. On awaken, which of the following is true:- The timeout is guaranteed to fire The timeout is guaranteed to not fire The timeout may or may not fire. It's browser-specific Same question for a recurring setInterval. Is it guaranteed to (not) continue.
favorite count: 0
upvote count: 14
answer count: 3
possible better answer: http://stackoverflow.com/a/29656299
tagged with: cross-browser
has title: Is the behaviour of setTimeout across an OS sleep/suspend defined?
has comment: http://stackoverflow.com/comment/59040109

http://stackoverflow.com/q/29380397
has body: I just noticed IDEA / JSHint telling me that an object literal which contains a property named "create" overrides a method in Object. The literal is essentially: module.exports = {email:{create:"me@me.com"}}; And (obviously?) Object has a create method defined in EcmaScript5.js /** @param {Object} proto @param {Object} [props] @static @return {Object} */ Object.create = function(proto,props) {}; Is this something that could cause an obscure problem down the line? I'm guessing that this reserved method doesn't apply to literals, or objects which haven't been instantiated with a default constructor. Just curious.
tagged with: jshint
type: Question
has answer: http://stackoverflow.com/a/29380479
has answer: http://stackoverflow.com/a/29380592
tagged with: intellij-idea
tagged with: javascript
has comment: http://stackoverflow.com/comment/46940657
accepted answer: http://stackoverflow.com/a/29385832
possible better answer: http://stackoverflow.com/a/29380479
has title: Is it okay to use "create" as a property name in a JavaScript object literal?
has comment: http://stackoverflow.com/comment/46940720
downvote count: 0
tagged with: ecmascript-5
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29380512
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29385832
has comment: http://stackoverflow.com/comment/46940668
upvote count: 1
has comment: http://stackoverflow.com/comment/46941113

http://stackoverflow.com/q/29412317
favorite count: 0
has answer: http://stackoverflow.com/a/29415742
accepted answer: http://stackoverflow.com/a/29415742
score: 2
type: AnsweredQuestion
downvote count: 0
has title: Chrome Extensions - Changing the popup window
has body: I have a chrome extension that allows a user to log into a system. When the user is not logged in I want the default page to appear when the extension is opened, but if they've already logged in, I want a different popup window to show when they open the extension. I'm achieving this through javascript at the moment but sometimes there's a time delay. The original page will flash up for an instant before the script executes and switches to the different page. Is there a better way to implement this?
tagged with: google-chrome
type: Question
tagged with: javascript
upvote count: 2
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/46934372
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29376309
has text: @pherris: thanks! `scope: $scope` fixed my problem :)

http://stackoverflow.com/a/29385293
type: Answer
has comment: http://stackoverflow.com/comment/46951626
has comment: http://stackoverflow.com/comment/46951249
upvote count: 1
has comment: http://stackoverflow.com/comment/46956312
has comment: http://stackoverflow.com/comment/46948980
score: 1
answers question: http://stackoverflow.com/q/29385081
has comment: http://stackoverflow.com/comment/46949434
has comment: http://stackoverflow.com/comment/46951742
has body: These documents might help you. http://docs.ckeditor.com/#!/guide/dev_file_browse_upload http://docs.ckeditor.com/#!/guide/dev_howtos_file_upload
downvote count: 0
has comment: http://stackoverflow.com/comment/46951958
has comment: http://stackoverflow.com/comment/46951130

http://stackoverflow.com/q/29409264
linked to: http://stackoverflow.com/q/17800176
has answer: http://stackoverflow.com/a/29409403
type: Question
upvote count: 4
has body: I'm using $.ajax to get some HTML from the server. my javascript makes use of promises and I want to avoid creating another promise and use jQuery ajax since it's already a promise. But is there some way I can reject the promise inside the "done" callback? my code looks something like this: function get_html(){ return $.ajax({ .... }).done(function(response){ if(response.haveErrors){ // here how do I reject and return the promise? return; } // code #2 should run normally // but can i pass a "parameter" to done() ? }).fail(function(){ .... }); } and the usage: get_html().done(function(parameter){ // code #2 }).fail(function(){ }); Also, is it possible to pass a parameter to code # 2? in the done callback?
answer count: 2
has answer: http://stackoverflow.com/a/29414913
has comment: http://stackoverflow.com/comment/46992219
has title: reject deferred inside jQuery ajax
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
tagged with: ajax
favorite count: 0
linked to: http://stackoverflow.com/q/10843297
tagged with: promise
type: UnansweredQuestion

http://stackoverflow.com/q/29503458
score: 0
answer count: 1
has title: Stop auto scroll after jQuery fade
has comment: http://stackoverflow.com/comment/47164649
has body: I have this fade slider: https://eventpay.co.il/test.html The background image of the div "header_photo" changes every 7 seconds to other image. The problem is when you scroll down to read the text, then the page is auto-scrolled up to the slider. I want to stop this. I tried some ideas and it's doesn't work. Thanks!
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/29503505
tagged with: fade
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29452244
answer count: 1
favorite count: 0
tagged with: promise
has comment: http://stackoverflow.com/comment/47070093
has comment: http://stackoverflow.com/comment/47070160
has answer: http://stackoverflow.com/a/29452968
tagged with: xmlhttprequest
has body: getId results in an error Cannot read property 'then' of undefined. It is returning the Promise.resolve(r) before waiting for the fetchIDs promise to be resolved (GET request is done ). function fetchIDs () { return new Promise (function (resolve, reject){ // GET request }); }; function getId () { if (typeof localStorage.id !== 'undefined' ) { return Promise.resolve(localStorage.id); } else { fetchIDs().then(function (r) { return Promise.resolve(r); }); } }; getId().then(function (r) { localStorage.id = r; doSthElse(); }); Any idea what am I missing or doing wrong here? Thanks.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47070168
upvote count: 1
downvote count: 1
has title: JavaScript Promises - Cannot read property 'then' of undefined
type: Question
accepted answer: http://stackoverflow.com/a/29452968
tagged with: javascript
score: 0

http://stackoverflow.com/a/29410899
score: 0
has body: One way is to use media queries. Make the ads as display:none by default and add display:block only in media queries for mobile. .ads{ display:none; } @media (max-width:480px){ .ads{ display:block; } }
type: Answer
answers question: http://stackoverflow.com/q/29410761

http://stackoverflow.com/a/29524855
has comment: http://stackoverflow.com/comment/47204106
has comment: http://stackoverflow.com/comment/47204148
score: 3
has comment: http://stackoverflow.com/comment/47204212
upvote count: 3
has comment: http://stackoverflow.com/comment/47204130
has comment: http://stackoverflow.com/comment/47204480
has body: you can search for the word like this if ($marker.data('type').indexOf('context') != -1 ) { icon = 'http://maps.google.com/mapfiles/ms/icons/green-dot.png'; } else { icon = 'http://maps.google.com/mapfiles/ms/icons/red-dot.png'; } Demo: $marker = $(".marker"); if ($marker.data('type').indexOf('context') != -1 ) { $marker.css({'color':"blue"}).text( $marker.text()+" context found"); } else { $marker.css({'color':"red"}).text( $marker.text()+" context not found"); } abc
has comment: http://stackoverflow.com/comment/47204198
has comment: http://stackoverflow.com/comment/47204481
has comment: http://stackoverflow.com/comment/47204171
accepted answer of: http://stackoverflow.com/q/29524818
has comment: http://stackoverflow.com/comment/47204230
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29524818
downvote count: 0
has comment: http://stackoverflow.com/comment/47204309
has comment: http://stackoverflow.com/comment/47204057
type: Answer

http://stackoverflow.com/comment/47108346
score: 0
type: Comment
type: QuestionComment
has text: and btw - you have spelling error in $("#myButotn").trigger(e);
comment on: http://stackoverflow.com/q/29473605

http://stackoverflow.com/comment/47212800
type: Comment
comment on: http://stackoverflow.com/a/29529494
score: 0
type: AnswerComment
has text: OP *specifically stated* for a **non-jQuery solution**

http://stackoverflow.com/comment/46933867
comment on: http://stackoverflow.com/a/29376511
score: 0
type: AnswerComment
has text: Nice thanks mate.// edit is coming // I have another question. if I remove $("#sel").find('option').last().prop("selected",true).show() then it shows the option without selcting the last one. but also when I press the 1st radio button then switch to the second it shows only scroll bar. why? and how I can do that it will show the 4 option without selelcting the last one?
type: Comment

http://stackoverflow.com/q/29509022
type: Question
answer count: 2
tagged with: javascript
score: 0
has title: Rotating a div/img with a button issue
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/15204815
has answer: http://stackoverflow.com/a/29509168
accepted answer: http://stackoverflow.com/a/29509168
possible better answer: http://stackoverflow.com/a/29509090
has answer: http://stackoverflow.com/a/29509090
type: AnsweredQuestion
has body: I am trying to rotate a div using html and javascript but I can't get it to rotate in place. As of now it circles the image around in a wide circle all over the page and not in it's original spot. I think it has something to do with me using a div to hold the image. It's like it is making the 0 axis the center of the page but I'm not sure how to fix that. rotate >

http://stackoverflow.com/a/29379738
type: Answer
answers question: http://stackoverflow.com/q/29379522
score: 0
has body: You would make things lots easier if you checked for (formal) correctness before submitting using JavaScript/jQuery: $(".errpopup").click(function() { $(this).remove(); }); function toBeCalledOnSubmit() { if (!$("#commentbox").val()) { $("#commentbox").addClass("submiterr"); //You can also use alert(); instead of the following line $(body).append("&lt;div class=\"errpopup\"&gt;Put error message here&lt;/div"); return false; else { $("#commentbox").removeClass("submiterr"); return true; } } And CSS: .submiterr { border: 2px solid red; } .errpopup { position: absolute; z-index: 42; /* higher than all the other z-indices */ width: 300px; height: 150px; /* or what you like*/ top: auto; bottom: auto; left: auto; right: auto; }
has comment: http://stackoverflow.com/comment/46944839
has comment: http://stackoverflow.com/comment/46940182

http://stackoverflow.com/a/29530178
type: Answer
has comment: http://stackoverflow.com/comment/47214277
has comment: http://stackoverflow.com/comment/47214185
has comment: http://stackoverflow.com/comment/47214002
upvote count: 3
has comment: http://stackoverflow.com/comment/47214164
score: 3
has comment: http://stackoverflow.com/comment/47214134
has comment: http://stackoverflow.com/comment/47214075
has body: First, don't try to use something which wasn't intended for that kind of use. Use data-* attributes instead. She loves him a lot. Now, I've targeted the spans, which have data-type and using content attribute with attr, along with pseudo-selector :before (you can use :after too, if you want) applying style to them. span[data-type]:before { content: attr(data-type) " | "; } DEMO (Also note that if you're using :after make it content: " | " attr(data-type);) Also, user @bryc has provided an example of how you had wanted it in your image example. Do take a look at it here
answers question: http://stackoverflow.com/q/29530083
has comment: http://stackoverflow.com/comment/47214035
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29530083
has comment: http://stackoverflow.com/comment/47214130
has comment: http://stackoverflow.com/comment/47214670

http://stackoverflow.com/q/29428214
has answer: http://stackoverflow.com/a/29428282
score: 2
has title: why does Javascript getUserMedia only works with firefox?
has comment: http://stackoverflow.com/comment/47090471
has answer: http://stackoverflow.com/a/29428303
type: Question
has comment: http://stackoverflow.com/comment/47382331
tagged with: javascript
has body: I'm having trouble getting this code to work with browsers other than Firefox. The code is supposed to access the webcam. I can't find the problem. It does not work with chrome, internet explorer, Safari. It only works with Firefox. Does anyone have any answers why? How can I correct this code? Here is the code: &lt;html&gt; &lt;head&gt; &lt;script&gt; function loading() { var video = document.querySelector('#forVid'); navigator.getUserMedia = navigator.getUserMedia ||navigator.webkitGetUserMedia || navigator.mozGetUserMedia ||navigator.msGetUserMedia || navigator.oGetUserMedia; if (navigator.getUserMedia) { var thevid = {video: true, audio: false}; navigator.getUserMedia(thevid, handleVideo, forError) } function handleVideo(localmediastream) { video.src = window.URL.createObjectURL(localmediastream); } function forError(e) { // nothing } } &lt;/script&gt; &lt;/head&gt; &lt;body onload = "loading()"&gt; &lt;video id = "forVid" style="position:absolute; top:0; left:50;"autoplay="true" height="600" width="600"&gt; &lt;/body&gt; &lt;/html&gt;
answer count: 2
downvote count: 0
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47026857

http://stackoverflow.com/q/29408491
upvote count: 1
has body: I have an AJAX call to Google's oAuth2 api looks like this: $(document).on('click', '#signup', function() { var OAUTHURL = 'https://accounts.google.com/o/oauth2/auth?'; var SCOPE = 'email profile'; var STATE = 'profile'; var REDIRECT_URI = 'https://localhost:8080/callback'; var RESPONSE_TYPE = 'token'; var CLIENT_ID = '554886359117-8icq0dc9halr8rjd6bdtqcmagrdql9lr.apps.googleusercontent.com'; var _url = OAUTHURL + 'scope=' + SCOPE + '&amp;state=' + STATE + '&amp;redirect_uri=' + REDIRECT_URI + '&amp;response_type=' + RESPONSE_TYPE + '&amp;client_id=' + CLIENT_ID; $.ajax({ type: "POST", dataType: "text", url: _url, success: function(response) { console.log(response.url); }, error: function(error) { console.log("ERROR: ", error); } }); }); This is supposed to redirect back to the server running on http://localhost/callback. Redirect URIs: http://localhost:8080/callback Javascript Origins: http://localhost:8080 I also have the callback function defined as below: func init() { r := mux.NewRouter() r.HandleFunc("/", rootHandler) r.HandleFunc("/callback", callbackHandler) http.Handle("/", r) } func callbackHandler(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "I am sent back from the server!"+time.Now().Format("Mon, 02 Jan 2006 15:04:05 MST")) } everything looks good in debugging mode, except I get this error back from google's api: XMLHttpRequest cannot load https://accounts.google.com/o/oauth2/auth?scope=email%20profile&amp;state=profi…d=554886359117-8icq0dc9halr8rjd6bdtqcmagrdql9lr.apps.googleusercontent.com. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. I have tweaked a little around but I can't seem to find my way through. Any thought on this?
type: Question
score: 1
answer count: 2
tagged with: cors
has answer: http://stackoverflow.com/a/35562121
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Enable CORS in Golang callback function
tagged with: ajax
tagged with: go
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29408704

http://stackoverflow.com/q/29450948
tagged with: javascript
tagged with: variables
tagged with: scope
accepted answer: http://stackoverflow.com/a/29451200
answer count: 1
favorite count: 0
upvote count: 2
has body: I have code like load the most useful comment. The problem was that I was clicking on it and nothing was executing, the function createComment() wasn't even being called. hours tried to figure out what was going on but nothing. Then tried to change the name of createComment to another name like createCommentAlias() and everything worked fine. this is not the first time this happens, I have gotten weird behaviours of this kind previously as well. and again due to variable names which seemingly were overriden by other native variables. Another example, the name nextSibling is a method of a Dom element, and thus can normally be used as var nextSibling, but in inline js it gets, again, overriden by something else. And again this happens only if the js is inline. So I'd like to know what are these variable, where do they come from, and possibly have a list of them so that I don't use those names again.
has title: Various custom variable names like createComment get overriden in inline javascript but not in external js. Why?
has comment: http://stackoverflow.com/comment/47068264
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/29451200
type: Question
linked to: http://stackoverflow.com/q/28173800
downvote count: 0

http://stackoverflow.com/comment/46998203
has text: @Alankar More: No. If i click on PR it will open text area then i fill the data in text area after that i wont' click on SWCR and if i click on submit button it won't work. my code will only work if i click on both PR and SWCR button. Hope you got my point.
type: QuestionComment
comment on: http://stackoverflow.com/q/29412471
score: 0
type: Comment

checkout
type: Tag
tags question: http://stackoverflow.com/q/29379035
tag name: checkout

http://stackoverflow.com/comment/75637013
score: 3
type: AnswerComment
has text: `return (subject.match(/[aeiou]/gi) || []).length;` change to this just in case
comment on: http://stackoverflow.com/a/29450477
type: Comment

http://stackoverflow.com/comment/47162531
comment on: http://stackoverflow.com/q/29502138
has text: @vihan1086 , thanks for the suggestion but it's not loading or showing the iframe when implementing that code. (code from your first reply)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47114336
comment on: http://stackoverflow.com/q/29476651
has text: @lxe , To see if the character used is inside the alphabet variable, and if not it will determine that it is junk.
score: 0
type: Comment
type: QuestionComment

google-closure-library
tags question: http://stackoverflow.com/q/29501474
type: Tag
tag name: google-closure-library

http://stackoverflow.com/comment/47168596
has text: Yes, but if you remember the index where it returned true, and only return that if it did return true… ;-)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29505702

http://stackoverflow.com/q/29514181
answer count: 2
tagged with: for-loop
tagged with: arrays
downvote count: 0
has answer: http://stackoverflow.com/a/29514463
linked to: http://stackoverflow.com/q/728360
favorite count: 0
type: AnsweredQuestion
has title: javascript duplicates for on object bug
score: 1
accepted answer: http://stackoverflow.com/a/29514463
upvote count: 1
has comment: http://stackoverflow.com/comment/47184319
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/29514492
has body: So I have an array of array of objects and wish to export that array to another array to use on future functions, but the problem is that on the for (for each array) the first run goes well but after the first run it adds the same content to the past run for example if I have 2 arrays with different content and execute the for function the first array is the same as the second array. Here is the code: var mark = []; //defult var x_mark = { c_mark_desc_col:[], c_mark_col: null, c_mark_col_image: null, c_mark_action: "click", c_mark_origin:[0,0], c_mark_col_valor: false, c_mark_style: [null] //,c_cluster: cluster[0] }; for (var i = 0; i &lt; extras.marks.length; i++) { mark[i] = x_mark; if(!(extras.marks[i].mark_desc_col === "" || typeof extras.marks[i].mark_desc_col=== "undefined" || extras.marks[i].mark_desc_col=== null)) mark[i].c_mark_desc_col = extras.marks[i].mark_desc_col; if(!(extras.marks[i].mark_col === "" || typeof extras.marks[i].mark_col=== "undefined" || extras.marks[i].mark_col=== null)) mark[i].c_mark_col = extras.marks[i].mark_col; if(!(extras.marks[i].mark_col_image === "" || typeof extras.marks[i].mark_col_image=== "undefined" || extras.marks[i].mark_col_image=== null)) mark[i].c_mark_col_image = extras.marks[i].mark_col_image; if(!(extras.marks[i].mark_action === "" || typeof extras.marks[i].mark_action=== "undefined" || extras.marks[i].mark_action=== null)) mark[i].c_mark_action = extras.marks[i].mark_action; if(!(extras.marks[i].mark_origin === "" || typeof extras.marks[i].mark_origin=== "undefined" || extras.marks[i].mark_origin=== null)) mark[i].c_mark_origin = extras.marks[i].mark_origin; if(!(extras.marks[i].mark_col_valor === "" || typeof extras.marks[i].mark_col_valor=== "undefined" || extras.marks[i].mark_col_valor=== null)) mark[i].c_mark_col_valor = extras.marks[i].mark_col_valor; if(!(extras.marks[i].mark_style === "" || typeof extras.marks[i].mark_style=== "undefined" || extras.marks[i].mark_style=== null)) mark[i].c_mark_style = extra…
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29514492

http://stackoverflow.com/comment/46978211
comment on: http://stackoverflow.com/q/29392000
type: QuestionComment
type: Comment
has text: possible duplicate of [Initiating JavaScript call from server side](http://stackoverflow.com/questions/28969157/initiating-javascript-call-from-server-side)
score: 1

http://stackoverflow.com/comment/46986795
type: Comment
has text: Actually there are more errors in the page. See my answer
comment on: http://stackoverflow.com/a/29405657
score: 1
type: AnswerComment

http://stackoverflow.com/comment/49816082
type: Comment
comment on: http://stackoverflow.com/a/30434885
has text: This works but when I close the custom md-backdrop, I am still left with the original md-backdrop.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29521675
accepted answer: http://stackoverflow.com/a/29522104
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29522445
has comment: http://stackoverflow.com/comment/47198457
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29522226
has comment: http://stackoverflow.com/comment/47199621
has title: Does this line contain a function declaration?
type: Question
linked to: http://stackoverflow.com/q/336859
has answer: http://stackoverflow.com/a/29522104
has body: The following line is known as a function expression in JavaScript. Does it contain within it a function declaration? var foo = function() {}; Edit: edited for clarity.
has comment: http://stackoverflow.com/comment/47198349
has comment: http://stackoverflow.com/comment/47198122
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29522445
has comment: http://stackoverflow.com/comment/47199511

http://stackoverflow.com/q/29396417
linked to: http://stackoverflow.com/q/23829704
has answer: http://stackoverflow.com/a/29396667
tagged with: orientdb
possible better answer: http://stackoverflow.com/a/29404113
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29404113
accepted answer: http://stackoverflow.com/a/29396667
type: Question
tagged with: javascript
has body: I'm following this tutorial http://pettergraff.blogspot.fr/2014/01/getting-started-with-orientdb.html And on the fourth part, we're suppose to create a javascript function which will push some "Members" in the database. I know this tutorial is old and i've already been through some issues, for instance i had to delete the block &lt;handler class="com.orientechnologies.orient.graph.handler.OGraphServerHandler"&gt; &lt;parameters&gt; &lt;parameter value="true" name="enabled"/&gt; &lt;parameter value="50" name="graph.pool.max"/&gt; &lt;/parameters&gt; &lt;/handler&gt; from orientdb-server-config.xml, to make the following code work : var db = orient.getDatabase(); is that normal? Now that this line is okay, I'm having another trouble, here is "my" code : var db = orient.getDatabase(); db.begin(); for (var i = 0; i &lt; n; i++) { var name = prefix + "_" + i; var email = name + "@gmail.com"; var member = { "@class": "Member", "name": "robin", "password": "robin", "email": "robin" }; var result = ODocument.save(member); } db.commit(); return 0; The problem is now on the "save" method var result = db.save(member); It's saying the method is ambigus, i just don't know what to do :) Here is the error (in french, i'd like it in english but i didn't find out how to change de language on OrientDB interface) Erroronparsingscriptatposition#0: ErroronexecutionofthescriptScript: createSomeMembers------^sun.org.mozilla.javascript.EvaluatorException: LechoixdelaméthodeJavacom.orientechnologies.orient.core.command.script.OScriptDocumentDatabaseWrapper.savecorrespondantauxtypesd'argumentJavaScript(object)estambigu.Lesméthodesproposéessontlessuivantes???: classcom.orientechnologies.orient.core.record.impl.ODocumentsave(com.orientechnologies.orient.core.record.ORecord)classcom.orientechnologies.orient.core.record.impl.ODocumentsave(java.util.Map)(&lt;Unknownsource&gt;#18)in&lt;Unknownsource&gt;atlinenumber18LechoixdelaméthodeJavacom.orientechnologies.orient.core.command.script.OScriptDocu…
score: 0
answer count: 2
has title: OrientDB javascript function, "save" on getDataBase not working

reload
tags question: http://stackoverflow.com/q/29376571
type: Tag
tag name: reload
tags question: http://stackoverflow.com/q/29379405

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/29391728
type: Tag
tags question: http://stackoverflow.com/q/29508637

http://stackoverflow.com/comment/47095395
type: Comment
has text: Check the file path and compare with the console log
type: QuestionComment
comment on: http://stackoverflow.com/q/29466423
score: 1

http://stackoverflow.com/q/29473554
has answer: http://stackoverflow.com/a/29526512
has comment: http://stackoverflow.com/comment/47153967
linked to: http://stackoverflow.com/q/10176064
tagged with: knockout.js
type: Question
tagged with: internet-explorer-8
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/47204759
has body: I have a template with checkbox and label which bind with knockout 'for' attribute. Not able to trigger click event, but It works in all the browser except IE8 Even I've specified Doc standard. Is there any workaround
type: UnansweredQuestion
has title: IE8 Label for and Knockout binding

http://stackoverflow.com/comment/46944494
comment on: http://stackoverflow.com/q/29382711
type: Comment
has text: you can use HTML5 `localStorage` or `sessionStorage`
score: 2
type: QuestionComment

http://stackoverflow.com/q/29475966
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/34380487
has body: I am using Angular datatables to populate my table based on a webservice response. My webservice returns me a json like below [ { "id": 1, "name" : "abc", "count": "(20)" }, { "id": 2, "name" : "abc2", "count": "20" }, { "id": 3, "name" : "abc3", "count": "(30)" } ] I am able to bind the JSON array to my $scope variable in the table below id name count {{item.id}} {{item.name}} {{item.count}} The id and name columns are sorted properly in ascending and descending order but the count column is not sorted based on the numbers. Instead it takes the "(" into account while sorting and the sorting. I want the sort result for the count column to be In ascending 20 (20) (30) Right now i get in ascending order (20) (30) 20 Can anyone suggest what is the logic i need to apply?
type: Question
tagged with: angular-datatables
has comment: http://stackoverflow.com/comment/47124192
has comment: http://stackoverflow.com/comment/47113209
has comment: http://stackoverflow.com/comment/47150917
score: 4
has comment: http://stackoverflow.com/comment/47113820
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47151616
accepted answer: http://stackoverflow.com/a/34380487
answer count: 1
has title: Sorting of numbers within brackets in angular datatables
has comment: http://stackoverflow.com/comment/47151116
upvote count: 4
has comment: http://stackoverflow.com/comment/47114269

http://stackoverflow.com/a/29504081
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29490724
has body: You have to do some research on Angular JS concepts in order to have a modular code and also the terminologies associated with that. You need to write the code where you have the arrays of locations in something called as Controller. The main purpose of controller is to holds initial variables, that are to be passed to our directive. Rest of the code goes into something called as Directive. Controller holds initial variables, that are to be passed to our directive. I would recommend you going through this tutorial for complete step by step implementation.

http://stackoverflow.com/a/29517502
has body: $(document).on('change', '.constrainedSelect', function() { var changedSelect = $(this); $(".constrainedSelect").not(changedSelect).select2("val", "").select2("enable", false) }); I think something like this event listener would take care of it. It makes sure the val of all the others are empty and then disables them so they cannot be selected from. How about this instead: Working Fiddle //setup trackign array and block duplicate selections var selectedIds = []; $(document).on('select2-selecting', '.constrainedSelect', function(event) { var idx = $.inArray(event.val, selectedIds); if(idx === -1) { selectedIds.push(event.val); } else { event.preventDefault(); } }); //remove selected item from our tracking array $(document).on('select2-removed', '.constrainedSelect', function(event) { var idx = $.inArray(event.val, selectedIds); selectedIds.splice(idx,1); });
downvote count: 2
has comment: http://stackoverflow.com/comment/47191158
score: -2
has comment: http://stackoverflow.com/comment/47192455
has comment: http://stackoverflow.com/comment/47190246
has comment: http://stackoverflow.com/comment/47190697
upvote count: 0
has comment: http://stackoverflow.com/comment/47193171
has comment: http://stackoverflow.com/comment/47190282
has comment: http://stackoverflow.com/comment/47190207
type: Answer
has comment: http://stackoverflow.com/comment/47190828
has comment: http://stackoverflow.com/comment/47193266
answers question: http://stackoverflow.com/q/29516908

http://stackoverflow.com/comment/47122980
has text: @gorgi93 - abstract classes have nothing to do with strong typing. Dynamically typed languages like Smalltalk have had abstract classes (by convention) since the 1970s.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29480569
score: 6

ntlm
tags question: http://stackoverflow.com/q/29510034
tag name: ntlm
type: Tag

http://stackoverflow.com/q/29485481
accepted answer: http://stackoverflow.com/a/29485650
type: AnsweredQuestion
has body: I am implementing a server. There is no client, just the user's browser. For one functionality I have, until now, always redirected to a URL and let the user's browser handle it. However, now someone wants me, as a result of user action, to "launch an app on the user's smartphone". Forgetting for the moment that the user might not even have the app installed, is this possible? If I returned a web page with some JavaScript, would it be allowed to launch an app? This would seem to have some security implications and I doubt that it can be done. I dimly remember once reading from a PC's serial port from a web page, but I had to jump through hoops with an ActiveX control and a COM DLL to do that. Since that required Internet Explorer &amp; Windows, it's no longer an acceptable solution. My question pertains to all browsers and to Android &amp; iOs (although a solution which also works for Windows, Linux &amp; Mac would be nice to have). I am asking here, seeking a definitive answer.
type: Question
tagged with: browser
tagged with: javascript
has title: Can the browser start an application on the user's 'phone?
score: 0
tagged with: android
answer count: 1
tagged with: cross-browser
has comment: http://stackoverflow.com/comment/47130922
has answer: http://stackoverflow.com/a/29485650

http://stackoverflow.com/a/29471296
type: Answer
upvote count: 6
has body: Please modify your code to this code: <?php $dir=$_SESSION['id']; $realPath = '/uploads/'.$dir; $handle = opendir(dirname(realpath(__FILE__)).$realPath); while($file = readdir($handle)){ if($file !== '.' && $file !== '..'){ echo ' '; } } ?> I have use this code an I get the o/p like this:
downvote count: 0
score: 6
answers question: http://stackoverflow.com/q/29394442
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29394442

http://stackoverflow.com/comment/46995253
type: AnswerComment
score: 0
type: Comment
has text: the solution works. But is there any way to cancel popup on page refresh too?
comment on: http://stackoverflow.com/a/29408149

http://stackoverflow.com/comment/46964657
type: AnswerComment
has text: what is `table.$('tr.selected')`?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29393945

http://stackoverflow.com/q/29463559
upvote count: 2
has comment: http://stackoverflow.com/comment/47090774
has comment: http://stackoverflow.com/comment/47090896
has comment: http://stackoverflow.com/comment/47091652
tagged with: eventtrigger
has comment: http://stackoverflow.com/comment/47090713
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29463628
has comment: http://stackoverflow.com/comment/47090969
has comment: http://stackoverflow.com/comment/47091127
has comment: http://stackoverflow.com/comment/47090822
tagged with: dispatchevent
linked to: http://stackoverflow.com/q/12341329
has title: How to listen and react on triggered CustomEvent?
has comment: http://stackoverflow.com/comment/47090752
tagged with: custom-events
linked to: http://stackoverflow.com/q/1687296
answer count: 1
has comment: http://stackoverflow.com/comment/47091172
tagged with: addeventlistener
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/47091303
has comment: http://stackoverflow.com/comment/47090443
has body: I'd like to understand how the CustomEvent system works, in Javascript. [EDIT2] The dream solution is here : http://www.html5rocks.com/en/tutorials/es7/observe/ [/EDIT2] [EDIT] This piece of codes illustrates pretty well the type of DOM-aware system I'm looking for, thx to @Jared Farrish, There is also the deferred method. But I'm still thinking it is a kind of javascript limitation and that the langage deserves to implement a clever way to do. Ideally, children would not have to execute orders given by parent or by any other element. Instead, a child node should takes its own decisions, by knowing in real-time the interesting parts of DOM activity. var body = document.body, btn = document.getElementById('fire'), warn; warn = document.createEvent('CustomEvent'); warn.initEvent('warning', true, true); body.addEventListener('warning', function() { body.style.backgroundColor = 'blue'; }); btn.addEventListener('warning', function() { this.style.backgroundColor = 'green'; }); btn.addEventListener('click', function init() { body.dispatchEvent(warn); btn.dispatchEvent(warn); }); source : http://jsfiddle.net/p6myjLza/2/ [/EDIT] Saying I create this very basic event : var warning = new CustomEvent('warning', { 'detail': 'This is a warning!' }); Now the object warning contains useful data. It is stored in the browser memory. Let's trigger it. document.dispatchEvent(warning); By doing above statement, I think I say to document : "hey dude, fire this specific event plz". And then, the event is triggered. And how far as I understand, I assume it also means that (somehow) the DOM is aware that the event has been triggered. Now I would like another element, saying body, to change is style.backgroundColor from transparent to red each time the event warning is triggered. In other word, I want body to listen to this specific event and react consequently. document.getElementsByTagName('body')[0].addEventListener('warning', function(e){ this.style.backgroundColor = 'red'; }, false); Bu…
has answer: http://stackoverflow.com/a/29463628
has comment: http://stackoverflow.com/comment/47091272
has comment: http://stackoverflow.com/comment/47090528
favorite count: 0
score: 2
has comment: http://stackoverflow.com/comment/47090525
has comment: http://stackoverflow.com/comment/47091388

http://stackoverflow.com/comment/47381579
has text: Not quite - if there are negative values as well, they will go down from the Axis and the labels will be displayed underneath the negative lines. The X Axis will rest in the middle of the screen.
comment on: http://stackoverflow.com/a/29617987
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47149119
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29476792
type: Comment
has text: I see. You understand that with this logic of hard-coded coordinates, removing a row would always give you the error you have, right? This is what I was trying to tell you when I said your "error" was in php. I meant that since you receive the coordinates with errors from PHP, you can't expect the hardcoded index values to change. Therefore I have a solution for you and I'll post it under an edit in my answer.

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/29436056

http://stackoverflow.com/q/29481987
has answer: http://stackoverflow.com/a/29482040
tagged with: jsbin
tagged with: javascript
score: -1
linked to: http://stackoverflow.com/q/4978235
accepted answer: http://stackoverflow.com/a/29482040
has body: I copied code from This JSBin Project on to my desktop into 3 files: index.html, style.css, script.js I also included the lines in index.html: &lt;link rel="stylesheet" href="style.css"&gt; &lt;script type="text/javascript" src="script.js"&gt;&lt;/script&gt; but the script and style files don't seem to work when i open index.html in browser.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/47124550
downvote count: 2
tagged with: css
type: AnsweredQuestion
has title: How to run JSBin code on your computer?
upvote count: 1
type: Question

http://stackoverflow.com/a/29418120
has comment: http://stackoverflow.com/comment/47009466
has comment: http://stackoverflow.com/comment/47008279
upvote count: 1
answers question: http://stackoverflow.com/q/29417864
downvote count: 0
score: 1
has body: document.title is the way to go, but it won't work in jsFiddle. It should work fine in a "real" page. Try typing javascript:alert(document.title = "My new title"); into your browser - you should see the tab text update. Edit: I don't think you can do this in jsfiddle unless they allow for it somehow. If you try to "escape" your window and change properties on theirs (i.e. parent.document.title = "xxx"; you get a security exception: Uncaught SecurityError: Blocked a frame with origin "http://fiddle.jshell.net" from accessing a frame with origin "http://jsfiddle.net". Protocols, domains, and ports must match.
type: Answer

http://stackoverflow.com/q/29411713
type: UnansweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/46996478
has answer: http://stackoverflow.com/a/29411830
type: Question
has answer: http://stackoverflow.com/a/29411923
tagged with: javascript
has comment: http://stackoverflow.com/comment/46996496
has title: Change the string in JavaScript
answer count: 3
has body: In my webpage having two text box, If i enter "11, welcome street" then move on to next textbox means that string automatically change to "11,WELCOME ST". using Javascript.. Please anyone help. Thanks for advance "11, welcome street" I'd like to change my string to "11,WELCOME ST"
favorite count: 0
has answer: http://stackoverflow.com/a/29411829
tagged with: http://stackoverflow.com/tag/html
downvote count: 4
upvote count: 0

http://stackoverflow.com/comment/46988084
has text: it was already existed.
comment on: http://stackoverflow.com/q/29406617
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47041141
comment on: http://stackoverflow.com/q/29435076
score: 0
type: QuestionComment
type: Comment
has text: What about document.plugins? That might tell you something different than navigator.plugins. The latter is the installed plugins, the former is (supposedly) the plugins in the document, which may differ due to being sandboxed. I haven't checked though.

http://stackoverflow.com/comment/47056520
type: QuestionComment
has text: I have managed to get to the commas before the digits using: `var res = string.replace(/,(?=\d{4})/g, " ");` Its the ones after I'm struggling with:/
comment on: http://stackoverflow.com/q/29444353
score: 0
type: Comment

http://stackoverflow.com/a/29481498
type: Answer
has comment: http://stackoverflow.com/comment/47123579
has comment: http://stackoverflow.com/comment/47123608
downvote count: 0
score: 3
accepted answer of: http://stackoverflow.com/q/29481482
upvote count: 3
answers question: http://stackoverflow.com/q/29481482
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47123590
has body: Just change around your equation so t is alone: var fp = .25; var acres = 40; var rt = 13; var v = 13.3; t = ((v - rt) * acres) / fp; console.log(t); // ~48

http://stackoverflow.com/q/29423620
has comment: http://stackoverflow.com/comment/47018807
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47019109
has title: Button click not triggering in popover form
type: Question
tagged with: javascript
tagged with: jquery
has body: I have a cancel button that should get triggered to close my popover. But the click event doesn't get triggered. Can anyone see what is wrong here, might be something stupid because I'm a newbie! Do I need to add something before '#cancelEvent'? ex. someparentelement#cancelEvent The line above the cancel button submits the form, so that works, the cancel button just doesn't work.. var $calPopOver; $(document).ready(function (of) { $("#overview").hide(); $("#details").hide(); $("#listing").hide(); $("#address").hide(); $("#map").hide(); $("#images").hide(); $("#eventcalendar").show(); $('#fullcalendar').fullCalendar({ header: { left: 'prev,next', //today', center: 'title', //right: 'month,agendaWeek,agendaDay' right: '' }, defaultView: 'month', editable: true, allDaySlot: false, selectable: true, slotMinutes: 15, //eventLimit: 1, //eventLimit: true, // for all non-agenda views //views: { // agenda: { // eventLimit: 2 // adjust to 6 only for agendaWeek/agendaDay // } //}, events: '/ManageSpaces/GetDiaryEvents/', //eventLimitClick: function (cellInfo, jsEvent) { //}, eventClick: function (calEvent, jsEvent, view) { //function (data, event, view) { //var s = cellInfo.segs; $("#eventDetails.collapse").collapse('toggle'); if ($calPopOver) $calPopOver.popover('destroy'); }, dayClick: function (data, event, view) { $(this).popover({ html: true, placement: 'bottom', container: 'body', title: function () { return $("#day-popover-head").html(); }, content: function () { return $("#day-popover-content").html(); } }); //$(this).popover('toggle'); if ($calPopOver) { $calPopOver.popover('destroy'); } $calPopOver = $(this).popover('show'); } }); }); $("#cancelEvent").click(function () { $calPopOver.popover('destroy'); }); Add Event @* *@ Title: Select time: Select duration: 30 min 45 min 60 min 75 min 90 min 105 min 120 min Submit Cancel @* *@ hello
answer count: 1
has answer: http://stackoverflow.com/a/29423703
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/47019049
accepted answer: http://stackoverflow.com/a/29423703
upvote count: 2
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/47018746
tagged with: jquery-click-event

http://stackoverflow.com/q/29505705
has body: I have just started using JavaScript and it just seems strange to me that when the variable is declared,we don't have to specify the datatype. Is there any specific reason this is done?
downvote count: 1
has comment: http://stackoverflow.com/comment/47168431
has comment: http://stackoverflow.com/comment/47168435
linked to: http://stackoverflow.com/q/964910
type: Question
answer count: 2
has title: No variable data type in Java Script
duplicate of: http://stackoverflow.com/q/964910
tagged with: javascript
has answer: http://stackoverflow.com/a/29505732
score: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29505727
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/46953044
comment on: http://stackoverflow.com/q/29387066
type: Comment
score: 0
type: QuestionComment
has text: Can there be more than 2 .deleteRow blocks? I mean how many time you can add new form inputs?

promise
tags question: http://stackoverflow.com/q/29387939
tags question: http://stackoverflow.com/q/29449777
tags question: http://stackoverflow.com/q/29446252
tags question: http://stackoverflow.com/q/29440632
tags question: http://stackoverflow.com/q/29435262
tags question: http://stackoverflow.com/q/29374270
tags question: http://stackoverflow.com/q/29409264
tags question: http://stackoverflow.com/q/29452244
tags question: http://stackoverflow.com/q/29396079
tags question: http://stackoverflow.com/q/29424285
tag name: promise
tags question: http://stackoverflow.com/q/29416240
tags question: http://stackoverflow.com/q/29454949
tags question: http://stackoverflow.com/q/29526281
tags question: http://stackoverflow.com/q/29473426
type: Tag
tags question: http://stackoverflow.com/q/29478751
tags question: http://stackoverflow.com/q/29501647
tags question: http://stackoverflow.com/q/29525354
tags question: http://stackoverflow.com/q/29445268
tags question: http://stackoverflow.com/q/29482225
tags question: http://stackoverflow.com/q/29445908
tags question: http://stackoverflow.com/q/29375100
tags question: http://stackoverflow.com/q/29428249
tags question: http://stackoverflow.com/q/29387231
tags question: http://stackoverflow.com/q/29516390
tags question: http://stackoverflow.com/q/29479460
tags question: http://stackoverflow.com/q/29414582
tags question: http://stackoverflow.com/q/29469434
tags question: http://stackoverflow.com/q/29412890
tags question: http://stackoverflow.com/q/29475553

http://stackoverflow.com/q/29386207
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29386434
type: Question
has comment: http://stackoverflow.com/comment/46952380
tagged with: newline
tagged with: javascript
has comment: http://stackoverflow.com/comment/46951457
has body: For IE, I tried several ways to add new lines in textarea without success. HTML &lt;textarea name="myTextarea" rows=4 cols=4 maxlength=250&gt;&lt;/textarea&gt; JAVASCRIPT var text= "line1 line2 line3"; text= text.replace(/\s/g, "\r"); $('textarea[name=myTextarea]').val(text); UPDATE I tried to remove the css associate to the textarea and its work. textarea{ white-space: nowrap; } The problem is that now I cannot display words in the same line without breaking them. But it requires another question
accepted answer: http://stackoverflow.com/a/29386434
tagged with: textarea
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: New lines in textarea doesn't work in IE
linked to: http://stackoverflow.com/q/2159622
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46951016
type: AnsweredQuestion

http://stackoverflow.com/comment/59040109
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29457759
has text: Perhaps your question should include: *Does the timeout fire immediately since the 10 seconds has passed, or does it continue counting down the remainder of the 10 seconds before firing?* Thomas's answer below seems to indicate the latter.

http://stackoverflow.com/a/29403268
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29400623
type: AcceptedAnswer
downvote count: 0
has body: I found a solution. Jesse's solution would work but would mean that as the data is manipulated it would need to be pulled in and out of the array (inefficient and a hassle). Instead we can do something with index. Here is an example: $h = new Handlebars\Handlebars; echo $h-&gt;render( '{{#each data}} {{@index}} {{#unless @last}}Not last one!{{/unless}}{{#if @last}}Last entry!{{/if}} {{/each}}', array( 'data' =&gt; ['a', 'b', 'c'] ) ); echo "\n"; echo $h-&gt;render( '{{#each data}} {{@index}} {{#if @first}}The first!{{/if}}{{#unless @first}}Not first!{{/unless}} {{/each}}', array( 'data' =&gt; ['a', 'b', 'c'] ) ); echo "\n"; echo $h-&gt;render( '{{#each data}} {{@index}} {{#unless @index}}The first!{{/unless}}{{#if @index}}Not first!{{/if}} {{/each}}', array( 'data' =&gt; ['a', 'b', 'c'] ) ); the output (master) will be: 0 Not last one! 1 Not last one! 2 Last entry! 0 The first! 1 Not first! 2 Not first! 0 The first! 1 Not first! 2 Not first! which is what you're looking for, right? even the example in wycats/handlebars.js#483, works: $h = new Handlebars\Handlebars; echo $h-&gt;render( ' {{#each data}} {{@index}} {{#if @last }} Last entry! {{/if}} {{/each}}', array( 'data' =&gt; ['a', 'b', 'c'] ) ); the output: 0 1 2 Last entry! simply do an #each and then check if @first and then manipulate it as a special case in your loop. I found my example here: https://github.com/XaminProject/handlebars.php/issues/52
accepted answer of: http://stackoverflow.com/q/29400623

http://stackoverflow.com/a/29498865
score: 0
type: Answer
has body: I can get your templates to bind to $scope by replacing your api calls with static json, see this pen: http://codepen.io/anon/pen/EazprP $scope.posts=[{ title:"Home" }] Maybe your json response is throwing it off? Can you post the json?
has comment: http://stackoverflow.com/comment/47157404
has comment: http://stackoverflow.com/comment/47156999
has comment: http://stackoverflow.com/comment/47156875
answers question: http://stackoverflow.com/q/29498310
has comment: http://stackoverflow.com/comment/47157159

http://stackoverflow.com/comment/105581367
comment on: http://stackoverflow.com/a/29633153
score: 0
type: Comment
has text: I have encountered `QuotaExceededError` in Electron 3.0.4 (Chrome derivative).
type: AnswerComment

http://stackoverflow.com/comment/59620984
type: AnswerComment
comment on: http://stackoverflow.com/a/33982868
has text: Actually we have gone for a 100% react build in the end. The backend API written in PHP with authentication via JWT.
type: Comment
score: 10

http://stackoverflow.com/a/29463218
type: Answer
answers question: http://stackoverflow.com/q/29463116
score: 0
has body: $('select').on('change', function (e) { var optSel = $("option:selected", this); var valSel = Number(this.value); for(var i = 0; i < valSel ; i++) { $("body").append(' Name: '); } }); http://jsfiddle.net/IronFlare/0ofkdfop/

http://stackoverflow.com/comment/46995582
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29408119
has text: No one have any answer for this . ?? :(
type: AnswerComment

http://stackoverflow.com/comment/46977519
type: QuestionComment
comment on: http://stackoverflow.com/q/29400479
type: Comment
has text: [jslint](http://www.jslint.com/) or [jshint](http://jshint.com/) can be very helpful to avoid having these kinds of embarrassing questions :)
score: 0

http://stackoverflow.com/q/29492143
possible better answer: http://stackoverflow.com/a/29492195
has comment: http://stackoverflow.com/comment/47143383
has answer: http://stackoverflow.com/a/29492223
has title: Return specific part of string in Javascript
has comment: http://stackoverflow.com/comment/47143252
has answer: http://stackoverflow.com/a/29492195
tagged with: javascript
answer count: 6
has comment: http://stackoverflow.com/comment/47143388
has comment: http://stackoverflow.com/comment/47143885
has comment: http://stackoverflow.com/comment/47143309
tagged with: regex
has comment: http://stackoverflow.com/comment/47143485
favorite count: 0
has body: I would like to manipulate this following string: 20_hbeu50272359_402_21 so that I am left with only hbeu50272359 is there a way to how could I delete those outer numbers? Not sure how to go about it. The strings may also take this format: hbeu50272359_402_21
accepted answer: http://stackoverflow.com/a/29492223
has answer: http://stackoverflow.com/a/29492286
has answer: http://stackoverflow.com/a/29492446
has answer: http://stackoverflow.com/a/29492657
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29492290
has comment: http://stackoverflow.com/comment/47145293
upvote count: 3
downvote count: 1
type: Question

http://stackoverflow.com/comment/46977841
has text: @FLefèvre those are both part of the `req` parameter
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29401024

http://stackoverflow.com/comment/47101447
type: QuestionComment
comment on: http://stackoverflow.com/q/29469911
has text: And is your modal by any chance an iframe ?
score: 0
type: Comment

http://stackoverflow.com/q/29397135
linked to: http://stackoverflow.com/q/25020816
type: Question
score: 0
has body: I have automatically created the services library with the loopback angular sdk but when I call it from my angular app it keeps in a blank page and in the javascript console I have the next error: "'Range.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-range-detach)."
answer count: 1
tagged with: javascript
has title: 'Range.detach' error at injecting loopback angular sdk
tagged with: angularjs
tagged with: sdk
tagged with: loopbackjs
has answer: http://stackoverflow.com/a/29397784
type: UnansweredQuestion

http://stackoverflow.com/comment/47018255
comment on: http://stackoverflow.com/q/29423289
has text: @newbie - The first string is a hex representation of [`flexymenu`](http://codecanyon.net/item/flexy-menu-responsive-horizontal-vertical-menu/5059149). Have you bought this product, and are trying to troubleshoot an issue, or are you trying to reverse-engineer it?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/29509740
score: 0
type: Answer
has body: You could add / remove an class (active for example) to the specific div. The example below shows this - you would however need to make some minor changes. First Part link to one one two three four five Javascript Css Working fiddle: https://jsfiddle.net/y05ub9bk/
answers question: http://stackoverflow.com/q/29509366

http://stackoverflow.com/a/29527459
answers question: http://stackoverflow.com/q/29527393
upvote count: 1
has comment: http://stackoverflow.com/comment/47210055
type: Answer
has comment: http://stackoverflow.com/comment/47209224
has comment: http://stackoverflow.com/comment/47209355
has comment: http://stackoverflow.com/comment/47209315
downvote count: 0
has body: Just move your var declaration inside your function. The way you have done the var was getting populated with the value once the javascript gets loaded, moving it to the function it will be populated at the onChange event and then the switch works nice. Another way that I would recomend is to not use this global variable and just use the parameter using the onchange like that: Question Happy Sad Cool Unsure
has comment: http://stackoverflow.com/comment/47209353
score: 1

http://stackoverflow.com/q/29404908
has comment: http://stackoverflow.com/comment/46984803
accepted answer: http://stackoverflow.com/a/29405912
tagged with: jquery
has comment: http://stackoverflow.com/comment/46984727
has comment: http://stackoverflow.com/comment/46985227
type: Question
has comment: http://stackoverflow.com/comment/46985260
has comment: http://stackoverflow.com/comment/46986002
tagged with: css
score: 0
has body: $('#notepad').hide(); $('#news').hide(); $('#todo').hide(); $('#notepadIcon').click(function(){ $('#notepad').toggle(); }); $('#newsIcon').click(function(){ $('#news').toggle(); }); $('#todoListIcon').click(function(){ $('#todo').toggle(); }); $('button').click(function(){ $('#todoListIcon').hide(); }); #todoListIcon, #newsIcon, #notepadIcon { font-size: 24px; cursor: pointer; margin-left: 100px; transition: 0.5s ease; display: inline-block; opacity: 0.8; color:#000; } #bottomRightIcons { bottom:15px; right:30px; position: fixed; display: inline-block; } #todo, #news, #notepad { width: 290px; height:250px; max-height: 350px; background-color:#000; position: fixed; bottom: 45px; right: 28px; border-radius: 3px; } #news { right: 152px; } #notepad { right: 277px; } Hide todo Firstly, I decided to make a fiddle to help show my issue. As you can see when you open one of the menus they appear in the correct position, but once you hide one of the icons they don't follow the location of the icon. Ideally, I'd like the menu div to act as a dropdown menu, as it follows the icon. Any ideas? Appreciate it.
answer count: 1
has answer: http://stackoverflow.com/a/29405912
has title: make div follow another div's location
tagged with: javascript
has comment: http://stackoverflow.com/comment/46985857
type: AnsweredQuestion

http://stackoverflow.com/a/29436660
upvote count: 1
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29436385
has body: Rather than writing new javascript for that, I would recommend you using Bootstrap affix instead. You just need to add the proper attributes to your navbar like this: --your navbar markup here-- where 200 is the pixels from top. Now just add this to your css: .affix { position: fixed; --other properties-- } And the navbar should use the .affix properties on scroll.
type: Answer

http://stackoverflow.com/q/29466134
has comment: http://stackoverflow.com/comment/47095554
has body: i have a jQuery v1.11.1 linked to my webpage along with other libraries (not jQuery, but runs with jQuery) everything works fine, until i add the show/hide function. The function works fine itself, tested on JSFiddle But, it stops other functions to work. So i add the jQuery.noConflict the results remain the same, Show/hide does not work and stops other scripts too. The jQuery: The HTML: Place Order some contents The SCRIPTS Stops Working: ************ UPDATE ************ This fiddle has all the libraries/plugins along with the show/hide code which isn't working on the fiddle as well => http://jsfiddle.net/devyaqoob/k3036fbv/
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29466478
accepted answer: http://stackoverflow.com/a/29467073
has comment: http://stackoverflow.com/comment/47096205
has comment: http://stackoverflow.com/comment/47094946
type: Question
has title: jQuery Conflicting scripts
has comment: http://stackoverflow.com/comment/47094956
has comment: http://stackoverflow.com/comment/47095721
has comment: http://stackoverflow.com/comment/47095972
tagged with: javascript
has comment: http://stackoverflow.com/comment/47095664
has comment: http://stackoverflow.com/comment/47095058
score: 0
has comment: http://stackoverflow.com/comment/47095351
has comment: http://stackoverflow.com/comment/47095397
answer count: 2
has comment: http://stackoverflow.com/comment/47095707
has answer: http://stackoverflow.com/a/29467073
tagged with: jquery
has comment: http://stackoverflow.com/comment/47095488
has comment: http://stackoverflow.com/comment/47095602
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29466478

http://stackoverflow.com/comment/47190541
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29424470
has text: I'm not sure I understand.. how do i post the rendered version? what shows up in the browser is a blank screen. so there is nothing on the rendered version if that is what you mean. unless I comment out and reference to object properties, and use javascript in render rather then jsx, in that case everything renders normally. i.e. hello world! prints "hello world!" when rendered.

http://stackoverflow.com/a/41969330
type: Answer
has body: Yes it is true that you need to return true from your function. I also found that if I hit a breakpoint in my function, the keydown event seems to ignore that I had returned true. Disable all breakpoints and it works fine.
answers question: http://stackoverflow.com/q/29475587
score: 0

http://stackoverflow.com/a/29530250
score: -1
answers question: http://stackoverflow.com/q/29530181
upvote count: 0
has body: You can call javascript function by using below code. ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "key", "yourfunctionhere();", true);
has comment: http://stackoverflow.com/comment/47214646
type: Answer
downvote count: 1

http://stackoverflow.com/a/29380599
has comment: http://stackoverflow.com/comment/47306752
has comment: http://stackoverflow.com/comment/46975657
has body: First you should make a separate secure PHP connection page // connection.php &lt;?php function db(){ return new mysqli('host', 'username', 'password', 'database'); } ?&gt; You're problem is that you don't actually get any results by just making a query. You still have to get the query results and use them in your code: &lt;?php include 'connection.php'; $db = db(); $r = array(); if(isset($_POST['randImg'])){ if(+$_POST['randImg'] === 1){ if($iq = $db-&gt;query('SELECT images image FROM images ORDER BY RAND() LIMIT 1')){ if($iq-&gt;num_rows &gt; 0){ $fi = $iq-&gt;fetch_object(); $r['image'] = $fi-&gt;image; } else{ // no results were found } $iq-&gt;free(); } else{ // connection failure } } else{ // randImg hack } } echo json_encode($r); $db-&gt;close(); ?&gt; Get that in JavaScript as data.image inside your success function. function getRandomImg(gameFunc){ $.post('scripts/imagerandomizer.php', {randImg:1}, function(data){ var im = $('#imageId'); im.attr('src', data.image); im.load(function(){ gameFunc(/* pass args to gameFunc here */); } }, 'json'); } getRandomImg(function(){ // game code here - could also pass function name instead of Anonymous function });
score: 0
has comment: http://stackoverflow.com/comment/47404802
has comment: http://stackoverflow.com/comment/46980338
type: Answer
answers question: http://stackoverflow.com/q/29375530

http://stackoverflow.com/comment/47019596
score: 1
comment on: http://stackoverflow.com/q/29423889
type: Comment
type: QuestionComment
has text: could you make a fiddle of it ? https://jsfiddle.net/

http://stackoverflow.com/comment/46933898
comment on: http://stackoverflow.com/q/29376702
has text: you should return a function reference, while you're returning the result that `myfunction(summ)` returns. Try to evaluate it manually with a piece of paper.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47085100
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29460602
score: 1
has text: From what I can tell, the [specification does state](http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-DocumentStyle-styleSheets) that `document.styleSheets` should show the number of ` ` elements as long as the `type` and `href` attributes are set correctly. But you could easily chalk this up as one of those edge-cases that inevitably pop up.

http://stackoverflow.com/comment/47120356
score: 0
comment on: http://stackoverflow.com/q/29478166
type: Comment
type: QuestionComment
has text: @adeneo: There are already methods using which I can simulate the browser DOM methods on the obtained HTML. Something like this: function parseHTML(text) { var doc = document.implementation.createHTMLDocument("TestTitle"); doc.documentElement.innerHTML = text; return doc; }

http://stackoverflow.com/q/29495141
has comment: http://stackoverflow.com/comment/47149259
has comment: http://stackoverflow.com/comment/47180112
type: Question
has body: Actually this problem is asked already but in my case no solution given are working. So i have a infragistic grid with check-boxes and based on the row checked i am sending the row-indexes to controller.Am getting indexes in controller but then the method is not working. Please help me with this. Thanks in advance Below is the code: view: &lt;script type="text/javascript"&gt; $('#save-selected-rows-button').on('click', function () { var $grid = $('#grid'); var checkedRows = $grid.igGridSelection("selectedRows"); var indexes = $.map(checkedRows, function (checkedRow) { return checkedRow.index; }); $.ajax({ type: 'POST', url: '@Url.Action("ExportGPAttribute", "Export")', dataType: 'json', contentType: "application/json;", data: JSON.stringify(indexes), success: function (data) { console.log(data); }, failure: function (errMsg) { console.log(errMsg); } }); }); &lt;/script&gt; controller: public ActionResult ExportMasterData(List&lt;string&gt; checkedRowsIndexes) { if (ModelState.IsValid) { //workbook creation Workbook currentWorkbook = new Workbook(); ///region if (checkedRowsIndexes != null &amp;&amp; checkedRowsIndexes.Contains("0")) { //export to excel} if(checkedRowsIndexes.Contains("1")) {//export to excel} return View(); } else return View(); Export to excel code: if (checkedRowsIndexes != null &amp;&amp; checkedRowsIndexes.Contains("0")) { var service_region = ObjectFactory.GetInstance&lt;IRegionControllerService&gt;(); var collection_region = service_region.GetRegionViewModel().ToList(); Worksheet regionsheet = currentWorkbook.Worksheets.Add("Region"); foreach (var cell in regionsheet.GetRegion("A1:C1")) { cell.CellFormat.FillPattern = FillPatternStyle.Solid; cell.CellFormat.Font.Bold = ExcelDefaultableBoolean.True; } regionsheet.Rows[0].Cells[0].Value = "Region Name"; regionsheet.Rows[0].Cells[1].Value = "Region Code"; regionsheet.Rows[0].Cells[2].Value = "Status"; regionsheet.Columns[0].Width = 6100; regionsheet.Columns[1].Width = 3000; regionsheet.Columns[2]…
has comment: http://stackoverflow.com/comment/47182077
tagged with: infragistics
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/47181831
score: 0
has comment: http://stackoverflow.com/comment/47172827
linked to: http://stackoverflow.com/q/5826649
tagged with: asp.net-mvc-4
has answer: http://stackoverflow.com/a/29508240
type: UnansweredQuestion
has title: passing checked rowid from view to controller not working

http://stackoverflow.com/a/29425464
has comment: http://stackoverflow.com/comment/47076260
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29414831
score: 1
has body: Why not you using Hashing method instead Cross Origin? Use SHA-256 Every time your API trigger some request, include hash. Sample for javascript. Reference: http://www.jokecamp.com/blog/examples-of-creating-base64-hashes-using-hmac-sha256-in-different-languages/#js
downvote count: 0

http://stackoverflow.com/q/29462305
has body: Suppose I had some text from a div tag like this: This is some cool content... Now if I wanted to, I could create a JavaScript function that will print the characters one at a time and it will work just fine. Example below. function printSentence(inner, outer, index, speed) { var input = document.getElementById(inner).innerHTML; var timer = setInterval(function(){ document.getElementById(outer).innerHTML+=input.charAt(index); index++; if(index == sentence.length -1){ printResume(inner, outer, index+1, speed); }else{ clearInterval(timer); } }, speed); } printSentence("contentDiv", "outPutContainer", 0, 100); Again, the above function works just fine, however let's say I wanted to take into account html tags within the element, how would that work. An example would be This is some cool content Paragraph of content So the ideal effect would be This is some cool content Paragraph of content (The typewriter effect was inspired by Charlie) "I like to give credit where credit is due" (: Javascript typing effect I suppose I can throw in a jsFiddle to make easier on folks. http://jsfiddle.net/bJxe3/19/
accepted answer: http://stackoverflow.com/a/29462670
has comment: http://stackoverflow.com/comment/47088311
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29462670
has title: How to create a typewriter effect in JavaScript THAT will take into account html tag rules?
upvote count: 6
score: 6
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/19912375
type: Question

http://stackoverflow.com/q/29395438
has title: Issues with JavaScript clock
favorite count: 0
has comment: http://stackoverflow.com/comment/46968013
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46967373
upvote count: 0
has answer: http://stackoverflow.com/a/29395643
accepted answer: http://stackoverflow.com/a/29395643
has body: I'm having an issue modifying this javascript code to include seconds on the clock displayed. I've tried to highlight the additions I've made to the source via \|/\|/ before and after the section in both the HTML and Javascript. Sorry if it's not as clear. There isn't a way to bolden Code sections. I understand the HTML easily enough: : \|/\|/ : \|/\|/ , Here is the Javascript code (I've removed the style modifying section as It's not required of the question): window.addEventListener('load', init, false); /* =================================================== */ /* === GENERAL UTILITIES ============================= */ /* =================================================== */ function $(selector, parent) { // Get element(s) shortcut if ( selector.nodeType ) { // if it an element, return it return selector; } // Set the parent element to search within if ( !parent ) { parent = document; } else if ( !parent.nodeType ) { // parent given is an id parent = $(parent); } switch ( selector.charAt(0) ) { case ".": return parent.getElementsByClassName(selector.substr(1))[0]; break; case "#": return parent.getElementById(selector.substr(1)); break; case ",": return parent.getElementsByClassName(selector.substr(1)); break; case ">": return parent.getElementsByTagName(selector.substr(1)); break; default: return parent.getElementsByTagName(selector)[0]; break; } } function checkForClass(nameOfClass, element) { if (typeof element == 'string') { element = $(element); } if (element && element.className != '') { return new RegExp('\\b' + nameOfClass + '\\b').test(element.className); } else { return false; } } function addClass(nameOfClass, element) { if (typeof element == 'string') { element = $(element); } if (element && !checkForClass(nameOfClass, element)) { element.className += (element.className ? ' ' : '') + nameOfClass; } } function removeClass(nameOfClass, element) { if (typeof element == 'string') { element = $(element); } if (element && checkForClass(nameOfClass, element))…
type: AnsweredQuestion
score: -1
type: Question
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46967584
tagged with: javascript

http://stackoverflow.com/comment/46966939
type: Comment
has text: `var idaevolta = $('idaevolta:checked').val(); var idaevolta = checkedValue ? 'Yes' : 'No';` ???
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29394527

http://stackoverflow.com/comment/46953313
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29387368
has text: @ArunD - If you want the focus back to the text box after Clicking "ok" button of alert, then you have to focus the textbox using foucs function of input ON the Close event of Dialog

http://stackoverflow.com/q/29412629
score: 0
has body: this is my code for in php file from which i recall a refresh php again nd again its working fine but now i have $id which i get while performing some query now i want to send it refresh.php page where some query will be performed then i get result back as return function repeatAjax(){ var arrPoints; $.ajax({ url: 'refresh.php', cache: false, success: function(result) { if(result){ var resultJson = $.parseJSON(result); refresh_point(resultJson["latitude"],resultJson["longitude"]); } } }); } this is my refresh.php page &lt;?php $hostname_localhost ="localhost"; $database_localhost ="map"; $username_localhost ="root"; $password_localhost =""; $localhost = mysql_connect($hostname_localhost,$username_localhost,$password_localhost) or trigger_error(mysql_error(),E_USER_ERROR); mysql_select_db($database_localhost, $localhost); //i want $id here so i can use it instead of 6 $query_search1 = "SELECT lat ,lng FROM van WHERE id =6"; $query_exec2 = mysql_query($query_search1) or die(mysql_error()); $row = mysql_fetch_assoc($query_exec2); $row1= $row['lat']; $row2= $row['lng']; $advert = array( 'latitude' =&gt; $row['lat'], 'longitude' =&gt; $row['lng'], ); echo json_encode($advert); ?&gt; code is working awesome if i don't want to send some thing to refresh php if i just type id 6 i get the return OK fine but i want to post some thing but how ??
has comment: http://stackoverflow.com/comment/46998032
has title: ajax can i use ajax to send a variable which is use in mysql perform some query then result back to me as return
tagged with: php
accepted answer: http://stackoverflow.com/a/29412818
type: AnsweredQuestion
tagged with: mysql
has comment: http://stackoverflow.com/comment/46998026
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46998082
has answer: http://stackoverflow.com/a/29412818
tagged with: ajax

http://stackoverflow.com/q/29510266
favorite count: 0
tagged with: gulp-inject
linked to: http://stackoverflow.com/q/9210542
has body: I have a project where I have to generate translated static pages. The choice was to use gulp because it helps a lot in minifying resources, watch for file changes and re-compile, and can also inject html templates in several pages. I used: - 'gulp-inject': for inserting templates into final files - 'gulp-translate-html': for translating because I have '.json' dictionaries So I have two issues: 'gulp-translate-html' This uses the json as input for translating, using the following code: gulp.task('translate', function() { return gulp.src('./temp/en/template.html') .pipe(translateHtml({ messages: require('./dictionary/en.json'), templateSettings: { interpolate: /{{([\s\S]+?)}}/g } })) .pipe(gulp.dest('./en')); }); I created a watch on the '.json' file, when modified, it should re-apply the translation. But somehow it uses the old file instead of the modified one. Is there a workaround for this? Or other plugin that I could use for the json files? 'gulp-inject' In the code-sample above, I translated only one file. But I need to do so for several languages that have different destinations, so I used a loop for the languages.(sorry for the code indentation) var gulp = require('gulp'), inject = require('gulp-inject'), translateHtml = require('gulp-translate-html'); var languages = ['en', 'de']; gulp.task('injectContent', function() { /* the base file used as a reference*/ var target = gulp.src('./templates/base/baseTemplate.html'); /* get each language*/ languages.forEach(function(lang) { target.pipe(inject(gulp.src('./templates/partials/injectTemplate.html'), { relative: true, starttag: '&lt;!-- inject:template --&gt;', transform: function (filePath, file) { return file.contents.toString('utf8'); } })) /* put the merged files into "temp" folder under its language folder*/ .pipe(gulp.dest('./temp/'+lang)); }); }); /* The translation has to be made after the injection above is finished*/ gulp.task('translate', ['injectContent'] function() { /* get each language*/ languages…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29511554
downvote count: 0
accepted answer: http://stackoverflow.com/a/29511554
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
has title: Gulp pipe and caching issue when using "gulp-translate-html" and "gulp-inject"
tagged with: gulp-watch
upvote count: 1
answer count: 1
linked to: http://stackoverflow.com/q/26784094
tagged with: gulp

http://stackoverflow.com/comment/47135481
type: Comment
comment on: http://stackoverflow.com/a/29487961
score: 0
type: AnswerComment
has text: The OP is asking, the first statement of `factory` which is `alert("test factory")` It's more to do with controller code than with factory.

http://stackoverflow.com/q/29429416
type: Question
has comment: http://stackoverflow.com/comment/47030712
has comment: http://stackoverflow.com/comment/47033992
tagged with: html-table
answer count: 2
has answer: http://stackoverflow.com/a/29430463
upvote count: 1
tagged with: jquery
favorite count: 0
has title: how to find next directly download cell within a table
tagged with: http://stackoverflow.com/tag/html
has body: I have a table with colspan rowspan eg. A1 A2 A3 A4 A5 A6 A7 A8 B1 B2-B4 B5 B6 B7 B8 C1 C2 C3 -C5 C6 C7 C8 D1 D2- E3 D4 D5 D6 D7 D8 E1 E4 E5 E6 E7 E8 F1 F2 F3 F4 F5 F6 F7 F8 now I am at some cell how to get the next directly downside cell. (this is for ui interaction response on key down action.) eg. If now I am at cell A2 ,I want to get B2-B4, If now I am at cell A3 ,I want to get B2-B4, If now I am at cell B2-B4 ,I want to get C2, If now I am at cell B5 ,I want to get C3-C5, If now I am at cell A3 ,I want to get B2-B4, If now I am at cell C3-C5 ,I want to get D2-E3, If now I am at cell D2-E3 ,I want to get F2, in javascript code how to get this kind of next cell .
has comment: http://stackoverflow.com/comment/47029299
downvote count: 0
has answer: http://stackoverflow.com/a/29430834
type: UnansweredQuestion
score: 1
tagged with: javascript
tagged with: dom

http://stackoverflow.com/comment/47099182
score: 1
has text: Yes, I can understand that, but the fact is, that there's no way for a web-page to access the path.
comment on: http://stackoverflow.com/q/29467588
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29382214
favorite count: 0
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29382317
score: 2
has comment: http://stackoverflow.com/comment/46943914
has comment: http://stackoverflow.com/comment/46944358
has title: AngularJS: Dynamic URL Prefix
has body: I have a large angular app that lives at a URL like so: http://myangularapp.com/app/index.html#/ The URL I intend on giving out will need a name injected into the URL as this one site will support multiple users. So, without modifying any directory structure, I'd like to do: http://myangularapp.com/app/bob/index.html#/ and also: http://myangularapp.com/app/harry/index.html#/ All my controllers and functionality would ideally stay the same. Super stumped on this one!
type: Question
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/46969420
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/47124752
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29482098
has text: I dont think there's any other way
score: 0

http://stackoverflow.com/a/29381356
type: Answer
score: 1
has body: You can remove it using GoogleMaps DOMEvents, for example lets say we want to remove it on the click (seems the more appropriate, since atleast we want to show the marker on the mark, if not, just remove it from the js code). Using Google Maps API Bassed on your example, just add this code, into the initialize function google.maps.event.addDomListener(map, 'click', removeMarker()); Here is the JSfiddle If you want to alert the user why the marker is gone, use a function instead, like this. function removeMarker(ele){ ele.remove(); alert('Ok the marker is GONE!') } google.maps.event.addDomListener(map, 'click', removeMarker(this)); Here is the other JSFiddle with the function. Pure Javascript If you want to remove it outside the initialize function with pure Javascript code, use the remove() method like @Adam point on the comment, something like this. function removeMarker(elem){ console.log('removed') elem = document.getElementById("map_canvas"); elem.childNodes[0].remove() } setTimeout(function(){ removeMarker(this) }, 3000); Here is the pure JS JSFiddle
upvote count: 1
answers question: http://stackoverflow.com/q/29381126
accepted answer of: http://stackoverflow.com/q/29381126
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/47028303
has text: is i am missing something ?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29428157

http://stackoverflow.com/a/29440782
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29421047
score: 1
has body: In the index.html of your main state, switch views based on the money variable. E.a.: .state('main', { url: '/', controller: 'MainCtrl' }) In your MainCtrl set a variable based on the output of your function: $scope.money = "bank" or $scope.money = "emptybank" Then in your index.html call a view: &lt;div ng-view="{{$scope.money}}"&gt;&lt;/div&gt; In your router: .state('main.bank', { url: '/bank', views: { bank: { controller: 'BankCtrl', templateUrl: 'bank/bank.html' }, emptybank: { controller: 'EmptyBankCtrl', templateUrl: 'bank/emptybank.html' } } }) Sorry in advance for any syntax errors. Typed it from head on my mobile phone. But this should fix your problem and in the progress make it more "Angularesque" :-)
upvote count: 1

http://stackoverflow.com/comment/47067251
comment on: http://stackoverflow.com/q/29449886
type: Comment
type: QuestionComment
score: 0
has text: That's why it's common to see an `extend` method. [jQuery has one](http://api.jquery.com/jQuery.extend/), and [so does underscore](http://underscorejs.org/#extend).

http://stackoverflow.com/q/29495059
score: 1
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29495975
answer count: 1
tagged with: ractivejs
downvote count: 0
has body: a ractive instance may include remote data and many components contains remote data. my target is render the whole ractive instance only one time when we get all the remote data.my sample code is here, and i wanna know how to put all these into a plugin. /* DataGrid is a component that contains async request */ var DataGrid = Ractive.extend({ template:'&lt;ul&gt;{{#datalist}}&lt;li&gt; {{.}}&lt;/li&gt; {{/datalist}}&lt;/ul&gt;', oninit: function(){ var app = this // load init data by async request setTimeout(function() { app.set('datalist', [1, 3, 5]) app.add('ajaxLoadedNum') }, 2000 * Math.random()) } }) Ractive.components.datagrid = DataGrid var app = new Ractive({ template: '#tmpl', data: { ajaxLoadedNum: 0, ajaxTotalNum: 3 } }) var listender = app.observe('ajaxLoadedNum', function(val, old){ if (val == app.get('ajaxTotalNum')) { app.render('#c') listender.cancel() } })
favorite count: 0
type: UnansweredQuestion
tagged with: mvvm
has title: auto render ractive once when contains aysnc requests

http://stackoverflow.com/q/29373993
type: Question
tagged with: c#
type: AnsweredQuestion
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: I've been working on a HTML helper which will hide or show menu items depending on what type of user you are. For this reason, In one of my controllers I am setting a session variables with values such as "ADMIN" context.Session["perfil"] = "ADMIN" The problem I am facing is that the Helper function is being called before the Javascript function which calls the controller that sets the session variables This is how I call my HtmlHelper (through Razor) @using XSiteManagerWeb.Helpers @Html.Raw(Html.MiMenu("../Home/Configuracion", "Configuración")) From my _Layout.cshtml But before doing that I'm calling the function Which calls a Controler method through Ajax ... $.ajax({ url: "../Home/ObtenerDatosSesion", .... Question: Why is the HtmlHelper being called before ObtenerDatosSesion(); even though I've put it before on the _Layout.cshtml ? I've also tried calling in on window load doing this: among other methods. I noticed the Helper is being called before everytime after many debuggings. What I can't figure out is why that happens. I wonder if it has anything to do with the Web.config line one has to put to use html helpers <add namespace="XSiteManagerWeb.Helpers"/> So to make it clear, I just want to make my "ObtenerDatosSesion(); method gets called before my html helper!
has answer: http://stackoverflow.com/a/29374106
tagged with: asp.net-mvc-4
has title: Call Javascript Function before Razor calls my HTML Helper
accepted answer: http://stackoverflow.com/a/29374106
tagged with: razor

http://stackoverflow.com/comment/47058748
type: QuestionComment
has text: Maybe you could try using a library helping with common javascript operations. One of most famous: https://jquery.com/
comment on: http://stackoverflow.com/q/29445803
score: 0
type: Comment

http://stackoverflow.com/comment/47163926
score: 0
comment on: http://stackoverflow.com/q/29502200
type: QuestionComment
has text: Okay, when you do self.breweries(data.results), what does self.breweries() equal?
type: Comment

http://stackoverflow.com/comment/47041801
type: QuestionComment
has text: Do you mean seralizing getDayOfWeek to JSON?
comment on: http://stackoverflow.com/q/29436443
score: 0
type: Comment

http://stackoverflow.com/comment/47046739
score: 7
has text: Wrap it with `if (!String.prototype.endsWith)` and note that `endsWith` takes an extra argument, `position` "Optional. Search within this string as if this string were only this long; defaults to this string's actual length, clamped within the range established by this string's length."
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29435149

http://stackoverflow.com/a/29444916
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29444609
type: Answer
has body: You are trying to store the condition (not operator). // (within a loop) var first_condition = id &lt; arr.length - 1; // stored as true or false (boolean) var second_condition = a !== null; // note the !== NOT != if ( first_condition &amp;&amp; second_condition ) { // lots of thing here } Although if you meant redundant as in else ifs with same condition, you can do nested if instead. if ( first_condition ) { if ( second_condition ) { } }
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29444609

http://stackoverflow.com/comment/47091829
score: 0
type: Comment
type: QuestionComment
has text: @Yousef I am using ngStorage module and $localStorage.$reset() does not work neither.
comment on: http://stackoverflow.com/q/29458834

http://stackoverflow.com/comment/47119430
type: AnswerComment
score: 0
type: Comment
has text: That would be a good idea but in my use cases it's not always the same length, I use the system for other kinds of columns for example the country/city abbreviations instead of just the time
comment on: http://stackoverflow.com/a/29479111

http://stackoverflow.com/a/46120227
score: 0
accepted answer of: http://stackoverflow.com/q/29431578
answers question: http://stackoverflow.com/q/29431578
type: Answer
has body: With Javascript, the answer is to dynamically add negative rotation to the child to compensate the parent. Without Javascript, use a common container, but don't actually put the sticky element into the rotating one. The fiddle has been updated with this example. ( ͡° ͜ʖ ͡°) Click this! No, click this!
type: AcceptedAnswer

http://stackoverflow.com/q/29417632
has answer: http://stackoverflow.com/a/35060945
type: AnsweredQuestion
upvote count: 1
accepted answer: http://stackoverflow.com/a/29418464
tagged with: sharepoint-2013
type: Question
has answer: http://stackoverflow.com/a/66345965
tagged with: javascript
tagged with: sharepoint
answer count: 3
downvote count: 0
score: 1
has title: Allow Save new item and continue in SharePoint NewForm.aspx
favorite count: 0
has answer: http://stackoverflow.com/a/29418464
has body: Short : How to make a default SharePoint NewForm.aspx add an item and stay on the input page instead of returning to the list view AllItems? long : I am asked to allow SharePoint users to enter many new items to a SharePoint list without having to return to AllItems each time they save. This requirement applies to many lists so I don't want to develop specific code for every possible content type. I though I could write a short js file and use it whenever the the user wants to save and continue. So far I tried to add the "Save and continue" behavior in a Content Editor Web Part (CEWP). My first approach was to change the Source= parameter with no success (either cancel returned also to the new source or the source was ignored when set in preSaveAction(). Then I tried to set the form action in preSaveAction : &lt;script type="text/javascript"&gt; JSRequest.EnsureSetup(); var src = JSRequest.QueryString["Source"]; var exit = JSRequest.QueryString["exit"]; var isDialog = JSRequest.QueryString["IsDlg"]; var dlgParam = ""; if (isDialog) dlgParam = "&amp;IsDlg="+isDialog; //If exit is defined its keeping default source parameter if (exit) { document.forms.aspnetForm.action= location.pathname+"?Source="+exit+dlgParam; } function PreSaveAction(){ //before saving the original source is saved in exit exit=JSRequest.QueryString["Source"]; src=escapeProperly(window.location.protocol + '//' + window.location.host + _spPageContextInfo.serverRequestPath); document.forms.aspnetForm.action=location.pathname+"?Source="+src+"&amp;exit="+exit+dlgParam; return true; The action is updated as expected but the user is still redirected to AllItems.aspx when a new item is saved. Another attempt was to add a specific button reusing the SharePoint javascript action used in the ribbon and page buttons &lt;script type="text/javascript"&gt; function adressePage() { return window.location.protocol + '//' + window.location.host + _spPageContextInfo.serverRequestPath; } function saveContinue() { doc…
possible better answer: http://stackoverflow.com/a/35060945

http://stackoverflow.com/comment/47007194
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29417489
type: Comment
has text: remember that you can only use the geospatial queries on collections with [2d geospatial indexes](http://docs.mongodb.org/v2.2/core/geospatial-indexes/)

meteor-jasmine
tags question: http://stackoverflow.com/q/29392283
type: Tag
tag name: meteor-jasmine
tags question: http://stackoverflow.com/q/29373851

http://stackoverflow.com/a/29499395
answers question: http://stackoverflow.com/q/29498296
type: Answer
accepted answer of: http://stackoverflow.com/q/29498296
score: 2
has body: Ok, I got the answer here. Add the CSS: Add the libraries: And the script: $(document).ready(function() { alert('a'); $('#send').qtip({ // Grab some elements to apply the tooltip to content: { text: 'My common piece of text here' } }); });
upvote count: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/102404725
has text: Java implemented weak references 17 years earlier (v1.2 in 1998), so there are more explanations available in Java land. For example: https://web.archive.org/web/20061130103858/http://weblogs.java.net/blog/enicholas/archive/2006/05/understanding_w.html
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29413222

http://stackoverflow.com/a/29479776
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/29479718
has body: are you sure you actually need an array: var counters = $(".move-counter"); counters.each(function(){ var counter = $(this); console.log(counter.text()); })
downvote count: 0
has comment: http://stackoverflow.com/comment/47120112

http://stackoverflow.com/comment/47130162
type: QuestionComment
type: Comment
has text: Although you may be able to find a foolproof way to disable the CTRL-F shortcut that most browsers have for find, what if the user changes the shortcut, or clicks on the Find option through their browser's menu? More plainly, what are you attempting to accomplish by attempting to disable the Find function?
score: 3
comment on: http://stackoverflow.com/q/29485158

junit
type: Tag
tag name: junit
tags question: http://stackoverflow.com/q/29488078

http://stackoverflow.com/a/29393873
has comment: http://stackoverflow.com/comment/46964557
upvote count: 3
answers question: http://stackoverflow.com/q/29393759
score: 3
has body: In your html the filter value is not correct. iPhone value should have a capital 'P'
accepted answer of: http://stackoverflow.com/q/29393759
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/29438809
has comment: http://stackoverflow.com/comment/47047612
has comment: http://stackoverflow.com/comment/47053432
score: 1
has answer: http://stackoverflow.com/a/29438877
has body: i just began a project in html and jquery and i have to compare validate a period.it means that user must enter two years and the second one should be bigger than the second one.i tried this and it doesn't work: this is my html code Période de fréquentation De à and this one is my jquery function: ` $(document).ready(function() { $('#pe').click(function() { { if ($(this) > $('#pe')){ alert("veuillez corriger la periode de frequentation"); return false ; } else return true; }}}`
has comment: http://stackoverflow.com/comment/47046309
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: comparing two inputs in jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/47046423
accepted answer: http://stackoverflow.com/a/29438877
tagged with: http://stackoverflow.com/tag/html
upvote count: 1
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47046573

http://stackoverflow.com/comment/47060566
score: 0
type: Comment
has text: I have a second search on the site with the same code as before only with div .toggle-serach2 and .expand-search2, how can i make your code so it wont overlap. just changing the name to $('toggle-search2') doesn't cut it.
comment on: http://stackoverflow.com/a/29446159
type: AnswerComment

http://stackoverflow.com/comment/46971365
has text: Just to check: The coloured circles are even-spaced, do you mean that the position of the circles should be determined by the length of the text? If so, you could use `.getComputedTextLength()` on the text. Here's a fiddle I made which shows your problem - It's useful to create these to work on: http://jsfiddle.net/henbox/7Le4tc92/1/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29396072

http://stackoverflow.com/a/29433146
has body: That fiddle with example (except getJson i use parse from html for visual test) : http://jsfiddle.net/Lpj5203v/2/ That ur answer: FIRST - u have error in your json results, look: "query id": 2, "query status": "under process", "query results number": null, In jd.list_of_queries[1] - u miss '_' in keys of hash. That the javascript with answer: And also i fix your html to valid: Generate your own query Query query_id query_status Remember: not , but always close input and img tags by in table structure is: P.S. Also, u have a lot syntax errors in js, html, json - try to be more attentive to your error console log P.P.S a += b the same is a = a + b But a += a + b += c - is syntax error!
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47037647
has comment: http://stackoverflow.com/comment/47036880
type: Answer
answers question: http://stackoverflow.com/q/29433082
has comment: http://stackoverflow.com/comment/47037818
score: 2
accepted answer of: http://stackoverflow.com/q/29433082
has comment: http://stackoverflow.com/comment/47036925
has comment: http://stackoverflow.com/comment/47035983
has comment: http://stackoverflow.com/comment/47037859
upvote count: 2
has comment: http://stackoverflow.com/comment/47036832

http://stackoverflow.com/a/43675825
answers question: http://stackoverflow.com/q/29459749
score: 1
downvote count: 0
has body: Proper way to inject &lt;script&gt; in Aurelia view is to use document.createElement('script'); in attached() like described here https://stackoverflow.com/a/36521405/4958643 or to make custom element like &lt;script-injector&gt; as described here http://www.sobell.net/calling-external-javascript-from-within-aurelia-templates/
type: Answer
upvote count: 1

http://stackoverflow.com/comment/47019411
comment on: http://stackoverflow.com/a/29423763
type: Comment
has text: Thanks man, i tried it how you say but it dissappears even when the div is filled with other divs.
score: 0
type: AnswerComment

http://stackoverflow.com/a/29528515
has comment: http://stackoverflow.com/comment/47254902
has comment: http://stackoverflow.com/comment/47285117
upvote count: 5
type: Answer
answers question: http://stackoverflow.com/q/29524980
has comment: http://stackoverflow.com/comment/47284756
downvote count: 0
has comment: http://stackoverflow.com/comment/47283879
accepted answer of: http://stackoverflow.com/q/29524980
has comment: http://stackoverflow.com/comment/47284767
has body: This problem occurs for several reasons. Firstly, Any code placed within $(document).ready(); and loaded on the ajax called page (contained page) will not be executed after it is loaded. Secondly, any references to external scripts (&lt;script src&gt;) aren't guarantied to load before inline scripts. In the case of Yii2 these inline scripts would be registered with registerJs() Getting Pjax to play nice with complex script dependent pages to load is not trivial. A few things to solve your issues: 1) Inline scripts loaded with registerJs() and set with a position of POS_READY (default?) will be contained within a $(document).ready() if the view is rendered via render(). Thus it is important to render via renderAjax(). This will ensure that the inline scripts will run. Sometimes (most times) you will need to use render() when statically loaded and renderAjax() when pjax loads a page. In your instance this is required in order to place the Pjax widget in the layout. You can use the following code for these situations: if(Yii::$app-&gt;request-&gt;getHeaders()-&gt;has('X-PJAX')) { return $this-&gt;renderAjax('myview'); } else { return $this-&gt;render('myview'); } 2) When writing external scripts that you know will load within the context of a pjax call. Use: $(document).on('ready pjax:success', function(){ // ... }); This will load the script correctly. But keep in mind that it will reload/rebind the script every time a Pjax call succeeds. That might not be desired unfortunately. Also keep in mind that the pjax:success event does not necessarily fire after the external scripts from the contained page are loaded. See 3) 3) To solve script order issues you will need to remove the following line from the pjax.js script: obj.scripts = findAll(obj.contents, 'script[src]').remove() This will however create issues with browsers that are set to disable eval() (hence why the line exists in the first place) Pjax will eventualy have this sorted. You can keep track of the progress…
score: 5
has comment: http://stackoverflow.com/comment/58907861
has comment: http://stackoverflow.com/comment/47254973
has comment: http://stackoverflow.com/comment/47296776
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/58895472

http://stackoverflow.com/q/29467990
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29469883
has comment: http://stackoverflow.com/comment/47098511
tagged with: selenium-webdriver
score: 2
has title: Selenium driver does not reflect page changes after click()
upvote count: 2
tagged with: java
tagged with: selenium
tagged with: webdriver
has body: The source returned by the following code does not reflect changes in the web page caused by a javascript after calling click(). What am I missing? driver.findElement(By.xpath(xpath)).click(); // changes page content Thread.sleep(10000); String src = driver.getPageSource(); // src does not reflect changes
type: Question
has comment: http://stackoverflow.com/comment/47098619
tagged with: javascript
has comment: http://stackoverflow.com/comment/47098322
has comment: http://stackoverflow.com/comment/47114486
has comment: http://stackoverflow.com/comment/47098606
has comment: http://stackoverflow.com/comment/47098196
has comment: http://stackoverflow.com/comment/47098257
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47098348
favorite count: 0

http://stackoverflow.com/q/29486532
favorite count: 0
linked to: http://stackoverflow.com/q/11896160
type: Question
has comment: http://stackoverflow.com/comment/47133345
has title: How to detect if user has open more than one window or tab on the same session?
has answer: http://stackoverflow.com/a/78437790
score: 10
has answer: http://stackoverflow.com/a/38426283
has body: I would like to detect if user has open more than one window or tab on the same session and if he did it - I would like to print an special information on screen. This limte should oblige only in one special URL, so if user has open two tabs/windows with urls: http://page.com/limite.htm - I would like to print special information. When user has open two windows/tabs with urls: http://page.com/limite.htm and http://page.com/index.htm - everything is OK and I wouldn't show any informations. Is it possible? Thanks.
has comment: http://stackoverflow.com/comment/47132672
has answer: http://stackoverflow.com/a/29487073
has answer: http://stackoverflow.com/a/43691671
has comment: http://stackoverflow.com/comment/47133673
linked to: http://stackoverflow.com/q/14573223
type: UnansweredQuestion
upvote count: 10
answer count: 4
has comment: http://stackoverflow.com/comment/47132707
linked to: http://stackoverflow.com/q/23690666
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/47133105

http://stackoverflow.com/a/29385141
has body: I would have done this as below- By giving a class to parent tr- &lt;tr class="parent"&gt; And then- $(this).closest('tr.parent').index() Because if the case is nested tr(s) then parent() wont' be working for longer.
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29385054
downvote count: 0
type: Answer

http://stackoverflow.com/a/29411960
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29411854
has body: use .removeClass(); instead of .remove();

http://stackoverflow.com/comment/47024103
type: Comment
comment on: http://stackoverflow.com/a/29414434
has text: i am getting only file data
type: AnswerComment
score: 0

http://stackoverflow.com/a/29496835
answers question: http://stackoverflow.com/q/29496367
accepted answer of: http://stackoverflow.com/q/29496367
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/47152682
has body: If you want each UID to have a unique ID, could you use something like ' ' + json2[i].UID + ' '; Which would output something like ' id="uid_0">... ' ...
upvote count: 1

http://stackoverflow.com/q/29512575
tagged with: gridview
type: UnansweredQuestion
has body: I am having a issue with one of my pages in my ASP.NET Web Application - the computers.aspx page. When clicking the select button on any of the records in 'GridView1' - Select doesn't fire. I have trawled througout roughly 20 related questions, but cannot find anything that works. See Code Below: &lt;div class="table-responsive" style="border:none"&gt; &lt;asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True" GridLines="None" OnSelectedIndexChanged="OnSelectedIndexChanged" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="idComputers" DataSourceID="ComputersGridview"&gt; &lt;Columns&gt; &lt;asp:Templatefield ShowHeader="false"&gt; &lt;ItemTemplate&gt; &lt;asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="true" OnClick="LinkButton1_Click" commandname="select" Text="&amp;lt;span class=&amp;quot;glyphicon glyphicon-info-sign&amp;quot; style=&amp;quot;font-size:x-large;font-align:center;color:rgb(34,54,104);&amp;quot; /&amp;gt;"&gt;&lt;/asp:LinkButton&gt; &lt;/ItemTemplate&gt; &lt;/asp:Templatefield&gt;&lt;asp:TemplateField ShowHeader="False"&gt; &lt;ItemTemplate&gt; &lt;asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="true" CommandName="Select" Text="&amp;lt;span class=&amp;quot;glyphicon glyphicon-check&amp;quot; style=&amp;quot;font-size:x-large;font-align:center;color:rgb(34,54,104);&amp;quot; /&amp;gt;"&gt;&lt;/asp:LinkButton&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:BoundField DataField="Status" HeaderText="Status" SortExpression="Status" /&gt; &lt;asp:BoundField DataField="Hostname" HeaderText="Hostname" SortExpression="Hostname" /&gt; &lt;asp:BoundField DataField="Username" HeaderText="Username" SortExpression="Username" /&gt; &lt;asp:BoundField DataField="officename" HeaderText="Office Name" SortExpression="officename" /&gt; &lt;asp:BoundField DataField="IPAddress" HeaderText="IP Address" SortExpression="IPAddress" /&gt; &lt;asp:BoundField DataField="ManufacturerName" HeaderT…
tagged with: vb.net
has comment: http://stackoverflow.com/comment/47181239
has comment: http://stackoverflow.com/comment/47196448
tagged with: visual-studio-2013
has title: Select not firing in GridView - ASP.NET
has comment: http://stackoverflow.com/comment/47192736
type: Question
has comment: http://stackoverflow.com/comment/47180929
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47180898
has comment: http://stackoverflow.com/comment/47181012
answer count: 1
tagged with: asp.net
has answer: http://stackoverflow.com/a/29514035

http://stackoverflow.com/a/29407772
score: 1
has body: no, main use case for thread pool is offloading CPU intensive operations. IO is performed in one thread - you don't need multiple threads if you are waiting external data in parallel, and event loop is exactly a technique to organise execution flow so that you wait for as much as possible in parallel Example: You need to send 100 emails with a question (y/n) and another one with number of answered "y". It takes about 30 second to write email and two hours on average for reply + 10 seconds to read response. You start by writing all 100 emails ( 50 minutes of time ), then you wait alert sound which wakes you up every time reply arrives, and as you receive answers you increase number of "y". in ~2 hours and 50 minutes you're done. This is example of async IO and event loop ( no thread pools ) Blocking example: send email, wait for answer, repeat. Takes 4 days (two if you can clone another you ) Async thread pool example: each response is in the language you don't know. You have 4 translator friends. You email text to them, and they email translated text back to you (Or, more accurate: you print text and put it into "needs translation" folder. Whenever translator available, text is pulled from folder)
answers question: http://stackoverflow.com/q/29404784
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/47050197
comment on: http://stackoverflow.com/q/29440643
type: Comment
has text: I don't know DOMDocument that well, but I think it handles html as _html40 loose_ and there the `name` attribute of an `a` element is an ID attribute (the ID attribute does not need to have the name `id`). As of that you will find the `a`.
type: QuestionComment
score: 0

http://stackoverflow.com/a/29481334
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29481333
upvote count: 1
has body: As of 3.0 the url parameter is now set to about:blank by default instead of implcitly set to current dir. Once I added url: __dirname the test came up green isntantly. var assert = require("assert"); var fs = require('fs'); var jsdom = require("jsdom"); describe('Foo Test', function(){ it('Foo Check', function(done){ this.timeout(5000); jsdom.env({ html: fs.readFileSync('index.htm') ,url: __dirname ,features: { FetchExternalResources: ["script"] ,ProcessExternalResources: ["script"] } ,done: function(errors, window){ if(errors != null) console.log('Errors', errors); var $ = window.$; // $ is defined var foo = window.foo; //foo is undefined assert(foo); done(); } }); }); }); Also I want to mention that jQuery 2.x does not seem compatible currently with jsdom.
score: 1
has comment: http://stackoverflow.com/comment/75327612

http://stackoverflow.com/q/29463048
has comment: http://stackoverflow.com/comment/47089817
tagged with: javascript
has title: getComputedStyle substitue: currentStyle (IE8/7) not working
score: 0
has body: I am having an issue with currentStyle which I have read is the fix before IE9 for getComputedStyle support. I recently made this other thread regarding getting a reference to the top level LI list of a multi level navigation menu: Selecting &lt;li&gt; child node but not grandchildren with vanilla JavaScript Now I need to be able to measure the width or height of the LI's I am not able to reference with the help I received. It works, but not below IE9. Here is what I've tried for getting the width: this.w =function( elm ){ var s = (window.getComputedStyle) ? window.getComputedStyle(elm, "") : elm.currentStyle; return parseInt(s.width); } the width comes back as NaN SCRIPT5007: Unable to get property 'innerHTML' of undefined or null reference I really appreciate everyone's help
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47089737
has comment: http://stackoverflow.com/comment/47089905
has comment: http://stackoverflow.com/comment/47090012
has answer: http://stackoverflow.com/a/31926213
type: Question
linked to: http://stackoverflow.com/q/29456980
answer count: 1

http://stackoverflow.com/a/29499153
answers question: http://stackoverflow.com/q/29498957
type: Answer
has body: You can have as many variables are you want. I doubt you'll ever create so many variables that it could impact your application performance. What you should always have in mind is the clarity of your application. The code must be readable. If you only use a variable in a function then you should also declare it inside that function. It is recommended that you avoid creating global variables. This is easily achieved if you wrap your code inside a self invoking function: (function() { var CONSTANTS = { key: "VALUE", key2: "VALUE2", }; function doSomething() { var local_property = "foo"; console.log(CONSTANTS.key2); // it works } } ()); doSomething(); // error console.log(CONSTANTS.key); // you won't be able to access it here I recommend you read the following articles so that you get a better understanding of how JavaScript works: Variable statement Closures Grammar and types
score: 0

http://stackoverflow.com/comment/73927599
comment on: http://stackoverflow.com/q/29449056
score: 0
has text: examples should be in English, not in French
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29502292
answers question: http://stackoverflow.com/q/29502257
type: Answer
score: 2
has body: Try this instead. Your data is an object, not an array: var data = {"name": "button", "value": "delete"}; data.id = 456; console.log(data); http://jsfiddle.net/orf40c66/ Somewhat related: How to set a Javascript object values dynamically?
upvote count: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29502257

http://stackoverflow.com/a/29378882
score: 2
downvote count: 0
has body: You need to make a container div for the picture and then add a number of absolutely positioned divs inside the container. It would be best to position the dots using JS I think. Then, add tooltips to the .dot divs using whatever you want. jQuery UI, Bootstrap, Foundation... Or your own code of course. https://jsfiddle.net/7whLrjry/1/ HTML: CSS: .container { position: relative; max-width: 100%; } .container img { max-width: 100%; } .dot { position: absolute; width: 16px; height: 16px; background-color: black; border: 8px solid white; border-radius: 99999px; cursor: pointer; } .dot:hover { background-color: white; border: 8px solid black; } JS: $(document).ready(function() { $('.dot').each(function() { $(this).css('left', $(this).data('x')); $(this).css('top', $(this).data('y')); }); });
accepted answer of: http://stackoverflow.com/q/29378695
answers question: http://stackoverflow.com/q/29378695
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46938143
type: Answer

http://stackoverflow.com/a/29455903
has body: You can make simple changes to make it work. Change your html add data-status Play And for JavaScript code you can do this. $('#play').click(function() { if($(this).data('status') == "play") { $(this).text("P A U S E"); $(this).data('status', 'pause'); doPlay(); } else { $(this).text("P L A Y"); $(this).data('status', 'play'); doPause(); } }); jsfiddle link here P.s: Avoid making amendments to id of elements
downvote count: 0
answers question: http://stackoverflow.com/q/29455766
accepted answer of: http://stackoverflow.com/q/29455766
upvote count: 2
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/47076560
score: 2

custom-exceptions
type: Tag
tag name: custom-exceptions
tags question: http://stackoverflow.com/q/29422270

http://stackoverflow.com/q/29379183
type: Question
tagged with: joomla2.5
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/30390321
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Posting to an iframe - page rendered within the iframe instead of parent frame
tagged with: joomla
type: UnansweredQuestion
tagged with: php
has body: I'm implementing 3D secure. It requires a form to be auto submitted inside of an iframe, so that the response can show a bank username/password box within said iframe. <form id="3D_form" target="3D_iframe" action="<?php echo $acsurl; ?>" method="post"> <input type="hidden" name="PaReq" value="<?php echo $pareq; ?>" /> <input type="hidden" name="MD" value="<?php echo $md; ?>" /> <input type="hidden" name="TermUrl" value="<?php echo $termurl; ?>" /> <iframe name="3D_iframe" width="100%" height="400" frameborder="0" src="<?php echo $acsurl; ?>"> Once the user enters their username/password a success code is posted to a URL I also supply to the original iframe post (TermUrl). Problem is, the TermUrl renders a page with my websites theme/template WITHIN the iframe, so I get a page within a page if that makes sense? I'm using Joomla. My TermUrl is a function within a controller like: http://www.mywebsite.com/index.php?option=com_mycontroller&task=mycontroller.callback Any idea how I can either render a BLANK webpage within the iframe, or better yet, just re-render the entire page WITHOUT an iframe...? Currently I have to reload the page using Javascript from my callback function: function callback() { echo " "; echo " "; echo " Form submitted "; echo " "; echo " "; echo " "; }

http://stackoverflow.com/comment/47119415
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29479411
has text: put semi-colon in anchor tag after download()
score: 0

http://stackoverflow.com/comment/47106298
type: Comment
comment on: http://stackoverflow.com/a/29472497
has text: what if there are more than one of that class in page? You aren't getting instance specific value
type: AnswerComment
score: 0

http://stackoverflow.com/comment/93434569
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/39367680
has text: iPhone 6, 7, 8 all have the same resolution 375 x 667
score: 1

http://stackoverflow.com/q/29456722
favorite count: 0
tagged with: scope
has body: I am going through book "Java Script Ninja" and there is chapter on closures and scope. There is code example: var innerHolder; function outerFunction() { console.log("outerFunction: "+x); function innerFunction() { console.log("innerFunction: "+x); } innerHolder = innerFunction; } console.log("outerScope "+x); var x = 15 outerFunction(); innerHolder(); Result of this is: outerScope undefined outerFunction: 15 innerFunction: 15 Then the book says: All variables in an outer scope, even those declared after the function declaration, are included. Within the same scope, variables not yet defined cannot be forward-referenced. I do understand the second point, but the first point is not entirely clear to me. It appears as this is true but only if the variable is actually declared before function call is made. In my logic because variables are not hoisted if variable is declared after call to inner function, it is not in the outer scope at the time and therefore it will not be picked by closure. Is that correct? I.e. If I modify the code: console.log("outerScope "+x); outerFunction(); innerHolder(); var x = 15 The result will be: outerScope undefined outerFunction: undefined innerFunction: undefined
linked to: http://stackoverflow.com/q/1047454
has answer: http://stackoverflow.com/a/29456776
score: 2
has title: What is visible for closure
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29456776
upvote count: 2
type: Question
tagged with: closures
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/46944630
has text: What happens when you launch the app from DartEditor and then copy the URL to Chrome or Firefox?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29382156

http://stackoverflow.com/q/29375032
tagged with: javascript
has comment: http://stackoverflow.com/comment/46930514
has title: How to read files in directory in node.js?
has answer: http://stackoverflow.com/a/29375130
type: AnsweredQuestion
score: 1
tagged with: readfile
favorite count: 0
type: Question
tagged with: node.js
accepted answer: http://stackoverflow.com/a/29375130
upvote count: 2
has body: In my node.js app, I load modules from a folder, and put them in an array. Right now I do it manually like this var sitesList = [ require('./js/sites/A.js'), require('./js/sites/B.js'), require('./js/sites/C.js') ]; but over time, I don't want to add the file name to this list everytime I add a new module. How can I just loop through all js files in the sites folder and auto add them in an array?
has comment: http://stackoverflow.com/comment/46930546
answer count: 1
downvote count: 1

http://stackoverflow.com/comment/47170511
has text: thanks for Reply .We Placed image in server like this http://www.himansuit.com//modiyojana.jpg now We need check image is exist or not we don't about PHP
comment on: http://stackoverflow.com/a/29506839
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47187701
has text: possible duplicate of [Dynamically display JSON file contents](http://stackoverflow.com/questions/29478005/dynamically-display-json-file-contents)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29516136
type: QuestionComment

http://stackoverflow.com/comment/47040975
has text: See updated post. `js` at http://jsfiddle.net/o95x6xy3/1/ should return `length` of elements having `blah` class .
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29435553
type: AnswerComment

http://stackoverflow.com/a/41959639
type: Answer
has body: Yup, until Proxies arrive in full force the only way to achieve what you were trying to do is to shadow the built-in methods on the Map/Set, etc. yourself. For instance, if you have your map like so: var myMap = new Map([ ['key1', 'value1'], ['key2', 'value2']]) You'd have to have some wrapper to pass it into to add the built-in methods, for instance for get/set: function proxify(obj){ var $fnMapGet = function(key){ console.log('%cmap get', 'color:limegreen', 'key:', key) if(!Map.prototype.has.call(this, key)){ throw(new Error('No such key: '+ key)) } else { return Map.prototype.get.call(this, key) } } var $fnMapSet = function(key, value){ console.log('%cmap set', 'color:tomato', 'key:', key, 'value:', value) if(Map.prototype.has.call(this, key)){ throw(new Error('key is already defined: ' + key)) } else { if(Map.prototype.get.call(this, key) == value){ console.log('%cmap set', 'color:tomato', '*no change') return this } return Map.prototype.set.call(this, key, value) } } Object.defineProperty(obj, 'get', { get(){ return $fnMapGet } }) Object.defineProperty(obj, 'set', { get(){ return $fnMapSet } }) return obj } So then: proxify(myMap) myMap.get('key1') // &lt;= "value1" myMap.get('key2') // &lt;= "value2" myMap.get('key3') // &lt;= Uncaught Error: No such key: key3 myMap.set('key3', 'value3') // &lt;= Map {"key1" =&gt; "value1", "key2" =&gt; "value2", "key3" =&gt; "value3"} myMap.set('key3', 'another value3') // &lt;= Uncaught Error: key is already defined: key3 That would add the ability to do your own custom set/get on the map, not nearly as nice as subclassing Map nor as straightforward as es6 proxies but it at least it works. The full code snippet running below: var myMap = new Map([ ['key1', 'value1'], ['key2', 'value2']]) function proxify(obj){ var $fnMapGet = function(key){ console.log('get key:', key) if(!Map.prototype.has.call(this, key)){ throw(new Error('No such key: '+ key)) } else { return Map.prototype.get.call(this, key) } } var $fnMapSet = function(…
answers question: http://stackoverflow.com/q/29434406
score: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/29496974
upvote count: 1
has body: I have just started learning node.js. I am trying to create a script that will get a list from a file. The list is built like this Bob:110 Mike:120 Bob:334 Dan:240 And will give this output name value It is supposed to sum the numbers associated with the same name. So in my example it would print Bob 444 Mike 120 Dan 240 I used the help I found in this site to create some basic script fs = require('fs'); var array = fs.readFileSync('C:\\data.txt').toString().split("\n"); var items = {}, base, key; for (var i = 0; i &lt; array.length; i++) { base = array[i]; key = base[0]; if (!items[key]) { items[key] = 0; } items[key] += base[1]; } var outputArr = [], temp; for (key in items) { temp = [key, items[key]] outputArr.push(temp); } console.log(outputArr); Notice that I get the list from a text file, but it currently contains what I have posted in this question. The output that I get is very gibberishy, and I am not sure why. This is my output: [ [ 'B', '0oo' ], [ 'M', '0i' ], [ 'D', '0a' ], [ 'undefined', NaN ] ] Can anyone please help me understand why this does not work properly and show me how to fix it? By the way, I am not certain if this is the correct thought line for accomplishing such a task in node.js. I would be happy to get feedback! Thanks a lot!
downvote count: 1
type: Question
has title: Sum numbers from list in node.js
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/14427659
has comment: http://stackoverflow.com/comment/47159451
has comment: http://stackoverflow.com/comment/47159418
has answer: http://stackoverflow.com/a/29497078
answer count: 1
duplicate of: http://stackoverflow.com/q/14427659
favorite count: 0
type: UnansweredQuestion
tagged with: node.js
has comment: http://stackoverflow.com/comment/47159376

http://stackoverflow.com/q/29377583
tagged with: css
possible better answer: http://stackoverflow.com/a/29378406
has title: Bug in the circle menu
has answer: http://stackoverflow.com/a/29378599
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46937203
has body: menu itself: http://codepen.io/anon/pen/zxXvoG &lt;!-- language: lang-js --&gt; $(document).ready(function() { $('a').hover(function() { $("ul li").eq($(this).index()).trigger("mouseover"); }, function() { $("ul li").eq($(this).index()).trigger("mouseout"); }); $('li').hover(function() { $('a').eq($(this).index()).css('background-color', '#333333'); $(this).css('background-color', '#333333'); }, function() { $('a').eq($(this).index()).css('background-color', '#666666'); $(this).css('background-color', '#666666'); }); }); $( "a" ) .on( "mouseenter", function() { $( this ).css({ "color": "#00CAF2" }); }) .on( "mouseleave", function() { var styles = { "color":"" }; $( this ).css( styles ); }); The problem: when you hover a link, block selected normally, but when you move cursor from menu item title to its block, somewhy block "ssssssss8"(first block in 'ul' list) selects too.
type: Question
has comment: http://stackoverflow.com/comment/46937756
has comment: http://stackoverflow.com/comment/46937619
has comment: http://stackoverflow.com/comment/46936651
tagged with: javascript
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/46940164
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29378599
has answer: http://stackoverflow.com/a/29378406
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46959683
has text: Hey, thx for the reply BUT - I need to select 6th underscore and everything that follows. This one selects everything after the 7th (last) underscore and leaves the underscore out.
comment on: http://stackoverflow.com/a/29391304
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29686523
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29524971
answers question: http://stackoverflow.com/q/29524971
score: 4
upvote count: 4
has body: It is possible that your "url: "/Home/GetESN", is an incorrect url when on the web server than on your local. Try adding &lt;script&gt; rootUrl = '@Url.Content("~")' &lt;/script&gt; to _Layout.cshtml Then update your js file so you use the rootUrl function GetESN(area, ID) { $.ajax({ url: rootUrl + "Home/GetESN", // or url: rootUrl + "/Home/GetESN" type: 'POST', async: false, dataType: 'json', cache: false, data: { area: area, ID: ID }, success: function (data) { esn = data }, error: function () { alert('error occurred'); } });

http://stackoverflow.com/comment/46991221
has text: Is the request POSTed to the server, but with an empty "selectedEntityJson"?
comment on: http://stackoverflow.com/q/29406277
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47135221
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29487946
has text: Is it because of " expenseFactory " is it case sensitive. Not sure

http://stackoverflow.com/comment/47281582
score: 0
type: Comment
has text: but at last you are injecting `$scope` inside your `view` object
comment on: http://stackoverflow.com/a/29547610
type: AnswerComment

http://stackoverflow.com/a/29476792
answers question: http://stackoverflow.com/q/29459508
has comment: http://stackoverflow.com/comment/47126948
type: Answer
has comment: http://stackoverflow.com/comment/47159511
has comment: http://stackoverflow.com/comment/47124118
type: AcceptedAnswer
has body: The error is in the PHP. When a row is deleted, your PHP still thinks that a specific row index is in error. If you could you provide a function that would remove a row from your PHP, we can create a function beforeRemoveRow which triggers after a row is removed. In here we can call your PHP function and give it the row index to remove. Your program should now work. The function would look like this, and would be added to the list of options on your hot definition: beforeRemoveRow: function(index, amount) { phpFunctionRemoveRow(index); } EDIT: With this logic of hard-coded coordinates, removing a row would always give you the behavior of turning (x,y) red. This is what was meant by having an "error" in your php. It means that since you receive the coordinates with errors from PHP, you can't expect the hardcoded index values to change. Something still doesn't make sense. If you have no interaction with PHP after render (you don't call it after render), and you say that PHP is correct, then does this mean you're never going to be modifying your table? What if someone makes a change and you have to re-validate your table? If, however, you are capable of doing this, then what I would do is the following: After a change to the table, call your php function to revalidate. This will change that errors array you have in php but because the cells option is static, you won't see changes. At that point, you'd use: hotInstance.updateSettings({ cells: getCellsAgain() }); In that function, getCellsAgain(), you'd call your php code again to tell you the new indeces. That's the best you'll get without doing the validation on the JS side.
has comment: http://stackoverflow.com/comment/47149119
accepted answer of: http://stackoverflow.com/q/29459508
score: 0

http://stackoverflow.com/a/29533459
score: 85
upvote count: 86
downvote count: 1
has comment: http://stackoverflow.com/comment/71592663
has body: You could use the update() immutability helper from react-addons-update, which effectively does the same thing under the hood, but what you're doing is fine. this.setState(prevState =&gt; ({ data: update(prevState.data, {$splice: index, 1}) }))
has comment: http://stackoverflow.com/comment/59896033
answers question: http://stackoverflow.com/q/29527385
type: Answer

grunt-contrib-copy
type: Tag
tag name: grunt-contrib-copy
tags question: http://stackoverflow.com/q/29423535

http://stackoverflow.com/q/29443825
tagged with: simple-form
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/29444813
has body: Im using simple form with my Rails 4 app. I have a projects model, a scope model and a data model. Projects accept nested attributes for scopes. Scopes accept nested attributes for data. In the new project form, I have a question asking users to specify the scope of their project. If they check data as true (being required within the scope), then I want to show another set of questions about the data. In my new projects form I have this question (nested for scopes) to check whether the project scope includes data: <%= f.simple_fields_for :scopes do |s| %> <%= s.input :data, :as => :boolean, :label => false, :inline_label => true, { :class => 'toggle_div', target: 'div id="datarequest"'} %> <%= s.input :materials, :as => :boolean, :label => false, inline_label: 'Equipment or materials' %> <% end %> I then have a div id="datarequest", which I want to target the javascript on the above :data question so that if data is checked, then the questions inside this div are shown. if it is unchecked, then they are hidden. The attributes for these questions are in the data table: Data request <%= f.simple_fields_for :datum do |d| %> <% render %> <%= d.input :prim_sec, label: 'What sort of data do you want?', label_html: {class: 'dataspace'}, collection: ["Primary", "Secondary", "Both" ], prompt: "Choose one" %> <%= d.input :qual_quant, label: 'Do you need qualitative or quantitative data?', label_html: {class: 'dataspace'}, collection: ["Qualitative", "Quantitative", "Both" ], prompt: "Choose one" %> <% end %> $(document).on 'change', 'input.toggle_div', ()-> $($(this).attr('target')).toggle this.checked $(document).on 'change', 'input.toggle_radio', ()-> reverse = $(this).attr('toggle_reverse') if reverse toggle_value = ($(this).val() == 'false') else toggle_value = ($(this).val() == 'true') target = $(this).attr('target') $(target).toggle toggle_value Can anyone see what i've done wrong in the :data line? It seems my errors start there. Thank you
type: AnsweredQuestion
has title: Rails, Simple Form and Javascript show/hide script
type: Question
accepted answer: http://stackoverflow.com/a/29444813
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/a/29415955
score: 0
answers question: http://stackoverflow.com/q/29414564
has comment: http://stackoverflow.com/comment/47005034
type: Answer
has body: You haven't defined authenticate method. Attach it to your schema: var user= mongoose.Schema({ username: 'string', password: 'string' }); authSchema.methods.authenticate = function( pwd ) { return ( this.password === pwd ); };

http://stackoverflow.com/q/29454799
type: Question
tagged with: javascript
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: I try to read AudioProperties (bitrate) with Node-taglib , here's my code : var taglib = require('taglib'); taglib.tag("./love-me-like-you-do.mp3", function(err, tag, audioProperties) { console.log(tag); console.log(audioProperties); }); here's my output : { genre: null, year: 0, track: 0, artist: 'Love Me Like You Do - Ellie Goulding', comment: null, album: 'Love Me Like You Do - Ellie Goulding', title: 'Love Me Like You Do - Ellie Goulding' } undefined As you can see there is undefined for audioProperties I be appreciated if tell me where i am wrong.
tagged with: node.js
answer count: 0
score: 1
has title: Node-taglib read AudioProperties
upvote count: 1

http://stackoverflow.com/comment/47083342
type: AnswerComment
comment on: http://stackoverflow.com/a/29459714
has text: I've seen this kind of pattern being used as a caching mechanism where on first call it will go back to server and load the data and then using the rewrite, captured whatever value retrieved and just serve that value the next time around it is requested and saving the page from going to go to server every single time it is needd.
type: Comment
score: 0

http://stackoverflow.com/q/29516537
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47188382
has answer: http://stackoverflow.com/a/29517973
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47189051
has comment: http://stackoverflow.com/comment/47189257
has comment: http://stackoverflow.com/comment/47190531
type: Question
has comment: http://stackoverflow.com/comment/47189061
tagged with: javascript
has comment: http://stackoverflow.com/comment/47191678
possible better answer: http://stackoverflow.com/a/29517973
has comment: http://stackoverflow.com/comment/47188519
accepted answer: http://stackoverflow.com/a/29517681
answer count: 2
has comment: http://stackoverflow.com/comment/47189471
upvote count: 1
has title: Directive accessing to parent controller function without $scope
has body: So I have this directive that has its own scope but I want to access to a function inside its parent controller. I can do this if the parent controller exposes the function with a $scope.getElementsList(), although I'm trying to avoid the use of $scope and I have the function exposed with self.getElementsList() and the directive cannot reach it. Directive: angular.module('myApp').directive('accountBalance', function() { return { scope: { elementId: '=elementid' }, transclude: true, restrict: 'E', templateUrl: '../views_directives/account-balance.html', controller: function($scope) { $scope.removeElement = function(){ //this where I want to access the parent function console.log($scope.$parent.getElementsList()); console.log("ALSO I WANT TO ACCESS THIS DIRECTIVE elementId WITHOUT USING $scope", $scope.elementId); } } }; }); ParentController: angular.module('myApp').controller('AppDesignCtrl', function ($scope) { var self = this; self.elementsList = []; self.getElementsList = function(){ return self.elementsList; } }); I also want to know what is the best way to access, inside the directive controller, the data passed to the directive's $scope. scope: { elementId: '=elementid' }, UPDATE &lt;div&gt; &lt;i class="fa fa-arrows element-drag"&gt;&lt;/i&gt; &lt;i class="fa fa-trash-o element-remove" ng-click="removeElement()"&gt;&lt;/i&gt; &lt;/div&gt; And what about calling functions from the directive template inside the controller of the directive? Do I need to expose them with something like $scope.removeElement()? How do I use this.removeElement() and be able to access it from the template? Sorry about the long question. I'm trying to set the best practices to my new project since I've been away from angular for a year+. Thanks in advance
favorite count: 0
has answer: http://stackoverflow.com/a/29517681

http://stackoverflow.com/a/29486861
answers question: http://stackoverflow.com/q/29485360
upvote count: 1
type: Answer
has body: One method that can work quite well for preventing guessing ID numbers is to add some sort of padding to the ID and then convert it to base32. Of course, this doesn't eliminate the ability to guess an ID entirely, but it does make it a little more time consuming for anyone who is snooping around. If you have the URL www.domain.com/index.php?id_page=1, you could convert the id to something unique in your application, for example: padded id = id x 9 - 2 7 = 1 x 9 - 2 16 = 2 x 9 -2 25 = 3 x 9 - 2 Then, you can convert the new padded ID to base 32, which would be 7 = G4 16 = GE3A 25 = GI2Q The new url would then be (for an id of 1): www.domain.com/index.php?id_page=G4 Using this method, if someone guesses the base 32 of 1-6, it would return a 404, because your ID of 1 is actually being padded out to become 7. Guessing 8-15 wouldn't return a parsed ID because the next id of 2 is padded to 16, and so on. Not only does this keep the query string smaller in size, but it also doesn't use an obvious MD5 hash which can very easily be sequentially browsed using dictionaries. If you want the page to be linked to a specific users, well there's no reason why you cannot append more values to the new padded_id (let's call it a hash). For instance, if you have a user with an ID of 12, and you only want that user to be able to visit a page with an id of 10, you would need to create a hash that comprises of both these values: page_id(10)-user_id(12), using the above example, this would produce: (10 x 9 - 2) (12 x 9 - 2) 88-106 HA4A-GEYDM You now have a nice small hashed link that can be secured to a single user ID. The padding method in the example above is rather simple, but it gives you the overall idea of how to approach the issue.
downvote count: 0
score: 1

http://stackoverflow.com/comment/47161980
type: AnswerComment
has text: I'm storing the file's unique name in a PHP SESSION variable.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29501651

http://stackoverflow.com/comment/47137402
type: Comment
has text: @yaron btw, I tested your jsfiddle and it works (win, firefox 37.0.1).
comment on: http://stackoverflow.com/a/29487748
score: 0
type: AnswerComment

http://stackoverflow.com/q/29437997
possible better answer: http://stackoverflow.com/a/36515018
tagged with: reactjs
answer count: 2
has answer: http://stackoverflow.com/a/36515018
downvote count: 0
has comment: http://stackoverflow.com/comment/47046528
favorite count: 0
score: 8
has body: I've written my React app with ES6. Now I would like to write my tests also with ES6. So the challenge here is to configure karma. Together with google I came this far with karma.config.js (I've omitted parts of the config file which are the same!): ... files: [ '../node_modules/karma-babel-preprocessor/node_modules/babel-core/browser-polyfill.js', '../app/**/*.jsx', '../test/**/*.jsx'], preprocessors: { 'app/**/*.jsx': ['react-jsx', 'babel'], 'test/**/*.jsx': ['react-jsx', 'babel'] }, 'babelPreprocessor': { options: { sourceMap: 'inline' }, filename: function(file) { return file.originalPath.replace(/\.jsx$/, '.es5.js'); }, sourceFileName: function(file) { return file.originalPath; } }, .... What I think this setup should do: 1) compile the JSX to JS and next babel should transform ES6 to ES5. This together with the polyfill I expected it should run in phantomjs for example. But no, here is the output from karma when I run it: PhantomJS 1.9.8 (Mac OS X) ERROR SyntaxError: Parse error at Projects/ES6/app/js/app.jsx:35 PhantomJS 1.9.8 (Mac OS X): Executed 0 of 0 ERROR (0.027 secs / 0 secs) [20:36:59] Karma has exited with 1 Line 35 of app.jsx contains the actual JSX part. So, for some reason the preprocessors seems to do not so much. Any help with the preprocessors would be appreciated ? UPDATE: I have this almost working nog. Turns out that the preprocessors I had should be swapped like this '../app/**/*.jsx': ['babel', 'react'], '../test/**/*.jsx': ['babel', 'react'] Now, when I run this, I get: Uncaught ReferenceError: require is not defined I thought I had a polyfill for that :(
has comment: http://stackoverflow.com/comment/47045150
upvote count: 8
has title: How to unit test React JSX ES6 code with KARMA?
type: AnsweredQuestion
tagged with: karma-runner
tagged with: babeljs
has comment: http://stackoverflow.com/comment/47047001
type: Question
has answer: http://stackoverflow.com/a/29802164
has comment: http://stackoverflow.com/comment/47060941
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29802164

http://stackoverflow.com/comment/47171173
has text: When i try catching missing routes in handler.php as in suggested post, i'm getting this error SyntaxError: expected expression, got '<'
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29484935
type: Comment

http://stackoverflow.com/q/29446528
has comment: http://stackoverflow.com/comment/47060114
has comment: http://stackoverflow.com/comment/47060147
accepted answer: http://stackoverflow.com/a/29446601
has comment: http://stackoverflow.com/comment/47060153
has comment: http://stackoverflow.com/comment/47059908
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47059925
upvote count: 1
has comment: http://stackoverflow.com/comment/47060206
type: Question
has body: I am trying to concat an arguments object with another array, and I wrote code like this: [].concat.call(arguments, newArray) But it returns [ [object Arguments], ... ], that is exactly not what I want. I googled and found some explanations for why I could do this through slice method: How can I convert the "arguments" object to an array in JavaScript? But after looked up the spec, I found the same definition on concat method: NOTE The concat function is intentionally generic; it does not require that its this value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method. Whether the concat function can be applied successfully to a host object is implementation-dependent. The spec is here: http://es5.github.io/#x15.4.4.4 So now I am confusing why I can't convert the arguments object to an array through the concat method.
tagged with: arrays
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29446601
has comment: http://stackoverflow.com/comment/47060013
linked to: http://stackoverflow.com/q/960866
has comment: http://stackoverflow.com/comment/47060229
has title: Why can't I convert the "argument" object to an array with concat method in JavaScript?
answer count: 1
tagged with: arguments
score: 1
has comment: http://stackoverflow.com/comment/47059850
favorite count: 0

http://stackoverflow.com/a/29518479
score: -1
has comment: http://stackoverflow.com/comment/47193166
answers question: http://stackoverflow.com/q/29518409
upvote count: 0
has comment: http://stackoverflow.com/comment/47193098
type: Answer
has body: var newerChoice = newChoice(Math.random());
downvote count: 1

http://stackoverflow.com/q/29396207
has answer: http://stackoverflow.com/a/29397253
tagged with: javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46969906
has comment: http://stackoverflow.com/comment/46968811
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29397263
accepted answer: http://stackoverflow.com/a/29397253
linked to: http://stackoverflow.com/q/9229645
type: Question
has answer: http://stackoverflow.com/a/29397263
answer count: 2
has comment: http://stackoverflow.com/comment/47203265
linked to: http://stackoverflow.com/q/1960473
has comment: http://stackoverflow.com/comment/46970791
score: 0
has body: I wish to preserve the following (as opposed to the preceding) duplicated substring of a comma-delimited string while removing the preceding duplicating substring. 1- Initial state of string before duplicate appended: aaa,bbb,ccc,ddd,eee 2- bbb dynamically appended to string: aaa,bbb,ccc,ddd,eee,bbb 3- Preceding bbb now must be removed: aaa,ccc,ddd,eee,bbb How can the following function, or any function for that matter, reproduce what I seek? function unique(list) { var result = []; $.each(list, function(i, e) { if ($.inArray(e, result) == -1) { result.push(e); } }); return result; }
has title: jQuery 2.1 | Remove source substring of duplicate substring
has comment: http://stackoverflow.com/comment/46968930

http://stackoverflow.com/comment/47008277
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29418003
score: 0
has text: the reason i had **g** flag is to match all occurrences of the search pattern. So for example "pick up at 5 pm and 7 pm" should match '5 pm' as well as '7 pm'. Removing g only does the first match. How can I modify my regex to match all occurrences?

http://stackoverflow.com/comment/46965916
type: Comment
comment on: http://stackoverflow.com/a/29394214
score: 0
has text: @Sukanya I meant in the answer, as that's part of it. Sorry for not clarifying. Could you edit it in?
type: AnswerComment

http://stackoverflow.com/q/29387923
has comment: http://stackoverflow.com/comment/46953759
has answer: http://stackoverflow.com/a/29388060
has answer: http://stackoverflow.com/a/29388014
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46953781
tagged with: function
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29388014
has body: Example Text. Click me I have a function that changes the inner html myFunction() { document.getElementById('myDiv').innerHTML=" Example 1 Example 2 Example 3 " } And when i add the class i get an error: unexpected identifier. Why is this? if i have
tagged with: class
has comment: http://stackoverflow.com/comment/46953658
possible better answer: http://stackoverflow.com/a/29387954
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29387954
has title: Cant have class in javascript innerHTML
tagged with: innerhtml

http://stackoverflow.com/q/29498193
has comment: http://stackoverflow.com/comment/47155205
has body: I am trying to pass $(window) as an argument to some function, but when I try to to get scrollTop() from inside the function it returns 0 but if I try to get $(window).scrollTop it gives me correct result. Could you please tell me what is the mistake I am making, And If passing element as an argument is not the correct way then what could be its alternate. Following is my code. //Funtion Declaration $.fn.someFunction = function (element) { var container = $(this), viewTop = element.scrollTop(), console.log($(window).scrollTop());//returns correct value console.log(viewTop);//returns 0 } //Calling the function $fn.otherFunction = function(){ $(el).someFunction($(this)); } $(window).otherFunction(); And same is the case with height of the window. // Following is the actual Code. It may be messy to look at but still. $(window).scroll(function () { $(window).scrolling(); $(".footer").displayFooter(); }); $.fn.scrolling = function () { $(".parallax_active").each(function (i, el) { $(el).parallax($(this)); }) // some more stuff goes here. }; $.fn.parallax = function (parent) { var container = $(this), viewTop = parent.scrollTop(), viewHeight = parent.height(), viewHeader = $(".header-container").outerHeight(), viewBottom = viewTop + viewHeight, header = viewTop + viewHeader; console.log($(window).scrollTop()); console.log(viewTop); console.log(viewHeight); } Thanks, Arpita
favorite count: 0
accepted answer: http://stackoverflow.com/a/29498721
has title: Passing a reference to the jQuery object which invoked a jQuery plugin method (window object)
has comment: http://stackoverflow.com/comment/47155363
upvote count: 1
has comment: http://stackoverflow.com/comment/47155335
has comment: http://stackoverflow.com/comment/47156155
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47156086
has comment: http://stackoverflow.com/comment/47155551
score: 1
has comment: http://stackoverflow.com/comment/47155412
type: Question
has comment: http://stackoverflow.com/comment/47155554
has answer: http://stackoverflow.com/a/29498721
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47155343
has comment: http://stackoverflow.com/comment/47155261
has comment: http://stackoverflow.com/comment/47156001
has comment: http://stackoverflow.com/comment/47155304
has comment: http://stackoverflow.com/comment/47155505
downvote count: 0
has comment: http://stackoverflow.com/comment/47155114

http://stackoverflow.com/comment/46985461
has text: why you cant look for jquery slider instead of marquee?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29405222
type: AnswerComment

http://stackoverflow.com/a/29439872
answers question: http://stackoverflow.com/q/29420070
score: 0
type: Answer
has body: What you can do is to wait for a particular text to be present in element: var EC = protractor.ExpectedConditions; var searchQuery = $('#searchQuery'); var condition = EC.textToBePresentInElement(searchQuery, 'some text'); browser.wait(condition, 10000, "Text is still not present"); searchQuery.getText().then(function (text) { console.log(text); }); Or, if you don't know what text would be present in the element - just check if any text is there: var EC = protractor.ExpectedConditions; var searchQuery = $('#searchQuery'); function waitForText(elementFinder) { return function () { return elementFinder.getText().then(function(text) { return text !== ""; // could also be replaced with "return !!text;" }); }; }; browser.wait(waitForText(searchQuery), 10000, "Text is still not present"); searchQuery.getText().then(function (text) { console.log(text); });

http://stackoverflow.com/a/29396702
upvote count: 1
answers question: http://stackoverflow.com/q/29387939
accepted answer of: http://stackoverflow.com/q/29387939
downvote count: 0
type: AcceptedAnswer
has body: .catch a thrown error and then process some specific actions without branching No. Because that is branching. Nesting is totally natural here. You could even think of this using the synchronous-try-catch metaphor and it would be the same. I can't figure out what's happening with this flow. If no error is thrown, I get "Success, great!" and it start again with "Let's try again after some long delay" Hm, that's odd, because the "Let's try again" (without delay) is chained before that. You should eventually get both logs. Your chain is processed sequentially: doSomethingAsync() // returns a result then return result // first callback: continues with it then console.log('Success, great!') // next callback: logs something catch // is ignored because no rejection then console.log("Let's try again"); // next callback: logs something return doSomethingAsync(); // and returns a result catch // that result, not being a rejection, is ignored here delay // fulfillment is delayed then console.log("Let's try again after some long delay"); // next callback again logs return doSomethingAsync(); // and returns a result catch // is ignored again If a CustomError is thrown, I get "Let's try again" Yes, because saveSomethingAsync();, the result of the previous promise, is fulfilled, so the next .then() callback in the chain executes. If a CustomError2 is thrown, I get "Let's try again after some long delay" Yes, because the error bubbled all the way down to .catch(CustomError2, …) where it was eventually handled. On its way, no callbacks were executed. After the error was handled, the promise is fulfilled, and the next .then() in the chain calls its callback. I think what you really want here is doSomethingAsync() .then(function(result) { if (!result) // CustomError('Blah Blah'); // Oh CustomError! return saveSomethingAsync(); .then(function(saved) { console.log("Let's try again"); return doSomethingAsync(); }); else if (result == 0) // CustomError2('Blah Blah Blah'); // Oh CustomError…
type: Answer
has comment: http://stackoverflow.com/comment/46997040
score: 1
has comment: http://stackoverflow.com/comment/47001710

http://stackoverflow.com/comment/46984445
has text: "I'm fairly sure this is going to become a pretty bad bottleneck" Try it first and see if it causes performance problems. Avoid premature optimization.
comment on: http://stackoverflow.com/q/29404569
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47057608
has text: I agree on the memory leak and coding vanilla JS where you can but using only `body` for scroll will exclude functionality on Mozilla and IE.
comment on: http://stackoverflow.com/a/29444169
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29511245
answer count: 1
tagged with: javascript
tagged with: asp.net
tagged with: checkbox
tagged with: gridview
type: UnansweredQuestion
has title: How to use the javascript function to enable/disable the checkbox in rowwise from gridview?
has body: I want to check the checkbox in rowwise with the some conditions. The first condition is when three Checkboxes are selected continuously in same row,it should display the alert popup.("You can't select continuous three hours"). Next condition is,it shouldn't select more than three checkbox in each row. I used the below java script,in this code its checking in column wise but I want to check in row wise. How can I accomplish this condition ? function CheckCheck() { var chkBox = document.getElementById('<%=Gv1.ClientID %>'); var chkBoxCount = chkBox.getElementsByTagName("input"); var btn = document.getElementById('<%=btnsubmit.ClientID %>'); var i = 0; var tot = 0; for (i = 0; i < chkBoxCount.length; i++) { if (chkBoxCount[i].checked) { tot = tot + 1; if (tot > 2) { alert('Cannot check more than 2 check boxes'); chkBoxCount[i].checked = false; return; } } } } HTML: <asp:GridView ID="Gv1" runat="server" AutoGenerateColumns="False" OnRowDataBound="Gv1_RowDataBound"> <asp:BoundField DataField="datedif" HeaderText="Day/Hour" SortExpression="datedif" /> <asp:TemplateField HeaderText="Hour1"> <asp:CheckBox ID="CheckBox1" runat="server" /> <asp:CheckBox ID="CheckBox1" runat="server" Enabled='<%# Eval("hour1").ToString().Equals("False") %>' /> </asp:TemplateField> <asp:TemplateField HeaderText="Hour2"> <asp:CheckBox ID="CheckBox2" runat="server" /> <asp:CheckBox ID="CheckBox2" runat="server" Enabled='<%# Eval("hour2").ToString().Equals("False") %>' /> </asp:TemplateField> <asp:TemplateField HeaderText="Hour3"> <asp:CheckBox ID="CheckBox3" runat="server" /> <asp:CheckBox ID="CheckBox3" runat="server" Enabled='<%# Eval("hour3").ToString().Equals("False") %>' /> </asp:TemplateField> <asp:TemplateField HeaderText="Hour4"> <asp:CheckBox ID="CheckBox4" runat="server" /> <asp:CheckBox ID="CheckBox4" runat="server" Enabled='<%# Eval("hour4").ToString().Equals("False") %>' /> </asp:TemplateField> <asp:TemplateField HeaderText="Hour5"> <asp:CheckBox ID="CheckBox5" runat="server" /> <as…
has answer: http://stackoverflow.com/a/29514900
type: Question
score: 0

http://stackoverflow.com/q/29467979
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29469874
has title: after change Combobox pagination, getValue and getRawValue returned the same value
tagged with: javascript
has body: I use Ext js 3.4 combobox finder. Suppose that the combobox's store uses pagination. As first, when I select some item, it gives me i.e.: getValue() => 1000 and getRawValue() => "Item Name", but after I change pagination (without selecting any item) the getValue() method returns "Item Name". Can anyone help me?
tagged with: extjs
type: Question
tagged with: combobox
score: 0

http://stackoverflow.com/comment/47164546
type: Comment
comment on: http://stackoverflow.com/a/29503041
score: 0
type: AnswerComment
has text: Can you convert an existing event to a Bacon bus?

http://stackoverflow.com/comment/47097235
comment on: http://stackoverflow.com/a/29467469
has text: Understandable, just thought to add this as well. I rarely see the use for assigning a new id within the click event as you would end up with a large event vs sending it to a function. +1 regardless
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/29527301
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29527285
type: Answer
answers question: http://stackoverflow.com/q/29527285
has body: You can use the .next() method: $(this).next('.display').remove(); You can also check the existence of the next sibling before re-appending the message: var message = ' some text here for this field only! '; $('.req-in').blur(function() { var $this = $(this); if ( $.trim(this.value) === '' ) { // if the next '.display' sibling doesn't exist if ( $this.next('.display').length === 0 ) { $this.after(message); } } else { $this.next('.display').remove(); } });
score: 5
upvote count: 5

http://stackoverflow.com/a/29504885
score: 1
accepted answer of: http://stackoverflow.com/q/29504609
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29504609
type: Answer
has body: You can remove the infinite while loop, the childs should not exit while there are active event listeners, unless you explicitly call process.exit() Instead of telling the child process ended in the last line in a procedural style, use an event style on exit: process.on('exit', function(code) { process.send("Child stopped!"); }); process docs ChildProcess docs As events are only handled when the process is idle, as javascript does not implement threads. Therefore a while loop will block the process, preventing it from receiving messages.
upvote count: 1

http://stackoverflow.com/comment/46969658
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29396694
has text: Haha, it's "Weldon" actually. Also maybe you should add a small precision of what was important on that article.
type: AnswerComment

http://stackoverflow.com/comment/47090310
type: QuestionComment
score: 0
has text: @jfriend00 im working on my windows 7 so just plain old task manager. im positive there is a leak because if i leav the client spamming the server for about 10-15 minutes the server will be using over 1 gig of memory! and its initial state before the client beginnes spamming is around 50kb.. you could very clearly see it rising
type: Comment
comment on: http://stackoverflow.com/q/29461972

http://stackoverflow.com/comment/47041239
comment on: http://stackoverflow.com/q/29436101
score: 2
type: Comment
type: QuestionComment
has text: It is not acceptable to swear on SO. I've removed the swearing from your question.

http://stackoverflow.com/comment/116914435
has text: @ChewieTheChorkie it certainly does on modern Safari versions, and it has been supported for years now.
comment on: http://stackoverflow.com/a/29373891
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/29396755
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46969812
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29396951
possible better answer: http://stackoverflow.com/a/29396955
type: Question
has answer: http://stackoverflow.com/a/29396955
has title: PHP / JQUERY - display each sub array of json
has comment: http://stackoverflow.com/comment/46969760
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46970110
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/29396951
has body: I have post the my script below, current script will output like this. ["Error1","Error2","Error3"] ["Good1","Good2","Good3"] I want output each Error in separate paragraph and each Good in another paragraph PHP Script $Error[] = "Error1"; $Error[] = "Error2"; $Error[] = "Error3"; $Good[] = "Good1"; $Good[] = "Good2"; $Good[] = "Good3"; $Data["Error"] = json_encode($Error); $Data["Good"] = json_encode($Good); die(json_encode($Data)); Jquery Script function _Request() { $("form").submit(function(e) { e.preventDefault(); $.ajax( { url: $(this).attr("action"), type: "POST", data: $(this).serializeArray(), dataType: 'json', success: function(Result) { var Data = ""; $.each(Result, function(Index, Item) { Data += "&lt;p&gt;" + Item + "&lt;/p&gt;"; }); $("#Result").html(Data); } }); }); }
has answer: http://stackoverflow.com/a/29396995
has comment: http://stackoverflow.com/comment/46969938
tagged with: php

http://stackoverflow.com/a/29445535
answers question: http://stackoverflow.com/q/29445467
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/47058303
has comment: http://stackoverflow.com/comment/47058298
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47058240
has comment: http://stackoverflow.com/comment/47058337
has body: Directive names must follow camelCase and so in your directive make changes to name: directive('AlbumlikeFeature', will become directive('albumlikeFeature', Now in your view, refer to it as: &lt;albumlike-feature uniqueid="1" photoid="1"&gt;&lt;/albumlike-feature&gt; Also your directive function is wrong, templateUrl: 'app/components/album/albumlikefeature.html'; scope.likeClick = function (dataid) { var resultlike = dataid console.log(resultlike); resultlike.Like = resultlike.Like + 1; scope.likeCount = resultlike.Like; scope.unlikeCount = resultlike.Unlike; }; You can't have ; inside the return object also you don't have a link function. angular.module('AlbumlikeFeature',[]).directive('albumlikeFeature', ['$filter', '$route', function ($filter, $route) { return { restrict: 'E', scope: {}, templateUrl: 'app/components/album/albumlikefeature.html', link : function(scope, element, attrs) { scope.likeClick = function (dataid) { var resultlike = dataid console.log(resultlike); resultlike.Like = resultlike.Like + 1; scope.likeCount = resultlike.Like; scope.unlikeCount = resultlike.Unlike; }; } } }]);

http://stackoverflow.com/comment/47072134
type: QuestionComment
has text: @BinaryMuse my code follows initialcapitals, my bad on making up the code for the question. That didn't seem to be the problem.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29436419

http://stackoverflow.com/comment/46950482
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29386041
score: 0
has text: It's a good idea to centralize the logging procedure, to easily turn it on/off as you mentioned in your question.

http://stackoverflow.com/comment/47048837
has text: i tried everyones suggestions and still an issue, here is a more in-depth error on google debugger http://postimg.org/image/mdb5ug8or/
comment on: http://stackoverflow.com/q/29439860
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29473752
answers question: http://stackoverflow.com/q/29473591
score: 0
has comment: http://stackoverflow.com/comment/47108673
type: Answer
has body: Not sure if this is what you are looking for, but your question is a bit unclear. Just call toggle on the #A on load. Here is a fiddle e.g. //Toggle Hide/Show sidebar slowy $(document).ready(function(){ $('#A').toggle(); $('#B').click(function(e) { e.preventDefault(); $('#A').toggle(''); $('#B').toggleClass('extended-panel'); return false; }); });

http://stackoverflow.com/a/29509174
answers question: http://stackoverflow.com/q/29508950
has body: You have to use you own modulus function : function modulus(n,m) { return ((n%m)+m)%m; }; With your following code : function getChars(data,delta) { var chars; var i; var foundAt; var newString; chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; data = data.toUpperCase(); i = 0; newString = ""; while (i &lt; data.length) { newString += chars.charAt(modulus(chars.indexOf(data[i])+delta,26)) i++; } return newString; }
score: 0
has comment: http://stackoverflow.com/comment/47174868
has comment: http://stackoverflow.com/comment/47174910
has comment: http://stackoverflow.com/comment/47175023
type: Answer
has comment: http://stackoverflow.com/comment/47174805

http://stackoverflow.com/comment/47016659
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29407601
has text: I am completely new to the debugging extensions and waas not aware of debugger; statement. I will take a look at it.

http://stackoverflow.com/comment/47210823
comment on: http://stackoverflow.com/q/29528284
type: QuestionComment
score: 0
has text: any particular reason you dont just use `utc_timestamp()` as the value to insert?
type: Comment

http://stackoverflow.com/comment/46937692
score: 0
comment on: http://stackoverflow.com/q/29377925
type: Comment
has text: this error was actually also in the original code! However unfortunately it doesn't solve the issue...
type: QuestionComment

http://stackoverflow.com/comment/47024425
has text: http://stackoverflow.com/q/14845895/3639582 File API is not supported in <IE10
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29426755

http://stackoverflow.com/q/29506225
type: UnansweredQuestion
has title: How to check user already logged in facebook?
tagged with: facebook
has body: I am using facebook javascript SDK to integrate login with facebook in my app. I have 2 JS files in my app. FacebookLogin.js content.js Now i am loading FacebookLogin.js in content.js. Further I have below code in my FacebookLogin.js var userID; window.fbAsyncInit = function() { //SDK loaded, initialize it FB.init({ appId : 'MY_APP_ID', xfbml : true, version : 'v2.2' }); //check user session and refresh it FB.getLoginStatus(function(response) { if (response.status === 'connected') { //user is authorized userID = response.authResponse.userID; } else { document.getElementById('status').innerHTML = 'Please log into Facebook.'; } }); }; Now I want to use that userID variable in my content.js file. So that i can check if user is already logged in, like below if(userID === undefined &amp;&amp; userID === null) { showSocialLoginPopup(); return false; } here showSocialLoginPopup() displays a popup with different login options like facebook, Twitter, etc. Now if the user is already logged in then i dont want to display that popup.
has answer: http://stackoverflow.com/a/29507137
tagged with: facebook-login
type: Question
has comment: http://stackoverflow.com/comment/47170677
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/a/29450519
accepted answer of: http://stackoverflow.com/q/29450489
type: Answer
answers question: http://stackoverflow.com/q/29450489
upvote count: 2
has body: It looks like you're using the equivalence operator == rather than the assignment operator = Try this instead: $("#button1").click(function(){ document.getElementById("main_banner").src = "banners/banner1.jpg"; }); $("#button2").click(function(){ document.getElementById("main_banner").src = "banners/banner2.jpg"; });
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29482477
type: AnsweredQuestion
score: 21
linked to: http://stackoverflow.com/q/12181760
has comment: http://stackoverflow.com/comment/47130576
upvote count: 21
type: Question
has comment: http://stackoverflow.com/comment/50354034
possible better answer: http://stackoverflow.com/a/38106232
has answer: http://stackoverflow.com/a/38106232
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/37263638
has body: The problem is that the user has to scroll down to view all of the content within the modal body. However, when I print the modal the only part that is printed is the part that is viewable. I want the entire modal's content to be printed. I have tried every piece of code on the following page and none of them print the entire modal. Twitter Bootstrap: Print content of modal window
has answer: http://stackoverflow.com/a/47011034
has comment: http://stackoverflow.com/comment/47201660
has answer: http://stackoverflow.com/a/29523921
tagged with: printing
downvote count: 0
has comment: http://stackoverflow.com/comment/47201410
tagged with: bootstrap-modal
accepted answer: http://stackoverflow.com/a/29523921
favorite count: 0
has title: How do I print the entire bootstrap modal where content in modal body is scrolled out of view
tagged with: twitter-bootstrap
answer count: 5
has answer: http://stackoverflow.com/a/59407915

http://stackoverflow.com/comment/47074158
type: Comment
type: QuestionComment
has text: `sum(1)(2)` returns `String` `"1function (y) { if (!y) return 0; else return x + sum(y); }"` `console.log(typeof sum(1)(2)(3))`, `sum(1)(2)(3)` returns `TypeError: string is not a function` What is expected result ?
comment on: http://stackoverflow.com/q/29454470
score: 0

http://stackoverflow.com/q/29515830
linked to: http://stackoverflow.com/q/8456621
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47195330
has comment: http://stackoverflow.com/comment/47198643
score: 1
has answer: http://stackoverflow.com/a/29525916
linked to: http://stackoverflow.com/q/879137
type: Question
has body: I am trying to get Google Maps markers to appear in IE 8 and 9. Here's where I believe the problem lies: var addresses = mapAddresses; //alert(addresses); if (addresses != null) { var marker, x; var infowindow = new google.maps.InfoWindow(); for (x = 0; x &lt; addresses.length; x++) { //alert(addresses.length); //alert('http://maps.googleapis.com/maps/api/geocode/json?address=' + addresses[x]); $.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address=' + addresses[x] + '&amp;sensor=false', null, function (data) { var p = data.results[0].geometry.location //alert(data.results[0].formatted_address); // This will alert the individual addresses. var latlng = new google.maps.LatLng(p.lat, p.lng); var marker = new google.maps.Marker({ position: latlng, map: map, title: data.results[0].formatted_address }); // Add the markers to the gmarkers array. gmarkers.push(marker); //&lt;-------- No markers appear to be getting in here. }); } geoCodeAddress(map); } I can see the markers in IE 10+, FF, and Chrome. I do not see any js errors in the debugger indicating something wrong. I verified that the $.getJSON() call returns results. Any help is appreciated. Thanks!
tagged with: internet-explorer
tagged with: javascript
tagged with: google-maps-api-3
upvote count: 2
has title: google maps v3 markers not showing ie 8 and 9
answer count: 1
downvote count: 1

onclicklistener
tag name: onclicklistener
type: Tag
tags question: http://stackoverflow.com/q/29392251
tags question: http://stackoverflow.com/q/29447875

http://stackoverflow.com/q/29523307
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: java
accepted answer: http://stackoverflow.com/a/29523428
type: Question
tagged with: pagination
tagged with: jsp
tagged with: javascript
tagged with: jquery
has title: Pagination: how to load first page with AJAX
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/29523428
has body: I'm writing online shopping application using Struts 2. In front-end I'm using jsp, twitter bootstrap, jquery, moustache.js template, twbs pagination plugin and some javascript. I have Product entity and I want to display the list of products to the user in jsp page. The way I'm doing it is async loading page with fix number(20) of products in json format and then obtaining them using mustache template. All my code works except the time when user the first time sees this jsp page - first 20 products are not displaying. So when I'm moving from page to page it loads info, but as twbs plugin works through firing events it means that event is not triggered after jsp page loaded the first time. So my question is whats the truly good way to fix this ? Should I fire an event once or use $(document).ready() or $(document).onload() ? I'm not an expert in javascript, so please be patient <%@ include file="/WEB-INF/jspf/head.jspf"%> <%@ include file="/WEB-INF/jspf/menu.jspf"%>
favorite count: 0

slick.js
tag name: slick.js
tags question: http://stackoverflow.com/q/29413893
type: Tag
tags question: http://stackoverflow.com/q/29403522

http://stackoverflow.com/comment/47172827
comment on: http://stackoverflow.com/q/29495141
has text: yes, the data is posted to the controller meaning am getting the indexes and it is going to the 'if' condition,which contain export to excel code.It goes smooth through the code but export doesn't happen. Although the same export code is used at many other places and it works fine there.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29528190
tagged with: api
linked to: http://stackoverflow.com/q/20515944
type: Question
has body: I render a map with a route from point A to point B and zoom to the bounding box of the route. I also render an associated information bubble for point B (destination). This specific portion of my application does not involve user intervention so it is completely unattended The map is also printed Point B is always different using Enterprise Javascript API v2.5.4 My issue is that many times the info bubble overlays the route polyline which obstructs the route. I see InfoBubble alignment options for left, right, above, below but these will not help as points are dynamic Any suggestions on positioning of Info Bubble to assure it does not overlay route?
score: 0
has comment: http://stackoverflow.com/comment/47212055
answer count: 1
has title: Here Maps Javascript API - Information bubble overlaying route polyline?
tagged with: here-api
tagged with: javascript
has answer: http://stackoverflow.com/a/29559442
type: UnansweredQuestion

http://stackoverflow.com/comment/46970706
type: AnswerComment
comment on: http://stackoverflow.com/a/29397232
type: Comment
has text: Missed that part. It's fixed now.
score: 0

http://stackoverflow.com/q/29465422
tagged with: javascript
has answer: http://stackoverflow.com/a/29465873
has comment: http://stackoverflow.com/comment/47093622
has body: Query(document).ready(function() { var trCount = $('.Firsttable tr').length; for (var i = 4; i &lt;=4; i++) { var $td = $('.Firsttable tr:eq(2) td:eq(' + i + ')'), highest = 0, lowest = 9e99; for (var j = 1; j &lt; trCount; j++) { $td = $td.add('.Firsttable tr:eq(' + j + ') td:eq(' + i + ')'); } $td.each(function(i, el){ var $el = $(el); if (i &gt; 0) { var val = parseInt($el.text().replace(/[\$,]/g, ''), 10); if (val &lt; lowest) { lowest = val; $td.removeClass('low'); $el.addClass('low'); } } }); }
accepted answer: http://stackoverflow.com/a/29465873
type: AnsweredQuestion
has title: how to use following code recursively for different tables
type: Question
score: 0
answer count: 1

http://stackoverflow.com/comment/47119150
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29478889
score: 0
has text: If you just want to namespace some functions that are not actually methods of an instantiated object, then you don't use the prototype at all. You just put properties on an object and call those properties.

http://stackoverflow.com/q/29528317
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29529281
tagged with: jquery-ui-selectmenu
tagged with: css
has title: Customizing jQuery selectmenu dropdown button on after item selected?
has body: I'm looking to create a dropdown for colors that has each color as a small square next to the item. Have: Want (roughly): This version (jsfiddle) works fine for the dropdown items themselves, but I'd like the button to also update to have the colored square next to it. $.widget("custom.coloriconselectmenu", $.ui.selectmenu, { _renderItem: function (ul, item) { var li = $("&lt;li&gt;", {text: item.label}); var bgColorStyle = 'background-color:' + item.element.attr("data-color"); var fullStyle = "float: left; width: 21px; height: 19px; margin-right: 7px;" + bgColorStyle; $("&lt;div&gt;", {style: fullStyle}).appendTo(li); return li.appendTo(ul); } }); $("#selectId").coloriconselectmenu({icons: {button: "custom-button"}}); Is there a good way to modify the dropdown button on value update to include the color square like in the dropdown?
type: Question
tagged with: jquery-ui

http://stackoverflow.com/comment/46982836
type: QuestionComment
type: Comment
has text: This is the most important function when you develop a responsive site: http://www.w3schools.com/cssref/css3_pr_mediaquery.asp
score: 0
comment on: http://stackoverflow.com/q/29403349

http://stackoverflow.com/a/52341915
answers question: http://stackoverflow.com/q/29385437
has body: repeat() method of string can be used to find multiplication of two numbers. var a = 3; var b = 4; var res = "1".repeat(a).repeat(b).length; console.log(res) log: 12 It is repeating c, a times=> 'ccc' and then whole string b times=> 'cccccccccccc', length of the final string will be a*b; This is similar to loop approach. This approach is limited to positive and integer numbers only.
type: Answer
score: 0

http://stackoverflow.com/comment/47068972
comment on: http://stackoverflow.com/a/29451534
type: Comment
score: 0
has text: Can you post a jsfiddle with your html, css and js please
type: AnswerComment

http://stackoverflow.com/a/29461482
score: 1
upvote count: 1
has body: Javascript Array.prototype.push corresponds to List#add: t.add(0); List has no analog for Array.prototype.pop but you can remove the last element: result.remove(t.size() - 1); So the code could therefore be converted to use ArrayList, for example. LinkedList allows push/pop as well as access by index but its indexing is O(n). There is also Stack which has push/pop and O(1) indexing, but it's a subclass of Vector which new code is generally steered away from using. (Basically Vector's operations are synchronized for thread safety, which is a pointless overhead if the Stack isn't shared between threads. Vector is superseded by Collections.synchronizedList in this regard, so Stack has a very niche feature set.) I also don't see a problem with doing something like the following: public class MyList&lt;E&gt; extends ArrayList&lt;E&gt; { public E pop() { return this.remove(this.size() - 1); } } It doesn't break Liskov Substitution Principle (still behaves as an ArrayList).
answers question: http://stackoverflow.com/q/29461337
has comment: http://stackoverflow.com/comment/47087100
has comment: http://stackoverflow.com/comment/47087165
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47087247
accepted answer of: http://stackoverflow.com/q/29461337
type: Answer

http://stackoverflow.com/comment/47004932
comment on: http://stackoverflow.com/a/29415800
score: 0
type: Comment
has text: @mike-source added jquery animations
type: AnswerComment

http://stackoverflow.com/comment/46970569
comment on: http://stackoverflow.com/q/29378342
has text: MyApi is another object written in a separate file: MyApp. MyApi with namespace. Think of it as a wrapper around $.ajax
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/76498773
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29512814
has text: I want to use that API solution to convert google map points to Baidu map points. Can you please explain how to use that API -http://api.map.baidu.com/ag/coord/convert?from=2&to=4&x=121.4914&y=31.2423. Means what are 'from' & 'to' parameters. I have to use them in Android application(Java code)

http://stackoverflow.com/comment/47167802
has text: Updated and showed how implemented. I will put in a live dev site now if needed.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29505166

http://stackoverflow.com/a/29524950
type: Answer
answers question: http://stackoverflow.com/q/29523016
upvote count: 3
has comment: http://stackoverflow.com/comment/47205009
has body: From the error message, you are trying to parse the FTL with an XML parser. Of course, FTL is not well-formed XML (though with the square bracket syntax, like [#assign ...] it can be). Maybe you meant to parse the output of the template as XML, not the template itself.
score: 3
has comment: http://stackoverflow.com/comment/47253683
downvote count: 0

http://stackoverflow.com/comment/46990483
type: Comment
has text: You are wrong, when you use `.jqxGrid('getboundrows');` it returns all the data, and OP needs just indexes, which can be retrieved in a simpler way, which I've posted as answer
comment on: http://stackoverflow.com/a/29407714
type: AnswerComment
score: 0

http://stackoverflow.com/q/29485693
downvote count: 0
has comment: http://stackoverflow.com/comment/47130954
type: UnansweredQuestion
tagged with: iframe
type: Question
score: 3
has answer: http://stackoverflow.com/a/29708643
linked to: http://stackoverflow.com/q/2126238
linked to: http://stackoverflow.com/q/574944
has comment: http://stackoverflow.com/comment/47131041
has title: Load external page inside div and change it
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47170316
has body: I am trying to figure out how to load an external page inside a div and change it's HTML / CSS. Is it possible? I got stuck with Same-origin policy, since it doesn't let edit html with a different origin. For clarify, I want to highlight some content inside it's page and share it. What are the restrictions to do that and possible ways to solve?
favorite count: 0
upvote count: 3
linked to: http://stackoverflow.com/q/3076414
tagged with: http://stackoverflow.com/tag/html

linechart
tag name: linechart
tags question: http://stackoverflow.com/q/29465884
type: Tag

http://stackoverflow.com/comment/47092031
comment on: http://stackoverflow.com/q/29464274
score: 0
type: Comment
type: QuestionComment
has text: dandavis, strangely I've been looking at just that ,... @m59, many thanks for the simplified example!

http://stackoverflow.com/comment/108046861
has text: Does this answer your question? [Detect Desktop Browser (not mobile) with Javascript](https://stackoverflow.com/questions/7995752/detect-desktop-browser-not-mobile-with-javascript)
comment on: http://stackoverflow.com/q/29395870
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29492397
accepted answer of: http://stackoverflow.com/q/29492093
type: Answer
has comment: http://stackoverflow.com/comment/47144018
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29492093
has body: You need to configure the text node properly: svgContainer.append("text") .attr("x", 10) .attr("y", 20) .attr("fill", "blue") .text("Hahaha"); Otherwise, it might be outside of the visible are (y=0 is a common mistake; the Y coordinate moves the baseline of the text, not the top-right corner). Also without a color, the text will inherit one from the parent. Demo: http://jsfiddle.net/nhe613kt/65/
has comment: http://stackoverflow.com/comment/47144399
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47144769

http://stackoverflow.com/a/29507964
upvote count: 6
answers question: http://stackoverflow.com/q/29506103
downvote count: 0
has body: OK. I figured this out. If I understood correctly, $apply will generate a already in progress error if you run it on an isolated scope variable bound to its parent with '='. I think that '=' triggers the $digest (this is just an observation from trial and error while trying to solve this). My problem was that s.update() function was run before the next digest cycle. So local scope variables "did not have time" to copy to the parent scope. That's why I could only see the update at the next operation or at the next digest cycle hens always seeing previous change. Playing with setTimeout(function(){ s.update() }, 2000) proved it. If I delay the execution for a couple of seconds then I see the update with correct changes. Delaying is not a solution though, slowing down application is plain stupid. Then I found angular's $timeout(function() {}) This allows to skip the delay parameter which defaults to 0 and does not actually delay anything, but it does insure that callback runs on the next digest cycle so that the local scope variables can be updated to the parent. if (s.current &lt; s.pages) { s.current ++; $timeout(function() { s.update(); }); }
score: 6
type: Answer

http://stackoverflow.com/q/29445989
answer count: 1
downvote count: 1
favorite count: 0
has body: This function counts events from a file and stores them in an array. function hasEvent(event, entry) { return entry.events.indexOf(event) != -1; } function tableFor(event, journal) { var table = [0, 0, 0, 0]; for (var i = 0; i &lt; journal.length; i++) { var entry = journal[i], index = 0; if (hasEvent(event, entry)) index += 1; //9 if (entry.squirrel) index += 2; //4 table[index] += 1; } return table; } console.log(tableFor("pizza", JOURNAL)); Why does this function return //76, 9, 4, 1? The numbers should be //74, 10, 5, 1. I considered the function starts counting from zero, but I don't think so.
has comment: http://stackoverflow.com/comment/47060169
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47060368
has comment: http://stackoverflow.com/comment/47059772
has title: Why does the function return these values?
type: Question
has answer: http://stackoverflow.com/a/29446817
tagged with: function
tagged with: javascript
has comment: http://stackoverflow.com/comment/47059154
score: 0
has comment: http://stackoverflow.com/comment/47060430
upvote count: 1

http://stackoverflow.com/comment/47141608
score: 1
comment on: http://stackoverflow.com/q/29491143
type: Comment
type: QuestionComment
has text: 1> First of all when you click on **+ Add new question**, you are not adding any id to select tag. 2> And even if you add id it should be unique, else it will always take the first select with id **list1**

http://stackoverflow.com/comment/47214077
has text: it depends what you want to get when adding 2 hours to 11PM. If you need to have it roll to next date then you have to convert original time to Date object, add 2 hours and then convert back to string.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29530000

http://stackoverflow.com/comment/47083381
type: QuestionComment
comment on: http://stackoverflow.com/q/29449626
type: Comment
score: 0
has text: @Daniel so this is the [ray casting algorithm](http://rosettacode.org/wiki/Ray-casting_algorithm) for finding whether a point (x,y) is inside a polygon or not. I am looking to rewrite this same function in matlab. Thanks!

http://stackoverflow.com/comment/46961955
comment on: http://stackoverflow.com/q/29391670
type: Comment
has text: You need to bear in mind that rails and javascript run in completely different environments, and never interact. Rails runs on the server to generate a text file which is sent back to the browser. This text file can contain html, javascript etc. The browser then loads this text file, displays the html and runs the javascript. So, all interaction between rails and javascript is done via either A) rails rendering out some javascript to run on page load or B) javascript sending a request to the server, ie rails, and doing something with the response it gets back.
score: 0
type: QuestionComment

http://stackoverflow.com/a/36499091
has body: &lt;img src="/storage/sdcard0/Android/my-web/pictures/test.jpg /&gt; I using that code for test offline in my phone only transfer as a media from my laptop to my phone. Changes the "my-web" be the name of folder you give in folder you place it in your "my-web" folder, Create a new folder named "pictures" and move all img format. delete the "Android" if doesnot work and try it again if you transfer the file to internal memory just use "sdcard0" if you move it in external or sdcard changes the name be what the sd or external names
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29444021

http://stackoverflow.com/comment/47086812
score: 0
has text: I even added jquery it in the javascript file now still say undifined
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29461405

http://stackoverflow.com/a/29374558
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29374497
upvote count: 3
has body: The _.includes() method compares with the SameValueZero comparator, which is a special comparison mostly like ===. Even if you have an object in your array that looks like {'attribtueId' : 1001} that _.includes() call will never find it because two distinct objects will never compare as === to each other. When you pass an object to _.find(), by contrast, the library assumes that you want it to carry out an _.matches() comparison, which will compare properties of the "target" object. Thus, in your case, _.find() is probably the right choice. The _.includes method really fills a distinct niche.
accepted answer of: http://stackoverflow.com/q/29374497
score: 3
has comment: http://stackoverflow.com/comment/46933468
has comment: http://stackoverflow.com/comment/74794790
has comment: http://stackoverflow.com/comment/74797879

http://stackoverflow.com/q/29466204
answer count: 1
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/63278876
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29466539
linked to: http://stackoverflow.com/q/29535873
tagged with: calendar
type: Question
has title: Bootstrap datetimepicker calendar is not visible
has body: I am using bootstrap 3 datetimepicker. Here Bootstrap datetimepicker calendar is not visible outside the grid. It is hiding inside the grid. Please see the jsfiddle. http://jsfiddle.net/rtzxsa3e/ $(function () { var data = [ { rank: 1, company: 'Exxon Mobil', DatePicker: '04/04/1990 00:00', revenues: '339938.0', profits: '36130.0' }, { rank: 2, company: 'Wal-Mart Stores', DatePicker: '05/03/2014 00:00', revenues: '315654.0', profits: '11231.0' }, ]; var obj = { height:300, title: "ParamQuery Grid with JSON Data", scrollModel:{autoFit:true, theme:true} }; obj.colModel = [ { title: "Rank", width: 100, dataType: "integer", dataIndx: "rank" }, { title: "Company", width: 200, dataType: "string", dataIndx: "company" }, { title: "DatePicker", width: 200, dataType: "string", dataIndx: "date",editable:false, render : function(){ var date = ' '; return date; } }, { title: "Revenues ($ millions)", width: 150, dataType: "float", align: "right", dataIndx: "revenues" }, ]; $('body').on('mouseover','.input-group',function() { $(".input-group.date").datetimepicker(); }); obj.dataModel = { data: data }; $("#grid_json").pqGrid(obj); }); td.pq-grid-cell{ overflow:visible !important; } span.input-group-addon { width: 27px; } If I click the picker, bootstrap calendar is open but it is not visible the whole calendar. I want to display the calendar outside the grid. I have given "overflow:visible" and "visibility:visible" but still it is not working. Please help me for do this.
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/29466539

http://stackoverflow.com/a/29459988
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29459891
has comment: http://stackoverflow.com/comment/47083884
has body: By putting the parentheses after your function name, you are effectively calling it, and not passing the function as a callback. To provide parameters to the function you are calling: You can pass an anon function. setTimeout(function(){goodbye(name)}, 5000); Or, you can pass the arguments as a third parameter. setTimeout(goodbye, 5000, name); Look at this question: How can I pass a parameter to a setTimeout() callback?
score: 6
answers question: http://stackoverflow.com/q/29459891
has comment: http://stackoverflow.com/comment/47083924
type: AcceptedAnswer
upvote count: 6

http://stackoverflow.com/comment/46982377
has text: The original serialization is done through Java interface Externalizable.
score: 0
comment on: http://stackoverflow.com/q/29401989
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47065753
type: Comment
type: QuestionComment
has text: What is result of `async.parallel([ function(){ ... }, function(){ ... } ], callback);` ? , Can create stacksnippets , http://jsfiddle.net ? What is expected result of utilizing async module ?
comment on: http://stackoverflow.com/q/29449777
score: 0

http://stackoverflow.com/comment/47076251
has text: BTW you could do using Object.defineProperty and defining a getter instead of an accessor function :D
comment on: http://stackoverflow.com/a/29455735
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29462407
type: Answer
accepted answer of: http://stackoverflow.com/q/29462105
has comment: http://stackoverflow.com/comment/47133645
answers question: http://stackoverflow.com/q/29462105
has body: You need to include the Simple Auth Route mixin on the route you are authenticating import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin'; or handle the action in your initializer Ember.Application.initializer({ name: 'authentication', after: 'simple-auth', initialize: function(container, application) { var applicationRoute = container.lookup('route:application'); var session = container.lookup('simple-auth-session:main'); // handle the session events session.on('sessionInvalidationSucceeded', function() { applicationRoute.transitionTo('index'); }); } }); Take a look at the api, it's really helpful http://ember-simple-auth.com/ember-simple-auth-api-docs.html#SimpleAuth-ApplicationRouteMixin-sessionInvalidationSucceeded
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/47290009
type: QuestionComment
comment on: http://stackoverflow.com/q/29519173
score: 0
has text: I you know any upload-freandly anonymous servers, I'll make feedle to illustrate problem
type: Comment

http://stackoverflow.com/a/29432619
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29432530
type: AcceptedAnswer
has body: It is because you are not using click event try this: $("optgroup.opt_group").click(function(e) { $(this).children().attr('selected','selected'); });
type: Answer
downvote count: 0
score: 3
answers question: http://stackoverflow.com/q/29432530

http://stackoverflow.com/q/29379915
tagged with: asynchronous
has title: Implementing Ajax deferred/promise patterns
has body: I have a testcase where I want to send a request to the server every time a form field change event occurs. The implementation below works as expected until I submit the form and check for any empty values(this is the only front-end validation carried out, the rest is done via ajax). If a field is empty I trigger a change event so validation can be carried out on the server side. In the example below I had to set async=&gt;false so each trigger would work as expected. I realize this is not ideal and there is a better way around this using deferred/promise patterns. I am already using somewhat of the pattern .promise and .then however I think I need to use the .when method but I am unsure how to work it into my partially working example. I am also a little unsure of the amount of request's being sent to the server. Is it viable to send this many, i.e.: each time an event occurs? Please ignore the block comments, I just use them for code separation. (function($){ var Registration= {}; /** * * @type type **/ Registration.fields = {}; /** * * @type type **/ Registration.options = { cache : false, type : 'POST', dataType : 'json', url : SITE_URL + '/members/validateFieldOnChange', context : undefined, data : undefined, async : false // TODO }; /** * * @returns {undefined} **/ Registration.init = function(){ //caching this.Form = $('form#form-register'); this.fields = { username : this.Form.find('#username'), email : this.Form.find('#email'), password : this.Form.find('#password'), }; // register event handlers this.Form.on('change', 'input', $.proxy(this.handleEvents, this)); this.Form.on('submit', $.proxy(this.handleEvents, this)); }; /** * * @param {type} event * @returns {undefined} **/ Registration.handleEvents = function(event){ var type, target event.preventDefault(); type = event.type; target = event.target; if(type == 'change'){ return this.handleChangeEvent(event.target); } return this.handleSubmitEvent(); }; /** * * @param {type} target * @returns {undefined} *…
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46939909
has comment: http://stackoverflow.com/comment/46939967
answer count: 0
has comment: http://stackoverflow.com/comment/46939856
type: Question
has comment: http://stackoverflow.com/comment/46939771
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46940041

http://stackoverflow.com/comment/47119969
comment on: http://stackoverflow.com/a/29478749
score: 0
has text: Works fairly well now. Keep in mind this a very poorly coded version I threw together quickly just to show you the basics of how you might do this. I hope this helps you.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29374383
answers question: http://stackoverflow.com/q/29373864
has comment: http://stackoverflow.com/comment/46942707
accepted answer of: http://stackoverflow.com/q/29373864
type: Answer
score: 3
has body: You can have a function that generates those functions: generateAuthFunction : function( authDetails) { return function (e) { var $this = $( e.target ).closest( '[data-fn]' ) , text = $this.text() , that = this; $this.text( 'Authenticating...' ).addClass("auth-button-disable") $.ajax({ type : 'POST', url : authDetails.url, data : authDetails.dataFunc(this), complete: function( xhr ) { if ( xhr.status === 200 ) that.relocate(); else { $this.text( text ).removeClass("auth-button-disable"); that.handleError( xhr.status ); } }, dataType : 'json' }); }; } Then you generate it with: var authDetailsA = { url : '/A_authentications/update/', dataFunc : function (this) { return { _method : 'PUT', sms_token : this.$el.find( '#sms-input' ).val() }; } }; var authDetailsB = { url : '/B_authentications/', dataFunc : function (this) { return { otp : this.$el.find( '#B-input' ).val() }; }; authenticateA : generateAuthFunction(authDetailsA); authenticateB : generateAuthFunction(authDetailsB); You could call it like before: 'click [data-fn="authenticate-A"]' : 'authenticateA', 'click [data-fn="authenticate-B"]' : 'authenticateB' I think this might even introduce unnecessary complexity, but it is more DRY.
downvote count: 0
has comment: http://stackoverflow.com/comment/46935388
upvote count: 3
has comment: http://stackoverflow.com/comment/47047301
type: AcceptedAnswer

http://stackoverflow.com/q/29397720
has answer: http://stackoverflow.com/a/29397978
has comment: http://stackoverflow.com/comment/46971948
score: 0
has answer: http://stackoverflow.com/a/29398006
type: UnansweredQuestion
answer count: 4
has comment: http://stackoverflow.com/comment/46971637
has comment: http://stackoverflow.com/comment/46971802
has answer: http://stackoverflow.com/a/29398931
has title: AngularJs - Find relational information in two arrays
type: Question
has answer: http://stackoverflow.com/a/29397976
has body: I'm getting two json arrays from an api. Data Examples: Serie type: [ {"Id":1,"BetTypeId":1, "NameEng":"Win"}, {"Id":2,"BetTypeId":1,"NameEng":"Draw"} ] Bet type: [ {"Id":1,"NameEng":"3-Way Result","SportId":1 {"Id":2,"NameEng":"Double Chance","SportId":1} ] As you can see, Serie type objects has BetTypeId. But i need to remote Bet type object from array there is no serie type for it. I have tried looping in bet type array but i don't how do i filter in serie types. What are the steps to achieve this?
tagged with: javascript

http://stackoverflow.com/a/29467852
has body: Use d3 classed operator. if(d.source.x == d.target.x){ d3.select(this).classed("your-class-name",true); //Adding class } else{ d3.select(this).classed("your-class-name",false); //Removing class } Or simply d3.select(this).classed("your-class-name",d.source.x == d.target.x); For more details, see D3 Class Operations at jaketrent.com
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 5
upvote count: 5
accepted answer of: http://stackoverflow.com/q/29466806
answers question: http://stackoverflow.com/q/29466806

http://stackoverflow.com/comment/47163094
comment on: http://stackoverflow.com/a/29502324
score: 0
type: AnswerComment
has text: I am not having any problems with my php, can we focus on the jQuery issue please? It's still not parsing `.show()` correctly, it stays hidden.
type: Comment

apache
tag name: apache
tags question: http://stackoverflow.com/q/29459240
type: Tag
tags question: http://stackoverflow.com/q/29506696

http://stackoverflow.com/comment/47256157
comment on: http://stackoverflow.com/a/29530122
type: Comment
has text: From a computation persepctive, collisions of two successive `Math.random()*16` calls are far less likely than two successive calls of `Math.random()*16`. If your goal is to avoid collisions, then casting a 64 bit float in which pretty much all the bits are relevant to a 32 bit integer in which only four bits ever matter, is a weird thing to do, and anyone who asks about "what the odds of collision are" but shows this code, is probably not aware this is what they're doing. If they *intentionally* forced a 32 bit int with 4 meaningful bits, they'd already understand the probabilities involved.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29492990
accepted answer: http://stackoverflow.com/a/29493084
has body: I want to make day parameter optional in toLocalDateString as following: if (item.series.xaxis.tickSize[1] == 'day') { var day_exist = 'day:"2-digit",'; } else { day_exist = ''; } dateString = d.toLocaleDateString( navigator.language, {day_exist month:'short', year:'2-digit'}); But this is not working. Any idea?
answer count: 1
downvote count: 1
has title: How to make day field optional in toLocalDateString
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29493084
upvote count: 0
tagged with: flot
favorite count: 0
type: Question
score: -1

http://stackoverflow.com/q/29421702
has body: When I execute my render of some geometry I can see in my console this warning: THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter. I can't understand the reason and the background of my canvas is completely black.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47015268
has comment: http://stackoverflow.com/comment/47015921
type: Question
has comment: http://stackoverflow.com/comment/66980651
has comment: http://stackoverflow.com/comment/47015577
has comment: http://stackoverflow.com/comment/47015054
answer count: 1
has answer: http://stackoverflow.com/a/29422240
upvote count: 23
accepted answer: http://stackoverflow.com/a/29422240
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/47330626
has comment: http://stackoverflow.com/comment/47015887
has title: Threejs Texture
tagged with: three.js
has comment: http://stackoverflow.com/comment/47015231
downvote count: 0
score: 23

http://stackoverflow.com/comment/47064938
type: AnswerComment
score: 0
type: Comment
has text: Cool, Thanks. It seems to be working fine after I change to sendDeviceEventWithName.
comment on: http://stackoverflow.com/a/29433751

http://stackoverflow.com/q/29391698
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46960829
has answer: http://stackoverflow.com/a/29392617
has body: I've recently started using http://vitalets.github.io/x-editable/ with jQueryUI. I successfully used it with input text and select menus, and next wish to implement radio buttons. The UX should be the same as with other input types (i.e. user clicks some text, two or more radio buttons popup along with a enter and cancel icon). Is this possible, and if so, how?
upvote count: 2
type: UnansweredQuestion
score: 1
downvote count: 1
type: Question
has title: Radio Buttons with X-editable
tagged with: javascript
has comment: http://stackoverflow.com/comment/46960558
has comment: http://stackoverflow.com/comment/46960537

http://stackoverflow.com/comment/111466403
score: 0
has text: @G.Lakshmi If the API returns an array of rows you can use a loop.
comment on: http://stackoverflow.com/a/29424908
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29482203
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47124978
has answer: http://stackoverflow.com/a/29482265
upvote count: 5
tagged with: mobile-safari
type: Question
score: 5
has comment: http://stackoverflow.com/comment/47148014
answer count: 1
downvote count: 0
tagged with: ios
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I have a Joomla 3 site at http://www.getdripped.com/dev which I am building a mobile menu for. I have it working well on desktops, but when I try to view it on my iPhone the menu slides in but is invisible. I can still blindly tap and the links do work, but its completely invisible. What's even weirder, when I click the button again to close the menu, it suddenly shows up for a brief second before the drawer closes. I'm not sure what the problem is, can anyone help? My iPhone is running iOS 8.2, and I previewed in Safari. When I preview in the iPhone Chrome app, everything works swimmingly. Very confused here...
accepted answer: http://stackoverflow.com/a/29482265
has title: iPhone: Fixed position Div invisible

http://stackoverflow.com/a/29472962
has comment: http://stackoverflow.com/comment/47108900
has body: $.ajax({ type: "POST", url: "fetch_plots.php", data: {area:area, sector:sector}, cache: false, beforeSend: function () { $('#output2').html(' '); }, success: function(html) { $("#output2").html( html ); } }); fetch_plots.php $area = (isset($_REQUEST["area"]) ? intval($_REQUEST["area"]) : 0); // assuming "$area" is an integer, not a varchar echo $area; $sector = (isset($_REQUEST["sector"]) ? intval($_REQUEST["sector"]) : 0); // assuming "$sector" is an integer, not a varchar echo $sector; if ( !empty($area) && !empty($sector) ) { $sql = "SELECT * FROM plots where area_id=" . $area . " AND sec_id=" . $sector; echo $sql; $count = mysqli_num_rows( mysqli_query($con, $sql) ); if ($count > 0 ) { $query = mysqli_query($con, $sql); ?> Select Plot <?php while ($rs = mysqli_fetch_array($query)) { ?> <option value="<?php echo $rs["plot_id"]; ?>"><?php echo $rs["name"]; ?> <?php } ?> <?php } } ?>
type: Answer
has comment: http://stackoverflow.com/comment/47107462
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47107701
has comment: http://stackoverflow.com/comment/47107501
has comment: http://stackoverflow.com/comment/47108258
answers question: http://stackoverflow.com/q/29472879
downvote count: 0
has comment: http://stackoverflow.com/comment/47108101
has comment: http://stackoverflow.com/comment/47108018

restful-architecture
type: Tag
tags question: http://stackoverflow.com/q/29464468
tag name: restful-architecture

http://stackoverflow.com/comment/47079941
type: AnswerComment
comment on: http://stackoverflow.com/a/29457773
has text: Ok, show me some sample data which you have in `$std_res` using PHP for loop.
score: 0
type: Comment

http://stackoverflow.com/q/29473605
has comment: http://stackoverflow.com/comment/47108963
favorite count: 0
has comment: http://stackoverflow.com/comment/47118270
has comment: http://stackoverflow.com/comment/47109223
linked to: http://stackoverflow.com/q/28398550
has answer: http://stackoverflow.com/a/29474297
has title: Jquery, trigger click or enter
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47109173
has comment: http://stackoverflow.com/comment/47109511
duplicate of: http://stackoverflow.com/q/28398550
has answer: http://stackoverflow.com/a/29475756
has comment: http://stackoverflow.com/comment/47109621
score: 1
has body: I'm trying to submit a field with jquery, normally in the page you would click on a submit button or press enter in the field. I'm doing this in a chrome script. Now if I type: $('#myButton').click() In the Console, this actually works fine, but when i call the same code from my script function, it doesn't work. I tried also to use this: var e = jQuery.Event("keydown"); e.which = 50; e.keyCode = 50; $("#myButotn").trigger(e); but still no results. To be specific, the button that i'm willing to click has an onClick="submitFunction()"
has comment: http://stackoverflow.com/comment/47108334
type: Question
has answer: http://stackoverflow.com/a/29478154
has comment: http://stackoverflow.com/comment/47108346
has comment: http://stackoverflow.com/comment/47109463
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47109155
has comment: http://stackoverflow.com/comment/47109392
answer count: 3
has comment: http://stackoverflow.com/comment/47121168
has comment: http://stackoverflow.com/comment/47109284
tagged with: google-chrome-extension
upvote count: 1

http://stackoverflow.com/q/29481854
type: UnansweredQuestion
has body: i have 2 tabs on home page and both have search forms with an autocomplete feature for input of location. html Weekend Holidays Holidays Where When Where When Autocomplete works fine in tab 1 but all the inputs for form 2 shows error. i am aware of changing id to autocomplete2 but i donot know jquery/ js to impement it. kindly also tell in which js files changes needs to be made. Thanks in Advance
type: Question
tagged with: autocomplete
tagged with: javascript
tagged with: jquery
has title: how to have 2 autocomplete in 2 different forms on same page bootstrap -3
has comment: http://stackoverflow.com/comment/47124393
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47125417
answer count: 0
tagged with: twitter-bootstrap

http://stackoverflow.com/q/29441007
has comment: http://stackoverflow.com/comment/47050411
has comment: http://stackoverflow.com/comment/47050382
has comment: http://stackoverflow.com/comment/47050460
type: Question
has comment: http://stackoverflow.com/comment/47050420
score: 0
answer count: 2
has body: I'm trying to make something where a user can type in a string, !exchange and then a word after. If the word after exchange matches the word huntsman, for example, I want it to do one thing, and another thing for a different word. I've tried to do var req = msg.match(/^!exchange/i); //msg is the string that I'm testing But that doesn't work. I've also tried var req = msg.match(/^!exchange \b/i); But I get the same result. Can anyone help?
has comment: http://stackoverflow.com/comment/47050486
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29441111
has comment: http://stackoverflow.com/comment/47050438
has title: Search a regular expression for a word
has answer: http://stackoverflow.com/a/29441102
tagged with: regex
has comment: http://stackoverflow.com/comment/47050459
possible better answer: http://stackoverflow.com/a/29441102
has comment: http://stackoverflow.com/comment/47050444
has comment: http://stackoverflow.com/comment/47050433
has comment: http://stackoverflow.com/comment/47050402
has answer: http://stackoverflow.com/a/29441111
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47050442

http://stackoverflow.com/a/29522445
type: Answer
has comment: http://stackoverflow.com/comment/47199565
answers question: http://stackoverflow.com/q/29521675
upvote count: 3
has comment: http://stackoverflow.com/comment/47199463
score: 3
has body: We can readily determine that this is not function declaration, according to ES5 section 14: Program : SourceElementsopt SourceElements : SourceElement SourceElements SourceElement SourceElement : Statement FunctionDeclaration A FunctionDeclaration can only be a SourceElement (a quick search for FunctionDeclaration shows no other grammatical use), and a SourceElement can only be a top-level component of a list of SourceElements (either a Program or a FunctionBody). This use of function is nested inside of an assignment, so it cannot be a top-level SourceElement. Furthermore, we can also rule out this as a FunctionDeclaration by its definition: FunctionDeclaration : function Identifier ( FormalParameterListopt ) { FunctionBody } Your code does not have an Identifier, which is mandatory for FunctionDefinitions (but optional for FunctionExpressions).
downvote count: 0
has comment: http://stackoverflow.com/comment/47199522

http://stackoverflow.com/comment/47003458
type: QuestionComment
has text: I saw the site now.. you are using bootstrap, maybe this problem is caused cause the area is responsive. Have you tried to resize the page? If it isn't a jquery problem, I think I can't help
score: 0
comment on: http://stackoverflow.com/q/29412409
type: Comment

http://stackoverflow.com/comment/46955486
has text: Which is why Fiddler traces of all 3 would seem necessary. If I was to guess, I expect that Chrome and Firefox are **fixing** the broken url, issuing a correct url instead of the one in the code, and IE is treating the value as-is, expecting the url to be correct. The only way to know for sure is by sniffing the HTTP traffic, hence Fiddler.
comment on: http://stackoverflow.com/q/29385715
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47058904
comment on: http://stackoverflow.com/q/29445140
has text: In the previous discussion, http://stackoverflow.com/questions/24768772/prevent-a-google-maps-iframe-from-capturing-the-mouses-scrolling-wheel-behavior#26890673, there was a layer on top of the map to catch the mouse events.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47118967
has text: Thanks, but can you make the same in JS? Without JQuery.
type: AnswerComment
score: 2
type: Comment
comment on: http://stackoverflow.com/a/29479231

http://stackoverflow.com/comment/47116762
has text: You'll need to provide more context. Is your site on a hosting service? It could be put there for their tracking purposes, and you'd probably want to bring it up with them. Without downloading the content ourselves (and exposing ourselves to potential harm), we probably can't tell you definitively whether they cause harm to users.
comment on: http://stackoverflow.com/q/29432030
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/47019235
type: Comment
has text: just made it back to a string again :(
comment on: http://stackoverflow.com/a/29423660
type: AnswerComment
score: 0

http://stackoverflow.com/q/29383572
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: php
downvote count: 1
score: 1
tagged with: mysql
type: Question
answer count: 2
has title: Collecting Row IDs in an Array using Jquery and then Querying those values for a new table
tagged with: arrays
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29384497
has body: I'm trying to set up a function using jquery/php where a user selects a checkbox in a row with a specific ID (the id matches the primary key of the row data in my database), stores each row ID into an array, and then upon clicking the "compare selected rows" button passes it to a new page where a table of results is displayed with only those selected rows. each input looks like this &lt;input type='checkbox' id='$id' class='compareRow'&gt;&lt;/input&gt; I am pretty novice at jquery and was planning to use a variation of a previous script I had put together to display dynamic row data in a modal. I am not sure if this code is relevant at all but it also passes the row id to another php page in order to query the database. Mind you this has only been used for single queries in the past where this new function would need some sort of foreach statement at the query level in order to process the array of IDs, im sure. Heres the script I've been trying to tweak $(function(){ $('.compareRow').click(function(){ var ele_id = $(this).attr('id'); $.ajax({ type : 'post', url : 'query.php', //query data : 'post_id='+ ele_id, // passing id via ajax success : function(r) { other code? }); } }); }); }); I know that there is much more needed here but this is just what I have so far, any help would be greatly appreciated. Update, so I've created the page and have the following: in my compareSelected.php I have the following code: if(isset($_POST['post_id'])){ $compare_received = $_POST['post_id']; } print_r($compare_receive); It returns undefined index. I also modified the code to change to that page after like so: $('.compareRowButton').click(function(){ var ids = []; //loop to all checked checkboxes $('.compareRow:checked').each(function(){ //store all id to ids ids.push($(this).attr('id')); }); $.ajax({ type : 'post', url : 'compareSelected.php', //query data : {post_id:ids}, // passing id via ajax success : function(r) { window.location = 'compareSelected.php'; } }); }); Not sure…
has answer: http://stackoverflow.com/a/29383877

http://stackoverflow.com/comment/47189085
type: Comment
score: 4
type: AnswerComment
has text: So if you want to work with the return value of a promise's asynchronous callback, it has to be done inside another asynchronous callback. Makes sense. I had been looking for a way to get some ultimate primitive return value but I suppose that would defy reason given the context.
comment on: http://stackoverflow.com/a/29516570

http://stackoverflow.com/q/29405790
tagged with: css
has answer: http://stackoverflow.com/a/29405891
possible better answer: http://stackoverflow.com/a/29405891
has comment: http://stackoverflow.com/comment/46986308
type: AnsweredQuestion
has body: I have been trying to get this to work for the past 6 hours and I am just unable to do it right. I've looked at the questions and solutions on SO as well to no avail. What am I doing horribly wrong?!? All I have is a html5 page with no background. In my javascript code I call upon this method when the document is ready: /* * Initializes the landing page. */ function initializeLanding(){ $('body').css({ 'backround':'url("http://40.media.tumblr.com/290e7a272b492735ddf8cd968e657d05/tumblr_nhmg6xYnv41u7ns0go1_1280.jpg")' }); } It should be something stupidly simple, and yet here I am. I've tried using single quotes, double quotes, without multiple attributes, etc. I would also much rather not use CSS or DOM properties to change the background, as I have set up way points along the page to change the background upon scrolling past them. Also, if I call the .css() method and put in new attributes, will it overwrite all the old ones, or just the stated attributes in the latest css() call? Update: here is where I call the function: var main = function(){ $(".owl-carousel").owlCarousel(); lorem(); initializeLanding(); } $(document).ready(main);
accepted answer: http://stackoverflow.com/a/29405841
has title: Changing page background via Javascript
type: Question
has comment: http://stackoverflow.com/comment/46986307
answer count: 2
has comment: http://stackoverflow.com/comment/46986271
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29405841

http://stackoverflow.com/q/29428566
has answer: http://stackoverflow.com/a/29428892
has body: I'm currently trying to get the sly plugin to work properly on a site I'm designing. So, quick background info: Sly Plugin Examples Page: http://darsa.in/sly/examples/horizontal.html Sly Plugin Documentation Page: https://github.com/darsain/sly/tree/master/docs The page I'm working on: http://turtscher-campos.com/projects/harald-korvas/v3-projects.html My initialize.js file is using the code/setup for 'CYCLING BY ITEMS' that they had in their demo page (horizontal.js). The issue: even though scrollBy is set to 1, when I scroll, the code moves two slides per 'mousewheel scroll' instead of 1 by 1, as shown in the CYCLE BY ITEMS demo. I just can't seem to locate the root cause of the issue. Any help would be appreciated. Sotkra
score: 0
has comment: http://stackoverflow.com/comment/47027311
answer count: 2
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29428892
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47027473
has answer: http://stackoverflow.com/a/29735801
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47027626
type: Question
has comment: http://stackoverflow.com/comment/47027865
has comment: http://stackoverflow.com/comment/47027343
accepted answer: http://stackoverflow.com/a/29735801
has title: JQuery Sly Plugin - Mousewheel scroll moves slides 2 at a time instead of 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/47027324
has comment: http://stackoverflow.com/comment/47028033

http://stackoverflow.com/q/29393568
tagged with: css
has comment: http://stackoverflow.com/comment/46964058
score: 1
has comment: http://stackoverflow.com/comment/46963717
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29393804
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
has comment: http://stackoverflow.com/comment/46963961
has title: TypeError: t(...).on is not a function on fullcalendar
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has body: fullcalendar is throwing an error: TypeError: t(...).on is not a function fullcalendar.min.js:8:11264 This are my script/css includes: And this is the page where I want to use fullcalendar: Very basic, I just used the code from the documentation page. So my guess is that I've done something wrong with the tags. Edit: I changed to use the non-minified version of fullcalendar. The error message changed to: TypeError: $(...).on is not a function fullcalendar.js:6912:2 When I click on that error it shows: $(document).on('mousedown', this.documentMousedownProxy); In the function: bindGlobalHandlers: function() { $(document).on('mousedown', this.documentMousedownProxy); },

http://stackoverflow.com/comment/46942628
has text: got it ^([0-9]+|[0-9]+[0-9]\.[0-9]{1,2}+|[1-9]\.[0-9]+|0\.[5-9][0-9]?)$
type: Comment
comment on: http://stackoverflow.com/a/29379903
score: 1
type: AnswerComment

requestanimationframe
tags question: http://stackoverflow.com/q/29419118
tags question: http://stackoverflow.com/q/29430789
type: Tag
tag name: requestanimationframe
tags question: http://stackoverflow.com/q/29480204
tags question: http://stackoverflow.com/q/29516461

http://stackoverflow.com/a/29465169
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29465123
has comment: http://stackoverflow.com/comment/47093258
has comment: http://stackoverflow.com/comment/47093281
type: Answer
upvote count: 1
has body: var head = document.getElementById("head").firstChild.nodeValue; Here head contains only the text Groceries. So you can't access groceries.nodevalue So you must use: var head = document.getElementById("head").firstChild; head.textContent = head.nodeValue + list.length; Here, we're storing the reference of the textNode in head at first. In second line, we are setting the textContent in that textNode.
accepted answer of: http://stackoverflow.com/q/29465123
score: 1

http://stackoverflow.com/a/29472650
score: 8
has comment: http://stackoverflow.com/comment/47108097
has comment: http://stackoverflow.com/comment/47108022
has comment: http://stackoverflow.com/comment/47107439
has body: What you see, OrÃ§amento, is the result of a UTF-8 byte array being rendered in ASCII, probably codepage ISO 8859-1. ReactJS doesn't support non-ASCII characters within HTML. Try this: var Orcamento = React.createClass({ render: function() { return ( &lt;div&gt; &lt;h1&gt; { 'Orçamento' } &lt;/h1&gt; &lt;/div&gt;; ); } }); Or simply replace Orçamento with Or&amp;#231;amento. This is well explained in the JSX gotchas.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47107653
has comment: http://stackoverflow.com/comment/47109124
type: Answer
downvote count: 2
accepted answer of: http://stackoverflow.com/q/29472020
upvote count: 10
answers question: http://stackoverflow.com/q/29472020

http://stackoverflow.com/a/29393597
downvote count: 1
has comment: http://stackoverflow.com/comment/46964060
has comment: http://stackoverflow.com/comment/46963903
has comment: http://stackoverflow.com/comment/46964764
has comment: http://stackoverflow.com/comment/46963929
answers question: http://stackoverflow.com/q/29393461
type: Answer
score: 2
has body: Usually you use either !function(f){...}() or (function(f){...})() or +function(f){...}() The developers here combined the first two, which is redundant.
upvote count: 3

http://stackoverflow.com/comment/47263992
score: 0
has text: Okay I see where it went wrong I should stick at the bottom but when I scroll down to the next section it should stay at the top! The js script is should do that. Sticking it to the top or bottom is not a problem.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29523208

chart.js
tags question: http://stackoverflow.com/q/29405334
tags question: http://stackoverflow.com/q/29423899
type: Tag
tags question: http://stackoverflow.com/q/29395853
tags question: http://stackoverflow.com/q/29403036
tags question: http://stackoverflow.com/q/29447579
tag name: chart.js
tags question: http://stackoverflow.com/q/29493022

http://stackoverflow.com/a/29387954
score: 2
has body: Use single quotes '' for setting the class. If you use double quotes "" within double quotes you will get the problem you are experiencing. myFunction() { document.getElementById('myDiv').innerHTML=" Example 1 Example 2 Example 3 " }
type: Answer
answers question: http://stackoverflow.com/q/29387923
upvote count: 3
has comment: http://stackoverflow.com/comment/46953673
downvote count: 1

http://stackoverflow.com/q/29383592
has body: I am having difficulty in understanding the puropse of onicecandidate function. How does the ice candidates helps in establishing the peer connection.And who sends the ice candidates first?
has answer: http://stackoverflow.com/a/29553750
favorite count: 0
possible better answer: http://stackoverflow.com/a/29553750
upvote count: 1
accepted answer: http://stackoverflow.com/a/29465745
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29825104
score: 1
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29465745
answer count: 3
tagged with: webrtc
has title: What does peer_connection.onicecandidate() function do?what is an ice_event?

http://stackoverflow.com/comment/46968553
type: QuestionComment
has text: Do you need to click them? Could you not call the code that happens on `click` instead? That might be easier to do
comment on: http://stackoverflow.com/q/29396077
score: 0
type: Comment

http://stackoverflow.com/q/29417804
tagged with: angularjs
has body: I want to write one directive to genrerate navigation bar. https://jsfiddle.net/berber5/p03uhub8/ index.html : My directive : app.directive('navigationBar', ['$window', function ($window) { return { restrict: 'EA', template: " "+ " "+ " "+ " {{value.libelle}} "+ " 0' class='caret'>"+ " "+ " 0'>"+ " "+ "{{value2.libelle}}"+ " "+ " "+ " "+ " "+ " ", scope: { datas : "=datas" }, link: function (scope, elem, attrs) { console.log("LINK : ", scope, elem, attrs); scope.dismissAll = function (){ for(var i = 0; i< scope.datas.length; i++) { scope.datas[i].showMe = false; } } scope.toggle = function toggle(index){ scope.datas[index].showMe = !scope.datas[index].showMe; for(var i = 0; i< scope.datas.length; i++) { if (i !=index) { scope.datas[i].showMe = false; } } }; } }; }]); I seek how to hide the sub-menu if the user clicks outside of the navigation bar
type: AnsweredQuestion
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/20186438
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29428575
accepted answer: http://stackoverflow.com/a/29428575
upvote count: 1
answer count: 1
favorite count: 0
has title: How to hide submenu on click outside of navigation bar

http://stackoverflow.com/comment/47160335
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29483195
has text: Messed up the selector for the hidden field, I have updated my answer.
type: AnswerComment

http://stackoverflow.com/q/29397919
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29399223
tagged with: animation
tagged with: css
type: Question
has answer: http://stackoverflow.com/a/29398736
tagged with: javascript
tagged with: jquery
has title: Jquery animation/fadeIn/fadeOut
score: 0
has body: I am complete newbie doing my first steps in front-end. I have spend most of my day on working out on some animation function but could not accomplish,below is the HTML, CSS and Javascript codes : Белточчо Belltocco Company Paper production of all kinds in Kaliningrad +7(4012)778080 25 Kant str. Kaliningrad info@beltocco.ru Toilet paper min order: 5000 each quality: iso 9001 Lorem Ipsum: 5000 Lorem Ipsum: 1000 Toilet paper min order: 5000 each quality: iso 9001 Lorem Ipsum: 5000 Lorem Ipsum: 1000 Toilet paper min order: 5000 each quality: iso 9001 Lorem Ipsum: 5000 Lorem Ipsum: 1000 Toilet paper min order: 5000 each quality: iso 9001 Lorem Ipsum: 5000 Lorem Ipsum: 1000 /* http://meyerweb.com/eric/tools/css/reset/ 2. v2.0 | 20110126 License: none (public domain) */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; } header { background:#FFF; top: 0; width:1280px; padding:0px; height: 220px; margin-left:0; } .logo { margin-left:200px; margin-top:50px; margin-bottom:50px; width:150px; float:left; } .top-contacts { float:left; padding:75px 20px; color:#000; } .top-c…
answer count: 2
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29395299
tagged with: ajax
type: Question
has answer: http://stackoverflow.com/a/29405157
has comment: http://stackoverflow.com/comment/46969006
score: 0
has title: MySQL Query with PHP and Send Data to JavaScript
tagged with: php
has comment: http://stackoverflow.com/comment/46969062
has answer: http://stackoverflow.com/a/29396734
has answer: http://stackoverflow.com/a/29396724
answer count: 3
has body: EDIT: I have a number input with an ID on it. In a MySQL database, I have a table with all the IDs and a list of options separated by commas for that ID. I'll take one of the database records for example: The id is "ham_and_cheese" and the options are "Mayonnaise, Salad Cream, Chutney, No Dressing". Say the person selects 1 on the number input with the ID "ham_and_cheese". Then, 1 drop down will appear with the options: "Mayonnaise, Salad Cream, Chutney, No Dressing" (Each their own option). If they choose 2, then 2 dropdowns appear, 3 then 3 appear, etc. I am very new to Ajax so it would be great if someone could help me out. My new code: ... &lt;td&gt;&lt;input type='number' min='0' max='5' name='ham_and_cheese_amount' /&gt;&lt;/td&gt; ... &lt;td id='ham_and_cheese_dressing'&gt;&lt;/td&gt; ... function changeDropdown(name, amount){ //Gets the id. var newName = name.replace("_amount", ""); //Gets the div that the drop down will go in. var el2 = document.getElementById(newName + "_dressing"); //If number 0 is selected in number input. if(amount == 0){ el2.innerHTML = ""; } //If number 1 is selected in number input. if(amount == 1){ var html = "&lt;select&gt;"; var id = newName; $.ajax({ url: 'updateDropdown.php', dataType: 'json', data: {'option_id':id}, type: 'get', success: function(r){ for(i = 0; i &lt; r.length; i++){ // I use r[i].toLowerCase().replace(" ", "_") to convert "Salad Cream" to the id "salad_cream", etc. html += "&lt;option value='" + r[i].toLowerCase().replace(" ", "_") + "'&gt;" + r[i] + "&lt;/option&gt;"; } html += "&lt;/select&gt;"; el2.innerHTML = html; } }); } } My updateDropdown.php: &lt;?php include "/home/pi/config.php"; $id = $_GET['option_id']; //I know that the connect works because I use the same code for other queries. $connect = mysqli_connect("localhost", $name, $pass, "items"); if(mysqli_connect_errno()){ return "Failed to connect to products database!"; } $result = mysqli_query($connect, "SELECT options FROM products WHERE id='$id'…
tagged with: mysql
type: UnansweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/46968785
has comment: http://stackoverflow.com/comment/46968728

http://stackoverflow.com/q/29510037
has comment: http://stackoverflow.com/comment/47176231
has title: Calling same function in setTimeout
tagged with: javascript
score: 0
answer count: 1
has body: I have a function that does the ajax GET request and it returns the success or error response. In success response, I am again calling the same function but after 2 sec. For this, I have following code. function check_something() $.ajax({ type: 'GET', url: '/something', success: function(data){ setTimeout(check_something(),2000); }, error: function(response) { if(response.status == 401){ //do something else } } }); }; $(function(){ check_something(); }); But from network console log and server log it looks like a request for "/something" are coming at faster than 2 sec interval. I see that request are incoming after like 10 or 12 ms. What can be the problem with piece of code?
type: UnansweredQuestion
tagged with: settimeout
type: Question
has answer: http://stackoverflow.com/a/29510068

http://stackoverflow.com/a/29444217
upvote count: 2
score: 2
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29417622
accepted answer of: http://stackoverflow.com/q/29417622
type: Answer
has body: Create a partial for showing comment form. Render this partial to post show page as hidden. show hidden partial. Example: &lt;%= link_to 'Show Modal', "#", data: {toggle: "modal", target: "#modal"} %&gt; hidden partial &lt;div class="modal hide fade" id="modal" title="My modal"&gt; /* your comment form */ /* render comment form */ &lt;/div&gt; Just make sure target is your hidden partial id.

http://stackoverflow.com/q/29525231
tagged with: javascript
tagged with: reactjs
upvote count: 1
favorite count: 0
has body: Based on https://facebook.github.io/react/docs/two-way-binding-helpers.html , I am trying to make a multi-checkbox-status todo that displays, at start, a textarea. I am trying to follow the model, and where it has: var WithLink = React.createClass({ mixins: [React.addons.LinkedStateMixin], getInitialState: function() { return {message: 'Hello!'}; }, render: function() { return ; } }); I have: var Todo = React.createClass( { mixins: [React.addons.LinkedStateMixin], getInitialState: function() { var that = this; return { children: [], description: '', id: 0 }; }, and, in the same class: render: function() { var that = this; return ( {that.state.children} Save ); } When it renders, there's nothing but an h1 and a jQuery bgstretcher on the page. Chrome's Inspect Element doesn't turn up what I expected and had earlier, a TEXTAREA and a BUTTON inside a table. The log doesn't display any either errors or messages. At some point I expect further work so that a description is handed off to a new child and re-initialized, but I'm not there yet. Suggestions for what I should do for it to display?
has comment: http://stackoverflow.com/comment/47238965
has title: Why am I rendering no discernible UI elements in this ReactJS two-way binding with forms?
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/47238521
has comment: http://stackoverflow.com/comment/47240840

http://stackoverflow.com/a/29410880
accepted answer of: http://stackoverflow.com/q/29410761
type: AcceptedAnswer
has body: It's quite easy using CSS3 Media Queries. In your CSS: @media (max-width: 480px) { #ad-id { display: block; } } For bigger devices, hide it: @media (min-width: 480px) { #ad-id { display: none; } } If you are really concerned about data being downloaded, then you must detect the browser size on page load, if it's less than particular width then fire an ajax call and fetch the ad data and display it inside the placeholder container. $(function() { if($(window).width() &lt; 480) { $("#ad-id").load("adcontent.html"); // else use $.ajax for this purpose } });
downvote count: 0
has comment: http://stackoverflow.com/comment/46995706
has comment: http://stackoverflow.com/comment/46995866
type: Answer
answers question: http://stackoverflow.com/q/29410761
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46995566

http://stackoverflow.com/comment/47144686
has text: @KJPrice I tried both Chrome and FF, no luck
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29492453

http://stackoverflow.com/comment/46989053
comment on: http://stackoverflow.com/a/29406561
type: Comment
score: 0
type: AnswerComment
has text: Hello Goce, thanks for the suggestion. Though, even if it cleans my code, this doesn't help me out sorting my main problem.

http://stackoverflow.com/a/29513247
upvote count: 1
answers question: http://stackoverflow.com/q/29512686
downvote count: 0
score: 1
has body: I have faced similar issues in past. Try disabling the javascript minifier and see if that solves your issue. It fixed my issue. Thanks, Gaurav
type: Answer

http://stackoverflow.com/comment/47025435
has text: onClick / onclick both should work. You have improper code. Implement as suggested by @Hanzallah Afgan
score: 1
comment on: http://stackoverflow.com/q/29427301
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47170253
type: QuestionComment
has text: Which server side script do you use ? If php we can check it in server end.
score: 1
comment on: http://stackoverflow.com/q/29506563
type: Comment

http://stackoverflow.com/q/29392330
has comment: http://stackoverflow.com/comment/46961703
tagged with: timeout
has comment: http://stackoverflow.com/comment/46961713
type: Question
has comment: http://stackoverflow.com/comment/46961664
tagged with: javascript
score: 0
answer count: 1
tagged with: salesforce
type: UnansweredQuestion
has body: i want to close pop up and refresh parent but after few seconds delay to make sure all data is received. currently i have the following function closeAndRefresh(){ setTimeout(function() { window.open('/{!currSubId}','_top'); window.location = window.location.href; return true; },5000)} This code refreshes the parent but inside the popup, so the pop up does not close, rather the parent shows refreshed - in pop up
has answer: http://stackoverflow.com/a/29392512
has title: Close pop up and refresh parent page javascript

http://stackoverflow.com/comment/47190091
score: 0
type: QuestionComment
has text: Give smitrovic a "correct answer" tick and an upvote.
type: Comment
comment on: http://stackoverflow.com/q/29517073

http://stackoverflow.com/a/29520572
has body: Your code has errors in it. Not sure if this is a typo. Here it is again fixed up: My First Heading My first paragraph. If you would like to run the alert() on load, you could modify the script you linked to in the jsFiddle like so: window.onload = function(){ alert( 'OS: ' + jscd.os +' '+ jscd.osVersion + '\n'+ 'Browser: ' + jscd.browser +' '+ jscd.browserVersion + '\n' + 'Mobile: ' + jscd.mobile + '\n' + 'Flash: ' + jscd.flashVersion + '\n' + 'Cookies: ' + jscd.cookies + '\n' + 'Screen Size: ' + jscd.screen ); }; After recent comments, may I suggest you try this code: My Page My First Heading My first paragraph. I basically changed the src of the script tag to point to the absolute URL, just to be sure you're looking in the correct place. However, I noticed the page link you gave of your example, does indeed appear to work, so perhaps your issue lies with the browser you are using? I have tested this in Firefox and the alert pops up as expected. I did notice though, that the window.onload modification I suggested has not been made in your script, contrary to what you said. This script appears to be doing a lot of 'sniffing' which is generally considered bad practice these days, as it can be riddled with issues (perhaps what you're seeing here). If you're trying to account for different features, may I suggest you use something like Modernizr? It's a much better approach at dealing with inconsistent browsers; re JS and CSS capabilities than sniffing versions yourself. Hope this helps.
type: Answer
has comment: http://stackoverflow.com/comment/47197188
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29520522
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29520522
downvote count: 0
has comment: http://stackoverflow.com/comment/47208760

http://stackoverflow.com/comment/47007443
type: QuestionComment
has text: It is possible to draw a line with CSS though - using stroke-dasharray and stroke-dashoffset on an svg.
comment on: http://stackoverflow.com/q/29417567
score: 0
type: Comment

http://stackoverflow.com/comment/47166492
has text: Updated the jsfiddle I don't mean use jquery or link to a library those were the only script codes i could find would execute what I wanted. I'd like to only use script in the html since weebly makes it difficult to link to other code files @Shikkediel
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29484520
score: 0

http://stackoverflow.com/q/29498697
accepted answer: http://stackoverflow.com/a/29498987
possible better answer: http://stackoverflow.com/a/29498812
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/47156549
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/47156140
answer count: 2
has body: I have this array that is returned by ajax: console.log(res); ["07Apr|1", "06Apr|3", "05Apr|12", "04Apr|11", "03Apr|0", "02Apr|0", "01Apr|6", "31Mar|0", "30Mar|7", "29Mar|16", "28Mar|5", "27Mar|5", "26Mar|12", "25Mar|9", "24Mar|4", "23Mar|10", "22Mar|16", "21Mar|2", "20Mar|19", "19Mar|22", "18Mar|10", "17Mar|11", "16Mar|10", "15Mar|19", "14Mar|0", "13Mar|4", "12Mar|14", "11Mar|5", "10Mar|26", "09Mar|7", "08Mar|5"] I convert this array using JSON.stringify: (The variable "res" is the response of my ajax -as shown above) var obj = []; var daysBack = 30; var objItem = {}; for(var x = 0; x &lt;= daysBack; x++){ var currObj = res[x]; var objCombo = currObj.split("|"); var objItem = "{date: '"+objCombo[0]+"', downloads: '"+objCombo[1]+"'}"; objItem = JSON.stringify(eval("(" + objItem + ")")); obj.push(objItem); } When I dump the "obj" to the console I get: console.log(obj); ["{"date":"07Apr","downloads":"1"}", "{"date":"06Apr","downloads":"3"}", "{"date":"05Apr","downloads":"12"}", "{"date":"04Apr","downloads":"11"}", "{"date":"03Apr","downloads":"0"}", "{"date":"02Apr","downloads":"0"}", "{"date":"01Apr","downloads":"6"}", "{"date":"31Mar","downloads":"0"}", "{"date":"30Mar","downloads":"7"}", "{"date":"29Mar","downloads":"16"}", "{"date":"28Mar","downloads":"5"}", "{"date":"27Mar","downloads":"5"}", "{"date":"26Mar","downloads":"12"}", "{"date":"25Mar","downloads":"9"}", "{"date":"24Mar","downloads":"4"}", "{"date":"23Mar","downloads":"10"}", "{"date":"22Mar","downloads":"16"}", "{"date":"21Mar","downloads":"2"}", "{"date":"20Mar","downloads":"19"}", "{"date":"19Mar","downloads":"22"}", "{"date":"18Mar","downloads":"10"}", "{"date":"17Mar","downloads":"11"}", "{"date":"16Mar","downloads":"10"}", "{"date":"15Mar","downloads":"19"}", "{"date":"14Mar","downloads":"0"}", "{"date":"13Mar","downloads":"4"}", "{"date":"12Mar","downloads":"14"}", "{"date":"11Mar","downloads":"5"}", "{"date":"10Mar","downloads":"26"}", "{"date":"09Mar","downloads":"7"}", "{"date":"08Mar","downlo…
has answer: http://stackoverflow.com/a/29498987
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29498812
has comment: http://stackoverflow.com/comment/47156252
has title: Ajax response conversion

http://stackoverflow.com/a/29377956
type: Answer
score: -1
downvote count: 1
answers question: http://stackoverflow.com/q/29377519
has body: Its value may point to the module instantiation. Have you try this? module.exports = {...};
upvote count: 0

http://stackoverflow.com/comment/46997045
has text: Thanks Mike, Thats a nice tutorial, but I'm stuck with an error 'Failed to instantiate module btford.socket-io' I installed the angular-socket-io using bower 'bower install angular-socket-io'. Did you get any error like this ?
comment on: http://stackoverflow.com/a/29407139
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47065479
type: QuestionComment
comment on: http://stackoverflow.com/q/29449711
has text: use `videoControls.setAttribute('style', 'display:none;');`
score: 0
type: Comment

ng-init
type: Tag
tag name: ng-init
tags question: http://stackoverflow.com/q/29413617

http://stackoverflow.com/comment/81648173
score: 0
type: AnswerComment
has text: Side note side note: https://docs.angularjs.org/misc/faq "[..] don't create a service whose only purpose in life is to store and return bits of data"
type: Comment
comment on: http://stackoverflow.com/a/29397049

http://stackoverflow.com/comment/47111504
score: 0
has text: @Avinash Well e, is the the entire result of the string, so it goes through all values in e to find which values start with file. Daniel, how'd i go about mapping it?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29475187

http://stackoverflow.com/q/29397800
tagged with: url
has answer: http://stackoverflow.com/a/45554140
possible better answer: http://stackoverflow.com/a/31297672
favorite count: 0
score: 38
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29398054
type: AnsweredQuestion
has title: how can I get the current url using protractor?
type: Question
tagged with: testing
tagged with: protractor
has answer: http://stackoverflow.com/a/29398054
downvote count: 0
tagged with: javascript
has body: I am testing a website using protractor, and jasmine. I would like to know the current url in order to verify a test. I have tried function waitForUrlToChangeTo(urlRegex) { var currentUrl; return browser.getCurrentUrl().then(function storeCurrentUrl(url) { currentUrl = url; } ).then(function waitForUrlToChangeTo() { return browser.wait(function waitForUrlToChangeTo() { return browser.getCurrentUrl().then(function compareCurrentUrl(url) { return urlRegex.test(url); }); }); } ); } and I am using this function in this way it('should log', function() { //element(by.model('user.username')).sendKeys('asd'); //element(by.model('user.password')).sendKeys('asd'); element(by.linkText('Acceder')).click(); waitForUrlToChangeTo("http://localhost:9000/#/solicitudes"); });
linked to: http://stackoverflow.com/q/34358542
has answer: http://stackoverflow.com/a/31297672
answer count: 3
upvote count: 38

http://stackoverflow.com/q/29373931
accepted answer: http://stackoverflow.com/a/29374065
score: 0
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/22147813
type: AnsweredQuestion
tagged with: meteor
has answer: http://stackoverflow.com/a/29374065
has title: Using Meteor methods to pass user array
type: Question
has body: I have this Meteor method on my server: returnUsers: function(){ console.log(Meteor.users.find()); } And the following call on my client: 'click #share_button': function(ev){ ev.preventDefault(); Meteor.call('returnUsers'); } But it returns an empty array: LocalCollection.Cursor {collection: LocalCollection, sorter: null, _selectorId: undefined, matcher: Minimongo.Matcher, skip: undefined…} How do I return an array of all users?

http://stackoverflow.com/a/29425996
type: Answer
has body: This worked for me: function setupMainContent(){ $("#programming").delay(1000).fadeIn(1000, function(){ $(window).scroll(function(){ var current = $(window).scrollTop(); var bottom = $(document).height() - $(window).height(); var scale = 100*(current/bottom) + "%"; document.body.style.backgroundPosition = "center " + scale; }); */ }); }
answers question: http://stackoverflow.com/q/29424710
score: 0

http://stackoverflow.com/comment/47110199
has text: I know how to open the file dialog by programmatic triggering the click event. My problem here is this way doesn't work once the page is loaded. I'm trying something like $(document).ready(function(){ // trigger the click event on file input.}); but it doesn't work.
comment on: http://stackoverflow.com/a/29473956
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47162768
type: QuestionComment
comment on: http://stackoverflow.com/q/29499889
score: 1
has text: try binding your click events to the document instead of class or id, If you haven't done so already. e.g ($(document).on("click", ".class or #id", function() { });)
type: Comment

http://stackoverflow.com/comment/47061961
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29447721
has text: wow you are grate thanks sir.....

http://stackoverflow.com/comment/47197108
type: QuestionComment
comment on: http://stackoverflow.com/q/29377113
score: 0
has text: I solved it myself. The problem was in my callback. I returned image.onload = function () , so basically just a function was returned and not the img file
type: Comment

http://stackoverflow.com/comment/46970328
comment on: http://stackoverflow.com/a/29382453
has text: @user3574939 You will ideally want to use a combination of both. There is nothing wrong with setting the size constraints with CSS. If you append your image URL with WURFL Image Tailor they have the option to dynamically serve a resized image that is no larger than what the client device can display. https://github.com/WURFL/angular-wurfl-image-tailor
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46950404
has text: You mean ApplesListItemView should be AppleListItemView? That's how it is in the original code, I corrected it in the question.
type: Comment
comment on: http://stackoverflow.com/q/29385612
score: 0
type: QuestionComment

http://stackoverflow.com/q/29525784
score: 0
has answer: http://stackoverflow.com/a/29526061
answer count: 1
tagged with: angularjs
has title: Partially applied functions with AngularJS Directives don't work
type: UnansweredQuestion
tagged with: angularjs-directive
has body: I'm building an inline editor for various aspects of a document (think title, contents, tags, etc.); however, I'm running into some problems. Here's (somewhat) what my directive link function looks like: var directive = { restrict: 'A', templateUrl: '/path/to/partial', transclude: true, scope: { save: '&amp;', text: '=' }, link: link }; return directive; function link(scope, element, attrs) { scope.active = false; scope.edit = function() { scope.active = true; }; scope.done = function() { scope.active = false; } scope.doneEditing = function() { scope.save(scope.text); scope.done(); } } I'm passing a save callback that notifies the parent what to save and where. Now, instead of passing another prop that describes the property (like "title", "content", etc.), I decided to build a function that returns a function (or partial application/factory pattern) like so: scope.documentSave = function(key) { var update = {}; return function(value) { update[key] = value; DocumentService .update(scope.document.id, update) .then(function() {}) ; } } And here's my declaration: &lt;h1 inline-editor text="document.name" save="documentSave('name')"&gt;{{ document.name }}&lt;/h1&gt; What's weird that actually worked was changing the invokation of scope.save to scope.save()(scope.text), which is, pretty damn stupid. I also tried triggering the factory within the controller rather than view like so: $scope.documentSaveName = documentSave('name'); Again, wtf. Running it with scope.save()(scope.text) made it worked but regular scope.save(scope.text) did not (which it should). Again, wtf. I console.logged out scope.save and got this: function(locals) { return parentGet(scope, locals); } I've never encountered this behavior before and I've worked plenty with directives and callbacks. Any suggestions?
tagged with: angularjs-scope
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46990291
type: QuestionComment
comment on: http://stackoverflow.com/q/29407641
has text: I changed the path to a relative one and now XHR are going through. It's still not validating however.
score: 0
type: Comment

http://stackoverflow.com/comment/47282141
score: 0
has text: Thanks for the issue link.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29527389

http://stackoverflow.com/a/29395293
has comment: http://stackoverflow.com/comment/46968780
has comment: http://stackoverflow.com/comment/46967661
score: 1
answers question: http://stackoverflow.com/q/29395140
has comment: http://stackoverflow.com/comment/46967764
upvote count: 1
has comment: http://stackoverflow.com/comment/46968173
has comment: http://stackoverflow.com/comment/46967632
has comment: http://stackoverflow.com/comment/46967829
has comment: http://stackoverflow.com/comment/46968102
has comment: http://stackoverflow.com/comment/46967425
has comment: http://stackoverflow.com/comment/46967207
downvote count: 0
has comment: http://stackoverflow.com/comment/46967750
has body: If you want the counter to increase by 2, use countero += 2 instead of countero++. var counterq = 0; var limitq = 3; var countero = 0; var limito = 5; function AddContent(divName) { if (counterq == limitq) { alert("You have reached the limit of adding " + counterq + " inputs"); } else { var newdiv = new Array() newdiv[counterq] = document.createElement('div'); newdiv[counterq].className = 'new-rect'; if (counterq == limito) { alert("You have reached the limit of adding " + countero + " options"); } else { newdiv[counterq].innerHTML = "Entry " + (countero + 1) + " &lt;br&gt;&lt;input type='text' name='myInputs[" + countero + "]'&gt;&lt;br&gt;Entry " + (countero + 2) + " &lt;br&gt;&lt;input type='text' name='myInputs[" + countero + "]'&gt;&lt;br&gt;"; document.getElementById(divName).appendChild(newdiv[counterq]); countero += 2; } counterq++; } } .new-rect { width: 300px; height: 100px; border: 1px solid black; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="Content"&gt;&lt;/div&gt; &lt;input type="button" class="AddContent" value="Add content" onclick="AddContent('Content');"&gt;
type: Answer

http://stackoverflow.com/q/29402775
has title: Check if an arbitrary controller/action exist
upvote count: 3
has answer: http://stackoverflow.com/a/33650083
type: Question
has body: Is there are any way to check if an arbitrary combination of controller/action exists? (Not the current one.) Something like Yii::$app-&gt;exist(controller/action); Should it be possible check the route or something so? What I need is to check if a parameter passed as &lt;?php echo Yii::$app-&gt;request-&gt;baseUrl.'/controller/action' ?&gt; to a JavaScript generic function exists before its execution via Ajax.
has answer: http://stackoverflow.com/a/29406603
tagged with: yii2
tagged with: javascript
has answer: http://stackoverflow.com/a/41850716
answer count: 3
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: php
score: 3

http://stackoverflow.com/q/29383464
tagged with: meteor
tagged with: node.js
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
has body: I have added new field in user collection but when I access it in the client side Meteor.user().cart ( cart is my new field). Its undefined. How can expose new field (cart) so that it can be access in the client?
has title: MeteorJS: Users collection how to expose new field
upvote count: 2
accepted answer: http://stackoverflow.com/a/29383500
answer count: 1
tagged with: javascript
tagged with: meteorite
favorite count: 0
has answer: http://stackoverflow.com/a/29383500

http://stackoverflow.com/q/29405885
type: Question
has comment: http://stackoverflow.com/comment/46986629
has comment: http://stackoverflow.com/comment/47018916
has title: Cannot make crypto.js compare hashed input against an array of hashes
has body: I'm trying to make a coupon verifying form, that uses encryption in order to hide the coupons from the user. &lt;input name="coupon-code" id="coupon-code" type="text" value="fedora"&gt; This is the validating function: //validated dynamically $("#coupon-code").on('keyup', function () { //stringified hash coupons = ["3DA8FF923121DE176A1AB9FA3609A2AEAC25623628C8EB9E2C3D0D7364131648DE8E3F86259720EDC2C761F440AEB45225945765E05D21532B413834316EDBDB" ]; //after hashing the value of the input, convert it to a string hash = CryptoJS.SHA512($(this).val()).toString(CryptoJS.enc.base64); //loop and compare for (i = 0; i &lt; coupons.length; i++) { if (hash == i) { $('#coupon-code').css("background-color", "green"); } else { $('#coupon-code').css("background-color", "red"); } } }); I've kept the "true" coupons instead of the hashes in the array for demo purposes. The first problem is I cannot get crypto to compare the input to an element in the array: CryptoJS.SHA512($("#coupon-code").val()) == CryptoJS.SHA512("fedora"); false Another concern is that the user can see the encryption algorithm (SHA 512 in this case) and could reverse-hash the coupon in the array. Crypto.js hasn't asked/provided me a key, so I'd imagine it would be easy.
score: 0
has comment: http://stackoverflow.com/comment/46986563
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46989293
has comment: http://stackoverflow.com/comment/46987593
tagged with: hash

http://stackoverflow.com/a/29498192
score: 0
type: Answer
has body: I am not complete sure, that what you are asking for, is the right thing you are showing us... setInterval basically is pure native javascript and in my opinion not worth using! If you wan't to set your timeouts via jquery try this link: http://jchavannes.com/jquery-timer. You can find usages there... Now on to your problem... you need a state to check wether the slider has to slide or not... simply set a bool like this... var timer; var doSlide = false; var i = 0; function Slide(){ timer = setTimeout(function(){ if(doSlide == true){ Slide(); i++; // Same as i = i + 1 console.log('Sliding'); if(i == 3) AbortSlide(); /* Abort on third slide! Dont use this in your logic!*/ } else if(doSlide == false){ console.log('Sliding aborted untill next RunSlide() call!') clearTimeout(timer); } },1000); } function AbortSlide(){ doSlide = false; i = 0; // Resetting the count! Dont use this in your logic! } function RunSlide(){ doSlide = true; Slide(); } RunSlide(); You could also empty the interval in the abort method: function AbortSlide(){ doSlide = false; clearTimeout(timer); i = 0; // Resetting the count! Dont use this in your logic! } Here is a working fiddle i made for you to understand what timers and intervals are for: https://jsfiddle.net/q5qzmv68/7/ Hope this helps! Cheers!
answers question: http://stackoverflow.com/q/29497601

http://stackoverflow.com/a/29458767
answers question: http://stackoverflow.com/q/29458602
has comment: http://stackoverflow.com/comment/47082067
has comment: http://stackoverflow.com/comment/47081838
type: Answer
has body: function loadpage(url,f) { $.ajax({ url: '/ajax'+url, dataType: 'json' }).done(function(res){ $('.dynamicArtile').html(res.content); if(typeof f === 'undefined') window.history.pushState({path:url},'',url); }); } $(function(){ $('a').click(function(e) { // only links that point to your site var url = $(this).attr('href'); loadpage(url); return false; }); $(window).bind('popstate',function(){ loadpage(location.pathname + location.search,1); }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; i think you don't use stateObj variable sorry for my terrible English.
score: 0

http://stackoverflow.com/q/29473830
has comment: http://stackoverflow.com/comment/47109055
answer count: 1
score: 22
downvote count: 2
has comment: http://stackoverflow.com/comment/47108875
upvote count: 24
accepted answer: http://stackoverflow.com/a/29474000
tagged with: javascript
has title: Image in tooltip using bootstrap?
type: AnsweredQuestion
has body: Tooltip on right This works fine but I'd like to include an image and some text inside the tooltip. I tried to use data-content="some stuff" but it shows nothing.
tagged with: jquery
favorite count: 0
tagged with: frontend
type: Question
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/47108951
has answer: http://stackoverflow.com/a/29474000

http://stackoverflow.com/a/29450750
downvote count: 0
answers question: http://stackoverflow.com/q/29449626
type: Answer
upvote count: 2
has body: Matlab comes with a build-in function inpolygon which seems to do exactly what you are asking for. No need to reimplement it.
score: 2
has comment: http://stackoverflow.com/comment/47081990

http://stackoverflow.com/comment/47081623
has text: are you calling this code from `https://sendgrid.com`? if not, nothing much you can do directly from javascript. server have to send to actual domain you gonna use or *.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29458742
score: 0

http://stackoverflow.com/comment/47182245
has text: yes, you could do filtering from controller, only you need to call controller function using `ng-init` & that method will do filtering using `$filter`
type: Comment
comment on: http://stackoverflow.com/a/29513138
score: 0
type: AnswerComment

http://stackoverflow.com/q/29481448
tagged with: javascript
type: UnansweredQuestion
tagged with: validation
answer count: 0
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has body: I'm working in javascript/jQuery forms filling and validation. However I have a following scenario that I want using for-loops. I've 3 fields in one container, and I have total 4 containers, The first box is must, scha that the first item input text "A" should be validated. And second is radio button, having their respective input fields, so the check is must that which radio button is pressed and made that field validated and the other is not. Let the radio button is Option B and their respective input text boxes are C and D. Now The rest of there have the same case when there activator check box is checked otherwise no validation. Let my checkBoxes are X. So my code is: My Code is 70% working, don't know why. Also, I want to check it back, that if the checkboxes aren't clicked(such that unchecked after clicked) it removes all the validations for the upcoming containers. I've my custom javascript function of validating check boxes names checkRadioand makeRequire/makeUnrequire that accepts an array of input and make all of them as said. How can I implement the optimal solution for such scenario. for (var i = 1; i &lt;=3; i++) { if (checkRadio("X-"+i)) { for (var j = 2; j &lt;=4; j++) { for (var k = 1; k &lt;=3; k++) { if (checkRadio("B"+j+"-1")) { makeRequired(["C-"+k]); makeUnRequired(["D-"+k]); } else if (checkRadio("B"+j+"-2")) { makeUnRequired(["C-"+k]); makeRequired(["D-"+k]); } }; }; } My Id's conventions are, A-1, A-2, A-3 and A-4 for first text field. B1-1 and B1-2 for respective text fields C-1 and D-1 for first container.
type: Question
tagged with: http://stackoverflow.com/tag/html
upvote count: 1
has title: Jquery dynamic validations html

size
type: Tag
tags question: http://stackoverflow.com/q/29374533
tag name: size

http://stackoverflow.com/comment/47066939
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29450502
has text: chrome API and iOS API for microphone are not the same, you should try this in real/emulated device http://docs.phonegap.com/en/edge/cordova_media_capture_capture.md.html#CaptureAudioOptions
score: 0

http://stackoverflow.com/comment/46941098
type: Comment
score: 0
has text: I'd say yes. I tried a few similar things but I keep getting undefined for _.pluck(arr, 'stuff'). 'stuff' is very clearly a number value smdh! and arr is an object.
comment on: http://stackoverflow.com/a/29380597
type: AnswerComment

pdftk
tags question: http://stackoverflow.com/q/29483662
tag name: pdftk
type: Tag

http://stackoverflow.com/comment/47090283
score: 0
has text: Could you setup fiddle, and/or provide css and the rest of html?
comment on: http://stackoverflow.com/q/29463400
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46947078
comment on: http://stackoverflow.com/q/29384065
type: Comment
has text: since you are looping, how about the `checked: (index == 1)` in f.radio_button
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46989788
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29407699
has text: have a look here. It seems to do what you want http://sebpearce.com/kazu/
score: 0

http://stackoverflow.com/comment/64582067
type: Comment
has text: Actually, "sPaginationType" is legacy DataTables syntax (v 1.9 and under). And "full_numbers" is the default, which is what the OP states is currently occurring. The OP wants a customization of `full_numbers` which is not available with the standard options.
comment on: http://stackoverflow.com/a/30675198
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47145883
has text: You need a loop to run trough the array and compare values. http://stackoverflow.com/questions/2824145/sorting-a-multidimensional-array-in-javascript
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29493455
type: Comment

http://stackoverflow.com/comment/47138572
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29469209
type: QuestionComment
has text: the style of the tooltip is from the bootstrap css file if you want to change the style you have two options change the bootstrap css file or create your own and overide the default bootstrap file

http://stackoverflow.com/comment/46943117
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29381734
score: 0
has text: as in `self.myAsyncValue = new ReactiveVar([]);` ?

http://stackoverflow.com/comment/46996996
has text: Have you tried inserting `debugger;` statement in the code instead of setting breakpoints?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29407601

http://stackoverflow.com/comment/47008130
has text: Executed with chromium-browser.exe --disable-web-security but still same error is happening
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29416639
score: 0

http://stackoverflow.com/a/29408249
has body: Using a Session variable. HTML {{> main}} {{text}} {{> button}} Hello JS Template.main.onCreated(function(){ Session.set("text", "Default"); }); Template.main.helpers({ text: function(){ return Session.get("text"); } }); Template.button.events({ "click button": function(event, template){ var buttonText = template.$("button").text(); Session.set("text", buttonText); } }); Using a ReactiveVar to avoid globals and provide better component encapsulation. HTML is the same. JS Template.main.onCreated(function(){ this.text = new ReactiveVar("Default"); }); Template.main.helpers({ text: function(){ return Template.instance().text.get(); } }); Template.button.events({ "click button": function(event, template){ var buttonText = template.$("button").text(); // search for a field named text in the closest parent template (main) template.get("text").set(buttonText); } }); We need to add 2 packages for this code to work : meteor add reactive-var meteor add aldeed:template-extension
has comment: http://stackoverflow.com/comment/47004060
score: 0
answers question: http://stackoverflow.com/q/29408111
type: Answer
has comment: http://stackoverflow.com/comment/46992309
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/47088602
comment on: http://stackoverflow.com/q/29456629
type: Comment
type: QuestionComment
has text: You can't change number of slides dynamically. But you can alter content of any slide dynamically.
score: 1

http://stackoverflow.com/q/29380018
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29380089
type: Question
has title: Array created by .push in a loop is the correct length but only pushing the last element on repeat
tagged with: push
tagged with: arrays
downvote count: 0
tagged with: javascript
score: 4
accepted answer: http://stackoverflow.com/a/29380089
upvote count: 4
answer count: 1
has body: I am referencing a global variable and parsing through it to push items onto a stack and then I return that stack to be used elsewhere. The returned array is the correct length but it repeats items of the last element. var global = { "param11": { "param21": { "param31": { "param4": "1", "param5": "2", "param6": "3", }, "param32": { "param4": "4", "param5": "5", "param6": "6", } }, "param22": { "param33": { "param4": "7", "param5": "8", "param6": "9", } } }, "param12": { "param23": { "param34": { "param4": "10", "param5": "11", "param6": "12", }, "param35": { "param4": "13", "param5": "14", "param6": "15", } } } }; function getStack() { var obj = {}; var stack=[]; var json = JSON.parse(global); for(var param1 in json){ for(var param2 in json[param1]){ for(var param3 in json[param1][param2]){ obj.item1 = json[param1][param2][param3][param4]; obj.item2 = json[param1][param2][param3][param5]; obj.item3 = json[param1][param2][param3][param6]; stack.push(obj); } } } return stack; } Returned value: [ {"param4":"13", "param5":"14", "param6":"15"}, {"param4":"13", "param5":"14", "param6":"15"}, {"param4":"13", "param5":"14", "param6":"15"}, {"param4":"13", "param5":"14", "param6":"15"}, {"param4":"13", "param5":"14", "param6":"15"} ]
favorite count: 0

http://stackoverflow.com/comment/47069472
type: Comment
comment on: http://stackoverflow.com/a/29451764
score: 0
type: AnswerComment
has text: it says "ui.helper is undefined", but i think i got the idea. Rooster's answer worked for me. thanks to both of you

http://stackoverflow.com/a/29408331
upvote count: 3
type: Answer
accepted answer of: http://stackoverflow.com/q/29408296
answers question: http://stackoverflow.com/q/29408296
score: 3
downvote count: 0
has body: you should enclose the value of the attribute in double quotes var a = $('.hello[rel="'+num+'"]'); Example: http://codepen.io/anon/pen/RNOQrw As a side note for a matter of markup validation I would suggest to use a data-* attribute instead, since rel is an attribute for link elements
type: AcceptedAnswer

http://stackoverflow.com/comment/47117126
comment on: http://stackoverflow.com/a/29469883
type: AnswerComment
has text: Ah, mystery solved it seems. Seems I have to dig deeper into the driver docs. Thanks.
score: 0
type: Comment

http://stackoverflow.com/comment/46964320
type: QuestionComment
has text: Is http://stackoverflow.com/questions/1950038/jquery-fire-event-if-css-class-changed what you are looking for?
score: 1
comment on: http://stackoverflow.com/q/29393723
type: Comment

http://stackoverflow.com/q/29455146
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47075258
score: 0
tagged with: jscrollpane
has body: I'm using jscroll on a results page and everything works great except one thing. If the results have fewer results than the first page can contain, the loading gets stuck on the page. Meaning, if there is no next href, the loading just stays there. However, on searches that have more results than 1 page - the loading disappears when it gets to the end. I did some research and it seems to have something to do with the distroy but couldn't seem to figure it out. I should also add that the following message appears in the console: Failed to load resource: the server responded with a status of 500 (Internal Server Error) and the URL is: http://localhost:8000/PAGENAME/undefined My code for the Jscroll is: function inifniteScroll(){ $(document).ready(function(){ $('.results').jscroll({ loadingHtml: ' Loading... ' }); }); }
answer count: 1
type: UnansweredQuestion
tagged with: infinite-scroll
has answer: http://stackoverflow.com/a/29455312
tagged with: scroll
has title: Jscroll "loading" is stuck when there is no second page
type: Question

http://stackoverflow.com/a/29423192
score: 3
has body: In light of the output, it is the value supplied to the next method that is used over the value returned by the expression to the right of yield. The value supplied to the next method is not "used over" the value to the right of yield. The value supplied to next is what the yield expression ultimately evaluates to. Always. The value to the right of the yield is what is supplied to the consumer of the generator. It is a two-way communication between the generator and the code consuming the generator. function* go() { console.log(yield 'a'); // 'one' console.log(yield 'b'); // 'two' } var g = go(); console.log(g.next()); // { value: 'a', done: false } console.log(g.next('one')); // { value: 'b', done: false } console.log(g.next('two')); // { value: undefined, done: true }
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/53904910
accepted answer of: http://stackoverflow.com/q/29422838
upvote count: 3
answers question: http://stackoverflow.com/q/29422838
type: Answer
downvote count: 0

http://stackoverflow.com/q/29522623
type: Question
score: 3
has body: Here is my code : Ext.onReady(function() { Ext.create('Ext.panel.Panel', { title: 'Results', width: 600, height: 400, renderTo: Ext.getBody(), items: [{ xtype: 'container', layout: 'form', style: 'width : 200px;margin-top: 10px ', items: [{ xtype: 'textfield', fieldLabel: 'Name', id: 'name', style: 'width : 100px;' }] }, { xtype: 'container', layout: 'form', style: 'width : 200px;margin-top: 10px ', items: [{ xtype: 'datefield', fieldLabel: 'Date', id: 'date' }] }, { xtype: 'container', layout: 'form', style: 'width : 200px;margin-top: 10px ', items: [{ xtype: 'textfield', vtype: 'email', fieldLabel: 'EmailId', id: 'email' }] }, { xtype: 'container', layout: 'form', style: 'margin-top: 10px ', items: [{ xtype: 'button', text: 'signup', float: 'right', handler: function() { Ext.Ajax.request({ method: 'GET', url: 'rest/helloworld/', disableCaching: false, success: function() { Ext.Msg.alert('', 'success'); Window.Location.assign('abc.js'); }, failure: function() { Ext.Msg.alert('', 'failed'); }, params: { name: Ext.getCmp('name').getValue(), email: Ext.getCmp('email').getValue(), date: Ext.getCmp('date').getValue() } }); } }] } ] }); }); Every thing is going great : What I exactly need is to load another ExtJS page after success alert. I tried Window.Location.assign('abc.js') but it is not working. New to Extjs. Please help
linked to: http://stackoverflow.com/q/5383301
has title: Extjs : Redirecting to other page
tagged with: javascript
has comment: http://stackoverflow.com/comment/47234451
answer count: 3
has answer: http://stackoverflow.com/a/29525803
downvote count: 0
favorite count: 0
tagged with: extjs
has answer: http://stackoverflow.com/a/29525607
tagged with: extjs4
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47205692
has answer: http://stackoverflow.com/a/29543611
upvote count: 3

http://stackoverflow.com/comment/47175594
comment on: http://stackoverflow.com/q/29509652
score: 0
type: QuestionComment
has text: maybe i don't understand well your question... but the result it's 9 because your function is recursive: `power(3,2) --> 3 * power(3,1) --> 3 * 3 * power(3,0) --> 3*3*1`
type: Comment

http://stackoverflow.com/a/34833134
type: Answer
has comment: http://stackoverflow.com/comment/60006578
upvote count: 4
has comment: http://stackoverflow.com/comment/62385199
downvote count: 0
answers question: http://stackoverflow.com/q/29528174
score: 4
has comment: http://stackoverflow.com/comment/57961320
has body: I'll post this here in spite of the OP already having found a solution b/c my ListView wouldn't scroll either and it wasn't b/c I was trying to scroll rather than using the mouse to simulate swiping. I am currently using React-Native v0.1.7. It turned out that the reason my ListView wouldn't scroll &amp; wouldn't reveal the other rows which weren't being initially rendered on screen was that it didn't have a fixed height. Giving it a fixed height solved this issue. Figuring out how to determine what value to use for the height wasn't a simple matter though. In addition to the ListView on the page there was also a header at the top of the page which had a fixed height. I wanted that ListView to take up the remaining height. Here, either my ability to use the React-Native limited implementation of FlexBox failed me or the implementation did. However, I was unable to get the ListView to fill up the remainder of the space and be able to scroll properly. What I did was to require the Dimensions package const Dimensions = require('Dimensions'); and then set a variable for the device window's dimensions const windowDims = Dimensions.get('window'); Once I had that done I was able to determine the height of the remaining space and apply that inline to the style of the ListView: &lt;ListView style={{height: windowDims.height - 125}} ... /&gt; where 125 was the height of the header.

http://stackoverflow.com/q/29459118
has title: Javascript not working in IPhone
has body: I have write code to change color at run time using Javascript. It work well on Desktop and Andriod Mobile Phones but It is not working on IPhone 5 and 6, I have also tested with Safari in Desktop it works fine on Desktop Safari but not works in Iphone Safari. Thanks
tagged with: css
accepted answer: http://stackoverflow.com/a/29459505
tagged with: safari
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29459178
has comment: http://stackoverflow.com/comment/47082250
has answer: http://stackoverflow.com/a/29459505
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29459488
tagged with: javascript
answer count: 3
tagged with: iphone
has comment: http://stackoverflow.com/comment/47082605
downvote count: 0
possible better answer: http://stackoverflow.com/a/29459178
favorite count: 0

http://stackoverflow.com/q/29398179
tagged with: slice
linked to: http://stackoverflow.com/q/3199588
possible better answer: http://stackoverflow.com/a/29398293
accepted answer: http://stackoverflow.com/a/29398211
answer count: 3
tagged with: arrays
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29398211
has title: slice not working as expected on my array
has answer: http://stackoverflow.com/a/29398293
upvote count: 3
has body: I have an array scraped from a webpage: myvar = document.querySelectorAll('#tblItineraryModuleStayDetail &gt; tbody &gt; tr') Which in the console returns an array: What I need to do is subset this array: Start from the 3rd item Then keep every odd number of items So I need a subset of my var with items 3 and 5 in it. I tried: myvar.slice(3,5). This returned error "Undefined is not a function" Had I been successful I would have an array with 3 items. I'd then need to subset on keeping odd items in the array. How do I subset for myvar so that I have a variable with items 3 and 5 left in it? If myvar was length 10. How would I subset it to include items 3, 5, 7, 9?
type: Question
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/69478045

http://stackoverflow.com/comment/47231044
score: 0
type: Comment
has text: Your fiddle was missing the link to jinqJs. I added it and it runs now. http://jsfiddle.net/tford/p0dmjpto/4/
type: AnswerComment
comment on: http://stackoverflow.com/a/29398721

http://stackoverflow.com/q/29497594
has answer: http://stackoverflow.com/a/29497890
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29497724
favorite count: 0
has title: how can I access to JSON elements?
has body: how can I access to this JSON elements by javascript or JQuery and using a loop? {"d":"[{\"aa\":\"11111111111111111111\",\"bb\":\"222222222222222222\"},{\"aa\":\"33333333333333333333\",\"bb\":\"444444444444444444\"}]"}
possible better answer: http://stackoverflow.com/a/29497712
has answer: http://stackoverflow.com/a/29497712
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
downvote count: 3
type: Question
has answer: http://stackoverflow.com/a/29497724
has comment: http://stackoverflow.com/comment/47154517
tagged with: javascript
score: -3
answer count: 3
upvote count: 0

http://stackoverflow.com/q/29501508
has comment: http://stackoverflow.com/comment/47161371
has body: I'm getting the error in title on this part: $('select').coreUISelect('destroy') .coreUISelect({ appendToBody:true, jScrollPane: { verticalDragMinHeight:20, verticalDragMaxHeight:20, showArrows:true } }); Oddly, this is not happening everytime and I didn't see this in Chrome. It happens in IE11 and I have to do a few refreshes to see this happen. Any ideas? Edit: Core UI Select is a plugin for styling selects, http://www.jqueryscript.net/form/Select-Element-Styling-Plugin-coreUISelect.html
type: Question
has comment: http://stackoverflow.com/comment/47171650
tagged with: internet-explorer
tagged with: jquery-ui
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47171379
tagged with: jquery
has comment: http://stackoverflow.com/comment/47170283
has comment: http://stackoverflow.com/comment/47171681
has title: Object doesn't support property or method 'coreUISelect'
has comment: http://stackoverflow.com/comment/47171917
has comment: http://stackoverflow.com/comment/47170341
has comment: http://stackoverflow.com/comment/47161668
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/29421752
has comment: http://stackoverflow.com/comment/47015295
has body: I've ended up with ugly solution, but it works. There should be more elegant way. Here is the link: http://jsfiddle.net/Lypmnspz/10/ HTML When I update it here I want to see the update here Javascript function pageModel(){ var self = this // Create an observalbe array of options self.languages = ko.observableArray([ko.observable("English"),ko.observable("English"),ko.observable("English")]); // Languages self.availableLanguages = ko.observableArray(["English", "Spanish", "German", "Russian"]); self.updateOtherLanguage = function(lang, event){ // console.log(event.target.id.split('-')[1],event.target.value) self.languages()[Number(event.target.id.split('-')[1])]((event.target.value)) } } ko.applyBindings(new pageModel());
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29421300
has comment: http://stackoverflow.com/comment/47016009

http://stackoverflow.com/comment/47101487
score: 0
has text: Why don't you add `alert( typeof(x) )` as the first line in the success function, I'll bet you get `String`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29469683

http://stackoverflow.com/q/29504537
has comment: http://stackoverflow.com/comment/47166565
answer count: 1
downvote count: 0
has title: Javascript Image Link
favorite count: 0
has answer: http://stackoverflow.com/a/29504642
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47166525
score: 2
type: Question
has body: I would like to have an image appear when a button is clicked. I think that I have gotten everything in the code right, but I need help with the image link. I would like to take the image from a website. What is the code that I add to this code to make it do this? &lt;script type = "text/javascript"&gt; function pic1() { document.getElementById("img").src ="; } &lt;img src = "" id = "img"/&gt; &lt;input type="button" value="Click for image!" onclick="pic1()"/&gt;
has comment: http://stackoverflow.com/comment/47167007
has comment: http://stackoverflow.com/comment/47166660
tagged with: javascript
tagged with: image

http://stackoverflow.com/comment/47162284
type: QuestionComment
has text: what would the code you'd like to write look like?
score: 0
comment on: http://stackoverflow.com/q/29501474
type: Comment

http://stackoverflow.com/q/29512363
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29742138
tagged with: node.js
type: AnsweredQuestion
score: 3
upvote count: 3
has title: Upload and Retrieve Image in Node.js?
type: Question
tagged with: javascript
has body: I'm new to nodejs. I'm trying to upload an image to the server and store that image path in the localhost's PostgresSQL database as like this (myipaddress:3000/uploads/images/12345.png). I Learned to upload an image to the server as specified in this link But I would like to load that image url separately in mobile device or in image tag as follows &lt;img src="myipaddress:3000/uploads/images/12345.png"&gt; Thanks in advance and Can any one please provide suggestions to access an uploaded image with its url in my express application
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/29742138
favorite count: 0
tagged with: postgresql
tagged with: npm

http://stackoverflow.com/comment/47168384
type: Comment
type: QuestionComment
score: 0
has text: Yes. It appears correctly as above too.
comment on: http://stackoverflow.com/q/29505166

http://stackoverflow.com/comment/46986849
comment on: http://stackoverflow.com/q/29406003
type: Comment
type: QuestionComment
has text: @anpsmn can you give link an example?
score: 0

http://stackoverflow.com/a/29419867
upvote count: 1
answers question: http://stackoverflow.com/q/29419771
score: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/47011707
has body: The form submits so the page refreshes. You need to cancel the form submission. var form = document.getElementById("theForm"), box = document.createElement("div"); document.body.appendChild(box); form.addEventListener("submit", function() { var width = form.elements["width"].value, height = form.elements["height"].value; box.style.width = width + "px"; box.style.height = height + "px"; return false; }); div { background-color: #CFC; } Box Width: Box Height:

http://stackoverflow.com/q/29458094
has comment: http://stackoverflow.com/comment/47080357
type: Question
has comment: http://stackoverflow.com/comment/47080310
tagged with: underscore.js
has answer: http://stackoverflow.com/a/29458207
has comment: http://stackoverflow.com/comment/47080401
answer count: 3
upvote count: 0
tagged with: javascript
favorite count: 0
has title: How to find the unique objects from an array
has answer: http://stackoverflow.com/a/29458122
has answer: http://stackoverflow.com/a/50405280
has body: I have an array object like var array = [ {"name":"Joe", "age":17}, {"name":"Carl", "age": 35}, {"name":"Joe", "age":17}, {"name":"Carl", "age":35}, {"name":"Mark", "age":21}, ] Whats the best way to fetch the unique objects from this array without doing loopings, in this case output need to be [ {"name":"Joe", "age":17}, {"name":"Carl", "age": 35}, {"name":"Mark", "age":21} ]
type: UnansweredQuestion
score: -3
downvote count: 3

http://stackoverflow.com/q/29476579
type: Question
has answer: http://stackoverflow.com/a/29476641
has answer: http://stackoverflow.com/a/29476714
tagged with: javascript
answer count: 3
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/47114112
favorite count: 0
has title: Remove subsequent duplicate elements by class
possible better answer: http://stackoverflow.com/a/29476714
tagged with: each
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47114499
accepted answer: http://stackoverflow.com/a/29476641
score: 1
has body: Via javascript or jquery, I am in need of removing duplicate elements in sets so that one remains. They're all the same, so it doesn't matter which are removed so long as one remains. The page appears as follows: One before every needs to stay, but every subsequent hr column before every dude column needs to go. I tried the following, hoping it would be this simple. Didn't work. $( "div.column-hr" ).each(function( index ) { if ($(this).next('div.column.hr')) { $(this).remove(); } });
has answer: http://stackoverflow.com/a/29476798
upvote count: 1

http://stackoverflow.com/comment/46934065
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29376702
score: 1
has text: about tail recursion: http://stackoverflow.com/questions/33923/what-is-tail-recursion

http://stackoverflow.com/q/29433546
tagged with: rotation
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: drag-and-drop
tagged with: http://stackoverflow.com/tag/html
has body: Hello i need u put in a rotation as well as drag and drop on a single div.. I tried the following code but only when the form loads i am able to drag and drop after which it gets disabled. I am able to rotate at any point but unable to drag and drop... Please Help!! &lt;style&gt; #mainTarget{ width:300px; height:200px; position:relative; top:100px; left:25% } .mainTarget{position:absolute; width:300px; height:200px;} #target{ position:absolute; height:20px; width:20px; background:url(http://files.softicons.com/download/system-icons/human-o2-icons-by-oliver-scholtz/png/128x128/actions/object-rotate-left.png) no-repeat top center #ffffff; background-size:100%; cursor:pointer; z-index:1; top:0; right:0; } #target1{ position:absolute; height:20px; width:20px; background:url(http://files.softicons.com/download/system-icons/human-o2-icons-by-oliver-scholtz/png/128x128/actions/object-rotate-left.png) no-repeat top center #ffffff; background-size:100%; cursor:pointer; z-index:1; bottom:0; left:0; } #mainTarget1{ width:320px; height:200px; position:relative; } .mainTarget1{position:absolute; width:300px; height:200px;} &lt;/style&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset=utf-8 /&gt; &lt;title&gt;JS Bin&lt;/title&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt; &lt;/script&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"&gt; &lt;script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;degrees&lt;/p&gt; &lt;span&gt; rotate&lt;/span&gt; &lt;input type="text" id="style" name="style" /&gt; &lt;div id="mainTarget"&gt; &lt;div &gt; &lt;img src="http://myreaxns.com/wp-content/uploads/2013/03/priyanka-chopra- image.jpg" width="300" class="mainTarget" /&gt; &lt;div id="target"&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt; &lt;div id="mainTarget1"&gt; &lt;img src="http://myreaxns.com/wp-content/uploads/2013/03/priyanka-chop…
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29435227
accepted answer: http://stackoverflow.com/a/29435227
score: 0
has title: Using drag drop and rotation on a div

http://stackoverflow.com/q/29411717
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29411806
has body: I have to show login and register as a slidedown/popup. Following code works for one popup but breaks when i try to add popup for register also. It show both popup Register CLOSE Username Password Login CLOSE Username Password I am looking for following functionality One popup should open at a time and other should close automatically Popup should open & close when one click on the individual links Fiddle example http://fiddle.jshell.net/rvepks5q/1/ I tried for sometime, i am doing something wrong.
accepted answer: http://stackoverflow.com/a/29411846
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29411896
has answer: http://stackoverflow.com/a/29411835
answer count: 5
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29412607
has answer: http://stackoverflow.com/a/29411846
tagged with: popup
has answer: http://stackoverflow.com/a/29412607
has title: Click event open both Popup

http://stackoverflow.com/q/29489115
answer count: 3
has title: Fetching data from data base in ruby app
has answer: http://stackoverflow.com/a/29489200
tagged with: ruby
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47145440
has answer: http://stackoverflow.com/a/29489239
linked to: http://stackoverflow.com/q/22507669
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/47137706
has answer: http://stackoverflow.com/a/29489675
type: Question
score: 0
has body: In a ruby app I have a post model and a writer model. in the form I have a column for writer. I want to use in the form instead of collection_select something like I will type "sh" and this will filter all writers name and show me list that start with sh. and When I select one it will be inside the form and writer id will be saved. how to do so?
tagged with: javascript

http://stackoverflow.com/a/29449202
type: Answer
accepted answer of: http://stackoverflow.com/q/29448391
score: 2
has comment: http://stackoverflow.com/comment/47067313
has comment: http://stackoverflow.com/comment/47067414
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29448391
has body: If CORS aren't an issue, you can try : document.querySelector('embed').addEventListener('load', function(){ this.getSVGDocument().addEventListener('mousedown', function(){ alert('hello')}); }); According to the specs: 3 . If the previous step determined that the content's type is image/svg+xml, then run the following substeps: If the embed element is not associated with a nested browsing context, associate the element with a newly created nested browsing context,[...] Navigate the nested browsing context to the fetched resource, with replacement enabled, and with the embed element's node document's browsing context as the source browsing context. (The src attribute of the embed element doesn't get updated if the browsing context gets further navigated to other locations.) The embed element now represents its associated nested browsing context. But I can't find anything about actually how it should handle events. Nevertheless, it appears that when its src is set and returns something, the events are captured by the new context (whether reached or created). See @Marius comment for a demo when no src is set, it fires the event.
upvote count: 2

http://stackoverflow.com/q/29510910
has answer: http://stackoverflow.com/a/29510985
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29510974
tagged with: css
has answer: http://stackoverflow.com/a/29511002
has answer: http://stackoverflow.com/a/29510974
answer count: 4
has answer: http://stackoverflow.com/a/29511358
score: 2
type: AnsweredQuestion
upvote count: 3
downvote count: 1
type: Question
tagged with: javascript
has title: set css background doesn't work in firefox
accepted answer: http://stackoverflow.com/a/29511358
has body: $(function () { var getBg = $('.one').css('background'); $('.two').css('background', getBg); }); Fiddle Worked well in Chrome, doesn't work in IE and FF, what am I missing?

http://stackoverflow.com/comment/47028068
comment on: http://stackoverflow.com/a/29428827
score: 0
type: AnswerComment
has text: I will have a look if i can find anything, i have 0 experience working with both languages tho..
type: Comment

http://stackoverflow.com/comment/49638925
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29505421
has text: So should I update the theme from RT-Theme 15 to other latest version?

http://stackoverflow.com/a/29475428
downvote count: 0
has comment: http://stackoverflow.com/comment/47111921
has comment: http://stackoverflow.com/comment/47111831
has body: To add an event to both your input and select: change $('#lengthInput').on("change", function () { to $('#lengthInput, #numberInput').on("change input", function () { Then put your amount code in the callback. Full code below: $(function () { $('#lengthInput, #numberInput').on("change input", function () { var amount = $('#numberInput').val(); var length = $("#lengthInput").val();// &lt;-simplified var calculatedAmount = amount * length; document.getElementById('result').innerHTML = calculatedAmount }).change(); });
upvote count: 2
has comment: http://stackoverflow.com/comment/47111863
answers question: http://stackoverflow.com/q/29475375
has comment: http://stackoverflow.com/comment/47111918
has comment: http://stackoverflow.com/comment/47112038
type: Answer
has comment: http://stackoverflow.com/comment/47112156
has comment: http://stackoverflow.com/comment/47111985
score: 2

http://stackoverflow.com/comment/47166525
has text: "src" is an attribute so you set it with element.setAttribute() see here https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29504537
score: 0

http://stackoverflow.com/comment/47100882
score: 0
type: Comment
type: QuestionComment
has text: please have a look on it http://jsfiddle.net/9f1cnh8r/5/
comment on: http://stackoverflow.com/q/29469341

http://stackoverflow.com/q/29478751
has answer: http://stackoverflow.com/a/56474891
type: Question
upvote count: 158
has answer: http://stackoverflow.com/a/57459509
has title: Cancel a vanilla ECMAScript 6 Promise chain
has answer: http://stackoverflow.com/a/49865441
tagged with: cancellation
has answer: http://stackoverflow.com/a/46297027
tagged with: es6-promise
has comment: http://stackoverflow.com/comment/47152607
tagged with: javascript
has comment: http://stackoverflow.com/comment/93084553
has answer: http://stackoverflow.com/a/61094045
has comment: http://stackoverflow.com/comment/62590293
has answer: http://stackoverflow.com/a/49487365
accepted answer: http://stackoverflow.com/a/29479435
has comment: http://stackoverflow.com/comment/70938576
has answer: http://stackoverflow.com/a/49578566
linked to: http://stackoverflow.com/q/30233302
downvote count: 0
has answer: http://stackoverflow.com/a/43398419
answer count: 17
favorite count: 0
tagged with: promise
has answer: http://stackoverflow.com/a/61242688
has answer: http://stackoverflow.com/a/59999584
linked to: http://stackoverflow.com/q/17677910
has answer: http://stackoverflow.com/a/53869519
has answer: http://stackoverflow.com/a/51668759
has comment: http://stackoverflow.com/comment/62591402
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/56810507
has body: Is there a method for clearing the .thens of a JavaScript Promise instance? I've written a JavaScript test framework on top of QUnit. The framework runs tests synchronously by running each one in a Promise. (Sorry for the length of this code block. I commented it as best I can, so it feels less tedious.) /* Promise extension -- used for easily making an async step with a timeout without the Promise knowing anything about the function it's waiting on */ $$.extend(Promise, { asyncTimeout: function (timeToLive, errorMessage) { var error = new Error(errorMessage || "Operation timed out."); var res, // resolve() rej, // reject() t, // timeout instance rst, // reset timeout function p, // the promise instance at; // the returned asyncTimeout instance function createTimeout(reject, tempTtl) { return setTimeout(function () { // triggers a timeout event on the asyncTimeout object so that, // if we want, we can do stuff outside of a .catch() block // (may not be needed?) $$(at).trigger("timeout"); reject(error); }, tempTtl || timeToLive); } p = new Promise(function (resolve, reject) { if (timeToLive != -1) { t = createTimeout(reject); // reset function -- allows a one-time timeout different // from the one original specified rst = function (tempTtl) { clearTimeout(t); t = createTimeout(reject, tempTtl); } } else { // timeToLive = -1 -- allow this promise to run indefinitely // used while debugging t = 0; rst = function () { return; }; } res = function () { clearTimeout(t); resolve(); }; rej = reject; }); return at = { promise: p, resolve: res, reject: rej, reset: rst, timeout: t }; } }); /* framework module members... */ test: function (name, fn, options) { var mod = this; // local reference to framework module since promises // run code under the window object var defaultOptions = { // default max running time is 5 seconds timeout: 5000 } options = $$.extend({}, defaultOptions, options); // remove timeout when debugging is enabled options.timeout = mod.debugging ? -1 : optio…
has answer: http://stackoverflow.com/a/65008618
possible better answer: http://stackoverflow.com/a/37492399
has answer: http://stackoverflow.com/a/53538331
has answer: http://stackoverflow.com/a/29479435
has answer: http://stackoverflow.com/a/37492399
score: 158

http://stackoverflow.com/a/43392773
answers question: http://stackoverflow.com/q/29382004
downvote count: 0
type: Answer
has body: You can use $httpParamSerializerJQLike; .controller(function($http, $httpParamSerializerJQLike) { //... var serializedUser = $httpParamSerializerJQLike(user); }); you can see $httpParamSerializerJQLike Documentation here.
score: 1
upvote count: 1

http://stackoverflow.com/comment/109730630
has text: `WeakMap`s can be used to detect memory leaks: http://stevehanov.ca/blog/?id=148
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/29413222

http://stackoverflow.com/a/29449686
answers question: http://stackoverflow.com/q/29449437
accepted answer of: http://stackoverflow.com/q/29449437
type: Answer
score: 2
downvote count: 0
has body: In Node.js you know when a chunk of data is available. If you do a http request you are given a response object which contains the headers. This response object is also a stream with events. The one you are searching for is "data". With this event you get a buffer filled with the data received (only the new data, the previously received chunks are not present). You just have to have a buffer and append to it each time you get a chunk of data. You can also get the length of the buffer. You can choose to stop downloading the data when you have enough data using the method destroy method. Here is an example : var http = require("http"); var buff = new Buffer(0); http.get("http://epfl.ch", function(res) { res.on('data', function(chunk) { buff = Buffer.concat([buff, chunk]); if (buff.length &gt; 10240) { res.destroy(); console.log(buff); } }); }) this code will wait to fetch 10kb bytes then end the request. Then you can dou whatever you want with the data (buff) If you want to save the data to file while downloading you can do this instead : var http = require("http"); var buff = new Buffer(0); var fs = require("fs"); var file = fs.createWriteStream("file.mp3"); http.get("http://epfl.ch", function(res) { res.pipe(file); res.on('data', function(chunk) { buff = Buffer.concat([buff, chunk]); if (buff.length &gt; 10240) { res.destroy(); file.close(); console.log(buff); } }); }) This code will create an input stream for a file and pipe the body of the request to this file (ie. each chunk of data received will be append to the file). If you don't want to do anything with your buffer you don't need to keep it you can just count the number of bytes received and stop when you need. var http = require("http"); var bytesRecieved = 0; var fs = require("fs"); var file = fs.createWriteStream("file.mp3"); http.get("http://epfl.ch", function(res) { res.pipe(file); res.on('data', function(chunk) { bytesRecieved += chunk.length; if (bytesRecieved &gt; 10240) { res.destroy(); file.close();…
has comment: http://stackoverflow.com/comment/47065596
has comment: http://stackoverflow.com/comment/102152616
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/47211272
comment on: http://stackoverflow.com/a/29528616
score: 0
has text: Why THING2 is displaying? I dont need that.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29417489
has comment: http://stackoverflow.com/comment/47007168
answers question: http://stackoverflow.com/q/29417241
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/47007194
has body: I would tag this as a mongodb question. Mongodb supports geospatial functions: http://blog.mongolab.com/2014/08/a-primer-on-geospatial-data-and-mongodb/ Depending on the version of mongo you're using, it could be as simple as: db.places.find( { loc : { $near : [ 100 , 100 ], $maxDistance: 10 } } ) The newer geoJSON features look really awesome - haven't had time to play with it myself but it looks super flexible. I love being able to find elements within an arbitrary polygon, handled by the DB layer. :)
has comment: http://stackoverflow.com/comment/47026946
has comment: http://stackoverflow.com/comment/47007342

http://stackoverflow.com/a/29495933
has body: Using jQuery to manipulate svg is quite a pain if possible at all. Especially .attr() and toggleClass() are not working properly on svg content. They were designed to work with html and are causing troubles when being applied to other namespaces. You should stick to d3 to get things working: d3.selectAll(".overlay01") .on("click", function() { setTimeout(function() { d3.selectAll(".location-modal") .classed("active", function() { return !d3.select(this).classed("active"); // This will actually toggle the class }); },500); }); I tried this code on my own scratch pad and it might need some refinement, but it should get you started
has comment: http://stackoverflow.com/comment/47188763
has comment: http://stackoverflow.com/comment/47200551
type: Answer
answers question: http://stackoverflow.com/q/29494260
has comment: http://stackoverflow.com/comment/47200664
upvote count: 1
has comment: http://stackoverflow.com/comment/47152537
has comment: http://stackoverflow.com/comment/47152973
has comment: http://stackoverflow.com/comment/47157562
score: 1
has comment: http://stackoverflow.com/comment/47157353
has comment: http://stackoverflow.com/comment/47196519
downvote count: 0

http://stackoverflow.com/a/29439836
has comment: http://stackoverflow.com/comment/47055253
has comment: http://stackoverflow.com/comment/47087698
has body: In the case of a directive I usually go through the dom to click the element. in your case here: it("performs some action when clicked", function() { element.find("button").click(); assert(something); }); Calling the handler directly will get you a passing test even if you forget to add the ng-click directive, which is not what I usually want. It also gives you the freedom to rename the handler method without having to adjust the test, thus making it a little less brittle. If the template is getting very complex and you are tempted to add ids just for testings sake, you might want to consider breaking the directive into multiple ones.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29435770

http://stackoverflow.com/a/29465813
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29465679
upvote count: 2
has comment: http://stackoverflow.com/comment/47094431
type: AcceptedAnswer
has body: I believe the only problem with you code is that you are using setInterval to update the model data, instead of Angular built-in service $interval. Replace the call to setInterval with $interval(function () { Notifications.addNotification(new Notification( 'Something happened!', '/#/somewhere', Math.random() &gt; 0.5 )); }, 2000); And it should work without you calling $scope.$apply. Also remember to inject the $interval service in your factory implementation Notifications. angular.module('Aristotle').factory('Notifications', function ($interval) { $interval internally calls $scope.$apply.
type: Answer
has comment: http://stackoverflow.com/comment/47094393
answers question: http://stackoverflow.com/q/29465679

2d
tags question: http://stackoverflow.com/q/29449255
tags question: http://stackoverflow.com/q/29518576
tag name: 2d
type: Tag

http://stackoverflow.com/a/29508790
score: 1
upvote count: 1
has body: If you view source and study the rendered markup, you notice that the checkboxes get created with a particular pattern. You can use that fact for your requirement. Now for the javascript side of things...you need to walk up the DOM tree and find the closes table corresponding to the checkbox clicked. You are doing something like this: onclick="checkadd(this, 'View') So the first argument to that function is a reference to the checkbox that the user has clicked...Hence we've to find the closest table. Therefore we do something like this... var tbl = findClosestTable(chk); //stores reference to the table that houses checkbox findClosestTable is implemented like this: function findClosestTable(el) { while(!el.tagName.toLowerCase() === 'table' &amp;&amp; el !== document.body) el = el.parentNode; if(el == document.body) return null; else return el; //should be the table reference. } Once you have that, you can get all the input elements by tagname using that reference. var inputElements = tbl.getElementsByTagName('input'); Now the task is fairly simple. for(var i = 0, j = inputElements.length; i &lt; j; i++ ) { var el = inputElements[i]; if(el.type === 'checkbox' &amp;&amp; el.id.indexOf('Add') &gt; 0 &amp;&amp; el !== chk) { //el is now a reference to your desired checkbox element... } }
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29492552
answers question: http://stackoverflow.com/q/29492552

http://stackoverflow.com/q/29406361
has body: I have this array of objects: [{ "f_name":"nand", "lastName":"bhatt", "gender":"", "email":"chuchubhatt@webuters.com", "mobileNo":"0043 664 321 54 76", "company":"IBM Bhimtal" }, { "f_name":"Pooran", "lastName":"Pradhan", "gender":"male", "email":"pp@wt.com", "mobileNo":"13123123123", "company":"Google" }, { "f_name":"Krishna", "lastName":"Bhatt", "gender":"Male", "email":"krishna@wt.com", "mobileNo":"983232324", "company":"IBM" }]; I want a new object similar to this: [ { field_name:f_name, sample: ['nand','Pooran','Krishna'], field_name:lastName, sample: ['bhatt','Pradhan','Bhatt'], field_name:gender, sample: ['','male','Male'], field_name:email, sample: ['chuchubhatt@webuters.com','pp@wt.com','krishna@wt.com'], field_name:mobileNo, sample: ['0043 664 321 54 76','13123123123','983232324'], }] Any idea how should we do this in lodash?
favorite count: 0
score: 0
downvote count: 1
has answer: http://stackoverflow.com/a/29407039
tagged with: lodash
has answer: http://stackoverflow.com/a/29415021
accepted answer: http://stackoverflow.com/a/29415021
possible better answer: http://stackoverflow.com/a/29407039
type: Question
type: AnsweredQuestion
has title: find key and create new object
answer count: 2
upvote count: 1
tagged with: javascript

http://stackoverflow.com/a/29448505
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29447363
has body: For JavaScript you could use the location object. var url = window.location.href; var param = url.replace('http://www.mywebsite.com/', ''); Look at Backbone routers for a more organised way of handling params in JavaScript. http://backbonejs.org/#Router

http://stackoverflow.com/q/29493807
has answer: http://stackoverflow.com/a/29493933
has body: how would you access array values of a broader object like: MainObj.ExtProps = new Array(); I have some existing code that is setting key, values on ExtProps for example a WebURL value. How would you check MainObj.ExtProps for the WebURL value?
type: UnansweredQuestion
has title: How to access JavaScript object child array?
downvote count: 2
type: Question
score: -2
tagged with: javascript
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/47146594
favorite count: 0

http://stackoverflow.com/q/29492288
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/47143622
has comment: http://stackoverflow.com/comment/47144318
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47144354
has comment: http://stackoverflow.com/comment/47143884
favorite count: 0
has body: I'm new to HTML/CSS, I recently purchased a bootstrap theme and I'm trying to create my own homepage using segments of HTML code they provided. I copy/pasted a section of code and the file paths for the JS but it doesn't work at all. The assets(text, images, videos) all appear but none of it is styled and it's all static. Neither the CSS nor the JS is working on that segment. This is a live demo of how it's supposed to look: http://htmlstream.com/preview/unify-v1.7/index.html This is how mine looks currently: http://i.gyazo.com/7f8caf3b13c10c3dbfd340afd3fcb1db.png This is the HTML segment for the slider: &lt;!--=== Slider ===--&gt; &lt;div class="slider-inner"&gt; &lt;div id="da-slider" class="da-slider"&gt; &lt;div class="da-slide"&gt; &lt;h2&gt;&lt;i&gt;CLEAN &amp;amp; FRESH&lt;/i&gt; &lt;br /&gt; &lt;i&gt;FULLY RESPONSIVE&lt;/i&gt; &lt;br /&gt; &lt;i&gt;DESIGN&lt;/i&gt;&lt;/h2&gt; &lt;p&gt;&lt;i&gt;Lorem ipsum dolor amet&lt;/i&gt; &lt;br /&gt; &lt;i&gt;tempor incididunt ut&lt;/i&gt; &lt;br /&gt; &lt;i&gt;veniam omnis &lt;/i&gt;&lt;/p&gt; &lt;div class="da-img"&gt;&lt;img class="img-responsive" src="assets/plugins/parallax-slider/img/1.png" alt=""&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="da-slide"&gt; &lt;h2&gt;&lt;i&gt;RESPONSIVE VIDEO&lt;/i&gt; &lt;br /&gt; &lt;i&gt;SUPPORT AND&lt;/i&gt; &lt;br /&gt; &lt;i&gt;MANY MORE&lt;/i&gt;&lt;/h2&gt; &lt;p&gt;&lt;i&gt;Lorem ipsum dolor amet&lt;/i&gt; &lt;br /&gt; &lt;i&gt;tempor incididunt ut&lt;/i&gt;&lt;/p&gt; &lt;div class="da-img"&gt; &lt;iframe src="http://player.vimeo.com/video/47911018" width="530" height="300" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="da-slide"&gt; &lt;h2&gt;&lt;i&gt;USING BEST WEB&lt;/i&gt; &lt;br /&gt; &lt;i&gt;SOLUTIONS WITH&lt;/i&gt; &lt;br /&gt; &lt;i&gt;HTML5/CSS3&lt;/i&gt;&lt;/h2&gt; &lt;p&gt;&lt;i&gt;Lorem ipsum dolor amet&lt;/i&gt; &lt;br /&gt; &lt;i&gt;tempor incididunt ut&lt;/i&gt; &lt;br /&gt; …
has title: Why isn't my JS slider working?
has comment: http://stackoverflow.com/comment/47143999
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29492408
has comment: http://stackoverflow.com/comment/47143656
type: UnansweredQuestion
score: 0

http://stackoverflow.com/q/29524394
type: Question
accepted answer: http://stackoverflow.com/a/29526983
linked to: http://stackoverflow.com/q/16391663
upvote count: 1
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29526983
type: AnsweredQuestion
has body: I have an ASP.NET Ajax Timer which I can stop or start using the following jQuery/Javascript: var timer = $("[id$=Timer1]"); timer[0].control._stopTimer(); ... timer[0].control._startTimer(); How can I get the timer's current started/stopped status? The requirement is via Javascript/jQuery not code behind (VB/C#). I read this thread where it mentions the "enable" property, but I understand that "stopping/starting" is distinct than "enabling/disabling" for a timer object.
downvote count: 0
score: 1
tagged with: jquery
tagged with: asp.net
has title: Get ASP.NET Ajax Timer status via Javascript/jQuery
favorite count: 0
tagged with: ajax
tagged with: timer

http://stackoverflow.com/comment/73371204
comment on: http://stackoverflow.com/q/29401735
type: Comment
type: QuestionComment
has text: Did you ever solve this?
score: 0

http://stackoverflow.com/comment/47097130
type: Comment
type: QuestionComment
has text: Wouldn't it be difficult to maintain id on next click?
score: 0
comment on: http://stackoverflow.com/q/29467409

http://stackoverflow.com/q/29418204
score: 1
has comment: http://stackoverflow.com/comment/102978446
has comment: http://stackoverflow.com/comment/47008814
has comment: http://stackoverflow.com/comment/47010039
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47009220
accepted answer: http://stackoverflow.com/a/29419672
possible better answer: http://stackoverflow.com/a/29418311
has body: I have the following Ajax request which is within a partial view that requests addresses from a service and can take a few seconds to populate the table: @using (Ajax.BeginForm(new AjaxOptions { UpdateTargetId = "updatearea", OnBegin = "ShowLoading", OnComplete = "HideLoading" })) { &lt;div id="updatearea" class="form-group"&gt; &lt;div style="width:300px; display:block; float:left;"&gt; @Html.TextBox("PostCode", null, new { @class = "form-control" }) &lt;/div&gt; &lt;div id="NewAddressLine"&gt; &lt;input id="btnLookupPostcode" type="submit" value="Lookup Postcode" class="btn btn-default" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="spinner"&gt;&lt;/div&gt; } And this JavaScript which is successfully starting the loading spinner but not stopping it once the partial view has rendered fully: function ShowLoading() { var opts = { lines: 13, // The number of lines to draw length: 20, // The length of each line width: 10, // The line thickness radius: 30, // The radius of the inner circle corners: 1, // Corner roundness (0..1) rotate: 0, // The rotation offset direction: 1, // 1: clockwise, -1: counterclockwise color: '#000', // #rgb or #rrggbb or array of colors speed: 1, // Rounds per second trail: 60, // Afterglow percentage shadow: false, // Whether to render a shadow hwaccel: false, // Whether to use hardware acceleration className: 'spinner', // The CSS class to assign to the spinner zIndex: 2e9, // The z-index (defaults to 2000000000) top: '50%', // Top position relative to parent left: '50%' // Left position relative to parent }; var target = document.getElementById('spinner'); var spinner = new Spinner(opts).spin(target); } function HideLoading() { var spinner = $('.spinner'); spinner.stop(); } Please make it stop!
has comment: http://stackoverflow.com/comment/47010348
answer count: 2
has title: How to stop an existing spinner
upvote count: 1
has comment: http://stackoverflow.com/comment/47010077
has comment: http://stackoverflow.com/comment/47009177
has comment: http://stackoverflow.com/comment/47008617
has answer: http://stackoverflow.com/a/29419672
favorite count: 0
has answer: http://stackoverflow.com/a/29418311
linked to: http://stackoverflow.com/q/36054846
has comment: http://stackoverflow.com/comment/47008721
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/47010852

http://stackoverflow.com/comment/47061489
has text: Let me explain . if you have json array in string format then you need $.parseJSON function . otherwise no nee d to use . also you dont need to use list['json'] .as in your json array there is no key like 'json'
score: 2
comment on: http://stackoverflow.com/a/29446920
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29434394
has title: jquery on click <a tag not working with my parameter
score: 0
has comment: http://stackoverflow.com/comment/47038482
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/47038255
favorite count: 0
has comment: http://stackoverflow.com/comment/47039328
has comment: http://stackoverflow.com/comment/47038450
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29434761
accepted answer: http://stackoverflow.com/a/29434761
has comment: http://stackoverflow.com/comment/47038566
has comment: http://stackoverflow.com/comment/47038997
type: Question
has comment: http://stackoverflow.com/comment/47038420
upvote count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47038467
has body: I tried few example but nothing works. But i got the alert so i really don't understand. Why am I getting alert when my form doesn't send any data? If I work with a input everything works fine. I also tried to put my script in my js file but still the same result. Jeu Récompenses JOUER Player Admin Connexion Inscription EN my js file: function formhash(form, password) { // Create a new element input, this will be our hashed password field. var p = document.createElement("input"); // Add the new element to our form. form.appendChild(p); p.name = "p"; p.type = "hidden"; p.value = hex_sha512(password.value); // Make sure the plaintext password doesn't get sent. password.value = ""; // Finally submit the form. form.submit(); }

http://stackoverflow.com/q/29388635
score: 0
upvote count: 1
downvote count: 1
answer count: 1
tagged with: google-forms
has comment: http://stackoverflow.com/comment/46954833
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29389123
accepted answer: http://stackoverflow.com/a/29389123
has body: I would like to build a node.js server and use it to retrieve data of a Google Form, like: title, type, options of questions on that form. e.g. If I have a Google Form: http://goo.gl/forms/DSNFS0cfgw I would like to do somthing like: var form = getFormData(); // returns // [ // {title: "Name", type: "text", options:[]}, // {title: "Favorite Season", type: "select", options:["spring", "summer", "autumn", "winter"]}, // {title: "Favorite Fruit", type: "radio", options:["apple", "banana"]} // ] Is there a way to do this by using Javascript or any node module?
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46955900
has comment: http://stackoverflow.com/comment/46982742
type: Question
has comment: http://stackoverflow.com/comment/46955540
has title: Is there a way to retrieve data of a Google Form ITSELF (not spreadsheet) using Javascript?

http://stackoverflow.com/q/29445881
linked to: http://stackoverflow.com/q/28354252
has answer: http://stackoverflow.com/a/29446402
has answer: http://stackoverflow.com/a/29453023
answer count: 2
has body: I have a Javascript array: var peoples = [ {'people':{'sex':'male', 'diet':'vegetarian','favPlaces':['place1','place2']}}, {'people':{'sex':'female', 'diet':'flexitarian','favPlaces':['place2','place3']}}, {'people':{'sex':'male', 'diet':'flexitarian', 'favPlaces':['place4','place1']}} ]; If I select {'sex':['female','male']} && {'diet':['flexitarian']} the output should be ['place2', 'place3', 'place4', 'place1']. The problem to my code is if I only select 'sex' it will not display result but if I select both a 'sex' and a 'diet' it will display results. I cant figure out how to make my code dynamic, so that the code will filter dynamically when I select a sex or diet or sex and diet and they will show results. This is my code: var filterObj = {'sex': ['female', 'male'], 'diet': ['flexitarian']}; for(var p in peoples){ for(var s in filterObj.sex){ for(var d in filterObj.diet){ if((filterObj.sex[s] == peoples[p].people.sex) && (filterObj.diet[d] == peoples[p].people.diet)){ console.log(peoples[p].people.favPlaces); } } } This is the HTML: Male Female None Flexitarian Vegetarian
has title: How to Filter objects dynamically?
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29446402
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/47059006
downvote count: 0
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/47059276
tagged with: javascript-objects
has comment: http://stackoverflow.com/comment/47059126
possible better answer: http://stackoverflow.com/a/29453023
has comment: http://stackoverflow.com/comment/47058818
has comment: http://stackoverflow.com/comment/47059175
upvote count: 2

http://stackoverflow.com/q/29374089
has body: Is it possible to make use of common js modules with react-native? The use case is sharing logic between a mobile and web version of a react project.
has answer: http://stackoverflow.com/a/29426771
upvote count: 10
has comment: http://stackoverflow.com/comment/46930747
type: Question
tagged with: react-native
score: 10
tagged with: javascript
has comment: http://stackoverflow.com/comment/47015133
tagged with: commonjs
tagged with: reactjs
has title: Common js modules in react native
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/46964670
comment on: http://stackoverflow.com/q/29393888
score: 0
type: Comment
type: QuestionComment
has text: try ng-disabled="isDisabled" in your td with directive and then just toggle this on button press ... example here: https://docs.angularjs.org/api/ng/directive/ngDisabled

http://stackoverflow.com/a/29416876
has body: No matter you use newElem = null; or not, document.getElementById('newDiv') will return null because the dom &lt;div id="newDiv"&gt;&lt;/div&gt; you created is not attached to the document. You can use: var newElem = document.createElement('div'); newElem.id = 'newDiv'; var existsElem = document.getElementById("any-existing-element"); existsElem.appendChild(newElem); // attach your created element to document Then document.getElementById("newDiv") will get your new created element. Note: after existsElem.appendChild(newElem); executed, even if you execute newElem = null;, document.getElementById("newDiv") still gets the dom &lt;div id="newDiv"&gt;&lt;/div&gt;.
type: Answer
answers question: http://stackoverflow.com/q/29416409
score: 0

http://stackoverflow.com/q/29485904
answer count: 1
favorite count: 0
has body: I have this line of code, which throws an error in IE-11 browser, var excApp = new ActiveXObject("Excel.Application"); The following error occurs: Error: Automation server can't create object. is there any solution?
has title: Error: Automation server can't create object
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question
tagged with: internet-explorer
tagged with: activexobject
tagged with: javascript
has answer: http://stackoverflow.com/a/29485983
upvote count: 1

http://stackoverflow.com/q/29426582
type: Question
has comment: http://stackoverflow.com/comment/47023964
has body: Im looking to pass one variable from my PHP code to my Javascript code to validate a figure. I'm creating a shopping cart scenario whereby i have a variable 'in_stock' which specifies the amount of stock available for a product. If I enter an amount that is greater than the 'in_stock' available i need an error to be thrown. This is currently what I have: Java Script This is all occurring whilst my PHP has called the database and returned the value on the screen. As follows: PHP $product_id =(int)$_GET['product_id']; $username = "potiro"; $password = "pcXZb(kL"; $hostname = "rerun"; //connection to the database $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); //select a database to work with $selected = mysql_select_db("poti",$dbhandle) or die("Could not select examples"); //execute the SQL query and return records $result = mysql_query("SELECT * FROM products where product_id=$product_id"); echo ' '; echo ' '; while($row = mysql_fetch_array($result)) { $stock =$row['in_stock']; $product_id = $row['product_id']; echo " Product ID "; echo " "; echo $product_id; echo " "; echo " Product Name "; echo " "; echo $row['product_name']; echo " "; echo " Unit Price "; echo " "; echo $stock; echo " "; echo " Unit Quantity "; echo " "; echo $row['unit_quantity']; echo " "; echo " In Stock "; echo " "; echo $row['in_stock']; echo " "; echo ' Add '; echo ' '; } echo " "; echo " "; mysql_close($dbhandle); ?>
score: 1
tagged with: sql
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: variables
favorite count: 0
has answer: http://stackoverflow.com/a/29426646
accepted answer: http://stackoverflow.com/a/29426646
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: Validate PHP variable via Javascript
has comment: http://stackoverflow.com/comment/47024622
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/47024385

remote-debugging
tag name: remote-debugging
tags question: http://stackoverflow.com/q/29418970
tags question: http://stackoverflow.com/q/29504606
type: Tag

http://stackoverflow.com/comment/47034232
comment on: http://stackoverflow.com/q/29432361
type: Comment
type: QuestionComment
score: 0
has text: Java and Javascript are completely different languages.

http://stackoverflow.com/q/29432759
score: 0
has title: jQuery keypress() - get all chars until enter is pressed
type: Question
has answer: http://stackoverflow.com/a/29432920
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29433056
tagged with: jquery
has body: I'm trying to create a keypress/keyup function which reads from the document (not from an input field) - I'm gonna use it for a barcode scanning device. function $(document).keyup(function(e) { var barcode = e.which; // the barcode should be without the enter at the end if (e.keyCode == 13){ // stop reading } }); I'm quite new to javascript and jQuery - as you probably already noticed. Thanks for every help! Update This worked for me: $(function(){ var barcode = ''; var getCode = function (e) { if (e.which != 13) { barcode += String.fromCharCode(e.which); } else { $(document).unbind('keyup', getCode); console.log(barcode); } }; $(document).on('keypress', getCode); // Barcode ausgeben // Produktinfos ausgeben $('span#articleID').text('articleID'); $('span#productName').text('productName'); }); Thanks all!!
tagged with: keypress
has comment: http://stackoverflow.com/comment/47035043
possible better answer: http://stackoverflow.com/a/29432893
answer count: 4
has answer: http://stackoverflow.com/a/29433056
has answer: http://stackoverflow.com/a/29432893
has answer: http://stackoverflow.com/a/29432932
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47035129
tagged with: keyup

http://stackoverflow.com/a/29558775
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29516174
answers question: http://stackoverflow.com/q/29516174
has body: After days of research I've finally found one possible and very efficient solution. The problem was relying onto that my domain is set to run on a Windows Server 2008+ with IIS hosting hence PHP's mail() function was incomplete to execute a mail. Solution was and is : PHPMailer a very common and notably top used php library especially designed to deliver confident and simple code to developers. I've downloaded it from GitHub source as a zip and then extract it. After that created a blank new php file and copy/paste the demo script on how-to send a mail and altered it to my needs. Finally uploaded both PHPMailer folder and the newly created script to my domain. After executing the script manually I've received mail(s) in my inbox and not as a spam. This tutorial saved me a life too. The script is as it follows: &lt;? php header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS'); header('Access-Control-Allow-Headers: Content-Type, Content-Range, Content-Disposition, Content-Description'); header('Content-Type: application/json'); $postvars = $_POST['person']; if (isset($postvars)) { $to = 'recipient@gmail.com'; $subject = 'Some Title'; $email_message = $postvars; require 'PHPMailerAutoload.php'; // The script needed to be called in order to executed // further commands below $mail = new PHPMailer; $mail - &gt; isSMTP(); // Set mailer to use SMTP $mail - &gt; Host = 'smtp.mydomain.com'; // Specify main and backup SMTP servers $mail - &gt; SMTPAuth = true; // Enable SMTP authentication $mail - &gt; Username = 'mymail@mydomain.com'; // SMTP username $mail - &gt; Password = 'password_here'; // SMTP password $mail - &gt; SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted $mail - &gt; Port = 465; // TCP port to connect to $mail - &gt; CharSet = 'UTF-8'; // Character set specified because I use "ë" and other ones $mail - &gt; From = 'mymail@mydomain.com'; // The same email address as specified above for a…
score: 0

http://stackoverflow.com/a/29496986
has body: It makes sense that it always reverts back to 2 because every time you select a difficulty, it will load the javascript file and it will go through the line: var difficulty = 2; One solution would be to create a hidden input field on your html and store the difficulty in there every time the user changes it. So you will be reading the new difficulty from the input tag (textbox). The input field would be something like: &lt;input type="text" id="global_difficulty" style="display:none;" value="2"/&gt; The default value will be 2. Now, on the javascript, you can access the difficult using DOM like this: var difficulty = document.getElementById("global_difficulty"); To set the different values, you would say something like: difficulty.value = 3; I hope this helps!
score: 0
has comment: http://stackoverflow.com/comment/47154029
answers question: http://stackoverflow.com/q/29496784
has comment: http://stackoverflow.com/comment/47153565
has comment: http://stackoverflow.com/comment/47153624
type: Answer
has comment: http://stackoverflow.com/comment/47154261

http://stackoverflow.com/comment/46944656
comment on: http://stackoverflow.com/q/29382790
type: QuestionComment
type: Comment
has text: I'm not completely sure what *script* you're using and how is it getting *interrupted*...
score: 0

http://stackoverflow.com/comment/47209280
type: Comment
comment on: http://stackoverflow.com/a/29508069
score: 0
type: AnswerComment
has text: I'm sure that the reason that the previous arrow was not appearing with the initial changes is that style.css was being linked to twice. By you adding a new property that isn't being overwritten you are now able to see it. If I were you I would attempt to disable the second link somehow because it will lead to major issues if attempting to customize further.

http://stackoverflow.com/q/29475314
answer count: 1
has body: Demo HTML &lt;div class="x"&gt; &lt;/div&gt; &lt;input class="clickMe" type="button" value="ClickMe"&gt;&lt;/input&gt; JS $(".clickMe").click( function() { $('.x').show().css('top',0).addClass("mask"); } ); CSS: .x { width: 200px; height: 200px; border: 1px solid #0f0f0f; position: relative; top: -210px; transition: all 1s ease 0s; float: right; margin-right: 20px; } .mask::before { position: fixed; top:0; left: 0; z-index: -1; width: 100%; height: 100%; content:""; background-color: #777; } .mask::after { content: ""; background-color: #fff; opacity: 0.5; width: 100%; height: 100%; z-index: -1; position: absolute; top: 0; left: 0; } .mask { transition: all 2s ease 0s; } If you see in the fiddle after clicking the button, mask comes very earlier. But popup comes very slowly due to transition effect. I added the same transition to mask. But there is no effect. How do i achieve the same transition with the mask also? Or is there any best ways to show popup and mask? Any ideas?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47111497
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29475788
has comment: http://stackoverflow.com/comment/47111589
tagged with: css
has comment: http://stackoverflow.com/comment/47112210
accepted answer: http://stackoverflow.com/a/29475788
has title: popup mask is very very quickly shown
has comment: http://stackoverflow.com/comment/47112208
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/29441664
type: Question
tagged with: google-apps-script
answer count: 2
score: 5
upvote count: 6
has answer: http://stackoverflow.com/a/29442040
accepted answer: http://stackoverflow.com/a/29442040
tagged with: javascript
tagged with: runtime-error
downvote count: 1
has answer: http://stackoverflow.com/a/29442027
favorite count: 0
possible better answer: http://stackoverflow.com/a/29442027
tagged with: google-sites
has title: google not defined in google script - Error
type: AnsweredQuestion
has body: I get the error "google is not defined", from my google script that creates a table using google.visualization. How do you add a reference to a google script, and if I get it to run in scripts will I also have to add it to my google site? I'll put my script below. &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt; function doGet() { drawTable() } function drawTable() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Name'); data.addColumn('number', 'Salary'); data.addColumn('boolean', 'Full Time'); data.addRows(1); data.setCell(0, 0, 'John'); data.setCell(0, 1, 10000, '$10,000'); data.setCell(0, 2, true); var table = new google.visualization.Table(document.getElementById('table_div')); table.draw(data, {showRowNumber: true}); google.visualization.events.addListener(table, 'select', function() { var row = table.getSelection()[0].row; alert('You selected ' + data.getValue(row, 0)); }); }

http://stackoverflow.com/comment/47154997
has text: You could use session storage. http://www.geekchamp.com/html5-tutorials/18-html5-session-storage or http://davidwalsh.name/html5-storage There are lots of resources out there.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29498029

jquery-plugins
tags question: http://stackoverflow.com/q/29401149
tags question: http://stackoverflow.com/q/29509384
type: Tag
tags question: http://stackoverflow.com/q/29399889
tags question: http://stackoverflow.com/q/29382697
tags question: http://stackoverflow.com/q/29473832
tags question: http://stackoverflow.com/q/29483396
tags question: http://stackoverflow.com/q/29429632
tag name: jquery-plugins
tags question: http://stackoverflow.com/q/29485489
tags question: http://stackoverflow.com/q/29431613
tags question: http://stackoverflow.com/q/29529787
tags question: http://stackoverflow.com/q/29407262
tags question: http://stackoverflow.com/q/29471893
tags question: http://stackoverflow.com/q/29515485
tags question: http://stackoverflow.com/q/29426520
tags question: http://stackoverflow.com/q/29435991
tags question: http://stackoverflow.com/q/29493401

http://stackoverflow.com/q/29404837
score: 0
has answer: http://stackoverflow.com/a/29404900
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29404897
answer count: 3
has body: I have a div that gettng clicked (remove button) that is positioned after img on my page. &lt;div class="item"&gt; &lt;img src="/media/BodyPart_e4fc6673-1476-42d2-a98d-947b0e79fd99/300/0" class="media-item"&gt; &lt;div class="remove" title="Remove"&gt;&lt;/div&gt; //getting clicked &lt;/div&gt; so on click event I am accessing the img through this code: var img = $(this).prev("img.media-item"); then I want to access to src attribute of img var extracted_string = img.src.match(/BodyPart[^\/]*/); but getting img.src underfined how can I fixe that? UPDATE I am just find out that if i will do this $(this).prev("img.media-item").attr("src") - i can get the src But why var img = $(this).prev("img.media-item"); $(img).attr("src") is not working
tagged with: jquery
has title: Access to image src attribute from click event on other element
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29404873

http://stackoverflow.com/a/29387802
type: Answer
has comment: http://stackoverflow.com/comment/46953504
upvote count: 4
has comment: http://stackoverflow.com/comment/46953648
accepted answer of: http://stackoverflow.com/q/29387564
type: AcceptedAnswer
downvote count: 0
has body: You can use Javascript change event: document.getElementById("product").addEventListener("change", function( event ) { console.log(event.target.value); }, false); DEMO Updating price which changing value of product: document.getElementById("product").addEventListener("change", function( event ) { var product = parseInt(event.target.value); document.getElementById("price").value = product *2; }, false); DEMO
score: 4
answers question: http://stackoverflow.com/q/29387564

tibco
tags question: http://stackoverflow.com/q/29415638
tag name: tibco
type: Tag

http://stackoverflow.com/comment/47005014
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29416216
has text: Where do you get the value from?
score: 0

cookies
tags question: http://stackoverflow.com/q/29471473
tags question: http://stackoverflow.com/q/29526278
tags question: http://stackoverflow.com/q/29426777
tags question: http://stackoverflow.com/q/29474873
tags question: http://stackoverflow.com/q/29407194
tags question: http://stackoverflow.com/q/29422854
tags question: http://stackoverflow.com/q/29505763
type: Tag
tags question: http://stackoverflow.com/q/29385198
tags question: http://stackoverflow.com/q/29416010
tags question: http://stackoverflow.com/q/29416271
tags question: http://stackoverflow.com/q/29396919
tags question: http://stackoverflow.com/q/29377994
tags question: http://stackoverflow.com/q/29388363
tags question: http://stackoverflow.com/q/29445410
tags question: http://stackoverflow.com/q/29409842
tags question: http://stackoverflow.com/q/29426637
tag name: cookies
tags question: http://stackoverflow.com/q/29441326
tags question: http://stackoverflow.com/q/29437563
tags question: http://stackoverflow.com/q/29485082
tags question: http://stackoverflow.com/q/29375938
tags question: http://stackoverflow.com/q/29453776
tags question: http://stackoverflow.com/q/29417518
tags question: http://stackoverflow.com/q/29518146
tags question: http://stackoverflow.com/q/29517414
tags question: http://stackoverflow.com/q/29521232
tags question: http://stackoverflow.com/q/29461141
tags question: http://stackoverflow.com/q/29382044

http://stackoverflow.com/q/29405077
has comment: http://stackoverflow.com/comment/46985090
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/29405575
tagged with: jquery
has body: I have a text area that calling a jQuery function for autocomplete the fields. But my textArea Ids are dynamically creating and i have to pass those ids, when ever clicking the text area. But the variable in the jQuery function is not working here is my code function SearchText(id) { var TxtboxId =""; TxtboxId = "#IdPrefix_" + id; $(TxtboxId).autocomplete({ source: function(request, response) { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "demo.aspx/GetAutoCompletfunc", data:'{"key":"' + request.term +'"}', dataType: "json", async: false, success: function(data) { response(data.d); }, error: function(result) { alert("Error"); } }); } }); } Calling this function by text area onclick event. This code is added in a loop for dynamicallly create the text areas. here calling the SearchText Function. ListArr[++j] = '&lt;td width="20%" &gt;&lt;textarea id="IdPrefix_' + id + '" type="textbox" onclick = "javascript:SearchText( ' + id + ' );" maxlength="300" But it is not working in $(TxtboxId).autocomplete Anyone know any solution? please answer.
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/46985366
has answer: http://stackoverflow.com/a/29405200
type: AnsweredQuestion
has title: How to assign a variable as Id in Jquery function for autocomplete text area
score: 1
accepted answer: http://stackoverflow.com/a/29405575
has answer: http://stackoverflow.com/a/29411421
has comment: http://stackoverflow.com/comment/46985196
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/29411421
tagged with: javascript

http://stackoverflow.com/comment/46943753
type: Comment
has text: I want to achieve is the div tag , which is called through javascript with some time function in it, after some sec the div would fade out . This javascript is called through asp.net button click . @Shohel
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29382172

http://stackoverflow.com/q/29446030
tagged with: ruby
has answer: http://stackoverflow.com/a/29446262
tagged with: ruby-on-rails
accepted answer: http://stackoverflow.com/a/29446262
type: AnsweredQuestion
has title: Open website on machine
has body: I have a rails application with some nice javascript-canvas charts. I would like to save this charts as images as well. For this I have to open the Website and then javascript, will post the content of the canvas to one of my controller where I do: data = params[:data_uri] image_data = Base64.decode64(data['data:image/png;base64,'.length .. -1]) File.open("#{Rails.root}/public/uploads/somefilename.png", 'wb') do |f| f.write image_data end Here is a article on how to do this: http://rohitrox.github.io/2013/07/19/canvas-images-and-rails/ My question is: Is it possible to automatically let my Rails application open this website and run the javascript? How would you do it? Thanks!
type: Question
tagged with: canvas
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46962646
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29392959
has text: what part isnt working? there may be a few things, for example `{type:_desc amount:_amount date:today}` should be `{"type" : _desc, "amount" : _amount, "date" : today}`
score: 0

http://stackoverflow.com/a/29425611
has comment: http://stackoverflow.com/comment/47022595
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47038061
has comment: http://stackoverflow.com/comment/47491627
type: Answer
upvote count: 16
has body: The context of the .add() method is important. Using null won't work because then add will have no idea what to operate on. Do this instead: var cl = div.classList; cl.add.apply(cl, classArray); // ----------^-- sets the `this` value of the `.add()` method // Select the element var div = document.querySelector('.select_me'); // Create an array with the classes to add var classArray = ['give_me', 'more_classes']; // Apply the new classes. var cl = div.classList; cl.add('just_a_test', 'okay'); cl.add.apply(cl, classArray); div { width: 100px; height: 100px; background-color: #eeeeee; } .select_me.just_a_test.okay { border: 2px solid #000000; } .select_me.give_me { background: #666666; } .select_me.more_classes { border-radius: 50% 0px 50% 0px; } &lt;div class="select_me"&gt;&lt;/div&gt; Note that in ECMAScript 6 (and currently in Firefox) you'll be able to do this: div.classList.add(...classArray);
has comment: http://stackoverflow.com/comment/112453549
accepted answer of: http://stackoverflow.com/q/29425547
score: 16
answers question: http://stackoverflow.com/q/29425547

http://stackoverflow.com/q/29491065
has comment: http://stackoverflow.com/comment/47141310
tagged with: grunt-contrib-concat
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/47141789
has title: How can I concatenate all JS files in a folder?
upvote count: 3
has answer: http://stackoverflow.com/a/29491378
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/29491378
has comment: http://stackoverflow.com/comment/47141315
tagged with: gruntjs
has body: I have a main app folder with many subfolders, each with their own subfolders, etc, which along the way contain .js files. I want to create a grunt task that concatenates all the .js files anywhere under this main top level folder, which is called src. Is there anyway to do that? Right now, I have cwd: '.', src: [ 'src/**/**/*.js', 'src/**/**/**/*.js', 'src/**/**/**/**/*.js', ], dest: 'dist/app/superapp.js' but this doesn't account for all possible .js file locations. And if I add a new .js in some folder, I don't want to have to manually update the grunt task.
type: Question

http://stackoverflow.com/a/29530392
has comment: http://stackoverflow.com/comment/56679201
accepted answer of: http://stackoverflow.com/q/29530000
upvote count: 1
answers question: http://stackoverflow.com/q/29530000
score: 1
has body: The following function takes a string representing a time and an integer denoting the number of hours you want to add to that time. You can optionally pass an integer number of minutes as well. The result is a string formatted as 'h:mm xm'. function addTimeToString(timeString, addHours, addMinutes) { // The third argument is optional. if (addMinutes === undefined) { addMinutes = 0; } // Parse the time string. Extract hours, minutes, and am/pm. var match = /(\d+):(\d+)\s+(\w+)/.exec(timeString), hours = parseInt(match[1], 10) % 12, minutes = parseInt(match[2], 10), modifier = match[3].toLowerCase(); // Convert the given time into minutes. Add the desired amount. if (modifier[0] == 'p') { hours += 12; } var newMinutes = (hours + addHours) * 60 + minutes + addMinutes, newHours = Math.floor(newMinutes / 60) % 24; // Now figure out the components of the new date string. newMinutes %= 60; var newModifier = (newHours &lt; 12 ? 'AM' : 'PM'), hours12 = (newHours &lt; 12 ? newHours : newHours % 12); if (hours12 == 0) { hours12 = 12; } // Glue it all together. var minuteString = (newMinutes &gt;= 10 ? '' : '0') + newMinutes; return hours12 + ':' + minuteString + ' ' + newModifier; } function test(timeString, addHours, addMinutes) { document.write(timeString + ' + ' + addHours + ' h ' + (addMinutes || 0) + ' m &amp;rarr; ' + addTimeToString(timeString, addHours, addMinutes) + '&lt;br&gt;'); } test('11:30 AM', 1, 45); test('9:00 PM', 4); test('11:55 PM', 0, 5); // In five minutes it will be midnight: 12 am. test('12:00 AM', 0, 5); // Five minutes after midnight: 12:05 am. test('11:55 AM', 0, 5); // In five minutes it will be noon: 12 pm. test('12:00 PM', 0, 5); // Five minutes after noon: 12:05 pm.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/56679696
type: Answer

polymer
tags question: http://stackoverflow.com/q/29414467
tags question: http://stackoverflow.com/q/29477027
tags question: http://stackoverflow.com/q/29480771
tags question: http://stackoverflow.com/q/29402104
tags question: http://stackoverflow.com/q/29380800
tags question: http://stackoverflow.com/q/29391728
tags question: http://stackoverflow.com/q/29399165
tags question: http://stackoverflow.com/q/29383671
tags question: http://stackoverflow.com/q/29387407
tags question: http://stackoverflow.com/q/29444143
tag name: polymer
tags question: http://stackoverflow.com/q/29472467
tags question: http://stackoverflow.com/q/29410044
tags question: http://stackoverflow.com/q/29437669
tags question: http://stackoverflow.com/q/29481753
tags question: http://stackoverflow.com/q/29438442
tags question: http://stackoverflow.com/q/29506965
type: Tag

http://stackoverflow.com/q/29469998
has comment: http://stackoverflow.com/comment/47102007
has comment: http://stackoverflow.com/comment/47101745
has answer: http://stackoverflow.com/a/29476431
linked to: http://stackoverflow.com/q/17253772
has comment: http://stackoverflow.com/comment/47101934
tagged with: coffeescript
possible better answer: http://stackoverflow.com/a/29470305
has comment: http://stackoverflow.com/comment/47102138
has title: if else in coffee script
answer count: 3
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47102236
has comment: http://stackoverflow.com/comment/47101973
favorite count: 0
has comment: http://stackoverflow.com/comment/47101732
has comment: http://stackoverflow.com/comment/47101605
has comment: http://stackoverflow.com/comment/47101906
has answer: http://stackoverflow.com/a/29470305
has comment: http://stackoverflow.com/comment/47101866
has answer: http://stackoverflow.com/a/29470168
accepted answer: http://stackoverflow.com/a/29470168
upvote count: 3
has body: Folks, I have two text boxes in my html. I wanted to compare their values using coffee script. Although I have googled about it, and I am kind of sure that I am doing what is expected to do but still I see a strange behavior. Thing is : Lets say, I have two text boxes with id as "title" and "author". Along with that, I have a button which onclick triggers the coffee script function. My coffee script function looks as: check_fields = -&gt; elem_book_title = $("#title").val() elem_book_author = $("#author").val() alert(elem_book_title) alert(elem_book_author) if not elem_book_title? alert("title is null") else if not elem_book_author? alert("author is null") else alert("both are ok") Situation is, If I enter something only in my "title" textbox, it should alert me that "author is null". Right? But surprisingly, it alerts me that "both are ok".. Expected? Or I missed something?
has comment: http://stackoverflow.com/comment/47101656
has comment: http://stackoverflow.com/comment/47101693
type: Question
type: AnsweredQuestion
score: 3

http://stackoverflow.com/comment/46980808
comment on: http://stackoverflow.com/q/29402631
score: 0
has text: Doesn't `removeListener` take the listener itself as an argument?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47034569
has text: Is there line " " in response?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29429865

http://stackoverflow.com/comment/47152408
score: 0
type: Comment
type: QuestionComment
has text: @Legendary I think it's safe to assume he's not
comment on: http://stackoverflow.com/q/29496603

http://stackoverflow.com/a/29474875
has body: Try this, function filterValues() { for (var i = 0; i &lt; checkingValues.length; i++) { if(createCheckboxes.checked){ saveValues = checkbox; } } document.write(saveValues); }
answers question: http://stackoverflow.com/q/29474649
score: 0
type: Answer

http://stackoverflow.com/comment/47041975
score: 0
type: Comment
has text: I tested the pointer if I have it just alert traitRequireStat1[key] it returns the proper point in the array
comment on: http://stackoverflow.com/a/29436212
type: AnswerComment

http://stackoverflow.com/comment/46927803
type: QuestionComment
has text: looking at attempt 1, it should work if you JSON.stringify the fields parameter or params because it will try and insert an object if you don't. Your back end should expect a stringified json object though.
comment on: http://stackoverflow.com/q/29373568
score: 0
type: Comment

http://stackoverflow.com/a/29392064
has body: You should submit after your services get returned, I really don't see any code there that does that, and after you receive your service response, you submit your form. $('#register_index_button').click(function(){ $(this).addClass('bt_button_loader'); $(this).val('Please wait'); $(this).attr('disabled', 'disabled'); //it takes more than 5 seconds, display notice setTimeout(function() { $('#notice').html('Still waiting ...'); }, 5000); }); Place it when the service is retrieved, an ajax call, in complete method. $('#register_index_form').submit();
score: 0
answers question: http://stackoverflow.com/q/29391920
type: Answer
has comment: http://stackoverflow.com/comment/46961643

http://stackoverflow.com/comment/47201699
score: 0
has text: Where is the first code block running in? Is it inside a component's `render` method?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29523562

http://stackoverflow.com/q/29484169
type: Question
has answer: http://stackoverflow.com/a/29484292
downvote count: 0
possible better answer: http://stackoverflow.com/a/29484205
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29484237
linked to: http://stackoverflow.com/q/2659354
tagged with: jquery-events
answer count: 3
has body: I have the following code: The previous code attempts to scroll down after page loading. Is there any problem, as it doesn't work for me?
tagged with: asp.net
favorite count: 0
upvote count: 1
tagged with: php
has answer: http://stackoverflow.com/a/29484237
type: AnsweredQuestion
score: 1
has title: Best way to scrolldown onpageload
has answer: http://stackoverflow.com/a/29484205

http://stackoverflow.com/a/29496666
downvote count: 0
has comment: http://stackoverflow.com/comment/47159392
accepted answer of: http://stackoverflow.com/q/29496564
has comment: http://stackoverflow.com/comment/47152301
has comment: http://stackoverflow.com/comment/47152675
has comment: http://stackoverflow.com/comment/47152568
upvote count: 2
answers question: http://stackoverflow.com/q/29496564
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47152333
has comment: http://stackoverflow.com/comment/47152246
has body: You can try using this regex (edited to fail strings that have triple consecutive symbols): ^(?=.*[0-9])(?=.*[a-zA-Z])(?!.*(.)\1\1.*).{3,16}$ See example here.
type: Answer
has comment: http://stackoverflow.com/comment/47157423
score: 2

http://stackoverflow.com/comment/46972984
has text: Yes, please post a new question providing some code example.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29398414

http://stackoverflow.com/comment/47081200
has text: When The graph disappeared ? When you do what ?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29457937
type: Comment

http://stackoverflow.com/a/29472376
has comment: http://stackoverflow.com/comment/47183429
accepted answer of: http://stackoverflow.com/q/29470866
has comment: http://stackoverflow.com/comment/47184797
answers question: http://stackoverflow.com/q/29470866
type: AcceptedAnswer
downvote count: 0
score: 1
has body: This menu item can no longer be executed for security reasons.
has comment: http://stackoverflow.com/comment/47293024
type: Answer
has comment: http://stackoverflow.com/comment/47290549
upvote count: 1

http://stackoverflow.com/comment/47022007
score: 0
has text: So you say that this, $('div').css('background'); doesn't works for you?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29425329

http://stackoverflow.com/a/29393563
score: 1
has body: I think you are looking for somethink var PageStatistics = function (page) { this.myVariableName = ''; var mySecondVariable = ''; this.myFunctionName = function () { //some logic of operation this.myVariableName = 'something'; mySecondVariable = 'second something'; //now this will return refrence of myVariableName variable and myFunctionName function, not of mySecondVariable console.log(this); } } var test = new PageStatistics(); test.myFunctionName();
downvote count: 0
has comment: http://stackoverflow.com/comment/46963701
type: Answer
has comment: http://stackoverflow.com/comment/46986480
upvote count: 1
answers question: http://stackoverflow.com/q/29393315

http://stackoverflow.com/a/29459961
has comment: http://stackoverflow.com/comment/47083779
downvote count: 0
has body: The div is droped out of the browserwindow. Just give the div with the padding a box-sizing: border-box; and all is fine!
has comment: http://stackoverflow.com/comment/47083850
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29459911
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29459911

http://stackoverflow.com/comment/49880016
type: Comment
score: 2
has text: I feel like this did not answer the question, although the person who asked the question decided that this would work for them. Assume that the data model has no link to a template, and that the person asking the question meant exactly what his question asked: "What is the best way to detect what has changed in an array from using $watch?"
comment on: http://stackoverflow.com/a/29493640
type: AnswerComment

http://stackoverflow.com/q/29449066
tagged with: javascript
score: 0
type: AnsweredQuestion
has body: Attempting to write the armstrong function. I used chrome to debug and found that it bombs on val1 when I attempt to assign the result of pow . I tried with both array[element] and array[element].value but its not liking either. //Armstrong numbers function armstrong() { var numberStr = document.getElementById('inputNumber').value; var numberInt = parseInt(numberStr); var arrayOfNum = numberStr.split(''); var val1, val2, val3, total = 0; var displayResult = document.getElementById('displayResult'); for (i = 0; i &lt; arrayOfNum.length; i++) { arrayOfNum[i] = parseInt(arrayOfNum[i]); } if (arrayOfNum.length === 3) { val1 = Math.pow(arrayOfNum[0], 3); val2 = Math.pow(arrayOfNum[1], 3); val3 = Math.pow(arrayOfNum[2], 3); total = val1 + val2 + val3; if (total === numberInt) { //display msg that number is armstrong displayResult.innerHTML = "Your number " + numberInt + " is an Armstrong Number."; } else { //display msg that not armstrong displayResult.innerHTML = "Your number " + numberInt + " is NOT an Armstrong Number."; } } else { // display msg to enter a 3 digit number displayResult.innerHTML = "You must enter a 3 digit number."; } }
type: Question
has comment: http://stackoverflow.com/comment/47066243
has answer: http://stackoverflow.com/a/29449191
tagged with: pow
has title: javascript pow parameters - Armstrong Numbers
accepted answer: http://stackoverflow.com/a/29449191
answer count: 1
tagged with: arrays

http://stackoverflow.com/a/29448753
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/29447363
has body: The easiest way to do this is by using URL Rewrite. This does not require any coding in JS or server-side language. This can be done on most server softwares but the method is different depending on what server (IIS, Apache, nginx, etc.) you're using. Here's an article about URL Rewriting to help you get started.
upvote count: 1

http://stackoverflow.com/comment/47029654
comment on: http://stackoverflow.com/q/29428464
type: Comment
score: 1
type: QuestionComment
has text: @Khalid Thanks a lot, but I just wanted to find a way to make it work with all browsers to avoid some compatibility problems.

http://stackoverflow.com/comment/46940365
score: 0
comment on: http://stackoverflow.com/q/29380210
type: Comment
type: QuestionComment
has text: Also, your code would be easier to read if you assigned local variables to refer to each element in the array, so instead of `json_object[i]['meta_distributions'][j]` you just had `meta_dist` or similar. You should also be able to use [`.forEach(function (elementVar) { ... })`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) instead of the `for` loop to simplify this if you don't need to support anything older than IE9.

http://stackoverflow.com/comment/47150629
type: Comment
type: QuestionComment
has text: @TomerGal No, the jump happens before the dialogue loads.. and I'm not talking about the content changing, I'm talking about the browser needing to show scrollbars that is affecting the position of the page when the dialogue is opened.
comment on: http://stackoverflow.com/q/29495574
score: 0

http://stackoverflow.com/comment/47089874
score: 0
type: AnswerComment
type: Comment
has text: Do you mean that you want to retrieve the array stored in `localStorage` and then look over everything printing key and value?
comment on: http://stackoverflow.com/a/29463079

http://stackoverflow.com/comment/47156889
has text: @Snowman88, maybe you should post a live link or a jsfiddle link with just the problematic code, this would help immensely
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29498295
type: Comment

http://stackoverflow.com/a/37263638
score: 10
upvote count: 10
has comment: http://stackoverflow.com/comment/70313707
has comment: http://stackoverflow.com/comment/78890691
downvote count: 0
answers question: http://stackoverflow.com/q/29482477
has comment: http://stackoverflow.com/comment/81914283
has body: I think you can easily do that with CSS using @media print: If there is opened bootstrap modal window, will be printed content of modal (it can be more than one page), in other case content of window. @media print { /* on modal open bootstrap adds class "modal-open" to body, so you can handle that case and hide body */ body.modal-open { visibility: hidden; } body.modal-open .modal .modal-header, body.modal-open .modal .modal-body { visibility: visible; /* make visible modal body and header */ } } Also you can add button on footer of modal for printing: print modal content
type: Answer

http://stackoverflow.com/q/29379842
type: UnansweredQuestion
type: Question
has body: Basically, the problem is this: I have some code that adds an event listener to each button on a page. If a login cookie is not set, then the code triggers a Foundation modal using a Foundation-provided function. If the cookie IS set and the user is logged in, then the user is directed to their desired page. The problem is, I can't seem to fire the foundation code from my file, even though the foundation files are being included in the same page; everything else is working. What's going on? Here's the code: // Anonymous function wrapper (function () { // getting an array of all buttons on the page, based on a button class var button = document.getElementsByClassName('button'); // main function to run after ternary operator check (found at bottom) function run () { // cookieCheck() returns true/false depending on whether // the cookie is set var cookie = cookieCheck(), modal = document.getElementById('loginModal'), i, j = button.length; // looping through each button, applying an even listener for (i = 0; i &lt; j; ++i) { (function (i) { button[i].addEventListener('click', function (e) { var link = e.target.getAttribute('target'); if (cookie === false) { // Firing foundation function. PROBLEM IS HERE!!! $('#myModal').foundation('reveal', 'open'); } else { // if cookie is set, direct user to proper page e.target.href = link; } }, false); }(i)); } } // if buttons exist on the page, the function runs. // this prevents errors being thrown in the console on pages with no buttons button ? run() : false; }()); HTML (I didn't write this part, or the PHP, I just did the javascript here): &lt;?php wp_footer(); ?&gt; &lt;div id="loginModal" class="reveal-modal small" data-reveal&gt; &lt;?php gravity_form( 2, true, true, false, '', false ); ?&gt; &lt;a class="close-reveal-modal"&gt;&amp;#215;&lt;/a&gt;&lt;/div&gt; &lt;script&gt; (function($) { $(document).foundation(); })(jQuery); &lt;/script&gt; &lt;!-- This is the script in question /--&gt; &lt;script src="/static/themes/RWv3/…
has comment: http://stackoverflow.com/comment/46939581
has comment: http://stackoverflow.com/comment/46939618
has comment: http://stackoverflow.com/comment/46939559
tagged with: modal-dialog
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46939703
has comment: http://stackoverflow.com/comment/46939755
has comment: http://stackoverflow.com/comment/46939623
score: 0
has title: Can't access JQuery or Foundation functions from separate file?
tagged with: zurb-foundation
answer count: 0

http://stackoverflow.com/comment/47179991
type: QuestionComment
comment on: http://stackoverflow.com/q/29511873
type: Comment
score: 1
has text: try with ` `

http://stackoverflow.com/comment/46963352
score: 0
has text: thanks @SebastianBochan , I was considering some kind of "lazyload". I was really hoping that there may be some way that I could do this without having to add extra markup (which is usually a requirement for lazloading)..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29389571

http://stackoverflow.com/a/29495553
upvote count: 1
has body: This seems to work for me in (an old version of) Firefox: XML &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;?xml-stylesheet type="text/xsl" href="mystyle.xsl"?&gt; &lt;root&gt; &lt;description&gt;Article Containing Escaped Entitites&lt;/description&gt; &lt;content&gt;Lor&amp;amp;eacute;m ipsum &amp;amp;lsquo;dolor&amp;amp;lsquo; sit am&amp;amp;egrave;t, consectetuer adipiscing elit.&lt;/content&gt; &lt;/root&gt; mystyle.xsl &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:template match="/root"&gt; &lt;html&gt; &lt;body&gt; &lt;h2&gt;&lt;xsl:value-of select="description"/&gt;&lt;/h2&gt; &lt;p id="content"&gt; &lt;xsl:value-of select="content"/&gt; &lt;/p&gt; &lt;script&gt; var element = document.getElementById("content"); element.innerHTML = element.innerHTML.replace(/&amp;amp;amp;/g,'&amp;amp;'); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; Result (screenshot): Caveat: I am not a Javascript expert; this is just something I cobbled together on impulse.
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29487039
answers question: http://stackoverflow.com/q/29487039
type: Answer
has comment: http://stackoverflow.com/comment/47155431

http://stackoverflow.com/comment/47038491
comment on: http://stackoverflow.com/a/29419462
type: Comment
has text: I'm kinda at a loss here. Everything looks okay to me.
score: 0
type: AnswerComment

http://stackoverflow.com/a/29454847
upvote count: 26
downvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/29454824
has comment: http://stackoverflow.com/comment/47075850
answers question: http://stackoverflow.com/q/29454824
score: 25
has body: Have you looked at the website yet? It's full of examples - http://momentjs.com/ I think what you are trying to do is as simple as var startDate = moment(endDate).subtract(1, 'days'); Following your question more literally, you can do this: var endDate = moment(); //the current time Or, you can just ignore the endDate part of this problem and go straight to startDate with var startDate = moment().subtract(1, 'days'); //one day before the current time Finally, if you need to format it a certain way, you can apply a formatting rule such as: moment().subtract(1,'days').format('YYYY-MM-DD h:mm:ss a') Use format without an argument and it gives you ISO 8601 format moment().subtract(1,'days').format() //eg: "2015-04-04T01:53:26-05:00"
type: AcceptedAnswer

http://stackoverflow.com/comment/46984012
comment on: http://stackoverflow.com/q/29404271
score: 0
type: Comment
type: QuestionComment
has text: even to exclude, you need to iterate over all your img. I do not think you can do this by just sending a list/object to mongoose to check if exists

http://stackoverflow.com/a/29414108
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29414053
type: Answer
score: 14
has body: No, this is not possible. The html spec dictates that a &lt;script&gt; tag does one or the other. &lt;script&gt;Tag Html Spec, emphasis mine. The script may be defined within the contents of the SCRIPT element or in an external file. If the src attribute is not set, user agents must interpret the contents of the element as the script. If the src has a URI value, user agents must ignore the element's contents and retrieve the script via the URI.
upvote count: 14
has comment: http://stackoverflow.com/comment/47000799
accepted answer of: http://stackoverflow.com/q/29414053

http://stackoverflow.com/comment/47202065
has text: Also... the AJAX call is async, so even if it's before the call to applyBindings, it may not be complete yet. Add a boolean that you set after the callback from the AJAX call is complete. Only show the priont button once that boolean becomes true.
comment on: http://stackoverflow.com/a/29522938
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29412646
tagged with: http://stackoverflow.com/tag/html
tagged with: getelementbyid
tagged with: classname
tagged with: css
has title: Javascript:: Trigger firstChild element by class
answer count: 4
has answer: http://stackoverflow.com/a/29412935
type: AnsweredQuestion
upvote count: 3
accepted answer: http://stackoverflow.com/a/29412809
possible better answer: http://stackoverflow.com/a/29412775
type: Question
has answer: http://stackoverflow.com/a/29412775
has answer: http://stackoverflow.com/a/29412880
has comment: http://stackoverflow.com/comment/46998407
downvote count: 0
tagged with: javascript
has body: This code would speak for it self and explain what I'm trying to achieve... 1 2 Here is the jsFiddle : http://jsfiddle.net/hnfeje2q/ Very simple but since I'm new to JavaScript... Thanks!
favorite count: 0
has answer: http://stackoverflow.com/a/29412809
score: 3

http://stackoverflow.com/q/29381735
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has answer: http://stackoverflow.com/a/29382433
score: 0
has title: How can i use javascript to sort the tables by column? Can not use jquery here. I'm using javascript to load a table from an xml file
has comment: http://stackoverflow.com/comment/46942995
answer count: 1
type: UnansweredQuestion
has body: Select a table to view StudentHistory Using javascript the select option opens the student history table. How do I run a script on the table that loads to sort the columns of the table alphabetically or numerically. The stable table object has 6 columns which I would like to be able to sort alphabetically. Any suggestions? Can't use jquery. Can use JSON or javascript. Let me know if you' would like to see the whole code. Thank you StackOverflow.
tagged with: http://stackoverflow.com/tag/html
type: Question

http://stackoverflow.com/comment/47081089
type: Comment
has text: The graph disappeared again
comment on: http://stackoverflow.com/a/29457937
type: AnswerComment
score: 0

http://stackoverflow.com/a/29516450
score: 0
has body: I've created a jsFiddle here http://jsfiddle.net/h2rtLp9q/ $(document).ready(function(){ $("#test").delay(1000).fadeOut(1000, function(){ $('body').css('background','#000'); }); });
type: Answer
answers question: http://stackoverflow.com/q/29516319

http://stackoverflow.com/q/29385081
type: Question
favorite count: 0
has title: No option for Image upload from the computer in CKEditor
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/29909002
tagged with: c#
has answer: http://stackoverflow.com/a/29385293
has body: I have downloaded the CK Editor from CKEditor site. There are many features available on their site which works properly when I integrated into my site. But, there is no feature available to upload image from the local computer. Is there any easiest way to integrate this. The below is the way, I implemented the code. &lt;%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %&gt; AND &lt;CKEditor:CKEditorControl ID="txtPagedesc" BasePath="/ckeditor/" runat="server"&gt; &lt;/CKEditor:CKEditorControl&gt; Please help
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/79054359
tagged with: ckeditor
tagged with: asp.net

http://stackoverflow.com/comment/47159169
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29499880
has text: yea I saw that works on another so question. But I thought importing the certificate would make it so I didn't have to do that.
score: 0

http://stackoverflow.com/a/29489021
upvote count: 3
has comment: http://stackoverflow.com/comment/47137999
has comment: http://stackoverflow.com/comment/47142711
has comment: http://stackoverflow.com/comment/47142982
has comment: http://stackoverflow.com/comment/47261566
type: AcceptedAnswer
has body: as general tip, you can access to the last response with String responseTxt = tester.getLastResponse().getDocument(); then you can check what has been returned to client.
downvote count: 0
answers question: http://stackoverflow.com/q/29488078
type: Answer
accepted answer of: http://stackoverflow.com/q/29488078
score: 3

http://stackoverflow.com/comment/47050955
type: Comment
comment on: http://stackoverflow.com/q/29441326
score: 0
type: QuestionComment
has text: If you only need it for one website: http://stackoverflow.com/questions/426825/inspect-the-referrer-in-php ?

http://stackoverflow.com/q/29382656
has answer: http://stackoverflow.com/a/29531594
accepted answer: http://stackoverflow.com/a/29504742
has comment: http://stackoverflow.com/comment/47163724
has comment: http://stackoverflow.com/comment/47053163
downvote count: 0
has answer: http://stackoverflow.com/a/29458460
has comment: http://stackoverflow.com/comment/47053100
favorite count: 0
has comment: http://stackoverflow.com/comment/47162921
linked to: http://stackoverflow.com/q/27881485
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47068725
has comment: http://stackoverflow.com/comment/47053027
score: 11
has comment: http://stackoverflow.com/comment/47062959
has body: We've been using protractor for end-to-end testing for a while. Now we are trying to cover several corner cases, which involve modifying the response from the API endpoint requests - for this we are using protractor-http-mock which provides an easy-to-use way to replace HTTP responses with pre-defined mocks. But, what if we want to test a situation when a sudden connection loss happens? What are our options in this case? In other words, we want to achieve a case when requests to specific endpoints would produce a network connection error and see how our application would react. I'm open to any suggestions, I am currently thinking of the following strategies: see if there are third-party nodejs libraries similar to protractor-http-mock mock $http angularjs service fire up a proxy and somehow control it during the tests (grunt-connect-proxy looks pretty mature though I'm not sure if it is possible to dynamically change the behavior of the proxy from spec to spec) control it on a browser level - e.g. with a Network Throttling google chrome feature (though I'm pretty sure it is something that selenium cannot control, Network throttling with chrome and selenium) (browser addon/extension?)
has comment: http://stackoverflow.com/comment/47052770
answer count: 4
has title: Simulate connection errors
has comment: http://stackoverflow.com/comment/47090530
upvote count: 11
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29504742
possible better answer: http://stackoverflow.com/a/29524008
tagged with: selenium
has comment: http://stackoverflow.com/comment/47162581
has answer: http://stackoverflow.com/a/29524008
type: Question
tagged with: testing
tagged with: protractor
tagged with: javascript
has comment: http://stackoverflow.com/comment/47163699

http://stackoverflow.com/q/29491867
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/47143032
score: 0
has comment: http://stackoverflow.com/comment/47144173
has body: I am using the following javascript to allow me to highlight a tr row when clicking on it $(document).ready(function () { $('tr').click(function () { if(this.style.background == "" || this.style.background =="white") { $(this).css('background', '#D3D3D3'); } else { $(this).css('background', 'white'); } }); }); $('table tr').click(rowclick) This works fine here. But if I select this, it does not work and I cant understand why as it uses the same code the full JavaScript is as follows var ie = document.all var ns = document.getElementById &amp;&amp; !ie function rowclick(e) { var obj = ns ? e.target : event.srcElement if (obj.tagName=="TD") { obj.onblur=function() { } } } $(document).ready(function () { $('tr').click(function () { if(this.style.background == "" || this.style.background =="white") { $(this).css('background', '#D3D3D3'); } else { $(this).css('background', 'white'); } }); }); $('table tr').click(rowclick) document.onclick=rowclick google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ &lt;?php echo $data; ?&gt; ]); var data2 = google.visualization.arrayToDataTable([ &lt;?php echo $datagoing; ?&gt; ]); var options = { backgroundColor: 'transparent', legend: 'none', height: '100px', width: '100px', chartArea: { height :"95%", width:"95%" }, }; var options2 = { backgroundColor: 'transparent', legend: 'none', height: '100px', width: '100px', chartArea: { height :"95%", width:"95%" }, }; var chart = new google.visualization.PieChart(document.getElementById('piechart&lt;?php echo $loop ?&gt;')); chart.draw(data, options); var chart2 = new google.visualization.PieChart(document.getElementById('piechartgoing&lt;?php echo $loop ?&gt;')); chart2.draw(data2, options2); }
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47143674
has title: JavaScript only working on some pages
has comment: http://stackoverflow.com/comment/47142986
has comment: http://stackoverflow.com/comment/47142817
answer count: 0

http://stackoverflow.com/q/29407496
has answer: http://stackoverflow.com/a/29407683
score: 0
has title: Javascript validation onblur
has comment: http://stackoverflow.com/comment/46989186
type: Question
has answer: http://stackoverflow.com/a/29407722
answer count: 3
tagged with: javascript
has body: I have written same javascript twice for two textboxes but it runs both the scripts for one text box i need to write once and call the same for more text boxes function checkalphabets() { var pattern = /^[a-zA-Z\s]+$/; if (!pattern.test(myTextBox.value)) { modal({ type: 'warning', title: 'Warning', text: 'Only Alphabets allowed!', center: false, callback: function(){ $("#myTextBox").focus();} }); exit; return false; } return true; } function checkalphabets1() { var pattern = /^[a-zA-Z\s]+$/; if (!pattern.test(TextBox1.value)) { modal({ type: 'warning', title: 'Warning', text: 'Only Alphabets allowed!', center: false, callback: function(){ $("#TextBox1").focus();} }); exit; return false; } return true; } $('.modal-btn').click(function() { $('#modal-window').hide(); }); here is the fiddle
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29407673

http://stackoverflow.com/q/29492597
tagged with: javascript
has comment: http://stackoverflow.com/comment/47145025
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Onchange show div, hide previous ones selected
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29494581
has comment: http://stackoverflow.com/comment/47145093
tagged with: forms
accepted answer: http://stackoverflow.com/a/29494581
type: Question
has body: I have a script that selects stores from states and cities and show them in different divs. The problem I'm having is that when another city is selected, the previous div still show, but they should be hidden. Here's my script: function showStores(state) { if (state == 'SS') { document.getElementById(document.getElementById('citySS').value).style.display = ''; document.getElementById('citySS').selectedIndex = 0; } else if (state == 'ZZ') { document.getElementById(document.getElementById('cityZZ').value).style.display = ''; document.getElementById('cityZZ').selectedIndex = 0; } } - city 1 city 2 - city 3 city 4 content 1 content 2 content 3 content 4 http://jsfiddle.net/6h9mLw6f I appreciate any help, thank you!

http://stackoverflow.com/q/29399856
has body: A sample of my code for handling routes: app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function ($stateProvider, $urlRouterProvider, $locationProvider) { $stateProvider .state( ... ) .state( ... ) .state( ... ) $urlRouterProvider.otherwise('/'); $locationProvider .html5Mode(true) .hashPrefix('!'); }]); I am able to verify that $locationProvider is working insofar as commenting out .hashPrefix('!') succeeds in removing the bang from the URL, but no matter what I do, nothing seems to actually enable html5Mode; the hash always remains. I used the Yeoman gulp-angular generator (rather, generator-gulp-angular, https://github.com/Swiip/generator-gulp-angular) and have tried changing up the settings for how my server works, but nothing I've tried there has worked yet.
score: 0
tagged with: gulp
has comment: http://stackoverflow.com/comment/46975661
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46975791
tagged with: html5-history
answer count: 0
type: Question
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/47249998
tagged with: javascript
has title: Angular html5Mode not working with ui-router and Gulp

http://stackoverflow.com/a/58761402
answers question: http://stackoverflow.com/q/29447715
type: Answer
has body: Suggestion 1 => Body with fixed footer ...Header or Body ...Footer Edit 2 => Body & Fixed footer with tabs ...Header or Body ...Home ...Settings Notes import {TouchableOpacity} from 'react-native' Advantages We can use this simple footer without react bottom navigation
upvote count: 5
score: 5
downvote count: 0

http://stackoverflow.com/comment/46938451
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29379195
has text: Try to pass Date object instead of string.
score: 0

http://stackoverflow.com/comment/47142711
score: 0
type: AnswerComment
has text: This gives something and is kinda right solution. Mine just did not give here anything useful, because last page has a waiting icon scrolling on the place of data, when I take the document. Maybe a timer to wait some seconds would help, or I bypass this test as impossible.
type: Comment
comment on: http://stackoverflow.com/a/29489021

http://stackoverflow.com/q/29489686
has title: Need Advice ( Javascript / dynamic CSS properties )
score: 0
has comment: http://stackoverflow.com/comment/47138565
has comment: http://stackoverflow.com/comment/47138530
type: UnansweredQuestion
has body: In my program, I have some links that go inline, across the top of the page. [Link A, Link B, Link C, etc...] The text is variable, so any time it is changed, the script checks the width to make sure it doesn't overflow out of the menu area, if it does then it will adjust the font size and padding. The font size is also adjustable manually. Everything is working fine, but I realized that as the font size changes, the text is no longer centered vertically. The link menu is 60 pixels high, and the tags display as blocks, with a padding to make the text display in the middle of the block. I'm trying to figure out the math behind calculating the padding for the top and bottom of the links to center them no matter what font and size it is. The closest I am getting is taking the height of the menu X = 60, the height of the text (I've been using the font size which seems more accurate than when I put the text in a span and measure the computed height of the span), lets say 20px, then I subtract the text height from the menu height, which leaves 40px for padding which I split in half, and have 20px on top and bottom of 20px font-size text. This looks perfect, and it centers perfect. Another example is 16px and 22px padding top and bottom, it works good, and appears to be centered in the menu. font-size:16px padding-top/padding-bottom:22px http://gyazo.com/7450c7db2887d731549c0edae5cb5c2b Now the problem: When the font size gets bigger, for example: 32px font size, padding top and bottom 14. It seems like the top of the text starts at the same Y position as the smaller text, making it appear to align more to the bottom. font-size:32px padding-top/padding-bottom:14px (32+14+14=60) http://gyazo.com/513698b87fdc45498aea1bf6694ecefc font-size:25px padding-top/padding-bottom:17.5px ( more than two links not allowed ) (This link was not allowed, but it starts showing quite a bit around font size 25 that its aligning more toward the bottom. One other thing to keep in mind is the or…
answer count: 0
tagged with: javascript
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47145649
tagged with: css
has comment: http://stackoverflow.com/comment/47139181

http://stackoverflow.com/q/29443894
has title: dynamic text length limit based on div width
tagged with: angularjs
has answer: http://stackoverflow.com/a/29444086
type: AnsweredQuestion
upvote count: 5
has comment: http://stackoverflow.com/comment/47055691
type: Question
accepted answer: http://stackoverflow.com/a/29444086
score: 5
downvote count: 0
answer count: 1
tagged with: javascript
has body: I am having a div which will be having dynamic width, based on the width I have to restrict the content within that div,I have created a filter which will cut the text and append "..." to the end of the string, but the issue is how we can assign the limit based on the dynamic width size my code is as given below JSFiddle html &lt;div ng-app="app" ng-controller="MainCtrl"&gt; &lt;div class="test" ng-style="myStyle"&gt;&lt;/div&gt; &lt;/div&gt; script angular.module('app', []) .controller('MainCtrl', function ($scope) { $scope.myStyle={}; $scope.myStyle.width = "150px"; $scope.value= "My value is anythinggggggggggggggggg"; }) .filter('splice', function () { return function (value, max, tail) { if (!value) return ''; max = parseInt(max, 10); if (!max) return value; if (value.length &lt;= max) return value; value = value.substr(0, max); return value + (tail || ' …'); }; });
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29495492
has answer: http://stackoverflow.com/a/29496500
has comment: http://stackoverflow.com/comment/47150807
has comment: http://stackoverflow.com/comment/47151834
has comment: http://stackoverflow.com/comment/47150923
answer count: 4
has comment: http://stackoverflow.com/comment/47151115
has comment: http://stackoverflow.com/comment/47151014
has title: compare object value with length of array in an object with javascript
has comment: http://stackoverflow.com/comment/47154537
type: Question
has answer: http://stackoverflow.com/a/29495843
accepted answer: http://stackoverflow.com/a/29495843
type: AnsweredQuestion
has body: EDIT: SOLVED See final solution below EDIT: The value names are not the same object 1 var obj1 = { val1a : 4, val2a : 3 , val3a : 7 } object 2 with arrays var obj2 = { val1b : [one, two, three], val2b : [oneA, twoA, threeA], val3b : [oneB] } I am trying to do is the following if(obj1.val1a === obj2.val1b.length){ // code } but I do not want it to be so specific. Is there a way to loop over each object and return the values of obj2 that do not match obj1 SOLUTION with underScore function checkData(obj1, obj2) { result = [] var keys_obj1 = Object.keys( obj1) var keys_obj2 = Object.keys( obj2) _.each(keys_obj1, function(num, i){ if(obj1[keys_obj1[i]].length !== obj2[keys_obj2[i]]) { result.push(keys_obj1[i]); } }) return result; }
has comment: http://stackoverflow.com/comment/47150298
has answer: http://stackoverflow.com/a/29495677
has comment: http://stackoverflow.com/comment/47150140
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29495664
has answer: http://stackoverflow.com/a/29495664
score: 0
has comment: http://stackoverflow.com/comment/47161728

http://stackoverflow.com/comment/47083730
has text: It depends what exactly do you want to do with this other data. Can you describe what do you want to have?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29458776
type: Comment

http://stackoverflow.com/comment/47121192
type: QuestionComment
has text: you're sorting as strings, and `'1' < '9'` is TRUE. You need to conver those strings to integers.
score: 0
comment on: http://stackoverflow.com/q/29480252
type: Comment

http://stackoverflow.com/q/29375526
has answer: http://stackoverflow.com/a/29379444
has comment: http://stackoverflow.com/comment/46932757
score: 2
type: AnsweredQuestion
has body: I've got a problem using React JS and canvas together. everything seems to work smooth, but when render method is called due to changes in other part of my app canvas flicker. It seems that react is re-appending it into the DOM (maybe because I'm playing an animation on it and its drawn frame is different each time). This is my render method: render: function() { var canvasStyle = { width: this.props.width }; return ( &lt;canvas id="interactiveCanvas" style={canvasStyle}/&gt; ); } As a temporal solution I append my canvas tag manually, without reactjs: render: function() { var canvasStyle = { width: this.props.width }; return ( &lt;div id="interactivediv3D"&gt; &lt;/div&gt; ); } And then: componentDidMount: function() { var canvasStyle = { width: this.props.width }; var el = document.getElementById('interactivediv3D'); el.innerHTML = el.innerHTML + '&lt;canvas id="interactive3D" style={'+canvasStyle+'}/&gt;'; }, And it works right. But I think this is not a clean way and it's better to render this canvas tag using reactjs. Any idea of how can I solve the problem? or at least avoiding reactjs re-rendering this canvas when only the drawn frame changed.
downvote count: 0
has answer: http://stackoverflow.com/a/29489612
accepted answer: http://stackoverflow.com/a/29489612
type: Question
has answer: http://stackoverflow.com/a/70366065
has comment: http://stackoverflow.com/comment/127393470
upvote count: 2
tagged with: reactjs
tagged with: canvas
answer count: 3
has title: Canvas flickering when reactjs re-renders
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29379444

http://stackoverflow.com/comment/47223593
type: Comment
has text: @arthur.sw answer reworded
comment on: http://stackoverflow.com/a/29399691
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47092000
has text: you can build smaller, more re-usable pieces using either framework.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29463949

http://stackoverflow.com/comment/46947958
type: QuestionComment
comment on: http://stackoverflow.com/q/29384700
has text: Thank you although, I have not learned objects yet, could there be another way to do this?
score: 0
type: Comment

http://stackoverflow.com/comment/47005176
type: Comment
type: QuestionComment
has text: Did you try setting cookies without '; expires=0' when 0 is set as expiry days ?
comment on: http://stackoverflow.com/q/29416271
score: 0

http://stackoverflow.com/a/29381322
answers question: http://stackoverflow.com/q/29381262
has body: Try removing the } at the end of your code (line 21) and place it on line 12 instead. Fixed code: 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 { return "paper wins"; } } else if(choice1 === "paper") { if (choice2 === "rock") { return "paper wins"; } else { return "scissors wins"; } } };
has comment: http://stackoverflow.com/comment/46942242
has comment: http://stackoverflow.com/comment/46942206
score: 0
accepted answer of: http://stackoverflow.com/q/29381262
type: AcceptedAnswer
type: Answer

rsvp.js
type: Tag
tag name: rsvp.js
tags question: http://stackoverflow.com/q/29396079

http://stackoverflow.com/a/29474674
has body: It seems that in case of integers (and actually for strings as well) I should be passing the numbers via {} like so: React.render(&lt;Rectangle intValue={10} stringValue={"Hello"} /&gt;, document.getElementById('container'));
upvote count: 87
has comment: http://stackoverflow.com/comment/69937044
score: 87
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29474673
type: Answer
answers question: http://stackoverflow.com/q/29474673
has comment: http://stackoverflow.com/comment/69936345

http://stackoverflow.com/comment/47050417
type: Comment
type: QuestionComment
has text: Where does 'form' come from in the JS, are you setting it to something before it shows up in the code you've pasted here?
score: 0
comment on: http://stackoverflow.com/q/29440871

http://stackoverflow.com/comment/47075916
comment on: http://stackoverflow.com/a/29455295
score: 0
type: AnswerComment
type: Comment
has text: @James123 if, as you say "control is not coming back" after loading the partial, I suppose there must be some error in the partial that halts further execution. If you placed an `alert()` right after `$('#DivPhoneNBRContainer').html(data);`, does it not fire?

http://stackoverflow.com/comment/47047423
score: 0
type: AnswerComment
has text: in the image you shared, did you see that the value of textStatus is "success"? I think you can use this for your success condition. Please see the update in my code. This status shows that your ajax run successfully.
type: Comment
comment on: http://stackoverflow.com/a/29437992

http://stackoverflow.com/comment/47055895
comment on: http://stackoverflow.com/q/29444210
type: Comment
type: QuestionComment
has text: regular string concatenation -> `$('#item'+x+' .list').remove();`
score: 5

http://stackoverflow.com/comment/47119514
comment on: http://stackoverflow.com/q/29479411
score: 0
type: Comment
type: QuestionComment
has text: Is the error occurring in the 3rd party script or the code above?

kendo-treeview
tags question: http://stackoverflow.com/q/29529172
tag name: kendo-treeview
tags question: http://stackoverflow.com/q/29493833
type: Tag

http://stackoverflow.com/q/29452870
favorite count: 0
has comment: http://stackoverflow.com/comment/47071496
has answer: http://stackoverflow.com/a/29452940
upvote count: 2
possible better answer: http://stackoverflow.com/a/29452931
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29452931
has answer: http://stackoverflow.com/a/29453004
has title: Match an input text with a value of an option and auto select it
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29453009
score: 1
downvote count: 1
type: Question
has body: I have an input field and a select tag like the following: .com .net .org User enters a domain name, select a tld (domain extension) from the list, then check for domain. It won't work if the user insert (mynewdomain.com) in the input field, for example. The user must separately insert domain name in the input and select an extension from the list without putting it in the input field, otherwise an error will occur. I will hide the select tag, so I need to do the following on click of the check button: Make the input match and call an extension from the select option by its value when the user insert a domain name. For example, if the user inserts (mynewdomain.com), then it should auto select that extension from the option list by its value ".com". Delete the extension from the input field (.com, .net, etc.) that was added by the user. Then sending to server... Updated JSFiddle example explains what I'm trying to do. How can I achieve this using JavaScript or jQuery? I'd greatly appreciate it if anyone can help me with an answer. Note: PHP is encrypted, I can only workaround with JavaScript and jQuery.
tagged with: javascript
tagged with: jquery
answer count: 6
has answer: http://stackoverflow.com/a/29453009
has answer: http://stackoverflow.com/a/29452955
has answer: http://stackoverflow.com/a/29453097

http://stackoverflow.com/a/29502650
has comment: http://stackoverflow.com/comment/47288348
type: Answer
has comment: http://stackoverflow.com/comment/47299566
answers question: http://stackoverflow.com/q/29501631
has body: Search for '// Update the content' and put it after that code.
has comment: http://stackoverflow.com/comment/47307422
has comment: http://stackoverflow.com/comment/47293138
has comment: http://stackoverflow.com/comment/47288873
score: 0

http://stackoverflow.com/comment/46999571
has text: Use `console.dir()` to dump out that object you're passing to `new google.maps.Marker`
comment on: http://stackoverflow.com/q/29413400
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/90833829
comment on: http://stackoverflow.com/a/33906234
type: Comment
score: 1
type: AnswerComment
has text: mcrypt_decrypt function will be removed on php v7.2. Any alternative? how would it be ?

http://stackoverflow.com/q/29512519
has title: Javascript output functions other than console.log
has answer: http://stackoverflow.com/a/30922127
tagged with: javascript
has comment: http://stackoverflow.com/comment/47180769
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29512593
has comment: http://stackoverflow.com/comment/47180717
tagged with: jsbin
has comment: http://stackoverflow.com/comment/47180716
favorite count: 0
type: Question
answer count: 2
upvote count: 1
has body: Am using JS Bin and am just starting to study Javascript. In the book am using the output is shown using console.log(function). That does not show anything, and am being forced to use alert(function) to see the output. Are there any other ways i can see the output in JS Bin. Also where exactly does console.log output it, cos command prompt does not show anything.
score: 0
downvote count: 1

source-maps
type: Tag
tag name: source-maps
tags question: http://stackoverflow.com/q/29434386
tags question: http://stackoverflow.com/q/29463252

http://stackoverflow.com/a/29511878
score: 0
type: Answer
has body: No, there are such means to hide button while playing video. The code associated with the iphone are locked and it cant be modified by user
upvote count: 1
answers question: http://stackoverflow.com/q/29511828
downvote count: 1

http://stackoverflow.com/comment/46958295
comment on: http://stackoverflow.com/a/29390445
has text: When I added the parenthese after emp_first_name it gave me this error SyntaxError: expected expression, got '===' @Legendary
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47169155
comment on: http://stackoverflow.com/a/29505892
has text: @FoxyCode sorry... what do you mean..... can you edit the fiddle to recreate your scenario
score: 0
type: AnswerComment
type: Comment

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/29443875
tags question: http://stackoverflow.com/q/29400046
type: Tag

http://stackoverflow.com/comment/47044647
has text: Easy way to think about it. Imagine that it takes 10 seconds before the config file is loaded, but everything else will run right away. If you think about it that way, it will become obvious that you can only call the functions that need access to the config file after you are SURE that the load config has been loaded. This is why we use callbacks and promises in javascript.
comment on: http://stackoverflow.com/a/29437734
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47073045
comment on: http://stackoverflow.com/q/29453794
score: 0
type: Comment
type: QuestionComment
has text: Or, if you want to use jQuery `$("#userAge").val()`

http://stackoverflow.com/comment/47032269
has text: I m getting "TransactionId" in php file after sending data from c#. Here no issues. but the code written within if (isset($_POST["RoleId"])) {} did not reach. Either the ajaxcall function is not invoking or the same page redirection is not happening when I call from c# windows application. Please advice me how to resolve this.
type: AnswerComment
comment on: http://stackoverflow.com/a/29429865
score: 0
type: Comment

communication
tag name: communication
type: Tag
tags question: http://stackoverflow.com/q/29411733

http://stackoverflow.com/q/29527190
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: I have been trying to compile latest V8 for android and was able to build static version following this post: Android NDK linking V8 static library: cannot find symbols, but they are there However, i still get plenty of errors when i try to use this with my JNI code. /depot_tools/v8/out/android_arm.release/obj.target/tools/gyp/libv8_base.a(api.o):api.cc:function v8::CheckConstructor(v8::internal::Isolate*, v8::internal::Handle&lt;v8::internal::JSObject&gt;, char const*): error: undefined reference to 'V8_Fatal' /depot_tools/v8/out/android_arm.release/obj.target/tools/gyp/libv8_base.a(api.o):api.cc:function v8::Utils::ReportApiFailure(char const*, char const*): error: undefined reference to 'v8::base::OS::PrintError(char const*, ...)' /depot_tools/v8/out/android_arm.release/obj.target/tools/gyp/libv8_base.a(assembler.o):assembler.cc:function v8::internal::ExternalReference::SetUp(): error: undefined reference to 'v8::base::Mutex::Mutex()' /depot_tools/v8/out/android_arm.release/obj.target/tools/gyp/libv8_base.a(assembler.o):assembler.cc:function v8::internal::ExternalReference::InitializeMathExpData(): error: undefined reference to 'v8::base::Mutex::Unlock()' /depot_tools/v8/out/android_arm.release/obj.target/tools/gyp/libv8_base.a(assert-scope.o):assert-scope.cc:function v8::internal::PerThreadAssertScope&lt;(v8::internal::PerThreadAssertType)0, false&gt;::PerThreadAssertScope(): error: undefined reference to 'v8::base::CallOnceImpl(int*, void (*)(void*), void*)' : * Working Steps* Some more tips for building it right: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git export PATH=`pwd`/depot_tools:"$PATH" fetch v8 make android_arm.release i18nsupport=off component=static_library -j8 Thats it, no need to build standalone_static_library. In android.mk file add following dependecies: libv8_base.a libv8_libbase.a libv8_libplatform.a libv8_nosnapshot.a
tagged with: android
score: 2
has comment: http://stackoverflow.com/comment/47291826
answer count: 0
tagged with: v8
has comment: http://stackoverflow.com/comment/47291367
type: Question
upvote count: 2
tagged with: java-native-interface
tagged with: javascript
has title: V8 on android: error: undefined reference to 'V8_Fatal'
linked to: http://stackoverflow.com/q/24279237

http://stackoverflow.com/comment/107300775
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/60648929
has text: Consider explain your answer to question owner

http://stackoverflow.com/a/29388339
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
has body: The documentation how animations work is still in progress. There are currently two ways to do the animation. Velocity.js The easiest way is to use a library like velocity.js. For this to work you need to: Add the velocity.js script to the page Change h("div#popup") to h("div#popup", {enterAnimation: fadeIn}) Add the following javascript function Code: var fadeIn = function(element) { element.style.opacity = 0; Velocity.animate(element, {opacity: 1}, 1500, "ease-out"); }; You can view the result here. CSS Transitions You can also use CSS transitions. They work the same as angularJS and react. You need to do the following: Include the css-transitions.min.js script in your page. This script is also provided by maquette. Change h("div#popup") to h("div#popup", {enterAnimation: "fadeIn"}) Change the createProjector call to maquette.createProjector(document.body, renderMaquette, {transitions: cssTransitions}); Add the following style declarations to the stylesheet: Stylesheet: .fadeIn { -webkit-transition: 0.5s ease-out opacity; transition: 0.5s ease-out opacity; opacity: 0; } .fadeIn.fadeIn-active { opacity: 1; } You can view the result here
has comment: http://stackoverflow.com/comment/48520212
answers question: http://stackoverflow.com/q/29386710
accepted answer of: http://stackoverflow.com/q/29386710
score: 2

http://stackoverflow.com/comment/47033372
type: AnswerComment
has text: This looks like a comment on the question not an attempt at an answer; please post it as such or rewrite how you are answering.
type: Comment
comment on: http://stackoverflow.com/a/29429032
score: 1

http://stackoverflow.com/comment/46935796
type: Comment
has text: Thanks, excellent answer! Makes perfect sense now that you explained it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29377423

http://stackoverflow.com/comment/47012251
comment on: http://stackoverflow.com/q/29420179
type: Comment
score: 0
has text: Not Working.. with also putting SEMI COLON
type: QuestionComment

http://stackoverflow.com/comment/46990435
comment on: http://stackoverflow.com/q/29408268
score: 0
type: Comment
type: QuestionComment
has text: You are actually drawing both your charts in the same ` `. Is that normal?

http://stackoverflow.com/q/29471947
has answer: http://stackoverflow.com/a/29472237
answer count: 1
tagged with: javascript
score: 0
tagged with: angularjs
has body: i have the following directive: angular.module('ui.jq', ['ui.load']). value('uiJqConfig', {}). directive('uiJq', ['uiJqConfig', 'JQ_CONFIG', 'uiLoad', '$timeout', function uiJqInjectingFunction(uiJqConfig, JQ_CONFIG, uiLoad, $timeout) { return { restrict: 'A', compile: function uiJqCompilingFunction(tElm, tAttrs) { if (!angular.isFunction(tElm[tAttrs.uiJq]) &amp;&amp; !JQ_CONFIG[tAttrs.uiJq]) { throw new Error('ui-jq: The "' + tAttrs.uiJq + '" function does not exist'); } var options = uiJqConfig &amp;&amp; uiJqConfig[tAttrs.uiJq]; return function uiJqLinkingFunction(scope, elm, attrs) { function getOptions(){ var linkOptions = []; // If ui-options are passed, merge (or override) them onto global defaults and pass to the jQuery method if (attrs.uiOptions) { linkOptions = scope.$eval('[' + attrs.uiOptions + ']'); if (angular.isObject(options) &amp;&amp; angular.isObject(linkOptions[0])) { linkOptions[0] = angular.extend({}, options, linkOptions[0]); } } else if (options) { linkOptions = [options]; } return linkOptions; } // If change compatibility is enabled, the form input's "change" event will trigger an "input" event if (attrs.ngModel &amp;&amp; elm.is('select,input,textarea')) { elm.bind('change', function() { elm.trigger('input'); }); } // Call jQuery method and pass relevant options function callPlugin() { $timeout(function() { elm[attrs.uiJq].apply(elm, getOptions()); }, 0, false); } function refresh(){ // If ui-refresh is used, re-fire the the method upon every change if (attrs.uiRefresh) { scope.$watch(attrs.uiRefresh, function() { callPlugin(); }); } } if ( JQ_CONFIG[attrs.uiJq] ) { uiLoad.load(JQ_CONFIG[attrs.uiJq]).then(function() { callPlugin(); refresh(); }).catch(function() { }); } else { callPlugin(); refresh(); } }; } }; }]); The function to note here is the following: function refresh(){ // If ui-refresh is used, re-fire the the method upon every change if (attrs.uiRefresh) { scope.$watch(attrs.uiRefresh, function() { callPlugin(); }); } } Then i ha…
has title: directive $watch does not trigger on change
type: UnansweredQuestion
tagged with: directive
type: Question
has comment: http://stackoverflow.com/comment/47105972

http://stackoverflow.com/comment/47142149
score: 0
has text: What should I do, Guys ?? You both are great programmers. I first accepted his answer only. Plz don't fight over this. Forgive me...
type: Comment
comment on: http://stackoverflow.com/a/29490791
type: AnswerComment

http://stackoverflow.com/comment/47392009
type: QuestionComment
comment on: http://stackoverflow.com/q/29452031
has text: I mean that the file data is not on the client (browser); the file is hosted on the same domain and I have control of the backend. I will update the question to make it less ambiguous.
score: 0
type: Comment

http://stackoverflow.com/q/29397188
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29400331
has answer: http://stackoverflow.com/a/29404995
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: Add text to textbox when check if radio box is selected
upvote count: 1
has answer: http://stackoverflow.com/a/29399532
answer count: 4
has answer: http://stackoverflow.com/a/29400331
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29400349
score: 1
type: Question
has body: I am trying to make a little project for myself in order to better understand javascript. Not looking to be an expert just have a better understanding. I am making a dilution calculator and I am wondering what the best way to insert the units (either oz or mL) into the input boxes and output divs based on whether or not a radio is selected. I would like this to automatically happen on the page load as well as on change of the radio. oz mL Here is how I have the HTML setup for the radio buttons I am also wondering what the best way to not have NaN show up when you select the mL radio before entering any values. I was thinking an if statement to check if the value of the first box was zero than do not run the convert function. I am open to ideas here. Here is what I currently have, keep in mind that about 48 hours ago I had never worked with Javascript JSFiddle I am all for learning how to do this so if you have any good links on the subject let me know. Thanks so much for your help. I appreciate it.
has answer: http://stackoverflow.com/a/29400349

http://stackoverflow.com/comment/46951016
type: QuestionComment
has text: In Internet Explorer ?
comment on: http://stackoverflow.com/q/29386207
score: 0
type: Comment

http://stackoverflow.com/comment/47273110
has text: Ok, then use solution (a) of my answer. I updated the link to fiddle.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29423577

tcp
type: Tag
tags question: http://stackoverflow.com/q/29461972
tag name: tcp

http://stackoverflow.com/q/29497123
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/29497705
has body: I'm looking for the best way to have display state that can be toggled via a button on the page, but that can also be overridden based on a media query. On large screens I want to default to a horiz layout, and provide the choice to toggle a vert layout instead. On smaller screens, I want to default to the vert layout and not allow the toggle. My current solution relies on cascading to override styles in the stylesheet which I would like to avoid since it requires my styles to be in a specific order. HTML: Apply a default layout of layout--horiz. layout is also applied in order to override the specific layouts with @media queries. Toggle This is a test CSS: In the @media query for small screens: hide the toggle, and hardcode the vert styles to the layout style to override the layout--horiz if applied. #btn { display: block; } .layout--horiz p { display: inline; } .layout--vert p { display: block; } @media screen and (max-width: 600px) { #btn { display: none; } .layout p { display: block; } } JS: Toggle the specific --horiz and --vert classes on button click. $('#btn').click(function() { $('#layout').toggleClass('layout--vert layout--horiz'); }); This solution works decently, but I'm wondering if there is a better way to accomplish this. Note: Here is a codepen to play with.
has answer: http://stackoverflow.com/a/29497705
tagged with: javascript
has comment: http://stackoverflow.com/comment/47153290
has title: Toggle Display State with Button and Media Query
has comment: http://stackoverflow.com/comment/47153611
answer count: 2
has answer: http://stackoverflow.com/a/29498601
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/47153483
type: AnsweredQuestion
upvote count: 2
score: 1
accepted answer: http://stackoverflow.com/a/29498601

http://stackoverflow.com/a/29433577
has comment: http://stackoverflow.com/comment/47036571
type: Answer
answers question: http://stackoverflow.com/q/29433447
score: 2
has comment: http://stackoverflow.com/comment/47036557
downvote count: 0
has body: You need to check the innerHTML using if condition and change function changetext() { var element = document.getElementById("accounts"); element.innerHTML = (element.innerHTML==="Login") ? "Create Account" : "Login"; } Login
upvote count: 2

http://stackoverflow.com/comment/47245931
score: 1
has text: Put the code in the original question so we can more easily read it.
comment on: http://stackoverflow.com/q/29528620
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47212815
comment on: http://stackoverflow.com/a/29529494
type: AnswerComment
score: 0
type: Comment
has text: I understood 'I do not care if you add a jQuery solution' as we could add a jQuery solution.

http://stackoverflow.com/a/29421879
type: Answer
has comment: http://stackoverflow.com/comment/47015500
answers question: http://stackoverflow.com/q/29421823
has body: This is a common Javascript gotcha, but you're actually firing off these functions! () after the name will actually invoke that function at that moment. 404: handleError404() // &lt;-- it calls it immidiately What you need to do, is create an anonymous function, which will be called later when the error actually happens, which inside of it will invoke your functions. statusCode: { 404: function () { // &lt;-- anonymous function won't get called until it needs to handleError404("Error at getUsers();") }, 500: function () { handleError500("Error at getUsers();") } }, Side note: If you weren't passing in parameters to your function, you could actually ommit the anonymous function function () { /* function call */ } part, and just call your function! statusCode: { 404: handleErrors, // since no parameters are passed, this could be done 500: handleErrors }
has comment: http://stackoverflow.com/comment/47015732
accepted answer of: http://stackoverflow.com/q/29421823
score: 5
upvote count: 5
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29487175
has comment: http://stackoverflow.com/comment/47137542
has comment: http://stackoverflow.com/comment/47136513
score: -2
has comment: http://stackoverflow.com/comment/47136244
has body: String htmlstring = "Put Your HTML string here" + htmlstringbuf .toString() .replaceAll("&amp;nbsp;", " ") .replaceAll("&amp;", "&amp;amp;") .replaceAll("null", " ") .replaceAll("&lt;\\?xml version=\"1.0\" encoding=\"UTF-8\"\\?&gt;"," ") .replaceAll("Â", "&lt;br&gt;&lt;/br&gt;") .replaceAll("&lt;\\?xml version = '1.0' encoding ='UTF-8'\\?&gt;", " ") + "&lt;/body&gt;";
downvote count: 2
has comment: http://stackoverflow.com/comment/47137877
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/29487039

papaparse
type: Tag
tags question: http://stackoverflow.com/q/29410435
tag name: papaparse

http://stackoverflow.com/q/29485771
score: 0
has body: I have used window.onbeforeunload() to display an alert when the user navigates away from the page and this works fine, jQuery(window).bind('beforeunload', function (e) { var message = "Attention:"; e.returnValue = message; return message; }); In one of the views in my project I have used a timer.The problem is that,when the timer is timed out an alert is displayed and it is followed by the window.onbeforeunload() alert. I want only the timer alert and not both to be displayed on timer timeout. How can I achieve this?
tagged with: timer
linked to: http://stackoverflow.com/q/17250308
possible better answer: http://stackoverflow.com/a/29485887
has answer: http://stackoverflow.com/a/29485872
accepted answer: http://stackoverflow.com/a/29485872
type: Question
has title: how to diable window.onbeforeunload alert when timer is timedout
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47131168
has comment: http://stackoverflow.com/comment/47131208
answer count: 2
has comment: http://stackoverflow.com/comment/47131256
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29485887

http://stackoverflow.com/comment/46943906
type: Comment
has text: Problem is now completely solved on my project using your help. Thank you!
comment on: http://stackoverflow.com/a/29382325
type: AnswerComment
score: 0

http://stackoverflow.com/q/29410257
has answer: http://stackoverflow.com/a/29410282
accepted answer: http://stackoverflow.com/a/29410282
has body: I am building some UI page using jQuery. In some function, i am creating a JavaScript object as var key = "04:52:00"; var val = 13.21; var data = { key : val }; When I try to loop through the data object like, for(var category in data) { alert(category); var points = data[category]; alert(points); } In the above, I am getting the value of val variable correctly as 13.21, but I am not getting key variable value, instead in the alert(category);, I am getting key not 04:52:00. I am not much familiar with jQuery/JavaScript.
has title: Not getting JQuery/JavaScript object value in for loop
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29410287
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/29410287

http://stackoverflow.com/q/29410401
possible better answer: http://stackoverflow.com/a/29414811
has title: Searching through a list of elements for given string
has answer: http://stackoverflow.com/a/29410484
has answer: http://stackoverflow.com/a/29414811
type: AnsweredQuestion
tagged with: search
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/29410484
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a list of records displayed on the screen, email records is selectable so i user can see more details of that records. Dave Jess Jay Mary James Please note, this data was just made up on the spot, i probably should have used better email address.... I have a search box on this page that allows a user to type in a search string and i want my app to search through this list of records and look for any instance of the input string on Name and email addresses. I have a function that fires when a user enters a search string but can't figure out the best way to search through these records. I can achieve this use an AJAX call to a php file that would just run a jquery with that search sting but i wanted to try and do it on the client side of things. So does anyone know of a good way of doing this in Javascript/JQuery or would it be better practice to just do the Mysql query? This is the JS code i have, this calls the method to search: var wait = setTimeout(search, 800, search_string, $user_list ); $(this).data('timer', wait); Search Method: function search( search_string, $user_list ) { $user_list.find("li").each(function() { var $this = $(this); var regex = new RegExp(search_string); if ( $this.text().match(regex) || $this.data('email').match(regex) ) { console.log("Match Found!!!"); } }); } Thanks for you time.

http://stackoverflow.com/q/29484693
has answer: http://stackoverflow.com/a/29484738
possible better answer: http://stackoverflow.com/a/29484761
tagged with: jquery-dialog
has comment: http://stackoverflow.com/comment/47129232
has title: get the id of button who has opened the jquery dialog box
has body: I have mutliple buttons.On clicking the button a jquery dialog box is coming. I want to know the id of button who has opened the dialog box. Here is my jsp code <c:forEach var="history" items="${history}" varStatus="loopCounter"> <c:forEach var="child" items="${history.child}" varStatus="loopCounter2"> <img src="img/vendor_logos/<c:out value="${child.courierProduct.logoName}" />"/> <c:out value="${child.routeDetails.sourceName}" /> <c:out value="${child.routeDetails.destinationName}" /> <c:out value="${history.cost}" />/- <c:out value="${child.orderTime}" /> /* this div id i want to get in the jquery function */ /* it is inside for so there can be multiple div which can trigger dialog box */ Submit Review </c:forEach> </c:forEach> Here is the dialog box div Rate your overall satisfaction: Please provide your review: Here is the jquery function I tried with this alert($('div[name=rate]').attr('id')); but it is giving 0 everytime.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29484738
type: Question
has answer: http://stackoverflow.com/a/29484810
answer count: 3
tagged with: jsp
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29484761
score: 0

http://stackoverflow.com/a/29457892
has comment: http://stackoverflow.com/comment/47080579
has comment: http://stackoverflow.com/comment/47080903
has comment: http://stackoverflow.com/comment/47086911
has comment: http://stackoverflow.com/comment/47080605
answers question: http://stackoverflow.com/q/29457674
upvote count: 1
has comment: http://stackoverflow.com/comment/47080803
type: Answer
has body: data should be a json. It depends on your server. The common way to do it is is using properties on an object: data: {username: 'xxxx', password: 'xxxx', action: 'login', view:'console'} but if your server receives a string as an input then: data: {key: 'username=xxxx&amp;password=xxxx&amp;action=login&amp;view=console'}
has comment: http://stackoverflow.com/comment/47085023
downvote count: 0
has comment: http://stackoverflow.com/comment/47083496
score: 1

http://stackoverflow.com/a/29507198
has comment: http://stackoverflow.com/comment/47176466
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47174883
score: 0
has comment: http://stackoverflow.com/comment/47175653
type: Answer
has comment: http://stackoverflow.com/comment/47175914
has comment: http://stackoverflow.com/comment/47175501
accepted answer of: http://stackoverflow.com/q/29507014
answers question: http://stackoverflow.com/q/29507014
has comment: http://stackoverflow.com/comment/47177420
has body: You can use HTML5 localStorage to save data in browser. Save it on every key press of that textbox. Try to read it by using a timer on the other page. http://diveintohtml5.info/storage.html
has comment: http://stackoverflow.com/comment/47174778

http://stackoverflow.com/comment/47046644
type: Comment
comment on: http://stackoverflow.com/q/29438974
score: 0
has text: Yes, you will need ajax. Here's jquerys documentation on sending a request with their library. https://learn.jquery.com/ajax/jquery-ajax-methods/
type: QuestionComment

http://stackoverflow.com/comment/47051564
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29441649
type: QuestionComment
has text: Take a look at http://code.stephenmorley.org/html-and-css/styling-checkboxes-and-radio-buttons/#imageBased. Google __styling radio buttons__ for more sites with examples.

http://stackoverflow.com/q/29465911
has answer: http://stackoverflow.com/a/48354841
answer count: 1
tagged with: drilldown
tagged with: d3.js
has title: create drill down radar/spider chart with d3.js
type: UnansweredQuestion
has body: I am trying to create a radar chart/spider chart with d3.js and followed the demo given here Radar chart Now I want to add drill down option to it. like if clicked on any point it will animate and redraw the chart with new data. I am not able to find any reference on the web.Please help
has comment: http://stackoverflow.com/comment/47094844
has comment: http://stackoverflow.com/comment/47094891
type: Question
tagged with: charts
tagged with: javascript
tagged with: radar-chart
score: 0

http://stackoverflow.com/comment/47004662
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29414215
has text: This has very little to do with scope and a lot to do with time and how javascript code executes. I suggest researching the javascript event loop. here, i'll save you some time: http://www.youtube.com/watch?v=8aGhZQkoFbQ
score: 0

http://stackoverflow.com/comment/47157675
type: AnswerComment
comment on: http://stackoverflow.com/a/29499511
type: Comment
has text: Thank you Tony! so I need to alter my PHP script sort out the nesting? Thanks for the plunker example, this really helps.
score: 0

http://stackoverflow.com/comment/47206979
type: Comment
score: 0
has text: error here too -> `request.get('http://www.goodreads.com/book/show/50?format=xml&key=' + apiKey + function (error, response, body)`. You're concatenating a function onto the request url
type: QuestionComment
comment on: http://stackoverflow.com/q/29526160

http://stackoverflow.com/comment/46988845
has text: i changed css and js. try this one
comment on: http://stackoverflow.com/a/29407136
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47118520
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29478425
has text: @2trill2spill whoops! the content type should be `application/javascript` for `.js` files. I've updated the answer
type: AnswerComment

http://stackoverflow.com/comment/47225602
has text: Thanks. Sorry for the bad HTML. What I really want to do is send in information from all three fields with one click. How do I do that?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29514802
type: Comment

http://stackoverflow.com/comment/47166747
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29504606
has text: Sorry. Yes I'd like to debug remotely. For example, I'd like to run the web app on my TV but see the order of functions that are executed from my PC. I would basically like to avoid having to write console.log() in every function. Is it possible to print the function stack from inside the app?
type: Comment

http://stackoverflow.com/comment/47185813
score: 2
type: QuestionComment
type: Comment
has text: `selector: $(this).data("id")`?
comment on: http://stackoverflow.com/q/29515117

http://stackoverflow.com/a/29484237
downvote count: 0
answers question: http://stackoverflow.com/q/29484169
has comment: http://stackoverflow.com/comment/47128573
has comment: http://stackoverflow.com/comment/47131388
has comment: http://stackoverflow.com/comment/47131219
upvote count: 2
has comment: http://stackoverflow.com/comment/47129225
type: AcceptedAnswer
has body: instead of window.onload use $(document).ready(function() { window.scrollTo(0, 100); } because window.onload is fired when entire page load and document.ready is fired when DOM loads and use srcollTo instead of scroll
type: Answer
accepted answer of: http://stackoverflow.com/q/29484169
score: 2

http://stackoverflow.com/q/29380988
has title: Zurb Foundation Modal Positioning Issue
tagged with: javascript
tagged with: jquery
score: 0
tagged with: zurb-foundation
answer count: 1
has answer: http://stackoverflow.com/a/29381240
type: UnansweredQuestion
tagged with: css
has body: I am currently working on a website where the reveal modal window when I am at the top of the page works perfectly if I scroll down the page the modal exceeds the window size. Like so I believe that the modal is determining that since I am scrolled the window? size is larger and determines the appropriate position to place the modal which is not in the center of the screen. The position added to the modal is top: 511px; Is there a way to get around this to prevent it from exceeding the window size?
type: Question

http://stackoverflow.com/comment/47012625
comment on: http://stackoverflow.com/q/29420179
score: 0
type: Comment
type: QuestionComment
has text: @PraveenPaulose Impossible; `exit` isn't JavaScript. The conditionals will work (assuming reasonable values) but the console will show that it's not working "perfectly".

http://stackoverflow.com/comment/47151642
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29496297
has text: Thanks for that - Unfortunately I've corrected the code (http://plnkr.co/edit/CoYLuVbiZTFWvNsN5r5L?p=preview) but it doesn't seem to be working.
score: 0

http://stackoverflow.com/a/29399231
score: 4
downvote count: 1
upvote count: 5
answers question: http://stackoverflow.com/q/29397746
has body: In ES5 there is no efficient way to iterate over a sparse array without using the length property. In ES6 you can use for...of. Take this examples: 'use strict'; var arr = ['one', 'two', undefined, 3, 4], output; arr[6] = 'five'; output = ''; arr.forEach(function (val) { output += val + ' '; }); console.log(output); output = ''; for (var i = 0; i &lt; arr.length; i++) { output += arr[i] + ' '; } console.log(output); output = ''; for (var val of arr) { output += val + ' '; }; console.log(output); &lt;!-- results pane console output; see http://meta.stackexchange.com/a/242491 --&gt; &lt;script src="//gh-canon.github.io/stack-snippet-console/console.min.js"&gt;&lt;/script&gt; All array methods which you can use to iterate safely over dense arrays use the length property of an object created by calling ToObject internaly. See for instance the algorithm used in the forEach method: http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18 However in es6, you can use for...of safely for iterating over sparse arrays. See also Are Javascript arrays sparse?.
type: Answer

http://stackoverflow.com/comment/47116101
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29477481
has text: by different data structure you meant?
score: 0

http://stackoverflow.com/comment/47138926
comment on: http://stackoverflow.com/q/29474294
type: Comment
type: QuestionComment
has text: What is the primary key of your table?
score: 0

http://stackoverflow.com/a/29467864
downvote count: 0
has comment: http://stackoverflow.com/comment/47098157
score: 3
answers question: http://stackoverflow.com/q/29467713
upvote count: 3
has comment: http://stackoverflow.com/comment/47098316
type: Answer
has body: You need to delegate the click handler, something like // handle clicks on all document buttons $(document).on('click', 'button', buttonClick); // copy #divOne html to #divTwo $('#divTwo').html($('#divOne').html()); // click handler demo function buttonClick(e) { var result = $('#result'); var id = $(this.parentNode).attr('id'); result.html('clicked button within: #' + id); // comment @cssGeek demo $('div').css('color', '#000'); $('#'+id).css('color', 'red'); } close hello

http://stackoverflow.com/comment/46964962
type: QuestionComment
has text: @ppumkin, unfortunately I need to meet requirements. I can't store file on server and I need to pass authorization header to get the file.
comment on: http://stackoverflow.com/q/29393601
score: 0
type: Comment

http://stackoverflow.com/q/29391432
tagged with: javascript
tagged with: tinymce-4
score: 0
has body: I have a page which is used for both create and update. When a user writes a name and if that name doesn't exist in database it will be added along with the newly created description (through tinyMCE plugin) (This part works perfectly). But when user selects an already existing name, an AJAX request is fired to pull the description. I am able to pull the description correctly but the response (text) is not shown in the tinyMCE. I am using the latest version of tinyMCE. My question is how can i reinitialize the tinyMCE control which has already been initialize on page load, or is there any other way to achieve this, as i want the existing description to be updated
answer count: 1
has answer: http://stackoverflow.com/a/31378016
tagged with: tinymce
type: UnansweredQuestion
has title: How To Reinitialize tinyMCE with fresh data after an AJAX Call?
type: Question

http://stackoverflow.com/a/29406205
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29406185
score: 3
has body: You've missed to define the app name in ng-app. But in your js you have mentioned: var app = angular.module('myApp', []); So correct in your HTML: ng-app="myApp" Oops, you have defined ng-app twice. That's why its not working properly. Only one ng-app must be there.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29406185

http://stackoverflow.com/comment/47119323
has text: Why don't you put the second column first as I believe it's always of the same length?
type: Comment
comment on: http://stackoverflow.com/a/29479111
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47084781
type: Comment
score: 0
has text: Are you using jquery? I found you have used $document. I guess if you use document instead, then it should work. I mean document.getElementById('layer3')
type: QuestionComment
comment on: http://stackoverflow.com/q/29460450

http://stackoverflow.com/comment/47057398
comment on: http://stackoverflow.com/q/29444357
type: Comment
type: QuestionComment
has text: react version: "0.13.0", react-router: "0.13.2"
score: 0

http://stackoverflow.com/comment/47071203
score: 0
type: Comment
type: QuestionComment
has text: Can you also post the code for the first login system? Since the error occurs in both, the problem must be in something that is shared between the two.
comment on: http://stackoverflow.com/q/29442357

http://stackoverflow.com/comment/47002421
has text: Oh can you please show me the code you were using? I tried the code suggested in http://stackoverflow.com/questions/17864326/how-to-return-javascript-as-partial-response which uses eval and caused the invalid response
type: Comment
comment on: http://stackoverflow.com/a/29413424
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47075118
type: AnswerComment
has text: @dec I think that by external script OP means something like user script or extension running on the same page, just outside of the app. *"for example if I select the first div var div1 = $('div.myDiv:first')"* which means that the script works on the same page.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29455030

http://stackoverflow.com/comment/46940572
type: QuestionComment
type: Comment
has text: @Adam the domain name is http://www.stainmaster.com.au/ when using firebug you will see the error, I'm currently using FireFox
score: 0
comment on: http://stackoverflow.com/q/29380271

http://stackoverflow.com/a/29527439
type: Answer
has body: There is no work around for Safari. Safari requires a Window or Tab be open for a 3rd party to set cookies. Even Iframes would not function properly unless the window or tab was open. They flat out prohibit third party sites setting cookies. IE on the other hand was easily fixed by sending P3P headers.
answers question: http://stackoverflow.com/q/29485338
accepted answer of: http://stackoverflow.com/q/29485338
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/29403103
linked to: http://stackoverflow.com/q/28213301
has answer: http://stackoverflow.com/a/29414266
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/29414266
tagged with: htmlbars
type: Question
has title: How to compile inline HTMLBars templates?
downvote count: 0
tagged with: javascript
has body: I have an inline template (template in JavaScript) that I used to compile like so (where temp is a Handlebars string): var template = Handlebars.compile(temp); template({model: results}); // Gets the HTML I'm trying to use HTMLBars instead, but can't quite figure it out. I did the following: var template = Ember.HTMLBars.compile(temp); template({model: results}); // Throws an error that template isn't a function How do I go about getting the HTML back from the HTMLBars template. I also tried: var template = Ember.HTMLBars.compile(temp); Ember.HtmlBars.template(template, {model: results}); Which doesn't error, but also doesn't use the model when rendering the HTML. I think I'm close, but can't quite figure out how to inject the model.
tagged with: ember.js
answer count: 1
favorite count: 0
upvote count: 2

http://stackoverflow.com/comment/46982535
type: AnswerComment
score: 0
type: Comment
has text: I am defining the datasource in my MVC code. But I want to do this purely in Javascript because I have a JS class that extends the grid's functionality and this extra functionality would best fit there. I'll update my question with that code.
comment on: http://stackoverflow.com/a/29403422

drupal
type: Tag
tags question: http://stackoverflow.com/q/29503888
tags question: http://stackoverflow.com/q/29454872
tags question: http://stackoverflow.com/q/29412409
tag name: drupal

http://stackoverflow.com/comment/47050108
score: 0
type: AnswerComment
type: Comment
has text: Hi Jon, what you suggested above worked! I glanced at the initial answer and misunderstood your response, apologies for that. Now I've sat down at my laptop and read through it, it makes sense, Thanks for your time, I really appreciate it!
comment on: http://stackoverflow.com/a/29436348

http://stackoverflow.com/comment/47157769
has text: @PajoHackman Just be sure that whatever you're drawing/acting on is an array of objects: `[ Object, Object, ...]`. Otherwise, you'll have to account for the extra nesting, something like: `data[0].map(...)`.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29499511

http://stackoverflow.com/comment/47005218
comment on: http://stackoverflow.com/q/29403490
has text: Hey Felix, still no dice. I tried both of these and still nothing is added to the page.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47048416
score: 0
comment on: http://stackoverflow.com/q/29439860
type: QuestionComment
type: Comment
has text: Have you tried: `$('#qrcodeCanvas').qrcode(test);`

http://stackoverflow.com/comment/47012776
has text: Double check the second option. It works fine when I try it and was suggested by the Bing Maps dev team.
comment on: http://stackoverflow.com/a/29398627
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29468425
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/29461562
score: 1
answers question: http://stackoverflow.com/q/29461562
has body: The problem that you have code which overrides child views me.$el.find('section:eq(' + model.collection.indexOf(model) + ')').replaceWith(data); And this listener is not able to handle event el.on("invertChange", function(e){ because your code this.options.sec.trigger('invertChange'); doesn't trigger event on correct view, it has lost the reference to this view after replaceWith() As a solution you need parse your data object and apply each changes locally to elements something like this $(data).find("* [attr]").each(function(i, el) { var $el = $(el), attr = $el.attr("attr"), $parent = me.$el.find('section:eq(' + model.collection.indexOf(model) + ')'); if ($el.is("div, span")) { $parent.find('[attr=' + attr + ']').html($el.html()); } else if ($el.is("img")) { $parent.find('[attr=' + attr + ']').attr("src", $el.attr("src")); } else if ($el.is("a")) { $parent.find('[attr=' + attr + ']').attr("href", $el.attr("href")); } else if (attr == "image_back_one") { $parent.find('[attr=' + attr + ']').attr("style", $el.attr("style")); } else { console.log($el); } });
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/47032086
comment on: http://stackoverflow.com/a/29431055
type: Comment
has text: This should filter out a whole lot : `if ("ontouchstart" in document.documentElement)`. http://stackoverflow.com/a/2915912/3168107
score: 0
type: AnswerComment

http://stackoverflow.com/a/29555219
score: 2
type: AcceptedAnswer
type: Answer
upvote count: 3
downvote count: 1
accepted answer of: http://stackoverflow.com/q/29483877
has body: The problem was that I was hiding a div with the update panel inside of it, and then changing the visible to true, but the Update Panel wasn't actually showing up. Here is what I changed it to so that the update panels are always present as opposed to disappearing and reappearing: &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt; &lt;ContentTemplate&gt; &lt;div visible="false" id="Search" runat="server"&gt; &lt;div style="overflow: hidden;"&gt;
answers question: http://stackoverflow.com/q/29483877

http://stackoverflow.com/comment/46998215
type: QuestionComment
comment on: http://stackoverflow.com/q/29412742
has text: Are you sure you're having jQuery included in your project; or at least this web page?
score: 0
type: Comment

http://stackoverflow.com/comment/47074594
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29454620
has text: @sock Okay good deal, be sure to also include in your question that this is a requirement.
score: 0

http://stackoverflow.com/comment/47153678
comment on: http://stackoverflow.com/a/29481177
score: 0
type: AnswerComment
has text: Perfect thank you very much. I did not realise you had to declare that. For my app to work i wanted to use the react router after the path: `....com/wish/`. So I had to set the path with a trailing slash: `path="/wish/"`
type: Comment

http://stackoverflow.com/a/29404110
has body: It looks like the problem you are having is because you are defining your more_info function inside of a function. This takes it out of the global scope which will not make that function accessible anywhere except for inside of your document ready function. //more_info is now available globally function more_info(){ $('#index').hide(); $('#more_info').show(); } $(document).ready(function(){ //document ready code here }); This should make the more_info execute when you output the JS function from PHP. Also it is good to note that since you are not executing the function on ready you will need to make sure the html is available for the JS to modify it. It is normally best practice to put all your JS just before the closing tag. This will ensure your html loads as quickly as possible and your JS will always have access to the HTML you are attempting to edit. With the JS in the head tag you need to make sure your JS is being called at the correct time using: $(function() { }); OR $(document).ready(function() { }); OR $(window).load(function() { }); All of these methods execute at different times during page initialization. With JS in the head tag your browser will need to download all the JS to the client before it can begin to render the HTML which will also add to time between going to the site and actually seeing the site.
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29403963
accepted answer of: http://stackoverflow.com/q/29403963
upvote count: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29421412
type: Answer
answers question: http://stackoverflow.com/q/29421311
has body: Not sure what the "popup" is, but let's assume that this "popup" has an element with id "movie-title" that you wish to populate with the Title property from your data: function getJson() { $.ajax({ dataType: "json", url: 'imdb.php', success: function (data) { $('#movie-title').html(data.Title) } }); }
has comment: http://stackoverflow.com/comment/47033185
has comment: http://stackoverflow.com/comment/47014603
score: 0

http://stackoverflow.com/q/29488078
has answer: http://stackoverflow.com/a/29489021
tagged with: wicket
linked to: http://stackoverflow.com/q/8415330
type: AnsweredQuestion
has title: How to test appended javascript on wicket ajaxBehavior on JUnit test?
tagged with: unit-testing
has body: I have a function that appends in onload() method some javascript to the AjaxRequestTarget. I load it by add(onload); and onload is having code like AjaxEventBehavior event = new AjaxEventBehavior("onload") { @Override protected void onEvent(final AjaxRequestTarget target) { attachJavascriptBehavior(target); } }; return event; attachJavascriptBehavior adds some javascript as text to the target. I want to test it with WicketTester. So far I know I can make calls like: tester.executeAjaxEvent("some:path", "onclick"); and maybe same will apply somehow for the onload, too. I found I can then call tester.assertRenderedPage(MyWebPage.class); to test if page is rendered after the event (event tackles some content size), but even if I in browser get errors in console, this tests goes surprisingly through. How to catch that console.log has reported javascript errors? Source: How to test AjaxEventBehavior("onClick") for Apache Wicket radio button?
type: Question
accepted answer: http://stackoverflow.com/a/29489021
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47136377
answer count: 1
tagged with: junit
tagged with: ajax

http://stackoverflow.com/comment/47096300
score: 0
type: AnswerComment
type: Comment
has text: oh, thanks. Unfortunately this is still a problem.. only reduce about 200 line of codes over 50 variables. I forgot to mention that my script only have two formula and it's been used over and over, hence why I want to use array to simplify it.
comment on: http://stackoverflow.com/a/29466830

http://stackoverflow.com/q/29519356
has answer: http://stackoverflow.com/a/29519461
possible better answer: http://stackoverflow.com/a/29519504
has answer: http://stackoverflow.com/a/29519504
has comment: http://stackoverflow.com/comment/47193978
has comment: http://stackoverflow.com/comment/47194149
has comment: http://stackoverflow.com/comment/47194045
has title: Linking a textbox to a javascript equation ran by a button
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29519511
has answer: http://stackoverflow.com/a/29519531
type: Question
tagged with: javascript
has body: I have been trying to put an input like 100, 45 into the textbox and run it through my equation via clicking the button and I cannot figure out how to do it. It should post the answer after clicking the button as an alert. Please Help. Thank you. function Rad(a, b){ var Armor=a/(Math.sin((Math.PI/180)*b)) alert(Armor) } .box { color: gray; margin-top: 10px; margin-left: 10px; } .equation { color: #444; font: inherit; min-height: 2em; border-radius: 3px; padding-left: 4px; border: 2px solid #bfbfbf; } Click
has comment: http://stackoverflow.com/comment/47193927
has comment: http://stackoverflow.com/comment/47193842
score: 0
accepted answer: http://stackoverflow.com/a/29519511

http://stackoverflow.com/q/29487039
tagged with: javascript
linked to: http://stackoverflow.com/q/1137241
has comment: http://stackoverflow.com/comment/47144742
has body: I'm working on a XSL 1.0 transformation to get HTML visualisation when displaying the XML in Firefox. In my original XML, I have characters like &amp;amp;eacute; &amp;amp;egrave; &amp;amp;lsquo;... I need to convert them into é, è, ‘... I have used this template : &lt;xsl:template name="string-replace-all"&gt; &lt;xsl:param name="text" /&gt; &lt;xsl:param name="replace" /&gt; &lt;xsl:param name="by" /&gt; &lt;xsl:choose&gt; &lt;xsl:when test="contains($text, $replace)"&gt; &lt;xsl:value-of select="substring-before($text,$replace)" /&gt; &lt;xsl:value-of select="$by" /&gt; &lt;xsl:call-template name="string-replace-all"&gt; &lt;xsl:with-param name="text" select="substring-after($text,$replace)" /&gt; &lt;xsl:with-param name="replace" select="$replace" /&gt; &lt;xsl:with-param name="by" select="$by" /&gt; &lt;/xsl:call-template&gt; &lt;/xsl:when&gt; &lt;xsl:otherwise&gt; &lt;xsl:value-of select="$text" /&gt; &lt;/xsl:otherwise&gt; &lt;/xsl:choose&gt; Calling for each special character (here for example &amp;egrave;) : &lt;xsl:variable name="newtext"&gt; &lt;xsl:call-template name="string-replace-all"&gt; &lt;xsl:with-param name="text" select="$originaltext" /&gt; &lt;xsl:with-param name="replace" select="'&amp;amp;egrave;'" /&gt; &lt;xsl:with-param name="by" select="'è'" /&gt; &lt;/xsl:call-template&gt; &lt;/xsl:variable&gt; Is there a solution where I can directly replace &amp;amp; into &amp; for example without the need to call the replacement template for each special character I expect to exist?
has comment: http://stackoverflow.com/comment/47147657
answer count: 3
has title: Special characters in XSL
tagged with: xslt-1.0
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/47137818
has answer: http://stackoverflow.com/a/29495553
has comment: http://stackoverflow.com/comment/47142107
tagged with: xslt
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29490037
accepted answer: http://stackoverflow.com/a/29495553
has answer: http://stackoverflow.com/a/29487175
possible better answer: http://stackoverflow.com/a/29490037
type: Question
score: 0
tagged with: firefox

http://stackoverflow.com/comment/47009685
type: QuestionComment
has text: if it *has* to be .ini, the first hit I got on npmjs.org is https://www.npmjs.com/package/ini
comment on: http://stackoverflow.com/q/29404104
score: 0
type: Comment

http://stackoverflow.com/a/79459073
has body: I thought I would try my hand at a minimal solution. Your fractional date returns January 21, 2015. leapyear code inspired by How to find leap year programmatically in C leapyear=year=&gt;!(year%4 || year%400 &amp;&amp; !(year%100)) decdate=year=&gt;new Date(year, 0, year % 1 * (365 + leapyear(year))) console.log(decdate(2015.0596924).toLocaleDateString('en-us',{ month:'long', day:'numeric', year:'numeric'}))
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29400171

twitter-bootstrap
tags question: http://stackoverflow.com/q/29460370
tags question: http://stackoverflow.com/q/29380440
tags question: http://stackoverflow.com/q/29396036
tags question: http://stackoverflow.com/q/29449608
tags question: http://stackoverflow.com/q/29440871
tags question: http://stackoverflow.com/q/29378497
tags question: http://stackoverflow.com/q/29406848
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/29408903
tags question: http://stackoverflow.com/q/29408697
tags question: http://stackoverflow.com/q/29436385
tags question: http://stackoverflow.com/q/29445660
tags question: http://stackoverflow.com/q/29447200
tags question: http://stackoverflow.com/q/29413617
tags question: http://stackoverflow.com/q/29397239
tags question: http://stackoverflow.com/q/29491750
tags question: http://stackoverflow.com/q/29463123
tags question: http://stackoverflow.com/q/29434917
tags question: http://stackoverflow.com/q/29422097
tags question: http://stackoverflow.com/q/29510453
tags question: http://stackoverflow.com/q/29432661
tags question: http://stackoverflow.com/q/29458624
tags question: http://stackoverflow.com/q/29418227
tags question: http://stackoverflow.com/q/29501491
tags question: http://stackoverflow.com/q/29503111
tags question: http://stackoverflow.com/q/29418409
tags question: http://stackoverflow.com/q/29495237
tags question: http://stackoverflow.com/q/29424680
tags question: http://stackoverflow.com/q/29499330
tags question: http://stackoverflow.com/q/29434642
tags question: http://stackoverflow.com/q/29487988
tags question: http://stackoverflow.com/q/29463990
tags question: http://stackoverflow.com/q/29423620
tags question: http://stackoverflow.com/q/29406617
tags question: http://stackoverflow.com/q/29458065
tags question: http://stackoverflow.com/q/29480289
tags question: http://stackoverflow.com/q/29384488
tags question: http://stackoverflow.com/q/29400106
tags question: http://stackoverflow.com/q/29519295
tags question: http://stackoverflow.com/q/29433883
tags question: http://stackoverflow.com/q/29519556
tags question: http://stackoverflow.com/q/29401725
tags question: http://stackoverflow.com/q/29392878
tags question: http://stackoverflow.com/q/29430954
tags question: http://stackoverflow.com/q/29404287
tags question: http://stackoverflow.com/q/29416630
tags question: http://stackoverflow.com/q/29452791
tags question: http://stackoverflow.com/q/29469911
tags question: http://stackoverflow.com/q/29503739
tags question: http://stackoverflow.com/q/29482477
tags question: http://stackoverflow.com/q/29381723
tags question: http://stackoverflow.com/q/29471930
tags question: http://stackoverflow.com/q/29386988
tags question: http://stackoverflow.com/q/29430850
tags question: http://stackoverflow.com/q/29427928
tags question: http://stackoverflow.com/q/29432530
tags question: http://stackoverflow.com/q/29434164
tags question: http://stackoverflow.com/q/29466724
tags question: http://stackoverflow.com/q/29497597
tags question: http://stackoverflow.com/q/29375297
tags question: http://stackoverflow.com/q/29378695
tags question: http://stackoverflow.com/q/29399597
tags question: http://stackoverflow.com/q/29483299
tags question: http://stackoverflow.com/q/29466204
tags question: http://stackoverflow.com/q/29452557
tags question: http://stackoverflow.com/q/29502394
tags question: http://stackoverflow.com/q/29412085
tags question: http://stackoverflow.com/q/29469537
tags question: http://stackoverflow.com/q/29430210
tags question: http://stackoverflow.com/q/29509351
tags question: http://stackoverflow.com/q/29473830
tags question: http://stackoverflow.com/q/29424407
tags question: http://stackoverflow.com/q/29509271
tags question: http://stackoverflow.com/q/29379768
tags question: http://stackoverflow.com/q/29451245
tags question: http://stackoverflow.com/q/29388384
tags question: http://stackoverflow.com/q/29443165
tags question: http://stackoverflow.com/q/29402282
tags question: http://stackoverflow.com/q/29393334
tags question: http://stackoverflow.com/q/29396990

http://stackoverflow.com/q/29520560
has comment: http://stackoverflow.com/comment/47241489
linked to: http://stackoverflow.com/q/5822985
downvote count: 0
tagged with: javascript
tagged with: xmlhttprequest
score: 1
has title: Google Storage resumable upload range header
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
has body: I'm uploading files to a GCS bucket with the JSON API and the upload is resumable. I'm doing this from the browser using JS. The files upload with no problems. If there is a network problem then I try to resume it. Per the documentation I'm sending an empty PUT request to the upload URI. Then parsing the range header of the response. But then I get the error: Refused to get unsafe header "range" This is the code: var xhr = new XMLHttpRequest(); xhr.open("PUT", url, true); xhr.setRequestHeader("Authorization", token); xhr.setRequestHeader("content-range", "bytes */" + file_object.size); xhr.onreadystatechange = function () { if (xhr.readyState != 4) { return; } if (xhr.status === 308) { var range = xhr.getResponseHeader("range"); // Error here // continue with the upload } }; xhr.send(); I'm creating the upload URI at the server side with Python. These are the headers included in the request: headers = { "Authorization": authorization, "Content-Type": "application/json; charset=UTF-8", "origin": 'http://' + self.request.headers.get('HOST'), "X-Upload-Content-Type": content_type, "X-Upload-Content-Length": content_length, } How can I read the header range?
tagged with: google-cloud-storage
type: Question

http://stackoverflow.com/comment/47092867
score: 0
has text: That is absolutely not [JSON](http://json.org/).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29452398

http://stackoverflow.com/a/29505364
score: 3
upvote count: 3
type: AcceptedAnswer
has body: You can configure it at application level angular.module('myModule', []). config(function(stConfig) { stConfig.pagination.template = 'my-custom-pagination-tmpl.html'; });
type: Answer
accepted answer of: http://stackoverflow.com/q/29493121
downvote count: 0
answers question: http://stackoverflow.com/q/29493121

http://stackoverflow.com/comment/47040666
score: 0
type: Comment
has text: I have tried that, but i get unexpected expression from it.
type: AnswerComment
comment on: http://stackoverflow.com/a/29435383

http://stackoverflow.com/comment/47019189
comment on: http://stackoverflow.com/a/29422964
has text: You have them in `scope.timeOptions`, I don't know what to say more, do you have any specific question?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47166827
has text: I don't know how your other fields are working. I've only ever seen it done with 'id'. Did you try it?
comment on: http://stackoverflow.com/q/29502965
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/47192598
type: AnswerComment
comment on: http://stackoverflow.com/a/29498124
has text: The tickFormat and headerFormatter functions already loop through all the data, but they need to be passed a function to know what to do with each point.
type: Comment
score: 0

http://stackoverflow.com/comment/47091999
type: AnswerComment
comment on: http://stackoverflow.com/a/29463793
has text: No, does it need to be? I have other parses where the element isn't in the html and it works? All I'm trying to do is grab a value from the array, assign it to a JavaScript variable and use that (using the method you provided) to change styling
type: Comment
score: 0

http://stackoverflow.com/comment/47149711
has text: In Chrome locally. Why will it not work locally? Ultimately I'm trying to use this in Awesomium so it will be local, but testing it with Chrome.
comment on: http://stackoverflow.com/q/29493776
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47057590
comment on: http://stackoverflow.com/q/29444932
has text: You did, you're using `Object.keys(value.material)` so it's clearly an object, then later on you're concatenating `value.material` into the string as a value ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29522454
has comment: http://stackoverflow.com/comment/47202467
has comment: http://stackoverflow.com/comment/47202293
answer count: 1
tagged with: javascript
has body: I'm trying to create a parent g tag for each day which will contain a child g tag for the label. The first item section of code produces the parents properly: var content = d3.select(".content").attr("height", 1000).attr("width", 1000); //create day groups var days = content.selectAll("g").filter(".day") .data([0,1,2,3,4,5,6,7,8,9]) .enter().append("g") .attr("class", "day"); When I try to add a child g tag to each of them, though, it doesn't work: // create the day headers var day_labels = days.selectAll("g").filter(".day_label") .data(function (d) { return d; }) .enter().append("g") .attr("class", "day_label"); Is there something wrong with my syntax?
score: 0
has title: Why is my d3.js selectAll + filter not filtering?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47208243
tagged with: d3.js
has answer: http://stackoverflow.com/a/29527460
accepted answer: http://stackoverflow.com/a/29527460
type: Question

http://stackoverflow.com/q/29497437
favorite count: 0
has comment: http://stackoverflow.com/comment/47168932
has title: Server return CORS headers, browser still throwing Cross-Origin Request Blocked error
has answer: http://stackoverflow.com/a/29501108
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
tagged with: java
has body: I am newbie to java scripting and CORS and stuck with this problem for some time now. I did lots of reading but no luck. Client running in browser (Chrome/Firefox) and making a PUT request which is resulting in OPTION and PUT requests. Server is redirecting PUT request to another server. Following is HTTP communication capture between java script based client and java based server: OPTION Request: Host: 10.232.65.230:8000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate Origin: http://10.232.65.230:3001 Access-Control-Request-Method: PUT Connection: keep-alive OPTION response: Status Code: 200 Access-Control-Allow-Credentials: true Access-Control-Allow-Headers: content-type Access-Control-Allow-Methods: PUT Access-Control-Allow-Origin: http://10.232.65.230:3001 Access-Control-Max-Age: 1800 Cache-Control: private Content-Length: 0 Date: Tue, 07 Apr 2015 13:48:50 GMT Expires: Thu, 01 Jan 1970 05:30:00 IST Server: Apache-Coyote/1.1 PUT Request: Host: 10.232.65.230:8000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://10.232.65.230:3001/ermsim/erms/1/edgedevices Content-Length: 159 Content-Type: text/plain; charset=UTF-8 Origin: http://10.232.65.230:3001 Connection: keep-alive PUT Response: Status Code: 302 Access-Control-Allow-Credentials: true Access-Control-Allow-Headers: content-type Access-Control-Allow-Methods: PUT Access-Control-Allow-Origin: http://10.232.65.230:3001 Cache-Control: private Content-Length: 0 Content-Type: application/xml Date: Tue, 07 Apr 2015 13:48:50 GMT Expires: Thu, 01 Jan 1970 05:30:00 IST Location: http://10.232.65.230:8000/edge/ermsim/erms/1/edgedevices/1/config/edgeinputs/1 Server: Apach…
tagged with: cors
answer count: 1
has comment: http://stackoverflow.com/comment/47153826
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/29489142
answer count: 2
has comment: http://stackoverflow.com/comment/47137363
has answer: http://stackoverflow.com/a/29489651
upvote count: 0
has comment: http://stackoverflow.com/comment/47137829
has comment: http://stackoverflow.com/comment/47137700
has comment: http://stackoverflow.com/comment/47137975
tagged with: javascript
score: -1
tagged with: browser
has title: javascript not working when I open the HTML file in browser
favorite count: 0
has comment: http://stackoverflow.com/comment/47137817
has comment: http://stackoverflow.com/comment/47137492
has comment: http://stackoverflow.com/comment/47137554
has comment: http://stackoverflow.com/comment/47137611
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47137716
has answer: http://stackoverflow.com/a/29489532
has body: Why does javascript work fine here: Fiddle But not when I save it and wrap javascript in script html tags inside body tags, and then open in a browser. Checkboxes don't respond and all columns are shown in browser, whereas some columns should be hidden by default. čezožinski odnosi
downvote count: 1
has comment: http://stackoverflow.com/comment/47138503
type: Question

http://stackoverflow.com/a/29546788
type: Answer
answers question: http://stackoverflow.com/q/29438401
has body: The error message you are seeing, "Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains" means that you need to add your Page Tab Name and a Secure Page Tab URL to your app settings(under Settings > Basic). Here's the doc explaining how to do it. Once you do, this warning should go away, if it doesn't I suggest filing a bug at https://developers.facebook.com/bugs
score: 0
has comment: http://stackoverflow.com/comment/47247814

http://stackoverflow.com/comment/47117423
has text: Ok, so I removed my form from the partial view, and placed it in the body of the page just as it is. I also temporary removed the List<> property from my class. Still the model is coming trough blank.
comment on: http://stackoverflow.com/q/29449375
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29411558
answer count: 2
has body: This script should return result and displayed result in "answer" >paragraph but instead it appears for moment and then disappeared, what i miss? < script > function dataValidation() { var initial = document.getElementById("anyWord").value var char = /[^а-яА-Я]/ if (initial == null || initial == "") { alert('Please, enter only cyrillic letters.') } else if (initial.match(char)) { alert('Please enter only cyrillic') } else shmovoConverter() } function shmovoConverter() { var sAnyWord = document.getElementById('anyWord').value var shm = 'Шм' var vowels = ['а', 'у', 'о', 'ы', 'и', 'э', 'я', 'ю', 'ё', 'е', 'а', 'у'] var consonants = ['б', 'в', 'г', 'д', 'ж', 'з', 'й', 'к', 'л', 'м', 'н', 'п', 'р', 'с', 'т', 'ф', 'х', 'ц', 'ч', 'ш', 'щ'] for (var i = 0; i < vowels.length; i++) { var firstLater = sAnyWord.substring(0, 1) if (firstLater === vowels[i]) { alert(shm + sAnyWord) var sAnswer = shm + sAnyWord document.getElementById('answer').innerHTML = sAnswer } else { for (var j = 0; j < consonants.length; j++) { if (firstLater === consonants[j]) { sAnyWord = sAnyWord.substring(1, sAnyWord.length) i = 0 } } } } } < /script> Registration Form Slovo - Shmovo Enter any word: This script should return result and displayed result in "answer" paragraph, but instead it appears for moment and then disappeared, what i miss?
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29411954
has title: Result appear for a moment and then disappeared
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29411812
has comment: http://stackoverflow.com/comment/46998047

http://stackoverflow.com/comment/47274699
score: 0
has text: Yeah, if you run this through Chrome's profiler, you can see that 65% of the time is being spent inside the _buffTexture function
type: AnswerComment
comment on: http://stackoverflow.com/a/29459588
type: Comment

http://stackoverflow.com/q/29437838
has body: I have the following task in my gulpfile.js: gulp.task('css', function() { return gulp.src('theme.scss') .pipe(...) .pipe(...) .pipe(...) .pipe(...) .pipe(...) .pipe(...) .pipe(gulp.dest('dist')); }); and I want to move all those pipes to one module in order to get something like that: gulp.task('css', function() { return gulp.src('theme.scss') .pipe(theme()) .pipe(gulp.dest('dist')); }); Is it possible?
answer count: 2
accepted answer: http://stackoverflow.com/a/29457264
downvote count: 0
tagged with: gulp
favorite count: 0
has comment: http://stackoverflow.com/comment/47046641
tagged with: node.js
has title: How to make facade for several pipes in Gulp task
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29457264
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/29446195
has answer: http://stackoverflow.com/a/29446195
tagged with: javascript

http://stackoverflow.com/comment/66295299
type: AnswerComment
comment on: http://stackoverflow.com/a/30193248
type: Comment
has text: Ohhhh got solution after longtime , just remove my headache dear @vakata sir
score: 0

http://stackoverflow.com/q/29455789
downvote count: 0
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/29455905
has title: How to display image using javascript
favorite count: 0
has body: How to display an image as many times as input(number) given by the user in html using javascript? There seem to be an error in my code,dont know how to rectify. Click the button to add a new element to the array. Try it
type: Question
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29456126
accepted answer: http://stackoverflow.com/a/29455838
has answer: http://stackoverflow.com/a/29456126
has comment: http://stackoverflow.com/comment/47076398
upvote count: 1
has answer: http://stackoverflow.com/a/29455862
has answer: http://stackoverflow.com/a/29455838
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47076309

http://stackoverflow.com/comment/47114578
has text: for a mock up, and thanks j08691
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29476144
type: QuestionComment

http://stackoverflow.com/comment/82551769
type: Comment
has text: This could only work for images if I'm not mistaken.
score: 1
comment on: http://stackoverflow.com/a/34123510
type: AnswerComment

http://stackoverflow.com/comment/47109714
type: AnswerComment
score: 0
has text: I hate to do this but you are missing the point. The script still only LOOKS like its working. The line 'if($("#inputid").val('sometexthere'));' is SETTING not checking the value and so always evaluates as true. See:http://jsfiddle.net/anst2vbc/1/
type: Comment
comment on: http://stackoverflow.com/a/29473834

addeventlistener
tags question: http://stackoverflow.com/q/29423249
tags question: http://stackoverflow.com/q/29438876
tags question: http://stackoverflow.com/q/29374694
tags question: http://stackoverflow.com/q/29463559
tags question: http://stackoverflow.com/q/29407968
tag name: addeventlistener
type: Tag

http://stackoverflow.com/q/29419771
accepted answer: http://stackoverflow.com/a/29419982
tagged with: javascript
has answer: http://stackoverflow.com/a/29419879
favorite count: 0
has body: So, I'm creating a box using JavaScript and then I want to set said box's width and height using two form inputs, one for width and one for height. I can't seem to make that happen. Here's the HTML code: Box Width: Box Height: Here's the JS code: var form = document.getElementById("theForm"), box = document.createElement("div"); document.body.appendChild(box); form.addEventListener("submit", function() { var width = form.elements["width"].value, height = form.elements["height"].value; box.style.width = width + "px"; box.style.height = height + "px"; }); Seems to work fine when I set the width and height manually but not when I try to get it from the input. I'm pretty new to JS so any help would be greatly appreciated.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29419982
tagged with: css
has answer: http://stackoverflow.com/a/29419867
type: AnsweredQuestion
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47011559
score: 1
possible better answer: http://stackoverflow.com/a/29419867
answer count: 3
has title: JS - How can I set a div's width and height from an input value?
downvote count: 0

http://stackoverflow.com/comment/47046870
type: QuestionComment
comment on: http://stackoverflow.com/q/29438527
has text: are you planning to make the function globally available?
score: 0
type: Comment

http://stackoverflow.com/q/29454470
has answer: http://stackoverflow.com/a/29456443
answer count: 2
tagged with: functional-programming
downvote count: 0
has comment: http://stackoverflow.com/comment/47074256
favorite count: 0
has comment: http://stackoverflow.com/comment/47074234
has title: Is there a way to do variadic recursive currying in Javascript?
has comment: http://stackoverflow.com/comment/47074305
possible better answer: http://stackoverflow.com/a/29454560
accepted answer: http://stackoverflow.com/a/29456443
has comment: http://stackoverflow.com/comment/47074158
has answer: http://stackoverflow.com/a/29454560
type: AnsweredQuestion
tagged with: recursion
score: 1
upvote count: 1
has body: I know that there probably wouldn't be any reason to use this over some other way of creating a variadic function, but is it semantically possible to define something to do this? For example, it could be called like sum(1)(2)(3)();. I attempted to implement it with the following code: function sum(x) { return function(y) { if (!y) return 0; else return x + sum(y); }; } However, when called this gives TypeError: string is not a function. What would cause this to return a string? When I inspected it more closely, it looked like it was returning the code for the function as a string, which makes no sense to me. That said, I am not extensively familiar with the semantics of intricate JavaScript, so I could be missing some huge concept in it.
type: Question
tagged with: currying
has comment: http://stackoverflow.com/comment/47074188
tagged with: javascript

http://stackoverflow.com/comment/47035926
has text: I'm not exactly sure what you mean by "no longer exits", but if that is all of the code you have then there isn't anything it is doing to keep this code running. The [`dataSource.disconnect()` method](https://github.com/strongloop/loopback-datasource-juggler/blob/9083370e175c3d07ed19facdc709c5d2c987e10e/lib/datasource.js#L1745-L1757) just calls the mysql connector's `disconnect()` method which in turn just calls the mysql library's [`end()` method](https://github.com/strongloop/loopback-connector-mysql/blob/2a249beb77ecd3cb24c38071ab22629e290a1353/lib/mysql.js#L1288-L1295).
comment on: http://stackoverflow.com/q/29421680
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29488287
has comment: http://stackoverflow.com/comment/61548453
downvote count: 0
tagged with: mongoose
tagged with: javascript
has title: Mongoose TypeError: object is not a function when instantiating object of a schema type
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29488349
upvote count: 2
type: UnansweredQuestion
has body: the issue i'm having is that mongoose isn't letting me instantiate an object of a schema type, inside a 'pre' method, of a different schema. I've got 2 schemas - 'User' and 'Tickit'. User.js var mongoose = require('mongoose'); var bcrypt = require('bcrypt-nodejs'); var Schema = mongoose.Schema; var Tickit = require('../models/Tickit'); var userSchema = new Schema({ email : String, password : String, tickits : [Tickit.tickitSchema] }); userSchema.methods.generateHash = function(password) { return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null); }; userSchema.methods.validPassword = function(password) { return bcrypt.compareSync(password, this.password); }; module.exports = mongoose.model('User', userSchema); and Tickit.js var mongoose = require('mongoose'); var User = require('../models/User'); var Schema = mongoose.Schema; var tickitSchema = new Schema({ title: String, description: String, author : { type: Schema.Types.ObjectId, ref: 'User' }, comments: [{body:"string", by: mongoose.Schema.Types.ObjectId}] }); tickitSchema.pre('save', function(next){ var user = new User(); user.tickits.push ({id:this._id}); user.save(function(err){ if(err) res.send(err) .populate('tickits') .exec(function(err, blah){ if(err) res.send(err); }) res.json(blah); }) next(); }) module.exports = mongoose.model('Tickit', tickitSchema); What i'm trying to do with the pre method in Tickit is populate the 'Tickits' array in the User schema with the id of that Tickit every time a Tickit is created. However in my app when I do create a tickit, the app crashes and I get this error var user = new User(); ^ TypeError: object is not a function
tagged with: node.js
score: 2
type: Question
tagged with: mongodb

http://stackoverflow.com/comment/47156180
type: AnswerComment
comment on: http://stackoverflow.com/a/29498561
score: 0
type: Comment
has text: If they clicked on a button or a tag outside of the drawer, wouldn't e.target.length actually be greater than 0? The whole reason I'm trying to figure it out this way is so I can close the drawer and activate anything they clicked on at the same time.

http://stackoverflow.com/q/29410746
upvote count: 20
has comment: http://stackoverflow.com/comment/98183508
has answer: http://stackoverflow.com/a/29494252
score: 19
has comment: http://stackoverflow.com/comment/47336754
answer count: 4
type: AnsweredQuestion
has title: Sanitizing HTML input value
has comment: http://stackoverflow.com/comment/98183332
has answer: http://stackoverflow.com/a/29517464
downvote count: 1
type: Question
has body: Do you have to convert anything besides the quotes (") to (&amp;quot;) inside of: &lt;input type="text" value="$var"&gt; I personally do not see how you can possibly break out of that without using " on*=.... Is this correct? Edit: Apparently some people think my question is too vague; &lt;input type="text" value="&lt;script&gt;alert(0)&lt;/script&gt;"&gt; does not execute. Thus, making it impossible to break out of using without the usage of ". Is this correct?
has answer: http://stackoverflow.com/a/29493612
accepted answer: http://stackoverflow.com/a/29493612
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29494252
has answer: http://stackoverflow.com/a/29471231
linked to: http://stackoverflow.com/q/3126072
tagged with: xss
tagged with: security
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/a/29413945
type: Answer
has body: is doing the following the same? Yes, let foo; if ((foo = bar) === baz) is the same as let foo = bar; if (foo === baz) In which situations I should assign the value of a variable like in the first example? When you want to do an amazing one-liner in code golf. It's only really useful to write it like this very occasionally in the condition of a loop so you don't have to repeat code e.g. consider foo = bar(); while (false !== foo) { // .. foo = bar(); } vs while (false !== (foo = bar())) { // .. } Doing it for an if is just not necessary
has comment: http://stackoverflow.com/comment/47007395
answers question: http://stackoverflow.com/q/29413790
has comment: http://stackoverflow.com/comment/47002985
has comment: http://stackoverflow.com/comment/47007284
score: 4
upvote count: 4
downvote count: 0

http://stackoverflow.com/a/29516913
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29516829
has body: try $(document).ready(function() { $("#goal option").filter(function() { return $(this).val() == $("#reason").val(); }).attr('selected', true); $("#goal").on("change", function() { $("#reason").val($(this).find("option:selected").attr("value")); }); });

http://stackoverflow.com/comment/46933954
type: QuestionComment
has text: Do you mean you should pass `n` to a function, and return the sum of N, until > 1? If so, that's easy. Just make the scope of `summ` be greater than the function, and call it if `num > 0`
score: 0
comment on: http://stackoverflow.com/q/29376702
type: Comment

http://stackoverflow.com/comment/46976747
has text: I have refactored your code in my answer, should work now :)
comment on: http://stackoverflow.com/q/29399279
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29470470
has answer: http://stackoverflow.com/a/29470843
tagged with: arrays
tagged with: javascript
has body: I have a problem alerting out 2 arrays on same line in Javascript. The user should write Movie name and movie rating(1-5) 5 times, and printMovies() function should print out users (movie)name and (movie)rating in a single line something like this: Movie Rating Star Wars 5 Lord of the Rings 4 Casino 4 Movie4 3 Movie5 2 How do I alert out all of five inputs in a single line (movie + rating) per line, AFTER they have got input from user? //CODE var title; var rating; var a = []; var movies = []; var ratings = []; function buttonAddMovie()//Button onclick { addMovie(title, rating) addMovie(title, rating) addMovie(title, rating) addMovie(title, rating) addMovie(title, rating) } function addMovie(title, rating) { do{ title = prompt("Enter movie: "); } while (title == ""); do { rating = parseInt(prompt("Enter rating 1-5 on movie " + (title))); } while (rating &gt; 5 || rating &lt; 1); movies.push(title);//Pushing title to movies a.push(movies);//Pushing movies to a array ratings.push(rating);//Pushing rating to ratings a.push(ratings);//Pushing ratings to a array printMovies() } function printMovies() { for (var i = 0; i &lt; a.length; i++) { alert(a[0][0] + " " + a[0][1]);//Here is my biggest problem! } }
has title: alert 2 arrays in same line javascript
answer count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29470758
has answer: http://stackoverflow.com/a/29470629
score: 0
type: Question

cryptography
tags question: http://stackoverflow.com/q/29432506
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/29492977
tags question: http://stackoverflow.com/q/29448968

http://stackoverflow.com/comment/47124192
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29475966
has text: Hi I have edited the question now. It was a typo error. I am not adding any sorting logic as of now. I am just binding the data I receive to my table. The default sort gives me the order (20), (30), 20 which I dont want. Instead I need it to be 20, (20) and (30) in ascending
score: 0

store
tags question: http://stackoverflow.com/q/29409842
tags question: http://stackoverflow.com/q/29377825
tags question: http://stackoverflow.com/q/29482682
tags question: http://stackoverflow.com/q/29428200
tag name: store
type: Tag

http://stackoverflow.com/q/29517560
has answer: http://stackoverflow.com/a/29517863
upvote count: 0
has body: This is probably super amateur but I'm having a brain fart. I want to place a form field on a page that redirects to a specific page, based on the data entered in to the field. For example, if a user enters dave and hits submit, they will be redirected to dave.html... if the user enters 1234, they will be redirected to 1234.html. I'm using sky-forms, and as far as I know this could be as simple as adding an if function to the script... any suggestions? Thanks in advance. Enter Quote Number
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47190554
has comment: http://stackoverflow.com/comment/47190627
score: -1
tagged with: forms
type: Question
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/29517863
has comment: http://stackoverflow.com/comment/47190576
has title: Form To Redirect To A Page, Based On Data Entered
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/comment/47015032
type: Comment
type: QuestionComment
has text: Looks fine actually, are you sure you dropped the javascript files in the correct localtion? Any errors when you hit F12 to popup devtools ?
comment on: http://stackoverflow.com/q/29406060
score: 0

http://stackoverflow.com/comment/47020948
comment on: http://stackoverflow.com/q/29424778
score: 0
type: Comment
type: QuestionComment
has text: @Barmar - so did I at first, but I think it is that he's trying to access the JSON in a sain way, using the names as keys to get the values, but if he stops encoding to JSON, it works out of the box

http://stackoverflow.com/q/29488449
has body: I 'd like to parse some JavasScript code to list all methods for a given "class" using uglify js 2. In my case the TreeWalker returns a node with name : null and there is no information that allow conclusions to parent. Does anyone know a different approach? I expected something like name : "Test.method_name" So far I tryied the folowing... parsetests.js var UglifyJS = require("uglify-js2"); var util = require("util"); var code = require("fs").readFileSync("test.js").toString(); var toplevel = UglifyJS.parse(code); var log = function(obj, depth) { console.log(util.inspect(obj, showHidden=false, depth, colorize=true)); }; var toplevel = UglifyJS.parse(code); var walker = new UglifyJS.TreeWalker(function(node){ if (node instanceof UglifyJS.AST_Function ) { log(node, 2); } }); toplevel.walk(walker); test.js function Test(argument1) { var m = argument1 + "test"; return this; } Test.prototype.method_name = function(first_argument) { // body... return "a"; }; UglifyJS.TreeWalker node: { end: { file: null, comments_before: [], nlb: true, endpos: 156, pos: 155, col: 0, line: 10, value: '}', type: 'punc' }, start: { file: null, comments_before: [], nlb: false, endpos: 111, pos: 103, col: 29, line: 7, value: 'function', type: 'keyword' }, body: [ { end: [Object], start: [Object], value: [Object] } ], cname: undefined, enclosed: undefined, parent_scope: undefined, uses_eval: undefined, uses_with: undefined, functions: undefined, variables: undefined, directives: undefined, uses_arguments: undefined, argnames: [ { end: [Object], start: [Object], thedef: undefined, name: 'first_argument', scope: undefined, init: undefined } ], name: null }
tagged with: uglifyjs2
tagged with: node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29630300
has answer: http://stackoverflow.com/a/29630300
has title: How to parse and iterate prototype methods with Uglify.js?
accepted answer: http://stackoverflow.com/a/29638418
type: Question
upvote count: 12
tagged with: javascript
tagged with: prototype
score: 12
answer count: 2
has comment: http://stackoverflow.com/comment/47315850
downvote count: 0
has comment: http://stackoverflow.com/comment/47354789
has answer: http://stackoverflow.com/a/29638418
favorite count: 0

http://stackoverflow.com/a/29470098
answers question: http://stackoverflow.com/q/29448475
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29448475
has body: All is fixed, had the app.js git ignored so it worked locally but it wasn't uploaded.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/46957817
type: Comment
comment on: http://stackoverflow.com/a/29390293
has text: the thing is.. i am testing this in jsfiddle and allways get errors when using createtextrange stuff...
score: 0
type: AnswerComment

http://stackoverflow.com/a/29431440
has comment: http://stackoverflow.com/comment/47032245
has comment: http://stackoverflow.com/comment/47063989
answers question: http://stackoverflow.com/q/29430830
score: 0
has comment: http://stackoverflow.com/comment/47032830
type: Answer
has body: var ChildComponent = React.createClass({ render: function () { var myCustomValue = "testing this out"; return ( Testing child click function ) } }); var ParentComponent = React.createClass({ customEvent: function (value) { // do something wtih value alert("you passed " + value); }, render: function () { return ( <ChildComponent customEvent={this.customEvent} /> ) } }); React.render( <ParentComponent customEvent={this.customEvent} />, document.getElementById('example') )

http://stackoverflow.com/comment/47146874
score: 0
type: QuestionComment
type: Comment
has text: @RightClick will the answer change in the case I know for certain that each item will be clicked?
comment on: http://stackoverflow.com/q/29493918

http://stackoverflow.com/comment/47004558
type: AnswerComment
has text: I just searched something like "jQuery find element by attribute" It's just a jQuery selector, not specific to `.find`. And yes, jQuery is on the page for this lookup by attribute, for `.find()` only allows tag lookup for jqLite in Angular world.
comment on: http://stackoverflow.com/a/29415788
type: Comment
score: 0

http://stackoverflow.com/a/39228391
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29529180
type: Answer
has body: Don't know if you solved this problem but I did a trick that's working well for me ( at least for the navigation bar ) Here's the snippet : self.addEventListener('scroll',function(e){ if(e.contentOffset.y &gt; 20) NavigationWindow.window.hideNavBar(); if(e.contentOffset.y &lt; 20) NavigationWindow.window.showNavBar(); }); NavigationWindow is an instance of Ti.UI.iOS.createNavigationWindow, self can be a tableview,view,scrollview or a window ( in my example )

http://stackoverflow.com/q/29402179
linked to: http://stackoverflow.com/q/20407579
tagged with: http://stackoverflow.com/tag/html
has title: Using google sheet as database in only google drive
favorite count: 0
tagged with: google-drive-api
type: AnsweredQuestion
score: 3
upvote count: 3
linked to: http://stackoverflow.com/q/20851420
type: Question
tagged with: google-sheets-api
has answer: http://stackoverflow.com/a/29403426
accepted answer: http://stackoverflow.com/a/29403426
tagged with: google-sheets
downvote count: 0
answer count: 1
tagged with: javascript
has body: I've been researching javascript, jquery, xml, google scripts, and the google spreadsheet api, with little luck. I'm trying to create a website that uses a google spreadsheet as a database. It needs to run on a chrome book. Hosting sites on google drive doesn't seem to allow jquery. So I can only use html, css, and javascript, that I know of. I usually create asp.net sites with a C# backend, but I can't seem to figure out how to even get data from a published google spreadsheet to display on a google drive hosted website. Do any of you have a path that you would suggest? I'm all for researching myself but I need a good starting point which I have yet to find. Thanks

http://stackoverflow.com/comment/47543065
comment on: http://stackoverflow.com/q/29487133
has text: Would something like the dynamic events work? https://developers.facebook.com/docs/ads-for-websites/tag-api#dynamicevents ie Once the purchase button is clicked activate the pixels and issue a callback?
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29523461
type: UnansweredQuestion
tagged with: resource-leak
has comment: http://stackoverflow.com/comment/47202251
score: 1
has comment: http://stackoverflow.com/comment/47203165
has comment: http://stackoverflow.com/comment/47201527
has comment: http://stackoverflow.com/comment/47202489
type: Question
upvote count: 1
downvote count: 0
has body: I tested for memory leaks with chrome dev tools and garbage collector is doing its job, so there s no circular references. This is such a weird issue, and i don't know what to do anymore. A simple jQuery call $(e).css("top", 'any value other than current'); will cause the browser to allocate ~5-200mb memory to the tab! Eventually it crashes after maxing out at around 700mb. This happens to all the elements I've tested on different pages. When trying on ie, it would also eventually crash, although memory usage was not reflected in the task manager as it was with chrome. Any ideas what the issue could be? How can I go about analyzing it further.
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Changing objects' css property with jquery causes insane memory increase
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47201643
tagged with: css
answer count: 0

http://stackoverflow.com/a/29568422
has comment: http://stackoverflow.com/comment/47378916
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29411271
score: 1
has body: Well, your excerpt of gulp-uncss/index.js states, that it can not handle an undefined options parameter - which it is not in you gulpfile: .pipe(p.if('*.css', p.uncss({ html: [ '*.html' ] // html files to check for styles to keep }) )) The doc also states, that html is an required option attribute: npmjs.com/package/gulp-uncss#html Type: Array|String Required value. An array which can contain an array of files relative to your gulpfile.js, and which can also contain URLs. Note that if you are to pass URLs here, then the task will take much longer to complete. If you want to pass some HTML directly into the task instead, you can specify it here as a string.

http://stackoverflow.com/comment/47175327
comment on: http://stackoverflow.com/a/29507860
type: Comment
has text: I tried this piece of code,but seems like the way i want to open that specific detail view is wrong.Because when i tried this: window.open("./index.html") it opened the page wher in i can see my master-detail page.So can you tell me what should be the url for detail page look like?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47010486
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29418878
type: Comment
has text: $apply is specifically used for that purpose - running code from outside angular bounds.

http://stackoverflow.com/q/29509366
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47175183
has body: I have a link that lieds me to specific on my page. This is a page content. When i click on link, send me to specific place on my page (title of table). I'd like, that when i click on that link, the (title of table) is colored red. Then when i click on another link (another and another title of table) previous is colored back in black and new is colored red...etc. This is my code so far: Refresh page Page content: link to one link to two link to three link to four link to five one two three four five So when i click on "link to one" page moves me to with id="one" and title "one" must be colored red. If i click now on "link to three", page moves me to with id="three" and title "three" must be colored red, title "one" must be colored in default color, so black in this case. I also need a refresh button, when i click on this button, all colors of titles are set to default (black) color. Thanks for or the help
type: Question
accepted answer: http://stackoverflow.com/a/29509647
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29509740
tagged with: jquery
has answer: http://stackoverflow.com/a/29509740
score: 0
has title: How to change color of div on link click and then when other link is clicked, another div changes color, previous is set to default color
answer count: 2
tagged with: colors
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47175061
has answer: http://stackoverflow.com/a/29509647
tagged with: css

http://stackoverflow.com/q/29376675
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29376824
tagged with: onclick
downvote count: 1
has body: How to do that when you click on the link did not work event. Example: HTML message and link http://example.com/abcde I clicked http://example.com/abcde and working location.href, how to make when you press on the link to the event did not work location.href?
type: Question
tagged with: javascript
score: -1
answer count: 2
upvote count: 0
has title: Click on link without the basic message
has answer: http://stackoverflow.com/a/29422787
tagged with: dom-events

http://stackoverflow.com/comment/47087698
type: Comment
has text: Then I´d go with sensible selectors, as you would when styling the buttons with css.
score: 0
comment on: http://stackoverflow.com/a/29439836
type: AnswerComment

http://stackoverflow.com/q/29434308
tagged with: javascript
tagged with: forms
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/12944329
has answer: http://stackoverflow.com/a/29439057
type: Question
tagged with: php
has title: PHP loop with html forms and javascript submit button only submitting last form in loop
score: 0
accepted answer: http://stackoverflow.com/a/29439057
has body: I have a PHP loop that displays multiple HTML forms. I have javascript onClick for the submit button. I am attempting to cause the submit button on each form to only submit the form it belongs to. My problem is after the loop displays several forms only the very last form displayed from the loop will submit. Any forms previous to the last form in the loop do not submit when the submit button is clicked. I did find some helpful information over at Post form in while loop with javascript submit and also at add onclick function to a submit button and these did help me in my attempt but they did not help me to solve this problem I ran into. Any suggestions would be greatly appreciated. Here is the javascript in the head section: &lt;!-- Script to fire uploaded photos form bound to unique id --&gt; &lt;script&gt; function submitForm(image_id) { document.forms[image_id].submit(); return false; } &lt;/script&gt; &lt;!-- End of script to fire uploaded photos form bound to unique id --&gt; Here is the PHP loop and form: &lt;div id="uploaded-photos"&gt; &lt;!-- Start of Uploaded Photos --&gt; &lt;?php // Selecting all images from the database $select_images = "select * from files where email = '$_SESSION[email]'"; $run_images = mysqli_query($conn, $select_images); while($row=mysqli_fetch_array($run_images)){ // Creating variables for post id, title, date, author, image, keywords and content $image_name = $row['name']; $image_description = $row['description']; $image_title = $row['title']; $image_directory_name = $row['image_directory_name']; $image_keywords = $row['keywords']; $image_privacy = $row['privacy']; $image_id = $row['id']; ?&gt; &lt;div id="uploaded-photos-individual"&gt; &lt;div id="uploaded_photos_image_wrapper"&gt; &lt;form method="post" name="&lt;?php echo "$image_id"; ?&gt;" action="nonadmin_user_profile.php"&gt; &lt;p class="av-radio2"&gt;&lt;img src="../photo-uploads/server/php/files/&lt;?php echo "$image_directory_name"; ?&gt;/thumbnail/&lt;?php echo "$imag…
answer count: 1
linked to: http://stackoverflow.com/q/15107012

http://stackoverflow.com/comment/47053797
has text: replacing `\"` to `\\"` works for me. By the way, the above string works correctly [Here](https://www.jsoneditoronline.org/)
comment on: http://stackoverflow.com/a/29442939
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/47161458
comment on: http://stackoverflow.com/a/29501114
type: AnswerComment
has text: doesn't support ie8, but i will definitely consider using it after finding a cross-browser solution
score: 0
type: Comment

http://stackoverflow.com/q/29445546
type: Question
linked to: http://stackoverflow.com/q/2988050
has body: I have looked all over but nothing so far. I'm stuck. I have an html audio element and I want to control it with a div. When I click on the div it plays the music, but what I need is when I click on it again to stop playing but don't know how. This is audio tag. &lt;audio class="audioplayer" preload="none" style="display: none;" &gt; &lt;source src="audio/ocean.mp3" type="audio/mpeg"&gt; &lt;/audio&gt; And this is jquery controlling the play with the div (#ocean). $('#ocean').click(function() { if ('.audioDemo'.paused == false) { $(".audioDemo").trigger('pause'); } else { $(".audioDemo").trigger('play'); } }); function stopAudio(){ $(".audioDemo").trigger('pause'); //pause playing $(".audioDemo").prop("currentTime",0); //set play time to 0 } I have wrote stop function and it works but only if I hock it up on another div. I have tried with that .paused but its not working. How can I use same div as play and stop? THX
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/47058282
possible better answer: http://stackoverflow.com/a/29445635
has answer: http://stackoverflow.com/a/29445635
has title: One div two functions in jquery
accepted answer: http://stackoverflow.com/a/29445581
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47058244
has comment: http://stackoverflow.com/comment/47058297
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: html5-audio
has answer: http://stackoverflow.com/a/29445581
upvote count: 3

http://stackoverflow.com/q/29501452
tagged with: php
has title: Using X-editable with CodeIgniter 3 CSRF issue
has answer: http://stackoverflow.com/a/31475934
type: Question
tagged with: x-editable
tagged with: csrf
tagged with: javascript
has answer: http://stackoverflow.com/a/38234014
has answer: http://stackoverflow.com/a/31846871
score: 0
has body: I'm using CodeIgniter 3 with CSRF enabled. I have a page that is using X-editable library http://vitalets.github.io/x-editable/index.html to do inline editing on that page. Has anyone used X-editable with CodeIgniter and CSRF turned on? My issue is when I have CSRF enabled I get the following CodeIgniter generated error: An Error Was Encountered The action you have requested is not allowed. It works fine if I disable CSRF in CI. What I do know is that I can't figure out a way to add a hidden field with the CSRF token when using the X-editable library, because the javascript library adds it's own form and form fields. I know that CI's open_form() method adds the hidden field with the CSRF token automatically, but I have no option to use that with this particular library. Any ideas? I have been stuck on this for a few days now. This is the config.php file in my CI project $config['csrf_protection'] = TRUE; $config['csrf_token_name'] = 'mycsrfname'; $config['csrf_cookie_name'] = 'csrfcookiename'; $config['csrf_expire'] = 7200; $config['csrf_regenerate'] = TRUE; $config['csrf_exclude_uris'] = array(); This is in the controller $name = $this->input->post('name'); $value = $this->input->post('value'); $pk = $this->input->post('pk'); $result = $this->garage_model->editItem($name,$value,$pk);
answer count: 3
type: UnansweredQuestion
tagged with: codeigniter

http://stackoverflow.com/comment/46973031
comment on: http://stackoverflow.com/q/29398444
score: 0
type: Comment
type: QuestionComment
has text: Which mobile/browser?

http://stackoverflow.com/q/29443633
tagged with: facebook
tagged with: facebook-javascript-sdk
has answer: http://stackoverflow.com/a/29490076
type: Question
has title: Facebook permissions and null data handling
tagged with: javascript
score: 0
answer count: 1
has body: I have to issues I have come across with regards to Facebook Login - 1st being - Above are 2 images of a users Facebook app settings (Facebook>>settings>>apps>>{select an app}) As seen in the Asphalt app next to each permission is a (required) tag. But incase of my app there is no (required) tag next to the email permission even though I'am explicitly asking for these perms in the javascript sdk during FB.login(). Any idea how I can get these perms to be required by default or what am I missing ?? 2nd being - In another case (very) few users seem to have granted all perms (that is accepted the fb app in the fb dialog box) but for some reason their public_info and/or email seems to be unchecked in the respective user settings under the app dialog/modal as in the above image. Is this a bug?
tagged with: facebook-graph-api
tagged with: facebook-php-sdk
type: UnansweredQuestion

http://stackoverflow.com/q/29411460
tagged with: ionic-framework
has body: Working with ionic version 1.3.18 I've got a slide box working fine, but I'll probably need to put quite a bit of content into each slide so I was wondering if it were possible to have a separate file for each slide like the way you can with ionic tabs? Attempting the following: &lt;ion-slide href="#/slide1"&gt; didn't do the trick.
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: cordova
score: 1
tagged with: hybrid-mobile-app
upvote count: 1
has answer: http://stackoverflow.com/a/29414889
type: Question
has title: Different HTML files for each slide in ionic slide box
tagged with: javascript

http://stackoverflow.com/comment/47086508
score: 0
comment on: http://stackoverflow.com/q/29459508
type: QuestionComment
type: Comment
has text: Two things. One, why not just use the native validation functions and supply it your own? this way it colors correctly. Second, after you delete a row, could you try this for me? Make another change and hit enter. Did the color fix itself?

http://stackoverflow.com/q/29529542
score: 1
has title: Test if index value equals multiples of a certain number
type: Question
has body: Trying to come better way to test the index value for a multiple of a certain value, lets say 10 in this case. The following is obviously not ideal. Looking for a better method. (Having mental block at the moment.) $('.element').each(function(i){ if (i==9 || i==19 || i == 29 || etc... ){ alert('condition met'); } });
tagged with: javascript
tagged with: jquery
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/29529555
favorite count: 0
has comment: http://stackoverflow.com/comment/47213010
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/46989763
type: AnswerComment
has text: @AvinashRaj your update works great! I have one question: why doesn't the replace method delete the `\D` in the process? is it the $1?
type: Comment
comment on: http://stackoverflow.com/a/29407749
score: 0

http://stackoverflow.com/comment/47141474
comment on: http://stackoverflow.com/a/29489495
score: 0
type: AnswerComment
has text: This is a good answer, I was able to modify it and apply it to my problem and it worked. I just stringifyied my var in form data then json decoded it the other end.
type: Comment

http://stackoverflow.com/a/29499832
type: AcceptedAnswer
downvote count: 0
has body: The hoisting happens as part of establishing the execution context: Call When the Call internal method for a Function object F is called with a this value and a list of arguments, the following steps are taken: Let funcCtx be the result of establishing a new execution context for function code using the value of F's FormalParameters internal property, the passed arguments List args, and the this value as described in 10.4.3. Let result be the result of evaluating the FunctionBody that is the value of F's Code internal property. If F does not have a Code internal property or if its value is an empty FunctionBody, then result is (normal, undefined, empty). [...] So, when a function is executed, first its execution context is created and then the function body is evaluated. How that happens is described in section 10.4.3: Entering Function Code The following steps are performed when control enters the execution context for function code contained in function object F, a caller provided thisArg, and a caller provided argumentsList: If the function code is strict code, set the ThisBinding to thisArg. Else if thisArg is null or undefined, set the ThisBinding to the global object. Else if Type(thisArg) is not Object, set the ThisBinding to ToObject(thisArg). Else set the ThisBinding to thisArg. Let localEnv be the result of calling NewDeclarativeEnvironment passing the value of the Scope internal property of F as the argument. Set the LexicalEnvironment to localEnv. Set the VariableEnvironment to localEnv. Let code be the value of F’s Code internal property. Perform Declaration Binding Instantiation using the function code code and argumentsList as described in 10.5. The hoisting happens in step 9 and is explained in detail in section 10.5. Specifically: 5. For each FunctionDeclaration f in code, in source text order do ... [...] 8. For each VariableDeclaration and VariableDeclarationNoIn d in code, in source text order do ... So function declar…
type: Answer
score: 4
accepted answer of: http://stackoverflow.com/q/29499473
upvote count: 4
answers question: http://stackoverflow.com/q/29499473

http://stackoverflow.com/a/29522668
type: AcceptedAnswer
has body: You'll have to precache a fixed number of tweets and then scroll through them. The API offers no way to 'skip' over tweets you've already seen. var config1 = { "id": '585817037076725762', "domId": 'twitterfeed', "maxTweets": 1000, "enableLinks": true, "customCallback": gotTweets }; twitterFetcher.fetch(config1); var tweets = []; var i = 0; function gotTweets(data){ tweets = data; }; function showNextTweet() { document.getElementById("twitterfeed").innerHTML = tweets[i]; i++; console.log("Showing tweet " + (i+1)); } setInterval(showNextTweet, 1000);
type: Answer
accepted answer of: http://stackoverflow.com/q/29522245
has comment: http://stackoverflow.com/comment/47212428
has comment: http://stackoverflow.com/comment/47238282
answers question: http://stackoverflow.com/q/29522245
score: 0

http://stackoverflow.com/a/29528659
type: Answer
score: 1
upvote count: 1
has body: Here's how you can sum up the values: var total = 0; $(".change-handled").each(function(index, box) { total += parseInt($(box).val(), 10); }); You would then display them by using the text or html functions provided by jQuery on elements. This can be used from anywhere in your code, including the event handler.
answers question: http://stackoverflow.com/q/29528611
downvote count: 0

html-table
tags question: http://stackoverflow.com/q/29430578
tag name: html-table
tags question: http://stackoverflow.com/q/29456641
tags question: http://stackoverflow.com/q/29415370
tags question: http://stackoverflow.com/q/29467607
tags question: http://stackoverflow.com/q/29499952
type: Tag
tags question: http://stackoverflow.com/q/29429416

http://stackoverflow.com/comment/47120106
has text: Interesting... So you want nginx to just run the command, and then respond with the output? This seems like a funky way to accomplish what you're trying to do. It's actually pretty difficult in nginx to run oldschool cgi scripts. You can use a `HttpLuaModule` to run a command I guess.
score: 0
comment on: http://stackoverflow.com/q/29479513
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29479060
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29481170
has answer: http://stackoverflow.com/a/30394041
answer count: 2
has title: Copy file from application folder to root folder in JQM/Phonegap App?
favorite count: 0
tagged with: cordova
upvote count: 2
has body: I have seen a couple different examples of how to copy files from one directory to another using the Phonegap File API but am having trouble copying a file from my application folder to an existing folder in the root directory. The File API documentation is really vague and I keep getting file not found in the application directory. I can access the sdcard root folder file:///storage/emulated/0/ using root.toURL() and read and write to it, I just cant seem to access my application folder. permission in Phonegap Build config file. &lt;gap:plugin name="org.apache.cordova.file" version="1.3.1" /&gt; &lt;preference name="iosExtraFilesystems" value="library,library-nosync,documents,documents-nosync,cache,bundle,root" /&gt; &lt;preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,cache,cache-external,root" /&gt; Any help or examples would be great. Thanks, RG wwwPath = cordova.file.applicationDirectory; var fp = "temp/myfile.txt"; var fileDestPath = "tempFolder/"; function copyFile(){ var basePath = wwwPath+fp; window.resolveLocalFileSystemURL(basePath, function(fileEntry){ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) { var copyToPath = fileSystem.root.toURL()+fileDestPath; fileEntry.copyTo(copyToPath, 'newFileName.txt', function(){ alert("file copy success"); },fileCopyFail); },fileCopyFail); },fileCopyFail); function fileCopyFail(error) { alert(error); }
type: UnansweredQuestion
tagged with: phonegap-build
tagged with: android
score: 2

http://stackoverflow.com/comment/47012326
comment on: http://stackoverflow.com/q/29420179
type: Comment
type: QuestionComment
score: 1
has text: seems like there is no issue other than `exit` which does not prevent it to display the alert box: http://jsfiddle.net/dxwmu4ub/

http://stackoverflow.com/q/29438415
tagged with: javascript
tagged with: html2canvas
tagged with: jquery
has answer: http://stackoverflow.com/a/29440729
tagged with: html5-canvas
score: 0
type: UnansweredQuestion
has body: I have a div with a background image set, on top of that I have a HTML canvas where I allow people to stick their own image and edit the size and position. (Essentially like a t-shirt design tool - TeeSpring) I want to be able to combine the div and canvas and download it as an image. How would I do this? (Preferably using javascript/jquery). I've tried using html2canvas and cavas2image but it didn't download the image in the canvas nor the background image of the div. Below is the HTML I have for div + canvas: &lt;div id="bottle-designer"&gt; &lt;canvas id="editorCanvas" width="100" height="275"&gt;&lt;/canvas&gt; &lt;/div&gt;
has title: Download Div & Canvas As One Image
type: Question
answer count: 1

http://stackoverflow.com/comment/46929315
has text: This: `var c = document.getElementById("prod");` not this: `var c = document.getElementById("prod").value;`. Notice I removed the `value` property.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29374352
score: 0

http://stackoverflow.com/q/29391920
type: Question
has comment: http://stackoverflow.com/comment/46960865
accepted answer: http://stackoverflow.com/a/29392215
has body: Here is the deal: I have a form, that takes quite some time to submit, because I'm waiting for some third party web services. So what I'm trying to achieve is, that after the submit button is clicked, it gets disabled, is assigned a special class and if it takes more than 5 seconds to submit the form, a notice is displayed. I've came up with this: $('#register_index_button').click(function(){ $(this).addClass('bt_button_loader'); $(this).val('Please wait'); $(this).attr('disabled', 'disabled'); $('#register_index_form').submit(); //it takes more than 5 seconds, display notice setTimeout(function() { $('#notice').html('Still waiting ...'); }, 5000); }); Everything works fine, except the timeout function. I guess after I submit the form with jQuery, everything else after that is ignored? Thank you for your help!
has answer: http://stackoverflow.com/a/29392064
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29392215
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46960938
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29392064
has answer: http://stackoverflow.com/a/29393186
has comment: http://stackoverflow.com/comment/46960945
type: AnsweredQuestion
has title: setTimeOut AFTER jQuery form submit
has comment: http://stackoverflow.com/comment/46960877
tagged with: forms

http://stackoverflow.com/comment/47007623
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29417709
has text: is `mobilelabel_5961` a variable in your javascript, or is it the `id` or `class` of the label? My guess is the latter, so, `$('#mobilelabel_596')` or `$('.mobilelabel_596')`
score: 0

http://stackoverflow.com/a/29425859
has comment: http://stackoverflow.com/comment/47022816
has comment: http://stackoverflow.com/comment/47022797
upvote count: 2
has comment: http://stackoverflow.com/comment/47022833
has comment: http://stackoverflow.com/comment/47022803
answers question: http://stackoverflow.com/q/29425837
has body: Your _this local variable created in your constructor function is local to that function &mdash; it won't be available in the other function. The good news is that you won't really need it - just use this in that .add() function. Local variables in constructor functions are no different than local variables in any other function. They're not magic, and they definitely won't be available to other functions added to the constructor's prototype. The reason for creating a _this or that or self copy of the value of this is to be able to create things like callback functions that need a reference to the outer context object. None of your code (posted here) needs that.
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47022793
has comment: http://stackoverflow.com/comment/47022844

http://stackoverflow.com/q/29512118
has title: Width differences in dynamic html table
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/21064101
tagged with: css
has comment: http://stackoverflow.com/comment/47192483
answer count: 2
possible better answer: http://stackoverflow.com/a/29512670
upvote count: 1
has answer: http://stackoverflow.com/a/29512398
has answer: http://stackoverflow.com/a/29512670
has comment: http://stackoverflow.com/comment/47180153
tagged with: javascript
has body: The problem I'm facing is the following. I've written a JavaScript function to make a scrollable table. The reason I use JavaScript is to spare me of the cross browser compatibility issues I'd have with CSS. Since the number of table-rows are quite limited, a maximum of 40 rows, the overhead of using JavaScript seems to be no issue. The code is shown here: function correctTableHeaderSize(){ var count = 0; var sizes = []; $("#table").find("th").each(function(){ sizes[count] = $(this)[0].clientWidth; count++; }); $("#table").find("tbody").children("tr").each(function(){ counter=0; $(this).children("td").each(function(){ if($(this).next().is("td")){ $(this).css('width',sizes[counter]); counter++; } }); }); $("#table").prop("hidden",false); } What it does: Get the width of all table headers (of table with id "table") and store these in an array for all rows in the table body, get the child cells and set there width to match the width of their corresponding table header. This worked fine until I noticed an annoying fact, that is starting to turn in to a serious problem. The table headers and the corresponding cells underneath are not the same size. They differ a few pixels. The wider the header gets, the greater this difference is. Using Firebug I noticed for example that a th element with a width of 30%, defined with inline css was translated to a scroll-width of 406px, this was also the value I've found in the array containing these widths, but after the JavaScript function finished the scroll-width of the corresponding table cells were 419px, while the css applied to this element shows a width of 406px. Somewhere, somehow 13px were added, although margin and padding for th and td are set to 0. The reason I checked the scroll-width is based on this topic explaining all sorts of width properties, this way I'm sure I take the total sizes into account. See the snippet for an example of the code. function correctTableColumns() { var count = 0; var sizes = []; $("#table").f…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47181687
accepted answer: http://stackoverflow.com/a/29512398
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
type: Question

http://stackoverflow.com/a/29407676
has comment: http://stackoverflow.com/comment/46989564
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46989835
type: Answer
score: 6
upvote count: 6
accepted answer of: http://stackoverflow.com/q/29407513
answers question: http://stackoverflow.com/q/29407513
has body: Well, because $scope.items[1] and { name: 'two', age: 27 } is totally different thing. { name: 'two', age: 27 } is a totally different object whereas $scope.items[1] is part of the object $scope.items When you put something in the template using {{}}, angular add it in its watcher list. SO when angular put it in the watch list, it was an object (i.e. { name: 'two', age: 27 } ) that is different than $scope.items. selectedItem is attached with the object that you set in the controller. In summary while dirty checking, angular will checks selectedItem against { name: 'two', age: 27 } NOT against $scope.items Hope you understand what I mean

http://stackoverflow.com/comment/47017200
type: AnswerComment
comment on: http://stackoverflow.com/a/29422704
type: Comment
has text: sorry, forgot, goto is not a statement. you can use "continue" with a label, which makes it act similar to a goto
score: 0

http://stackoverflow.com/comment/47073918
has text: The result to that is a blank space
type: Comment
comment on: http://stackoverflow.com/a/29454358
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47017859
comment on: http://stackoverflow.com/q/29423170
type: Comment
type: QuestionComment
score: 1
has text: You basically are stuck with doing `typeof` tests or `===` tests (in a way that works, as opposed to my deleted answer :)

http://stackoverflow.com/comment/47103844
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29471102
score: 1
has text: This would still help you http://stackoverflow.com/a/359910/2466168

http://stackoverflow.com/comment/46995548
score: 0
type: AnswerComment
has text: is it possible to zip the files and unzip it to by automation
type: Comment
comment on: http://stackoverflow.com/a/29405106

http://stackoverflow.com/comment/47088101
has text: Could it relate to inconsistent daylightsaving issue like in http://stackoverflow.com/questions/17559726/moment-js-timezones-and-daylight-savings ? DayLightSaving (DST) needs to be handled separately in some casea with isDST( ) function like in http://stackoverflow.com/questions/21918095/moment-js-how-to-detect-daylight-savings-time-and-add-one-day
comment on: http://stackoverflow.com/a/29461178
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47191683
has text: all of the same ones that `eval` has, AFAIK.
comment on: http://stackoverflow.com/a/29517782
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29450328
has comment: http://stackoverflow.com/comment/47066868
downvote count: 0
has comment: http://stackoverflow.com/comment/47066640
has comment: http://stackoverflow.com/comment/47066672
has comment: http://stackoverflow.com/comment/47066807
answers question: http://stackoverflow.com/q/29450293
has comment: http://stackoverflow.com/comment/47068168
has comment: http://stackoverflow.com/comment/47068051
type: Answer
has body: You are not using the filtered data when you add it to your #bubbles element. Note that data remains unchanged in the first line of your success function. You probably want something like: success: function(data){ var filtered_data = $(data).filter(".bubble").html(); $("#bubbles").empty(); $("#bubbles").append(filtered_data); } Note that the name of your url suggests that you are reloading your whole page with the ajax request and then using only a small part of it. You should make that small part a separate include in your original page and use that script to load using ajax so that you don't have to filter at all. That would also reduce the amount of data that needs to be sent and the redundant processing that is now done on the server and discarded right away.
has comment: http://stackoverflow.com/comment/47066787
has comment: http://stackoverflow.com/comment/47066749
score: 1
upvote count: 1

http://stackoverflow.com/a/29400371
accepted answer of: http://stackoverflow.com/q/29400298
has comment: http://stackoverflow.com/comment/46987425
type: Answer
has comment: http://stackoverflow.com/comment/46980729
answers question: http://stackoverflow.com/q/29400298
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46979599
has comment: http://stackoverflow.com/comment/46981864
has body: Browser is waiting on the response from your server. Try: app.post('/formdata', function(req, res) { console.log("You sent the name " + req.body.name + " and the address " + req.body.address); res.send("ok"); }); As for validation, usually you'd want to validate values both client side and server side. You can use something like this if you want to stick with express, or see here or here for a dual solution. Update for the ajax thing: You have a few errors in your code. 1) Typo in the 'success' hook (you typed 'sucess') 2) The way you call sendFormData() function, you both send ajax request and submit the form at the same time. Either intercept form submission, or change &lt;input type="submit" into &lt;input type="button" (so it doesn't trigger form submit) As for the error, you can only send ajax to the same server that initially served the page (without some additional effort). This is called "same origin policy". In your case, it looks like you're opening the page directly from disk using the 'file' protocol (url in the browser begins with file://). You need to have a real server serve your html, and then either set up 'same content origin' headers, or post back to the path on that same server (without the http://blabla... part). The easiest thing you can do to get this to work is: 1) Let node serve your static content (index.html in this case) app.use(bodyParser.json()); app.use(express.static('public')); 2) Move index.html into the 'public' directory, so that your file structure is: - sever.js - [public] |- index.html 3) Remove hardcoded url from your requests $.ajax({ type: "POST", url:"/test", data: formData, //... }); 4) Open http://localhost:3000/ in your browser
has comment: http://stackoverflow.com/comment/46980393
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47013428
has comment: http://stackoverflow.com/comment/46979743

http://stackoverflow.com/a/29448779
type: Answer
has comment: http://stackoverflow.com/comment/47064745
answers question: http://stackoverflow.com/q/29448487
has comment: http://stackoverflow.com/comment/47064850
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47064924
has comment: http://stackoverflow.com/comment/47065778
has comment: http://stackoverflow.com/comment/47064821
has body: To get the text selected in the page : window.getSelection().toString() I'll let it to your discretion to find how to use because frankly speaking, I've got no inspiration with that. But I suspect you might use it by storing the result in a var and pass it to your textform :). My try : http://jsfiddle.net/Bladepianist/Lj4x0xks/
downvote count: 0

http://stackoverflow.com/q/29426756
has title: How to build 2 dimensional array from a string of options for a select tag in Javascript?
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29427108
tagged with: arrays
tagged with: javascript
score: 0
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/29427164
has answer: http://stackoverflow.com/a/29427108
has body: In Javascript, I have a string of options for a select tag. This is my string: var myOptionsString = ' Self Service Administrator '; In Javascript, I want to convert it to a 2-dimensional Array where 1st dimension will store the id and 2nd dimension will store the text of an option. How can I do that? I am looking for Javascript solution; I am open to 3rd party solutions also like jQuery.
possible better answer: http://stackoverflow.com/a/29427164
has comment: http://stackoverflow.com/comment/47024617
type: AnsweredQuestion

http://stackoverflow.com/q/29416967
has body: I'm just learning revealing module patterns today and I'm doing OK so far. However I'm wondering if when a revealing module pattern function is called from within another revealing module pattern, can you return a value to the caller pattern function? For example I have a location module pattern that contains several functions, which I want another module pattern to use. Here is the code for it: Location Revealing Module Pattern // Revealing Modular pattern, containing functions relevant to location functionality var Location = (function(window, undefined){ // Gets co-ordinates of users current position (TRUE: Run geoLocate function, FALSE: Run geoError function) function getCoords(){ navigator.geolocation.getCurrentPosition(getLocation, provideError); } // Get users current location function getLocation(position){ var lat = position.coords.latitude; var lng = position.coords.longitude; // Convert seperate variables into one string type variable (Google geocode expects string format) var myLocation = String(lat+","+lng); console.log(myLocation); } // Error handler for geolocation function provideError(error){ console.log(error); } // Explicitly return public methods when this object is instantiated return{ getUserLocation : getCoords }; })(window); Within my other revealing module pattern (below), I am calling the getUserLocation function (aka getCoords) and currently, it console.logs the users location fine (myLocation). // Revealing Modular pattern, containing functions relevant to park functionality var Park = (function(window, undefined){ // Determine if user entered postcode or selected 'use my location' function handleUserData(data){ if(data === "postcode"){ var location = document.getElementById("postcode").value; } else{ var location = Location.getUserLocation(); } } // Explicitly return public methods when this object is instantiated return{ handleMe : handleUserData }; })(window); However, when I change console.log(myLocation) to return myLocation and then…
has comment: http://stackoverflow.com/comment/47006231
has comment: http://stackoverflow.com/comment/47006934
has comment: http://stackoverflow.com/comment/47006992
favorite count: 0
answer count: 0
tagged with: revealing-module-pattern
type: UnansweredQuestion
tagged with: geolocation
linked to: http://stackoverflow.com/q/23667086
upvote count: 1
duplicate of: http://stackoverflow.com/q/23667086
score: 1
has comment: http://stackoverflow.com/comment/47007071
has comment: http://stackoverflow.com/comment/47007439
linked to: http://stackoverflow.com/q/20166039
has comment: http://stackoverflow.com/comment/47006718
type: Question
has comment: http://stackoverflow.com/comment/47006537
tagged with: function
downvote count: 0
has comment: http://stackoverflow.com/comment/47006403
tagged with: javascript
has title: Returning value from revealing module pattern

sequelize.js
type: Tag
tag name: sequelize.js
tags question: http://stackoverflow.com/q/29518786
tags question: http://stackoverflow.com/q/29414740

http://stackoverflow.com/comment/47153624
type: Comment
comment on: http://stackoverflow.com/a/29496986
has text: Oh I see. You want it to stay there permanently. In that case, instead of using a hidden field, you need to use a database where you permanently store the difficulty. If you create a mySQL database, you would have a table where you store this difficulty. Then, with PHP you can access this database. You would be able to retrieve the difficulty and display it on the client side.
score: 0
type: AnswerComment

http://stackoverflow.com/a/32460738
accepted answer of: http://stackoverflow.com/q/29421717
score: 3
answers question: http://stackoverflow.com/q/29421717
upvote count: 3
has body: The original issue was that I didn't scale the ellipse's rx and ry values when plotting. Seems to work OK now with code above (under update). Here is a fork of plnkr that uses random normal test data (below) instead. function genTestData(numPoints){ var data = {x:[], y:[]}; for(var i = 0; i &lt; numPoints; i++){ data.x[i] = jStat.normal.inv(Math.random(), 8.5, 2); data.y[i] = jStat.normal.inv(Math.random(), 6.5, 3); data.y[i] += data.x[i] * 2.1; //to test ellipse } return data; }
downvote count: 0
has comment: http://stackoverflow.com/comment/129940405
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/47049163
type: QuestionComment
has text: Oh all of it! - I removed that entire sequence just to check, and the redirects now work. THANK YOU! - Post as an answer so that I may upvote you kind sir.
comment on: http://stackoverflow.com/q/29440055
score: 0
type: Comment

http://stackoverflow.com/comment/47170846
type: QuestionComment
has text: Can you replicate your issue here: [link](https://jsfiddle.net/y5r3w7j3/)
score: 0
comment on: http://stackoverflow.com/q/29506553
type: Comment

http://stackoverflow.com/comment/47403486
has text: First thing I can point out is missing `name` with fields. Without name field value can not be submitted.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29528509

http://stackoverflow.com/q/29490222
favorite count: 0
accepted answer: http://stackoverflow.com/a/31998851
has title: blueimp jQuery file upload plugin hide uploaded files
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
has body: I am using this: https://github.com/blueimp/jQuery-File-Upload Everything works great and all but I want to know how to make it so whenever I have done uploading stuff in it, and when I go to that uploading page again, I want to hide the uploaded files list. Because currently whenever ANYONE goes to the upload page, it displays ALL the uploaded files and ANYONE can delete the files. I want it to NOT display the uploaded files. THANKS A LOT FOR HELPING IN ADVANCE! EDIT: &lt;!DOCTYPE HTML&gt; &lt;!-- /* * jQuery File Upload Plugin Demo 9.1.0 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT */ --&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;!-- Force latest IE rendering engine or ChromeFrame if installed --&gt; &lt;!--[if IE]&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt; &lt;![endif]--&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;jQuery File Upload Demo&lt;/title&gt; &lt;meta name="description" content="File Upload widget with multiple file selection, drag&amp;amp;drop support, progress bars, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads."&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;!-- Bootstrap styles --&gt; &lt;link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"&gt; &lt;!-- Generic page styles --&gt; &lt;link rel="stylesheet" href="css/style.css"&gt; &lt;!-- blueimp Gallery styles --&gt; &lt;link rel="stylesheet" href="//blueimp.github.io/Gallery/css/blueimp-gallery.min.css"&gt; &lt;!-- CSS to style the file input field as button and adjust the Bootstrap progress bars --&gt; &lt;link rel="styl…
tagged with: javascript
has answer: http://stackoverflow.com/a/31998851
tagged with: blueimp
has comment: http://stackoverflow.com/comment/47139751
answer count: 1
downvote count: 0
tagged with: jquery
tagged with: file-upload

http://stackoverflow.com/comment/47135431
has text: @AndreasNiedermair I agree, but giving a sort of warning in the form of comment would do too, and then if I did it again, you could have downvoted. That would have been more nice of you =)
comment on: http://stackoverflow.com/q/29486431
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46952013
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29385817
has text: @LukeAlvinMadzedze I'd love to help actually, but your code is so convoluted, filled with classes, `div`s, `ul`s, `li`s, `a`s ... Its an impenetrable wall. I testing using max-height and overflow-hidden which get invalidated on hover, but that doesn't work because of... Other classes somewhere. Sorry pal, provide better code if you want anyone to look at it but this is too... Convoluted.

http://stackoverflow.com/q/29422836
type: UnansweredQuestion
tagged with: safari-extension
has answer: http://stackoverflow.com/a/30691303
tagged with: safari
type: Question
answer count: 1
tagged with: javascript
score: 0
has body: In Chrome extensions there is a way to detect window close event before it is closed: chrome.tabs.onRemoved.addListener(function (tabId, removeInfo) { if ( removeInfo.isWindowClosing ) ... }); isWindowClosing is true only if the whole window is closing, not if you close the last tab in the window (which also ends up in closing the window). I'm wandering, is there a way to acheive same thing in Safari extensions?
has title: How to catch window close in Safari extension before it is closed?

http://stackoverflow.com/a/29524240
has body: You could set a clicked variable on mousedown. You'll need to blur the textarea on mousedown so that focus will will be triggered on mouseup: var clicked= false; $('textarea') .focus(function(event) { if(clicked) { $('#status').html('clicked'); clicked= false; } else { $('#status').html('tabbed'); } }) .mousedown(function(event) { clicked= true; $(this).blur(); }); Focus me via click. Now try via tabbing.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29523928

http://stackoverflow.com/q/29400963
has comment: http://stackoverflow.com/comment/46977804
type: Question
has answer: http://stackoverflow.com/a/29401319
answer count: 2
has title: How to make these two similar blocks codes reusable?
tagged with: javascript
has body: I have two similar codes and I think it could be reusable but not sure where to start. If you can show me and example or link me to an article that would be fine. I have this one block that updates a user info. exports.updateUser = function(req, res, next) { User.findById(req.params.id, function(err, user) { if (err) { return next(err); } user.email = req.body.email || ''; user.firstname = req.body.firstname || ''; user.lastname = req.body.lastname || ''; user.save(function(err) { if (err) { return next(err); } req.flash('success', { msg: 'User information updated.' }); res.redirect('/users'); }); }); }; and this block that updates my user account info. exports.updateAccount = function(req, res, next) { User.findById(req.user.id, function(err, user) { if (err) { return next(err); } user.email = req.body.email || ''; user.firstname = req.body.firstname || ''; user.lastname = req.body.lastname || ''; user.save(function(err) { if (err) { return next(err); } req.flash('success', { msg: 'Profile information updated.' }); res.redirect('/account'); }); }); }; How can I make a reusable update.
tagged with: express
tagged with: node.js
linked to: http://stackoverflow.com/q/2608913
has answer: http://stackoverflow.com/a/29401024
score: 0
type: UnansweredQuestion

facebook-tabs
tag name: facebook-tabs
tags question: http://stackoverflow.com/q/29438401
type: Tag

http://stackoverflow.com/q/29442497
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29442515
answer count: 1
downvote count: 0
has title: JavaScript regular expression match amount
has body: I'm trying to write a regular expression to match amounts. In my case, what I need is that either the amount should be a positive integer or if the decimal is used, it must be followed by one or two integers. So basically, the following are valid amounts: 34000 345.5 876.45 What I wrote was this: /[0-9]+(\.[0-9]{1,2}){0,1}/ My thinking was that by using parenthesis like so: (\.[0-9]{1,2}), I would be able to bundle the whole "decimal plus one or two integers" part. But it isn't happening. Among other problems, this regex is allowing stuff like 245. and 345.567 to slip through. :( Help, please!
favorite count: 0
accepted answer: http://stackoverflow.com/a/29442515
tagged with: regex
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/q/29409338
downvote count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/29409849
has answer: http://stackoverflow.com/a/29409849
has title: $watchCollection is not triggered
type: Question
tagged with: angularjs-directive
type: AnsweredQuestion
tagged with: watch
has answer: http://stackoverflow.com/a/29410083
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29409886
score: 4
favorite count: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46993031
has answer: http://stackoverflow.com/a/29409886
upvote count: 4
has body: i have the following directive: app.directive('rickshawChart', function() { return{ $scope: { data: '=', renderer: '=' }, template: '&lt;div&gt;&lt;/div&gt;', restrict: 'E', link: function postLink(scope, element, attrs) { scope.$watchCollection('[data,renderer]', function(newVal, oldVal) { if(!newVal[0]) { return; } var graphEl = element.find("div:first"); graphEl.html(''); var graph = new Rickshaw.Graph({ element: graphEl[0], width: attrs.width, height: attrs.height, series: [{data: scope.data, color: attrs.color, name: attrs.series}], renderer: scope.renderer }); graph.render(); }); } } }); With the following html: &lt;rickshaw-chart data="sightingByDate" color="green" renderer="renderer" width="100%" height="100%"&gt; &lt;/rickshaw-chart&gt; Here i fill the data in with the following controller: app.controller('CompetenceController', ['$http', '$scope','$sessionStorage','$log','Session','api', function ($http, $scope, $sessionStorage,$log, Session, api) { $scope.result =[ { x: 0, y: 40 }, { x: 1, y: 49 }, { x: 2, y: 38 }, { x: 3, y: 30 }, { x: 4, y: 32 } ]; $scope.renderer = 'scatterplot'; $scope.sightingsByDate = _($scope.result) .chain() .countBy(function(sighting){ return sighting.y; }) .pairs() .map(function(pair){ return pair; }) .value(); }]); however from the debugger i am able to see that the $watchCollection is never executed. What am i doing wrong?

http://stackoverflow.com/comment/101403020
type: AnswerComment
comment on: http://stackoverflow.com/a/57459509
has text: @dx_over_dt Your edit would be a great comment, but not an edit. Please leave such substantive edits to the OP's purview (unless the post is marked as Community Wiki, of course).
type: Comment
score: 1

http://stackoverflow.com/comment/47012868
score: 0
comment on: http://stackoverflow.com/a/29420399
type: AnswerComment
has text: I was confused as well, I was under the assumption that `document.querySelectorAll('.one').addEventListener('click', function(event){` was actually possible when I originally asked the question. But it makes sense now why the `Array.prototype.forEach` is required in that instance as it's getting an HTMLCollection instead of just one element. (I think... hope, ha), started with jquery... transitioning to javascript... hence my confusion.
type: Comment

http://stackoverflow.com/comment/94344920
has text: @robocat Yaas 2018 but also yaas this should be the answer
score: 0
comment on: http://stackoverflow.com/q/29454340
type: Comment
type: QuestionComment

jquery-ui-datepicker
tags question: http://stackoverflow.com/q/29387066
tag name: jquery-ui-datepicker
tags question: http://stackoverflow.com/q/29527704
type: Tag

http://stackoverflow.com/a/29742290
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I've solved this myself by providing a module Store, which is like this: // Store.js var o = {}; var Store = { saveProductList: function(state) { o['products'] = state; }, getProductList: function() { return o['products']; } }; module.exports = Store; then in the home page component, load and save the state: componentDidMount: function() { var state = Store.getProductList(); if (state) { this.setState(state); } else { // load data via ajax request } }, componentWillUnmount: function() { Store.saveProductList(this.state); } this works for me.
has comment: http://stackoverflow.com/comment/99821473
score: 7
upvote count: 7
accepted answer of: http://stackoverflow.com/q/29446247
answers question: http://stackoverflow.com/q/29446247

http://stackoverflow.com/q/29381262
has answer: http://stackoverflow.com/a/29381333
has comment: http://stackoverflow.com/comment/46942163
favorite count: 0
possible better answer: http://stackoverflow.com/a/29381333
upvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29381322
tagged with: if-statement
has body: Trying to write a rock paper scissors game, using codecademy to learn. I've seen a lot of people talking about this error and it being related to using a semicolon after an if statement but I don't know if I'm completely missing something or it's something different. Here's the code, it's a little weird to understand (and least to me), but hopefully you'll see what I didn't 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 { return "paper wins"; } else if(choice1 === "paper") { if (choice2 === "rock") { return "paper wins"; } else { return "scissors wins"; } } }; }
score: 1
has title: Unexpected token else, not a semicolon after if statement
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29381322
has comment: http://stackoverflow.com/comment/46942179

http://stackoverflow.com/q/29403213
tagged with: marionette
has body: One of my router handlers get consistently triggered twice. Although I can clearly see the route trigger is fired only once. I am using Marionette AppRouter class like this: MainRouter = Backbone.Marionette.AppRouter.extend({ appRoutes: { "home": "showHome", "view/:num(/:rev)(/:ms)": "viewSmart", //smart route "*route": "showHome" //any other unrecognized routes }, controller: routesController }); and controller with handlers: routesController = { showHome: function () { console.info('go home'); }, viewSmart: function (num, rev, ms) { console.log('view route action triggered'); },...more routes While testing this anomaly I found that the last optional param in the viewSmart method is the root cause. If I navigate to a route without (/:ms) the same method fires once, with it twice.
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29403214
type: Question
tagged with: javascript
upvote count: 2
answer count: 1
has title: Why does my route handler fires twice?
favorite count: 0
tagged with: backbone.js
type: UnansweredQuestion

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/29398924
tags question: http://stackoverflow.com/q/29465885
tags question: http://stackoverflow.com/q/29522361

http://stackoverflow.com/q/29487491
score: -3
favorite count: 0
has title: Ignore line break in Indesign
type: Question
answer count: 1
tagged with: applescript
has comment: http://stackoverflow.com/comment/47142380
has body: In my Indesign document having the text "This is Indesign \napplication"----here \n is the line break. Then, I am find text in grep find grep:This is Indesign application The text cannot be selected. because, the sentence contain line breaks. So, Please help me to select the sentence. Thanks &amp; regards by, Annadurai.
downvote count: 3
upvote count: 0
tagged with: grep-indesign
has answer: http://stackoverflow.com/a/29488932
tagged with: ios
tagged with: adobe-indesign
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/47084771
type: QuestionComment
has text: Can describe "naturalism" ? asymmetrical animations ? Do "particles" appear to move from one side of viewport (screen) to other side of viewport ? Can include `html` , `css` , `js` ? , create stacksnippets , http://jsfiddle.net to demonstrate ?
comment on: http://stackoverflow.com/q/29460284
score: 0
type: Comment

http://stackoverflow.com/comment/47029690
type: Comment
has text: Check now, I've updated the answer with a demo. You need to place that code inside the appropriate controller. You can create a custom directive instead and bind the events via that.
comment on: http://stackoverflow.com/a/29429839
type: AnswerComment
score: 0

http://stackoverflow.com/comment/47057677
has text: @mohamedrias if you check this url https://baggu.com/ this is exact functionality which I want
score: 0
comment on: http://stackoverflow.com/q/29445179
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47118595
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29478280
has text: I'm not sure if I explained my question clearly. It's not the page I'm calling the script from which is having the delay in loading. It's the page I want to fetch the contents of using GM_xmlhttpRequest GET. The result of my GET request returns an almost empty HTML document, since that page loads its contents through its own AJAX I have no control over.

http://stackoverflow.com/q/29476450
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29476776
has body: I'm looking to create a bookmarklet that will mainly be used on this page: http://forum.sectioneighty.com/find-new/528631/posts It will search for divs with a class of 'discussionListItem'. 'discussionListItem' is a parent of a div with a class of 'forumLink'. If 'forumLink' contains the string "Music", add 'display: none' to its parent 'discussionListItem'. So far I've created this, which works: javascript:(function(){document.getElementsByClassName('discussionListItem')[0].style.setProperty('display', 'none', 'important');})(); It hides the first div that has a class of 'discussionListItem'. Building on that I wrote this: javascript:(function(){$(".discussionListItem .forumLink a:contains('Music')").closest(".discussionListItem").css("display" , "none");});(); This is as far as I've gotten to complete my initial request, but it's not working. I'm not great in Javascript/jQuery so I'm sure there's something I'm missing. I based this code off an answer I found here: If a div contains a specific string of text, edit the parent&#39;s css Also, if there's any easy way to do it, I'd like it to be able to search for multiple strings... so if .forumList contained 'Music' OR 'Sports' OR 'Life', it would change its parent's div to display: none. Thanks!
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Creating a bookmarklet that will hide a div if the div contains certain text
has answer: http://stackoverflow.com/a/29476727
type: AnsweredQuestion
score: 1
upvote count: 1
linked to: http://stackoverflow.com/q/22877172
type: Question
has answer: http://stackoverflow.com/a/29476776
accepted answer: http://stackoverflow.com/a/29476727

http://stackoverflow.com/q/29529091
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: AJAX post datastring getting cut off
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29529134
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/29529182
tagged with: post
type: Question
answer count: 2
has body: I am trying to post an email address using ajax to php and every time I send the email address variable gets cut off, so it is sent to the php as 'someone@gmail.c' for example. I have tried doing toString and escape but nothing seems to work. Thanks. function postEmail(){ var checkEmail = "someone@gmail.com"; var dataString = 'checkEmail1='+ checkEmail; // AJAX Code To Submit Form. $.ajax({ type: "POST", url: "myfile.php", data: dataString, cache: false, success: function(result){ alert(result); } }); }
downvote count: 0

http://stackoverflow.com/a/29452600
has comment: http://stackoverflow.com/comment/47085478
has body: How about you add each button class="button" attribute, and run the following jQuery: $('.button').click(function() { if($(this).hasClass("hidden")) { //if already hidden, do you want to display it back? $(this).removeClass("hidden"); } else{ $(this).parent().parent().next().fadeIn(1000); $(this).addClass("hidden"); $(this).parent().parent().fadeOut(1000);//this will hide the button as well, is this okay? } } }); So, when a button is clicked the div containing that button will be hidden, and the next div will be showed, is that right? Then, at the beginning, only the first one will be displayed? I am not clear about the functionality. UPDATE I got it working finally. There you go: https://jsfiddle.net/ev64mqsp/ note that I included one extra div for Home div to make all main content divs have the same structure. $('.button').click(function() { if($(this).next().hasClass("hidenext")) { $(this).parent().parent().fadeOut(1000) $(this).parent().parent().next().removeClass("hidenext"); } else{ $(this).parent().parent().fadeOut(1000); $(this).parent().parent().next().addClass("hidenext"); } }); HTML: Home DIV 1 CONTENT GOES HERE Click Me! Portfolio DIV 2 CONTENT GOES HERE Click Me! About DIV 3 CONTENT GOES HERE Click Me! Contact DIV 4 CONTENT GOES HERE Click Me!
score: 1
has comment: http://stackoverflow.com/comment/47085744
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29452471
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29452471
has comment: http://stackoverflow.com/comment/47085976
type: Answer
downvote count: 0

http://stackoverflow.com/comment/47021276
type: QuestionComment
has text: you can actually send multiple files to one upload URL, no need to request one per file.
comment on: http://stackoverflow.com/q/29424561
score: 0
type: Comment

http://stackoverflow.com/comment/47036501
type: QuestionComment
has text: where is your input type="file" field in your code?
comment on: http://stackoverflow.com/q/29433466
score: 0
type: Comment

http://stackoverflow.com/comment/47171384
has text: var url = "../../view-merchants-branch/" + id;
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29507232

http://stackoverflow.com/comment/46976818
type: Comment
type: QuestionComment
has text: @Bergi Don't know but they are not. I've read several posts on this site about it: http://stackoverflow.com/questions/1112035/open-jquery-datepicker-by-clicking-on-an-image-w-no-input-field/1112135#1112135, http://stackoverflow.com/questions/2198741/jquery-ui-datepicker-making-a-link-trigger-datepicker, http://stackoverflow.com/questions/16491535/jquery-ui-datepicker-without-a-textbox
score: 0
comment on: http://stackoverflow.com/q/29400230

http://stackoverflow.com/q/29507504
has answer: http://stackoverflow.com/a/29507645
tagged with: angularjs
has body: my datetime format is given below. var datetime =Wed Apr 8 15:05:00 UTC+0530 2015; I only want to get the time 15.05
has title: Extract time from datetime using moment.js
tagged with: momentjs
type: AnsweredQuestion
downvote count: 0
type: Question
score: 9
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/29507645
possible better answer: http://stackoverflow.com/a/29507743
has answer: http://stackoverflow.com/a/29507743
favorite count: 0
upvote count: 9

http://stackoverflow.com/a/29425320
answers question: http://stackoverflow.com/q/29424348
type: Answer
has comment: http://stackoverflow.com/comment/47022690
score: 0
has body: Make this line work: Cynergi.get(function (data) { console.log(data); });

http://stackoverflow.com/a/29432256
has body: The amount of data a sourceBuffer can support depends on the MSE implementation and therefore the browser vendor. Once you reached the maximum value, this will of course result in an error. You cannot directly get the number of segments in SourceBuffer, but you can get the actual buffered time. In combination with the duration of the segments you are able to compute it. I recommend to have a look in open source DASH player projects like dashjs or ExoPlayer, which implement all your desired functionalities. Or maybe even use a commercial solution like bitdash.
score: 0
answers question: http://stackoverflow.com/q/29383939
type: Answer

http://stackoverflow.com/q/29436522
tagged with: javascript
score: 0
tagged with: ng-options
has title: Angular ng-options current object
has body: Select a type The above is how I render a select box so a user can select a trip type (Which is an object). The issue is it does not default to show the type currently assigned to a trip. After reading the documentation it seemed like 'track by type.id' was what I needed which I added to the end of what I current have in ng-options. This works except once I select a different type it replaces the type object in ng-model with the id string. How can I have it assign the full type object like it does when I do not have 'track by type.id'
tagged with: angularjs
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/47043320
has comment: http://stackoverflow.com/comment/47042242
type: Question

http://stackoverflow.com/q/29405779
has answer: http://stackoverflow.com/a/29406472
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29405925
tagged with: java
linked to: http://stackoverflow.com/q/15699654
type: Question
has title: How to Keypress-enter on every Browser?
tagged with: jsp
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29405944
accepted answer: http://stackoverflow.com/a/29405925
has answer: http://stackoverflow.com/a/29405944
score: 0
has body: How can you make the keypress action work? Got a chat, with which i want to send - what else - messages. In the Form-tag (its jsp based) i got this: " name="chat" target="content" onkeypress="Javascript: if (event.keyCode==13) SendMessage();" OnSubmit='SendMessage();return false;'> the function in the script is the following: function SendMessage() { if (event.keyCode===13) { alert('ENTER PRESSED'); // to make sure the function is called document.chat.submit(); document.chat.msg.value = ""; document.chat.reset(); document.chat.msg.focus(); } } This is working fine on Chrome but not on Firefox, but it should work on every Browser. In addition, this script causes firefox to not clear the textfield (i think, because the function is not called properly). Any suggestions or help on this? i'm pretty lost..
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46986363
has answer: http://stackoverflow.com/a/29406272
answer count: 4

http://stackoverflow.com/a/29459654
has body: As odd as it might seem, using a different minifier solved the problem. I was using this one and then, just because, I decided to try this one. Problem solved.
score: 0
answers question: http://stackoverflow.com/q/29459272
type: Answer
has comment: http://stackoverflow.com/comment/47083204
has comment: http://stackoverflow.com/comment/47083334

http://stackoverflow.com/comment/47181349
has text: sorry I cant get you?? you mean still the select box is not hiding??? if so try to add "z-index:1" to the class ".ajax_loader"
type: Comment
comment on: http://stackoverflow.com/a/29512317
score: 0
type: AnswerComment

http://stackoverflow.com/q/29463265
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29464552
tagged with: javascript
has body: I am having a problem using Parse queries in javascript. I want to try and use multiple doesNotMatchKeyInQuery functions but it only allows the last one to be used. Any ideas how I can make code like this work? Ignore the errors that might exist in other parts of the code. I wrote this as an example //Query 1 var Class1 = Parse.Object.extend("Class1"); var class1Query = new Parse.Query(Class1); class1Query.equalTo("id", id1); //Query 2 var Class2 = Parse.Object.extend("Class2"); var class2Query = new Parse.Query(Class2); class2Query.equalTo("id", id2); //Query 3 var Class3 = Parse.Object.extend("Class3"); var class3Query = new Parse.Query(Class3); class3Query.equalTo("id", id3); //Bringing it all together var finalQuery = new Parse.Query("User"); //This is the part below I am talking about finalQuery.doesNotMatchKeyInQuery("objectId", "id1", class1Query); finalQuery.doesNotMatchKeyInQuery("objectId", "id2", class2Query); finalQuery.doesNotMatchKeyInQuery("objectId", "id3", class3Query); finalQuery.find({ success: function (results) { response.success(results); }, error: function (error) { response.error(error); } });
tagged with: parse-cloud-code
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29464552
favorite count: 0
tagged with: parse-platform
has title: Parse Multiple doesNotMatchKeyInQuery

http://stackoverflow.com/q/29487988
upvote count: 1
has body: I've trying to make different categories on the page and when user click on some category must load all images from that category on the modal window which will open. So far I successfully loaded only categories but can't figured out how to load images on the modal window. This is the code that I have so far. May be is totally wrong so I need some help here. Currently modal is empty when is opened <?php require_once 'misc/database.php'; $pdo = Database::connect(); echo ' '; foreach($pdo->query("SELECT * FROM albums ORDER BY album_id") as $row) { echo ' '.$row['album_name'].' '; } echo ' '; if(isset($_GET['album_id']) && is_numeric($_GET['album_id'])){ $album_id = $_GET['album_id']; $query = $pdo->query("SELECT * FROM images WHERE image_album = $album_id ORDER BY image_id DESC "); foreach ($query as $row) { echo ' '; } } echo ' '; Database::disconnect(); ?> May be I see where is the problem but don't see how to fix it. In I should pass the album_id but how to make it exactly?
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: php
answer count: 0
score: 1
has title: Open categories in modal window
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29488391
upvote count: 30
accepted answer of: http://stackoverflow.com/q/29488371
type: Answer
has comment: http://stackoverflow.com/comment/49593681
answers question: http://stackoverflow.com/q/29488371
has comment: http://stackoverflow.com/comment/47245416
type: AcceptedAnswer
downvote count: 0
has body: One way to do this is to loop over your array of images, create an img element for each, set the element's src to the current image source in your array, then append it to your container. This would look like: var imgs = ['http://lorempizza.com/380/240', 'http://dummyimage.com/250/ffffff/000000', 'http://lorempixel.com/g/400/200/', 'http://lorempixel.com/g/400/200/sports/']; var container = document.getElementById('imageContainer'); for (var i = 0, j = imgs.length; i &lt; j; i++) { var img = document.createElement('img'); img.src = imgs[i]; // img[i] refers to the current URL. container.appendChild(img); } However, this isn't particularly efficient: We're using an unnecessary loop We're querying the dom on every iteration We're introducing the global i and j variables We're not using JavaScript's wonderful Array methods! Instead, let's use a documentFragment and JavaScript's forEach Array method. var imgs = ['http://lorempizza.com/380/240', 'http://dummyimage.com/250/ffffff/000000', 'http://lorempixel.com/g/400/200/', 'http://lorempixel.com/g/400/200/sports/']; var container = document.getElementById('imageContainer'); var docFrag = document.createDocumentFragment(); imgs.forEach(function(url, index, originalArray) { var img = document.createElement('img'); img.src = url; docFrag.appendChild(img); }); container.appendChild(docFrag); This way we're: Only hitting the DOM once Not introducing global variables Maintaining cleaner, easier to read code! Then just to make sure your new images look nice, add a bit of CSS to the mix: #imageContainer img { width: 20%; height: auto; } Bam! Here's a fiddle
has comment: http://stackoverflow.com/comment/47258982
score: 30

http://stackoverflow.com/a/29476036
score: 12
type: AcceptedAnswer
downvote count: 0
has body: var date = new Date(TIME) where TIME is the epoch time in MILIseconds, i.e, you should multiply by 1000 if you have a epoch time in seconds. I don't know how Chartist handle Date objects, but you have a lot of methods to get all readeable parts of a date: date.getDate date.getDay date.getFullYear date.getHours date.getMilliseconds date.getMinutes date.getMonth date.getSeconds date.getTime date.getTimezoneOffset date.getUTCDate date.getUTCDay date.getUTCFullYear date.getUTCHours date.getUTCMilliseconds date.getUTCMinutes date.getUTCMonth date.getUTCSeconds date.getYear date.setDate date.setFullYear date.setHours date.setMilliseconds date.setMinutes date.setMonth date.setSeconds date.setTime date.setUTCDate date.setUTCFullYear date.setUTCHours date.setUTCMilliseconds date.setUTCMinutes date.setUTCMonth date.setUTCSeconds date.setYear date.toDateString date.toGMTString date.toISOString date.toJSON date.toLocaleDateString date.toLocaleTimeString date.toTimeString date.toUTCString
type: Answer
upvote count: 12
accepted answer of: http://stackoverflow.com/q/29475779
answers question: http://stackoverflow.com/q/29475779

http://stackoverflow.com/comment/46956026
has text: I can't reproduce the problem you are reporting, whether I use Node's own assert or Chai's assert. In either case, I get an `AsssertionError` that shows the expected and actual values (not exactly in the same format you show, but still, they are there).
comment on: http://stackoverflow.com/q/29387724
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29494875
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47150785
type: Question
answer count: 2
has body: I am working on an AngularJS app. This app constructs a complex table of part information with filtering and sorting, etc. The table gets built using two ngRepeat directives. One of them hits a JSON API to get the column headers, and the other gets all the part data for those columns. Based on the part category, the table could have anywhere from 5 to 50 columns, and there could be between 2 and 2000 parts in the category. After the table is rendered I need to apply a jQuery plugin to enable additional features. My problem is that the plugin initialization is happening too early. I need to only call that init function when the directives have completed all the rendering. My first step was to create a directive that sets an event I could listen for. Here is what I used: angular.module('myApp') .directive('myOnLoad', [function() { return function(scope, element, attrs) { if (scope.$last) setTimeout(function(){ scope.$emit('everythingLoaded', element, attrs); }, 1); }; }]); I then put the directive on one of my repeaters like this: &lt;th ng-repeat="attribute in ctrl.attributes" attribcol="attribute" class="mps-attribute-cell" my-on-load&gt;&lt;/th&gt; And then listen for it in my controller: $scope.$on('everythingLoaded', function(scope, element, attrs){ var containerHeight = jQuery(window).height() - 100; jQuery('#mps-table').fixedHeaderTable({ width: '100%', height: containerHeight + 'px', fixedColumn: true }); }); This helped me wait til the attribute columns loaded before the plugin init, but it isn't exactly right yet because the other directive may not be done when this fires. I need to make sure both repeaters are done. How can I require the combination of two different events before the init code fires? UPDATE: I created a service that looks like this so far: angular.module('myApp') .factory('featureInit', ['$rootScope', function ($rootScope) { var featureReady = 0; $rootScope.$on('attributesLoaded', function (scope, element, attrs) { featureReady++; console.l…
downvote count: 0
has comment: http://stackoverflow.com/comment/47164710
tagged with: javascript
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/47191461
favorite count: 0
has answer: http://stackoverflow.com/a/29543134
has answer: http://stackoverflow.com/a/29524096
has title: AngularJS - How to take action only on combination of multiple events
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/29524096
upvote count: 1
accepted answer: http://stackoverflow.com/a/29543134

http://stackoverflow.com/comment/47049359
type: QuestionComment
has text: hmm, other than the components (jsx tags), feels just like react to me. Anything in particular you find different from react?
comment on: http://stackoverflow.com/q/29439759
score: 0
type: Comment

http://stackoverflow.com/a/29374903
type: Answer
score: 0
has body: That's a google form or an UiApp right? You'll have to move to HTMLService, you can start in Formfuse to transform your Google Form to a HTML, then read about serving HTML pages trough google apps in the documentation. That's the only way I know.
answers question: http://stackoverflow.com/q/29374221

http://stackoverflow.com/q/29479569
has comment: http://stackoverflow.com/comment/47120124
score: 1
type: Question
has title: Can you alter an existing page using JavaScript and Firefox extensions
tagged with: firefox
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/47119632
has body: I use a website to complete some work but I want to add some features to the site using JavaScript. I created the code using scratchpad in Firefox I just need a way to add this to the page everytime is loads. Can this be done with extensions in Firefox. What other options are available to do this? The owner of the site will not add the extra features I require.
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29482349
upvote count: 1

http://stackoverflow.com/comment/47055163
type: Comment
has text: Yes this is the problem. But what is the solution?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29443782

http://stackoverflow.com/q/29376167
tagged with: javascript
has comment: http://stackoverflow.com/comment/46933166
tagged with: jquery
has comment: http://stackoverflow.com/comment/46933703
has body: Sorry if this question is a repeat, I have read most of the questions of similar kind but it didn't solve my problem. I have this code for dependent drop down list using angular js, where I am trying to implement in my codeigniter project. When I place this codes directly into my view form.php I get the result as expected. script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"> Country: Select States: Select City: Select I want to place the javascript codes into >MyProject>js directory and copy pasted the javascript into a file called script.js and included the following line into view/includes/header.php script type="text/javascript" language="javascript" src="<?php echo base_url();?>js/script.js"> In my controller>form.php I have a line to load the header.php $this->load->view('includes/header',$datah); When I separate the script from view>form.php I only get the drop down list which is the result of the html tags that I have but there are no contents or list of countries or cities to be seen in any of the drop down menu. Please somebody help me find what has gone wrong with my attempt.
has comment: http://stackoverflow.com/comment/46933905
answer count: 1
has answer: http://stackoverflow.com/a/29377104
tagged with: angularjs
has title: Where to place the javascript file in codeigniter directory?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46933280
score: 0
tagged with: codeigniter
type: Question

http://stackoverflow.com/a/29513503
upvote count: 2
answers question: http://stackoverflow.com/q/29513380
has body: If you want to use: &lt;a id="enter" href="#"&gt;&lt;div id = "enterbutton"&gt;enter&lt;/"div&gt;&lt;/a&gt; Because you have a specific css you've applied to it, then simply do. $('#enter').on('click', function(){ $('#form').submit(); }); Just remember to add an id to your form.
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/54842705
downvote count: 1
type: Answer
score: 6
answers question: http://stackoverflow.com/q/29447715
has body: Below is code to set footer and elements above. import React, { Component } from 'react'; import { StyleSheet, View, Text, ScrollView } from 'react-native'; export default class App extends Component { render() { return ( Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Main Content Here Bottom View ); } } const styles = StyleSheet.create({ containerMain: { flex: 1, alignItems: 'center', }, bottomView: { width: '100%', height: 50, backgroundColor: '#EE5407', justifyContent: 'center', alignItems: 'center', position: 'absolute', bottom: 0, }, textStyle: { color: '#fff', fontSize: 18, }, });
upvote count: 7

http://stackoverflow.com/a/29490853
has body: OK, so I was curious about this and about the solution you were working on and so I had a go at it myself just to see if I could get it to work. I think my solution is slightly different from your approach. The annotated code is below and there's a JSFiddle demonstration of the code at the end. var imgArray = ['img/ei1.png', 'img/ei2.png', 'img/ei3.png', 'img/ei4.png']; // get the body element and create an array to keep the image elements var body = document.querySelector('body'); var imgs = []; // loop over the list of images, creating new elements // adding src attributes and click events to them, and then adding // them to the imgs array we created for (var i = 0, l = imgArray.length; i &lt; l; i++) { var img = document.createElement('img'); img.src = imgArray[i]; img.addEventListener('click', changeImage); imgs.push(img); } function changeImage() { // are there any image elements left in the img array // if there are, continue if (imgs.length &gt; 0) { // is the length of the img array less than the length // of the imgArray - if so, remove the previous image from the page if (imgArray.length !== imgs.length) { body.removeChild(document.querySelector('img')); } // random number based on the number of image elements // remaining in the imgs array var random = Math.floor((Math.random() * imgs.length - 1) + 1); // add that image to the body element body.appendChild(imgs[random]); // remove the image element from the imgs array imgs.splice(random, 1); } } function checkOnLastImage() { // are you on the last image? if (imgs.length === 0) { console.log('congratulations') } else { console.log('try again'); } } // run changeImage for the first time changeImage(); // use a setTimeout to check at 5 seconds whether // the last image has been reached setTimeout(checkOnLastImage, 5000); DEMO
type: Answer
accepted answer of: http://stackoverflow.com/q/29489761
answers question: http://stackoverflow.com/q/29489761
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47148673

http://stackoverflow.com/a/29436450
score: 0
answers question: http://stackoverflow.com/q/29436354
type: Answer
has body: JS does not have block scope. There are some ways to work around this problem, like creating a function, for example. And, to make it more clear and easily testable, I would put all the result[n] logic in the other function as well. var process = function(resultItem) { if (resultItem.attachment &amp;&amp; if (resultItem.attachment.embed_type == 'vine')) { og(resultItem.attachment.embed_url, function(err, meta) { resultItem.attachment.preview_image = meta.image; resultItem.save(); }); } }; Thing.find(function(err, result) { for (var i = 0; i &lt; result.length; i++) { process(result[i]); } });

http://stackoverflow.com/comment/47161998
has text: Could you also explain your words what "having an index" means? Does it mean that you define the id as primary key in both tables - I didnt get that concept. Thanks!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29495165

http://stackoverflow.com/comment/47048420
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29439833
has text: That will just put a literal backslash in the replacement.
type: AnswerComment

http://stackoverflow.com/comment/47120937
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29479977
has text: suggest you create a simplified demo ( one that doesn't require credit card number)
score: 1

http://stackoverflow.com/comment/47063927
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29448638
has text: This isn't inheritance. Also, why do both the game and the players have position? At any rate, it seems it's more of an architectural problem - the initialisation of the state needs to be separated by the representation. One way is for `Game` to be passed in `world` and it instantiates both `Player`s by passing it in and this could all be done in the constructor of `Game`.
score: 0

http://stackoverflow.com/comment/47041338
type: AnswerComment
comment on: http://stackoverflow.com/a/29436186
type: Comment
has text: I can't do that, i want code that i can put into the onmouseover attribute.
score: 0

http://stackoverflow.com/q/29398863
score: 0
has comment: http://stackoverflow.com/comment/46974139
has comment: http://stackoverflow.com/comment/46973880
has body: just want to ask if I have static tab with dynamic created tabs. I want to make the first tab of the created dynamic tabs selected "active" by default. I tried using active but it select last tab code
answer count: 1
tagged with: angular-ui
tagged with: tabs
tagged with: angularjs
has title: how to to make first tab active when I have static tab angularjs UI
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29409819
accepted answer: http://stackoverflow.com/a/29409819

http://stackoverflow.com/comment/46948621
comment on: http://stackoverflow.com/a/29377999
score: 0
type: AnswerComment
type: Comment
has text: When I isolate the code from the html source file I find it actually works as you found out! What woud be the best way to proceed with this issue. Close this discussion (with the issue not solved for me actually) or add the complete code...?

http://stackoverflow.com/a/29526983
type: Answer
score: 1
answers question: http://stackoverflow.com/q/29524394
accepted answer of: http://stackoverflow.com/q/29524394
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: I found the way so I'll post the answer to be helpful to others. Get the "_timer" attribute: var status = timer[0].control._timer; alert(status); When timer is on its "_start" status it will return an integer. When timer is on its "_stop" status it will return 'null'.

http://stackoverflow.com/comment/134203604
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29516570
type: AnswerComment
has text: @EternalObserver "immediately resolve" is short for `promiseB` will be fulfilled almost immediately after `promiseA` is fulfilled. a) Using "resolved" instead of "fulfilled" is fairly common but ignores that resolving a promise does _not_ imply the resolved promise will be fulfilled - resolving a promise with a pending promise leaves the resolved promise pending. b) Fulfilling promiseB "immediately" after promiseA becomes fulfilled in the future omits details about the fulfillment happening asynchronously as a result of executing a promise job in the microtask queue.

http://stackoverflow.com/q/29474121
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: list
has title: Why am I getting this JavaScript error when I try use lists in Ionic?
tagged with: ionic-framework
type: Question
has body: Every time I try use a list in my app it never works, I opened the dev tools and for some reason im getting the following errors, I'm new to these languages so and help at all is appreciated. I tryed declaring a var any passing it through the function as thats what I though the error was telling me to do but that didn't work. HTML: calorific This is a basic Card which contains an item that has wrapping text. JS: angular.module('calorific', ['ionic']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) if(window.cordova && window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); } if(window.StatusBar) { StatusBar.styleDefault(); } }); }) app.controller("calCtrl", function($scope) { $scope.items= [ {name: 'apple'}, {name: 'banana'}, {name: 'banana'}, {name: 'banana'} ] }); Error: GET http://localhost:8100/css/style.css app.js:17 Uncaught ReferenceError: app is not defined ionic.bundle.js:19526 Error: [ng:areq] Argument 'calCtrl' is not a function, got undefined http://errors.angularjs.org/1.3.13/ng/areq? p0=calCtrl&p1=not%20a%20function%2C%20got%20undefined at REGEX_STRING_REGEXP (ionic.bundle.js:7982) at assertArg (ionic.bundle.js:9499) at assertArgFn (ionic.bundle.js:9509) at ionic.bundle.js:16350 at ionic.bundle.js:15518 at forEach (ionic.bundle.js:8250) at nodeLinkFn (ionic.bundle.js:15505) at compositeLinkFn (ionic.bundle.js:14997) at publicLinkFn (ionic.bundle.js:14876) at ionic.bundle.js:9369
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29474161
answer count: 1

http://stackoverflow.com/q/29395837
tagged with: registerstartupscript
type: Question
has comment: http://stackoverflow.com/comment/46982173
has title: Email Script from server breaks Telerik RadGrid and RadDropDownList
tagged with: javascript
has body: I am using a Rad grid to display some information where the grid checkboxes mark items and then using a RadDropDownList you can pick an action and press a button to do it. One of the items is to send an email to all the emails of the checked rows. In the button click call back I enumerate the checked rows from the grid and put their emails together in a string buffer and then add script to execute the email on postback which bring up an email. ClientScript.RegisterStartupScript(this.GetType(), "mailto", " ") ; This results in the line to be put just in front of the all Telerik rad javascript code in the HTML. Somehow this innocent little line of javascript causes the master checkbox on the RadGrid header line and the RadDropDownList to stop functioning completely. The dropdown list will not drop. The value parent.location is no where else in the view source html except my inserted email line. I cannot figure out a solution to this problem, it feels like bug that Telerik objects would break so easily from a little self contained script. Perhaps there is another way to send email form the browser given from the server that would not break Telerik controls. George
tagged with: email
tagged with: radgrid
has comment: http://stackoverflow.com/comment/47008722
answer count: 0
has comment: http://stackoverflow.com/comment/47007677
type: UnansweredQuestion
score: 0

google-chrome
tags question: http://stackoverflow.com/q/29434401
tags question: http://stackoverflow.com/q/29479714
tags question: http://stackoverflow.com/q/29514595
tags question: http://stackoverflow.com/q/29452398
tags question: http://stackoverflow.com/q/29387979
tags question: http://stackoverflow.com/q/29473641
tags question: http://stackoverflow.com/q/29453776
tags question: http://stackoverflow.com/q/29500716
tags question: http://stackoverflow.com/q/29454005
tags question: http://stackoverflow.com/q/29402104
tags question: http://stackoverflow.com/q/29393189
tags question: http://stackoverflow.com/q/29471503
tags question: http://stackoverflow.com/q/29460585
tags question: http://stackoverflow.com/q/29463732
tags question: http://stackoverflow.com/q/29482189
tags question: http://stackoverflow.com/q/29529830
tags question: http://stackoverflow.com/q/29418970
tags question: http://stackoverflow.com/q/29423624
tags question: http://stackoverflow.com/q/29387950
tags question: http://stackoverflow.com/q/29487816
tags question: http://stackoverflow.com/q/29485158
tags question: http://stackoverflow.com/q/29489988
tags question: http://stackoverflow.com/q/29421204
tags question: http://stackoverflow.com/q/29503441
tags question: http://stackoverflow.com/q/29401311
tags question: http://stackoverflow.com/q/29466639
tags question: http://stackoverflow.com/q/29506471
tags question: http://stackoverflow.com/q/29424495
tags question: http://stackoverflow.com/q/29387486
tags question: http://stackoverflow.com/q/29378679
tags question: http://stackoverflow.com/q/29464954
tags question: http://stackoverflow.com/q/29488192
tags question: http://stackoverflow.com/q/29462932
tags question: http://stackoverflow.com/q/29391364
tags question: http://stackoverflow.com/q/29512117
tags question: http://stackoverflow.com/q/29431663
tags question: http://stackoverflow.com/q/29399293
tags question: http://stackoverflow.com/q/29515093
tags question: http://stackoverflow.com/q/29453068
tags question: http://stackoverflow.com/q/29507364
tags question: http://stackoverflow.com/q/29500165
tags question: http://stackoverflow.com/q/29447375
tags question: http://stackoverflow.com/q/29399018
tags question: http://stackoverflow.com/q/29437325
tags question: http://stackoverflow.com/q/29494715
tags question: http://stackoverflow.com/q/29444748
tags question: http://stackoverflow.com/q/29424407
tags question: http://stackoverflow.com/q/29502380
tags question: http://stackoverflow.com/q/29510034
type: Tag
tags question: http://stackoverflow.com/q/29381196
tags question: http://stackoverflow.com/q/29412317
tags question: http://stackoverflow.com/q/29462151
tags question: http://stackoverflow.com/q/29416010
tags question: http://stackoverflow.com/q/29492934
tags question: http://stackoverflow.com/q/29485097
tags question: http://stackoverflow.com/q/29459749
tag name: google-chrome
tags question: http://stackoverflow.com/q/29456712
tags question: http://stackoverflow.com/q/29429037
tags question: http://stackoverflow.com/q/29522849
tags question: http://stackoverflow.com/q/29493384
tags question: http://stackoverflow.com/q/29501722
tags question: http://stackoverflow.com/q/29378315
tags question: http://stackoverflow.com/q/29437299
tags question: http://stackoverflow.com/q/29375223
tags question: http://stackoverflow.com/q/29494510
tags question: http://stackoverflow.com/q/29495733
tags question: http://stackoverflow.com/q/29523866
tags question: http://stackoverflow.com/q/29499409
tags question: http://stackoverflow.com/q/29416639
tags question: http://stackoverflow.com/q/29514406

http://stackoverflow.com/comment/46967975
has text: Thanks, but I can't see in my case how should I use "=", maybe an empty object like scope : {} it's enough. If I use "=" that's mean to add also an attribute in DOM. I feel I'm goofy, I can't get it(12h in angular only today it's blocking my mind :) ) Thanks!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29389962
type: Comment

http://stackoverflow.com/comment/47194984
has text: yeah that is kind of weird. But somehow destination is an index of the dataobject it iterates through and not the object. So if im using it like destination.Latitude it will be undefined
comment on: http://stackoverflow.com/a/29519887
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46989122
has text: Thanks for your help, but still display nothing on page 2.
comment on: http://stackoverflow.com/a/29407259
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29375197
tagged with: xmlhttprequest
tagged with: php
answer count: 0
has comment: http://stackoverflow.com/comment/46944667
score: 0
type: Question
tagged with: javascript
has title: oTrying to upload audio file locally using its blob url
has body: I have a task to record audio and store it on server. Right now, I am using local python server to run the code. I am getting the blob url of the audio file but when I am calling following javascript function to store it it is giving error:- function upload(blob) { var xhr; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xhr=new XMLHttpRequest(); } else {// code for IE6, IE5 xhr=new ActiveXObject("Microsoft.XMLHTTP"); } xhr.open('GET', 'upload.php',true); xhr.onload = function(e) { }; // Listen to the upload progress. var progressBar = document.querySelector('progress'); var data= new FormData(this); data.append('file',blob); //xhr.setRequestHeader("Content-type","Blob"); xhr.send(data); }; my upload.php which is on server side &lt;?php if(isset($_FILES["file"])) { $f = $_FILES["file"]; $dir = "data"; if(!file_exists($dir)) mkdir($dir); foreach($f["name"] as $k =&gt; $name) { $file = $dir."/".$name; if($f["error"][$k] == 0 &amp;&amp; move_uploaded_file($f["tmp_name"][$k], $file)) { $uploaded[] = $file; } } die(json_encode($uploaded)); } ?&gt;
has comment: http://stackoverflow.com/comment/46937093
has comment: http://stackoverflow.com/comment/46935743
has comment: http://stackoverflow.com/comment/46936380
type: UnansweredQuestion

http://stackoverflow.com/comment/47017250
type: QuestionComment
comment on: http://stackoverflow.com/q/29422876
has text: And why is everything wrapped in the `ajaxSuccess` handler, that's not the way to go here! Post the ajax code as well!
score: 1
type: Comment

http://stackoverflow.com/comment/46942279
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29379195
score: 1
has text: I just needed to use new Date(2014,08,01) before adding it to column of data type date.

http://stackoverflow.com/comment/46941100
has text: i couldnt make this work, but thanks for the suggestion, I have updated my post with what i am using to get by but it's obliviously not a good approach.
comment on: http://stackoverflow.com/a/29380216
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47082370
score: 0
comment on: http://stackoverflow.com/q/29459143
has text: Your JavaScript code is run synchronously, in case you want to do something before the page changes - like prompt the user to make sure they want to change or block/prevent the page change. (Both of these can be very annoying, so only do them with good cause.) But Oriol@'s right, once the page has changed your JS is gone.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29423257
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/29423358
score: 1
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/29424080
has body: NOTE: Need to implement this without the use of jQuery or any other open source code. Here is what I have HTML: Model Browse all our products below: Name: Desc: Cost: Stock: js.js is below var getProducts = function(){ console.log("Getting Products..."); var success = function() { var product = JSON.parse(xhr.responseText); console.log(product); document.getElementById("name").innerHTML = product.name; document.getElementById("desc").innerHTML = product.desc; document.getElementById("cost").innerHTML = product.cost; document.getElementById("stock").innerHTML = product.stock; } }; xhr = new XMLHttpRequest(); xhr.open("GET", "back.php"); xhr.addEventListener("load", success); xhr.send(); }; window.addEventListener("load", getProducts); back.php returns the following from a database. They have been json_encoded: {"name":"TESTPRODUCT","desc":"TESTIN12356879CEWBLABHDSB","cost":"123.45","stock":"6"} {"name":"soot","desc":"soooottty black","cost":"980.00","stock":"10"} {"name":"baby","desc":"chucky doll","cost":"7.92","stock":"34"} {"name":"bob","desc":"fydrtsfxgcvnb","cost":"3546.00","stock":"978"} {"name":"bolly","desc":"ball","cost":"77.00","stock":"89"} I need to display these objects onto the html page. I know I need to implement a for loop however, no matter whatever I try, a parse error for JSON comes up. SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 86 of the JSON data var product = JSON.parse(xhr.responseText); Would much appreciate it if someone could help me understand how to display all the JSON objects onto the html page.
answer count: 2
upvote count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/29424080
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/29423358
has comment: http://stackoverflow.com/comment/47018110
has title: How to display a list of JSON objects onto html page

http://stackoverflow.com/q/29519459
has body: I have tried to extend the simple box widget tutorial (http://docs.ckeditor.com/#!/guide/widget_sdk_tutorial_1) with some events but I don't really get it. One of my goals is to trigger an event if an editable (eg. the simplebox-title) field within the widget get focused. But unfortunately I'm only able to listen if the widget itself get focused: editor.widgets.add('simplebox', { // definitions for // button, template, etc init: function() { this.on('focus', function(ev){ console.log('focused this'); }); } }); or if the data is changed: CKEDITOR.plugins.add('simplebox', { // my plugin code init: function (editor) { editor.widgets.on( 'instanceCreated', function( evt ) { var widget = evt.data; widget.on('data', function(evt){ console.log("data changed"); }); }); } //even more code }); How do I listen to editable fields within widgets? Another challenge for me is to fire an event if the widget is removed. Maybe someone also know how to listen to this event too?
type: AnsweredQuestion
tagged with: widget
has answer: http://stackoverflow.com/a/29533952
accepted answer: http://stackoverflow.com/a/29533952
type: Question
upvote count: 4
downvote count: 0
tagged with: javascript
tagged with: ckeditor
score: 4
answer count: 1
tagged with: events
favorite count: 0
has title: Listen on ckeditor widget events

http://stackoverflow.com/a/29412391
answers question: http://stackoverflow.com/q/29409613
type: Answer
has body: Use the option enableInteractivity: false on the desired series. series:{0: {enableInteractivity: false}} // Serie 0 is the first serie in your array declaration And set the opacity to zero : var data = google.visualization.arrayToDataTable([ ['Genre', 'Label1', { role: 'annotation', role: 'style' }, 'Label2', { role: 'annotation', role: 'style' }], ['column1', 5, 'opacity: 0', 11, 'opacity: 0.2'], ['column2', 5, 'opacity: 0', 12, 'opacity: 0.2'], ['column3', 5, 'opacity: 0', 13, 'opacity: 0.2'], ['column4', 5, 'opacity: 0', 14, 'opacity: 0.2'], ['column5', 5, 'opacity: 0', 15, 'opacity: 0.2'], ['column6', 5, 'opacity: 0', 26, 'opacity: 0.2'] ]); Live demo
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29409613

http://stackoverflow.com/a/29444082
has body: Is this something to do with prototyping No, the reason is that Javascript doesn't allow you to access attributes directly on number literals. For example this won't work: 123.unexistingProperty; but this will work: (123).unexistingProperty; The thing is that a number can be written in the form of 10.5 Which means that the dot can't be use to access properties. For that reason, you'd have to wrap a number between parenthesis to call a property on the number. Example: Number.prototype.fun = function () { return "Fun" } (100).fun() (10.5).fun()
score: 4
type: Answer
has comment: http://stackoverflow.com/comment/47055728
accepted answer of: http://stackoverflow.com/q/29443962
answers question: http://stackoverflow.com/q/29443962
has comment: http://stackoverflow.com/comment/47055714
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29465553
has answer: http://stackoverflow.com/a/29465880
accepted answer: http://stackoverflow.com/a/29465880
has title: Disabling the button after once click - Part2
has body: I'm just a beginner in Java scripting. I am creating a quiz page where all topics are listed in Alphabetical order (e.g. A, B, C...Z). I would like to have the button disabled after the participant clicks-on one alphabet, but don't know where to insert the script for disabling the button. This is the simple script: What Can JavaScript Do? JavaScript can change HTML content. Click Me! I have referred this link, but as mentioned above don't know where to insert the disabling script. (http://stackoverflow.com/questions/2323948/disabling-the-button-after-once-click) I will really appreciate if someone can help me out of this problem. Regards, Nitin
linked to: http://stackoverflow.com/q/2323948
type: AnsweredQuestion
type: Question
score: 0
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29465814
has answer: http://stackoverflow.com/a/29465814

http://stackoverflow.com/comment/47175610
score: 0
type: Comment
has text: @Fourat remove function in my score?
type: QuestionComment
comment on: http://stackoverflow.com/q/29509510

http://stackoverflow.com/a/29408166
score: 0
has body: The Date depends on your local timezone. but the returned number is un UTC. if you want to convert you can do (I think) : var date = new Date('2015-04-02 03:00:00') date.setMinutes(-date.getTimezoneOffset())
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29408079
answers question: http://stackoverflow.com/q/29408079
type: Answer
has comment: http://stackoverflow.com/comment/46990312
has comment: http://stackoverflow.com/comment/46992519
has comment: http://stackoverflow.com/comment/46990249
has comment: http://stackoverflow.com/comment/46990547
has comment: http://stackoverflow.com/comment/46990723

http://stackoverflow.com/a/29514545
has comment: http://stackoverflow.com/comment/47184651
downvote count: 0
has comment: http://stackoverflow.com/comment/47185480
has comment: http://stackoverflow.com/comment/47185055
has comment: http://stackoverflow.com/comment/47184821
type: Answer
has comment: http://stackoverflow.com/comment/47184657
answers question: http://stackoverflow.com/q/29514382
upvote count: 32
has comment: http://stackoverflow.com/comment/95267505
has comment: http://stackoverflow.com/comment/47185363
has body: Everything in JS is bound to containing scope. Therefore, if you define a function directly in file, it will be bound to window object, i.e. it will be global. To make it "private", you have to create an object, which will contain these functions. You are correct that littering global scope is bad, but you have to put something in global scope to be able to access it, JS libraries do the same and there is no other workaround. But think about what you put in global scope, a single object should be more than enough for your "library". Example: MyObject = { abc: function(...) {...}, pqr: function(...) {...} // other functions... } To call abc for somewhere, be it same file or another file: MyObject.abc(...);
has comment: http://stackoverflow.com/comment/47185190
has comment: http://stackoverflow.com/comment/47184987
has comment: http://stackoverflow.com/comment/47185427
score: 32
has comment: http://stackoverflow.com/comment/47184701
has comment: http://stackoverflow.com/comment/47184939

http://stackoverflow.com/comment/47127949
comment on: http://stackoverflow.com/a/29483868
has text: That was pretty much it. I had tags outside so they couldn't connect with one another.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29444009
has answer: http://stackoverflow.com/a/29444035
upvote count: 5
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29444137
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29444137
accepted answer: http://stackoverflow.com/a/29444035
has title: Concatenate string with ternary operator in javascript
favorite count: 0
has body: Its being annoying Following code : var arrays = [1,2,3]; alert('Array has ' + (arrays.length &gt; 0) ? 'multiple':'single' + ' value'); alerts as the multiple where string is not concatenated with the ternary result. But this code : var arrays = [1,2,3]; alert('Array has ' + ((arrays.length &gt; 0) ? 'multiple':'single') + ' value'); alerts as the Array has multiple value where string is concatenated with the ternary result. My question is : Why the first code is not concatenated with string. Is there any syntax error in first code, if so why it doesnt throw an error.
linked to: http://stackoverflow.com/q/1788917
score: 5
duplicate of: http://stackoverflow.com/q/1788917
type: AnsweredQuestion

http://stackoverflow.com/comment/99483742
type: QuestionComment
type: Comment
has text: But when I am trying the below code in nodejs and chrome, then chrome is taking 522 ms and nodejs is taking 2277 ms. It means chrome is faster. function test(){ const startTime = new Date().getTime(); for(var i=0;i<10000;i++){ console.log(i); } const endTime = new Date().getTime(); console.log('Execution time::' + (endTime - startTime )); // in nodejs Execution time::2277 and in chrome Execution time::522 } test();
comment on: http://stackoverflow.com/q/29387950
score: 0

http://stackoverflow.com/a/29467284
score: 1
answers question: http://stackoverflow.com/q/29466953
has body: There is a way to do this in JQuery. I have mentioned following code snippet. Click on "Run Code Snippet" to get demo of code. $( "#book" ).load(function() { alert('element loaded') $(this).addClass("imgHeight") }); .imgHeight{ height:150px; }
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/q/29400873
has body: Another Questions here, I am trying to copy an input (or a value) from an input on my form to fire values,here is my code : &lt;script&gt; var dataBase = new Firebase ('https://yjyc-signup.firebaseio.com/Entries'); var fName = document.getElementById('name'); var eMail = document.getElementById('email'); var submitBtn = document.getElementById('submit'); //var phoneNumber = document.getElementById('phonenumber'); var nameRef = dataBase.child('Name'); var emailRef = dataBase.child('Email'); //var phonenumberRef = dataBase.child('phone number'); submitBtn.addEventListener('click', function(){ dataBase.push({ 'name': 'hello', 'Email': 'Email', 'Phone number': 'phonenumber' }); //nameRef.set(fName.value); //emailRef.set(eMail.value); //phonenumberRef.set(phoneNumber.value); swal("Thanks Alot!", "Thank you for signing up, a representative will be in touch with you shortly", "success") }); &lt;/script&gt; as you can see the 'name': is harcoded to hello , but I am looking to link it to the value of the name input at the form. any suggestions? Thank you so much for you help.
downvote count: 0
tagged with: database
tagged with: javascript
has answer: http://stackoverflow.com/a/29400996
answer count: 1
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/29400996
tagged with: firebase
score: 2
type: AnsweredQuestion
has title: setting form input to a value in firebase
type: Question

http://stackoverflow.com/comment/47182298
score: 0
type: Comment
type: QuestionComment
has text: @polifonik: Unexpected token often means invalid JSON. Try without parsing `data`. Just use `data` as if it is already parsed (which is should be). Like Andy already suggested
comment on: http://stackoverflow.com/q/29513030

http://stackoverflow.com/comment/47132378
has text: Its basically 'src/*.js' to 'public/main.js'
score: 0
comment on: http://stackoverflow.com/q/29483259
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29470100
has comment: http://stackoverflow.com/comment/47102223
type: Question
has body: I have a slideshow with thumbnails on a bottom. The problem is there is 9 pictures loaded on to the slider but there is only 3 thumbnails, while slideshow goes through all 9 pictures. Attached is a js code. Thank you function comSlider603737() { var self = this; var g_HostRoot = ""; var g_TransitionTimeoutRef = null; var g_CycleTimeout = 5; var g_currFrame = 0; var g_fontLoadJsRetries = 0; var g_currDate = new Date(); var g_currTime = g_currDate.getTime(); var g_microID = g_currTime + '-' + Math.floor((Math.random()*1000)+1); var g_InTransition = 0;var g_Navigation = 0;this.getCurrMicroID = function() { return g_microID; }; this.comSLoadImgInFrame = function(frameid, src) { jqCS603737("#comSImg603737_"+frameid+" img").attr("src", src).load(function(){ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth === 0) { //broken image } }); }; this.setNavStyle = function(id, background, color, border, type) { if (background === "") { jqCS603737("#comSNavigation603737_"+id).css("background", "none"); } else if (background == "transparent") { jqCS603737("#comSNavigation603737_"+id).css("background", "transparent"); } else { jqCS603737("#comSNavigation603737_"+id).css("background", "#"+background); } jqCS603737("#comSNavigation603737_"+id).css("color", "#"+color); jqCS603737("#comSNavigation603737_"+id).css("border", border+"px solid #"+color); var margin = (-1)*border; jqCS603737("#comSNavigation603737_"+id).css("margin-top", margin+"px"); jqCS603737("#comSNavigation603737_"+id).css("margin-left", margin+"px"); if (type === 0) { jqCS603737("#comImgBullet603737_"+id).show(); jqCS603737("#comImgBulletcurr603737_"+id).hide(); } else { jqCS603737("#comImgBulletcurr603737_"+id).show(); jqCS603737("#comImgBullet603737_"+id).hide(); } }; this.targetClearTimeouts = function() { if (g_TransitionTimeoutRef != null) { window.clearTimeout(g_TransitionTimeoutRef); g_TransitionTimeoutRef = null;} }; this.getNextFrame = function() { var ret = g_currFrame; ret++…
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/47102947
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47104140
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47103007
tagged with: css
has title: jQuery Slideshow number of thumbnails issue

http://stackoverflow.com/comment/47111476
type: Comment
comment on: http://stackoverflow.com/a/29475006
type: AnswerComment
has text: how do I verify age using strtotime in jQuery ?
score: 0

http://stackoverflow.com/a/29511264
has body: In case you want to use vanilla code, you can use You Might Not Need jQuery, a site with jQuery ways of doing stuff and their vanilla implementations. For example: jQuery code: $(el).addClass(className); Vanilla code: if (el.classList) el.classList.add(className); else el.className += ' ' + className;
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/47178556
answers question: http://stackoverflow.com/q/29511032

http://stackoverflow.com/comment/46976093
score: 0
has text: In your markup, use ` ` not ` `
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29400038

http://stackoverflow.com/comment/46946115
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29383717
has text: `I want to select a group so that automatically the groups items should also select based on the selection of groups in the dropdown` what does this mean? can you explain properly?

http://stackoverflow.com/comment/47049512
type: QuestionComment
has text: @jsve below code works for me. but first I need to off the previous click event, do you know how to do that. $('body').on('click', '.applyApprove', function () { window.location="http://www.google.com"; });
score: 0
comment on: http://stackoverflow.com/q/29440082
type: Comment

http://stackoverflow.com/comment/47092395
score: 3
comment on: http://stackoverflow.com/q/29464688
type: Comment
has text: **[.attr() Doc Link](https://api.jquery.com/attr/)**
type: QuestionComment

http://stackoverflow.com/a/29522543
downvote count: 1
has body: Try this code to visualize it: (function () { 'use strict' var element1 = document.querySelector('.element') var element2 = document.querySelector('.thisClass') /* .element will have a red border */ /* .thisClass will have a yellow border */ element1.style.border = '5px solid red' element2.style.border = '5px solid yellow' })() I created a demo on jsBin to try that out: demo As you can see, document.querySelector always returns the first element in document order.
score: 1
has comment: http://stackoverflow.com/comment/47200609
answers question: http://stackoverflow.com/q/29522361
type: Answer
upvote count: 2

http://stackoverflow.com/a/29386223
answers question: http://stackoverflow.com/q/29383860
score: 1
has body: If possible you should use ExtJS 5 as they have now added MVVM support (read more here => http://docs.sencha.com/extjs/5.1/whats_new/5.0/whats_new.html#New_Application_Architectures___Welcome_MVVM) So this would give you the two way data binding behaviour that AngularJS provides. If you have to stick with using ExtJS 4 then you could listen for the store's update event and then in the listener handler call loadRecord() on your form passing in the model instance that has been updated
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29383860
type: AcceptedAnswer
downvote count: 0
type: Answer

import
type: Tag
tag name: import
tags question: http://stackoverflow.com/q/29477294
tags question: http://stackoverflow.com/q/29465526

http://stackoverflow.com/q/29499473
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47157513
has comment: http://stackoverflow.com/comment/47157971
type: Question
has comment: http://stackoverflow.com/comment/47158272
has title: JavaScript time of hoisting
tagged with: javascript
has answer: http://stackoverflow.com/a/29499832
score: 0
answer count: 1
has body: In JavaScript does hoisting occur before or after the creation of the ExecutionContext associated with the function? I presume before, if so when? function foo() { bar(); var x; // When is this hoisted? function x() {} // ...and when is this hoisted? }; foo(); Edit: put another way, I believe a graph of objects is instantiated according to the nesting of scopes in the program code, before a single line of code is run. Is the hoisting information stored in this object graph before runtime?
has comment: http://stackoverflow.com/comment/47157755
accepted answer: http://stackoverflow.com/a/29499832

http://stackoverflow.com/comment/46981864
type: AnswerComment
score: 0
has text: I think I'm starting to get the thing less mixed up :) Please check my update. I'm able to send the data using ajax to the server, print it but the ajax success handler does not fire. Instead, i get an error.
type: Comment
comment on: http://stackoverflow.com/a/29400371

http://stackoverflow.com/q/29427193
has body: I've been noticing some strange behaviour when using lodash _.ma function. (That or I'm blatantly overlooking something) I have the following: _this.searches = _.map(body.rows, function(row) { var tmpSearch = new Search(row.value); console.log(tmpSearch.search['name']); return tmpSearch.search; }); Search is just a standard javascript object with some prototype functions. However, when I inspect _this.searches, every object is the same, I tried to loop through it to get a better result: _.forEach(_this.searches, function(search) { console.log(search['name']); }) The console.log for the _.map is this: 2015-04-03T14:14:29+0800 &lt;log&gt; searches.js:35 () test 2015-04-03T14:14:29+0800 &lt;log&gt; searches.js:35 () Test 2 2015-04-03T14:14:29+0800 &lt;log&gt; searches.js:35 () Testing search The console.log for the _.forEach is this: 2015-04-03T14:14:29+0800 &lt;log&gt; searches.js:42 () Testing search 2015-04-03T14:14:29+0800 &lt;log&gt; searches.js:42 () Testing search 2015-04-03T14:14:29+0800 &lt;log&gt; searches.js:42 () Testing search The Search can be found here: http://pastebin.com/4y6taGUr Although there's nothing special going on.
accepted answer: http://stackoverflow.com/a/29427416
tagged with: javascript
has comment: http://stackoverflow.com/comment/47025282
has title: _.map overwriting value upon return
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29427416
has comment: http://stackoverflow.com/comment/47025201
tagged with: lodash
tagged with: node.js
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/q/29461992
tagged with: javascript
has body: I realised that lightSlider does not have a resume playback function and will stop playing once any slide is clicked. Is there any way we can add in this functionality? $(document).ready(function() { var slider = $('#demo').lightSlider({ item:1, slideMargin:0, pause:8000, enableTouch:true, auto:true, loop:true, controls:false, pauseOnHover: true, }); $('#demo').parent().on('mouseenter',function(){ slider.pause(); }); $('#demo').parent().on('mouseleave',function(){ slider.play(); }); }); I tried adding a resume play functionality with the mouseleave function but it does not work on mobile. Will appreciate if any one of you gurus has any suggestion. Thanks in advance.
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31211728
score: 1
upvote count: 1
type: Question
has title: Jquery LightSlider does not resume playback after thumbnail is clicked

angularjs-ng-repeat
tags question: http://stackoverflow.com/q/29379129
tags question: http://stackoverflow.com/q/29436019
tags question: http://stackoverflow.com/q/29503290
tags question: http://stackoverflow.com/q/29504962
tags question: http://stackoverflow.com/q/29445787
tags question: http://stackoverflow.com/q/29524207
tags question: http://stackoverflow.com/q/29514802
tags question: http://stackoverflow.com/q/29498310
tags question: http://stackoverflow.com/q/29458177
tags question: http://stackoverflow.com/q/29409481
tags question: http://stackoverflow.com/q/29430578
type: Tag
tags question: http://stackoverflow.com/q/29385767
tags question: http://stackoverflow.com/q/29508857
tags question: http://stackoverflow.com/q/29430884
tags question: http://stackoverflow.com/q/29528763
tags question: http://stackoverflow.com/q/29417989
tags question: http://stackoverflow.com/q/29454844
tags question: http://stackoverflow.com/q/29487914
tag name: angularjs-ng-repeat
tags question: http://stackoverflow.com/q/29441195
tags question: http://stackoverflow.com/q/29473678
tags question: http://stackoverflow.com/q/29500436
tags question: http://stackoverflow.com/q/29520883
tags question: http://stackoverflow.com/q/29442053
tags question: http://stackoverflow.com/q/29512410
tags question: http://stackoverflow.com/q/29498102

http://stackoverflow.com/comment/47097166
score: 0
type: QuestionComment
type: Comment
has text: @BatuZet It's been [proposed for rust](https://github.com/rust-lang/rust/issues/6974), so it's not an intrinsically crazy idea. Certainly not how javascript works, though!
comment on: http://stackoverflow.com/q/29467032

http://stackoverflow.com/q/29377443
tagged with: event-propagation
has comment: http://stackoverflow.com/comment/46937057
has answer: http://stackoverflow.com/a/29398962
type: Question
linked to: http://stackoverflow.com/q/55906822
linked to: http://stackoverflow.com/q/3680429
possible better answer: http://stackoverflow.com/a/71268477
tagged with: javascript
has comment: http://stackoverflow.com/comment/46935889
has comment: http://stackoverflow.com/comment/46935616
has comment: http://stackoverflow.com/comment/46943247
answer count: 2
linked to: http://stackoverflow.com/q/2174640
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46936701
tagged with: http://stackoverflow.com/tag/svg
has title: Detecting Mouse Events on Multiple Overlapping SVG Elements
has comment: http://stackoverflow.com/comment/46936024
tagged with: pointer-events
has answer: http://stackoverflow.com/a/71268477
score: 11
upvote count: 11
accepted answer: http://stackoverflow.com/a/29398962
type: AnsweredQuestion
has body: I'm trying to detect mousemove events on partially overlapping SVG elements, as in this image fiddle &lt;svg&gt; &lt;rect id="red" x=10 y=10 width=60 height=60 style="fill:#ff0000" /&gt; &lt;rect id="orange" x=80 y=10 width=60 height=60 style="fill:#ffcc00" /&gt; &lt;rect id="blue" x=50 y=30 width=60 height=60 style="fill:#0000ff; fill-opacity: 0.8" /&gt; &lt;/svg&gt; $('rect').on('mousemove', function() { log(this.id); }); Now, when hovering the mouse over the blue/red intersection I'd like to detect mouse events on both those elements, and the same for the blue/orange combo. As you can see in the logs, in those cases the event is currently only fired for the blue box as it is on top. This has to do with pointer-events, as I can get the red and orange elements to fire the event while hovering the blue element by setting the blue element's pointer-events to none. But then I don't get the events for the blue box, so that is not a viable option either. I will use whichever library solves this problem. I looked at event bubbling like in this d3 example, but that only works for elements that are nested in the DOM. I have lots of independent elements that may overlap with lots of other elements and can therefore not structure my DOM that way. I'm guessing the last resort is to find the elements that are at the current mouse position, and manually firing the events. Therefore, I looked at document.elementFromPoint(), but that would only yield 1 element (and may not work in SVG?). I found the jQuerypp function within, that finds the elements at a given position, see here. That example looks great, except it's DIVs and not inside SVG. When replacing divs with svg rectangle elements, the fiddle seems to break. What do I do?!
has comment: http://stackoverflow.com/comment/46936379
has comment: http://stackoverflow.com/comment/46935931
has comment: http://stackoverflow.com/comment/46937933

http://stackoverflow.com/comment/47169169
type: QuestionComment
type: Comment
has text: try using $scope.$apply() before s.update(); sentence in directive
comment on: http://stackoverflow.com/q/29506103
score: 0

http://stackoverflow.com/a/29556704
score: 0
has body: I found a solution. I just prevent line breaks in the css and do them manuelly in my text. Now these wild line breaks will not appear anymore. Text in javascript now: splash.html("This is a short text. &lt;br&gt; Hide this text."); I added to CSS this line: white-space: nowrap;
type: Answer
answers question: http://stackoverflow.com/q/29512392

http://stackoverflow.com/q/29378335
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/29378613
tagged with: javascript
answer count: 2
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/21835471
type: UnansweredQuestion
has title: How to make a failed routing resolve promise load a different template URL?
has body: Learning Angular and running into an issue I cant seem to find a "good" answer to. I've been following the official Tutorial and have a similar setup with a project Im working on. The $routeProvider .when case for phone details GETS a specific .JSON file based on the name of the phone clicked on in the phone list page. The problem is, if you type in a phone name that doesn't have a .JSON file associated with it, the route still proceeds and shows a blank page. I'm trying to figure out how to prevent this. I've gotten as far as to add a resolve to .when route. However, I can only prevent the view from changing or use a $location.path redirect. Neither of these seem ideal. How do I go about showing a "404 page" view for phone that doesn't have a JSON file? In my head, I would show a different templateUrl if the GET request responds with a 404, but cant seem to get it working. Any help would be great! Here is the code I've got so far: My route handling. .when('/game/:Game', { templateUrl: 'views/game-detail.html', controller: 'GameDetailCtrl', resolve: { myData: ["Games", "$location", "$q", "$timeout",'$rootScope', function(Games, $location, $q, $timeout,$rootScope) { var def = $q.defer(); var path = $location.path().toString().substring(6); // Games service Games.get({gameName: path}, function(game, s) { }).$promise.then( function(data) { // found game data def.resolve(data); }, function(error) { // couldn't find JSON file def.reject(error); } ); return def.promise; }] } }).when('/pageNotFound', { templateUrl: 'views/error.html' }) Root Scope route change error listener: $rootScope.$on("$routeChangeError", function(event, current, previous, rejection) { console.log("failed to change routes"); //$location.path('/pageNotFound'); });
has comment: http://stackoverflow.com/comment/46978899
has answer: http://stackoverflow.com/a/29378950
has comment: http://stackoverflow.com/comment/46937996
upvote count: 1
type: Question

http://stackoverflow.com/comment/47088151
score: 0
type: Comment
type: QuestionComment
has text: @vihan1086 No, it does not use PHP. it just uses html, javascript, and css.
comment on: http://stackoverflow.com/q/29460146

http://stackoverflow.com/comment/46975722
has text: neither the label, tooltip, or legend work, but I've only studied the label in depth as of 4-1-2015
comment on: http://stackoverflow.com/q/29399889
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/47184121
type: QuestionComment
comment on: http://stackoverflow.com/q/29513928
score: 0
type: Comment
has text: Odd, works fine on Firefox but I see the issue on other browsers.

http://stackoverflow.com/comment/47194681
score: 2
has text: I suspect canvas would be a better fit for you rather than trying to knock in your requirements screw with an SVG hammer.
comment on: http://stackoverflow.com/q/29519680
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47060133
type: Comment
type: QuestionComment
has text: More context on this can be useful
comment on: http://stackoverflow.com/q/29446534
score: 0

http://stackoverflow.com/q/29405306
has comment: http://stackoverflow.com/comment/46985407
accepted answer: http://stackoverflow.com/a/29405351
has comment: http://stackoverflow.com/comment/46986818
upvote count: 1
type: Question
tagged with: c#
score: 1
possible better answer: http://stackoverflow.com/a/29405347
has title: Regex for measurement in hands
has answer: http://stackoverflow.com/a/29405347
has body: Horses in the US are typically measured in hands and inches. A hand is basically just 4 inches. So if a horse was say 62 inches. he would be 15.2 hands tall NOT 15.5. This is because the portion to the right of the decimal is really the remaining inches less than 4, a fraction of a whole hand expressed as a decimal. Or to be more concise, the portion to the right of the decimal point can only be a single digit that is either a 1, a 2 or a 3. The portion on the left should be a positive integer. The measurement could also just be a whole positive integer if, for example the horses measurement in inches was a multiple of 4. I am pretty much a dummy on RegEx and I was unable to find an example of this on line and my attempts to modify ones that seem close have ended in failure :) These are examples of matches: 15.1, 9.2, 100.3, 16 These are examples of non-matches: 15.10, 15.01, 19.4, -15.1, 16.0 Oh and one last thing. I will b using this for validation using JavaScript and perhaps C# as well.
answer count: 2
has answer: http://stackoverflow.com/a/29405351
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/47038869
tagged with: regex
type: AnsweredQuestion

http://stackoverflow.com/comment/47177231
comment on: http://stackoverflow.com/q/29510637
has text: CSS can do that.. answer to your question..
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29421447
answer count: 1
tagged with: javascript
favorite count: 0
has title: How do I remove a Google Charts Calendar legend?
type: UnansweredQuestion
tagged with: calendar
tagged with: charts
downvote count: 0
has answer: http://stackoverflow.com/a/29680945
score: 1
type: Question
has body: https://developers.google.com/chart/interactive/docs/gallery/calendar Is there a way to remove the legend (top right gradient that shows min and max values) from a Google Calendar chart?
upvote count: 1

http://stackoverflow.com/comment/47026954
score: 0
type: Comment
type: QuestionComment
has text: Check [this](https://jqueryui.com/autocomplete/#remote)
comment on: http://stackoverflow.com/q/29428348

http://stackoverflow.com/q/29398111
tagged with: profiling
has answer: http://stackoverflow.com/a/29401759
has title: JavaScript profiling with per-statement results
favorite count: 0
possible better answer: http://stackoverflow.com/a/29418362
has comment: http://stackoverflow.com/comment/46976218
score: 6
has comment: http://stackoverflow.com/comment/46985592
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46979141
tagged with: google-chrome-devtools
tagged with: firefox-developer-tools
has body: I've got a highly recursive JavaScript function, which calls no other JavaScript functions. It's just the one function calling itself doing some simple logic and calling system functions (Array.slice, Array.splice , Array.push, etc.). And I'm trying to optimize it, however Chrome's and Firefox's (the only browsers the website works in) DevTools and Firebug's profilers don't show anything more specific than function calls. Visual Studio has a nice thing where after profiling an application, it will tell you what percent of execution was spent on each line of your functions, which is really helpful. I've tried breaking up the function into smaller functions, but then the function call overhead inflates to take up most of my execution time.
type: Question
has comment: http://stackoverflow.com/comment/46981194
has answer: http://stackoverflow.com/a/29418362
upvote count: 6
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29401759
has comment: http://stackoverflow.com/comment/48442262
has comment: http://stackoverflow.com/comment/48424482
answer count: 2
tagged with: firebug

http://stackoverflow.com/comment/47047066
comment on: http://stackoverflow.com/q/29439044
has text: I'm using mostly javascript, and some jquery, and the pusher api, added the tags
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29465085
type: AnsweredQuestion
upvote count: 2
tagged with: wordpress
type: Question
accepted answer: http://stackoverflow.com/a/29505182
has comment: http://stackoverflow.com/comment/47119468
has body: I would like to have a logo image change (for the purpose of color) upon scrolling. The navigation currently changes when scrolling downwards to have a dark bar behind it, does anybody have any suggestions as to what will work best for this image replacement? I have tried using this as found in another SO question but wouldn't work for me.... $(function(){ $(window).scroll(function(){ if($(this).scrollTop() &gt; 100) { $('logo_h logo_h__img').fadeOut('slow'); $('#logo-img img') .css({'width':'184px','height':'33px'}) .attr('src','logo1.png'); } if($(this).scrollTop() &lt; 100) { $('logo_h logo_h__img').fadeIn('fast'); $('#logo-img img') .css({'width':'184px','height':'60px'}) .attr('src','logo2.png'); } }); }); Filenames replaced for the sake of demonstration. Thank you!
score: 2
has comment: http://stackoverflow.com/comment/47137762
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29505182
tagged with: css
has title: Replace logo image upon scroll down JS / HTML / CSS wordpress website

http://stackoverflow.com/comment/47205547
type: QuestionComment
score: 0
has text: @Pointy , thanks , that's all i wanted to know !! so the author if this code , intents the value of `pencilY` to be a negative , at all times ?
comment on: http://stackoverflow.com/q/29525566
type: Comment

http://stackoverflow.com/comment/47049088
type: AnswerComment
score: 0
type: Comment
has text: It's usually possible to do some minor template magic with your elements such as `ngClass=" title != '' ? 'myAnimationCSSClass' : '' "`, `ngIf="title != ''"` or `ngShow="title != ''"` to make your code a bit more terse or to use different animation hooks if you already have some defined, but everyone might not appreciate the approach. Any of these should allow you to just write to the scope variable in your controller and apply an animation without triggering it manually, though.
comment on: http://stackoverflow.com/a/29440188

http://stackoverflow.com/comment/47176553
comment on: http://stackoverflow.com/q/29510154
has text: @Douwe Pieter Reitsma what is the type of array `data`??
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47194503
score: 0
type: Comment
type: QuestionComment
has text: @vitorenesduarte, that doesnt work for me. ```rec[0].getRecord().toJSON()``` gives me ```Thefield'Backup.record'hasbeendeclaredasEMBEDDEDbutanincompatibletypeisused``` error. Then ```rec[0].getRecord()``` gives me ```Thefield'Backup.record'hasbeendeclaredasEMBEDDEDbutthevalueistheRecordID```. And finally ```rec[0]``` gives the same as the previous one. Which one worked for you? Which DB version are you using? Have you actually tried it with ```embedded``` datatype?
comment on: http://stackoverflow.com/q/29515487

http://stackoverflow.com/a/29452968
has comment: http://stackoverflow.com/comment/47091133
accepted answer of: http://stackoverflow.com/q/29452244
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29452244
has body: getId() does not return anything if you end up calling fetchIDs(). You can change it to be like this: function getId () { if (typeof localStorage.id !== 'undefined' ) { return Promise.resolve(localStorage.id); } else { return fetchIDs().then(function (r) { return Promise.resolve(r); }); } }; But, you don't actually need the extra Promise.resolve(r) and can just do this: function getId () { if (typeof localStorage.id !== 'undefined' ) { return Promise.resolve(localStorage.id); } else { return fetchIDs(); } }; That will return the promise from fetchIDs() which the caller of getId() can then use.
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/47035310
type: QuestionComment
comment on: http://stackoverflow.com/q/29432342
has text: Another thing I noticed. in your website sample, if you look at the console, you get this error: `Uncaught TypeError: Cannot read property 'looper' of undefined` but I do not have that on my local when I try it out. Would this maybe have to do with it?
score: 0
type: Comment

http://stackoverflow.com/a/29437706
score: 0
type: Answer
has body: You can add a click event to your button... something like: function convert() { var radioOptions = document.getElementsByName("cel"); var radioSelection; var i; for (i = 0; i < radioOptions.length; i++) { if (radioOptions[i].type === "radio" && radioOptions[i].checked === true) { radioSelection = radioOptions[i].value; } } if (radioSelection === 'celsius') { celc(); } else if (radioSelection === 'fahrenheite') { farin(); } } //temperature conversion //I need the buttons to link to the conversions below? function celc() { var origTemp = document.getElementById('temp').value; var farTemp = (1.8 * origTemp) + 32; document.getElementById('answer').innerHTML = farTemp; } function farin() { var origTemp = document.getElementById('temp').value; var celTemp = (origTemp - 32) / 1.8 document.getElementById('answer').innerHTML = celTemp; } ---> celsius to fahrenheit fahrenheit to celsius
answers question: http://stackoverflow.com/q/29437059

http://stackoverflow.com/a/30390321
score: 0
answers question: http://stackoverflow.com/q/29379183
has body: Add die; at the end of your function in controller. I guess this will work out and wont open Iframe in and Iframe
type: Answer

http://stackoverflow.com/q/29407234
tagged with: jqwidget
has answer: http://stackoverflow.com/a/29407662
upvote count: 1
answer count: 1
has body: I am displaying task list using JqWidgets grid. Now I have requirement that user can prioritize there task by drag and drop the selected task (one or multiple). As you can see in the attached grid, user has selected multiple item from grid. Now user can priortize the items in the grid with simple drag and drop event. I am sharing a demo JSFiddle link Can you please help me to do that... For reference grid see this link I will appreciate you if you share a nice example of it to do the same in JqWidgets grid Thanks, ~Chandan
downvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46988790
has title: How to drag and drop selected row(s) in JqWidgets grid
has comment: http://stackoverflow.com/comment/46989318
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/93263484
type: Question
score: -2

http://stackoverflow.com/comment/47080605
type: Comment
has text: It depends on how you implement your server. What are you expecting to get on your server?
comment on: http://stackoverflow.com/a/29457892
type: AnswerComment
score: 0

http://stackoverflow.com/a/29480271
answers question: http://stackoverflow.com/q/29480235
has body: When your script runs, the DOM does not have the iframe rendered yet. You need to move your iframe above the php code segment that renders the script tag.
score: 0
type: Answer

http://stackoverflow.com/comment/46986025
type: Comment
comment on: http://stackoverflow.com/a/29394668
has text: i had tried " document.getElementById("iframe_tabCust")" its working fine in sample code but dont why its not working in actual code. any doc type issue or what i dont know exactly.. please help me on that. and thanks for your reply.
type: AnswerComment
score: 0

http://stackoverflow.com/a/29480264
score: 1
has comment: http://stackoverflow.com/comment/47122959
upvote count: 1
has comment: http://stackoverflow.com/comment/47126927
downvote count: 0
has comment: http://stackoverflow.com/comment/47126889
type: Answer
has comment: http://stackoverflow.com/comment/47126827
has comment: http://stackoverflow.com/comment/47122950
has body: The _ItemHierarchy field includes all levels of PortfolioItems through all levels of Stories to Defects, Tasks and (I'm pretty sure) TestCases. So, if you want "all User Stories under a particular Feature", simply specify find: {_ItemHierarchy: 1234567} where 1234567 is the ObjectID of the Feature. You could combine this with the _TypeHierarchy and Release clauses. If you combine it with the Children and _TypeHiearchy clauses as you proposes, that will give you only leaf stories as opposed to all the levels. This is ideal if you are doing aggregations on fields like sum of PlanEstimate (points) or TaskActual, etc. Note, I don't think this has anything to do with being indexed, so I may be misunderstanding your question. Please accept my apology if that's the case.
answers question: http://stackoverflow.com/q/29477406

http://stackoverflow.com/comment/47106297
score: 0
has text: `$(this)` refers the anchor element and it doesn't have an child element with class name `events_links`. And so your `.find()` fails.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29472426

http://stackoverflow.com/a/61645285
score: 3
has comment: http://stackoverflow.com/comment/138651751
type: AcceptedAnswer
upvote count: 3
type: Answer
has body: A little late to the party here, but since the only answer doesn't address the issue of a regular expression for URI templates, I decided to take a stab at it as I couldn't find one either. This is based solely on the ABNF rules in Section 2 of RFC 6570 and I included some ASCII art to map out the different components. ^([^\x00-\x20\x7f&quot;'%&lt;&gt;\\^`{|}]|%[0-9A-Fa-f]{2}|{[+#./;?&amp;=,!@|]?((\w|%[0-9A-Fa-f]{2})(\.?(\w|%[0-9A-Fa-f]{2}))*(:[1-9]\d{0,3}|\*)?)(,((\w|%[0-9A-Fa-f]{2})(\.?(\w|%[0-9A-Fa-f]{2}))*(:[1-9]\d{0,3}|\*)?))*})*$ \ \_____________/ \\____________/ \\__________________/ \__________________/ /\________________/ / \_________________________________________________________________/ // \ pct-encoded / \ operator \\ varchar varchar / modifier-level4 / varspec // \______________________________________/ \ \\________________________________________/ / // literals \ \ varname / // \ \_________________________________________________________/ // \ \ varspec // \ \____________________________________________________________________________________________________________________________// \ variable-list / \_________________________________________________________________________________________________________________________________________/ expression You can check it out on regex101.com. This should work in JSON Schema since I'm using the ECMA syntax. There might also be some simplifications that can be made, but as I said, this aligns with the ABNF, so it should be relatively easy to follow, if you're familiar with the specification.
answers question: http://stackoverflow.com/q/29494608
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29494608

http://stackoverflow.com/a/29400197
score: 0
accepted answer of: http://stackoverflow.com/q/29400046
type: AcceptedAnswer
has body: console.log(...) will write in your browser console. I am not sure the Default Eclipse console has a view for the internal browser it uses. Access your link in a browser like say FireFox and install a plugin called FireBug to see the logs. There are however many debugging plugins for JavaScript in Eclipse available - have a look here - Debug JavaScript in Eclipse.
type: Answer
answers question: http://stackoverflow.com/q/29400046
has comment: http://stackoverflow.com/comment/47040238

http://stackoverflow.com/q/29449046
tagged with: google-sheets
tagged with: javascript
has title: Google Sheet custom function returns 0
tagged with: google-apps-script
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/29449215
possible better answer: http://stackoverflow.com/a/29450597
has answer: http://stackoverflow.com/a/29450597
type: AnsweredQuestion
has body: I'm following this thread to count all the cells with a particular color. in my case, green/lime/#00ff00/rgb(0,255,0): I've created my own sheet and tried to recreate these custom function without success. The issue is that regardless of how I try to manipulate the function or cells, the function always returns 0 instead of the expected count of 14. On its own getColor() works, but something seems to break down at the ArrayFormulat(SUM()) stage.
tagged with: google-docs
type: Question
has answer: http://stackoverflow.com/a/29449215
tagged with: google-apps

http://stackoverflow.com/comment/47092767
comment on: http://stackoverflow.com/q/29464911
has text: can you add a console log/alert statement in the dom ready handler to see whetehr it is executed multiple times
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46936444
type: AnswerComment
comment on: http://stackoverflow.com/a/29378029
has text: From your original question, I gathered the callback should be getting passed into the inner function and bound to `welcomeCtrl.finishedScanning`. Is that not what you're hoping to achieve? If not, where is the object/context you want the inner function bound to?
type: Comment
score: 0

http://stackoverflow.com/comment/47086785
has text: The `random > 0.0` is rather superfluous as well - I'd leave it out, it adds nothing at all. The `$("#greenfood")` in the cases is entirely not needed - the element is already looked up, the code should be using `$foodcheck.animate(/* stuff */);` instead. Otherwise, a good answer, I'd upvote it.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29461472
score: 1

http://stackoverflow.com/a/29410533
score: 0
answers question: http://stackoverflow.com/q/29409074
has body: Finally i found the answer for my question. We have to use @Hash annotation for this.
type: Answer

http://stackoverflow.com/a/29518413
type: Answer
has comment: http://stackoverflow.com/comment/47192557
has comment: http://stackoverflow.com/comment/47192539
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47193044
accepted answer of: http://stackoverflow.com/q/29518200
answers question: http://stackoverflow.com/q/29518200
has comment: http://stackoverflow.com/comment/47192968
has body: You can move all event handler attributes away from HTML into JS using addEventListener. So, for example, this: should become this: HTML JS var input_txt = document.getElementById('input_txt'); input_txt.addEventListener('keydown', function(e){ limitText(this.form.limitedtextfield,3); }); input_txt.addEventListener('keyup', function(e){ limitText(this.form.limitedtextfield,3); }); Ideally, you could use a common function for the callback, like this: function handleInputKeys() { limitText(this.form.limitedtextfield,3); } And then simply have: input_txt.addEventListener('keyup', handleInputKeys); Next example, this: RAAD Should be: HTML RAAD JS var guess_btn = document.getElementById('guess_btn'); guess_btn.addEventListener('click', guessNumber); etc...
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47192445

http://stackoverflow.com/q/29416454
score: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29419284
type: Question
has body: I want to know if two or more arrays have common items, but I don't care what those items are. I know lodash has an _.intersection method, but I don't need it to run through every single item of each array. Instead, I need something like a _.hasIntersection method that will stop looking in an array once it finds the first common occurrence. Does lodash have something like that?
tagged with: arrays
tagged with: javascript
upvote count: 4
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/29419284
linked to: http://stackoverflow.com/q/77579920
favorite count: 0
has title: Lodash _.hasIntersection?
possible better answer: http://stackoverflow.com/a/29416524
has answer: http://stackoverflow.com/a/78771501
has answer: http://stackoverflow.com/a/29416524
tagged with: lodash

http://stackoverflow.com/comment/47048298
comment on: http://stackoverflow.com/a/29439288
score: 0
type: AnswerComment
type: Comment
has text: https://jsfiddle.net/g1uLsdvd/4/ i have modified some code in the above link.. bcz javascript must be written in another box of javascript and script, html, head , meta tags are not needed andn ot allowed in html box.. try ur code again and try if it working...

http://stackoverflow.com/comment/47087337
score: 0
comment on: http://stackoverflow.com/a/29461708
type: Comment
type: AnswerComment
has text: This was exactly what I was looking for, thank you. But before I mark it as the correct answer please edit your answer to explain what I did wrong and how you fixed it.

http://stackoverflow.com/a/44315126
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29450399
has body: Just use this function [for ES5] : function countVowels(str){ return (str.match(/[aeiou]/gi) == null) ? 0 : str.match(/[aeiou]/gi).length; } Will work like a charm

http://stackoverflow.com/comment/46950286
type: Comment
type: QuestionComment
has text: normally you should not care about checking if user is logined or not, session will do that, you should just have a upper level module/class or request interceptor that checks every time if current session is authorized. This as php session. The only difference in your case is that you should syncronize this session with a token since you're using js app
score: 0
comment on: http://stackoverflow.com/q/29385765

http://stackoverflow.com/q/29479013
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/29479189
has title: prevent jQuery post request executed twice by double click
type: Question
answer count: 2
has body: I've searched for equal questions, but found not a single one for my specific case. I have an element Click and a jQuery post-request bound to it $(document).ready( function() { $(document).on( 'click', '#myButton', function(e) { $.post( "RESPONDING_WEBPAGE_HERE.php" ).done( function( result ) { console.log( result ); }); }); }); Now, for every time you click the button, it makes a post-request. Makes sense. What I want is a good solution for only executing the post-request, if the result function (.done()) is executed. For sure, I know to handle that with a variable like var isAjaxRequest = false; setting it to true, and back to false in the resulting function, but maybe there is a better (jQuery build-in) way of doing it. Here is my solution by now. I would be really great if there are better ones. var isAjaxRequest = false; $(document).ready( function() { $(document).on( 'click', '#myButton', function(e) { if( !isAjaxRequest ) { isAjaxRequest = true; $.post( "RESPONDING_WEBPAGE_HERE.php" ).done( function( result ) { isAjaxRequest = false; console.log( result ); }); } }); }); Thank you =)
upvote count: 1
tagged with: post
has answer: http://stackoverflow.com/a/29479189
has comment: http://stackoverflow.com/comment/47118580
tagged with: javascript
tagged with: jquery
tagged with: ajax
possible better answer: http://stackoverflow.com/a/29479082
has answer: http://stackoverflow.com/a/29479082
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0

http://stackoverflow.com/comment/47026781
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29428195
has text: please use the search before asking a question. thank you.

http://stackoverflow.com/comment/47135510
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29485875
has text: `self` is not defined in `closeDialog` method, try replacing it with `this`

http://stackoverflow.com/q/29517367
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29517582
has body: Is there any integration for the Kendo UI Framework by Telerik for the Webstorm IDE, so the widgets will be autocompleted in the HTML? Out of the box, Webstorm shows some custom directives for mobile Angular widgets, but only a few. I was thinking, as Webstorm enabled custom directive support for Angular, this should work without any plugin. Do I have to make settings adjustments to get this working?
has title: Webstorm Integration for KendoUI and Angular Directives
type: Question
tagged with: intellij-idea
tagged with: javascript
tagged with: webstorm
tagged with: kendo-ui
score: 0
answer count: 1
tagged with: angularjs

http://stackoverflow.com/comment/47002714
score: 0
type: Comment
has text: Yes, this I tried. This is how I know that circletype.js removes the a element from the what it processes.
type: AnswerComment
comment on: http://stackoverflow.com/a/29399612

http://stackoverflow.com/a/29851047
downvote count: 0
has body: In the Google for Work Support Portal where you can authorize URLs they list under examples as well a file path (file:/C:/Documents/MapsDemo/main.html), but they write besides that you need to open a case for adding it. Adding file paths yourself doesn't work.
type: Answer
answers question: http://stackoverflow.com/q/29476362
score: 1
upvote count: 1

http://stackoverflow.com/a/29480753
type: Answer
answers question: http://stackoverflow.com/q/29479977
has body: ngModel works only on listed input types, and hidden isn't among them. The internals of input directive make a hint that it won't work automatically on every possible input: var inputType = { ... 'hidden': noop, 'button': noop, 'submit': noop, 'reset': noop, 'file': noop } This makes sense because hidden inputs don't need two-way binding (they are unnecessary in Angular app, too). If you want to use them anyway, then &lt;input type="hidden" name="IsCreditCardValid" value="{{ IsCreditCardValid }}" /&gt;
score: 0
has comment: http://stackoverflow.com/comment/47122653
has comment: http://stackoverflow.com/comment/47122139

http://stackoverflow.com/comment/47006771
type: AnswerComment
comment on: http://stackoverflow.com/a/29414177
type: Comment
has text: Hello David! Yes, this is indeed a minimum-cost flow problem. I am not trying to reinvent the wheel or write the algo from scratch. In fact I wouldn't know how to begin, which is why I am using the simplex above. I like it because I can feed it my variables and constraints directly as an array. Is there a reason why it is taking so long to complete? As a starting point I would like to work on the above before I consider other options!
score: 0

http://stackoverflow.com/comment/47053288
type: QuestionComment
has text: give me a minute i will make one
comment on: http://stackoverflow.com/q/29442508
score: 0
type: Comment

http://stackoverflow.com/q/29490407
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am a total beginner and attempting to make a calculator in Javascript. When I click on a button I want the value of that button inserted in to a textfield? Here what i tried and had zero result. &lt;!-- Html Coding ---&gt; &lt;form name="cal"&gt; &lt;input name="text1" type="text" placeholder="enter value here" /&gt;&lt;br/&gt; &lt;input name="num1" type="button" value="1" onClick="num1()"/&gt; &lt;/form&gt; &lt;!-- JavaScript coding ---&gt; &lt;script&gt; function num1() { document.cal.text1.value = "1"; } &lt;/script&gt; Please keep it as simple as possible because im not a native English
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/47140060
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29490593
has answer: http://stackoverflow.com/a/29490809
has answer: http://stackoverflow.com/a/29490640
has title: Inserting the value of a button into a text field

http://stackoverflow.com/comment/47047575
type: AnswerComment
has text: I'm not sure I understand how the controller works. and the location of these within the controller. ?? I'm really new to this.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29391776

http://stackoverflow.com/comment/46951626
comment on: http://stackoverflow.com/a/29385293
score: 0
type: AnswerComment
has text: Can you please show your updated code also? And what it says when you click on Advanced tab?
type: Comment

http://stackoverflow.com/comment/47035670
has text: @BoltClock: yeah, for some reason I was under the impression that you meant in the snippet the plug-in should add the selector (no, I have no idea why I thought that). Edited and added.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29432466
type: AnswerComment

http://stackoverflow.com/comment/47377606
score: 0
type: Comment
type: QuestionComment
has text: By remote do you mean that the downloadable files are on a different domain than the Angular app? Do you control the remote (have access to modify it's backend) or not?
comment on: http://stackoverflow.com/q/29452031

http://stackoverflow.com/a/29475723
type: Answer
accepted answer of: http://stackoverflow.com/q/29475624
upvote count: 15
answers question: http://stackoverflow.com/q/29475624
downvote count: 0
has body: You have the script elemen's src attribute wrongly spelled for the toaster.js file, it should be "src" but is "scr".
has comment: http://stackoverflow.com/comment/47112504
type: AcceptedAnswer
score: 15

http://stackoverflow.com/comment/47061604
type: Comment
comment on: http://stackoverflow.com/a/29447562
type: AnswerComment
has text: lets say for arguments sake that I had to pass in the idVal. How would you change it then?
score: 0

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/29489469
type: Tag

http://stackoverflow.com/q/29444081
possible better answer: http://stackoverflow.com/a/29444114
type: Question
has body: I have array stored inside input hidden field as follow: &lt;input type='text' name='fileuploaddelete' id='fileuploaddelete' class='required' value='["ppl.jpg","Tulips.jpg","Penguins.jpg"]'/&gt; JS var deleteFile = []; deleteFile = $("#fileuploaddelete").val(); // return string format When I retrieved the value using jquery, it is in String format. How to keep it in array format? Any ideas?
type: AnsweredQuestion
tagged with: javascript
score: 0
answer count: 3
tagged with: arrays
has comment: http://stackoverflow.com/comment/47055695
tagged with: jquery
has title: How to keep value in array format?
has answer: http://stackoverflow.com/a/29444114
has answer: http://stackoverflow.com/a/29444123
has answer: http://stackoverflow.com/a/29444116
accepted answer: http://stackoverflow.com/a/29444116

http://stackoverflow.com/comment/47150792
score: 0
type: AnswerComment
type: Comment
has text: Got it, I updated the post above. Please let me know if I should include more code or perhaps make a new question?
comment on: http://stackoverflow.com/a/29481557

http://stackoverflow.com/comment/47134737
type: QuestionComment
has text: From the [documentation](http://api.jquery.com/ajaxComplete/): **As of jQuery 1.8, the .ajaxComplete() method should only be attached to document**. It makes no sense to listen to those events on anything else.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29487452

http://stackoverflow.com/q/29433696
accepted answer: http://stackoverflow.com/a/29433753
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3561493
score: 4
possible better answer: http://stackoverflow.com/a/29433772
tagged with: replace
type: Question
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/29433772
downvote count: 0
linked to: http://stackoverflow.com/q/399078
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29433753
has body: How can I create a regex from a variable so that it has a capture group that can then be used in a replace() call? The below is what I have tried so far without success. var term = 'test' var r = new RegExp('('+term+')', "ig"); $('#test').html( $('#test').html().replace(r, ''+$1+'') ); // Uncaught ReferenceError: $1 is not defined .found{ background-color:yellow; } This is a test
tagged with: regex
has title: Create regex from variable with capture groups in javascript

http://stackoverflow.com/a/29394319
accepted answer of: http://stackoverflow.com/q/29393661
has comment: http://stackoverflow.com/comment/47008725
score: 0
answers question: http://stackoverflow.com/q/29393661
type: AcceptedAnswer
has body: Key point is context. If you have this HTML &lt;input onclick="functiondostuff('hdnAttribute',this,'Key')"&gt; then the browser can infer context from the user interaction and set this for you correctly. From within VBA that's a slightly different matter and you have to define context manually. How about this: Dim js As Variant js = Array( _ "var input = document.getElementById('yourElementsId');", _ "functiondostuff('hdnAttribute',input,'Key');" _ ) Call IE.Document.parentWindow.execScript(Join(js, vbNewLine)) This way you get to define context yourself. document.getElementById was just for the sake of the example. If your element has no ID, use any other method (like DOM traversal, document.querySelectorAll, document.getElementsByTagName + a loop, ...) to get a reference to the desired element.
type: Answer
has comment: http://stackoverflow.com/comment/46980968
has comment: http://stackoverflow.com/comment/47009155
has comment: http://stackoverflow.com/comment/46965237
has comment: http://stackoverflow.com/comment/46972445

http://stackoverflow.com/a/29455295
has comment: http://stackoverflow.com/comment/47075791
has comment: http://stackoverflow.com/comment/47075849
type: Answer
has comment: http://stackoverflow.com/comment/47075776
answers question: http://stackoverflow.com/q/29454957
has body: One way would be to put the js code from the partial in a function, and call this in the success of the Ajax Get. Any function in the partial should be available in the "parent", and this is a technique I use myself. In the partial view: function initEditPhoneNBR() { var COUNTRY_CODE_format = $("#PHONE_COUNTRY_CODE_format").val(); var AREA_CODE_format = $("#PHONE_AREA_CODE_format").val(); var NUMBER_format = $("#PHONE_NUMBER_format").val(); var EXTENSION_format = $("#PHONE_EXTENSION_format").val(); if (COUNTRY_CODE_format != "") { $('#phonecountrycode').mask(COUNTRY_CODE_format); } if (AREA_CODE_format != "") { $('#phoneareacode').mask(AREA_CODE_format); } if (NUMBER_format != "") { $('#phonenumber').mask(NUMBER_format); } if (EXTENSION_format != ""){ $('#phoneextension').mask(EXTENSION_format); } } $(document).ready(function () { initEditPhoneNBR(); }); In the ajax, parent view: $('#CommunicationCountry').change(function(){ $.ajax({ url: 'customer/CountryChange', type: "Get", data: { id: $("#CommunicationCountry").val() }, dataType: 'json', contentType: 'application/json; charset=utf-8', cache: false, success: function (data) { $("#DivPhoneNBRContainer").empty(); $('#DivPhoneNBRContainer').html(data); initEditPhoneNBR(); }, failure: function (errMsg) { alert(errMsg); } }); });
has comment: http://stackoverflow.com/comment/47075971
has comment: http://stackoverflow.com/comment/47075747
has comment: http://stackoverflow.com/comment/47075896
has comment: http://stackoverflow.com/comment/47075864
score: 0
has comment: http://stackoverflow.com/comment/47075916

http://stackoverflow.com/comment/47254902
has text: Thank you. I was able to get it working by using the renderAjax and I created an "if" statement that evaluates Yii::$app->request->isAjax which uses the render or renderAjax respectively. I will change it to match your suggestion checking for X-PJAX.
comment on: http://stackoverflow.com/a/29528515
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29406126
accepted answer: http://stackoverflow.com/a/29406332
has comment: http://stackoverflow.com/comment/46986942
type: Question
possible better answer: http://stackoverflow.com/a/29406267
has comment: http://stackoverflow.com/comment/46986925
has answer: http://stackoverflow.com/a/29406267
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29406384
score: 0
has answer: http://stackoverflow.com/a/29406332
has body: I have a div filled with images. I have a button that removes images one by one from the div, thus decreasing its height every time. When the div's height is below 75px in height (implying that it no longer holds any images), I have this jQuery code that is meant to hide the div as soon as the low height is detected: if ($('#ImageDiv').height() &lt; 75) { $('#ImageDiv').hide(); } This code is programmed to activate every time the user clicks that Remove Image button. Instead, here is what is actually happening: The user clicks the button, thus removing the image, but the div does NOT immediately hide the div despite the height being below 75. Instead, it requires a second click of the button to realize the height is low enough to hide the div. What is wrong with my logic and how can this problem be fixed?
has comment: http://stackoverflow.com/comment/46986859
has answer: http://stackoverflow.com/a/29406318
tagged with: http://stackoverflow.com/tag/html
has title: What is the correct logic of hiding a DIV the instant its height is below a certain number?
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/46987026
type: AnsweredQuestion

http://stackoverflow.com/comment/47096841
comment on: http://stackoverflow.com/a/29455737
has text: Between the different text-boxes the border is 2px since there are 2 borders there. One from the left box and one from the right box. To solve that you would have to completely rearrange the css of the text-boxes.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29402503
has title: How create a table on DynamoDB with a GlobalSecondaryIndexes in local?
has answer: http://stackoverflow.com/a/29403157
accepted answer: http://stackoverflow.com/a/29403157
answer count: 1
tagged with: javascript
tagged with: amazon-web-services
favorite count: 0
has body: I DynamoDB install locally on Windows 7. My project is a Node.js(0.12.0) and I use aws-sdk. Version DynamoDB : 2012-08-10 This work -> dynamodb.createTable({ TableName: 'Users', AttributeDefinitions: [{AttributeName: 'userId', AttributeType: 'S'}], KeySchema: [{AttributeName: 'userId', KeyType: 'HASH'}], ProvisionedThroughput: { 'ReadCapacityUnits': 5, 'WriteCapacityUnits': 5 } }, function () { ... }); This don't work -> dynamodb.createTable({ TableName: 'Users', AttributeDefinitions: [{AttributeName: 'userId', AttributeType: 'S'}], KeySchema: [{AttributeName: 'userId', KeyType: 'HASH'}], ProvisionedThroughput: { 'ReadCapacityUnits': 5, 'WriteCapacityUnits': 5 }, GlobalSecondaryIndexes: [ { IndexName: 'longitudeUserIndex', KeySchema: [ { AttributeName: 'userId', KeyType: 'HASH' }, { AttributeName: 'longitude', KeyType: 'RANGE' } ], Projection: { NonKeyAttributes: [ ], ProjectionType: 'KEYS_ONLY' }, ProvisionedThroughput: { 'ReadCapacityUnits': 5, 'WriteCapacityUnits': 5 } } ] }, function () { ... }); Doc DynamoDB Javascript : http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#createTable-property
tagged with: node.js
downvote count: 0
tagged with: amazon-dynamodb
score: 2
tagged with: nosql
type: AnsweredQuestion
type: Question
upvote count: 2

http://stackoverflow.com/a/69052838
type: Answer
answers question: http://stackoverflow.com/q/29516293
upvote count: 0
has body: Once a script is downloaded it is cached (If cache headers are available), for the second request of the script is loaded from cache, So it does not waste any bandwidth or does not send any request to domain/host. I just checked http://pagead2.googlesyndication.com/pagead/js/r20150402/r20150224/show_ads_impl.js HTTP/1.0 200 OK => P3P => policyref="http://www.googleadservices.com/pagead/p3p.xml", CP="NOI DEV PSA PSD IVA IVD OTP OUR OTR IND OTC" Timing-Allow-Origin => * Cross-Origin-Resource-Policy => cross-origin Vary => Accept-Encoding Date => Sat, 04 Sep 2021 06:08:13 GMT Expires => Sat, 04 Sep 2021 06:08:13 GMT Cache-Control => private, max-age=1209600 Content-Type => text/javascript; charset=ISO-8859-1 X-Content-Type-Options => nosniff Content-Disposition => attachment; filename="f.txt" Server => cafe X-XSS-Protection => 0 Accept-Ranges => none It has cache control header.
score: -2
downvote count: 2

http://stackoverflow.com/comment/47134570
comment on: http://stackoverflow.com/q/29486332
type: Comment
type: QuestionComment
score: 0
has text: Ahh okay. It is a keydown event.

http://stackoverflow.com/comment/46995089
type: Comment
type: QuestionComment
has text: If I am correct you want to convert this object instance to a JSON string you can write to the filesystem?
comment on: http://stackoverflow.com/q/29410908
score: 0

http://stackoverflow.com/comment/46968930
has text: I think wou may want to read this kind of things : http://stackoverflow.com/questions/1960473/unique-values-in-an-array
type: QuestionComment
comment on: http://stackoverflow.com/q/29396207
score: 0
type: Comment

http://stackoverflow.com/q/29529772
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/53102194
has title: Rendering D3.js within an Ampersand.js app using Jade
tagged with: javascript
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/32626557
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
upvote count: 1
tagged with: ampersand.js
type: Question
tagged with: pug
has body: This will be the first question I have asked on stackoverflow. Please bear with me. I am implementing an app using Ampersand.js as the framework and D3.js for visualizations. The current state of the app is that it renders my ampersand-views (using Jade templates) correctly within an ampersand-page-switcher. However, when I try to d3.select a div that I have declared in the template and draw something in an svg, I get no svg added to the page. Interestingly when I do the same code from the Javascript console, it draws as expected. Here is my map.jade template section.page h3 Map Page div(class="mapholder") Here is the D3 I am attempting to use d3.select ('.mapholder') .append ("svg") .attr ("width", 400) .attr ("height", 400) .append ("circle") .style ("stroke", "gray") .style ("fill", "white") .attr ("r", 10) .attr ("cx", 300) .attr ("cy", 200); I have tried changing the div to div(id="mapholder") and the D3 to d3.select ('#mapholder') https://github.com/benbenolson/NetFlow-Viewer/tree/master/src/test_app is the full source tree. The template in questions is in /templates/pages/map.jade and the view is /client/view/map-view.js. You'll have to find those yourself since I can't post more than 2 links. Thanks in advance.

http://stackoverflow.com/comment/47051583
score: 0
type: Comment
has text: Thanks so much it worked. God Bless You!! You can view my site [here](http://www.o4c.org) , although I am still doing the changes and they are not up. Happy Easter! @Barmar
type: AnswerComment
comment on: http://stackoverflow.com/a/29441660

http://stackoverflow.com/comment/47149795
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29495275
score: 1
has text: Maybe: `console.dir(item)`

http://stackoverflow.com/q/29453369
has comment: http://stackoverflow.com/comment/47072175
accepted answer: http://stackoverflow.com/a/29453386
has body: I am trying to replace some text on my sites page using javascript. I must use javascript because the replacement is dependent on the site resolution. However I found that the code bellow doesn't work. Why is it? Does similar things work on iphone (these javascript functions)? Thanks. &lt;SCRIPT language="JavaScript"&gt; &lt;!-- if ((screen.width&lt;=500)) { document.body.innerHTML = document.body.innerHTML.replace('text to replace', 'replacement'); } //--&gt; &lt;/SCRIPT&gt;
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29453422
downvote count: 0
has comment: http://stackoverflow.com/comment/47072251
has answer: http://stackoverflow.com/a/29453437
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/29453422
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47072238
has title: Replace text on webpage using javascript
has comment: http://stackoverflow.com/comment/47072182
has answer: http://stackoverflow.com/a/29453386
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/47072168

http://stackoverflow.com/a/29392819
has body: I'm assuming you want to do this from a JSF ManagedBean, not a JSF Component. I'm not sure there is a 'plain' jsf solution for this (meaning not adding another framework or creating and maintaining some specific java code). There are at least 2 solutions (the ones I worked with): Ajax.onComplete("alert('Hi'')") from the OmniFaces utility framework RequestContext.getCurrentInstance().execute("alert('Hi'')") from PrimeFaces I'm sure all other component suites (RichFaces, IceFaces, OpenFaces, ...) have some similar solution. If you want to stay using plain JSF, I'd go for using OmniFaces. It's a great addition in general and prevents you from maintaining knowledge about implementation specifics. Edit: I just found a plain jsf solution
upvote count: 2
has comment: http://stackoverflow.com/comment/46998447
has comment: http://stackoverflow.com/comment/46990528
type: Answer
has comment: http://stackoverflow.com/comment/46999423
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46992213
answers question: http://stackoverflow.com/q/29392000
has comment: http://stackoverflow.com/comment/46998381
has comment: http://stackoverflow.com/comment/46997871

http://stackoverflow.com/comment/47011975
score: 0
type: Comment
type: QuestionComment
has text: @AshkanMobayenKhiabani, i had a mate called Ashkan. :)
comment on: http://stackoverflow.com/q/29416312

http://stackoverflow.com/q/29457735
has answer: http://stackoverflow.com/a/29458135
favorite count: 0
has body: My JavaScript code returns different outputs when run locally and when run in Google Sheets. The code below takes 2 arrays (one contains labels, one contains data) and sum the data according to the label: function removeDuplicateSum(label, data) { var result = {}; for (var i = 0; i &lt; label.length; i++) { if (label[i] in result) result[label[i]] += data[i]; else result[label[i]] = data[i]; }; return result; } And here's a sample output: function printObject(obj) { // helper function to print the object return JSON.stringify(obj); } c = [1, 2, 3, 4, 5] b = ['a', 'a', 'b', 'b', 'c'] console.log(printObject(removeDuplicateSum(b, c))); &gt;&gt;&gt; {"a":3,"b":7,"c":5} // Correct output But when I use it as a custom function in Google Sheets, it returns an empty object: And the output in that cell is simply an empty string (""). I expect it to return this string "{"a":3,"b":7,"c":5}". I also have another function which returns an int locally but returns a string in Google Sheets - another example of how JavaScript works differently in Google Sheets. Why does my JavaScript code work so differently in Google Apps Script (and specifically in Google Sheets)? And where can I find a reference on the differences between Google Apps Script and the JavaScript used in a web environment? Thanks a lot.
has comment: http://stackoverflow.com/comment/47081507
upvote count: 2
has answer: http://stackoverflow.com/a/29460094
downvote count: 1
type: AnsweredQuestion
score: 1
type: Question
tagged with: google-apps-script
answer count: 2
accepted answer: http://stackoverflow.com/a/29460094
has title: Google Apps Script (in Google Sheets) behaves differently from JavaScript
possible better answer: http://stackoverflow.com/a/29458135
tagged with: javascript

http://stackoverflow.com/q/29523866
type: Question
tagged with: javascript
has body: Trying to use a fade effect by changing opacity on element hover. The image does change according to the developer tools and the opacity also works fine on all browsers, except google chrome. Here is my code: var default_image = $("#all_content #banner #banner_image").attr("src"); $('#side_menu #side_menu_content li a').hover(function(){ var image = $(this).attr("rel"); $("#all_content #banner #banner_image").stop().animate({opacity:'0'}, function(){ $("#all_content #banner #banner_image").attr("src", "images/"+image); }).load(function(){ $(this).stop().animate({opacity:'1'}); }); }, function(){ $("#all_content #banner #banner_image").stop().animate({opacity:'0.6'}, function(){ $("#all_content #banner #banner_image").attr("src", default_image); }).load(function(){ $(this).stop().animate({opacity:'1'}); }); } ); I've noticed on chrome sometimes the image changes but inherits the opacity of 0.6 on hover out as asked for in the code, but doesn't progress to 1 afterwards. Also, sometimes after element hover, the image doesn't even load. But works 100% on all other browsers, even IE8. Is the .load() function buggy with Chrome? If it is, is there something I can use to substitute it?
tagged with: jquery
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/47202559
has comment: http://stackoverflow.com/comment/47202407
has title: jQuery image change on hover
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47202368
upvote count: 1
tagged with: google-chrome
downvote count: 1
has comment: http://stackoverflow.com/comment/47202232

http://stackoverflow.com/comment/47191110
type: AnswerComment
comment on: http://stackoverflow.com/a/29508339
has text: I made the changes and it's still a no-go. If you got it working, could you share the code? thanks
type: Comment
score: 0

css-animations
tags question: http://stackoverflow.com/q/29441774
type: Tag
tag name: css-animations

http://stackoverflow.com/q/29444481
tagged with: oauth-1.0a
has answer: http://stackoverflow.com/a/29460767
type: Question
tagged with: google-oauth
tagged with: google-apps-script
score: 0
linked to: http://stackoverflow.com/q/29439981
answer count: 1
tagged with: javascript
has title: oAuth2 code for replacement for of oAuth1 in Google Docs
tagged with: google-docs-api
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47061789
has comment: http://stackoverflow.com/comment/47061364
has body: Following is function call and function which helps in oAuth1 in Google Apps Script for Authorization from google Docs but as oAuth1 is getting discontinue from 20 April 15, replacement code for oAuth2 is hard to find. Please help me for same. var auth = googleOAuth_('docs',scope); function googleOAuth_(name,scope) { var oAuthConfig = UrlFetchApp.addOAuthService(name); oAuthConfig.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken?scope="+scope); oAuthConfig.setAuthorizationUrl("https://www.google.com/accounts/OAuthAuthorizeToken"); oAuthConfig.setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken"); oAuthConfig.setConsumerKey("anonymous"); oAuthConfig.setConsumerSecret("anonymous"); return {oAuthServiceName:name, oAuthUseToken:"always"}; }

http://stackoverflow.com/comment/47165859
type: AnswerComment
score: 0
type: Comment
has text: Thanks, this is some good info I can use. I also heard about mediagroup, but as you said, I couldn't get it working in any browser. Also, thanks a lot for pointing out to not use looping. I realized now that that can cause a lot of problems.
comment on: http://stackoverflow.com/a/29504022

http://stackoverflow.com/q/29456447
has body: I am using https://github.com/ultimatedelman/autogrow so my textarea grows as the user enters text. It works great, but when you get the bottom of the text area, it scrolls up before expanding, causing an unsightly jumping effect. This is visible in the author's demo as well (click on "Interactive Demo" on the above page since Stack Overflow won't let me post a jsfiddle.net here unaccompanied by code). Is there some way to suppress vertical scrolling completely to avoid this jumping effect? I tried: textarea.scroll(function(e) { e.preventDefault(); }); That doesn't seem to prevent the scrolling from occurring though.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29478456
score: 2
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Prevent textarea from scrolling vertically
has answer: http://stackoverflow.com/a/29478456
type: AnsweredQuestion
upvote count: 2
type: Question

filewriter
tag name: filewriter
tags question: http://stackoverflow.com/q/29390107
type: Tag

http://stackoverflow.com/a/78428999
answers question: http://stackoverflow.com/q/29454824
has body: If you read the MomentJs documents (http://momentjs.com/docs/#/displaying/) you can find this format: moment("2015-01-16T12:00:00").format("hh:mm:ss a")
score: 0
type: Answer

http://stackoverflow.com/comment/47008766
type: AnswerComment
has text: Thanks so much Howard. I apologize but it seems like I cannot vote the answer up but I did accept it. Thanks so much for your help!
type: Comment
comment on: http://stackoverflow.com/a/29400349
score: 1

http://stackoverflow.com/comment/47045387
type: QuestionComment
comment on: http://stackoverflow.com/q/29438311
score: 2
has text: If I had to guess, some other part of your C# backend is injecting values into those `{n}` placeholders
type: Comment

http://stackoverflow.com/a/29509927
has comment: http://stackoverflow.com/comment/47193421
has body: There isn't a complete list of properties in the documentation. But you can get the properties by inspecting the item object in the developer tools of your browser (either by setting a breakpoint or outputting the item in the console with console.log(item);). The result is something like this (depending on plugins used and the options of your plot): { [functions]: ... , dataIndex: 3, datapoint: [ 0: 2006, 1: 5907, 2: 0, length: 3 ], pageX: 635, pageY: 504, series: { [functions]: ... , bars: { ... }, color: "rgb(237,194,64)", dashes: { ... }, data: [ ... ], datapoints: { ... }, label: "Plot1", lines: { ... }, points: { ... }, shadowSize: 0, stack: true, xaxis: { ... }, yaxis: { ... } }, seriesIndex: 0 }
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47201500
downvote count: 0
has comment: http://stackoverflow.com/comment/47195146
accepted answer of: http://stackoverflow.com/q/29495275
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29495275
score: 1

http://stackoverflow.com/comment/47226631
has text: The only payment we seek here is glory! Once you have enough rep to do so, come back and upvote helpful answers, that's all. WRT the link, I used the format shown in [this doc page](https://developers.google.com/chart/interactive/docs/spreadsheets). The previous one works as well - in fact, it appears just a bit faster, too.
type: AnswerComment
comment on: http://stackoverflow.com/a/29500420
score: 0
type: Comment

http://stackoverflow.com/a/29399362
score: 0
has comment: http://stackoverflow.com/comment/46974971
has body: function updateColor(color){ myCell = document.getElementById('2ndInputSun'); myCell.firstChild.style.backgroundColor = "#"+color; } This will change color of textarea (firstChild of td). Also, you can simplify this: onchange="updateColor(this.value); Demo: http://jsfiddle.net/hrybcahk/
type: Answer
has comment: http://stackoverflow.com/comment/46974860
has comment: http://stackoverflow.com/comment/46975117
answers question: http://stackoverflow.com/q/29399075

http://stackoverflow.com/q/29481626
score: 0
has comment: http://stackoverflow.com/comment/47123982
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47124034
tagged with: flash
has comment: http://stackoverflow.com/comment/47123813
answer count: 0
tagged with: javascript
has body: I'm trying to find the video source behind a flash player. I tried putting the swf file into showmycode but it looks like its only a general player. Any ideas?
type: Question
has comment: http://stackoverflow.com/comment/47124205
has comment: http://stackoverflow.com/comment/47124107
has title: Finding video source in swf file?
has comment: http://stackoverflow.com/comment/47123856
has comment: http://stackoverflow.com/comment/47123864

http://stackoverflow.com/q/29504557
has answer: http://stackoverflow.com/a/29504603
has answer: http://stackoverflow.com/a/29504607
tagged with: javascript
tagged with: jquery
favorite count: 0
downvote count: 3
possible better answer: http://stackoverflow.com/a/29504607
has comment: http://stackoverflow.com/comment/47166554
accepted answer: http://stackoverflow.com/a/29504618
has comment: http://stackoverflow.com/comment/47166532
answer count: 4
upvote count: 0
has answer: http://stackoverflow.com/a/29505649
has comment: http://stackoverflow.com/comment/47166725
has title: JavaScript if-else shorthand error
score: -3
has answer: http://stackoverflow.com/a/29504618
type: AnsweredQuestion
has body: This worked if(a != "") { $('.a').css('background','red'); } but this shorthand did not a != "" ? $('.a').css('background', 'red'); I got: error of unexpected end of token ;
has comment: http://stackoverflow.com/comment/47166561
type: Question
has comment: http://stackoverflow.com/comment/47166547

http://stackoverflow.com/comment/47092231
comment on: http://stackoverflow.com/a/29464425
type: AnswerComment
score: 0
has text: Scott can you explain why? Thanks
type: Comment

http://stackoverflow.com/comment/47133801
has text: possible duplicate of [JQuery select by inner text](http://stackoverflow.com/questions/7486282/jquery-select-by-inner-text)
comment on: http://stackoverflow.com/q/29487210
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47172953
type: QuestionComment
comment on: http://stackoverflow.com/q/29508148
has text: IE11 does support it: https://msdn.microsoft.com/en-us/library/ie/dn265066(v=vs.85).aspx and it seems to be an alias of console.log. So you're not missing anything.
score: 1
type: Comment

http://stackoverflow.com/comment/47015741
type: Comment
comment on: http://stackoverflow.com/a/29422060
score: 0
type: AnswerComment
has text: Is there no other way of doing it? I may include some or all of those attributes.

http://stackoverflow.com/a/29532007
answers question: http://stackoverflow.com/q/29528347
has comment: http://stackoverflow.com/comment/47231255
type: AcceptedAnswer
type: Answer
has body: It should be what you need: prod0 sold Quantity prod0 available buy prod2 sold buy prod2 sold buy prod4 available no Stock prod6 available buy prod2 sold buy prod3 sold no Stock prod5 available buy Order
has comment: http://stackoverflow.com/comment/47231703
accepted answer of: http://stackoverflow.com/q/29528347
has comment: http://stackoverflow.com/comment/47241650
score: 0

http://stackoverflow.com/a/29392077
has comment: http://stackoverflow.com/comment/46961268
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/29391708
score: 2
downvote count: 0
has body: Apart from making the code more readable, does promises have performance benefits? Probably not. Nesting promises and callback hell looks similar to me. Is there actually any difference? Promises don't automatically prevent callback hell. But because they are more flexible than "simple" callbacks, they can be composed in different ways, which makes it easier to avoid callback hell. Since I needed both docs and docs1 inside the third callback so I used nested promises. Sometimes nested promises are unavoidable. However, there is no need to nest them if they don't have to be executed sequentially. You could execute them in parallel: Promise.all([ DBCall(d1), DBCall(d2), DBCall(d3) ]).then(function(docs) { // docs is an array: [docs, docs1, docs2] });

backbone-routing
tags question: http://stackoverflow.com/q/29472065
tags question: http://stackoverflow.com/q/29442138
tag name: backbone-routing
type: Tag

http://stackoverflow.com/a/29458552
has comment: http://stackoverflow.com/comment/47082769
type: Answer
has comment: http://stackoverflow.com/comment/47096874
has comment: http://stackoverflow.com/comment/47081744
upvote count: 1
has comment: http://stackoverflow.com/comment/47092279
score: 1
has body: It looks like you are using the whole hrefattribute attribute value, right? Then, you can use the following regex that will match the whole URL up to the attribute value delimiting quote: ^(.*?)([\?&amp;]url=)[^&amp;#]*(?:[&amp;#][^&amp;#]*)?(&amp;[^'"]*) See demo here. var re = /^(.*?)([\?&amp;]url=)[^&amp;#]*(?:[&amp;#][^&amp;#]*)?(&amp;[^'"]*)/; var str = 'https://twitter.com/share?url=http://192.168.0.100:3001/hbookmarks/pubhistoryfortoday?currentdate=2015-04-04&amp;username=soysoys&amp;text=open the bookmarks I clicked on 2015-04-04.'; var m; if ((m = re.exec(str)) !== null) { document.getElementById("res").innerHTML = m[1] + m[2] + 'http://bit.ly/12345678' + m[3] } &lt;div id="res"/&gt;
has comment: http://stackoverflow.com/comment/47082160
has comment: http://stackoverflow.com/comment/47081795
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29458304
downvote count: 0
answers question: http://stackoverflow.com/q/29458304

http://stackoverflow.com/a/63470685
score: 2
downvote count: 0
has body: const getMonths = (start, end) => Array.from({ length: end.diff(start, 'month') + 1 }).map((_, index) => moment(start).add(index, 'month').format('MM.YYYY'), ); const months = getMonths(moment('01.2019','MM.YYYY'),moment('01.2020','MM.YYYY')) console.log(months)
answers question: http://stackoverflow.com/q/29466944
upvote count: 2
type: Answer

http://stackoverflow.com/comment/47061888
comment on: http://stackoverflow.com/q/29447542
score: 0
type: Comment
type: QuestionComment
has text: Add 'console.log(form);' under 'var form ...' and check what content it has on second submition

http://stackoverflow.com/q/29456869
type: AnsweredQuestion
has body: How to make Lambert material from texture with transparent black color without alphaMap. I have sphere with clouds texture. I need to be black color transparent, if i use blending, it have affect on shadow, i need keep behavior like MeshPhong material, but only with transparent black color. var cloudsMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, map: THREE.ImageUtils.loadTexture( "img/planets/clouds.jpg" ), specular : new THREE.Color("rgb(255,255,255)"), shininess : 0.1, depthTest : 0, blending : 1, transparent: true, bumpScale : 1, //0.8 bumpMap : THREE.ImageUtils.loadTexture( "img/planets/bump.jpg" ), } ); what is the correct way, to setup blending, or another attributes?
accepted answer: http://stackoverflow.com/a/45982110
type: Question
has title: Three js black color of material to transparent
upvote count: 5
tagged with: javascript
possible better answer: http://stackoverflow.com/a/66297672
has comment: http://stackoverflow.com/comment/47085022
has answer: http://stackoverflow.com/a/66297672
answer count: 2
score: 5
has comment: http://stackoverflow.com/comment/52542263
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/47088440
has answer: http://stackoverflow.com/a/45982110
tagged with: three.js

http://stackoverflow.com/comment/47158473
type: QuestionComment
has text: I did a `\\\$1` and it worked, maybe `\\\\$1` is the proper way?
score: 0
comment on: http://stackoverflow.com/q/29499674
type: Comment

http://stackoverflow.com/comment/47021860
comment on: http://stackoverflow.com/a/29406754
has text: @Nirazul Thanks for pointing out it. div.auto-scroll is target should be appended to, apparently this answer is not good enough, '.auto-scroll' might be a common class, here should a more accurate specific selection
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/96471217
type: Comment
score: 2
comment on: http://stackoverflow.com/a/29496638
has text: @TamusJRoyce I do not believe this is a bug. It mirrors the behavior of the UNIX dirname command. See https://linux.die.net/man/1/dirname
type: AnswerComment

http://stackoverflow.com/q/29463333
has body: what does this means? var q = []; var q2 = ["canada","usa","mexico"]; var w = q||q2; document.writeln(w); the value of the variable w is : [] the empty list. can someone explain to me why it is displaying this [] instead of ["canada","usa","mexico"].
type: Question
has comment: http://stackoverflow.com/comment/47089993
linked to: http://stackoverflow.com/q/4576867
has comment: http://stackoverflow.com/comment/47089992
score: 0
duplicate of: http://stackoverflow.com/q/4576867
has title: var w = q||q2; what does this expression means?
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29463481

http://stackoverflow.com/comment/46950331
score: 0
has text: Have a look at this answer, does it help you? http://stackoverflow.com/a/29350146/57095
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29386041

http://stackoverflow.com/comment/46962165
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29391263
has text: How does the makrup looks like? Can you create a fiddle?

http://stackoverflow.com/q/29393077
has comment: http://stackoverflow.com/comment/46969460
score: 1
has answer: http://stackoverflow.com/a/29396618
tagged with: server-sent-events
upvote count: 1
type: Question
has title: Server-Sent Events with Ruby Grape
tagged with: javascript
tagged with: ruby-grape
downvote count: 0
answer count: 1
has body: I am trying to create Server-Sent events on my Ruby Grape API. The problem is that the connection seems to be closed really fast all the time, as I get Connection closed event all the time on test webpage. The client connects to the server as I can see the method being called, but I would like to know why is the connection not constant and why I don't receive the data I send using the Thread. Here is my Ruby code: $connections = [] class EventsAPI &lt; Sinantra::Base def connections $connections end get "/" do content_type "text/event-stream" stream(:keep_open) { |out| puts "New connection" out &lt;&lt; "data: {}\n\n" connections &lt;&lt; out } end post "/" do data = "data\n\n" connections.each { |out| out &lt;&lt; data } puts "sent\n" end end Here is my Javascript: var source = new EventSource('http://localhost:9292/events'); source.onmessage = function(e) { console.log("New message: ", e.data); showMessage(e.data); }; source.onopen = function(e) { // Connection was opened. }; source.onerror = function(e) { console.log("Source Error", e) if (e.eventPhase == EventSource.CLOSED) { console.log("Connection was closed"); // Connection was closed. } }; var showMessage = function(msg) { var out = document.getElementById('stream'); var d = document.createElement('div') var b = document.createElement('strong') var now = new Date; b.innerHTML = msg; d.innerHTML = now.getHours() + ":" + now.getMinutes() + ":" +now.getSeconds() + " "; d.appendChild(b); out.appendChild(d); }; EDIT: I got it working with the GET method (I changed the Grape::API to Sinatra::Base as Grape does not implement stream). I now receive data, but the connection is not kept alive and when I use the post method the data never reaches the browser. Thank you in advance for your answers.
favorite count: 0
tagged with: ruby
type: UnansweredQuestion

http://stackoverflow.com/comment/47017376
type: Comment
has text: Did you try executing the answer. That should work as you expect. First the query gets executed inside `$.when` and alert will be displayed from `$.then`
type: AnswerComment
comment on: http://stackoverflow.com/a/29408226
score: 0

http://stackoverflow.com/comment/47067221
has text: Do you need image object or just file path string?
score: 0
comment on: http://stackoverflow.com/q/29450654
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/47017287
score: 0
type: Comment
type: QuestionComment
has text: Is that even possible? think about it, each item that you add to the observable array, the array and even KO for that matter is unaware of how many items are going to be added. I would suggest calling a `loadComplete` method once all the items are added. This is just an example http://jsfiddle.net/gthqvr5n/5/
comment on: http://stackoverflow.com/q/29421895

http://stackoverflow.com/q/29516885
tagged with: angularjs
has comment: http://stackoverflow.com/comment/47189149
has title: Angular File Upload ( CORS ) with credentials is not working
has comment: http://stackoverflow.com/comment/47189101
tagged with: angular-file-upload
upvote count: 1
has comment: http://stackoverflow.com/comment/47188958
type: AnsweredQuestion
has body: I am using angular file module: https://github.com/danialfarid/ng-file-upload. I am facing difficulties in uploading to an api which requires credentials. I am passing 'withCredentials : true'. This doesn't seem to work. I am able to successfully upload on another setup of same API without credentials. CORS is set up properly on this API, other GET / POST calls ( CORS ) work on this API. It would be great if you could guide me if I am missing something here. Error : "NetworkError: 401 Unauthorized - devices.olacabs-dev.in/notification/doUpload"; doUpload 2 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at hostname/notification/doUpload. This can be fixed by moving the resource to the same domain or enabling CORS. I swapped with an API host not requiring credentials and that worked. $upload.upload({ url: NotificationAPI.hostName + '/notification/doUpload', headers: {'Content-Type' : 'multipart/form-data'}, fields: fields, file: file, withCredentials : true, }).
score: 1
has comment: http://stackoverflow.com/comment/47189290
has comment: http://stackoverflow.com/comment/47189336
has comment: http://stackoverflow.com/comment/47189106
type: Question
has comment: http://stackoverflow.com/comment/47189407
has comment: http://stackoverflow.com/comment/47189464
tagged with: javascript
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/29703558
accepted answer: http://stackoverflow.com/a/29703558
favorite count: 0

http://stackoverflow.com/comment/47029752
has text: I tried it also, works perfectly. Add return false after alert and return before `maxlength` function to return false in case of failure.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29427677

http://stackoverflow.com/comment/47165603
comment on: http://stackoverflow.com/q/29502686
has text: @NorbertvanNobelen, did you intend that comment for a different question?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29510765
has comment: http://stackoverflow.com/comment/47181861
linked to: http://stackoverflow.com/q/2558977
favorite count: 0
linked to: http://stackoverflow.com/q/298745
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47183791
has comment: http://stackoverflow.com/comment/47183772
downvote count: 0
score: 1
tagged with: oauth-2.0
has body: Following documentation i put together this simple request. Every time i run this request i still get a 401 Authorization Required. I know the access token is fine because i use the same token using get to populate my models and it works fine it's only when i use post and place my token in the request headers. Anyone else had this issue before? jQuery.ajax( { url: 'http://customer-server-2.dev/api/documents/add/.json', type: 'POST', data : { guid : $('.guid-input').val(), title : $('.title-input').val(), payload : $('.payload-input').val() }, beforeSend : function( xhr ) { xhr.setRequestHeader( 'Authorization', 'BEARER ' + app.AccessToken ); }, success: function( response ) { console.log(response); }, error : function(error) { console.log(error); } } ); response header HTTP/1.1 401 Authorization Required Date: Wed, 08 Apr 2015 12:20:28 GMT Server: Apache/2.2.26 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.6 PHP/5.5.10 mod_ssl/2.2.26 OpenSSL/0.9.8za DAV/2 mod_perl/2.0.8 Perl/v5.18.2 Access-Control-Allow-Origin: * Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, PATCH, DELETE Access-Control-Allow-Headers: X-Accept-Charset,X-Accept,Content-Type, x-xsrf-token, Authorization X-Powered-By: PHP/5.5.10 WWW-Authenticate: Bearer realm="Service", error="invalid_request", error_description="The access token was not found." Content-Length: 81 Keep-Alive: timeout=5, max=97 Connection: Keep-Alive Content-Type: text/html request header OPTIONS /api/documents/add/.json HTTP/1.1 Host: customer-server-2.dev Connection: keep-alive Access-Control-Request-Method: POST Origin: http://test-client-app.dev User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2354.0 Safari/537.36 Access-Control-Request-Headers: accept, authorization Accept: / Referer: http://test-client-app.dev/index.html Accept-Encoding: gzip, deflate, sdch Accept-Language: en-US,en;q=0.8
has title: Sending OAuth access token in Jquery Ajax request
type: Question
linked to: http://stackoverflow.com/q/23482705
linked to: http://stackoverflow.com/q/10093053
has comment: http://stackoverflow.com/comment/110215439
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/47184716
tagged with: ajax
tagged with: rest
upvote count: 1

http://stackoverflow.com/a/29476961
downvote count: 0
answers question: http://stackoverflow.com/q/29476790
upvote count: 2
has comment: http://stackoverflow.com/comment/47116650
has comment: http://stackoverflow.com/comment/47117399
type: Answer
score: 2
has body: Instead of manipulating the page-header. Try to update the variable in your controller $scope.messages['default_title'] = "Hello";

http://stackoverflow.com/q/29524065
answer count: 3
favorite count: 0
has title: How can I increase the size of a div on click by 10% using an event listener?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29524359
has answer: http://stackoverflow.com/a/29524222
downvote count: 1
has body: My goal is to simply increase the size of the box by 10% on click. I have left the bottom function in the JavaScript blank because that is where I assume it needs to be inserted. I included the code for the div that is in the html. CSS div { width: 100px; height: 100px; background-color: #000; margin: 5px; float: left; } JS var newDiv = document.createElement("div"); newDiv.addEventListener('click', handleClick); document.body.appendChild(newDiv); function handleClick(event) { }
type: Question
has answer: http://stackoverflow.com/a/29524362
has comment: http://stackoverflow.com/comment/47202712
upvote count: 0
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/47202597

http://stackoverflow.com/comment/47079298
score: 0
type: Comment
type: QuestionComment
has text: no - if i disable js with the page open nothing happens - then if i refresh once i get the uninterpreted html, and if i refresh a second time i get the proper result. If i disable js without the page open then navigate to it the result is the same - uninterpreted, refresh, interpreted.
comment on: http://stackoverflow.com/q/29457444

http://stackoverflow.com/comment/46992823
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29409503
type: QuestionComment
has text: had a look. It's worth noting it isn't my webpage, its a public webpage and I don't have access to the html

http://stackoverflow.com/a/29501627
has body: Actually i got your code running in a fiddle. First thing i changed was two > you forgot in your html code: Then i added an empty object for testing: originalPeopleObserved = null; var peopleViewModel = new ObservedPersonModel(originalPeopleObserved); ko.applyBindings(peopleViewModel); And on Safari i can use your sample as expected. Try this fiddle here
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/47162048
answers question: http://stackoverflow.com/q/29501265

http://stackoverflow.com/comment/47162462
type: QuestionComment
has text: Try: `$(document).ready(function(){$("#submit").click(function(e){ e.preventDefault();$("#myiframe").delay(1000).show(0); }); });`
score: 0
comment on: http://stackoverflow.com/q/29502138
type: Comment

http://stackoverflow.com/q/29396948
downvote count: 0
has answer: http://stackoverflow.com/a/29398266
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46970029
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/29398266
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29398191
upvote count: 1
has body: I am having issues trying to figure out how to change my bmi calculator from a slide to a select box and then passing that input to have it be calculated. For the feet I have the inches set as the values and then when inches are selected they need to be added on to the feet for a total. Feet 1' 2' 3' 4' 5' 6' 7' Inches 1" 2" 3" 4" 5" 6" 7" 7" 9" 7" 7" JS Fiddle: Working example with the jquery ui slide. http://jsfiddle.net/ypyxrks8/ Anyone help with converting this over would be greatly appreciated.
has title: Change slider to select box
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29398191

http://stackoverflow.com/q/29433386
has answer: http://stackoverflow.com/a/29433402
tagged with: angularjs
has answer: http://stackoverflow.com/a/29433456
tagged with: php
tagged with: css
type: UnansweredQuestion
tagged with: javascript
tagged with: public-html
type: Question
score: 0
answer count: 2
has body: I understand that it is a good idea to keep some files outside public_html for security reasons. What about js files? Should I keep all my js files (such as angularjs') in public_html or outside? If I keep them outside public_html, it is going to be difficult to execute them on the browser, isn't? How can I execute them then if they are stored outside public_html directory? It must be the same for CSS files too, right?
has title: js and css files - outside or inside public_html?

http://stackoverflow.com/q/29505723
has comment: http://stackoverflow.com/comment/47168619
has body: I am currently have a lot of 3D models in obj/ctm format in database, which will be transferred to browser and displayed with javascript. It's known that all javascript code are visible to everybody, although it can be hard to read. I am wondering if there is an encryption algorithm, that can prevent user accessing raw data in model file, such as vertex array.
score: 0
has comment: http://stackoverflow.com/comment/47168563
has comment: http://stackoverflow.com/comment/47168497
has comment: http://stackoverflow.com/comment/47168477
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/47168653
tagged with: encryption
type: Question
has title: Display encrypted message on frontend javascript
tagged with: javascript
has comment: http://stackoverflow.com/comment/47170596

http://stackoverflow.com/comment/47111675
comment on: http://stackoverflow.com/q/29471566
has text: In regards to your node error, `plugin add` is a cordova command. You run it simply as `cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git`. Get this plugin properly installed and then see if the plugin is still undefined.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29493776
tagged with: flash
has title: Calling javascript function from flash cs3
has comment: http://stackoverflow.com/comment/47149374
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/22151667
has comment: http://stackoverflow.com/comment/47146488
has comment: http://stackoverflow.com/comment/47146537
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47146789
has body: My javascript function from flash cs3 isn't getting called. The "test" alert at the top of the script is called so I know the javascript is working. The flash plays just fine so that's working. Below is the action script and the html. What am I missing? as: package { import flash.external.*; import flash.display.MovieClip; import flash.events.Event; public class AnimatingObject extends MovieClip { // constants public const ANIMATION_COMPLETE:String = "animation_complete"; /** * Constructor */ public function AnimatingObject() { addEventListener(Event.ENTER_FRAME, frameEnter); } /** * Called on dispatch of Event.ENTER_FRAME */ private function frameEnter(e:Event):void { if(currentFrame == totalFrames) { ExternalInterface.call("stoppedPlaying"); trace( "Event complete" ); var evt:Event = new Event(ANIMATION_COMPLETE); dispatchEvent(evt); } } } } Javascript:
has comment: http://stackoverflow.com/comment/47150565
has comment: http://stackoverflow.com/comment/47149711
answer count: 0
type: Question

http://stackoverflow.com/comment/47201827
comment on: http://stackoverflow.com/a/29518460
has text: This is MORE then perfect :) I am going to check how you did that. And Thanks a Ton
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29396338
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29396620
tagged with: javascript
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
has title: Cannot return string from value of element in protractor test
has answer: http://stackoverflow.com/a/29396620
type: Question
has comment: http://stackoverflow.com/comment/46969214
has comment: http://stackoverflow.com/comment/46969100
has body: So I'm trying to get a string value to be returned from the value of an element on the resolution of this promise. I want to pass a raw string value to another function that I'm building inside a protractor test. This is the element: &lt;div style='hidden' &gt; &lt;input id="group-sendgrid-hidden-input" ng-model='groupCode' value='dangyo' &gt; &lt;/div&gt; I'm looking for a way to get at either the model value or the attribute value (either will work). Model value might even be better. This is my attempt to resolve the a promise here and return a result: // first get the element driver object var groupCode = element(by.id('group-sendgrid-hidden-input')); // next resolve a promise provided by this element groupCode.getAttribute('value').then(function(value){ console.log( 'should be a string: ' + value); return value; }); Here the console.log( 'should be a string: ' + value); always returns null for the value and nothing I can do seems to resolve this. I'm sure I'm doing something wrong because I am new to protractor and this seems simple. Does anyone else experience this behavior?
tagged with: protractor
upvote count: 5
linked to: http://stackoverflow.com/q/27737333
score: 5
has comment: http://stackoverflow.com/comment/46969379

http://stackoverflow.com/q/29383013
tagged with: magento
has body: I want to loop thought all the items which added into the shopping cart and return it's own ID. UPDATE1 : I have updated method like this public function formatPrice($price) { $productId=""; // an iterate here $cart = Mage::getModel('checkout/cart')-&gt;getQuote(); foreach ($cart-&gt;getAllItems() as $item) { $productId = $item-&gt;getProduct()-&gt;getId(); $productPrice = $item-&gt;getProduct()-&gt;getFinalPrice(); } return 'ID: '.$productId; } Now it returns everything in one row therefore i have my result like this, should i use "," to splite them? P.S: File i editing is Data.php under \app\code\core\Mage\Checkout\Helper I assume the first product's ID is 471186 and the second should be 463089, do i need another foreach loop to do that? UPDATE2 : Even i split it, it will just display like 471186, 463089 but i want it display according to there current product, i assuem i need something else, does the magento library supply some method like that? UPDATE3: I have seen your latest method, which store variable in array and return it. After some modify depends on your code i have: $productId =array(); $cart = Mage::getModel('checkout/cart')-&gt;getQuote(); foreach($cart-&gt;getAllItems() as $item) { $productId[]= $item-&gt;getProduct()-&gt;getId(); } $productId =array_filter($productId); //remove empty array foreach($productId as $id){ return $id; //return $productId; } If i use return $productId , it give me "Array" the data type as result which is no use and I tried print out the $id it gives the first product ID only as before. I will use print_r under this situation but it seem not allowing me to do that. UPDATE4: I tried the internal for loop and i assume it's going to loop and display the price until it's value smaller than $index which is 0 means null. So i re-factor my codes like this: $productId =array(); $cart = Mage::getModel('checkout/cart')-&gt;getQuote(); foreach($cart-&gt;getAllItems() as $item) { $productId['id']= $item-&gt;getProduct()-&gt;getId(); $p…
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29383240
answer count: 1
type: UnansweredQuestion
has title: loop through the cart items and return it's own ID
tagged with: php
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/comment/46981936
has text: As an example, `clearInterval` is the way to cancel the callback created with `setInterval`.
comment on: http://stackoverflow.com/q/29403229
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29445118
score: 0
answers question: http://stackoverflow.com/q/29445095
type: Answer
has body: This is because your global still variable has been hidden by function's argument with the same name. Try this: var still; jQuery(function(stillTheArgument){ still = 5; }); console.log(still); Please, reconsider your code as global variables are often not very good idea.

http://stackoverflow.com/comment/47205062
has text: OP might be usint POST, in which case it is probably not a good idea to put all the form values into the URL.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29525197
score: 1

http://stackoverflow.com/a/29468459
type: Answer
answers question: http://stackoverflow.com/q/29467975
accepted answer of: http://stackoverflow.com/q/29467975
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/91525074
has comment: http://stackoverflow.com/comment/47100467
has body: appears that once the popup is opened you need to close it and then call the second pop-up open method, otherwise the settings from the first one precede, thus, the overlay always closes the pop-up. Here is a brief change I made in your JS code: // Assign on click behaviour to the button in the first pop-up $('.popup-content-click').on('click', openPopup); // on click handler function openPopup(){ //Closing the already opened pop-up $.magnificPopup.close(); //wait a bit then open the new pop-up setTimeout(function(){ $.magnificPopup.open({ items:{src: '#result-again'}, type: 'inline', closeOnBgClick: false, closeOnContentClick:true }); }, 100); } Here is the jsfiddle for that
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/47054634
type: Comment
has text: As Lvca said, the result was not an array of JSONs but an array of java ODocument object, you can find more details of this object in: [link](http://www.orientechnologies.com/javadoc/latest/com/orientechnologies/orient/core/record/impl/ODocument.html#load-java.lang.String-)
comment on: http://stackoverflow.com/a/29431283
type: AnswerComment
score: 0

http://stackoverflow.com/comment/47057435
score: 0
type: Comment
has text: actually i tried it the first row still have button let me check maybe i got something wrong
comment on: http://stackoverflow.com/a/29444969
type: AnswerComment

http://stackoverflow.com/a/29524091
score: 1
has body: the logic is wrong, try this $('.special-container').each( function( index, value ){ $(this).addClass('hidden'); if( ($(this).attr('data-start-date') &gt;= firstofmonth &amp;&amp; $(this).attr('data-start-date') &lt;= lastofmonth) || ($(this).attr('data-end-date') &lt;= lastofmonth &amp;&amp; $(this).attr('data-end-date') &gt;= firstofmonth)) { $(this).removeClass('hidden'); } }); Edited: final fix: "looks" both way $('.special-container').each( function( index, value ){ $(this).addClass('hidden'); if( (firstofmonth &gt;= $(this).attr('data-start-date') &amp;&amp; firstofmonth &lt;= $(this).attr('data-end-date')) || (lastofmonth &gt;= $(this).attr('data-start-date') &amp;&amp; lastofmonth &lt;= $(this).attr('data-end-date')) || ($(this).attr('data-start-date') &gt;= firstofmonth &amp;&amp; $(this).attr('data-start-date') &lt;= lastofmonth) ) { $(this).removeClass('hidden'); } }); http://codepen.io/anon/pen/qEzZvw
has comment: http://stackoverflow.com/comment/47232741
has comment: http://stackoverflow.com/comment/47220603
accepted answer of: http://stackoverflow.com/q/29523542
answers question: http://stackoverflow.com/q/29523542
has comment: http://stackoverflow.com/comment/47231330
has comment: http://stackoverflow.com/comment/47235018
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47219514
type: Answer
has comment: http://stackoverflow.com/comment/47232432
has comment: http://stackoverflow.com/comment/47205893
downvote count: 0

http://stackoverflow.com/a/29423493
has body: You are making a common mistake with jQuery val() calls. var value = $('#selectorid').val(); reads the value and assign this value to the variable value which we can check in equalities, etc., where as $('#selectorid').val('Brendon'); would set the value of the selected element to the value of "Brendon", regardless of the value it held before. In your if statement, therefore $('#best-programmer').val('Brendon') is not reading the value of the selected element but setting the value to 'Brendon' each time the button is clicked, even if something other than Brendon is entered. Try using the example code I have modified below. $(document).ready(function(){ $('#btn-1').on("click", function(){ if ($('#best-programmer').val() == 'Brendon'){ confirm("Correct!"); } else { confirm("Incorrect!"); } }); });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29423262

http://stackoverflow.com/q/29397308
has comment: http://stackoverflow.com/comment/46971014
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46970927
has title: Show Image from JSON data?
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/46970757
tagged with: javascript
tagged with: image
has body: The JSON URL is http://api.bfhstats.com/api/playerInfo?plat=pc&amp;name=1ApRiL&amp;output=js On line 16 It contains the part "imgLarge" which i'm trying to get to show the image on my website. When i parse the data to my website it is currently just showing the string, not an actual image. Here's the code I currently have: $("#playerstuff").submit(function() { $.ajax({ type: "GET", url: 'http://api.bfhstats.com/api/playerInfo?plat=' + document.getElementById("platform").value +'&amp;name=' + document.getElementById("playername").value, //datatype : "json", success: function(data) { document.getElementById("playerrank").innerHTML = 'gamingstats.ga/' +data["player"]["rank"].imgLarge; $("#formpanel").hide(); $("#dataret").show(); } }); return false; }); The output of this is the URL which is gamingstats.ga/bfh/ranks/r57.png however not the actual image.
score: 0
has comment: http://stackoverflow.com/comment/46970841
answer count: 1
has answer: http://stackoverflow.com/a/29397462
accepted answer: http://stackoverflow.com/a/29397462
tagged with: parsing

http://stackoverflow.com/a/29449902
answers question: http://stackoverflow.com/q/29448756
has body: JQuery load function is used to load html content, which doesn't make much sense for img tags. To change images it is enough to set their source: $('#myImg').prop('src','new/url');. Glad it helped :)
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29448756

http://stackoverflow.com/a/29443247
type: Answer
has body: Interestingly, as a best practice you shouldn't be using a for...in loop on arrays, which can get you into trouble. A regular for loop is fine, but for your situation I would recommend using the .forEach() method on the arrays themselves, like so: var array = ['foo', 'bar', 'baz']; array.forEach(function (element, index, array) { console.log(element, index, array); } This is a very similar method to jQuery's .each(), which should make the transition more straightforward.
has comment: http://stackoverflow.com/comment/47054120
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47064606
has comment: http://stackoverflow.com/comment/47060325
answers question: http://stackoverflow.com/q/29442889
downvote count: 0

http://stackoverflow.com/q/29444021
favorite count: 0
has answer: http://stackoverflow.com/a/29444165
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: php
upvote count: 2
answer count: 2
has title: Store Images Offline in coded form in HTML file
tagged with: javascript
type: UnansweredQuestion
has body: Suppose I have Webpage that has some images, I don't want to store images physically in a folder or as a link in Html but I want to store that images in HTML such that whenever I open that page (Offline), images gets displayed. Any Technology can be used. I don't want to use any database too.
score: 2
has comment: http://stackoverflow.com/comment/47055629
has answer: http://stackoverflow.com/a/36499091
downvote count: 0
tagged with: web

http://stackoverflow.com/comment/47115383
type: Comment
has text: Yes it works, but how i can change the email address? it works on my host 's email?
type: AnswerComment
comment on: http://stackoverflow.com/a/29475686
score: 0

http://stackoverflow.com/a/29400768
type: AcceptedAnswer
upvote count: 3
has comment: http://stackoverflow.com/comment/47026609
type: Answer
has body: The other solution would be: Create date for given year (integer part) Calculate days from reminder (decimal part) and convert to milliseconds Add milliseconds to (1) In script: function leapYear(year) { return ((year % 4 == 0) &amp;&amp; (year % 100 != 0)) || (year % 400 == 0); }; function convertDecimalDate(decimalDate) { var year = parseInt(decimalDate); var reminder = decimalDate - year; var daysPerYear = leapYear(year) ? 366 : 365; var miliseconds = reminder * daysPerYear * 24 * 60 * 60 * 1000; var yearDate = new Date(year, 0, 1); return new Date(yearDate.getTime() + miliseconds); } var date = convertDecimalDate(2015.0596924); console.log(date); You can play with it on this Fiddle.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29400171
has comment: http://stackoverflow.com/comment/47019226
answers question: http://stackoverflow.com/q/29400171
score: 3

http://stackoverflow.com/comment/47106692
has text: @DeftSoftInformatics No, one doesn't _have to_.
comment on: http://stackoverflow.com/q/29472655
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/comment/46960102
score: 0
type: Comment
has text: I did that but i still have no response.. :)
type: AnswerComment
comment on: http://stackoverflow.com/a/29391517

http://stackoverflow.com/q/29425072
has title: Passing an object to views/layout.ejs in sails.js
tagged with: sails.js
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/29426424
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I am having a hard time trying to pass an object to the layout of my project in order to get a list of categories i need to show in the navbar. I have been trying o couple of solutions here and all relates on using a policy and assigning res.locals.myVar = someObj, the problem is that res.locals and also using req.options.locals.myVar are only available in the controller action's view and not the layout So far i got this. // getRoomList POLICY Room.find().exec(function(err, rooms) { if (err) { return res.badRequest('Something went wrong.'); } if (rooms) { res.locals.roomlist = rooms; next(); } else { res.notFound(); } }); // config/policies '*': 'getRoomList' // In layout.ejs &lt;%= roomlist %&gt;
tagged with: node.js
score: 2
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/47213021
type: QuestionComment
comment on: http://stackoverflow.com/q/29529612
has text: Aren't you missing an `=` sign in `var data [1];` so it becomes `var data = [1];`?
type: Comment
score: 1

http://stackoverflow.com/comment/47215911
has text: it should trigger 2 alerts, one from `onchange` and one from `$("#text").change(`.
type: Comment
comment on: http://stackoverflow.com/a/29490074
type: AnswerComment
score: 0

http://stackoverflow.com/q/29383360
answer count: 0
has title: Execute javascript in Cocoa using Javascriptcore
type: Question
has comment: http://stackoverflow.com/comment/46985814
has comment: http://stackoverflow.com/comment/46985950
tagged with: ios
tagged with: javascript
score: 0
tagged with: javascriptcore
has comment: http://stackoverflow.com/comment/46961744
tagged with: cocoa
type: UnansweredQuestion
has body: I need to execute javascript code in my NSTextfield, which is something like this. testStackData.projectServers.projectServerDefaultHeaders.push({"headerName":"name 1","headerValue":"value 1","trackHistory":1}); testStackData.projectServers.projectServerDefaultHeaders.push({"headerName":"name 2","headerValue":"value 2","trackHistory":0}); testStackData.stepError.haveError = false; return testStackData; Is it possible to execute this javascript with Javascriptcore framework. Any help would be really appreciated.

http://stackoverflow.com/comment/47003660
type: QuestionComment
comment on: http://stackoverflow.com/q/29410032
type: Comment
has text: Can you provide more context ? Do you have an existing page ? Do you use jinja2 ? How do you display a your list of cities ?
score: 0

http://stackoverflow.com/q/29447939
has title: how to add all arguments which are present in function?
has answer: http://stackoverflow.com/a/29447971
has answer: http://stackoverflow.com/a/29448027
type: AnsweredQuestion
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29448027
score: 0
answer count: 2
has body: Could you please tell me how to add all arguments which are present in function ?I tried like that but not getting success here is my code function a(arrugemt){ sum=0; for(var i=0;i&lt;arrugemt.length;i++){ sum+=arrugemt[i] } console.log("sum:"+sum) } a(1,2) a(1,3,5) a(1,3,5,4,2,1) Expected output : 3 9 16
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29447971

http://stackoverflow.com/comment/47212986
comment on: http://stackoverflow.com/q/29528857
type: Comment
type: QuestionComment
has text: Wow, do you did it on Dreamweaver? Your code are very dirty, there isn't a logic at all, you really need study more. Sorry, but most here won't help you if you at least can not write you code in right way, so little try to understand whatever you did here.
score: 1

http://stackoverflow.com/a/29505246
downvote count: 0
has comment: http://stackoverflow.com/comment/47167648
score: 1
accepted answer of: http://stackoverflow.com/q/29505088
answers question: http://stackoverflow.com/q/29505088
has comment: http://stackoverflow.com/comment/47167775
has comment: http://stackoverflow.com/comment/47167761
has body: You have a significant number of problems and really need to go read the Express docs. It's not possible to fully deduce your problem without more code (specifically, how you're setting up your view engine), but we can at least identify the problems in the code you posted. First off, and most importantly, res.render's second argument is a "locals" object, which defines the variables that you can use in your template. You're not passing the v3 variable into that object, so your template cannot output it. Secondly, you've set up a POST route. If you're just visiting /calc in your browser, this route will never execute because visiting a page is a GET request. It does look like you intend to POST since you're using req.body, but it's worth mentioning in case you copied this code from somewhere else. Third, you've passed a template name to res.render that has no extension. That means that you must specify a default view engine for Express to use to load this template. You haven't showed this part of your code, so instead, look at the documentation to set view engine. By default, Express looks in a directory called views for the template, so make sure your template is at /views/calc.hbs and your view engine is set up to be Handlebars (requires setting view engine and calling app.engine to register Handlebars). Fourth, you're trying to console.log the v3 variable, which doesn't write to the res object, which is the response that will be sent to the browser. Solving these issues should get you on your way.
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/47143430
type: Comment
score: 2
comment on: http://stackoverflow.com/q/29492093
has text: SVG does support this, the text must be a sibling of the rect and not its child though.
type: QuestionComment

http://stackoverflow.com/q/29493455
upvote count: 5
linked to: http://stackoverflow.com/q/21255138
has comment: http://stackoverflow.com/comment/47145883
tagged with: javascript
has body: I found some solutions to get max value of indexes, but how can I get the max value when I have array like this: myArray = []; myArray[1] = 10; myArray[2] = 99; alert(Math.max(myArray)); I would like to get index of max value. In this case it would be index 2 of value 99. The result I get now is NaN.alert(Math.max(myArray));
duplicate of: http://stackoverflow.com/q/1669190
linked to: http://stackoverflow.com/q/2824145
linked to: http://stackoverflow.com/q/24541600
tagged with: arrays
answer count: 1
has title: Get array index by Max value?
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/11301438
score: 4
duplicate of: http://stackoverflow.com/q/11301438
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29493532
linked to: http://stackoverflow.com/q/1669190

http://stackoverflow.com/comment/47171427
has text: As far as i know, you cannot write local files with javascript ?
score: 0
comment on: http://stackoverflow.com/q/29506979
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29466887
has body: I've two variables: var input = "user1@gmail.com"; var preferredPatterns = ["*@gmail.com", "*@yahoo.com", "*@live.com"]; Want to match the input with preferred pattern array. If any of the patterns matches I've to do certain task (in this example, input is a definite match). How can I match against an array of pattern in javascript?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47096307
score: 10
linked to: http://stackoverflow.com/q/46155
possible better answer: http://stackoverflow.com/a/29467043
upvote count: 10
has answer: http://stackoverflow.com/a/29466957
has answer: http://stackoverflow.com/a/29467043
type: Question
has comment: http://stackoverflow.com/comment/47096270
has comment: http://stackoverflow.com/comment/47096187
tagged with: arrays
downvote count: 0
answer count: 7
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/47096262
has answer: http://stackoverflow.com/a/29467181
has answer: http://stackoverflow.com/a/29467182
tagged with: regex
accepted answer: http://stackoverflow.com/a/29466957
has answer: http://stackoverflow.com/a/29467159
has title: How to match a string against an array of pattern in Javascript?
has answer: http://stackoverflow.com/a/29467000
has answer: http://stackoverflow.com/a/44913953

http://stackoverflow.com/a/29480244
has comment: http://stackoverflow.com/comment/47152723
has comment: http://stackoverflow.com/comment/47152684
has comment: http://stackoverflow.com/comment/117364558
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29475681
has body: Jasmine has beforeEach/beforeAll and afterEach/afterAll methods you can define for your environment setup. Depending on your scope between the test files, you may have to redefine the beforeX methods in each file, but that should get you to a clean app before each test.

http://stackoverflow.com/comment/47195280
type: Comment
has text: is there callback logic for the object `customerInfo` or is it just a display of the name/address/etc.?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29519760

http://stackoverflow.com/a/29386599
type: AcceptedAnswer
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/52908383
type: Answer
has body: As of April 3, 2015, the BabelJS team has released v5.0 3 days ago which includes support for the said shorthand as stated in their blog post. Lee Byron's stage 1 additional export-from statements proposal completes the symmetry between import and export statement, allowing you to easily export namespaces and defaults from external modules without modifying the local scope. Exporting a default export foo from "bar"; equivalent to: import _foo from "bar"; export { _foo as foo }; Old Answer: This export notation export v from "mod"; does not supported in ES6 (look at supported examples in the specification), but it can be supported in ES7 (look at this proposal). To achieve exactly the same result you must use import for now: import Outer from './Outer'; export {Outer};
answers question: http://stackoverflow.com/q/29384971
has comment: http://stackoverflow.com/comment/46959453
accepted answer of: http://stackoverflow.com/q/29384971
has comment: http://stackoverflow.com/comment/47047341
has comment: http://stackoverflow.com/comment/46961120
upvote count: 4

http://stackoverflow.com/comment/47073748
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29454217
has text: @LukeSapan CSRF has nothing to do with how public or private an API is. Why would an attacker want to emulate another anonymous user on your site when the API is open to the public anyway?

http://stackoverflow.com/q/29398772
has title: Using classList method in square brackets
score: 2
upvote count: 3
downvote count: 1
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46973581
accepted answer: http://stackoverflow.com/a/29398961
has comment: http://stackoverflow.com/comment/46973565
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29398961
favorite count: 0
has body: Is the putting a classList method inside square brackets considered as good practice? I mean, sometimes I prefer to do: elem.classList[ifTrue ? 'add' : 'remove']('className'); as opposed to: if (ifTrue) { elem.classList.add('className'); } else { elem.classList.remove('className'); } Also, does using brackets have any impact on the performance/speed of code execution?

http://stackoverflow.com/q/29500738
has answer: http://stackoverflow.com/a/29500834
has title: Show div in javascript
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29501008
type: AnsweredQuestion
has body: I created a show and hide for div in JavaScript but the code is displayed and hidden very quickly. I don't know if my code is wrong. &lt;script type='text/javascript'&gt; function sendpost(){ var u = $('#myform').serialize(); $.post('post.php',u,function(outpot){ $('#alert').html(outpot).show().fadeOut(4000); $('#myform').fadeOut(1000).delay(2000).fadeIn(2000); }); } &lt;/script&gt; HTML &lt;div class="formone"&gt; &lt;div id="alert"&gt;&lt;/div&gt; &lt;form id="myform"&gt; Past your link here and Click "Short Now" &lt;input type='text' id='mytext' name='link' size='70' /&gt; &lt;input type='submit' onclick="sendpost();" value="Short Now" /&gt; &lt;/form&gt; &lt;/div&gt;
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29501008
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29500834

http://stackoverflow.com/comment/47101665
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29470010
has text: Where is your code? please submit your code what you try for it
type: Comment

http://stackoverflow.com/comment/58106779
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/35165739
score: 0
has text: Yeah same here i am a developer too... But i think if we using LeadLander on our website we need to mention it in privacy policy. :)) Anyways Thanka!!!

http://stackoverflow.com/comment/47145863
type: AnswerComment
score: 0
type: Comment
has text: @ErikEscobedo but did you try to run it?
comment on: http://stackoverflow.com/a/29493262

http://stackoverflow.com/a/29409456
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29409311
has comment: http://stackoverflow.com/comment/46993371
accepted answer of: http://stackoverflow.com/q/29409311
score: 2
has body: Yes you can with a number of conditions. You have to have the webpage open between these hours. If so, you can do the following code. setInterval(function(){ var now = new Date(); if(now.getDay() !== 0){ //Sunday if(now.getHours() &gt;= 8 &amp;&amp; now.getHours() &lt;= 19){ updateReport(); } } }, 300000); But the question is, is this the best solution? The answer to that is no. I don't know what updateReport does, but I would look for a more server oriented solution to update the report. The first solution that comes into mind is using a cronjob . Or you can create a windows service to execute it.
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46993579

http://stackoverflow.com/a/29512549
type: Answer
has comment: http://stackoverflow.com/comment/47194471
has body: The clue is in the text :). If you look at this line (I wrote it in the original example to help, but I guess its ignored :))... var t = s.text(100,50,'Snap("#svg") should reference an svg element, not a div. Or create it by supplying width,height Snap(100,100)'); Its saying that Snap takes an SVG element, NOT a div. So you should swap the div for svg in this line. &lt;div id="svgout"&gt; &lt;/div&gt; to &lt;svg id="svgout"&gt; &lt;/svg&gt;
upvote count: 5
answers question: http://stackoverflow.com/q/29499563
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29499563
score: 5

http://stackoverflow.com/comment/47216756
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29522747
has text: What's the code that i must write? In this way I don't understand!
type: Comment

http://stackoverflow.com/q/29474073
type: AnsweredQuestion
has title: Multiple jQuery .on() events not working xBrowser (dependent on order)
tagged with: coffeescript
has answer: http://stackoverflow.com/a/29752812
accepted answer: http://stackoverflow.com/a/29752812
type: Question
has body: I'm using the "DOMMouseScroll" event in place of mousewheel in order to support Firefox. I'm not sure why I'm getting the following behavior: The following will allow DOMMouseScroll to work in Firefox, but my scroll or mousewheel events won't fire. $contents.on 'scroll, mousewheel, DOMMouseScroll', @handleScroll But when I separate out the bindings, everything works fine in Chrome and Firefox. $contents.on 'scroll, mousewheel', @handleScroll $contents.on 'DOMMouseScroll', @handleScroll If I reorder to the following, I get chrome to work again, but not firefox: $contents.on 'scroll, DOMMouseScroll, mousewheel', @handleScroll So obviously the order matters, where mousewheel is the last binding so it works over DDOMMouseScroll, and separating them out is the solution. I would just like to know why. When I look at the jQuery source for .on() I see: function (types, selector, data, fn, one) { var type, origFn; if (typeof types === "object") { if (typeof selector !== "string") { data = data || selector; selector = undefined; } for (type in types) { this.on(type, selector, data, types[type], one); } return this; } Shouldn't the type-in-types loop provide the same effect as creating separate individual bindings?
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/47205363
type: QuestionComment
has text: Now you changed your code in such a way that it probably works. In any case, it seems you forgot a `.` for the selector before the last edit. Don't ever change your code in an invasive way when there is already an answer. I rolled back your edit. You may try again, to make it good.
comment on: http://stackoverflow.com/q/29521567
score: 0
type: Comment

http://stackoverflow.com/a/29423921
downvote count: 0
answers question: http://stackoverflow.com/q/29423809
has body: In Javascript you cannot directly save a file to your root folder or choose the location of where the file is saved. However with Javascript you can cause the browser to prompt the user to save the file locally. Take a look at this github project: https://github.com/eligrey/FileSaver.js
has comment: http://stackoverflow.com/comment/47019395
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47068924
type: Answer
accepted answer of: http://stackoverflow.com/q/29423809
score: 2

http://stackoverflow.com/comment/47135415
has text: You must use `angular.module('AngularApp')` in other files to reference th module
score: 0
comment on: http://stackoverflow.com/q/29487946
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29530426
type: Answer
has body: If I understand well your requirements, you could use this regex. (maybe not the most powerful, I'm not a regex specialist at all) /^(\s\bby\b|\bby\b).*$/gmi Little walkthrough starting by last modifiers : &nbsp;g global, it won't return at first occurence. &nbsp;m multiline, ^ and $ will match start/end of line, instead of string &nbsp;i insensitive, I bet you got it Now, back to the beginning. &nbsp;^ will search at start of the string &nbsp;(x|y) is a capturing group with two alternatives (x or y) &nbsp;\s\ is any white-space (\r\n\t\f) &nbsp;\bword\b is a word boundary, e.g it won't catch "words" &nbsp;.* matches any character (except newline), until &nbsp;$ end of string/line here //those should be found var text = "by test 1 \n" + " by test 2 \n" + "By test 3 \n" + " By test 4 \n" + //Those should not "test By 5 \n" + "test by 6 \n" + "Bya test 7 \n" + "bya test 8 \n" + " Bya test 9 \n" + " bya test 10 \n"; var matchingLines = text.match(/^(\s\bby\b|\bby\b).*$/gmi); document.querySelector('p').textContent = "|" + matchingLines.join("|") + "|"; &lt;p/&gt;
has comment: http://stackoverflow.com/comment/47255339
answers question: http://stackoverflow.com/q/29505397
score: 0

http://stackoverflow.com/comment/47026272
type: Comment
comment on: http://stackoverflow.com/a/29411262
has text: @karthikeya:thanks its working. but the confirm box is coming before validation. what we have to do if we want it after the validation completed.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/47119439
score: 0
type: Comment
has text: Yeah, I'm working on it. This part is a little tricky given the code we have.
type: AnswerComment
comment on: http://stackoverflow.com/a/29478749

http://stackoverflow.com/q/29477733
has answer: http://stackoverflow.com/a/29477943
has comment: http://stackoverflow.com/comment/47116405
has body: The tooltip is normally shown onmouseover event. So when tooltip comes up - I want to change it to new one after e.g. 10 sec. So everytime you hover a mouse cursor it bring up tooltip1 then in 10 sec. it's changed to tooltip2. Then when you hover a mouse cursor again it starts with tooltip1 again. Or as an option - just show one tooltip but after 10 seconds... Thanks
has answer: http://stackoverflow.com/a/29478861
has comment: http://stackoverflow.com/comment/47116587
tagged with: css
has comment: http://stackoverflow.com/comment/47116483
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47116645
has comment: http://stackoverflow.com/comment/47116180
has comment: http://stackoverflow.com/comment/47116842
accepted answer: http://stackoverflow.com/a/29478861
has comment: http://stackoverflow.com/comment/47116449
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/47116221
has title: How to change already shown tooltip?
possible better answer: http://stackoverflow.com/a/29477943
score: 0

http://stackoverflow.com/comment/47065656
type: QuestionComment
comment on: http://stackoverflow.com/q/29448550
type: Comment
has text: Looks like the Karma dependency might be causing problems. Try npm uninstall-g karma then in your package.json set a specific version for karma (try their latest release)
score: 0

http://stackoverflow.com/comment/46929711
has text: oh wow. thank you so much @joemfb, i'm a noob programmer. still learning the basics. thanks again mate. :)
comment on: http://stackoverflow.com/a/29374475
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29403498
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29403415
has body: Just finding .wordcount into &lt;li&gt; jQuery('textarea').on('input', function($) { var regex = /\s+/gi; var count = jQuery(this).val().trim().replace(regex, ' ').split(" ").length; jQuery(this).parent().find('.wordcount').html(count); );
type: Answer
upvote count: 1

http://stackoverflow.com/a/29442515
has comment: http://stackoverflow.com/comment/47052953
score: 3
has comment: http://stackoverflow.com/comment/47053026
has body: Your regular expression is good, but you need to match the beginning and end of the string. Otherwise, your regex can match only a portion of the string and still (correctly) return a match. To match the beginning of the string, use ^, for the end, use $. Update: as Avinash has noted, you can replace {0,1} with ?. JS supports \d for digits, so the regex can be further simplified Finally, since if are only testing against a regex, you can use a non-capturing group ( (?:...) instead of (...)), which offers better performance. original: /[0-9]+(\.[0-9]{1,2}){0,1}/.test('345.567') Fixed, and faster ;) /^\d+(?:\.\d{1,2})?$/.test('345.567')
has comment: http://stackoverflow.com/comment/47052982
has comment: http://stackoverflow.com/comment/47052971
has comment: http://stackoverflow.com/comment/47052978
has comment: http://stackoverflow.com/comment/47052950
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47052968
has comment: http://stackoverflow.com/comment/47052990
type: Answer
accepted answer of: http://stackoverflow.com/q/29442497
answers question: http://stackoverflow.com/q/29442497
upvote count: 3

http://stackoverflow.com/comment/47080676
comment on: http://stackoverflow.com/q/29458262
score: 0
type: Comment
type: QuestionComment
has text: Should you declare the i variable in your for loop like this? `for(var i=0; i<gangina.length; i++)`

http://stackoverflow.com/q/29529720
possible better answer: http://stackoverflow.com/a/29529761
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29530126
tagged with: http://stackoverflow.com/tag/json
score: 0
upvote count: 1
downvote count: 1
type: Question
tagged with: arrays
accepted answer: http://stackoverflow.com/a/29529754
tagged with: javascript
has title: Change object in array's key name
has body: arr = [ {"id":"1"}, {"id":"2"} ]; For some reason I want to change the "id" to "uid". I am stuck here arr.forEach(function(i){ });
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29529761
has answer: http://stackoverflow.com/a/29529753
has answer: http://stackoverflow.com/a/29529754
answer count: 4

http://stackoverflow.com/comment/46965886
score: 0
type: Comment
type: QuestionComment
has text: In `Number Two`, what is `canvas`? Is it really the same as `onrendered: function(canvas) {...}` parameter?
comment on: http://stackoverflow.com/q/29394235

c#
tags question: http://stackoverflow.com/q/29390388
tags question: http://stackoverflow.com/q/29483877
tags question: http://stackoverflow.com/q/29451706
tags question: http://stackoverflow.com/q/29492734
tags question: http://stackoverflow.com/q/29509497
tags question: http://stackoverflow.com/q/29374149
tags question: http://stackoverflow.com/q/29530181
tags question: http://stackoverflow.com/q/29483562
tags question: http://stackoverflow.com/q/29478318
tags question: http://stackoverflow.com/q/29457969
tags question: http://stackoverflow.com/q/29383004
tags question: http://stackoverflow.com/q/29378125
tag name: c#
tags question: http://stackoverflow.com/q/29529900
tags question: http://stackoverflow.com/q/29437824
tags question: http://stackoverflow.com/q/29426763
tags question: http://stackoverflow.com/q/29515541
tags question: http://stackoverflow.com/q/29501888
tags question: http://stackoverflow.com/q/29513745
tags question: http://stackoverflow.com/q/29513750
tags question: http://stackoverflow.com/q/29529615
tags question: http://stackoverflow.com/q/29473286
tags question: http://stackoverflow.com/q/29406924
tags question: http://stackoverflow.com/q/29528460
tags question: http://stackoverflow.com/q/29453106
tags question: http://stackoverflow.com/q/29473011
tags question: http://stackoverflow.com/q/29508030
tags question: http://stackoverflow.com/q/29406628
tags question: http://stackoverflow.com/q/29417708
tags question: http://stackoverflow.com/q/29429142
tags question: http://stackoverflow.com/q/29428672
tags question: http://stackoverflow.com/q/29472909
tags question: http://stackoverflow.com/q/29381213
tags question: http://stackoverflow.com/q/29376140
tags question: http://stackoverflow.com/q/29415370
tags question: http://stackoverflow.com/q/29489246
tags question: http://stackoverflow.com/q/29373993
tags question: http://stackoverflow.com/q/29505765
tags question: http://stackoverflow.com/q/29385081
tags question: http://stackoverflow.com/q/29387774
tags question: http://stackoverflow.com/q/29475585
tags question: http://stackoverflow.com/q/29511958
tags question: http://stackoverflow.com/q/29504697
tags question: http://stackoverflow.com/q/29426777
tags question: http://stackoverflow.com/q/29437561
tags question: http://stackoverflow.com/q/29449375
tags question: http://stackoverflow.com/q/29477996
tags question: http://stackoverflow.com/q/29500390
tags question: http://stackoverflow.com/q/29464439
tags question: http://stackoverflow.com/q/29385085
tags question: http://stackoverflow.com/q/29450944
tags question: http://stackoverflow.com/q/29403285
tags question: http://stackoverflow.com/q/29448586
tags question: http://stackoverflow.com/q/29496564
tags question: http://stackoverflow.com/q/29402282
tags question: http://stackoverflow.com/q/29474115
tags question: http://stackoverflow.com/q/29428238
tags question: http://stackoverflow.com/q/29385891
type: Tag
tags question: http://stackoverflow.com/q/29431363
tags question: http://stackoverflow.com/q/29522417
tags question: http://stackoverflow.com/q/29438311
tags question: http://stackoverflow.com/q/29505956
tags question: http://stackoverflow.com/q/29492820
tags question: http://stackoverflow.com/q/29511373
tags question: http://stackoverflow.com/q/29470290
tags question: http://stackoverflow.com/q/29516599
tags question: http://stackoverflow.com/q/29425224
tags question: http://stackoverflow.com/q/29400330
tags question: http://stackoverflow.com/q/29457781
tags question: http://stackoverflow.com/q/29454957
tags question: http://stackoverflow.com/q/29459015
tags question: http://stackoverflow.com/q/29378301
tags question: http://stackoverflow.com/q/29509911
tags question: http://stackoverflow.com/q/29509396
tags question: http://stackoverflow.com/q/29529057
tags question: http://stackoverflow.com/q/29416697
tags question: http://stackoverflow.com/q/29405306
tags question: http://stackoverflow.com/q/29481522
tags question: http://stackoverflow.com/q/29410606

http://stackoverflow.com/q/29377033
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: openssl
has comment: http://stackoverflow.com/comment/46937726
has body: I want to build an HTTPS client that connects to a HTTPS Server that requires mutual authentication. Additionally, the client key is an Elliptic Curve key instead of a RSA key. To support Elliptic Curve keys, I have recompiled Node.js with OpenSSL 1.0.2a. In my node.js program, I set the options to specify a key and certificate, var options = { // These are necessary only if using the client certificate authentication key: fs.readFileSync('client-key.pem'), cert: fs.readFileSync('client-cert.pem'), and when I run it, I get this error: Error: error:0906D06C:PEM routines:PEM_read_bio:no start line at Error (native) at Object.createSecureContext (_tls_common.js:110:19) at Object.exports.connect (_tls_wrap.js:854:21) at Agent.createConnection (https.js:84:14) at Agent.createSocket (_http_agent.js:196:16) at Agent.addRequest (_http_agent.js:168:23) at new ClientRequest (_http_client.js:156:16) at Object.exports.request (http.js:51:10) at exports.request (https.js:138:15) ... This indicates that Node.js is not able to read the EC key. This error message is similar to when openssl attempts to read the key as an X509 cert: openssl x509 -text -in sample.key unable to load certificate 140735234208608:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:701:Expecting: TRUSTED CERTIFICATE How can I force Node.js to load this key as an EC key?
has comment: http://stackoverflow.com/comment/46935010
upvote count: 2
linked to: http://stackoverflow.com/q/20837161
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46948405
downvote count: 1
tagged with: node.js
score: 1
tagged with: https
has answer: http://stackoverflow.com/a/29383145
type: Question
has title: Node.js HTTPS request using Elliptic Curve key

http://stackoverflow.com/a/29374838
answers question: http://stackoverflow.com/q/29374540
has comment: http://stackoverflow.com/comment/46930253
has comment: http://stackoverflow.com/comment/46930325
type: Answer
has body: Clicking on the button runs this SCRIPT (which further passes 3 JS-variables to the abc.php) The echo'ed data in abc.php will come in the div="myDiv" //as a response. the things echo'ed in abc.php will come in this div Click Me To Send JS-Values to abc.php and then in abc.php //file <?php $recieved_1 = $_GET['recieve_1']; $recieved_2 = $_GET['recieve_2']; $recieved_3 = $_GET['recieve_3']; //Do your processing here and insert it in the database //Insert Query OR Update Query (whatever) // after you have inserted you can get the response in // the having id="myDiv" Or whatever you want // Suppose you have successfully inserted data then $insertedDataBoolean = true; if($insertedDataBoolean){ echo "Data: " . $recieved_1 . ", " . $recieved_2 . " and " . $recieved_3 . " inserted successfully."; } else{ echo "Data-insertion error."; } ?>
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/29442508
score: 0
has comment: http://stackoverflow.com/comment/47053288
answer count: 1
has comment: http://stackoverflow.com/comment/47053440
tagged with: jquery
has comment: http://stackoverflow.com/comment/47053710
has answer: http://stackoverflow.com/a/29443085
tagged with: ajax
tagged with: php
type: AnsweredQuestion
tagged with: mysql
accepted answer: http://stackoverflow.com/a/29443085
type: Question
has title: array from ajax success put data into respective input in table
has body: In my project i have an ajax request the select entry from database the data that i select is the area and floor number of building it is formatted like this "storey": [{ "storeyno": "1st Floor", "areastorey": "1" }, { "storeyno": "2nd Floor", "areastorey": "2" }, { "storeyno": "3rd Floor", "areastorey": "3" }, { "storeyno": "4th Floor", "areastorey": "4" }, { "storeyno": "5th Floor", "areastorey": "5" }, { "storeyno": "6th Floor", "areastorey": "6" }], the two data combination is the row of each table. Storeyno represents floor number and it is only a p , the areastoery is the an input value, it is the area of the storey. My question is how to put it back again in the input text.The floor number is not problem ( storeyno ) because i am generating it dynamically, the problem is putting the input value. for (var j = 0; j < storeyno.length; j++) { console.log(storeyno); var bldgstorey = $('table#floor').find('tr:not(:first-child,:last-child)'); if (storeyno[j].storeyno !== null) { bldgstorey.each(function() { var floornumber = $(this).find('td p').text(); var floorinput = $(this).find('td input[type=text]').attr('id'); console.log(storeyno[j].areastorey + " = " + floorinput); console.log(floorinput); $(this).find('td input[type=text]').val(storeyno[j].areastorey); //$(this).find('td:nth-child(2)').find('input[type=text]').val(storeyno[j].areastorey); }); } } Notice that from the selector i added tr:not(:first-child,:last-child) because the first row is the header while the last row is the total. FYI I generate the row dynamically but it is not relevant to question so i think it is not important Update Sample Updated sample with sample floors as the sample data Sample with exact same floors Problem How to properly place the value correctly from database to input. When i say properly floor 1 input text box will be populated by database that is for floor 1
has comment: http://stackoverflow.com/comment/47053450
tagged with: javascript
has comment: http://stackoverflow.com/comment/47053487
has comment: http://stackoverflow.com/comment/47053233

http://stackoverflow.com/comment/47163758
type: Comment
score: 0
type: QuestionComment
has text: You can use threads in JS, so theoretically you could do this. Link with an example of how you could get this done : http://www.htmlgoodies.com/html5/tutorials/introducing-html-5-web-workers-bringing-multi-threading-to-javascript.html#fbid=aDkF_uQvTn1
comment on: http://stackoverflow.com/q/29502686

http://stackoverflow.com/comment/47163016
has text: I'm looking for an easy way to make a GUI to execute a bunch of scripts. What would be the best way to go, that is relatively OS-independent?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29502380

http://stackoverflow.com/comment/46945046
has text: there are errors in bash? previous build where working ?
comment on: http://stackoverflow.com/q/29382249
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46971913
type: QuestionComment
has text: @YyYo Well that's also an issue I have. The txt file contains only words. I was thinking of using an API or do a website query of the word and store answer in the definition. But for now, having the last node saying "defintion here" is enough :)
comment on: http://stackoverflow.com/q/29395203
score: 0
type: Comment

conflict
tag name: conflict
tags question: http://stackoverflow.com/q/29460035
type: Tag
tags question: http://stackoverflow.com/q/29425465

http://stackoverflow.com/q/29493454
possible better answer: http://stackoverflow.com/a/29495820
answer count: 2
has title: Creating Link to Specific Page through Table field
has answer: http://stackoverflow.com/a/29495820
has answer: http://stackoverflow.com/a/29493571
tagged with: javascript
has comment: http://stackoverflow.com/comment/47148796
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I'm pretty new to HTML, PHP, JavaScript, etc. I have a table that will be uploaded by a Database, with fields such as name, id,email etc. I would like to show a page with all people in the table, with a link to a details page that will show all the attributes (field in the table) of the person. I use MySQL and I'm trying to build an Admin interface for better user management.
has comment: http://stackoverflow.com/comment/47145920
accepted answer: http://stackoverflow.com/a/29493571
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47147027
tagged with: mysql
type: Question

http://stackoverflow.com/a/29462962
type: Answer
score: 2
upvote count: 2
has body: You're selecting the myDiv when the page loads, so the event is only applied to the first div. you need to use event delegation instead. You code would look like this: $(document).ready(function(){ $(document).on('click', '.commButtonS', function(){ $('.commButtonS').after("&lt;div class='myDiv' contenteditable&gt;&lt;/div&gt;"); }); $(document).on("paste", ".myDiv", function(e){ e.preventDefault(); var text = e.originalEvent.clipboardData.getData("text/plain"); document.execCommand("insertHTML", false, text); }); });
downvote count: 0
answers question: http://stackoverflow.com/q/29458523

http://stackoverflow.com/q/29429550
has comment: http://stackoverflow.com/comment/47029207
has body: I have this idea for passing data form an injected script (getDOM.js) to my background.js bacgkround.js chrome.contextMenus.onClicked.addListener(function(info, tab){ chrome.tabs.executeScript(tab.id, {file: "getDOM.js"}) }); chrome.contextMenus.onClicked.addListener(function(info, tab){ chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { chrome.tabs.sendMessage(tabs[0].id, {greeting: "GetURL"}, function(response) { alert(response.navURL); }); }); }); getDOM.js chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request.greeting === "GetURL") sendResponse({navURL:'test'}); }); as you can see i used massage function to pass data, but there is a problem. i cant get data on right time, i will pass background.js previous data content must be dynamic (not specific "test"), every time it will alert previous data. imagine getDOM.js will pass selected text, with this code it will pas previous selected text. how can i fix this ? my example of dynamic data : function getHTMLOfSelection () { var range; if (document.selection &amp;&amp; document.selection.createRange) { range = document.selection.createRange(); return range.htmlText; } else if (window.getSelection) { var selection = window.getSelection(); if (selection.rangeCount &gt; 0) { range = selection.getRangeAt(0); var clonedSelection = range.cloneContents(); var div = document.createElement('div'); div.appendChild(clonedSelection); return div.innerHTML; } else { return ''; } } else { return ''; } } var dom = getHTMLOfSelection(); chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request.greeting === "getDom") sendResponse({DOM:dom}); }); it will pass selected dom to background.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47029386
type: Question
accepted answer: http://stackoverflow.com/a/29430215
tagged with: javascript
score: 0
tagged with: google-chrome-extension
answer count: 1
has title: passing data from executed script to background in chrome extension
has comment: http://stackoverflow.com/comment/47029408
has answer: http://stackoverflow.com/a/29430215

http://stackoverflow.com/q/29398444
has comment: http://stackoverflow.com/comment/47014219
has comment: http://stackoverflow.com/comment/46973031
has body: I've been looking everywhere for an answer all over but I can't find anything that works. It works fine on all of my browsers but doesn't work on mobile devices. I'd like to have the links open in a new tab if possible. Does anyone have any suggestions? Here's what I have: Choose 1 2 3 4
has comment: http://stackoverflow.com/comment/47014343
answer count: 0
type: UnansweredQuestion
upvote count: 1
has title: Javascript window.open not firing on Mobile
score: 1
type: Question
tagged with: mobile
has comment: http://stackoverflow.com/comment/46973181
downvote count: 0
tagged with: jquery-mobile
tagged with: javascript
favorite count: 0
tagged with: window.open
tagged with: onchange

http://stackoverflow.com/comment/47207607
comment on: http://stackoverflow.com/a/29525316
has text: @coco, can you convert ArrayBuffer to a Blob on Node or in the Browser? In the Browser makes sense because Blob just takes a bunch of bytes and throws them in a special bucket with some nice methods. It won't be able to infer that those bytes were once a JavaScript Object. If JavaScript were a Typed language you would get an error, but since it's not I reckon you can turn just about anything into a Blob.
type: AnswerComment
score: 0
type: Comment

algorithm
tags question: http://stackoverflow.com/q/29441207
tags question: http://stackoverflow.com/q/29482757
tags question: http://stackoverflow.com/q/29392586
tag name: algorithm
tags question: http://stackoverflow.com/q/29526156
tags question: http://stackoverflow.com/q/29501448
tags question: http://stackoverflow.com/q/29459515
tags question: http://stackoverflow.com/q/29413453
tags question: http://stackoverflow.com/q/29468047
type: Tag
tags question: http://stackoverflow.com/q/29378150
tags question: http://stackoverflow.com/q/29429395

http://stackoverflow.com/comment/49459310
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29529473
score: 0
has text: You should use [MediaStreamRecorder.js](https://github.com/streamproc/MediaStreamRecorder) with `recorder.audioChannels=1` to get half size of recorded WAV without loosing the quality.

http://stackoverflow.com/comment/46975347
score: 0
has text: if that's the case you have to $watch over an object inside the directive that gets changed from within the function in the controller, editing my answer now.
comment on: http://stackoverflow.com/a/29399633
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47142036
type: Comment
comment on: http://stackoverflow.com/a/29487258
score: 0
has text: Thanks. I made the suggested changes. Still, the code does not run. I've come to the conclusion that Cloud Code does not like loops in general and that it's likely underscore must be used to asynchronousness. Am I on the right track with this theory?
type: AnswerComment

http://stackoverflow.com/a/30251197
type: Answer
score: 5
has comment: http://stackoverflow.com/comment/57949794
downvote count: 3
accepted answer of: http://stackoverflow.com/q/29496847
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/56564688
has body: Please look at the list of changes related to node in the nw.js wiki. Since node-webkit supports GUI applications instead of console applications, the output of console.log() (and other similar methods such as console.warn() and console.error()) is redirected to WebKit's console. You may see it in your “Developer Tools” window (on its “Console” tab).
has comment: http://stackoverflow.com/comment/57994151
answers question: http://stackoverflow.com/q/29496847
upvote count: 8

http://stackoverflow.com/q/29508692
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/47178643
score: 0
answer count: 2
has body: Im getting following json and want to repeat and bind the value but its seems something wrong. JSON { "1428394433116":[ { "path":"path0","value":"test path 2" }, { "path":"path1","value":"test path 1" } ], "1428467596813":[ { "path":"path0","value":"path info 1" }, { "path":"path1","value":"path info 2" }, { "path":"path2","value":"path info 3" } ] } ng-repeater Path : Update Thanks, ID-1428394433116 for one module and ID-1428467596813 for another module. So expected result is: path 1: test path 2 path 2: test path 1
has title: AngularJS getting JSON value to ng-repeat
tagged with: javascript
has comment: http://stackoverflow.com/comment/47173838
has answer: http://stackoverflow.com/a/29508823
tagged with: angularjs
has answer: http://stackoverflow.com/a/29511246
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/47120991
has text: @IlijaMilovic Ok I see what you are trying to do. I updated the code.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29381335

http://stackoverflow.com/comment/47005017
type: Comment
comment on: http://stackoverflow.com/q/29416409
score: 0
type: QuestionComment
has text: You can't find it unless you keep it in your own data structure and search for it with your own search facility.

http://stackoverflow.com/comment/47139873
type: Comment
type: QuestionComment
has text: Please save yourself the trouble and generate the questions in JavaScript. :-/
comment on: http://stackoverflow.com/q/29489909
score: 0

http://stackoverflow.com/comment/47200052
has text: @BoltClock you are perfectly right, I found out about it too, thanks http://caniuse.com/#feat=queryselector
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29522436
score: 0

http://stackoverflow.com/q/29452063
has body: well I have this code in PHP and send this string "ABARFL31112421M900" in the echo: &lt;INPUT TYPE=BUTTON onClick="openDialog(&lt;?php echo $_pagi_resultSubLider -&gt;fields['id'];?&gt;)" VALUE="Ver Estructura"&gt;&lt;/TD&gt; And after I have this event in the function openDialog($Id_var) { $('&lt;div/&gt;').dialog({ modal: true, show: { effect: "explode", duration: 500 }, hide: { effect: "explode", duration: 500 }, open: function () { if ($(this).is(':empty')) { $(this).load('Ver_Estructura.php?id_ver=' + $Id_var); } }, height: 580, width:580, title:"Estructura" }); } But doesn't work, when I view consolejavascript this is the return: Uncaught ReferenceError: ABARFL31112421M900 is not defined
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/29452085
tagged with: jquery
has title: Event is not defined onclick
favorite count: 0
has comment: http://stackoverflow.com/comment/47069853
score: -2
tagged with: php
type: AnsweredQuestion
downvote count: 2
accepted answer: http://stackoverflow.com/a/29452085
type: Question
tagged with: javascript

http://stackoverflow.com/comment/47140063
has text: Well, the editRowPanel "rendered" attribute is intially set to 'false', but is wrapped inside of a panelGroup which is rendered (I read this was the correct way to do this). Also, neither h:panelGroup or rich:panel have a "visible" attribute available to me. Maybe there is a different wrapper I could use other than h:panelGroup that does provide this attribute?
type: Comment
comment on: http://stackoverflow.com/q/29475933
score: 0
type: QuestionComment

http://stackoverflow.com/comment/47051625
score: 0
has text: Hi Michael, I've posted your answer below which will help guide you in deciding upon the option to utilize the `noleave` flag.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29439931

http://stackoverflow.com/q/29383416
has body: Hi im currenty using $route.reload to refresh the content of my controller Every time I update my Database. the problem is when updating huge list of data, Every Time I update my Database and run $route.reload my browser lose its ability to scroll up or down my browser, it works fine with smaller list of Data. below is a sample of my code $scope.Undone = function(id){ $scope.index = $scope.GetID ; CRUD.put('/UndoJda/'+$scope.index).then(function(response){ toastr.info('Jda has been activated.', 'Information'); $route.reload(); }); }
type: Question
score: 3
has answer: http://stackoverflow.com/a/29383716
upvote count: 3
has answer: http://stackoverflow.com/a/29383628
has answer: http://stackoverflow.com/a/29383566
has answer: http://stackoverflow.com/a/29385232
tagged with: javascript
has comment: http://stackoverflow.com/comment/46945630
has comment: http://stackoverflow.com/comment/46945749
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46945610
answer count: 4
has title: $route.reload(); Issue
downvote count: 0

http://stackoverflow.com/comment/46967124
comment on: http://stackoverflow.com/a/29383770
type: AnswerComment
score: 0
type: Comment
has text: Yes, client side would be the best option. But I use PHP to check if the email and user already exists in the database. I would have to mix the validations with JavaScript and PHP, I think for that I should use AJAX, but do not know how.

http://stackoverflow.com/a/29467545
answers question: http://stackoverflow.com/q/29467032
type: Answer
upvote count: 4
has body: Why can't javascript intuitively recognize that susan.setAge(35) is referring to the setAge method in my first blockquote? (i feel as if the code could be simpler) I suppose javascript could be implemented in that way, but it isn't. I've seen a proposal for a similar feature in rust, that sparked quite a lot of discussion. i feel as if the code could be simpler In addition to the call() method that javascript functions have, you might want to look into how object prototypes work: //A new type of object, called Person var Person = function(){}; Person.prototype.setAge = function(age) { this.age = age }; var susan = new Person(); susan.setAge(35);
downvote count: 0
score: 4

http://stackoverflow.com/a/29448164
answers question: http://stackoverflow.com/q/29448057
has body: function StatCharac (initVal) { this.initVal = initVal; this.val = initVal; this.modifs = []; this.getVal = function() { var stat = this.val; for (var i =0; i &lt; this.modifs.length; i++) { stat = this.modifs[i](stat); } return stat; } } function Character (nameCharac, id, hp, spell, owner) { this.nameCharac = nameCharac; this.id = id; this.hp = new StatCharac(hp); this.power = new StatCharac(0); this.spell = spell; this.pos = -1; this.canMove = false; this.canPlay = false; this.owner = owner; } var character = new Character() console.log(character.hp.getVal) This is working fine.
score: 0
type: Answer

http://stackoverflow.com/comment/47147648
score: 0
type: Comment
has text: Thanks again, I want to modify the `if` to change `user_login` to `display_name` if `display_name` exists. that way it wont say "Welcome Jsmith1234" it will say "Welcome John Smith"
comment on: http://stackoverflow.com/a/29478679
type: AnswerComment

http://stackoverflow.com/comment/47167425
has text: I updated my question. I tried that earlier and it didn't render anything. Thanks for catching that.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29505088

http://stackoverflow.com/q/29379886
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29380442
has answer: http://stackoverflow.com/a/29379956
accepted answer: http://stackoverflow.com/a/29379951
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/134845
type: Question
has answer: http://stackoverflow.com/a/29379988
has body: I need a little help here and please excuse me for newbie programming. I have this code javascript function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; } and this is how inherit it on my html Show something something what it does is when someone clicks on "show something" , the text in the div will be showed up. I have 2 problems and hope you could guide me. The place on the site where it will be placed is not in the beginning and when is clicked the href="#" it takes the viewer scrolled up on the beginning of the site. Note that i want just a text-click. Not a button. Second and optional is : Could i do anything to add jQuery on the below code so that it has a little animation on click-showing?
has answer: http://stackoverflow.com/a/29379951
tagged with: javascript
has title: On Text-Click Show (Function)
has answer: http://stackoverflow.com/a/29380442
has answer: http://stackoverflow.com/a/29379980
score: 0
answer count: 5

http://stackoverflow.com/comment/62466932
has text: It's worth noting that `white-space: pre` will preserve your newlines, but it causes your text to no longer wrap. This means, provided it's a long string of text, it will stretch outside of your element. For this reason I have found `white-space: pre-wrap` to work better for us.
type: AnswerComment
type: Comment
score: 4
comment on: http://stackoverflow.com/a/34806157

http://stackoverflow.com/a/29445836
has body: Seems to me you are tryingf to achieve something like this. var parent = $(".code-box.example-1"), parentC = parent.attr("class").match(/example-\d+/), htmlSnip = parent.find(".lang-html &gt; pre").text().replace("&amp;lt;", "&lt;").replace("&amp;gt;", "&gt;"), cssSnip = parent.find(".lang-css &gt; pre").html().replace(/(\/\*.*\*\/\n)|(^\s*)/gm, "").replace(/^([^{\n]+)(?={$)/gm, "." + parentC + " .lang-result " + "$1"), jsSnip = parent.find(".lang-js &gt; pre").html().replace(/(\/\*.*\*\/\n)|(^\s*)/gm, "").replace(/(\$\(")([^"]+)("\))/gm, "$1." + parentC + " .lang-result " + "$2 $3"); parent.find(".lang-result").html(htmlSnip).prepend("&lt;style&gt;" + cssSnip + "&lt;/style&gt;" + "&lt;script&gt;" + jsSnip + "&lt;\/script&gt;"); If this is what you are looking for and you require additiional information, let me know. The key is to add a class per code example you are using, here .example-1. For some regex explanations, I refer you to regex101. It's a great tool with a very good explanation of all code in the right window. As you may know, you can use RegEx to match, but also to substitute. In the tool, at the bottom of the window, there's "Substitution". Click on it, to open the window. The Regex at the top of the page will evaluate the "Test string", and substitute that string with your input in "Substitution". The result is in the bottom most field. CSS substitution: First, let's remove the CSS comment AND all spatial characters that might be in our way (removing means "replace by an empty string") - example: https://regex101.com/r/cL0hL3/2 The result will be something like this: div{ font-size: 120%; } div span{ font-size: 130%; } But we want to make this style more specific. We want it to only apply to the div that's inside .lang-result which, in turn, is part of the parent container .example-1. Therefore we need to add some things to the CSS. A useful thing to use is the dollar sign $1 which in substitution will return the captured group (which in regex is in p…
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47067088
type: Answer
has comment: http://stackoverflow.com/comment/47063048
accepted answer of: http://stackoverflow.com/q/29444506
answers question: http://stackoverflow.com/q/29444506
has comment: http://stackoverflow.com/comment/47066927
has comment: http://stackoverflow.com/comment/47064597

http://stackoverflow.com/comment/47114203
score: 7
comment on: http://stackoverflow.com/q/29476672
type: QuestionComment
type: Comment
has text: `$('[id*="picture_contents"][id*="title"]')`

http://stackoverflow.com/comment/46938930
comment on: http://stackoverflow.com/q/29379311
score: 0
type: Comment
type: QuestionComment
has text: @Octopus I see, I have a variable that relates to CURL and that gets the same info: $currentsellprice = $currentdmarket['return']['sellorders']['0']['sellprice']; do you know how I could intergrate that variable with the javascript code above?

http://stackoverflow.com/a/29462702
has comment: http://stackoverflow.com/comment/47105363
has comment: http://stackoverflow.com/comment/47104888
upvote count: 1
score: 0
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29462326
has body: If you want to validate the format and that it's a valid date, you have to check the values. That can be done with a regular expression but it's much simpler using a Date, e.g. // Validate dd/mm/yyy date string function isValidDMY(s) { var b = s.split('/'); var d = new Date(b[2], --b[1], b[0]); return d &amp;&amp; d.getMonth() == b[1]; } console.log(isValidDMY('4/4/2015')); // true console.log(isValidDMY('29/2/2015')); // false There really is no point in insisting on leading zeros for single digit numbers for user input dates, so the above accepts either 4/4/2015 or 04/04/2015. Edit If you insist on leading zeros for day and month number, you can check that too by changing the last line to: return /^(\d\d\/){2}\d{4}$/.test(s) &amp;&amp; d &amp;&amp; d.getMonth() == b[1];
has comment: http://stackoverflow.com/comment/47089406

http://stackoverflow.com/comment/47157416
has text: What is `//code code code`? This : `$body.html('')` clears all the content of your page...
comment on: http://stackoverflow.com/q/29499348
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47194729
score: 0
type: AnswerComment
type: Comment
has text: Perfect, this solves it, even if I don't like the inline style.
comment on: http://stackoverflow.com/a/29519519

http://stackoverflow.com/q/29437824
type: Question
has title: How to disable WebRTC in GeckoFX C#
upvote count: 1
has answer: http://stackoverflow.com/a/29439941
answer count: 1
tagged with: c#
tagged with: gecko
accepted answer: http://stackoverflow.com/a/29439941
tagged with: javascript
type: AnsweredQuestion
tagged with: geckofx
downvote count: 0
score: 1
favorite count: 0
has body: I'm trying to disable WebRTC functionality in GeckoFx. I've heard about media.peerconnection.enabled. but i'm unable to find how to set it up programmatically using C#.net. I was able to disable it by going to about:config page manually.

http://stackoverflow.com/q/29450881
has comment: http://stackoverflow.com/comment/47067879
type: UnansweredQuestion
has title: event listener 'change' is not engaging?
answer count: 0
has body: I'm trying to read in a file, split the words out into an array, count the length of each word, then reassign each word into a new array if the word is greater than a number entered. When the file is selected, thats when the function should execute, perform the above logic and display the result to an element. The EventListener doesn't seem to be getting triggered when I set a breakpoint in Chrome. Any suggestions? I've included the JS and html for troubleshooting. Thanks in advance! function filteredWords() { var fileInput = document.getElementById('fileInput'); //create a variable for the html input var displayResult = document.getElementById('displayResult'); //create a variable for the html display var temp = document.getElementById('num').value; var num = parseInt(temp, 10); fileInput.addEventListener('change', function (e) { var file = fileInput.files[0]; //store the first file into a variable var textType = /text.*/; //create a variable for checking if file type is text if (file.type.match(textType)) { //if the file is of type text var reader = new FileReader(); //create a new file reader object var text = ""; var wordArray = []; var filteredArray = []; reader.readAsText(file); // read the file reader.onload = function (e) { //for the onload event text = reader.result; //assign result to new variable wordArray = text.split(' '); //split the text words into an array for (i = 0; i &lt; wordArray.length; i++) { //loop through the array and replace largest word with largest in array if (wordArray[i].length &gt; num) { filteredArray += wordArray[i]; } } displayResult.innerHTML = "Your filtered words are: "; //display the result in the browser element for (i = 0; i &lt; filteredArray.length; i++) { displayResult.innerHTML = largestWord + ", "; } }; } else { //display a message if file wasn't read displayResult.innerHTML = "File not supported!"; } }); } //inputs &lt;input class="" type="number" id="num" /&gt; &lt;input type="file" onclick="filteredWords()" id="fileI…
has comment: http://stackoverflow.com/comment/47067904
tagged with: event-listener
has comment: http://stackoverflow.com/comment/47067781
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/47067680

http://stackoverflow.com/q/29510325
tagged with: javascript
upvote count: 0
answer count: 1
tagged with: jquery
has title: .html() doesn't work when page changes or refreshes
has body: I have a JS that plays a notification sound on the arrival of any new notifications. It works completely fine when a new notification comes, it should play the sound and it does play. The notification I am talking about is only an integer which is returned from a query through an ajax call. I set this integer into my &lt;asp:label.../&gt; through the script. The problem is : I have written the script on MasterPage. So every time I open a new page, or a refresh the same one the &lt;asp:Label.../&gt; gets cleared which I set from my script using .html(value) causing the script to run the sound again as every time the page refreshes or another page is loaded. The problem may be is , that the value is not persistent ? I want that the value should be set to the html of the label and also its value should be persistent on all the pages . What should I do for this persistence ? My Script is : myFunction(); function myFunction() { $.get("AjaxServicesNoty.aspx", function (data) { var recievedCount = parseInt(data); alert(recievedCount); var existingCount = $(".lblEventCount").text(); if (existingCount == "") { existingCount = 0; alert(existingCount); } else { existingCount = parseInt($(".lblEventCount").text()); alert(existingCount); } // if (existingCount == "" &amp;&amp; recievedCount != 0) { // $(".lblEventCount").html(recievedCount); // $(".lblAcceptedCount").html(recievedCount); // var sound = new Audio("Sound/notificationSound.wav"); // sound.play(); // } if ((parseInt(recievedCount) &gt; parseInt(existingCount)) &amp;&amp; existingCount == 0) { $(".lblEventCount").html(recievedCount); $(".lblAcceptedCount").html(recievedCount); var sound = new Audio("Sound/notificationSound.wav"); sound.play(); } else { $(".lblEventCount").html(existingCount); $(".lblAcceptedCount").html(existingCount); } }); } setInterval(myFunction, 5000);
tagged with: asp.net
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/47179509
score: -1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47179324
has answer: http://stackoverflow.com/a/29511776
has comment: http://stackoverflow.com/comment/47177194
downvote count: 1
type: Question

http://stackoverflow.com/a/29471743
answers question: http://stackoverflow.com/q/29471705
type: Answer
has body: You can use split method which returns array like this: var str="2015,4,06"; var array = str.split(","); //here is your array`
score: 0

http://stackoverflow.com/a/29425317
upvote count: 1
type: Answer
downvote count: 0
has body: JavaScript has garbage collection. Objects do not get destroyed then they go out of scope. An Object X get garbage collected by the runtime system, when it sees that nobody is having a reference (or is pointing) to X. A Backbone View is also an object. An object can store reference to another object. In your renderCollaboratingView, you wrote : var model_view = new this.ViewConstructor({model: job}); this model_view is your view's object. You passed your job which is your model you got from : renderCollaboratingView: function(e){ var job = this.model; .... } You can look at this line in backbone annotated code : BackBone View Options. (I would suggest to look at the link after you have read the answer) The line is : var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events']; and then Backbone View is defined as : BackBone View It is : var View = Backbone.View = function(options) { this.cid = _.uniqueId('view'); options || (options = {}); _.extend(this, _.pick(options, viewOptions)); this._ensureElement(); this.initialize.apply(this, arguments); }; Look at line : _.extend(this, _.pick(options, viewOptions)); and your code : var model_view = new this.ViewConstructor({model: job}); So how is the model that I am passing to the view object persisted so that the DOM interactions can set attribute values on the underlying model object? If you merge the dots : You are passing a model to your view. You can also pass other like 'collection', 'el', 'id', ... in viewOptions. They get pick from your passed object {model: job} and extended in the view object. This is how your view object has reference to the model that it was given. Once again, I got here because I was trying to understand why I need to remove the listeners on the model that I passed into view in the first place. As i said, just removing a view-object from DOM is not going to destroy it. You would have to remove all references of view-object that other objects (here mode…
answers question: http://stackoverflow.com/q/29423770
score: 1

http://stackoverflow.com/comment/47190780
comment on: http://stackoverflow.com/q/29517778
score: 0
type: QuestionComment
type: Comment
has text: Can you add the HTML as well?

http://stackoverflow.com/a/29515263
type: Answer
answers question: http://stackoverflow.com/q/29514438
has comment: http://stackoverflow.com/comment/47186233
has comment: http://stackoverflow.com/comment/47186404
has body: Taken from this answer $(document).ready(function(){ if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { $('.bxslider').bxSlider(); } });
score: 0

http://stackoverflow.com/q/29476011
favorite count: 0
has answer: http://stackoverflow.com/a/29476084
accepted answer: http://stackoverflow.com/a/29476084
tagged with: ember.js
upvote count: 7
type: AnsweredQuestion
has body: I have a component with a property 'viewBox' that stores a POJO, with an observer on this property. I want to be able to modify the properties of this viewBox without using set and then manually trigger a change on the viewBox. Is this possible in ember.js ?
score: 7
tagged with: javascript
type: Question
has title: Manually trigger property change in ember.js
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/47031591
score: 0
has text: hey friend check my answer
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29430850

http://stackoverflow.com/q/29388687
has answer: http://stackoverflow.com/a/29400199
type: UnansweredQuestion
score: 0
tagged with: error-handling
tagged with: internet-explorer
has title: IE 11 "An error has occurred in the script on this page" at the end of the line
tagged with: internet-explorer-8
tagged with: internet-explorer-11
type: Question
has body: I am trying to test a legacy web site originally intended to work on IE8 in IE11. I get an error as "An Error has occurred in the script on this page." on my code when accessing the page on IE11 (it works fine on IE8). The line number stated here is the last line of clientCXMLDocument.js file and I don't see any issue in that code that would case the issue. On IE11 in Internet Options, if I uncheck "Disable script debugging (Internet Explorer)", I no longer get the error but I would be more interested to know what is causing the error.
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/47141902
has text: It may well be clearing the timer, but you've got a bunch of event listeners that will be recreating it via `resetTimer` -> `goActive` -> `startTimer`
comment on: http://stackoverflow.com/q/29491386
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47054098
score: 1
type: Comment
type: QuestionComment
has text: It is a logical operator, but it is quite different from most other languages. Answers should explain this difference, and not just refer to an off-site reference/documentation.
comment on: http://stackoverflow.com/q/29443175

http://stackoverflow.com/q/29509497
accepted answer: http://stackoverflow.com/a/29510968
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47175747
possible better answer: http://stackoverflow.com/a/29509675
has answer: http://stackoverflow.com/a/29509675
has title: Javascript , looping through a form with select options, when value x is selected needs to show textarea on the right place
has answer: http://stackoverflow.com/a/29510968
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/47175573
tagged with: javascript
tagged with: forms
has body: I'm looping through a table/form here, and I need some help with the javascript part. When the option "keuze" is selected it needs to show a textarea, but when I select it on an another row the textarea only appears on the first row. And I want it to appear below my selection field where I selected the option. I hope you guys can help me with this. (Sorry for my bad english :) http://nl.tinypic.com/r/1glsup/8 My code : Kies alstublieft het artikel dat u terug wilt sturen @foreach (var item in Model) { foreach (var product in item.products) { @Html.CheckBox("products") Beschrijving: @product.description Naam: @product.name Sku: @product.sku Aantal Retourreden Geef uw retourreden op Verkeerde keuze Artikel defect <p >Omschrijving van de reden: } }
score: 0
answer count: 2

http://stackoverflow.com/comment/46966915
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29394879
has text: This was just an example in the shell. In mongoose, you will of course need to add the `exec` function with the callback e.g. `db.user.find(query).exec(function (err, users){ ... });`

http://stackoverflow.com/comment/47251536
comment on: http://stackoverflow.com/a/29518107
type: AnswerComment
has text: @chillichief using your fiddle link the first time i ran it it did not work, but the second time i ran it it did. any idea why that might be? I should also point out that instead of copying a fresh url into the text box i simply clicked on the box and used a previously used url from the dropdown history in the box. This might have something to do with it.
score: 0
type: Comment

http://stackoverflow.com/comment/47185970
type: AnswerComment
has text: I should also note that, if I configure the Socket.IO server without namespaces, i.e., without the `.of('/a/b/c')` stuff, the following client code works as expected: `io.connect('' , {path: '/myapp/socket.io'})`.
score: 4
type: Comment
comment on: http://stackoverflow.com/a/29511764

http://stackoverflow.com/comment/47204031
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29524688
has text: @NicholasThomson agreed, not even to mention, that this is an IE6 issue...
score: 0

http://stackoverflow.com/q/29459744
tagged with: javascript
tagged with: wait
score: 0
tagged with: setinterval
has comment: http://stackoverflow.com/comment/47086890
has title: Casperjs: How to evaluate a page in intervals of x sec?
tagged with: casperjs
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47083565
type: Question
tagged with: phantomjs
has body: I want to load a page and then evaluate it multiple times in intervals of x sec. Here is two ways I've tried: First using JS setInterval: casper.on('remote.message', function(msg) { this.echo('remote message caught: ' + msg); }); casper.thenEvaluate(function() { window.x = 0; var intervalID = setInterval(function() { console.log("iter " + window.x); &lt;do some evaluation here&gt; if (++window.x === 5) { window.clearInterval(intervalID); } }, 10000); }); casper.each(list, function(self, i) { self.wait(10000, function() { last = i; this.echo('Using this.wait ' + i); }); }); casper.waitFor(function() { return last === list[list.length - 1] &amp;&amp; 5 === this.getGlobal('x'); }, function() { this.echo('All done.').exit(); }); casper.run(function() {}); Second using CasperJS wait: casper.start(link, function() { for(i = 1; i &lt; ITER; i++){ CurrentIter++; this.wait(WAIT_TO, function() { this.echo("I've waited for" + WAIT_TO + "ms."); this.then(function() { this.evaluate(&lt;some evaluation&gt;); }); }); } }); casper.run(); It seems that they should do the same job, but I get different results. Can any one give me some hints on this?
has comment: http://stackoverflow.com/comment/47086709

http://stackoverflow.com/comment/46965861
type: Comment
comment on: http://stackoverflow.com/a/29378630
score: 0
type: AnswerComment
has text: I understand but that is not allowing it to save it. Even JSON Lint considers it malformed json.

http://stackoverflow.com/q/29403883
downvote count: 0
has answer: http://stackoverflow.com/a/29443355
tagged with: javascript
type: AnsweredQuestion
score: 2
tagged with: gulp
favorite count: 0
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/29443355
tagged with: jsdoc
answer count: 1
tagged with: jsdoc3
has title: Setting up a basic Gulpfile to run JSDoc
has body: I am struggling to understand what is missing from my current gulpfile in order to make JSDoc happy. The code below does not cause any errors to be thrown, but looking at the index page of the documentation that is generated, it is clear my docs have not been formatted. What am I missing here? First, here is the function I want to document. /** * Returns the sum of a and b * @param {Number} a * @param {Number} b * @return {Number} Sum of a and b */ var sum = function(a, b){ return a + b; }; Next, here is my gulpfile.js var gulp = require('gulp'); var jsdoc = require('gulp-jsdoc'); gulp.task('js-doc', function(){ return gulp.src([ 'app.js' ]) .pipe(jsdoc.parser({}, 'test')) .pipe(jsdoc.generator('./docs')); }); Once I run gulp js-doc, it creates the docs/ directory and builds out the documentation. However, visiting the index.html page in the browser reveals that no documentation was actually generated. When I look at app.js.html, another file generated by JSDoc, I see my code block but nothing on it has been parsed and turned into actual documentation. See screenshot below. I think I'm missing some fundamental understanding of JSDoc or Gulp.
has comment: http://stackoverflow.com/comment/46988553

http://stackoverflow.com/q/29448473
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/31002103
has title: make simple jQuery image Slider with next, prev button
has comment: http://stackoverflow.com/comment/47063308
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/29448763
upvote count: 1
has body: Someone can help me add next and prev button for this slider. I found this code in blog,... Here, this code http://jsfiddle .net/dk5sy93d/
type: Question
tagged with: javascript
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/31002103
accepted answer: http://stackoverflow.com/a/29448763

http://stackoverflow.com/q/29410502
answer count: 4
has comment: http://stackoverflow.com/comment/46994283
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/29410723
type: Question
has answer: http://stackoverflow.com/a/74710619
score: 1
has title: custom keyboard shortcuts using javascript for web app
has answer: http://stackoverflow.com/a/29410723
has answer: http://stackoverflow.com/a/29410914
upvote count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
possible better answer: http://stackoverflow.com/a/29410914
has answer: http://stackoverflow.com/a/45655497
has body: I am learning java script. I want to use keyboard shortcuts for my web app. So i need to create custom keyboard shortcuts to my app in asp.net using java script. and i am not finding a proper way to do it. i want to do it using pure java script or j query. what is the best way to create your custom keys?? please help me out with this. It would be even more helpful if there is any fiddle or any ready code to understand how exactly it works.Also i might need this keys to create dynamic data and connect to database. what is the best way to create keys in java script that can also connects to database??

cors
type: Tag
tags question: http://stackoverflow.com/q/29491120
tags question: http://stackoverflow.com/q/29522370
tag name: cors
tags question: http://stackoverflow.com/q/29512646
tags question: http://stackoverflow.com/q/29428672
tags question: http://stackoverflow.com/q/29408491
tags question: http://stackoverflow.com/q/29499953
tags question: http://stackoverflow.com/q/29442008
tags question: http://stackoverflow.com/q/29458742
tags question: http://stackoverflow.com/q/29497437
tags question: http://stackoverflow.com/q/29525860

http://stackoverflow.com/q/29437487
has comment: http://stackoverflow.com/comment/47044739
answer count: 2
score: 2
has comment: http://stackoverflow.com/comment/47043828
downvote count: 0
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29437645
type: UnansweredQuestion
has body: I am struggling to figure out why this is not working, but I would like it so that the information from load.php is placed in the div sample but if that code is updated (say if i was pulling information from a database), only the information included in load.php would refresh - not the entire page. 100
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/37697255
has title: Ajax Automatic Div Update w/out page refresh won't work
has comment: http://stackoverflow.com/comment/47044258
upvote count: 2
type: Question
tagged with: refresh
tagged with: javascript

http://stackoverflow.com/comment/47059333
has text: i don't know jQuery very well but if u have a solution give me
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29445969
type: Comment

http://stackoverflow.com/comment/47033468
has text: Do you have to use `document.execCommand()`? Or could you go for a jQuery-only solution?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29430244
score: 0

http://stackoverflow.com/comment/110620500
type: Comment
comment on: http://stackoverflow.com/a/29413345
has text: @mohamedrias: i dig this topic, but i have the same issue. I tried to use timeout , but : it failt before the timeout and still have the error log message. The .fail() is triggered, so it's a 50% win.
type: AnswerComment
score: 0

http://stackoverflow.com/a/29449897
type: Answer
has body: Your code sample is incomplete, but this is what I think is happening: you are trying to call setAttribute on a NodeList, which is not a method of NodeList. // this is a node list, not a single node! var videoControls = document.querySelectorAll(".videoControls"); // convert nodelist to array var vcArray = Array.prototype.slice.call(videoControls); // iterate over controls and hide each one. vcArray.forEach(function(control){ control.style.display = "none"; });
answers question: http://stackoverflow.com/q/29449711
score: 0

http://stackoverflow.com/a/29389962
answers question: http://stackoverflow.com/q/29389089
score: 0
accepted answer of: http://stackoverflow.com/q/29389089
has comment: http://stackoverflow.com/comment/46966669
has comment: http://stackoverflow.com/comment/46964544
has comment: http://stackoverflow.com/comment/46967975
has comment: http://stackoverflow.com/comment/46966960
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46964033
type: Answer
has body: ngModel is intended for two way binding, i.e. controls that allow the user to interfere with the value. From the description, it seems they are display-only components. So I would advise against using the ngModel. Normally child directives require their parent. This allows them to call methods on the parent controller. What you need is the opposite: the parent controller needs to call methods on the children. It can be done: the children call a registerChild() method, and the parent iterates all registered children when it needs to call them. I find this implementation cumbersome. Services are globals/singletons. I would vote against tying the service implementation to the UI needs. My advice looks like your implementation of option 3, but with the parent controller holding the data: 1) Place the data you want to share with the child directives in a member variable of the parent controller: myApp.directive('parentDirective', ['myService', function(myService){ ... controller: function($scope) { ... this.sharedThing = ...; } }]); The sharedThing can be updated when the service returns new data, or any other time it is necessary. 2) Have the children require the parent (just like your option 2), and watch this property: myApp.directive('childDirectiveOne', function() { return { ... require: 'parentDirective', link: function(scope, elem, attrs, parentDirective) { scope.$watch( function() { return parentDirective.sharedThing; }, function(newval) { // do something with the new value; most probably // you want to place it in the scope } }); } }; }); Depending on the nature of the data, a deep watch may be required.

http://stackoverflow.com/comment/62757261
has text: Its totally fine to render your entire document with Reacts `renderToString`. There is a penalty on initial page load rendering, although it is very minimal. Considering you are most likely building a SP app, this is really a trivial issue as users only access the initial page build once.
comment on: http://stackoverflow.com/q/29396843
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/47095955
type: QuestionComment
comment on: http://stackoverflow.com/q/29466567
score: 0
has text: @mplungjan The expected is to put two buttons at same place so that if I click play the functionality or the animation should be done and the play button should be hidden, at the same time the pause button should be visible and vice versa. But now whenever I put two buttons at the same position the functionality is not working. It might be because of the two buttons are being clicked as they are in the same position.
type: Comment

http://stackoverflow.com/a/29431027
has comment: http://stackoverflow.com/comment/47031966
has comment: http://stackoverflow.com/comment/47031525
score: 0
has comment: http://stackoverflow.com/comment/47031667
type: Answer
has comment: http://stackoverflow.com/comment/47031602
answers question: http://stackoverflow.com/q/29430922
has comment: http://stackoverflow.com/comment/47031930
has body: With jQuery and Switch-case: window.scount = 0; function changeColor() { switch (window.scount) { case 0: timer('white') break case 1: timer('red') timer() break case 2: timer('green') break default: console.log('end') break } } function timer(color) { $('#clear').css('background-color', color) setTimeout(changeColor, 1000); window.scount = window.scount + 1; } timer(black);

http://stackoverflow.com/q/29465492
has comment: http://stackoverflow.com/comment/47094842
has title: decode to accept special characters
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I have the following js function: $(function() { $(".search").keyup(function() { var searchid = $(this).val(); var dataString = 'search=' + searchid; if (searchid != '') { $.ajax({ type: "POST", url: "search.php", data: dataString, cache: false, success: function(html) { $("#result").html(html).show(); } }); } return false; }); jQuery("#result").live("click", function(e) { var $clicked = $(e.target); var $name = $clicked.find('.name').html(); var decoded = encodeURIComponent($("&lt;div/&gt;").html($name).text()); window.open('searchPage.php?user_query=' + decoded, '_self', false); $('#searchid').val(decoded); }); jQuery(document).live("click", function(e) { var $clicked = $(e.target); if (!$clicked.hasClass("search")) { var $name = $clicked.find('.name').html(); } }); $('#searchid').click(function() { jQuery("#result").fadeIn(); }); }); At its current state it does not accept special characters. In the sense that its a search suggestion where when a user click on a item suggested it takes them to that search result. This work fines with regular characters but as soon as a special character such as apostrophe, a slash or any special character is thrown in it doesn't work anymore. this is the area where the decoding is done: var $clicked = $(e.target); var $name = $clicked.find('.name').html(); var decoded = encodeURIComponent($("&lt;div/&gt;").html($name).text());
tagged with: regex
has comment: http://stackoverflow.com/comment/47095596
answer count: 0
type: UnansweredQuestion
type: Question
tagged with: decode

http://stackoverflow.com/comment/46998063
has text: Yes, I can take the row from one table and display in another, I want only three columns from first row to be displayed in the second table. Like take the text and the next two columns.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29412492

http://stackoverflow.com/a/29472971
upvote count: 1
score: 1
has body: I've made a Fiddle with your working scenario, you had an issue with the this functionality as well, except the ^demoChild which you said was a typo. Once inside your function, the this was pointing to the scope, and not the controller as you expected, so this section should be amended: controller: function($scope) { this.openTarget = false; var _ctrl = this; $scope.toggleTarget = function() { _ctrl.openTarget = !_ctrl.openTarget; }; }
accepted answer of: http://stackoverflow.com/q/29472641
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47107267
answers question: http://stackoverflow.com/q/29472641
has comment: http://stackoverflow.com/comment/47107207
type: Answer

http://stackoverflow.com/a/41115315
downvote count: 1
answers question: http://stackoverflow.com/q/29387950
has body: Its Due To SCOPE in JavaScript In Browser console code without scope : Takes lots of time : Test: 1154.19ms below code will be kept in heavily populated window object which will take time to resolve; console.time("Test"); for(var i=0; i &lt;2500000; i +=1 ){ // loop around } console.timeEnd("Test"); In Browser console code with scope : Takes less time Test: 3.06ms below code will be kept inside JavaScript scope and scope will be almost empty so less time function rocket(){ console.time("Test"); for(var i=0; i &lt;2500000; i +=1 ){ // loop around } console.timeEnd("Test"); } rocket() In Nodejs REPL : code without scope : Test: 14ms Unexpected But nodejs most outer scope contains some bunch of variables console.time("Test"); for(var i=0; i &lt;2500000; i +=1 ){ // loop around } console.timeEnd("Test"); In Nodejs REPL : code with scope : Test: 2ms below code will be kept inside JavaScript scope and scope will be almost empty so less time function rocket(){ console.time("Test"); for(var i=0; i &lt;2500000; i +=1 ){ // loop around } console.timeEnd("Test"); } rocket() Conclusion : Its all due to SCOPE and SCOPING in JavaScript is done by functions Means if you create new function ,the place inside curly brackets {} is called as SCOPE and it will be empty initially, and if you create variable in this scope it will take no time to execute
type: Answer
score: 6
upvote count: 7

http://stackoverflow.com/comment/46966768
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29395075
type: Comment
has text: Thanks, IvanJ, works perfectly! I just accepted the other answer because the formatting was more consistent - figure that will be better for future reference. Wish I could up-vote you, but don't have enough rep.

http://stackoverflow.com/comment/47164752
comment on: http://stackoverflow.com/a/29503170
score: 0
type: AnswerComment
type: Comment
has text: Are you sure you've got a valid key? And also that you're not actually inserting # into the start of your key?

http://stackoverflow.com/q/29462326
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47088266
type: Question
has comment: http://stackoverflow.com/comment/47088800
tagged with: javascript
has answer: http://stackoverflow.com/a/29462365
accepted answer: http://stackoverflow.com/a/29462365
has answer: http://stackoverflow.com/a/29462702
has comment: http://stackoverflow.com/comment/47088768
has title: Wildcard date form in JavaScript
answer count: 2
upvote count: 1
has body: I want to check if string satisfies condition (First, second, fourth, fifth, seventh, eighth, ninth and tenth character can be any number. Third and sixth must be forward slash.) Like date format. I need this: if (date !== SOMETHING ){ alert("Wrong input!");}
tagged with: wildcard
favorite count: 0
has comment: http://stackoverflow.com/comment/47088298
possible better answer: http://stackoverflow.com/a/29462702

http://stackoverflow.com/comment/46977804
score: 0
comment on: http://stackoverflow.com/q/29400963
type: QuestionComment
type: Comment
has text: There is a similar question answered at http://stackoverflow.com/questions/2608913/how-can-i-write-reusable-javascript that should be helpful.

http://stackoverflow.com/comment/47196806
score: 0
comment on: http://stackoverflow.com/a/29502846
type: Comment
has text: You're right. The remove button needs to also make this call to`inputChanged()`. It should look like this ` Remove `. Updated the Plunkr
type: AnswerComment

hoisting
tag name: hoisting
tags question: http://stackoverflow.com/q/29442167
type: Tag

http://stackoverflow.com/comment/47095647
comment on: http://stackoverflow.com/q/29466567
score: 0
type: Comment
type: QuestionComment
has text: Did you remove the inline code? Did you include the jQuery library? Are there any errors in the console?

http://stackoverflow.com/comment/47191130
type: AnswerComment
score: 0
type: Comment
has text: I'll give that a shot. Thanks. I'll let you know how this goes.
comment on: http://stackoverflow.com/a/29517863

http://stackoverflow.com/q/29387084
type: Question
linked to: http://stackoverflow.com/q/1041399
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
tagged with: image
has body: So I want to get the average color of the outer pixels in an image, to give the background of the div the image is shown in, the same color. So I won't have to make all images the background color myself. Example: if the image is 100px x 100px, you check the 5 outer pixels at the top of the image, 5 outer pixels of the right side of the image, same for left and bottom. You will get 5 x 100 x 4 pixels, get the colors, check the average and let JS give the div the same background. So if the average color is #000000, the div BG will be #000000. If average is #FAFAFA, the div BG will be #FAFAFA
has comment: http://stackoverflow.com/comment/46952396
answer count: 1
has answer: http://stackoverflow.com/a/29387694
favorite count: 0
has title: Get average outer pixel color of image
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29387694
downvote count: 1

http://stackoverflow.com/a/29479299
type: Answer
accepted answer of: http://stackoverflow.com/q/29423668
has body: I was finally able to solve the problem. Description of the approach used. Upon clicking the button to submit the form, call the validation function in the Managed Bean and use a RequestContext object to add a callback parameter (with the result of the validation) to the front end. Then use handleComplete(xhr, status, args) function to check on the return value of the server validation. From JavaScript call a hidden commandLink to submit the report if the validation passed then run the report and DONE!!!!! I will try to make my question simpler for next time. Feel free to ask questions about my solution if it is not clear to you. CHANGES AS BELOW: FILE: report_input.xhmtl Beginning of the file ... &lt;h:panelGrid id="submitButton" columns="3" columnClasses="col-top-adhoc"&gt; &lt;h:outputLabel&gt;&lt;/h:outputLabel&gt; &lt;p:commandButton icon="ui-icon-check" action="#{deficiencyBean.validate}" update="msgs" value="Run Report" oncomplete="handleComplete(xhr, status, args)" /&gt; &lt;h:commandLink action="#{deficiencyBean.runReport}" id="runReportLink" target="_blank" value="Run Report" style="display: none;"&gt; &lt;/h:commandLink&gt; &lt;/h:panelGrid&gt; &lt;/p:panel&gt; &lt;/h:form&gt; &lt;script&gt; function handleComplete(xhr,status,args){ var valid = args.isValid; if(valid == true){ document.getElementById('pieForm:runReportLink').click(); } } &lt;/script&gt; FILE: ReportBean.java public void validate(){ //SOME LOGIC RequestContext reqContext = RequestContext.getCurrentInstance(); reqContext.addCallbackParam("isValid", validInput); } public void runReport(){ //JASPER REPORTS COMPILE, FILL REPORT and DISPLAY } }//END OF CLASS
score: 2
answers question: http://stackoverflow.com/q/29423668
downvote count: 0
type: AcceptedAnswer
upvote count: 2

http://stackoverflow.com/q/29511167
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have a html page, where I am dynamically displaying the list of properties. Next, I count the number of properties displayed in each div. &lt;script type="text/javascript"&gt; var numItems = $('.countdiv').length; &lt;/script&gt; countdiv is the name of class for each property. Now in my html page I have a variable properties_count having the count of total properties fetched from my database. I want to compare numItems and properties_count in if statement, like this: {% if(numItems!=properties_count) %} # some function to load more properties But the comparison doesn't work. How do I use numItems(javascript variable) in html?
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29512909
tagged with: python
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47179216
has comment: http://stackoverflow.com/comment/47179330
tagged with: jinja2
type: Question
has comment: http://stackoverflow.com/comment/47246299
has comment: http://stackoverflow.com/comment/47198787
tagged with: javascript
tagged with: jquery
has title: use javascript variable in html under if statement

http://stackoverflow.com/a/29518900
type: Answer
upvote count: 0
has body: Have you tried to use 'npm start' in your base directory? I haven't put Ampersand.js into an HTML file, but it seems to work with pure Javascript.
downvote count: 2
score: -2
answers question: http://stackoverflow.com/q/29468830

http://stackoverflow.com/comment/47072945
comment on: http://stackoverflow.com/a/29452823
type: AnswerComment
type: Comment
has text: Is there certain server info that I can relay to you via cPanel?
score: 0

http://stackoverflow.com/q/29434409
has comment: http://stackoverflow.com/comment/47038130
has comment: http://stackoverflow.com/comment/47038374
score: 3
has body: Here is a small JavaScript. I'm getting unexpected results from the function. 020*2 gives 32 instead of 40. Does anybody know how to fix this?? function myFunction(a, b) { return a * b; } document.write('04 * 03 = '); document.write(myFunction(04, 03)); //Result 12, correct document.write(' &lt;&lt; Correct &lt;br/&gt;020 * 02 = '); document.write(myFunction(020, 02)); //Result 32, wrong - expected result 40 document.write(' &lt;&lt; Expected 40 here');
duplicate of: http://stackoverflow.com/q/8763396
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/47038138
downvote count: 0
has answer: http://stackoverflow.com/a/29434513
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29434477
has title: Function passing parameters
upvote count: 3
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/12888075

http://stackoverflow.com/comment/47039443
score: 0
has text: Can include sample response returned from `http://mywebsite.com/assets/ajax/get_bar.php` ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29435025

http://stackoverflow.com/comment/47120731
type: AnswerComment
comment on: http://stackoverflow.com/a/29479918
type: Comment
has text: I have added the forms submit event to the answer
score: 0

modal-dialog
tag name: modal-dialog
tags question: http://stackoverflow.com/q/29396635
tags question: http://stackoverflow.com/q/29496222
type: Tag
tags question: http://stackoverflow.com/q/29379842
tags question: http://stackoverflow.com/q/29417622
tags question: http://stackoverflow.com/q/29473519
tags question: http://stackoverflow.com/q/29458065

http://stackoverflow.com/a/29456480
answers question: http://stackoverflow.com/q/29454860
score: 2
upvote count: 2
downvote count: 0
has body: You need to hook into the onActivated event if you want to get notified of tab changes. However, that would not be enough, since the page action will reset on navigation. So you'll need to hook into almost every tabs API event to ensure your logic. Also, think of the cleanup required afterwards. That really does seem like a poor job for a page action. There is also an important consideration that this UI element is not associated, by a typical user, with something that needs attention. Have you considered using notifications instead? You could use chrome.notifications Rich Notifications together with the priority trick, or just web notifications. In either case it'll be something displayed to the user in a way that is appropriate for "something needs your attention". You can then hook into its onclick event. If you do want a button, browserAction is totally appropriate. You can dynamically change picture, add a text badge to the icon to attract attention, or just plain disable the button (not hide, but grey out) when there's nothing to do.
type: Answer

http://stackoverflow.com/comment/47165684
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29504035
has text: `str_row_array` is an array, you can iterate over it, exactly the same way you iterate over `str_array`. `arr_0` --- is a silly idea from the beginning, use arrays instead `arr[0]`
score: 0

http://stackoverflow.com/q/29407550
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to layout a grid of div's (they contain image and text) of varying size. I'd like them to flow from left to right but for the lower ones to come in tight below the higher items. I'm having a hard time describing this to I've included a drawing of what I'd like to achieve, the numbers represent the order of the divs. I've seen this in use and it appears all the divs are placed using absolute positioning. Does anyone know how this layout can be achieved? I'm attempting to build a site that will work on web/tab/phone so the solution should be able to work across all platforms.
tagged with: css
has answer: http://stackoverflow.com/a/29430441
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46991822
type: Question
has comment: http://stackoverflow.com/comment/46989406
score: 0
has comment: http://stackoverflow.com/comment/46989834
has comment: http://stackoverflow.com/comment/46990543
has comment: http://stackoverflow.com/comment/46989288
has comment: http://stackoverflow.com/comment/46989592
answer count: 1
tagged with: javascript
has title: Laying out many divs horizontally but for lower rows to fill in tight below first row

http://stackoverflow.com/comment/47276747
type: QuestionComment
score: 0
has text: I think there is a missunderstanding ;) ... case 2 AND 3 works not as expected. Case 2: the h dont dissapear when i click in my modal area it stays when i click in the form somewhere it works. Case 3: When type a word that is in the autocomplete box and click in the modal area the word stays and give me the string in my converter NOT the same as case1. When i choose something directly in my box.
comment on: http://stackoverflow.com/q/29474817
type: Comment

http://stackoverflow.com/comment/46976167
comment on: http://stackoverflow.com/q/29400046
score: 0
has text: Are you running the html/js in the eclipse browser? I assume it doesn't have support for console.log
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29477726
accepted answer: http://stackoverflow.com/a/29478425
tagged with: javascript
has comment: http://stackoverflow.com/comment/47116801
downvote count: 0
answer count: 1
score: 1
tagged with: jquery
favorite count: 0
has title: Can't append html element jquery
has comment: http://stackoverflow.com/comment/47116343
has comment: http://stackoverflow.com/comment/47116209
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to get jquery to append text to a div element. I was trying to follow this link http://api.jquery.com/append/ but it's not working for me, All I see is Hello, but the words test do not get appended. Here is the html: Hello Here is the test.js, it resides in the same directory as test.html. $(document).ready(function() { $('.inner').append(" Test "); }); And here is the node server that serves the html page. const fs = require("fs"); const http = require('http'); var page = fs.readFileSync('test.html'); http.createServer(function(req, res) { if(req.method == 'GET' || req.url == '/') { res.writeHead(200, "OK", {'Content-Type': 'text/html'}); res.write(page); res.end(); } }).listen(80);
has answer: http://stackoverflow.com/a/29478425
has comment: http://stackoverflow.com/comment/47116167
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47116653
upvote count: 1
has comment: http://stackoverflow.com/comment/47116545
type: Question
has comment: http://stackoverflow.com/comment/47116597
has comment: http://stackoverflow.com/comment/47116556

http://stackoverflow.com/a/29457167
answers question: http://stackoverflow.com/q/29456408
accepted answer of: http://stackoverflow.com/q/29456408
score: 0
type: AcceptedAnswer
has body: You need some sort of loop to go through the data. I Would suggest a FOR loop. Your script is currently written to get one single cell value, rather than all the values. So it might be an idea to get all values in one go, then check whats in them. Also from you question, it's not clear where the numbers will be found. Only in column B? Here is a quick example (untested), that goes through column B looking for a number and it should insert the link in the cell below based on that number. This code is based on your original example and untested but hopefully it helps. function numbtoimage() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; var url = 'IMAGE("https://dl.dropboxusercontent.com/s/bpqy8o796casqjl/belt.JPG?dl=0", 2)'; var url2 = 'IMAGE("https://dl.dropboxusercontent.com/s/4q8sakhkpot0h65/belt2.JPG?dl=0",2)'; var url3 = 'IMAGE("https://dl.dropboxusercontent.com/s/kvsf4z6z45rcg53/belt3.JPG?dl=0",2)'; var values = sheet.getValues(); for(i=0; i &lt; values.lenth ; i++){ if(values[i][1]==1) {sheet.getRange(i+2, 2).setFormula(url);} else if(values[i][1]==2) {sheet.getRange(i+2, 2).setFormula(url2);} else if(values[i][1]==3) {sheet.getRange(i+2, 2).setFormula(url3);} } }
type: Answer

http://stackoverflow.com/comment/46935665
has text: Also try putting quotes around authenticate and initialize in JSON.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29377519
score: 0

http://stackoverflow.com/comment/47105233
score: 0
type: AnswerComment
has text: I don't think this works at all. The `returnObj` should be the data going back to the controller. This doesn't happen in your example.
type: Comment
comment on: http://stackoverflow.com/a/29471829

http://stackoverflow.com/comment/47078729
has text: Yes it should be wrap into the document ready part. But if you use the script part at the end, then you don't need to use the document ready part.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29456729

http://stackoverflow.com/a/41191281
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29383717
has body: You can achieve this by using plugin and below is the code. To download js and css file please Click Here Image is attached Option 1.1 Option 1.2 Option 1.3 Option 2.1 Option 2.2 Option 2.3
type: Answer
upvote count: 1

http://stackoverflow.com/q/29463009
tagged with: ionic-framework
type: Question
tagged with: javascript
has body: I am making an app and I want to password protect it from people without the password. Essentially, I want a modal to show if the password was not ever entered, and for it not to show if it ever were entered. Can you all help me? Here is my code: .controller('AppCtrl',function($scope, $ionicModal){ $scope.password = { name: 'Mittens Cat' } $ionicModal.fromTemplateUrl('templates/modal.html', { scope: $scope, animation: 'slide-in-up' }).then(function(modal) { $scope.modal = modal }) $scope.openModal = function() { $scope.modal.show() } $scope.closeModal = function(password) { if (angular.copy(password) == "password") { $scope.modal.hide(); } }; $scope.$on('$destroy', function() { $scope.modal.remove(); }); }) .controller('LoginCtrl', function($scope) { $scope.update = function(password) { $scope.master = angular.copy(password); }; }) Enter Password Password Done
has title: Password Protect App in Ionic/Angular
score: 0
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47092709
has comment: http://stackoverflow.com/comment/75171764
has comment: http://stackoverflow.com/comment/47089613

http://stackoverflow.com/comment/47173192
comment on: http://stackoverflow.com/q/29506445
type: Comment
type: QuestionComment
has text: which kind of error do you faced
score: 0

http://stackoverflow.com/comment/47225747
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29516635
has text: Try to use this: http://jsfiddle.net/s4qxtc8m/1/

http://stackoverflow.com/comment/46989901
score: 0
has text: Just as a closing note, I would suggest you accept this answer by dragonslovetacos as, in my opinion, it is a really clear and concise example of what you were initially asking.
type: AnswerComment
comment on: http://stackoverflow.com/a/29398921
type: Comment

http://stackoverflow.com/comment/47107524
type: QuestionComment
comment on: http://stackoverflow.com/q/29473159
score: 3
has text: You already know how to increase by a random number, so it seems unlikely that you don't know how to do the same but decrease instead. What problems did you have when you tried it?
type: Comment

http://stackoverflow.com/q/29449793
tagged with: http://stackoverflow.com/tag/html
has body: I am having trouble with the delta/ elapsed time. When the window is blurred the loop pauses correctly. If you wait a few seconds and click back onto the window (focus), the elapsed time starts at a higher number and then resets back to 0. How do I stop the elapsed time from increasing when the window is blurred? This higher number affects my animation and makes it run too fast until the delta is correct again. I have setup an example loop. You can see what I mean in the console: Example if (window.requestAnimationFrame !== undefined) { window.requestAnimFrame = (function () { 'use strict'; return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) { window.setTimeout(callback, 1000 / 60); //Should be 60 FPS }; }()); } (function () { 'use strict'; var elapsed, isPaused = false, lastTime = 0, loop, setElapsed, startTime = 0, update; //Set the elapsed time setElapsed = function () { startTime = Date.now(); elapsed = startTime - lastTime; //Calculate the elapsed time since the last frame. Dividing by 1000 turns it to seconds lastTime = startTime; }; update = function () { //Update the animation etc. console.log('animation'); }; loop = function () { setElapsed(); update(elapsed); console.log('elapsed: ' + elapsed); requestAnimFrame(function () { if (isPaused === false) { loop(); } }); //Re-loop constantly using callback window.setTimeout(callback, 1000 / 60); //Should be 60 FPS }; //When the window blurs, pause it window.onblur = function () { isPaused = true; //Pause the game }; //When the window is in focus, resume it window.onfocus = function () { isPaused = false; loop(); //Re-init the game }; loop(); }()); Thanks
has answer: http://stackoverflow.com/a/29450195
has title: HTML5 Canvas - Elapsed Time when Pausing
tagged with: loops
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29450195
type: Question
tagged with: elapsed
tagged with: canvas
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/68517821
score: 0
type: Comment
has text: Perfect Bravo!!
comment on: http://stackoverflow.com/a/36625204
type: AnswerComment

http://stackoverflow.com/comment/47058144
comment on: http://stackoverflow.com/q/29445467
has text: `How can i call my directive module in other controller ?` No you can't call a directive inside controller. Directive names must follow camelCase and so it must be `albumlikeFeature` and while calling it must be `albumlike-feature`
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29459331
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47083373
tagged with: reminders
has comment: http://stackoverflow.com/comment/47082689
has comment: http://stackoverflow.com/comment/47083319
type: Question
has title: Changing JavaScript content with JavaScript
has comment: http://stackoverflow.com/comment/47083015
accepted answer: http://stackoverflow.com/a/29459714
linked to: http://stackoverflow.com/q/12964262
has comment: http://stackoverflow.com/comment/47082619
has comment: http://stackoverflow.com/comment/47083673
score: 0
tagged with: function
answer count: 1
has answer: http://stackoverflow.com/a/29459714
has comment: http://stackoverflow.com/comment/47083123
tagged with: javascript
has body: I'm trying to make reminder. In HTML i'd have 2 text boxes (one for date and other for something like "Today is your grandmothers birthday!") and one button that executes the function. So when user enters date and text, and clicks button, in JavaScript function is created that will display "Today is your grandmothers birthday!" in some paragraph, when that day comes. I know how to make function reminder ()that will display "Today is your grandmothers birthday!" on given date, but i don't know how to make function that will add my reminder() function to my JavaScript document. Is that even possible ?
has comment: http://stackoverflow.com/comment/47082735

http://stackoverflow.com/comment/46956033
comment on: http://stackoverflow.com/a/29383790
type: Comment
has text: it converts string into executable JavaScript. it is a possible breaking point for attack. More in the link: http://jslinterrors.com/eval-is-evil
score: 0
type: AnswerComment

http://stackoverflow.com/a/29556865
answers question: http://stackoverflow.com/q/29388755
type: Answer
has body: Actually in the example you have given you are scrolling through divs. Each div contains a table, but that's beside the point. I would say you need one content div, and play with its margins in javascript according to current scroll position. Just make sure the total width remains the same. This would ensure the standard scrollbar is shown correctly and doesn't "jump", while the content can be adjusted to its position. In the example you provided, BTW, they use 3 divs with partial content - only the div or divs in display have content, and perhaps partial content (only some content on its bottom or top, enough to fill the displayed area). Anyway, the key here is to maintain a scrollable element large enough for the scrollbar to maintain its size and position, or to use a custom scrollbar written completely in javascript.
score: 0

http://stackoverflow.com/a/29512814
upvote count: 15
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29444803
answers question: http://stackoverflow.com/q/29444803
has body: Which Google Maps do you use, google.com/map, or google.cn/map? Satellite or street view? In all cases, the answer is no - coordinates won't correspond to the Baidu Map POI, but for slightly different reasons. First off, since Baidu doesn't offer any useful maps outside of China, let's focus on the question being, Does a Google Maps coordinate within China, map to the same location in Baidu Maps? The answer is no. Baidu Maps uses its own BD-09 coordinate system, while Google Maps uses either the Chinese GCJ-02 standard (for street maps on either google.com/maps or .cn), or WGS-84 for satellite imagery on google.com satellite view maps. GPS coordinates (WGS-84) and Google Street Map coordinates (GCJ-02) do not map to the same location on Baidu Maps, as this snippet demonstrates (I didn't include the snippet in the answer because it doesn't work due to the way SO includes scripts - but you can see the code in this other answer I gave). Using a linear correction around Shanghai might work, but the values will change for other regions in China. How to compensate for the offset The official method for converting Google coordinates to Baidu Map coordinates is to use the Baidu Map API for doing so. There are two versions of the API: An allegedly "server" version documented at http://developer.baidu.com/map/changeposition.htm that requires obtaining an application key A version at http://api.map.baidu.com/ag/coord/convert that's used by the Baidu Map coordinates conversion demo via http://developer.baidu.com/map/jsdemo/demo/convertor.js and doesn't need an application key. Let's take the Google Street Map (GCJ-02) coordinates of The People's Heroes Monument in Shanghai and convert them to Baidu Maps coordinates: curl "http://api.map.baidu.com/ag/coord/convert?from=2&amp;to=4&amp;x=121.4914&amp;y=31.2423" will output {"error":0,"x":"MTIxLjQ5Nzk5OTg3MzM4","y":"MzEuMjQ3OTc1ODQwMTk2"} The coordinates are base64-encoded, and decode to 121.49799987338, 31.247975840196 If map.baid…
type: Answer
has comment: http://stackoverflow.com/comment/76498773
score: 15
has comment: http://stackoverflow.com/comment/78710864

http://stackoverflow.com/comment/47097648
comment on: http://stackoverflow.com/q/29467713
type: Comment
type: QuestionComment
has text: isn't that should be other way round?
score: 0

http://stackoverflow.com/comment/46951894
type: AnswerComment
has text: @Quentin: I added a regex solution, too.
comment on: http://stackoverflow.com/a/29386560
type: Comment
score: 0

tabs
type: Tag
tags question: http://stackoverflow.com/q/29411733
tags question: http://stackoverflow.com/q/29398863
tags question: http://stackoverflow.com/q/29491079
tags question: http://stackoverflow.com/q/29392166
tag name: tabs

http://stackoverflow.com/q/29454986
has body: say I have this div in a ng-repeat clause: &lt;div ng-repeat="item in list" class="myDiv" ng-click="doStuff(item)"&gt; {{item.title}} &lt;/div&gt; And it's based on this model: $scope.list = [ { 'title': 'Item 1', 'someData': 'lalala' }, { 'title': 'Item 2', 'someData': '666' }, { 'title': 'Item 3', 'someData': 'qwerty' } ]; Then I would end up getting 3 repeated divs. Now I have an external script analyzing the page and I want to extract the data of the elements. So for example if I select the first div var div1 = $('div.myDiv:first') I can get the attributes ng-click and ng-repeat from it. I can also use angular.element(div1).data('$binding') to get the binding {{item.title}}. But what I really want is the individual item data of this particular div: i.e. I want to write a function getItemData(element) that will get div1 and return { 'title': 'Item 1', 'someData': 'lalala' }. How can this be done? Please note that I need a solution that would work both with repeater binding and with regular binding. I basically need to know the actual data that is bound to each element.
answer count: 1
has title: Get binding value of element in angular
score: 7
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29455030
has comment: http://stackoverflow.com/comment/47075078
type: AnsweredQuestion
upvote count: 7
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/29455030
tagged with: javascript

http://stackoverflow.com/a/29529690
has comment: http://stackoverflow.com/comment/47214050
has comment: http://stackoverflow.com/comment/47213844
score: 0
has comment: http://stackoverflow.com/comment/47213314
has body: If you want to validate in real time you can bind a handler to the keyup event of the input like $('#domain_name').on('keyup', function(){ if(!validateDomain($(this).val())){ $('.rez').text('invalid domain') }else{ $('.rez').text('valid domain') } }); Also put return true; at the end of your function so a successful validation will return true function validateDomain(the_domain) { // strip off "http://" and/or "www." the_domain = the_domain.replace("http://",""); the_domain = the_domain.replace("www.",""); var reg = /^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}$/; return reg.test(the_domain); } // end validateDomain() Would be my suggestion. Snippet: $('#domain_name').on('keyup', function() { if (!validateDomain($(this).val())) { $('.rez').text('invalid domain') } else { $('.rez').text('valid domain') } }); function validateDomain(the_domain) { // strip off "http://" and/or "www." the_domain = the_domain.replace("http://", ""); the_domain = the_domain.replace("www.", ""); var reg = /^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}$/; return reg.test(the_domain); } // end validateDomain() &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt; &lt;form name="domainForm" action=""&gt; http://&lt;input type="text" size="10" name="domain_name" id="domain_name"&gt; &lt;p class="rez"&gt;&lt;/p&gt; &lt;/form&gt;
has comment: http://stackoverflow.com/comment/47213583
has comment: http://stackoverflow.com/comment/47213561
type: Answer
answers question: http://stackoverflow.com/q/29529629
has comment: http://stackoverflow.com/comment/47213623

http://stackoverflow.com/a/29396539
has body: Create a delay function which returns a Promise and it actually resolves it after the specified time elapses in setTimeout, like this function delay(time) { return new RSVP.Promise(function (resolve) { setTimeout(resolve, time); }); } and then you can invoke it like this console.log("step 1"); delay(3000) .then(function () { console.log("step 2"); return delay(1000); }) .then(function () { console.log("step 3"); });
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/29396079
upvote count: 3
answers question: http://stackoverflow.com/q/29396079

http://stackoverflow.com/a/29507873
has comment: http://stackoverflow.com/comment/47173883
has comment: http://stackoverflow.com/comment/47220618
has comment: http://stackoverflow.com/comment/47174586
has body: i think what u need is different control events OnKeyDown event as soon as button is tapped for this u need UIControlEventTouchDown event and for onKeyup u need UIControlEventTouchUpInside by using these two events for button u can get what u want for example - (void)viewDidLoad { [super viewDidLoad]; UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; [button setFrame:CGRectMake(0, 100, 150, 100)]; [button setTitle:@"Touch" forState:UIControlStateNormal]; [button addTarget:self action:@selector(onKeyupEvent:) forControlEvents:UIControlEventTouchUpInside]; [button addTarget:self action:@selector(onKeyDownEvent:) forControlEvents:UIControlEventTouchDown]; [self.view addSubview:button]; } - (void)onKeyupEvent:(id)sender { NSLog(@"key up event"); } - (void)onKeyDownEvent:(id)sender { NSLog(@"key down event"); }
accepted answer of: http://stackoverflow.com/q/29507011
answers question: http://stackoverflow.com/q/29507011
has comment: http://stackoverflow.com/comment/47174227
type: AcceptedAnswer
type: Answer
score: 0

http://stackoverflow.com/a/29435282
answers question: http://stackoverflow.com/q/29434991
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47045832
downvote count: 0
has body: This kind of error usually stems from not return-ing your send functions and then something later in the execution also sends data. To mitigate this you should always return sends. return socket.send(JSON.stringify(message)); This will ensure that multiple headers aren't set.

http://stackoverflow.com/comment/47166044
comment on: http://stackoverflow.com/q/29502965
score: 0
type: Comment
has text: Are you trying to resolve "personsObserved[0][name]"? Because that's just a string you made, pretty sure that won't be executed. You might as well just do 'person' + $index().
type: QuestionComment

http://stackoverflow.com/q/29377925
answer count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/29422063
tagged with: firebase
has title: Firebase push doesn't add but replace (JavaScript)
has body: I'm having following code to add remarks ('opm') to a person ('leerling'). function onFormSubmitted() { event.preventDefault(); var ref = new Firebase("https://mydatabase.firebaseio.com/"); var _leerling = document.getElementById("Leerling").value; var _opmerking = document.getElementById("Opmerking").value; var postsRef = ref.child("opmerkingen"); var newPostRef = postsRef.push({ leerling: _leerling, opmerking: _opmerking }); var postID = newPostRef.key(); var leerlingRef = ref.child("leerling").child(_leerling); leerlingRef.once('value', function(snapshot) { if( snapshot.val() === null ) { /* does not exist */ var leerlingNummer = _leerling.substring(0,6).trim(); ref.child("leerling").child(leerlingNummer).set({ "naam": _leerling.substring(7,33).trim(), "klas": _leerling.substring(34,38) }) ref.child("leerling").child(leerlingNummer).child("opmerkingen").push({ "opmID": postID }) } else { var leerlingPostRef = snapshot.ref().child("opmerkingen)"); leerlingPostRef.push({"opmID": postID}); } }); } At the beginning of the code postsRef.push ADDS a remark to the opmerkingen child (in the root), as intended. At the end of the code I do the same as far as I am aware (leerlingPostRef.push) for the opmerkingen child of the leerling, but there the whole opmerkingen child get REPLACED, deleting the existing opm: postID instead of adding one. What is wrong and how to solve?
has comment: http://stackoverflow.com/comment/46936358
has comment: http://stackoverflow.com/comment/46936718
has comment: http://stackoverflow.com/comment/46937692
tagged with: javascript
has answer: http://stackoverflow.com/a/29422063
has comment: http://stackoverflow.com/comment/46936073
has comment: http://stackoverflow.com/comment/46984496
has comment: http://stackoverflow.com/comment/46936130
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/29377999
has answer: http://stackoverflow.com/a/29377999
favorite count: 0
type: Question

http://stackoverflow.com/comment/47169696
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74680/discussion-between-mahendrakawde-and-luschn).
type: Comment
comment on: http://stackoverflow.com/a/29490886
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47143250
type: QuestionComment
has text: I have this webpage: http://www.uta.fi/sis/tauchi/publications.html with the links. I can get the publication data of 2015. But I don't know how to get the other years. Link changes like this for different years: http://www.uta.fi/sis/tauchi/publications.html?year=2014
comment on: http://stackoverflow.com/q/29491954
score: 0
type: Comment

http://stackoverflow.com/comment/47026875
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29427948
has text: HTML - http://pastebin.com/MEKkCRj9
score: 0

http://stackoverflow.com/comment/46967188
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29383105
has text: @Md.SahadatHossain By client side would be the best option. But I use PHP to check if the email and user already exists in the database. I would have to mix the validations with JavaScript and PHP, I think for that I should use AJAX, but do not know how.
type: Comment

http://stackoverflow.com/a/29405933
has comment: http://stackoverflow.com/comment/46986697
has comment: http://stackoverflow.com/comment/46986580
type: Answer
answers question: http://stackoverflow.com/q/29405752
score: 1
has comment: http://stackoverflow.com/comment/46996585
upvote count: 1
has comment: http://stackoverflow.com/comment/46986614
has body: You are calling getElementById too early, delay it until the load event occurs or put it in a different script element below the one calling document.write. The following works fine for me: document.write('Hello World'); document.write('&lt;script src="http://d2hzts1b0z7hqh.cloudfront.net/arb.js"&gt;&lt;\/script&gt;'); document.write('&lt;iframe id="mytestframe"&gt;&lt;\/iframe&gt;'); document.close(); // Delay looking for iframe until page is loaded window.onload = function() { var frame = document.getElementById("mytestframe"); console.log(frame); }; Note that you need to quote the "/" in all closing tags within script elements, so &lt;\/ on all of them (e.g. &lt;\/iframe&gt;), not just &lt;\/script&gt;.
accepted answer of: http://stackoverflow.com/q/29405752
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29483918
has body: You are already tracking the amount of duplicates made, so add if (i === 2) { document.getElementById('button').disabled = true; } to your duplicate() function to disable the button after 2 clicks JSfiddle also watch your spelling! you have onlick="duplicate()" instead of onclick=duplicate() in addition to various mispellings of duplicator
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/47148586
accepted answer of: http://stackoverflow.com/q/29483794
answers question: http://stackoverflow.com/q/29483794
has comment: http://stackoverflow.com/comment/47128128

http://stackoverflow.com/a/29508527
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29508317
upvote count: 1
score: 1
has body: Calculate the diffference in milliseconds from two dates (including the first day of the start year and the last day of the end year) and divide the result by 3600000 (1000 * 60 * 60 = milliseconds in one hour): // difference in hours for two whole years (2015-2016) var hourdiff = (new Date('2017/01/01') - new Date('2014/12/31'))/(1000*60*60); You can create a Date extension to calculate hours in a certain year: Date.prototype.hoursInYear = function() { return ( (new Date(this.getFullYear()+1, 0, 1)) - (new Date(this.getFullYear()-1, 11, 31)) ) / 3600000; } // usage new Date(1997, 0, 1).hoursInYear(); // =&gt; 8784 new Date(2008, 0, 1).hoursInYear(); // =&gt; 8808 (leap year) Or even (the number of hours in a (leap)year is constant) Date.prototype.hoursInYear = function() { return new Date(this.getFullYear(), 1, 29).getMonth() == 1 ? 8808 : 8784; } And finally, using the Date extension, this could be a method to calculate the number of hours in [n years] starting with [startyear]: function calcHours(startyear, numyears) { return isNaN(new Date(startyear, 0, 1)) ? null // invalid year value : Array.apply(null, {0: startyear, length: numyears}) .map(function(v, i) {return v == this ? v : this + 1;}, startyear) .reduce( function(a, b) { return a + new Date(b, 0, 1) .hoursInYear();}, 0); } // usage calcHours(2000, 2); //=&gt; 17592 (2000 is leap year) calcHours(2001, 2); //=&gt; 17568

http://stackoverflow.com/comment/46991381
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29407750
type: Comment
has text: I also get an other error: UnknownError: Missing Command Parameter - {"headers":{"Accept":"application/json; charset=utf-8","Connection":"close","Content-Length":"25","Content-Type":"application/json;charset=UTF-8","Host":"localhost:5000"},"httpVersion":"1.1","method":"POST","post":"{\"args\":[],\"script\":null}","url":"/execute","urlParsed":{"anchor":"","query":"","file":"execute","directory":"/","path":"/execute","relative":"/execute","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute","queryKey":{},...

http://stackoverflow.com/a/75486825
has body: Probably unrelated to this particular question, but disabling uBlock Origin popup blocker worked for me.
score: 0
answers question: http://stackoverflow.com/q/29411975
type: Answer

http://stackoverflow.com/comment/47019893
type: Comment
comment on: http://stackoverflow.com/a/29423976
score: 0
type: AnswerComment
has text: @James The result is still an array, as it is an exact parse of the original string. You need to do `alert(myData[0].BusinessId)`.

http://stackoverflow.com/a/29456443
upvote count: 1
score: 1
has body: As mentioned in the comments, x is a number and sum(y) is a function. Using the + operator on them uses their gcd type which are strings, and cannot be called. You cannot curry operators in javascript. You need to return a curried function explicitly, and tell it when to calculate the values. An appropriate fix for our function would be function sum(x) { return function(y) { if (!y) return x; // ^ else return sum(x + y); // ^^^ }; }
answers question: http://stackoverflow.com/q/29454470
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29454470
type: Answer

http://stackoverflow.com/q/29502523
has comment: http://stackoverflow.com/comment/47172751
accepted answer: http://stackoverflow.com/a/29505435
tagged with: java
has title: Issue using jsoup to select tags within div
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jsoup
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29505435
has body: I have a html file that contains content like: Dorothy Perkins True blue suedette clutch bag I want to extract the url in href. I have the following code: Document doc = Jsoup.connect(url).get(); Elements products = doc.select("div.title a[href]"); System.out.println("size: "+products.size()); The print shows, however, the size is 0. It cannot find any match. The url I'm using is http://www.polyvore.com/bags/shop?category_id=35. You can take a look at the source, I'm pretty sure the code above is right. That would be great if anybody can give some idea. Thanks a lot.

http://stackoverflow.com/comment/47004544
score: 0
comment on: http://stackoverflow.com/q/29407338
has text: Please provide a link.
type: Comment
type: QuestionComment