http://stackoverflow.com/q/27977853
tagged with: coffeescript
has body: I have an object with a bunch of functions attached to it, and some tests that I want run against each element in a list of these objects. So I've put tests in these object-methods and want to run them all in an async.each. Attempt (CoffeeScript + Mocha) {format} = require 'util' async = require 'async' class Foo constructor: (@bar) -&gt; class Bar extends Foo whoami_sync: =&gt; @bar whoami_async: (cb) =&gt; cb null, @bar objects = [{foo:'bar'}, {bar:'foo'}].map (obj) -&gt; new Bar obj describe 'something', -&gt; it "does't", (done) -&gt; async.each objects, ((item) -&gt; objects[objects.indexOf(item)].whoami_async), done it 'does', (done) -&gt; res_list = [obj.whoami_sync() for obj in objects] console.log format '[obj.whoami_sync() for obj in objects] = %j', res_list done if res_list.filter((elem) -&gt; !elem.length).length then new Error else null Error output (sync test passes) 1) something doesn't: Error: timeout of 2000ms exceeded
has comment: http://stackoverflow.com/comment/44349281
type: Question
tagged with: async.js
tagged with: javascript
tagged with: mocha.js
score: 0
has answer: http://stackoverflow.com/a/27978361
answer count: 1
type: UnansweredQuestion
has title: async.js each with object method?
has comment: http://stackoverflow.com/comment/44348008
tagged with: node.js
has comment: http://stackoverflow.com/comment/44348822
has comment: http://stackoverflow.com/comment/44347968

http://stackoverflow.com/comment/44374654
type: QuestionComment
comment on: http://stackoverflow.com/q/27991928
score: 0
type: Comment
has text: What does `but it's empty` mean? And please name your functions probably.

http://stackoverflow.com/q/28024792
accepted answer: http://stackoverflow.com/a/28025640
type: Question
tagged with: debugging
tagged with: javascript
has comment: http://stackoverflow.com/comment/44436363
tagged with: google-chrome-extension
answer count: 1
downvote count: 0
favorite count: 0
has body: This is the code from my chrome extension, as far as i am aware it should return all targets that i can attach a debugger to: chrome.browserAction.onClicked.addListener(function(tab) { console.log('launching extention'); chrome.debugger.getTargets(function(result){ console.log('Result!'); console.log("count: "+result.length); for (index = 0; index &lt; result.length; index++) { console.log(index+": "+result[index].url); } }); }); This is my console output from the above extension: This shows only tabs open in the chrome browser returned as debuggable targets. I have my device connected and setup correctly so i can debug android chrome tabs. Is the method i am using to try to attach to the devices debugger correct? Related Docs Links; remote-debugging, debugger, debugger-protocol, debugging-clients.
has answer: http://stackoverflow.com/a/28025640
has title: how to attach debugger to device? chrome extention
type: AnsweredQuestion
score: 3
upvote count: 3
tagged with: google-chrome-devtools
tagged with: google-chrome

http://stackoverflow.com/comment/44532947
has text: @Pseudonym this happens to be for a little simplified version of a `require` implementation for my own use. If possible, I would enjoy being able to keep the functionality within the constructor so that I can simply use `var myModule = new Module('resourceName')`
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28076913
type: Comment

http://stackoverflow.com/comment/44354127
comment on: http://stackoverflow.com/a/27980382
score: 0
type: Comment
has text: This seems to work perfectly in jsfiddle. I will try it on my page as soon as I can. Thank you Rodion
type: AnswerComment

http://stackoverflow.com/a/27989692
has comment: http://stackoverflow.com/comment/44371368
upvote count: 1
has body: Check the response headers. The content type needs to be application/xml. XMLHttpRequest is available in current IEs. I suggest using the ActiveX only as a fallback. You can override the content mimetype on it: xhr = new XMLHttpRequest(); xhr.overrideMimeType("application/xml"); ... This might by possible on the ActiveX object, too. But I am not sure. Another possibility is using the DOMParser to convert a received string into an Document instance.
type: Answer
answers question: http://stackoverflow.com/q/27989337
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44373107

http://stackoverflow.com/comment/44599608
score: 0
has text: Do you have a `scope.closePopover` function?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28112792

http://stackoverflow.com/comment/44531069
type: Comment
has text: I have this same functionality in Meteor Blocks: https://github.com/stubailo/meteor-blocks you can see some of the functions in https://github.com/stubailo/meteor-blocks/blob/master/client/routes.js (In my project, "Scene" is like "Fridge" and "Box" is like "Magnet")
score: 0
comment on: http://stackoverflow.com/q/28075985
type: QuestionComment

http://stackoverflow.com/a/27983447
accepted answer of: http://stackoverflow.com/q/27983388
type: AcceptedAnswer
downvote count: 1
answers question: http://stackoverflow.com/q/27983388
has comment: http://stackoverflow.com/comment/44359164
has body: You'll need to loop through the results var errors = document.querySelectorAll( "#form-error-name, #form-error-email, #form-error-tel, #form-error-dob, #form-error-password, #form-error-goal"); [].forEach.call(errors, function(error) { error.innerHTML = ''; }); querySelectorAll doesn't return an array, but a NodeList, which doesn't have a forEach method on its prototype. The loop above is using the forEach method on the array object's prototype on the NodeList object.
upvote count: 10
type: Answer
has comment: http://stackoverflow.com/comment/44358401
has comment: http://stackoverflow.com/comment/44358677
has comment: http://stackoverflow.com/comment/95570574
score: 9

http://stackoverflow.com/a/28080647
answers question: http://stackoverflow.com/q/28080290
has body: It is certainly not an antipattern to return promises within thens, flattening nested promises is a feature of the promise spec. Here's a possible rewrite, though I'm not sure it's cleaner: var doStuff = function () { promise1() .then(function (value1) { return promise2() .then(function (value2) { return promise3(value1) .then(successFunction) .finally(function() { cleanup(null, value1, value2); }); }) .finally(function() { cleanup(null, value1, null); }); }) .finally(function () { cleanup(null, null, null); }); }; Or another option, with atomic cleanup functions: var doStuff = function () { promise1() .then(function (value1) { return promise2() .then(function (value2) { return promise3(value1) .then(successFunction) .finally(function() { cleanup3(value2); }); }) .finally(function() { cleanup2(value1); }); }) .finally(function (err) { cleanup1(err); }); }; Really, I feel like there's not much you can do to clean this up. Event with vanilla try/catches, the best possible pattern is pretty similar to these.
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/44541735
upvote count: 1
score: 1

http://stackoverflow.com/comment/44465206
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/28040717
has text: note that `setTimeout(i+=1, 2000);` seems strange, the first argument is supposed to be a function. Also, all timeouts execute at the same time

http://stackoverflow.com/q/28049188
favorite count: 0
accepted answer: http://stackoverflow.com/a/28049731
type: AnsweredQuestion
tagged with: twitter-bootstrap
tagged with: iframe
has comment: http://stackoverflow.com/comment/44481254
has title: Error: Permission denied to access property '$'
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44480507
score: 1
has answer: http://stackoverflow.com/a/28049731
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44480386
has body: everybody. I have the following situation: I have: http://example.com/ and http://example.com/new In example.com, I have some forms that I load in example.com/new domain with fancybox iframe. My form, basically shows some fields for the user to enter his pessoal data, like name, phone and etc... After he submit that, I show some user agreement terms that comes from database and a checkbox for the user to say that he agree with the terms. After he check and submit, I want to alert some sucess message and the fancybox modal/iframe to close and thats it. In the form page, i've loaded jquery, and bootstrap. So, when the user agree, I print: <?php echo " "; ?> I have three forms, in one, works, in the other two, i get: Error: Permission denied to access property '$' The only difference between the form that works and the other two, is that in the form that works, i don't have the agreement terms coming from database, only the checkbox. I could put my entire code here, but would be a giant question. But if you guys need, I can update. Sorry for my english and forgive-me if I was not clear. UPDATE: <?php /* Connect with DB */ require_once('require/conectar.php'); if(!empty($_POST)) foreach($_POST as $k => $v) $$k = $v; ?> <?php if(!isset($agree) and !isset($next)): ?> The form Your name: Your email: <?php else: $error = (!isset($name)) ? true : false; $error = (!isset($name)) ? true : false; if($error) { echo ' '; exit; } $qrr = mysql_query("SELECT * FROM `terms`"); $terms = mysql_fetch_object($qrr); ?> Terms: <?php echo $terms->content; ?> <input type="hidden" value="<?php echo $name; ?>" name="name"> <input type="hidden" value="<?php echo $email; ?>" name="email"> I agree. <?php endif; if(isset($agree)) { /* Here i mail me the user data. */ echo " "; }else { echo " "; } ?>
has comment: http://stackoverflow.com/comment/44480465

http://stackoverflow.com/comment/44587186
has text: No i did not get the answer. maybe you know some other solution that could work
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28106114

http://stackoverflow.com/comment/44458519
has text: ? I am using ui-view, I added it to my HTML code above. Also trying to recreate my project here http://plnkr.co/edit/0efF1Av4lhZFGamxKzaO?p=preview
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28036817
score: 0

http://stackoverflow.com/comment/64917835
comment on: http://stackoverflow.com/a/28067492
type: AnswerComment
type: Comment
score: 7
has text: Just one note: this will deactivate any links or buttons you have in that element.

javascript
tags question: http://stackoverflow.com/q/28071716
tags question: http://stackoverflow.com/q/28008500
tags question: http://stackoverflow.com/q/27997935
tags question: http://stackoverflow.com/q/27980896
tags question: http://stackoverflow.com/q/28078566
tags question: http://stackoverflow.com/q/28062345
tags question: http://stackoverflow.com/q/28016738
tags question: http://stackoverflow.com/q/28089864
tags question: http://stackoverflow.com/q/27989054
tags question: http://stackoverflow.com/q/27992598
tags question: http://stackoverflow.com/q/28090379
tags question: http://stackoverflow.com/q/27966215
tags question: http://stackoverflow.com/q/28026935
tags question: http://stackoverflow.com/q/28007335
tags question: http://stackoverflow.com/q/28023860
tags question: http://stackoverflow.com/q/27991366
tags question: http://stackoverflow.com/q/28067194
tags question: http://stackoverflow.com/q/28115025
tags question: http://stackoverflow.com/q/28059509
tags question: http://stackoverflow.com/q/28021963
tags question: http://stackoverflow.com/q/28034479
tags question: http://stackoverflow.com/q/27995316
tags question: http://stackoverflow.com/q/28104389
tags question: http://stackoverflow.com/q/28048246
tags question: http://stackoverflow.com/q/28084334
tags question: http://stackoverflow.com/q/28009669
tags question: http://stackoverflow.com/q/28072029
tags question: http://stackoverflow.com/q/27984384
tags question: http://stackoverflow.com/q/27983692
tags question: http://stackoverflow.com/q/27966791
tags question: http://stackoverflow.com/q/28004500
tags question: http://stackoverflow.com/q/28072426
tags question: http://stackoverflow.com/q/28011913
tags question: http://stackoverflow.com/q/27989033
tags question: http://stackoverflow.com/q/27998118
tags question: http://stackoverflow.com/q/28012371
tags question: http://stackoverflow.com/q/28079444
tags question: http://stackoverflow.com/q/27983579
tags question: http://stackoverflow.com/q/27983374
tags question: http://stackoverflow.com/q/28052758
tags question: http://stackoverflow.com/q/28014010
tags question: http://stackoverflow.com/q/28049627
tags question: http://stackoverflow.com/q/28008436
tags question: http://stackoverflow.com/q/28053913
tags question: http://stackoverflow.com/q/28089700
tags question: http://stackoverflow.com/q/28108272
tags question: http://stackoverflow.com/q/28009734
tags question: http://stackoverflow.com/q/28095405
tags question: http://stackoverflow.com/q/27989349
tags question: http://stackoverflow.com/q/28102326
tags question: http://stackoverflow.com/q/28089866
tags question: http://stackoverflow.com/q/28073907
tags question: http://stackoverflow.com/q/28056596
tags question: http://stackoverflow.com/q/28030374
tags question: http://stackoverflow.com/q/28090440
tags question: http://stackoverflow.com/q/28085018
tags question: http://stackoverflow.com/q/27994930
tags question: http://stackoverflow.com/q/28029226
tags question: http://stackoverflow.com/q/27999513
tags question: http://stackoverflow.com/q/28056467
tags question: http://stackoverflow.com/q/28044084
tags question: http://stackoverflow.com/q/28111405
tags question: http://stackoverflow.com/q/28051593
tags question: http://stackoverflow.com/q/27986436
tags question: http://stackoverflow.com/q/28099581
tags question: http://stackoverflow.com/q/27995299
tags question: http://stackoverflow.com/q/28048423
tags question: http://stackoverflow.com/q/28063852
tags question: http://stackoverflow.com/q/27999963
tags question: http://stackoverflow.com/q/28019873
tags question: http://stackoverflow.com/q/27978847
tags question: http://stackoverflow.com/q/27997841
tags question: http://stackoverflow.com/q/28077353
tags question: http://stackoverflow.com/q/28031174
tags question: http://stackoverflow.com/q/27992147
tags question: http://stackoverflow.com/q/28043984
tags question: http://stackoverflow.com/q/28069925
tags question: http://stackoverflow.com/q/28120536
tags question: http://stackoverflow.com/q/28037737
tags question: http://stackoverflow.com/q/28068038

http://stackoverflow.com/comment/44381385
comment on: http://stackoverflow.com/q/27995252
score: 0
has text: just set the script tag `src` to the url to the file and append it to the page
type: QuestionComment
type: Comment

http://stackoverflow.com/q/28111594
tagged with: animation
tagged with: skrollr
upvote count: 1
has comment: http://stackoverflow.com/comment/44604933
has title: Smoothly scroll to anchor tags
has body: I want to have links in my page that animate the scrolling of the page (actually not the page but the #scrollable element, in this case) to the target position. The following looks very rough, both on mobile and desktop. It seems that Skrollr could help me with that. How could I implement the following with it? var scrollable = $('#scrollable'); // whole page container that scrolls, not using native scroll var headerDownArrow = $('#header-down-arrow'); headerDownArrow.on('click', function(){ scrollable.animate({ scrollTop: $("#home-portfolio").offset().top }, 1000) }); I tried this and it doesn't work (no scroll at all), what am I missing? var s = skrollr.init({ smoothScrolling: true, skrollrBody: document.getElementById('scrollable') }); skrollr.menu.init(s, { animate: true, easing: 'sqrt' }); I also tried this as well as other variations of it that I found on this post and it always looks very jagged. $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') &amp;&amp; location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $scrollable.animate({ scrollTop: target.offset().top }, 1000); return false; } } }); I also disabled all scroll events (and ultimately all JavaScript), then styles and HTML elements with fixed positioning, and scrolling's still rough.
tagged with: javascript
type: UnansweredQuestion
answer count: 0
downvote count: 0
score: 1
favorite count: 0
type: Question

http://stackoverflow.com/q/28054176
has answer: http://stackoverflow.com/a/28054269
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/28054216
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44490284
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28054216
has title: Toggle Through Multiple Classes with jQuery
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/10894250
downvote count: 0
tagged with: toggleclass
tagged with: jquery
has comment: http://stackoverflow.com/comment/44490909
favorite count: 0
has body: I am attempting to cycle through 3 classes when the user clicks a button. I found someone with the same challenge as me, but I lack the reputation to comment on the post for any follow up. Here is the original code to cycle through the classes: $('.one, .two, .three').click(function() { this.className = { three : 'one', one: 'two', two: 'three' }[this.className]; }); and I have modified it as follows: $('#next').click(function() { this.className = { liscombe : 'digby', digby: 'keltic', keltic: 'liscombe' }[this.className]; }); This works as expected and cycles through the classes on the #next element, however I would like to have the class change happen on the body tag when the #next is clicked. I'm not sure how to modify the 'this.' I have tried body.className but that did not work. How can this be modified to have the body class change on click?
possible better answer: http://stackoverflow.com/a/28054269

http://stackoverflow.com/comment/44378349
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27993635
has text: location search is what I was looking for :)
score: 1

http://stackoverflow.com/comment/44470023
score: 0
type: Comment
has text: Yeah, your're right. In this case it isn't the problem (my real files have them in the right order).
type: QuestionComment
comment on: http://stackoverflow.com/q/28042721

http://stackoverflow.com/a/28030714
has comment: http://stackoverflow.com/comment/44446848
has comment: http://stackoverflow.com/comment/44447079
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44447229
has body: Try calling $("img.navthumb").lazyload(); after the thumbnail code has been dynamically injected using JavaScript method appendChild(). Also, i would be able to help you better if you post a JSFiddle. Hope it helps!!!
upvote count: 1
has comment: http://stackoverflow.com/comment/44446506
has comment: http://stackoverflow.com/comment/44446279
answers question: http://stackoverflow.com/q/28030328
type: Answer

http://stackoverflow.com/q/28018229
score: 0
has body: I'm initializing a jQuery notification plugin using the following code. I used setTimeout function to delay each object init. if(applicablePromotions.length &gt; 0){ applicablePromotions.forEach(function(promo){ setTimeout(function(){ $.amaran({ content:{ title:'Your Download is Ready!', message:'1.4 GB', info:'my_birthday.mp4', icon:'fa fa-download' }, theme:'awesome ok', position:'top left', inEffect:'slideRight', outEffect:'slideLeft' }); },1000) }) } The problem is all the objects get's shown in after the delay time period. There is no time difference in each object. how can I achieve the time difference on each object. I use the following plugin : http://hakanersu.github.io/AmaranJS/
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/28018284
tagged with: plugins
type: AnsweredQuestion
has title: add time on each object initialization
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28018284

http://stackoverflow.com/comment/44520208
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/28070388
has text: Do you have method `destroy` in `MicropostsController` ?
type: Comment

http://stackoverflow.com/q/28028719
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/28028856
tagged with: rest
type: UnansweredQuestion
score: 3
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
has title: Consuming a RESTful api with Restangular - Is it secure for a RESTful api to return an array as a top-level object?
tagged with: flask
tagged with: security
has body: I'm creating a RESTful web service using Python Flask. For one of my endpoints I'd like to return a list of users. The api endpoint returns JSON in the following format: { "users": [ { "Email": "email1@example.org", "First": "Tom", "Last": "Jones", "id": 1 }, { "Email": "email2@example.org", "First": "Steven", "Last": "Fry", "id": 2 }, { "Email": "email3@example.org", "First": "Monty", "Last": "Python", "id": 3 } ] } If I do this Restangular responds with Error: Response for getList SHOULD be an array and not an object or something else which is by design as Restangular expects an Array and not a Javascript object. From what I understand there are two preferred options for dealing with this: Option 1 - Wrap the response in an array like so: [{ "users": [ { "Email": "email1@example.org", "First": "Tom", "Last": "Jones", "id": 1 }, { "Email": "email2@example.org", "First": "Steven", "Last": "Fry", "id": 2 }, { "Email": "email3@example.org", "First": "Monty", "Last": "Python", "id": 3 } ] }] However, according to this article http://flask.pocoo.org/docs/0.10/security/#json-security this is not secure. Is my understanding correct here? Option 2 - The second option is to use this method: https://github.com/mgonto/restangular#my-response-is-actually-wrapped-with-some-metadata-how-do-i-get-the-data-in-that-case In this case is it possible (would I need to?) to create an interceptor for every getList request on all endpoints that return multiple items e.g. a 'posts' endpoint, 'messages' endpoint etc.? Would this be a feasible or good approach? Is there anything I'm missing in my understanding? Option 1 seems like less work but potentially introduces a security concern. Option 2 would be more work but mitigates the potential security problem (if there is one). If there's an even better 'Option 3' it would be great to hear it!
downvote count: 0

http://stackoverflow.com/q/28078529
tagged with: javascript
has comment: http://stackoverflow.com/comment/44535950
has comment: http://stackoverflow.com/comment/44536238
upvote count: 1
has body: I am writing a code on one website that has data and need help to send that data to another website. Any suggestions using javascript or anything else.
answer count: 1
has title: JavaScript Write to Other Website
tagged with: web
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44536360
has answer: http://stackoverflow.com/a/28078631
downvote count: 6
score: -5
has comment: http://stackoverflow.com/comment/44535953
type: Question

http://stackoverflow.com/q/28075197
has answer: http://stackoverflow.com/a/28077932
tagged with: pixi.js
tagged with: webgl
type: Question
has title: Awful frame rates under all browsers (Pixi JS Rendering)
tagged with: javascript
has body: I'm drawing an isometric grid with mouse-over hit area detection over each tile. It works but the frame rates are awful. Any idea what is bringing the frame-rates down so much? Surely, webGL is capable of attaining better FPS than this? There are no moving sprites (only diamond-shapes PIXI.Graphics) drawn to the screen. http://178.79.155.146/pc Cheers, Jordan
has comment: http://stackoverflow.com/comment/44577334
score: 0
tagged with: html5-canvas
answer count: 1
type: UnansweredQuestion
tagged with: frame-rate

http://stackoverflow.com/q/28064116
tagged with: elasticsearch
has answer: http://stackoverflow.com/a/28064403
has comment: http://stackoverflow.com/comment/44509846
has answer: http://stackoverflow.com/a/28064838
has comment: http://stackoverflow.com/comment/44509464
has comment: http://stackoverflow.com/comment/44508925
tagged with: angularjs
has body: In my dashboard application am using elastic search to retrieve data, which retrieves data fine. Now i need to iterate over the data and get the result in the required way. Here is my code, routerApp.controller('SearchCtrl', function($scope, ejsResource) { var ejs = ejsResource('http://192.168.1.200:9200'); var oQuery = ejs.QueryStringQuery().defaultField('Agent'); var client = ejs.Request() .indices('nondomain_callrelatedinfo') .types('callrelatedinfos'); $scope.search = function() { $scope.results = client .query(oQuery.query($scope.queryTerm || '*')) .doSearch(); console.log($scope.results); }; }); I have added a console.log in the results and it reuturns something like this, Data: when i iterate over hits, it says cannot read property of "hits" undefined $scope.dataRetrieved= $scope.results.value.hits; for (var i = 0; i &lt; $scope.dataRetrieved.length; i++) { console.log($scope.dataRetrieved[i]); }; };
has comment: http://stackoverflow.com/comment/44509416
has comment: http://stackoverflow.com/comment/44508949
has comment: http://stackoverflow.com/comment/44508709
has title: How can i iterate over elastic search results using angular?
has comment: http://stackoverflow.com/comment/44508713
accepted answer: http://stackoverflow.com/a/28068890
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44508861
has comment: http://stackoverflow.com/comment/44509270
has comment: http://stackoverflow.com/comment/44508904
type: Question
has comment: http://stackoverflow.com/comment/44509824
tagged with: javascript
has comment: http://stackoverflow.com/comment/44508756
score: 0
has answer: http://stackoverflow.com/a/28068890
answer count: 3
possible better answer: http://stackoverflow.com/a/28064403
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/28004000
score: -3
type: AnsweredQuestion
upvote count: 0
downvote count: 3
duplicate of: http://stackoverflow.com/q/25111831
has comment: http://stackoverflow.com/comment/44396674
type: Question
has comment: http://stackoverflow.com/comment/44396570
has title: First look on AngularJS
has comment: http://stackoverflow.com/comment/44396759
has body: I'm trying to learn AngularJS and the first example I have tried does not work. Why? Here is the HTML: `` Hello, {{userGroup.name}}! And here is the javascript (app.js file) code: var MainCtrl = function ($scope) { $scope.userGroup = { name: "Kirill Kuts" }; }
linked to: http://stackoverflow.com/q/25111831
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/28004051
accepted answer: http://stackoverflow.com/a/28004051

http://stackoverflow.com/comment/44451773
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28033125
has text: Typically when you're using prototypes, you only want to define methods on the prototype. The assumption is that you will be changing values on each instance, but you won't be changing its methods.

http://stackoverflow.com/a/28093533
has comment: http://stackoverflow.com/comment/44563363
has body: You can do this more cleanly as follows: while(count != 12) { $('#logo-' + count + ' &gt; img').click(function() { var origin = $(this).parent(), targetId = '#info-' + origin[0].id.substring(5), target = $(targetId); if(target.hasClass('dropdown-active')) { target.slideUp(); target.removeClass('dropdown-active'); } else { target.slideDown(); target.addClass('dropdown-active'); } return false; }); count++; } But it would be preferable to give all your logos the same class (say, "logo"), and then you can ditch the while loop: $('.logo &gt; img').click(function() { var origin = $(this).parent(), targetId = '#info-' + origin[0].id.substring(5), target = $(targetId); if(target.hasClass('dropdown-active')) { target.slideUp(); target.removeClass('dropdown-active'); } else { target.slideDown(); target.addClass('dropdown-active'); } }); Edit: As Karl-André Gagnon points out in the comments, you could also use $('[id^="logo-"]') as an alternative to giving them a class, and still use the no-while-loop approach. One alternative to parsing the numbers out of the IDs would be to store the number in a data-num attribute: &lt;div class='logo' data-num='1'&gt;...&lt;/div&gt; And then instead of that var origin... stuff with the substring method, you would have: var num = $(this).parent().data('num'), target = $('#info-' + num);
has comment: http://stackoverflow.com/comment/44563724
answers question: http://stackoverflow.com/q/28093382
has comment: http://stackoverflow.com/comment/44563444
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28093382
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/44563456
score: 6

http://stackoverflow.com/a/28001653
has comment: http://stackoverflow.com/comment/44392946
type: Answer
has comment: http://stackoverflow.com/comment/44393950
has comment: http://stackoverflow.com/comment/44392428
score: 2
answers question: http://stackoverflow.com/q/28001553
has body: For perfomance, this is probably among the fastest ways var option = document.createElement("option"); var frag = document.createDocumentFragment(); for (var key in summaryObj) { var clone = option.cloneNode(); clone.value = san; clone.innerHTML = key; frag.appendChild(clone); } $('select[name="yaxis"]').append(frag); For readability, I like this var objY = $('select[name="yaxis"]'); var frag = []; $.each(summaryObj, function(key, val) { frag.push( $('&lt;option /&gt;', { value : san, text : key }) ); }); objY.append(frag);
has comment: http://stackoverflow.com/comment/44394746
has comment: http://stackoverflow.com/comment/44392664
downvote count: 0
has comment: http://stackoverflow.com/comment/44392353
upvote count: 2

http://stackoverflow.com/comment/44420679
has text: Recommended reading: http://perfectionkills.com/know-thy-reference/
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/28016664

http://stackoverflow.com/q/28098524
has title: Incorrect formula rendering with MathJax
has answer: http://stackoverflow.com/a/28098863
tagged with: javascript
tagged with: formula
score: 0
answer count: 1
tagged with: latex
has body: I'm trying to render some formulas without success. The formula in question is \frac{\displaystyle \sum_{k=1}^N k^2}{a} It must be something with how I configure MathJax, but I can't figure out what is wrong. Here it is: window.MathJax.Hub.Config({ config: ['MMLorHTML.js'], MMLorHTML: { prefer: { Firefox: 'MML', other: 'SVG' } }, displayAlign: 'left', extensions: ['asciimath2jax.js', 'tex2jax.js', 'mml2jax.js', 'MathMenu.js', 'MathZoom.js'], jax: ['input/TeX', 'input/AsciiMath', 'input/MathML', 'output/SVG', 'output/NativeMML'], messageStyle: 'none', showMathMenu: false, showProcessingMessages: false, skipStartupTypeset: true, 'HTML-CSS': {linebreaks: {automatic: true}} }); Here is a DEMO which demonstrates the issue. The formula should be rendered as follows: Any suggestions what is missing in my configuration ?
type: AnsweredQuestion
tagged with: mathjax
accepted answer: http://stackoverflow.com/a/28098863
type: Question

http://stackoverflow.com/comment/44324099
has text: @redthumb, in regards to your edit, that wasn't a typo, both syntaxes will work.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27965493

http://stackoverflow.com/a/28105473
has comment: http://stackoverflow.com/comment/44585644
has comment: http://stackoverflow.com/comment/44585562
score: 0
answers question: http://stackoverflow.com/q/28105350
type: Answer
has body: You can try get the id of the form. And you call it from wherver you want. Try: $(".button").click( function() { $('#myform').submit(); });

http://stackoverflow.com/q/28042092
possible better answer: http://stackoverflow.com/a/28042149
has answer: http://stackoverflow.com/a/28042111
accepted answer: http://stackoverflow.com/a/28042142
has body: I have a function in my app when the user checks the checkbox, some text is appended to a label which already contains some text. The thing that I want to do now is that if the user unchecks the checkbox, the text that was just added has to be removed. The basic text may not be removed. I have the following code: HTML: this is a test JQuery: $('#chkbox1').click(function () { if ($('#chkbox1').is(':checked')) { var vcard = "\n Jürgen \n Marketing und Vertrieb \n e-mail:juergen@mail.de \n anschrift In test 18 \n 40599 Düsseldorf \n Deutschland \n website www.test.de \n telefon +49 211 123456789 \n mobil +49 177 123456789 \n fax +49 211 123456789 \n "; $('#lbl1').append(vcard); } else { $('#lbl1').replace(vcard, ''); } }); Any help would be appreciated.
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/28042121
has answer: http://stackoverflow.com/a/28042142
has answer: http://stackoverflow.com/a/28042202
tagged with: javascript
has answer: http://stackoverflow.com/a/28042149
tagged with: jquery
answer count: 6
has answer: http://stackoverflow.com/a/28042430
has title: remove string when checkbox unchecked

http://stackoverflow.com/q/27988502
has answer: http://stackoverflow.com/a/27991917
has answer: http://stackoverflow.com/a/28463763
accepted answer: http://stackoverflow.com/a/29686215
has comment: http://stackoverflow.com/comment/44369580
has comment: http://stackoverflow.com/comment/44369096
tagged with: javascript
has answer: http://stackoverflow.com/a/44176693
possible better answer: http://stackoverflow.com/a/28463763
linked to: http://stackoverflow.com/q/45594682
has comment: http://stackoverflow.com/comment/79962951
linked to: http://stackoverflow.com/q/29157623
has body: View carousel here: Owl-carousel2 I'm running into an issue where whenever the ng-repeat directive is applied to carousel the items are stacked vertically instead of being layout horizontally. If I leave out ng-repeat and use static items then it works as it should. Is there a directive I can write and apply to owl-carousel to maintain the layout? Also what is about ng-repeat that is causing the carousel to break? Is angular somehow stripping the owl-carousel classes applied to the carousel? Note* If build the list manually then iterate through and append the elements using : var div = document.createElement('div'); var anchor = document.createElement('a'); var img = document.createElement('img'); ..... carousel.appendChild(div); then call the owl.owlCarousel({..}) It works, not sure if this is the best work around because ng-repeat makes everything bit easier. I discovered a hack , if I wrap the owl init in a timeout then ng-repat works. setTimeout(function(){ ...call owl init now },1000); .....
favorite count: 0
has title: Applying angularjs ng-repeat to owl-carousel
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44368608
has answer: http://stackoverflow.com/a/29686215
has comment: http://stackoverflow.com/comment/44368507
has comment: http://stackoverflow.com/comment/44368774
has comment: http://stackoverflow.com/comment/44373027
answer count: 4
score: 14
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44369071
downvote count: 1
tagged with: owl-carousel
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/44368651
upvote count: 15

http://stackoverflow.com/comment/44423136
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28017960
type: Comment
has text: But how would this work when I click a button instead? Not by submitting a form. I updated my html code above

http://stackoverflow.com/a/33418390
downvote count: 0
type: Answer
has body: I think the main reason why this is happening is because you are using a click event in the element where you apply the directive, instead of defining this event directly in the directive. Therefore you are getting the click from the button element, but also the click from the directive controller. What $compiles do is once invoked against markup will produce a function you can use to bind the markup against a particular scope (what Angular calls a linking function), that's why Rodion suggested using link, I guess. In this particular case, it means that you are are using an event directly in the element button but then linking it again to the scope in your directive by using $compile. I guess that's why you get the message twice. As I don't know whether this is clear, I obtained the information from this link http://odetocode.com/blogs/scott/archive/2014/05/07/using-compile-in-angular.aspx where it is way better explained. Here also a JSFiddle where you can see how it works (excerpt from the article above). app.directive("otcDynamic", function($compile){ return { link: function(scope, element){ var template = "&lt;button ng-click='doSomething()'&gt;{{label}}&lt;/button&gt;"; var content = $compile(template)(scope); element.append(content); } }; }); JSFiddle
upvote count: 3
answers question: http://stackoverflow.com/q/27974795
score: 3

http://stackoverflow.com/q/28108376
has title: How I can hide div on option select
has answer: http://stackoverflow.com/a/28108520
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/28108497
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/44590965
tagged with: jquery
has body: I have the below javascript which I am using the hide a div when an option is selected from a drop down list, however it is not currently working and I can't seem to figure out why. The java script: Which is to work on this part of the form: Type: Multiple choice Image/Video Click Image Correct Answer: Wrong Answer 1: Wrong Answer 2: Wrong Answer 3: This part of a php page: <?php include "connect.php"; ?> <!--[if lt IE 9]> <![endif]--> <!--[if lte IE 8]> <![endif]--> <?php include "../header.php"; ?> Show/Edit Companies Add New Company <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post"> Company Name: E-mail: Number of Drivers: Contact Name: Address: Phone Number: Insurance: Yes No Number of Tests: Password: Notes: Show/Edit Questions Add New Question <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" enctype="multipart/form-data"> Question: Category: Hazard Awareness Observation Insurance Attitude Gen. Knowledge Type: Multiple choice Image/Video Click Image Correct Answer: Wrong Answer 1: Wrong Answer 2: Wrong Answer 3: Question Description: Correct Answer Explanation: Image/Video: Explanation Image: Hazardous?: Yes No Vehicles: Car Van LGV HGV Bus <?php $companyssql="SELECT * FROM Companys"; $companysresult=mysqli_query($conn, $companyssql); echo mysqli_error($conn); echo " Company Name Email Driver Count Contact Name Address Phone Number Insurance Number of Tests Notes "; while($row = mysqli_fetch_array($companysresult)) { echo " "; echo " " . $row['CompanyName'] . " "; echo " " . $row['Email'] . " "; echo " " . $row['DriverCount'] . " "; echo " " . $row['ContactName'] . " "; echo " " . $row['Address'] . " "; echo " " . $row['PhoneNumber'] . " "; if ($row['insurance'] == 'yes'){ echo " YES "; }else{ echo " NO "; } echo " " . $row['NumberOfTests'] . " "; echo " " . $row['Notes'] . " "; echo " "; echo " "; echo " "; } echo " "; ?> Add New Company <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post"> Company Name: E-mail: Numbe…
possible better answer: http://stackoverflow.com/a/28108520
accepted answer: http://stackoverflow.com/a/28108497

http://stackoverflow.com/q/28088699
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44554351
score: 0
has comment: http://stackoverflow.com/comment/44556323
tagged with: css
has answer: http://stackoverflow.com/a/28093431
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44563359
has comment: http://stackoverflow.com/comment/44554197
has title: Can't shake a element just on Firefox
type: Question
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/28093431
has comment: http://stackoverflow.com/comment/44561706
tagged with: firefox
has body: i'm using jQuery UI to shake some elements with images inside. It works well with Chrome, and IE, but not on Firefox. If I try to shake the img, it starts on a wrong position, but it works. But I can't find the right css for the img to start its animation at its original position. Here's the code: function moveAnimations() { optionsPokemonOne = { effect: "shake", times: 1, direction: "left" }; optionsPokemonTwo = { effect: "shake", times: 1, direction: "right" }; img_pkm_attack = '/images/pokemon-attacks/' + pokemon1.toLowerCase() + '-2.gif'; if (imageExist(img_pkm_attack)) { img_attack_tag = " "; $("#pokemons_turn #pokemon1").empty().append(img_attack_tag); } $('#pokemon1').effect(optionsPokemonOne); img_pkm_attack = '/images/pokemon-attacks/' + pokemon2.toLowerCase() + '-2.gif'; $('#pokemon1').promise().done(function() { if (imageExist(img_pkm_attack)) { img_attack_tag = " "; $("#pokemons_turn #pokemon2").empty().append(img_attack_tag); } $('#pokemon2').effect(optionsPokemonTwo); setTimeout(restoreAnimations, 3000); }); } #pokemons_turn { text-align: center; width: 760px; height: 320px; margin: 0 auto; border-radius: 10px; } #pokemons_turn td { padding: 12px 15px; border-bottom: 1px #999; width: 33%; } #pokemons_turn .text { font-weight: bold; font-size: 20px; -webkit-text-stroke: 1px black; text-shadow: 1px 1px 0 black, -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 3px 3px 5px black; color: white; } <?php echo $playerOne; ?> <?php echo $playerTwo; ?> VS Yes, I'm playing with Pokemons :) So, is there any workaround for Firefox?
answer count: 1

http://stackoverflow.com/comment/44397858
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28004554
has text: Reloading whole page is not a problem here, it will run just on my localhost. I dont know how to write that kind of internal function. This observer is interesting, i take clooser look at it, if it will work i accept answer.
score: 0

http://stackoverflow.com/comment/44519291
score: 1
has text: Asynchronous call...If the call is made before the the Ajax call returns, it will call the callback and start the timer. It has no clue you do not want to start it. Add logic and why have the same setTimeout calls everywhere, make it a common method!
comment on: http://stackoverflow.com/q/28069942
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44579042
type: AnswerComment
has text: @NeilLunn could you please elaborate your answer since I'm confuse which is the best practices.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28101641

http://stackoverflow.com/a/27995858
has comment: http://stackoverflow.com/comment/44382267
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/44382233
upvote count: 2
has comment: http://stackoverflow.com/comment/138446321
has comment: http://stackoverflow.com/comment/44382493
has body: If the API forces you to pass some function then you can just pass an empty anonymous function: notifications.create("idHere", {options:"something"}, function() {}); Or (especially if you need to do it in multiple places) you could explicitly define your own no-op function: function noop() {} notifications.create("idHere", {options:"something"}, noop); someOtherAPI.someMethod(noop);
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27995825
answers question: http://stackoverflow.com/q/27995825
has comment: http://stackoverflow.com/comment/44382361

http://stackoverflow.com/comment/44336734
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27971988
type: Comment
has text: Which datepicker are you using? Some datapickers such as jQuery UI's have built in [locale support](http://jqueryui.com/datepicker/#localization)...

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

http://stackoverflow.com/a/27990728
has body: function toggleContent(id) { event.preventDefault(); var e = document.getElementById(id); e.style.visibility=="hidden" || e.style.visibility=="" ? e.style.visibility="visible": e.style.visibility="hidden"; } #chart{visibility:hidden;} Chart my chart
answers question: http://stackoverflow.com/q/27990588
score: 0
has comment: http://stackoverflow.com/comment/44372827
has comment: http://stackoverflow.com/comment/44372999
type: Answer

karma-runner
tags question: http://stackoverflow.com/q/28037915
tags question: http://stackoverflow.com/q/28011359
tags question: http://stackoverflow.com/q/28014719
tags question: http://stackoverflow.com/q/28090443
tag name: karma-runner
tags question: http://stackoverflow.com/q/28012603
tags question: http://stackoverflow.com/q/28021504
type: Tag

http://stackoverflow.com/q/28070463
tagged with: google-analytics
tagged with: javascript
has title: Google Analytics Embed API: How to retireve access token?
score: 4
has body: I've used the code provided in this question to gain access to the Google Analytics Embed API. I want to display the statistics from my website without the need for users with the correct privileges to log in (so no login screen). For that reason, I've created a service account and saved the p12 file. However, the following code displays an empty page. Embed API Demo Maybe the Access Token shouldn't be the p12 file? But if so, what should it be? I'm really lost.
answer count: 1
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25896826
upvote count: 4
tagged with: google-analytics-api
downvote count: 0
has answer: http://stackoverflow.com/a/28076790
has comment: http://stackoverflow.com/comment/44527270
has comment: http://stackoverflow.com/comment/44530654
type: Question

http://stackoverflow.com/comment/44378401
type: QuestionComment
comment on: http://stackoverflow.com/q/27993853
has text: You could place all of your JS functions inside of a window.onload = function(){ /* your functions here */ } The reason you are receiving your error message is that the DOM elements do not exist at the time you are trying to edit them.
score: 0
type: Comment

http://stackoverflow.com/comment/44403526
comment on: http://stackoverflow.com/q/28007514
type: Comment
type: QuestionComment
has text: Both events are described in the [documentation](http://nodejs.org/api/stream.html#stream_event_readable), but the difference is somewhat cryptic, `readable` fires when the stream is, well, readable, while data apparently fires when there's data. What the specific differences are, I don't know !
score: 1

http://stackoverflow.com/a/27967102
score: 1
has comment: http://stackoverflow.com/comment/44328028
has comment: http://stackoverflow.com/comment/44328068
has comment: http://stackoverflow.com/comment/44327375
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27966803
type: Answer
has comment: http://stackoverflow.com/comment/44327313
has comment: http://stackoverflow.com/comment/44327111
upvote count: 1
has body: The simple reason as to why your list isn't inline is because you are calling width:100% on each list item. So there is no room for them to sit next to each other with each one taking up 100% of the width. But you also have a few structural issues in your CSS that could be corrected to help this example and future elements you may add to this nav bar. 1) You're trying to set all of your styles on the li tag (code below). For one you're using both float:right and display:inline which is not necessary. In your case you don't need to float your lis (*1) (and I would use inline-block instead because inline doesn't take the width and height of its children (*2)). Next you can remove the background-color (*3) and width (*4) so we can add them to a parent. nav ul li{ /*float: right;*/ //remove (*1) /*width: 50%;*/ //remove (*4) height: 30px; line-height: 30px; text-align: right; /*background-color: #000;*/ //remove (*3) color: #fdfdfd; display: inline-block; //changed (*2) } 2) Set up your nav container to have the color and width instead since it is the parent and could potentially hold other elements like a logo. Also add overflow:hidden which will be used to clear the float we're about to add to the unordered list: nav{ background-color: #000; width: 100%; overflow: hidden; } 3) Finally, to float the whole list container to the right, add the float: right property to the list's parent ul instead (*1): nav ul{ float: right; //add (*1) margin: 0; padding: 0; list-style:none; } Now your list will be inline and floating to the right like you wanted: EXAMPLE 1 DROPDOWN UPDATE In order to get the dropdown to work, you'll need to change a few more things: 1) The parent ul should be hidden, not the list item. So remove display: none from li : nav ul li li { /*display: none;*/ //remove color: #fdfdfd; } 2) Instead add it to the parent ul (#1). You also need to position this element so that it appears outside it's container. You can do this using position:absolute(*2) nav ul li u…
answers question: http://stackoverflow.com/q/27966803

http://stackoverflow.com/comment/44538884
type: QuestionComment
comment on: http://stackoverflow.com/q/28080087
type: Comment
has text: Doesn't matter, a string is a string regardless of the format, but JSON is generally easier to parse and stringify due to the native methods that do just that.
score: 0

http://stackoverflow.com/a/28024381
answers question: http://stackoverflow.com/q/28023519
type: Answer
has body: In your first jsp, have a hidden field with all possible values for the select box, so that on the next jsp you will have the values by the given name, of-course name will be different for hidden field and the select box. CSV hidden first.jsp &lt;select name='chosen' multiple&gt; ... &lt;/select&gt; &lt;input type='hidden' name='toChoose' value='1,2,3,4'/&gt; next.jsp String[] chosen = request.getParameterValues("chosen"); String[] toChoose = request.getParameter("toChoose").split(","); multiple hidden first.jsp &lt;select name='chosen' multiple&gt; ... &lt;/select&gt; &lt;input type='hidden' name='toChoose' value='1'/&gt; &lt;input type='hidden' name='toChoose' value='2'/&gt; .... next.jsp String[] chosen = request.getParameterValues("chosen"); String[] toChoose = request.getParameterValues("toChoose");
score: 0

http://stackoverflow.com/q/28026303
favorite count: 0
type: Question
score: -2
tagged with: php
has body: I am just working on a project where I want to visualize some devices, which have some input- and output-pins. Currently I got all data and attributes of a device from a MariaDB (MySQL) with the help of a PHP-script (output via the var_dump-command). Every device is an object of my device-class, which has some sub-classes. Now I want to visualize every device with its pins, temperature and additional data on a website and I don't know what's the best way to go on from here. The website should be dynamically, so that a click on a pin opens a popup with some information. The website-content should refresh every 1-5 seconds and should have a modern design. Additional I want to generate some graphs and statistics and I don't know if I could solve this with PHP. Should I do this directly in my PHP-script or should I use JavaScript/jQuery in combination with a JSON-File (MySQL -> PHP -> JSON -> JavaScript/HTML?). Because I don't have much experience with JavaScript/jQuery and only have about five weeks left for the project, a rather simple solution would be the best. I looked a little into jQuery and mootools but it is hard to tell which of them (or maybe another solution?) is suited for beginners. I hope you can push me in the right direction.
tagged with: http://stackoverflow.com/tag/json
downvote count: 2
has title: PHP - Visualize Data/Devices
answer count: 1
upvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28026449
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44607464
type: QuestionComment
has text: We've used jqGrid extensively. The latest version requires a commercial license, however. Also, these kinds of questions are off-topic for Stack Overflow, and this question is likely to get closed. See [What topics can I ask about?](http://stackoverflow.com/help/on-topic) for more information.
score: 1
comment on: http://stackoverflow.com/q/28116633
type: Comment

http://stackoverflow.com/comment/44417377
type: AnswerComment
comment on: http://stackoverflow.com/a/28014664
has text: sry! $active = active_links(); i put in index page, return(array($active1,$active2)); at the end of function in functions.php and i edit nav.php like this Poslovni korisnici (current) Korisnici
type: Comment
score: 0

http://stackoverflow.com/q/27986438
has comment: http://stackoverflow.com/comment/44363874
upvote count: 0
answer count: 1
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27986624
downvote count: 2
has body: I'm trying to map radio button to a specific number . Say I have radio button with different numbers X - 1 2 3 4 5 . If I select third radio button, after saving it should have 3 or whatever number stored in the database. I thought of using if else if there are 100 such radio buttons, it can be a problem.
tagged with: grid
type: Question
score: -2
has comment: http://stackoverflow.com/comment/44363886
tagged with: javascript
has title: How to map radio buttons to a specific number?
accepted answer: http://stackoverflow.com/a/27986624

http://stackoverflow.com/comment/44456436
score: 1
comment on: http://stackoverflow.com/q/28035833
type: Comment
type: QuestionComment
has text: That's how closures work, since you reference `numb`. Note that you reuse `numb` for every instance though.

http://stackoverflow.com/q/27993753
has comment: http://stackoverflow.com/comment/44378213
has answer: http://stackoverflow.com/a/27994343
has comment: http://stackoverflow.com/comment/44378229
has comment: http://stackoverflow.com/comment/44378216
type: AnsweredQuestion
tagged with: wordpress
tagged with: php
possible better answer: http://stackoverflow.com/a/54036132
has title: Submit POST data without refreshing on a Wordpress site?
accepted answer: http://stackoverflow.com/a/27994087
type: Question
has answer: http://stackoverflow.com/a/54036132
has body: I have searched the internet a lot for an answer to my question and have not found exactly what I was looking for. So the standard way, from what I have seen, to accomplish this is to use jQuery's submit and AJAX to send the data and redirect to another PHP page. However, I have multiple problems with this. First of all, AJAX. Regular AJAX does not work on Wordpress sites, from what I have seen. How do I get plain old regular AJAX to work? I have not seen a single good tutorial for this that is in plain English for Dummies. Second of all, the PHP redirect. I just want it to send to PHP already on the page. I just want data to go from my Javascript into my PHP already on the page. I don't need a redirect. So, my final question is, can those two problems be fixed in order to do it the traditional way? Or is there a better way to do it that circumvents these problems? I am a complete beginner, BTW- been doing web programming for less than five months. So please, for Dummies or Complete Idiot's language if you can. Here's the form I am submitting from: Search By File Name: Display Results Here's the PHP I want to execute: $submit=$_POST['SearchSubmit']; $results=$_POST['searchterms']; if(isset($submit)) { //whole bunch of stuff, like sql queries and file generation }
has comment: http://stackoverflow.com/comment/44381512
has comment: http://stackoverflow.com/comment/44378170
answer count: 3
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44378340
tagged with: ajax
has answer: http://stackoverflow.com/a/27994087
score: 0

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/27965293
tags question: http://stackoverflow.com/q/28078329
type: Tag
tags question: http://stackoverflow.com/q/28001169

http://stackoverflow.com/q/28089825
answer count: 1
tagged with: jquery
has body: I have a commandButton: <h:commandButton onclick="validate();" action="#{method.exitBtn}" value="Move File"></h:commandButton> However, before calling the action, i want to make sure a value from my SELECT is chosen: Select Amount A B C D E I tried adding onclick="validate();" and within my JS: function validate() { alert("you clicked!"); } However the alert is never displayed. I am using JSF 1.2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44556208
linked to: http://stackoverflow.com/q/1921094
tagged with: jsf
has title: JSF1.2 commandButton validation before calling action
type: Question
linked to: http://stackoverflow.com/q/4421839
tagged with: javascript
has answer: http://stackoverflow.com/a/28090057
tagged with: jsf-1.2
score: 0

http://stackoverflow.com/q/27999021
type: Question
tagged with: arrays
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44387556
tagged with: optimization
has body: I have a function which goes through every name in an object. This object has an array parameter materials which holds other objects. Those objects have the same array parameter which hold more objects and so on. My code lines 3-5 just repeat while adding .material and another variable. Also the code will only go into an object's name four layers down or else I have to keep repeating more code. How can I cut down on this mess? var itemList = function(x) { console.log(x.materials[0].name); for (var i = 1; i &lt; x.materials.length; i++) { console.log(x.materials[i].name); if (x.materials[i].build !== "BasicFactory" &amp;&amp; i !== 0) { for (var j = 1; j &lt; x.materials[i].materials.length; j++) { console.log(x.materials[i].materials[j].name); if (x.materials[i].materials[j].build !== "BasicFactory" &amp;&amp; j !== 0) { for (var k = 1; k &lt; x.materials[i].materials[j].materials.length; k++) { console.log(x.materials[i].materials[j].materials[k].name); if (x.materials[i].materials[j].materials[k].build !== "BasicFactory" &amp;&amp; j !== 0) { for (var l = 1; l &lt; x.materials[i].materials[j].materials[k].materials.length; l++) { console.log(x.materials[i].materials[j].materials[k].materials[l].name); } } } } } } } };
has comment: http://stackoverflow.com/comment/44387535
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/44387642
has title: How can I reduce this code javascript code so it's not as repetitve?
tagged with: recursion
tagged with: refactoring
has answer: http://stackoverflow.com/a/32850000

jquery
tags question: http://stackoverflow.com/q/28017692
tags question: http://stackoverflow.com/q/28071138
tags question: http://stackoverflow.com/q/28069914
tags question: http://stackoverflow.com/q/28104843
tags question: http://stackoverflow.com/q/28116384
tags question: http://stackoverflow.com/q/27965948
tags question: http://stackoverflow.com/q/27983071
tags question: http://stackoverflow.com/q/28019291
tags question: http://stackoverflow.com/q/27981173
tags question: http://stackoverflow.com/q/27988268
tags question: http://stackoverflow.com/q/28057603
tags question: http://stackoverflow.com/q/28095676
tags question: http://stackoverflow.com/q/28115890
tags question: http://stackoverflow.com/q/28043064
tags question: http://stackoverflow.com/q/28052847
tags question: http://stackoverflow.com/q/28037412
tags question: http://stackoverflow.com/q/28114769
tags question: http://stackoverflow.com/q/28096880
tags question: http://stackoverflow.com/q/28079970
tags question: http://stackoverflow.com/q/28038873
tags question: http://stackoverflow.com/q/28092676
tags question: http://stackoverflow.com/q/28029625
tags question: http://stackoverflow.com/q/28009102
tags question: http://stackoverflow.com/q/28104275
tags question: http://stackoverflow.com/q/28072287
tags question: http://stackoverflow.com/q/28039008
tags question: http://stackoverflow.com/q/27999537
tags question: http://stackoverflow.com/q/28073096
tags question: http://stackoverflow.com/q/27988716
tags question: http://stackoverflow.com/q/27989464
tags question: http://stackoverflow.com/q/28085161
tags question: http://stackoverflow.com/q/28116324
tags question: http://stackoverflow.com/q/27977408
tags question: http://stackoverflow.com/q/27977971
tags question: http://stackoverflow.com/q/27991543
tags question: http://stackoverflow.com/q/28023706
tags question: http://stackoverflow.com/q/27995054
tags question: http://stackoverflow.com/q/28024630
tags question: http://stackoverflow.com/q/27982070
tags question: http://stackoverflow.com/q/28042580
tags question: http://stackoverflow.com/q/27990294
tags question: http://stackoverflow.com/q/28071002
tags question: http://stackoverflow.com/q/28033856
tags question: http://stackoverflow.com/q/27976913
tags question: http://stackoverflow.com/q/28035950
tags question: http://stackoverflow.com/q/27992823
tags question: http://stackoverflow.com/q/28112338
tags question: http://stackoverflow.com/q/28077870
tags question: http://stackoverflow.com/q/28082190
tags question: http://stackoverflow.com/q/27979950
tags question: http://stackoverflow.com/q/28055505
tags question: http://stackoverflow.com/q/28100711
tags question: http://stackoverflow.com/q/28116240
tags question: http://stackoverflow.com/q/28082878
tags question: http://stackoverflow.com/q/28106256
tags question: http://stackoverflow.com/q/28012310
tags question: http://stackoverflow.com/q/27999652
tags question: http://stackoverflow.com/q/28113036
tags question: http://stackoverflow.com/q/28006757
tags question: http://stackoverflow.com/q/27967781
tags question: http://stackoverflow.com/q/28029474
tags question: http://stackoverflow.com/q/28064005
tags question: http://stackoverflow.com/q/28005503
tags question: http://stackoverflow.com/q/28058833
tags question: http://stackoverflow.com/q/28004404
tags question: http://stackoverflow.com/q/27965700
tags question: http://stackoverflow.com/q/28033487
tags question: http://stackoverflow.com/q/28081912
tags question: http://stackoverflow.com/q/28015013
tags question: http://stackoverflow.com/q/27967465
tags question: http://stackoverflow.com/q/28097204
tags question: http://stackoverflow.com/q/28063712
tags question: http://stackoverflow.com/q/28047780
tags question: http://stackoverflow.com/q/27989765
tags question: http://stackoverflow.com/q/27984952
tags question: http://stackoverflow.com/q/27983514
tags question: http://stackoverflow.com/q/28054955
tags question: http://stackoverflow.com/q/28095332
tags question: http://stackoverflow.com/q/28095637
tags question: http://stackoverflow.com/q/28031719

http://stackoverflow.com/comment/44374100
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27991568
type: Comment
has text: Everybody claiming this does (or does not) work should share the browser/version they're testing it in. There is potentially a secondary issue where some browsers persist intervals even after document.write has been called.

http://stackoverflow.com/a/28075733
downvote count: 0
type: Answer
has body: You can create markup to insert into the page. You could add an id attribute to the script tag that gets embedded into the external site and have them place the script tag exactly where you want the content to appear. then use some code like below to insert the markup before your script tag. var insertMarkup = function(){ var scripttag = document.getElementById('myscripttag'), YOURCONTENT = ' hello ', //parentNode of script tag p = scripttag.parentNode, //new element to hold your content n = document.createElement("div"); n.id = 'mynewdiv'; n.innerHTML = YOURCONTENT; p.insertBefore(n,scripttag); };
answers question: http://stackoverflow.com/q/28075035
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28075035
score: 1
has comment: http://stackoverflow.com/comment/45254428
type: AcceptedAnswer

http://stackoverflow.com/a/27981921
downvote count: 0
has comment: http://stackoverflow.com/comment/44356686
has comment: http://stackoverflow.com/comment/44356119
type: Answer
upvote count: 1
score: 1
has body: Bootstrap 3's collapse component exposes a few events, see http://getbootstrap.com/javascript/#collapse-events. The hide.bs.collapse event is fired if a section is being collapsed. You can listen to this event and simply return false to stop the collapse. Bootstrap 2's collapse component seems to expose these events in a "non namespaced" manner, see http://getbootstrap.com/2.3.2/javascript.html#collapse. It looks like you can listen to the hide event to achieve this, although I haven't tested it. See this example for Bootstrap 3: $('#collapseOne').on('hide.bs.collapse', function() { return false; }); #accordion { margin: 20px; } Collapsible Group Item #1 Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
answers question: http://stackoverflow.com/q/27981673

http://stackoverflow.com/comment/44562332
has text: No idea which is the gallery on there, the projects page ? I don't get any errors on there? Quite a lot of that page is broken in Opera btw.
comment on: http://stackoverflow.com/q/28092100
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44535330
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28078193
type: QuestionComment
has text: Function wont run, nothing happens.

google-chrome
tags question: http://stackoverflow.com/q/28106995
tags question: http://stackoverflow.com/q/28022284
tags question: http://stackoverflow.com/q/28081515
tags question: http://stackoverflow.com/q/27989886
tags question: http://stackoverflow.com/q/27964661
tags question: http://stackoverflow.com/q/28044968
tags question: http://stackoverflow.com/q/28055779
tags question: http://stackoverflow.com/q/27987061
tags question: http://stackoverflow.com/q/27984541
tags question: http://stackoverflow.com/q/28086026
tags question: http://stackoverflow.com/q/27972284
tags question: http://stackoverflow.com/q/27986868
tags question: http://stackoverflow.com/q/28005359
tags question: http://stackoverflow.com/q/28004857
tags question: http://stackoverflow.com/q/28092194
tags question: http://stackoverflow.com/q/28076875
tags question: http://stackoverflow.com/q/28112000
tags question: http://stackoverflow.com/q/28000198
tags question: http://stackoverflow.com/q/28037346
tags question: http://stackoverflow.com/q/28086734
tags question: http://stackoverflow.com/q/28111173
tags question: http://stackoverflow.com/q/28006082
tags question: http://stackoverflow.com/q/27968906
tags question: http://stackoverflow.com/q/28059905
tags question: http://stackoverflow.com/q/28032206
tags question: http://stackoverflow.com/q/28001438
tags question: http://stackoverflow.com/q/28024563
tags question: http://stackoverflow.com/q/27991737
tags question: http://stackoverflow.com/q/27975144
tags question: http://stackoverflow.com/q/28042719
tags question: http://stackoverflow.com/q/27993279
tags question: http://stackoverflow.com/q/28084940
tags question: http://stackoverflow.com/q/27964533
tags question: http://stackoverflow.com/q/28086491
tags question: http://stackoverflow.com/q/28103054
tags question: http://stackoverflow.com/q/27986879
tags question: http://stackoverflow.com/q/28051250
tags question: http://stackoverflow.com/q/28033856
tags question: http://stackoverflow.com/q/28100688
tags question: http://stackoverflow.com/q/28036863
tags question: http://stackoverflow.com/q/28090773
tags question: http://stackoverflow.com/q/28106097
type: Tag
tags question: http://stackoverflow.com/q/28111033
tags question: http://stackoverflow.com/q/28108774
tags question: http://stackoverflow.com/q/28112333
tags question: http://stackoverflow.com/q/27999383
tags question: http://stackoverflow.com/q/28102988
tags question: http://stackoverflow.com/q/28034255
tags question: http://stackoverflow.com/q/28098999
tag name: google-chrome
tags question: http://stackoverflow.com/q/28002530
tags question: http://stackoverflow.com/q/28006730
tags question: http://stackoverflow.com/q/28006037
tags question: http://stackoverflow.com/q/28058619
tags question: http://stackoverflow.com/q/28079979
tags question: http://stackoverflow.com/q/28062009
tags question: http://stackoverflow.com/q/27999510
tags question: http://stackoverflow.com/q/27997764
tags question: http://stackoverflow.com/q/28009163
tags question: http://stackoverflow.com/q/28058623
tags question: http://stackoverflow.com/q/28071273
tags question: http://stackoverflow.com/q/28026937
tags question: http://stackoverflow.com/q/28060616
tags question: http://stackoverflow.com/q/28101350
tags question: http://stackoverflow.com/q/28046789
tags question: http://stackoverflow.com/q/28069706
tags question: http://stackoverflow.com/q/27966972
tags question: http://stackoverflow.com/q/28109763
tags question: http://stackoverflow.com/q/28040881
tags question: http://stackoverflow.com/q/28057255
tags question: http://stackoverflow.com/q/28011727
tags question: http://stackoverflow.com/q/28044123
tags question: http://stackoverflow.com/q/27996951
tags question: http://stackoverflow.com/q/28023423
tags question: http://stackoverflow.com/q/28056397
tags question: http://stackoverflow.com/q/28101378
tags question: http://stackoverflow.com/q/28105950
tags question: http://stackoverflow.com/q/27981065
tags question: http://stackoverflow.com/q/28105248

http://stackoverflow.com/q/28118907
type: AnsweredQuestion
has body: I am trying to append a comma and then var after the +str here, unsure of how to proceed. xmlhttp.open("GET","getopen.php?q="+str,true); My ultimate goal is to pass two inputs to a processing page live in order to check a few things against a database. I have it working for a single one using GET in the url, just can't seem to figure out how to add an additional item. My current line of reasoning is getting everything to the processing page, then exploding it in php and creating variables there to use in the query to mysql.
type: Question
accepted answer: http://stackoverflow.com/a/28118915
downvote count: 4
upvote count: 0
tagged with: javascript
score: -4
answer count: 1
favorite count: 0
has title: javascript appending to an url
has answer: http://stackoverflow.com/a/28118915

http://stackoverflow.com/comment/44478340
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28019082
score: 0
has text: possible duplicate of [How do I get all articles about people from Wikipedia?](http://stackoverflow.com/questions/4017166/how-do-i-get-all-articles-about-people-from-wikipedia)

http://stackoverflow.com/comment/44542457
type: QuestionComment
comment on: http://stackoverflow.com/q/28081905
has text: are any limits set in server code? There really isn't enough troubleshooting information given for anyone to really help with. Inspect the requests themselves in browser console and see exactly what is returned and that it is what you expect
score: 0
type: Comment

http://stackoverflow.com/q/28101799
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44579095
has answer: http://stackoverflow.com/a/28101924
tagged with: angularjs
type: UnansweredQuestion
has body: I'm looking to have a function run every time an angular directive updates. In my case, I have an array of modal configurations that get used on a modal markup template. Every time the template is used to generate a modal due to a change in the model, I want to run a positionModal() method. scope.$watch in the link function doesn't seem to notice when I change the model, and I cant think of any other way of doing this. I tried a post-link function thinking that the compile function would get called when the directive was applied, but that doesn't seem to work either. Here is my example controller: MyApp.controller("ModalController", function () { //Define scope vars $scope.modals = []; $scope.$on("modalTrigger", function (event, settings) { $scope.modals.push(settings); }); }); Note: I've simplified the controller here- know that it DOES work. Here is the template code: {{modal.title}} {{modal.message}} {{modal.button}} The directive is currently like this: MyApp.directive("modalParent", function () { var positionModals = function (element) { element.find(".modal .content").each(function () { //position logic here }); }; return { restrict: "C", compile: function (tElement) { positionModals(tElement); } }; }); Note: Also simplified for the purposes here. The positionModals() call works when the first modal gets pushed to the array. After that, it stops working. I've tried using the linking function as well, same result. scope.$watch(modals, function(){...}) does not work. Can somebody help me figure out what I'm doing wrong?
upvote count: 1
has comment: http://stackoverflow.com/comment/44579041
has comment: http://stackoverflow.com/comment/44579144
has comment: http://stackoverflow.com/comment/44579132
has comment: http://stackoverflow.com/comment/44579177
has title: Angular: Run method every time a directive updates
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/36935874
downvote count: 0

http://stackoverflow.com/q/27988276
has comment: http://stackoverflow.com/comment/44367815
favorite count: 0
has comment: http://stackoverflow.com/comment/44367871
tagged with: http://stackoverflow.com/tag/html
score: -1
type: AnsweredQuestion
has title: pageyoffset just stays blank
has answer: http://stackoverflow.com/a/27988483
has comment: http://stackoverflow.com/comment/44367827
downvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27988483
upvote count: 0
answer count: 1
has body: I have this script below, the page offset just remains blank eventhough the scrollbar has been moved. please help &lt;script&gt; var menu, yPos; function yScroll(){ menu = document.getElementById('Menu'); menu = document.getElementById('cpBtn'); yPos = document.pageYOffset; if(yPos &gt; 150) { menu.style.position="fixed"; menu.style.top="0px"; } else { menu.style.position="relative"; menu.style.background="red"; } alert(yPos); } document.addEventListener("scroll", yScroll); &lt;/script&gt;

http://stackoverflow.com/a/28223457
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46047716
answers question: http://stackoverflow.com/q/28103861
has comment: http://stackoverflow.com/comment/44906014
has body: I'm not sure if this will help you in your specific case, but you can set a servlet parameter named closeIdleSessions in your web.xml like so: closeIdleSessions true This will timeout user sessions which are only kept alive by UI heartbeat events. It's worth a try at least.
upvote count: 1
has comment: http://stackoverflow.com/comment/44823835
type: Answer

http://stackoverflow.com/q/28049466
has body: I'm having an issue when I try to sort my table based on the content in the first column. My code is pretty much the same as the one in this ANSWER but in my case, unfortunately, it does not work. As you can see running the snippet the table is not correctly sorted. $('.sort-table').click(function(e) { e.preventDefault(); // prevent default button click behaviour var sortAsc = $(this).hasClass('asc'), // ASC or DESC $table = $('#sort-table'), // cache the target table DOM element $rows = $('tbody &gt; tr', $table); // cache all rows from the target table body $rows.sort(function(a, b) { var keyA = $('td',a).eq(0).text().trim(); var keyB = $('td',b).eq(0).text().trim(); if (sortAsc) { return (keyA &gt; keyB) ? 1 : 0; // A bigger than B, sorting ascending } else { return (keyA &lt; keyB) ? 1 : 0; // B bigger than A, sorting descending } }); $rows.each(function(index, row){ $table.append(row); // append rows after sort }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;button class="sort-table asc"&gt;sort ASC&lt;/button&gt; &lt;button class="sort-table desc"&gt;sort DESC&lt;/button&gt; &lt;table id="sort-table" border="1"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;MOSELLE CONSTRUCTION ET FAÇADE SA&lt;/td&gt; &lt;td&gt;xc&lt;/td&gt; &lt;td&gt;xa&lt;/td&gt; &lt;td&gt;x&amp;nbsp;Apr&amp;nbsp;x&lt;/td&gt; &lt;td align="right"&gt;x.x€&lt;/td&gt; &lt;td align="right"&gt;x.x€&lt;/td&gt; &lt;td&gt;CHANTIER ECH SUR ALZETTE-STORE A " Z "&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;TECHNIC MONTAGE SARL&lt;/td&gt; &lt;td&gt;xd&lt;/td&gt; &lt;td&gt;x&lt;/td&gt; &lt;td&gt;x&amp;nbsp;Apr&amp;nbsp;x&lt;/td&gt; &lt;td align="right"&gt;x.x€&lt;/td&gt; &lt;td align="right"&gt;x.x€&lt;/td&gt; &lt;td&gt;ANTONIO GEORGE&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;MENUIS'ART SARL&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;x&lt;/td&gt; &lt;td&gt;x&amp;nbsp;Apr&amp;nbsp;x&lt;/td&gt; &lt;td align="right"&gt;x.x€&lt;/td&gt; &lt;td align="…
type: AnsweredQuestion
tagged with: jquery
tagged with: sorting
type: Question
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/10543618
has title: Issue with table sorting using JavaScript and jQuery
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/28049625
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28049625

http://stackoverflow.com/q/28070891
upvote count: 3
type: UnansweredQuestion
tagged with: safari
has body: I have a textbox that's being automatically focused with jQuery when an element is clicked: my_item.find('input').focus(); It works in Firefox and Chrome as expected: the input area is focused and I can begin typing in it. In Safari the behavior is different though. I click the element, the input is focused, I start to type in the box, and it only lets me type one character. After the first character of input is typed, the input box loses focus and further typing doesn't work unless it's manually clicked for focus again. I've found questions about focus() and Safari working strangely but I think this is a different issue. I've tried the solutions suggested there, such as e.preventdefault() on mouseup and similar, with no effect. How can I get my focused text input area to remain focused while I'm typing in Safari?
score: 3
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: jquery-events
tagged with: focus
has title: jQuery-focused textbox loses focus after one character of input in Safari
has answer: http://stackoverflow.com/a/34093601

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/27994773
tags question: http://stackoverflow.com/q/28041998
tags question: http://stackoverflow.com/q/28001325
tags question: http://stackoverflow.com/q/27993320
tags question: http://stackoverflow.com/q/28008678
tags question: http://stackoverflow.com/q/28032206
tags question: http://stackoverflow.com/q/27979434
tags question: http://stackoverflow.com/q/28116479
tags question: http://stackoverflow.com/q/27968014
tags question: http://stackoverflow.com/q/28062557
tags question: http://stackoverflow.com/q/27970324
tags question: http://stackoverflow.com/q/27979612
tags question: http://stackoverflow.com/q/28035338
tags question: http://stackoverflow.com/q/27975302
tags question: http://stackoverflow.com/q/27992795
tags question: http://stackoverflow.com/q/28085090
tags question: http://stackoverflow.com/q/28104721
tags question: http://stackoverflow.com/q/28059552
tags question: http://stackoverflow.com/q/28023757
tags question: http://stackoverflow.com/q/28033498
tags question: http://stackoverflow.com/q/27990453
tags question: http://stackoverflow.com/q/28066219
tags question: http://stackoverflow.com/q/28106089
tags question: http://stackoverflow.com/q/28086180
tags question: http://stackoverflow.com/q/28012337
tags question: http://stackoverflow.com/q/27970131
tags question: http://stackoverflow.com/q/28007637
tags question: http://stackoverflow.com/q/28057695
tags question: http://stackoverflow.com/q/28010677
tags question: http://stackoverflow.com/q/28016476
tags question: http://stackoverflow.com/q/27965269
tags question: http://stackoverflow.com/q/27971333
tags question: http://stackoverflow.com/q/27992060
tags question: http://stackoverflow.com/q/28041675
tags question: http://stackoverflow.com/q/28092637
tags question: http://stackoverflow.com/q/28096306
tags question: http://stackoverflow.com/q/28018584
tags question: http://stackoverflow.com/q/28061584
tags question: http://stackoverflow.com/q/27973262
tags question: http://stackoverflow.com/q/28024928
tags question: http://stackoverflow.com/q/28074130
tags question: http://stackoverflow.com/q/28036354
tags question: http://stackoverflow.com/q/28103510
tags question: http://stackoverflow.com/q/28026800
tags question: http://stackoverflow.com/q/28057137
tags question: http://stackoverflow.com/q/28075366
tags question: http://stackoverflow.com/q/28023332
tags question: http://stackoverflow.com/q/28069343
tags question: http://stackoverflow.com/q/28079984
tags question: http://stackoverflow.com/q/28001859
tags question: http://stackoverflow.com/q/28088541
tags question: http://stackoverflow.com/q/28107605
tags question: http://stackoverflow.com/q/27970815
tags question: http://stackoverflow.com/q/27973879
tags question: http://stackoverflow.com/q/27989938
tags question: http://stackoverflow.com/q/28109541
tags question: http://stackoverflow.com/q/28027302
tags question: http://stackoverflow.com/q/28082872
tags question: http://stackoverflow.com/q/28024851
tags question: http://stackoverflow.com/q/28098990
tags question: http://stackoverflow.com/q/28067927
tags question: http://stackoverflow.com/q/28039967
tags question: http://stackoverflow.com/q/27980115
tags question: http://stackoverflow.com/q/28008204
tags question: http://stackoverflow.com/q/28110782
tags question: http://stackoverflow.com/q/27980235
tags question: http://stackoverflow.com/q/28020524
tags question: http://stackoverflow.com/q/28053061
tags question: http://stackoverflow.com/q/28106778
tags question: http://stackoverflow.com/q/28016229
tags question: http://stackoverflow.com/q/27969311
tags question: http://stackoverflow.com/q/28023849
tags question: http://stackoverflow.com/q/28020451
tags question: http://stackoverflow.com/q/28012829
tags question: http://stackoverflow.com/q/28085698
tags question: http://stackoverflow.com/q/28030697
tags question: http://stackoverflow.com/q/27969299
tags question: http://stackoverflow.com/q/27977383
tags question: http://stackoverflow.com/q/28015076
tags question: http://stackoverflow.com/q/28019240

http://stackoverflow.com/comment/44417406
comment on: http://stackoverflow.com/a/28014718
score: 1
type: AnswerComment
has text: This works perfectly in a live situation. Many thanks for the references :) Very odd that it does not translate to a real click in jQuery.
type: Comment

http://stackoverflow.com/a/28010985
score: 0
has comment: http://stackoverflow.com/comment/44410036
type: Answer
answers question: http://stackoverflow.com/q/28010866
has body: Check events in docview. Instead of defining the click handler function directly in events, write a function that handles the event as a separate attribute of the view and specify the name of the function as a string. var docview = Backbone.View.extend({ 'events': { 'click': 'onClicked' }, onClicked: function() { //app logic } }); See the docs for more details on how to handle DOM events using jquery selectors in Backbone Views.
has comment: http://stackoverflow.com/comment/44409640

http://stackoverflow.com/q/28070164
score: 0
type: Question
has answer: http://stackoverflow.com/a/28080396
has title: Express "BasicAuth" with async checking of credentials
possible better answer: http://stackoverflow.com/a/28080396
answer count: 2
linked to: http://stackoverflow.com/q/13412157
has answer: http://stackoverflow.com/a/28088000
tagged with: javascript
has body: I'm migrating Express from 3.x to 4.x and since Express 4 doesn't have basicAuth, I'm trying to replace it with basic-auth module. The problem I'm experiencing is with async checking of credentials (via my user_tools.checkCredentials() method). This is how it worked with 3.x: var auth = function(req, res, next) { isFromLAN(req.ip, function(fromLAN) { if (fromLAN) { // console.log('LAN --&gt; no auth needed'); next(); } else { // console.log(req.ip + ' --&gt; WAN --&gt; auth to pass'); basicAuth(function(user, pass, callback) { user_tools.checkCredentials(user, pass, function(valid) { callback(null, valid); }); })(req, res, next); } }); }; Current code, silently failing at checkCredentials: var express = require('express'); var basicAuth = require('basic-auth'); var user_tools = require('./user-tools'); var app = express(); var auth = function(req, res, next) { function isFromLAN(ip) { console.log('isFromLAN()', ip); if (ip === '127.0.0.1') { return true; } return false; } if (isFromLAN(req.ip)) { // console.log('LAN --&gt; no auth needed'); next(); } else { console.log(req.ip + ' --&gt; WAN --&gt; auth to pass'); function unauthorized(res) { console.log('unauthorized --&gt; 401'); res.set('WWW-Authenticate', 'Basic realm=Authorization Required'); return res.sendStatus(401); } var user = basicAuth(req); console.log('basicAuth user:', user); if (!user || !user.name || !user.pass) { console.log('!user'); return unauthorized(res); } user_tools.checkCredentials(user.name, user.pass, function(valid) { console.log('valid:', valid); if (valid) { return next(); } else { return unauthorized(res); } }); } }; app.get('/restricted_api/:value', auth, function(req, res) { // do authorised stuff });
tagged with: express
accepted answer: http://stackoverflow.com/a/28088000
tagged with: basic-authentication
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/a/28117858
accepted answer of: http://stackoverflow.com/q/28117769
has comment: http://stackoverflow.com/comment/44609880
score: 3
type: AcceptedAnswer
downvote count: 0
has body: You can do it with regular expressions: var data = { username: 'peterpan', userProvidedCommand: 'mycommand' } var format = function(data, str) { return str.replace(/\$(\w+)/g, function(_, m) { return data[m] || '' }) } var result = strings.map(format.bind(null, data))
has comment: http://stackoverflow.com/comment/44610307
type: Answer
has comment: http://stackoverflow.com/comment/44611382
answers question: http://stackoverflow.com/q/28117769
upvote count: 3

http://stackoverflow.com/q/28019313
tagged with: undefined
tagged with: jquery
linked to: http://stackoverflow.com/q/14220321
has title: JavaScript Function gives value correct inside but returns undefined/null
duplicate of: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/44425072
tagged with: return
answer count: 0
type: UnansweredQuestion
score: 0
has body: Today I am amazed that a function giving correct value inside the function, but when I tried to return the same it gives undefined or null value. I don't know why. Any answer will be greatly appreciated. Here is my Javascript function code. You can see the same on JSfiddle : http://jsfiddle.net/tn8e1tpr/5/ function GetAddress(lat,lng) { var ret_addr=''; var latlng = new google.maps.LatLng(lat, lng); var geocoder = geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'latLng': latlng }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[1]) { //$('#origin_add').attr('value', results[1].formatted_address); ret_addr=results[1].formatted_address; origin_address=ret_addr; $('#origin_add').attr('value', origin_address); return origin_address; } } }); } Thanks in Advance
has comment: http://stackoverflow.com/comment/44425513
tagged with: javascript
has comment: http://stackoverflow.com/comment/44425264
type: Question
tagged with: google-maps

http://stackoverflow.com/comment/44492371
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27971489
has text: With your suggestion, my call GET /api/cameras return to index, but on server route, /api/cameras is defined before app.all('/*',....
score: 0

http://stackoverflow.com/a/29848891
score: 1
type: Answer
answers question: http://stackoverflow.com/q/28031873
upvote count: 1
has body: try fix the function calculateXLabelRotation in chart.js calculateXLabelRotation : function(){ ... //↓↓↓ this.xLabelRotation = 0; //↑↑↑ if (this.xLabelRotation &gt; 0){ this.endPoint -= Math.sin(toRadians(this.xLabelRotation))*originalLabelWidth + 3; } ... },
downvote count: 0

http://stackoverflow.com/q/28029677
upvote count: 2
answer count: 2
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/44449021
has body: I saw on stackoverflow we can do this to populate js variables with ViewBags (with razor): @{ var jss = new System.Web.Script.Serialization.JavaScriptSerializer(); var userInfoJson = jss.Serialize(ViewBag.User); } with this: &lt;script&gt; //use Json.parse to convert string to Json var userInfo = JSON.parse('@Html.Raw(userInfoJson)'); &lt;/script&gt; I want to do the same thing with aspx not razor. Can you help me?
has answer: http://stackoverflow.com/a/28029781
tagged with: viewbag
accepted answer: http://stackoverflow.com/a/28033256
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/44444195
type: Question
has answer: http://stackoverflow.com/a/28033256
tagged with: asp.net-mvc
tagged with: javascript
has title: Populate javascript variable from ViewBag?
has comment: http://stackoverflow.com/comment/44445905
possible better answer: http://stackoverflow.com/a/28029781

http://stackoverflow.com/q/28017540
score: 0
answer count: 1
has title: Cordova plugin javascript gets corrupted when added to project
accepted answer: http://stackoverflow.com/a/28264312
tagged with: cordova-plugins
tagged with: cordova
has comment: http://stackoverflow.com/comment/44822225
has comment: http://stackoverflow.com/comment/44823938
type: AnsweredQuestion
has body: I wrote a small Cordova plugin that gets corrupted when added to another Cordova project. This plugin is basically native iOS Core Data wrapped in Javascript. The Javascript file exposing the functions is the one that gets corrupted. The original file is as follows: cordova.define("com.aga.cordova.plugin.ioscoredata.plugincoredata", function(require, exports, module) { var exec = require('cordova/exec'), cordova = require('cordova'); var plugincoredata = { saveJSON: function(successCallback, errorCallback, tableName, json) { exec(successCallback, errorCallback, "PluginCoreData", "saveJSON", [tableName, json]); }, loadJSON: function(successCallback, errorCallback, tableName, extraColumns) { exec(successCallback, errorCallback, "PluginCoreData", "loadJSON", [tableName, extraColumns]); }, clear: function(successCallback, errorCallback, tableName) { exec(successCallback, errorCallback, "PluginCoreData", "clear", [tableName]); } }; module.exports = plugincoredata; }); The file is copied properly into the project plugins folder, but for some reason is wrongly modified when copied to platform/ios/ProjectName/www/plugin/PluginName/js/plugincoredata.js (Same happens after running cordova prepare). The file looks like this there: cordova.define("com.aga.cordova.plugin.ioscoredata.plugincoredata", function(require, exports, module) { cordova.define("com.aga.cordova.plugin.ioscoredata.plugincoredata", function(require, exports, module) { var exec = require('cordova/exec'), cordova = require('cordova'); var plugincoredata = { saveJSON: function(successCallback, errorCallback, tableName, json) { exec(successCallback, errorCallback, "PluginCoreData", "saveJSON", [tableName, json]); }, loadJSON: function(successCallback, errorCallback, tableName, extraColumns) { exec(successCallback, errorCallback, "PluginCoreData", "loadJSON", [tableName, extraColumns]); }, clear: function(successCallback, errorCallback, tableName) { exec(successCallback, errorCallback, "PluginCoreData", "clear", …
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28264312

http://stackoverflow.com/comment/44366300
comment on: http://stackoverflow.com/q/27985729
has text: Your edit points to security rules. Do you have customized security rules? If so, please add them to the question.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28080084
has body: I have a userscript that loads jQuery using the @require directive in the metadata block: // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js I guess WebStorm doesn't "know" about userscripts, so it has no idea that that, say, $ is a function that will already be defined by the time I reference it in my userscript. Can I make WebStorm believe that my file effectively has the contents of jquery.min.js inlined at the top of the file, so that it'll stop giving me warnings about $ being undefined? e.g. can I maybe place a local copy of jquery.min.js in a local folder somewhere and tell WebStorm that it can assume all declarations made in that file?
downvote count: 1
has comment: http://stackoverflow.com/comment/44539011
type: Question
linked to: http://stackoverflow.com/q/13997468
score: 3
has comment: http://stackoverflow.com/comment/44538933
tagged with: userscripts
has title: How can I convince WebStorm that my userscript loads jQuery?
upvote count: 4
has answer: http://stackoverflow.com/a/28080199
answer count: 1
tagged with: javascript
tagged with: webstorm
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28080199

http://stackoverflow.com/a/28003252
accepted answer of: http://stackoverflow.com/q/28003077
has body: Math.round does the job with a little more extra work. Divide by 5, round it, multiply it back by 5. It is a method I used quite a bit in the past. Here is a simple snippet to show it is working. function RoundTo(number, roundto){ return roundto * Math.round(number/roundto); } alert(RoundTo(543.55, 5)); alert(RoundTo(541.99, 5));
upvote count: 14
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44395943
type: Answer
answers question: http://stackoverflow.com/q/28003077
score: 14
downvote count: 0

http://stackoverflow.com/comment/44349474
type: Comment
comment on: http://stackoverflow.com/q/27978743
score: 0
type: QuestionComment
has text: Ya.. got it.. sorry I didn't find that..

http://stackoverflow.com/q/27971242
has body: I have an address model with a street2 attribute. export default DS.Model.extend({ street2: DS.attr('string'); )}; When updating an address record - address.save(); - it doesn't decamelize the street2 key into street_2. This results in it getting sanitized on the backend. How and where do I tell ember to send updates to an address record with street_2 instead of street2. Would this be in the adapter? Thanks in advance!!
tagged with: ember-data
tagged with: javascript
has title: Ember: Deserialize outgoing data key
score: 0
answer count: 1
tagged with: ember-cli
tagged with: ember.js
has answer: http://stackoverflow.com/a/27971805
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/28022055
type: Question
has comment: http://stackoverflow.com/comment/44430173
has body: I'm trying to build small application. It contains textarea and a button panel below wich is showing when I put first letter in this textarea. I had to use isButtonVisible() method. It works fine. The problem starts when i click on "send" a request with data from textarea to data.php script by method POST (it's point of my task. it have to be send() method). When request is done, script should show JavaScript alert() with "Data saved". My angularjs script (ng-controller.js) looks like: angular.module("Textarea", []).controller("TextAreaCtrl", TextAreaCtrl); function TextAreaCtrl($scope, $http) { 'use strict'; $scope.success = false; $scope.httpError = false; this.isButtonVisible = function() { return $scope.text; }; this.send = function () { var data = $scope.text; if(!data) return false; $http.post('data.php', data) .success(function (data) { $scope.success = true; }) .error(function (data) { $scope.httpError = true; }); }; };
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44431882
has comment: http://stackoverflow.com/comment/44430192
has comment: http://stackoverflow.com/comment/44430102
tagged with: angularjs
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44433413
has title: I can't send a request by POST method from angularjs to php
tagged with: php
has comment: http://stackoverflow.com/comment/44430305
has answer: http://stackoverflow.com/a/28022273

http://stackoverflow.com/q/28068300
tagged with: javascript
has title: record not loaded on time to compute property in a component?
tagged with: ember.js
has body: Component: {{foods-table foods=model}} receives foods attribute from outer scope. This component has a computed property: saturatedSum: function() { var sum = this.get('foods').reduce(function(previousValue, food, index){ return previousValue + food.get("saturated"); }, 0); return sum; }.property('foods.@each') //key @each instructs to update bindings I'm using this component twice, once in meals route and once in meals.findFood route. First component instance renders {{saturatedSum}} as NAN and second component gives appropriate numerical sum. I'm assuming record associated with attribute passed from outer scope is not fully loaded before reduction (this.get('foods').get('length') will return 4, but this.get('foods').objectAt(0).get('saturated') will be undefined. What is the elegant way to deal with this?
type: UnansweredQuestion
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/28068497
has answer: http://stackoverflow.com/a/28070162

http://stackoverflow.com/comment/44554461
has text: I make the same thing here: http://jsbin.com/wuhuro but I need now to rotate path so last line must come fromm bottom at 90deg from trinagle
comment on: http://stackoverflow.com/a/28079114
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44392664
type: Comment
score: 1
has text: @A.Wolff - Here's a [**Perf**](http://jsperf.com/fragments-jquery-and-more), took some time as I was testing a theory. It actually seems it makes more difference to use `html()` instead of `append()`, then what is being used to iterate. `append()` is just so much slower than `html()`
type: AnswerComment
comment on: http://stackoverflow.com/a/28001653

meteor
tags question: http://stackoverflow.com/q/28069808
tags question: http://stackoverflow.com/q/28034479
tags question: http://stackoverflow.com/q/28036494
tags question: http://stackoverflow.com/q/28050237
tags question: http://stackoverflow.com/q/27976207
tags question: http://stackoverflow.com/q/28108346
tags question: http://stackoverflow.com/q/27996352
tags question: http://stackoverflow.com/q/28040684
tags question: http://stackoverflow.com/q/28062206
tags question: http://stackoverflow.com/q/28069273
tags question: http://stackoverflow.com/q/27993227
tags question: http://stackoverflow.com/q/27993603
tags question: http://stackoverflow.com/q/27974188
tags question: http://stackoverflow.com/q/28016775
tags question: http://stackoverflow.com/q/28007495
tags question: http://stackoverflow.com/q/28026138
tags question: http://stackoverflow.com/q/28053900
tags question: http://stackoverflow.com/q/28023091
tags question: http://stackoverflow.com/q/28077828
tags question: http://stackoverflow.com/q/28015319
tags question: http://stackoverflow.com/q/28016921
tags question: http://stackoverflow.com/q/27991128
tags question: http://stackoverflow.com/q/28042762
tags question: http://stackoverflow.com/q/28015952
tags question: http://stackoverflow.com/q/28069321
tags question: http://stackoverflow.com/q/27980361
tags question: http://stackoverflow.com/q/27988063
tags question: http://stackoverflow.com/q/28036778
tags question: http://stackoverflow.com/q/27977993
tags question: http://stackoverflow.com/q/28096174
tags question: http://stackoverflow.com/q/28049219
type: Tag
tags question: http://stackoverflow.com/q/28053385
tags question: http://stackoverflow.com/q/27972532
tags question: http://stackoverflow.com/q/28063710
tags question: http://stackoverflow.com/q/28046351
tags question: http://stackoverflow.com/q/28028944
tags question: http://stackoverflow.com/q/27980267
tags question: http://stackoverflow.com/q/28038733
tags question: http://stackoverflow.com/q/27998979
tags question: http://stackoverflow.com/q/27967073
tags question: http://stackoverflow.com/q/28086573
tags question: http://stackoverflow.com/q/28103831
tags question: http://stackoverflow.com/q/28100245
tags question: http://stackoverflow.com/q/28095920
tags question: http://stackoverflow.com/q/28118625
tags question: http://stackoverflow.com/q/28010456
tags question: http://stackoverflow.com/q/28045837
tags question: http://stackoverflow.com/q/28099560
tags question: http://stackoverflow.com/q/28075985
tags question: http://stackoverflow.com/q/28001968
tags question: http://stackoverflow.com/q/28036867
tags question: http://stackoverflow.com/q/27977244
tags question: http://stackoverflow.com/q/28005070
tags question: http://stackoverflow.com/q/28071348
tags question: http://stackoverflow.com/q/28053338
tags question: http://stackoverflow.com/q/27977073
tags question: http://stackoverflow.com/q/28027352
tags question: http://stackoverflow.com/q/28069445
tags question: http://stackoverflow.com/q/27969285
tags question: http://stackoverflow.com/q/28017652
tags question: http://stackoverflow.com/q/27994115
tags question: http://stackoverflow.com/q/28019570
tags question: http://stackoverflow.com/q/27999471
tags question: http://stackoverflow.com/q/28050645
tags question: http://stackoverflow.com/q/28105957
tags question: http://stackoverflow.com/q/28116723
tags question: http://stackoverflow.com/q/27967328
tags question: http://stackoverflow.com/q/28084160
tag name: meteor
tags question: http://stackoverflow.com/q/28072366
tags question: http://stackoverflow.com/q/28034512
tags question: http://stackoverflow.com/q/28017295
tags question: http://stackoverflow.com/q/28050304
tags question: http://stackoverflow.com/q/28079020
tags question: http://stackoverflow.com/q/28035709

http://stackoverflow.com/q/28061584
linked to: http://stackoverflow.com/q/2278534
upvote count: 1
answer count: 1
has body: I am trying to show a wind direction on current location on google map with a circle and arrow as an example using html and javascript . I have a code which will display circle but not arrow. I have gone through another example but i am not getting the exact result. Can anyone help me on this issue. Below is my html code Click the button to get your position. Try It
has comment: http://stackoverflow.com/comment/44504877
has comment: http://stackoverflow.com/comment/44506576
downvote count: 3
has answer: http://stackoverflow.com/a/28068108
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44507206
has comment: http://stackoverflow.com/comment/44506188
tagged with: google-maps
tagged with: javascript
has title: Direction through arrow in Google Map
favorite count: 0
tagged with: google-maps-api-3
type: Question
tagged with: http://stackoverflow.com/tag/html
score: -2
tagged with: compass-geolocation

http://stackoverflow.com/q/27985858
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27985909
score: 0
has answer: http://stackoverflow.com/a/27985909
has comment: http://stackoverflow.com/comment/44362796
has answer: http://stackoverflow.com/a/27986054
type: AnsweredQuestion
has title: How to perform a function when value is assigned to an object member?
accepted answer: http://stackoverflow.com/a/27986054
has body: I have an object, appointment, with a member, time: function appointment(date_string){ this.time = ???; } When I get time from the database, it has trailing zeros. I'd like to remove them before assigning the value. For instance: var a = new appointment("01/15/2015"); a.time = "01:33:00.000"; console.log(a.time) // should display 01:33:00, NOT 01:33:00.000 I tried function appoinment(date_sting) { this.time = function(){return (this.time).replace(".000","");}; } but this does not work in the scenario.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/44362636

dojo
tags question: http://stackoverflow.com/q/28098114
tags question: http://stackoverflow.com/q/28023860
tags question: http://stackoverflow.com/q/28041151
tags question: http://stackoverflow.com/q/28007590
tags question: http://stackoverflow.com/q/28019050
type: Tag
tags question: http://stackoverflow.com/q/27995835
tags question: http://stackoverflow.com/q/27968072
tags question: http://stackoverflow.com/q/28093205
tags question: http://stackoverflow.com/q/28108693
tags question: http://stackoverflow.com/q/28074795
tags question: http://stackoverflow.com/q/27979663
tag name: dojo

react-rails
tags question: http://stackoverflow.com/q/28079621
type: Tag
tag name: react-rails

http://stackoverflow.com/comment/44403145
comment on: http://stackoverflow.com/a/28007085
type: Comment
has text: Sorry i couldnt get . Can you please explain what should be the name of the view ?
score: 0
type: AnswerComment

http://stackoverflow.com/q/27994609
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/44382105
has comment: http://stackoverflow.com/comment/44379845
has title: Calling multiple WEB API calls with a Javascript Promise
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27995989
has answer: http://stackoverflow.com/a/30142405
has answer: http://stackoverflow.com/a/27994671
has comment: http://stackoverflow.com/comment/44381817
has comment: http://stackoverflow.com/comment/44379857
type: Question
has comment: http://stackoverflow.com/comment/44380369
tagged with: javascript
has body: I am trying to wrap my head around Javascript Promises and am confused on where I need to put what. The scenario is the following. I three JavaScript methods that each call out to a WEB API to save some data. For simplicity sake, I will call them SaveA(), SaveB() and SaveC(). I want them to fire SaveA() first and then have SaveB() fire after SaveA() has finished processing. Then the same scenario for SaveB() and SaveC(). The WEB API calls in the Save() methods return a null value when finished. I think this may be part of my confusion. These can be changed to return something else though if need be. The WEB API is written in C#. Below is a simplified version of what one of the WEB API methods look like. //WEB API Signature public ActionResult InsertSomething(SomeObjectModel model) { Insert(model); return null; } Where am I supposed to put my SaveA call? Should it be in a Promise like below? function SaveAPromise() { return new Promise(function (fulfill, reject) { try { SaveA(); } catch (err) { reject(err); } fulfill("success"); }); } If so, what do I do with the fulfill? Do I need to turn it into a function to call SaveB()? Other examples I have seen online have shown stringing together calls using the then part. So does that mean I need to do something like this? If so, then what is the role of the fulfill method in SaveAPromise()? var promise = SaveAPromise(); promise.then(SaveB()); promise.then(SaveC()); Thanks in advance for any help or clarification you can provide.

http://stackoverflow.com/comment/44869376
type: AnswerComment
comment on: http://stackoverflow.com/a/28156370
type: Comment
score: 1
has text: Thanks so much for taking the time to write this out! It's tremendously helpful. Based on your underscore example, I've mostly figured out how I need to do this with D3. Thanks again.

http://stackoverflow.com/comment/44403214
has text: you have duplicate script declarations in your markup, is that deliberate?
score: 2
comment on: http://stackoverflow.com/q/28006300
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28005235
type: UnansweredQuestion
has body: I am trying to set a new value in my firebase, but I always get the error Uncaught TypeError: Cannot read property 'addEventListener' of null. Firebase.js is loaded in the head of the file. What do I have to change in my code to get it working? index.html Update
tagged with: firebase
type: Question
tagged with: database
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/28005251
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
has title: addEventListener not working, always returns null
favorite count: 0

http://stackoverflow.com/a/28018064
answers question: http://stackoverflow.com/q/28018044
score: 3
downvote count: 0
type: Answer
has body: The change event fires when an elements value changes. For select boxes, checkboxes, and radio buttons, the event is fired immediately when the user makes a selection with the mouse, but for the other element types the event is deferred until the element loses focus. In other words, on an input, the change event fires when the element loses focus, not when you type, and that is the default behaviour. That's why there are key events as well, and on modern browsers you can catch most changes to an input with the input event $("#mobile-number").on('input',function(){ ...
upvote count: 3

http://stackoverflow.com/q/27987061
has title: Google Chrome Storage Saving
has comment: http://stackoverflow.com/comment/44365385
has comment: http://stackoverflow.com/comment/44366173
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/44367283
has comment: http://stackoverflow.com/comment/44365052
has comment: http://stackoverflow.com/comment/44365304
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44367801
has comment: http://stackoverflow.com/comment/44367111
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/44365165
tagged with: local-storage
has comment: http://stackoverflow.com/comment/44367390
has comment: http://stackoverflow.com/comment/44364979
has comment: http://stackoverflow.com/comment/44365077
has comment: http://stackoverflow.com/comment/44365225
type: Question
has body: So I've created an options page and I'm trying to save the values of a form to storage, but I keep getting the console error "Uncaught TypeError: Cannot read property 'sync' of undefined". HTML Form: When Search Tab is opened the Search Panel should be: Open Closed The Search Bar Background Color Should Be: Black White Grey Green Blue Red Orange The Search Bar Text Color Should Be: Black White Grey Green Blue Red Orange Javascript: function loadOptions() { var searchPanelDefault = 'open'; var barBackgroundDefault= '#000000'; var barColorDefault = '#ffffff'; chrome.storage.local.get('searchPanelOption', function (x) { if(!x.searchPanel) { searchPanel.value = 'open'; } else { searchPanel.value = (x.SearchPanel); } }); chrome.storage.local.get('barBackgroundOption', function (x) { if(!x.searchPanel) { searchPanel.value = '#000000'; } else { searchPanel.value = (x.SearchPanel); } }); chrome.storage.local.get('barColorOption', function (x) { if(!x.searchPanel) { SearchPanel.value = '#ffffff'; } else { SearchPanel.value = (x.SearchPanel); } }); } function saveOptions() { var searchPanelDisplay = searchPanel.value; var barBackgroundDisplay = barBackground.value; var barColorDisplay = barColor.value; if (!searchPanelDisplay) { console.log('Error: No SearchPanel Value'); searchPanelDisplay = 'open'; } else if(!barBackgroundDisplay) { console.log('Error: No barBackground Value'); barBackgroundDisplay = '#000000'; } else if(!barColorDisplay) { console.log('Error: No barColor Value'); barColorDisplay = '#ffffff'; } chrome.storage.sync.set({'searchPanelOption': SearchPanelDisplay}, function() { console.log('SearchPanel saved'); }); chrome.storage.sync.set({'barBackgroundOption': barBackgroundDisplay}, function() { console.log('SearchPanel saved'); }); chrome.storage.sync.set({'barColorOption': barColorDisplay}, function() { console.log('SearchPanel saved'); }); } function eraseOptions() { location.reload(); } Manifest: { "background": { "persistent": false, "scripts": [ "script/…
score: 0
has comment: http://stackoverflow.com/comment/44365294
tagged with: javascript
has comment: http://stackoverflow.com/comment/44365453

http://stackoverflow.com/comment/44481708
has text: I don't see anything wrong with your use of promises, and the code sample in the [documentation](https://www.firebase.com/docs/web/libraries/angular/api.html#angularfire-firebasearray-addnewdata) seems to _imply_ that the collection should be updated by the time `then` is called. Strange.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/28030457

http://stackoverflow.com/comment/44587253
comment on: http://stackoverflow.com/a/28106335
score: 0
type: Comment
has text: OP is using Bootstrap 3 and you have linked to Bootstrap 2
type: AnswerComment

http://stackoverflow.com/comment/44476735
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/28047264
has text: This can be done with pure css only. Just use ` ` for the header...
type: Comment

http://stackoverflow.com/q/27991660
has comment: http://stackoverflow.com/comment/44374192
has body: I have one question about popup slide. I want to do as in the picture: So i am using this for click to show post detail: function getAreaInfo(id) { var infoBox = document.getElementById("infoBox"); if (infoBox == null) return true; var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState != 4) return; if (xhr.status != 200) alert(xhr.status); infoBox.innerHTML = xhr.responseText; }; xhr.open("GET", "get_post_info.php?msg_id=" + id, true); xhr.send(null); return false; } This is link: &lt;a href="get_post_info.php?msg_id=351" class="" onclick="return getAreaInfo(351);" data-id="7"&gt; Click To Show Post Details &lt;/a&gt; Showing the details div: &lt;div id="infoBox"&gt;&lt;/div&gt;
has comment: http://stackoverflow.com/comment/44374141
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27994329
has title: Click to show detail using Jquery and ajax
has comment: http://stackoverflow.com/comment/44374155
type: Question
has comment: http://stackoverflow.com/comment/44374226
has comment: http://stackoverflow.com/comment/44374115
has comment: http://stackoverflow.com/comment/44374083
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27994329

dom
tags question: http://stackoverflow.com/q/28031931
tags question: http://stackoverflow.com/q/28115799
tags question: http://stackoverflow.com/q/27974795
type: Tag
tags question: http://stackoverflow.com/q/28019581
tags question: http://stackoverflow.com/q/28099963
tags question: http://stackoverflow.com/q/28048407
tags question: http://stackoverflow.com/q/28005496
tags question: http://stackoverflow.com/q/28113425
tags question: http://stackoverflow.com/q/28028508
tags question: http://stackoverflow.com/q/27977206
tags question: http://stackoverflow.com/q/28076755
tags question: http://stackoverflow.com/q/28117957
tags question: http://stackoverflow.com/q/28017936
tags question: http://stackoverflow.com/q/28069808
tags question: http://stackoverflow.com/q/28059891
tags question: http://stackoverflow.com/q/28002476
tags question: http://stackoverflow.com/q/27980286
tags question: http://stackoverflow.com/q/28045735
tags question: http://stackoverflow.com/q/28001553
tags question: http://stackoverflow.com/q/27995245
tags question: http://stackoverflow.com/q/28005368
tags question: http://stackoverflow.com/q/28032461
tags question: http://stackoverflow.com/q/28076976
tags question: http://stackoverflow.com/q/28053120
tags question: http://stackoverflow.com/q/28119674
tags question: http://stackoverflow.com/q/28022284
tags question: http://stackoverflow.com/q/28019019
tags question: http://stackoverflow.com/q/27988422
tags question: http://stackoverflow.com/q/28002187
tags question: http://stackoverflow.com/q/28096584
tags question: http://stackoverflow.com/q/28055887
tags question: http://stackoverflow.com/q/27983023
tags question: http://stackoverflow.com/q/28081478
tags question: http://stackoverflow.com/q/28117639
tags question: http://stackoverflow.com/q/28052114
tags question: http://stackoverflow.com/q/28100003
tags question: http://stackoverflow.com/q/28030189
tags question: http://stackoverflow.com/q/28019279
tags question: http://stackoverflow.com/q/28040234
tags question: http://stackoverflow.com/q/28078057
tags question: http://stackoverflow.com/q/28047686
tags question: http://stackoverflow.com/q/28044989
tags question: http://stackoverflow.com/q/28109541
tags question: http://stackoverflow.com/q/28088186
tags question: http://stackoverflow.com/q/28079064
tags question: http://stackoverflow.com/q/27980879
tags question: http://stackoverflow.com/q/28016775
tag name: dom
tags question: http://stackoverflow.com/q/28102909
tags question: http://stackoverflow.com/q/28111237
tags question: http://stackoverflow.com/q/27975041
tags question: http://stackoverflow.com/q/28014004
tags question: http://stackoverflow.com/q/28027252
tags question: http://stackoverflow.com/q/28055858
tags question: http://stackoverflow.com/q/28084523
tags question: http://stackoverflow.com/q/28023348
tags question: http://stackoverflow.com/q/28043116
tags question: http://stackoverflow.com/q/28027039
tags question: http://stackoverflow.com/q/28043281

http://stackoverflow.com/q/27997764
has comment: http://stackoverflow.com/comment/44387090
type: Question
tagged with: javascript
has body: I'm developing Google Chrome extension. I want to separate my libraries which I wrote in different content scripts. I've created a simple loader for injecting scripts orderly. chrome.tabs.onUpdated.addListener(showIntercomAction); function insert(tabId, files) { var file = files.shift(); if (file) { chrome.tabs.executeScript(tabId, extend({file: file}, insertOptions), function () { insert(tabId, files); }); } } function showIntercomAction(tabId, changeInfo, tab) { chrome.pageAction.show(tabId); var files = ['js/jquery-1.11.2.min.js', 'js/RangeSliderThumbPainter.js', 'js/content.js']; insert(tabId, files); } in RangeSliderThumbPainter I wrote this window.TEST = "TEST FROM RANGE"; And in Content.js try to use it console.log("TEST in content.js is ", TEST); // undefined I created variable in RangeSliderThumbPainter.js and I want to use it in content.js. How to implement this stuff?
score: 0
tagged with: google-chrome-extension
has title: How to pass variable to another content script in Google Chrome extension?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44386995
has comment: http://stackoverflow.com/comment/44387527
answer count: 0
has comment: http://stackoverflow.com/comment/44387116
tagged with: google-chrome

http://stackoverflow.com/comment/44347116
comment on: http://stackoverflow.com/a/27977393
score: 0
type: Comment
has text: [This plunker](http://plnkr.co/edit/b7NUXBMpUtEexRZoCY1w?p=preview) shows the `console.log(evt);` having no action when the space bar is pressed.
type: AnswerComment

http://stackoverflow.com/a/37487480
type: Answer
answers question: http://stackoverflow.com/q/28004585
upvote count: 3
has body: Using a div with backgroundPosition makes this easy since it will auto-clip for us without having to use overflow. For example, here is the texture atlas from the popular Cookie Clicker idle game. Using a negative offset for x and y we can select a sub-sprite from the texture atlas: // Inputs -- change this based on your art var tw = 48; // Texture Atlas Tile Width (pixels) var th = 48; // Texture Atlas Tile Height (pixels) var tx = 3; // tile index x (relative) (column) var ty = 2; // tile index y (relative) (row) var src = 'http://orteil.dashnet.org/cookieclicker/img/icons.png'; // Calculations -- common code to sub-image of texture atlas var div = document.getElementById('clip'); var x = (tx*tw); // tile offset x position (absolute) var y = (ty*th); // tile offset y position (absolute) div.style.width = tw + 'px'; div.style.height = th + 'px'; div.style.backgroundImage = "url('" + src + "')"; div.style.backgroundPosition = '-' + x + 'px -' + y + 'px'; // You don't need the remaining parts. They are only to // show the sub-sprite in relation to the texture atlas div.style.border = "1px solid blue"; // only for demo purposes // highlight where in the original texture the sub sprite is var rect = document.getElementById('sprites').parentNode.getBoundingClientRect(); var hi = document.getElementById('highlight'); hi.style.zIndex = 999; // force to be on top hi.style.position = "absolute"; hi.style.width = tw + 'px'; hi.style.height = th + 'px'; hi.style.left = (rect.left + x) + 'px'; hi.style.top = (rect.top + th + y) + 'px'; // skip sub-sprite height hi.style.border = '1px solid red'; &lt;div id="clip"&gt;&lt;/div&gt; &lt;img id="sprites" src="http://orteil.dashnet.org/cookieclicker/img/icons.png"&gt; &lt;div id="highlight"&gt;&lt;/div&gt;
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/62476972

http://stackoverflow.com/q/27984129
has title: Update shared data between 2 controllers with services
type: Question
tagged with: javascript
tagged with: angularjs-scope
answer count: 2
upvote count: 1
tagged with: dom-events
favorite count: 0
has body: I have 2 controllers where I'd like to share data in between. One controller supports a view with a table that often changes it's "selected item" and the other fetches data from an API using said item information. Since those two controllers support views and are on the same page, they don't have a classic parent/child hierarchy, but are more 'siblings'. Currently, I'm using a simple 'event bus' service which calls an event on the root scope using $emit which I inject in both controllers, where as one listens for changes using $rootScope.$on. Now I heard many times that this is a bad solution and I should use services to share data, but no one really explains how it's possible to watch the data for changes when also using $watch is bad $broadcast is bad (there seems to be really a war on SO on which solution should more be avoided). My current solution: Controller1 export class Controller1 { private eventBus : Components.IEventBusService; constructor(eventBus: Components.IEventBusService) { this.eventBus = eventBus; } void itemSelected(item : IItemModel) { this.eventBus.emit("itemSelected", { "item" : item }); } } Controller 2 export class Controller2 { constructor($scope : ng.IScope, eventBus : Components.IEventBusService) { eventBus.on("itemSelected", (event, data) =&gt; this.onItemSelected(data), $scope); } private onItemSelected(data: any) { // do something with data.item! } } EventBusService export interface IEventBusService { on(event, callback, scope): void; emit(event, data): void; } class EventBusService implements IEventBusService { private rootScope: ng.IRootScopeService; constructor($rootScope: ng.IRootScopeService) { this.rootScope = $rootScope; } on(event, callback, scope) : void { var unbind = this.rootScope.$on(event, callback); if(scope) { scope.$on("$destroy", unbind); } } emit(event, data) : void { data = data || {}; this.rootScope.$emit(event, data); } } Are there any major drawbacks using this solution? Is 'the service way' better regarding to u…
tagged with: angularjs
has answer: http://stackoverflow.com/a/27988575
tagged with: typescript
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27984536
accepted answer: http://stackoverflow.com/a/27984536
possible better answer: http://stackoverflow.com/a/27988575

http://stackoverflow.com/a/27998130
has body: No, jsChart data requires a javascript array, not a string without the first and last quote (what by the way doesn't make any sense). So, what you have to do is: First, get a proper js string from your webservice such as: var str = '[["January", 10], ["February", 8], ["March", 4], ["April", 13], ["May", 17], ["June", 9]]';// Note the single quotes to wrap strings that contain double quotes Second, transform this string in a javascript array: var data = JSON.parse(str); Use data in your jsChart. BTW, I think jsChart data needs to be an array of objects, and the array you provided isn't an array of objects so I think you'll need to tamper a little bit more to get things to work.
accepted answer of: http://stackoverflow.com/q/27998031
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27998031
type: Answer

http://stackoverflow.com/a/28030439
answers question: http://stackoverflow.com/q/28029974
accepted answer of: http://stackoverflow.com/q/28029974
has body: It's weird that data-bind="visible: show" doesn't provide any binding error because context of binding inside ko foreach: project is project not the ProjectViewModel. Anyway, this solution should solve your problem: function ViewModel() { var self = this; var wrappedProjects = proj.map(function(p) { return new Project(p); }); self.projects = ko.observableArray(wrappedProjects); } function Project(proj) { var self = proj; self.show = ko.observable(false); self.toggleTextArea = function () { self.show(!self.show()); } return self; }
has comment: http://stackoverflow.com/comment/44449967
has comment: http://stackoverflow.com/comment/44451411
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44448634
has comment: http://stackoverflow.com/comment/44612014
has comment: http://stackoverflow.com/comment/44451137
type: Answer
has comment: http://stackoverflow.com/comment/44448391
has comment: http://stackoverflow.com/comment/44454470
has comment: http://stackoverflow.com/comment/44446008

http://stackoverflow.com/a/28058896
has comment: http://stackoverflow.com/comment/44499904
has comment: http://stackoverflow.com/comment/44499908
downvote count: 0
has comment: http://stackoverflow.com/comment/44540855
has comment: http://stackoverflow.com/comment/44499384
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/44500197
has comment: http://stackoverflow.com/comment/44499424
score: 1
has comment: http://stackoverflow.com/comment/44499837
has comment: http://stackoverflow.com/comment/44500108
has comment: http://stackoverflow.com/comment/44500853
has comment: http://stackoverflow.com/comment/44499519
has comment: http://stackoverflow.com/comment/44499547
answers question: http://stackoverflow.com/q/28058756
has body: id.getElementsByTagName('select') is returning a list of elements, of which there is only one. If there is only one select element, you should be able to change this: var option = sel.getElementsByTagName('option'); sel.remove(3); to this: var option = sel[0].getElementsByTagName('option'); //was causing error sel[0].remove(2); //assuming you want to remove 3rd element, not index 3
has comment: http://stackoverflow.com/comment/44499652
has comment: http://stackoverflow.com/comment/44499373

http://stackoverflow.com/q/28056469
downvote count: 0
has title: FilmRoll loading an extra
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/28057087
has body: I'm using FilmRoll from straydogstudio to slide paintings on my art society's website. Painting URLs are assembled from an array loaded in a head file and written into the html in the "film_roll" . js code is: var SliderContent="" for (var i=0; i<totalRows; i+=1) SliderContent = SliderContent+' '; FilmRoll startup is: $(document).ready(function () { $(function() { fr = new FilmRoll({ container: '#film_roll', height: 150 }) }) })` and html is: ... ... This produces a sliding row of painting thumbnails but it prepends a containing the text document.write(SliderContent); and slides it along with the images. This text is repeated at the start of every loop of the images. If I comment out the FilmRoll startup code I get a column of painting thumbnails (as expected, with no sliding) but without the text in the extra , so the FilmRoll startup is causing the problem but I can't figure out how it's doing it or how to stop it. Anybody got any ideas? TIA.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/28057087
type: AnsweredQuestion
score: 1
type: Question

http://stackoverflow.com/comment/44422088
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28017512
has text: wow, my answer is not useful...and get downvoted...and why not useful?

http://stackoverflow.com/comment/64026050
has text: var extent = yourlayer.getExtent(); It is not working. (i'm using Openlayers 3.17). Giving error that yourlayer.getExtent() is not a function.. Please help me..
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28151870

http://stackoverflow.com/a/27979395
has body: This is fine! The firstChild and nextSibling properties on the original object are read-only, meaning you cannot change what they refer to. But those properties refer to other nodes, and you can edit the properties of those nodes. This code, however, would not be allowed: $('#one').firstChild = ...
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27978733
accepted answer of: http://stackoverflow.com/q/27978733
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/44790932
has text: @macroscripts i can't get it to work! Somehow I can't open .JS files and when it opens it just crashes while i did everything like everyone does... And I also can't use !LOOP in javascript?? or can I?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28113474

http://stackoverflow.com/q/28026138
tagged with: javascript
score: 0
has body: The scenario is that I want to publish one whole collection and users' data (such as profile) who have relation with any document in the the first collection. The problem is how can I publish that part of users collections?
tagged with: meteor
has answer: http://stackoverflow.com/a/28055144
possible better answer: http://stackoverflow.com/a/28026736
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28026736
accepted answer: http://stackoverflow.com/a/28055144
type: Question
tagged with: mongodb
answer count: 2
has title: Publish a collections and other collection's documents which have relation with any document in the first collection

http://stackoverflow.com/a/28077633
score: 0
answers question: http://stackoverflow.com/q/28076252
type: Answer
has body: This was really frustrating, and RP Niemeyer led me on the right path with using ko.utils.extend to extend refreshing externally. that didn't work for me so well, and it's probably due to my references of self, this, and return self inside each object. Essentially, I changed my FulfillRequistionRequestModel (the top dog) to : var FulfillRequistionRequestModel = function (data) { data = data || {}; var self = {}; self.RequisitionId = ko.observable(); //neutered self.FulfillItemList = ko.observableArray(); //neutered self.NumberOfItems = ko.computed(function () { return self.FulfillItemList().length; }); //add-remove FullfillItem in FulfillItemList (this is per line number) self.removeItemFromList = function (fulfill_item) { self.FulfillItemList.remove(fulfill_item); }; self.addItemToList = function () { self.FulfillItemList.push(new FulfillItemModel()); }; //allow self updates self.update = function (data) { data = data || {}; self.FulfillItemList.removeAll(); self.RequisitionId(data.RequisitionId || null); if (data.FulfillItemList) { $.each(data.FulfillItemList, function (i, item) { self.FulfillItemList.push(new FulfillItemModel(item)); }); } }; if (data) { self.update(data); } //this handles first-construction (.applyBinding) return self; }; You'll note with this, I've set up the two main observable properties as just empties (the RequisitionId and FulfillItemList) -- and then created a self.update function that will reset those fields to content or null, depending on what's passed in. I'm sure there's probably something more elegant than using $.each to push. Maybe ko.utils.arrayMap or some such, but this works. TLDR: I created an update routine inside the viewmodel. This isn't perfect, because it now has that when I ko.mapping.toJS it, to send it back to C#/REST-API, but that's also just fine because the way it consumes it, it ignores any extras. public IHttpActionResult testloadpart(FulfillRequisitionRequest incoming) { //do stuff //incoming.update does not exis…

http://stackoverflow.com/comment/44539143
score: 0
type: Comment
has text: Works beautifully, thanks Barmar. What is a more optimal way to print last characters in a string such that an extra " " does not have to be inserted at the end? The insertion sort of gives the "decrypted message" away..
comment on: http://stackoverflow.com/a/28080180
type: AnswerComment

http://stackoverflow.com/a/28077282
has comment: http://stackoverflow.com/comment/44537385
has comment: http://stackoverflow.com/comment/72030729
type: Answer
answers question: http://stackoverflow.com/q/28077188
has comment: http://stackoverflow.com/comment/44534262
score: 2
has comment: http://stackoverflow.com/comment/44534642
upvote count: 2
has body: If location.hash is not available, why not use location.href? href = location.href; hashIdx = href.lastIndexOf('#'); hash = href.slice(hashIdx); // or in one line hash = location.href.slice(location.href.lastIndexOf('#')) Note that hash is not supported in quite a few browsers: https://developer.mozilla.org/en-US/docs/Web/API/URLUtils.hash
has comment: http://stackoverflow.com/comment/116577801
has comment: http://stackoverflow.com/comment/44533480
downvote count: 0

http://stackoverflow.com/comment/44523750
type: QuestionComment
comment on: http://stackoverflow.com/q/28071858
has text: i used GET because the value came from my URL, I used POST because the other value came from a table row. @lxer
score: 0
type: Comment

http://stackoverflow.com/comment/44549004
type: Comment
has text: this is exactly what is was looking for! these events will enable me to do build my next features! thank you!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28075649

http://stackoverflow.com/a/28113302
type: Answer
answers question: http://stackoverflow.com/q/28113256
downvote count: 1
has body: Try this : var newText = oldText.replace(/(&lt;br\s*\/?&gt;){3,}/gi, '&lt;br&gt;'); working fiddle: http://jsfiddle.net/r5bu1xq2/
upvote count: 0
score: -1

http://stackoverflow.com/comment/44387212
score: 0
type: QuestionComment
has text: @AhosanKarimAsik — If that was the case, then the rest of the JS that the OP says works wouldn't work.
type: Comment
comment on: http://stackoverflow.com/q/27998684

http://stackoverflow.com/comment/44598422
score: 1
type: Comment
type: QuestionComment
has text: That's the least helpful error message, ever. All I can suggest is to try and run your JS code through JSLint to try and find the mis-matched bracket.
comment on: http://stackoverflow.com/q/28112333

http://stackoverflow.com/comment/44491532
has text: Refresh page and see above
comment on: http://stackoverflow.com/q/28054725
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/28120181
answers question: http://stackoverflow.com/q/28119086
has body: I am not familiar with ux-data grid. If you are set on using it, you can ignore this answer, but I did a small search engine (purely for academic reasons) and i ended up using ng-grid to display the data. I followed the github documentation and ended up boot-strapping @scope.myDefs with the data I needed on the backend using a $scope.getMyData function. In the view all you really need to do is add input fields to get the data, and then a div class with your ng-grid. It's super cool because it ensures the code is modular, and there are no funky functions going on in the view with nested ng-repeats so on and so forth. The only part that gave me trouble was the CSS because I'm not bootstrap savvy yet :) Here's some docs if you end up interested in ng-grid at all. http://angular-ui.github.io/ng-grid/
score: 0
type: Answer

http://stackoverflow.com/q/28012586
answer count: 1
downvote count: 0
score: 1
has title: Properly initializing an IndexedDB object store
favorite count: 0
has body: I am trying to use indexedDB to store some data client side and I am having trouble properly setting up the database. I am following the tutorial here The onupgradeneeded() event is being fired when I install the extension for the first time, but for some reason, none of the events associated with the object store transaction are being fired and I can't find any documentation that addresses this issue. This is the relevant code: const db_name="Tags"; var request = window.indexedDB.open(db_name, 1); var tags = [ //codes: 0 - markdown wrap tag // 1 - HTML wrap tag // 2 - single tag { domain: "www.youtube.com", bold:["*",0], strikethrough:["-",0], italic:["_",0] }, { domain: "www.stackoverflow.com", bold:["",1], italic:["",1], strikethrough:[" ",1], superscript:["",1], subscript:["",1], heading1:[" ",1], heading2:[" ",1], heading3:[" ",1], blockquote:[" ",1], code:["",1], newline:[" ",2], horizontal:[" ",2] } ]; request.onerror = function(event) { alert("Error opening the database"); }; request.onupgradeneeded = function(event) { var db = event.target.result; var objectStore = db.createObjectStore("domains", {keyPath: "domain" }); objectStore.createIndex("domain", "domain", { unique: true }); alert("I'm trying to do stuff"); objectStore.transaction.oncomplete = function(event) { var domanStore=db.transaction("domains","readwrite").objectStore("domains"); for(var i in tags) { domainStore.add(tags[i]); alert("added " + tags[i]["domain"] + " to the DB"); } alert("I might have done stuff"); }; objectStore.transaction.onerror = function(event) { alert("Transaction error"); }; objectStore.transaction.onabort = function(event){ alert("Transaction aborted"); }; db.onerror=function(event){ alert("DB ERROR bubbled up"); }; alert("I thought I did something"); }; The only alert boxes that pop up are for I'm trying to do stuff. and I thought I did something. The console shows no errors. The only thing I can think of is that I'm not creating the object store correctly, but I can't s…
upvote count: 1
type: AnsweredQuestion
tagged with: indexeddb
type: Question
tagged with: database
tagged with: javascript
has answer: http://stackoverflow.com/a/28013371
tagged with: dom-events
tagged with: google-chrome-extension
accepted answer: http://stackoverflow.com/a/28013371

http://stackoverflow.com/a/28255583
type: AcceptedAnswer
downvote count: 0
has body: As per @kdetella's comment, there should be a submit button inside the &lt;form&gt; element to receive payment method nonce.
has comment: http://stackoverflow.com/comment/62332088
accepted answer of: http://stackoverflow.com/q/28068003
type: Answer
answers question: http://stackoverflow.com/q/28068003
upvote count: 5
score: 5

http://stackoverflow.com/a/29242608
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28099639
downvote count: 0
has body: Use the attribute tags to grab fields on the web store. In your case you want to use: &lt;%=getCurrentAttribute('customer', 'role')%&gt;
type: Answer
has comment: http://stackoverflow.com/comment/53089501
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28099639

http://stackoverflow.com/comment/49541035
has text: Louis, this solution you provided was great, but now I have circular dependencies between these modules. I've read about how to overcome this but i'm not getting anywhere. Based on the solution you gave me here, can you help? Thanks!!
score: 0
comment on: http://stackoverflow.com/a/28108874
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/44606211
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28115980
type: Comment
has text: This works on the fiddle but not on my site, do you have any idea what may be causing this?

http://stackoverflow.com/comment/44495898
has text: 2) Have a look at [what `apply` does](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply). However, your Containers `push` method doesn't make too much sense, it's equivalent to `this.callbacks.push()` - without any arguments.
comment on: http://stackoverflow.com/q/28057075
type: Comment
type: QuestionComment
score: 1

ajax-upload
tag name: ajax-upload
type: Tag
tags question: http://stackoverflow.com/q/28087293

http://stackoverflow.com/comment/44336104
has text: @TheBlueDog, I just added most of the code for the relevant question, hopefully it would make people understand what is happening easier, that is why I have separated it. First is the JavaScript, second is the PHP code and the last one is the html form
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27971638
score: 0

http://stackoverflow.com/q/27989033
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44369095
type: Question
tagged with: function
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/27989159
score: 0
has answer: http://stackoverflow.com/a/27989812
answer count: 3
has answer: http://stackoverflow.com/a/27989199
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44369103
possible better answer: http://stackoverflow.com/a/27989812
has body: I've been searching for this for a couple hours with no luck. This seems like it should be fairly easy but I am obviously overlooking something. I have a table, with each row displaying information in each cell. At the end of each of the rows, there is an additional cell with a checkbox in it. The checkbox is an array, and each checkbox value is an imploded array via PHP. See below: HTML/PHP -------- (...some html code...) <?php (...some php SQL query code...) while ($row = oci_fetch_array($result)) { ?> Name City <input type="checkbox" name="checkGroup[]" value="<?php implode(":",$someArrayvariable) ?>"> <?php } ?> .... Passing the imploded values to the next page works fine. No problem there. I have been trying to create a javascript function to check all of the boxes that are in this form, or under the checkbox group's name, or whatever I can do to check them all with the click of a button. I've tried variations of the following with no success: HTML (On the top of the same script as above) ---- Check All Javascript (On the bottom of the same script as above) ---- I can't figure out what I'm doing wrong. I know that a variation of this question has been asked before many times, but I don't seem to be getting any results. I'm guessing because my checkboxes name is an array (checkGroup[] ???). When I click the button to check all of the checkboxes in the form, nothing happens. Any ideas? Thanks in advance. -Anthony
has title: Getting All HTML Checkboxes (Array) Checked with Javascript (and PHP)
tagged with: checkbox
accepted answer: http://stackoverflow.com/a/27989159

http://stackoverflow.com/comment/44382069
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27995825
score: 2
has text: Pass an empty function? `notifications.create("idHere", {options:here}, function() {});`

http://stackoverflow.com/q/28013374
tagged with: angularjs
has body: I'm trying to use AngularJS (which I'm new to) in combination with TypeScript while following the tutorial. This helped me a lot, but now I ran into the following problem: I'm using the typing file from DefinitelyTyped which states that each IServiceProvider (which IHttpProvider inherits) has a $get property. While trying to use the $httpProvider service of Angular I need to call the $http.get method (note: without the '$'). When trying to run this it fails because $get is undefined. I tried to change it to get temporarily in the browser and then the code works, so I'm confident that this is the problem. I can't just use get in my TypeScript file, because it would fail to compile. Now I'd like to know how to work around this problem? disclaimer: I'm not too comfortable with JavaScript in general either.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28013396
upvote count: 1
has title: Use Angular $httpProvider in TypeScript
type: Question
tagged with: typescript
accepted answer: http://stackoverflow.com/a/28013396
tagged with: javascript
answer count: 1
downvote count: 0
score: 1
favorite count: 0

http://stackoverflow.com/comment/44622170
comment on: http://stackoverflow.com/q/28101378
has text: I completely forgot this little fact. You should provide the answer and then ask the new question. Did you do this in Chrome with the incognito tab or did you run this with selenium so that a new profile is generated? I would think that Chrome will behave the same way as PhantomJS.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44435572
has text: ...i just checked and found an error: Uncaught ReferenceError: t is not defined. I can't see anything referring to t?
comment on: http://stackoverflow.com/a/28023733
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/28088186
possible better answer: http://stackoverflow.com/a/28189764
answer count: 2
has answer: http://stackoverflow.com/a/28189764
has body: I wanted to know if there was any way to control browser painting, for example I'd like to load elements at the top of the page first so users can see content straightaway. The elements at the bottom of the page can load last as the user will not see them until they scroll down. I'm looking to optimize my site which currently has a 6 second load time and I'd like to get it down to 1 second. This is mostly being caused by JS and images. I know that reducing both these will mean I wont need to worry about directing the painting but out of interest I just wanted to know if it was possible? Apologies if my understanding of browser painting is very basic
downvote count: 0
has answer: http://stackoverflow.com/a/28088234
favorite count: 0
has comment: http://stackoverflow.com/comment/44553306
tagged with: css
type: AnsweredQuestion
score: 3
upvote count: 3
has title: Is it possible to direct which elements of a page are painted first by the browser?
accepted answer: http://stackoverflow.com/a/28088234
has comment: http://stackoverflow.com/comment/44553250
tagged with: dom
type: Question
tagged with: browser
tagged with: javascript
linked to: http://stackoverflow.com/q/4912586
has comment: http://stackoverflow.com/comment/44553420
tagged with: optimization

http://stackoverflow.com/q/27977044
has comment: http://stackoverflow.com/comment/44346572
tagged with: oop
score: 1
has title: Understanding the new operator in JavaScript
upvote count: 1
has comment: http://stackoverflow.com/comment/44346436
type: Question
possible better answer: http://stackoverflow.com/a/27977241
has comment: http://stackoverflow.com/comment/44346413
has answer: http://stackoverflow.com/a/27977241
tagged with: javascript
linked to: http://stackoverflow.com/q/4166616
has comment: http://stackoverflow.com/comment/44346470
has answer: http://stackoverflow.com/a/27977256
answer count: 2
has comment: http://stackoverflow.com/comment/44346562
downvote count: 0
favorite count: 0
has body: I was looking at the code of the new operator in the Douglas Crockford series. function Shane(name){ this.name = name; } var sha = new Shane("name"); console.log(sha); The above code just creates a new Shane object and sets its constructor to Shane and Prototype to Object.prototype: function new(func, args){ var that = Object.create(func.prototype); result = func.apply(that, args); return (typeof result==='object' &amp;&amp; result) || that; } Can anyone explain me on what this code does and give me an example for it?
accepted answer: http://stackoverflow.com/a/27977256
has comment: http://stackoverflow.com/comment/44346496
type: AnsweredQuestion

http://stackoverflow.com/q/28082711
has body: I have 4 Lat Lon positions. They represent a (rotated) rectangular region. But due to some calculation errors, sometimes they are not proper rectangular. I want to convert those into (rotated) rectangular regions. See Image for more clarification In the above image I want the lat lon of the corners of the rectangle drawn given 4 lat lon as shown on the left side. I tried searching but couldn't find any solution. Most of the solutions did not take care of rotated rectangle case. How do I solve this problem ? Note : Are there any libraries that does this, I am using JavaScript for implementation. Note : I don't know if my question is more related to math.
accepted answer: http://stackoverflow.com/a/28104100
type: AnsweredQuestion
tagged with: bounds
type: Question
has comment: http://stackoverflow.com/comment/44543597
tagged with: javascript
has answer: http://stackoverflow.com/a/28104100
has comment: http://stackoverflow.com/comment/44544503
score: 0
has comment: http://stackoverflow.com/comment/44543525
has comment: http://stackoverflow.com/comment/44543477
answer count: 1
tagged with: geometry
has title: Get Minimum bounds of 4 LatLon

http://stackoverflow.com/comment/44621571
type: Comment
comment on: http://stackoverflow.com/a/28119372
has text: Thanks, I added `swordfish.app = new swordfish.app();` to the bottom of `app.ts` & it worked. I had to change a few other bits around the controller registration but it's now working correctly. Appreciate the help.
score: 0
type: AnswerComment

http://stackoverflow.com/a/28156370
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/44869376
has body: There's some great documentation for underscore at http://underscorejs.org/. D3 is a fairly robust lib so I bet some of these functions are already built in to D3 as well. So to clarify, you want to run through the records in the CSV and pull the corresponding data from the trees object. Here's how I would do this with underscore: // Information about each tree type var treeInfo = [ { code: 'ACPL', common: 'Norway Maple', genus: 'Acer', species: 'platanoides', family: 'Sapindaceae', color: '#00567e' }, ... ]; // imported from CSV var treeList = [ { DIAMETER: 15, SPECIES: "ACPL", longitude: -73.935944, latitude: 40.668076 } ... ] // loop through the imported list of trees _.each(treeList, function(){ // _.each() makes `this`` refer to the object in the list as it loops through // find the info for this tree species var info = _.findWhere(treeData, {"code": this.SPECIES}); // insert the keys and values from the info object into the original object from the treeList _.extend(this, info); }) //now treeList contains all the corresponding info (by species) from treeInfo for each tree
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/28120453
answers question: http://stackoverflow.com/q/28120453
type: AcceptedAnswer

http://stackoverflow.com/comment/44505701
has text: You don' have to worry about categories, it is working fine, It's just that the counts are not being bound.
type: Comment
comment on: http://stackoverflow.com/q/28062423
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44349947
type: QuestionComment
has text: I am thinking about that But service or factory is initiated only once.
comment on: http://stackoverflow.com/q/27978743
score: 0
type: Comment

http://stackoverflow.com/q/28120391
tagged with: ajax
has comment: http://stackoverflow.com/comment/44615810
score: 0
tagged with: symfony
has comment: http://stackoverflow.com/comment/44615703
has body: I have a method in some controller that is being used to display something inside a twig template. The content of this template depends on the value of a parameter passed to this method. The code is: class FooController { public function fooBarAction($parameter) { // do something if($_POST) { // do something return $this->redirect('foo_bar'); } return $this->render('AcmeBundle:view.html.twig', [ 'content' => $parameter ]); } } So having some menu in this twig template, I create a couple of links to the foo_bar route with different parameters, like: aaa bbb What if I'd like to do this with ajax, so that the page loads faster? How could I do this? So far I've created click event in jQuery, that catches the menu clicks, and gets parameter's value, but what now? How do I do this? I have no idea where to begin. Thanks!
answer count: 0
has title: Redirecting with ajax
type: UnansweredQuestion
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/44615941
has comment: http://stackoverflow.com/comment/44615696
tagged with: javascript
has comment: http://stackoverflow.com/comment/44615646
tagged with: jquery

http://stackoverflow.com/comment/44577518
type: Comment
has text: You don't seem to be using `parentCommentId`, but if you do you'll need to change `$(this).id` to `this.id`.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28100950

http://stackoverflow.com/q/27969325
type: UnansweredQuestion
has body: i read Angularjs documentation .In directives i can use parent scope for current directive by not speciying scope attribute like this .directive('myCustomer', function() { return { restrict: 'E', templateUrl: 'my-customer.html' }; }); and i can create a directive with isolated scope in this way .directive('myCustomer', function() { return { restrict: 'E', scope: { customerInfo: '=info' }, templateUrl: 'my-customer-iso.html' }; }); what if i want to inherit all properties of parent scope and want to add some properties related to this directive .i want to create a new scope when this directive is used but not an isolated scope.How to acheive that ??
has comment: http://stackoverflow.com/comment/44332747
has comment: http://stackoverflow.com/comment/44333465
has comment: http://stackoverflow.com/comment/44332715
has comment: http://stackoverflow.com/comment/44332951
has comment: http://stackoverflow.com/comment/44332400
tagged with: angularjs
type: Question
has title: Creating a directive which inherit parent scope as well as have some additional properties
has comment: http://stackoverflow.com/comment/44332880
score: 0
has comment: http://stackoverflow.com/comment/44334553
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/44336232
has comment: http://stackoverflow.com/comment/44331800
has comment: http://stackoverflow.com/comment/44332611
answer count: 0
tagged with: javascript

http://stackoverflow.com/q/27998164
linked to: http://stackoverflow.com/q/7052182
has comment: http://stackoverflow.com/comment/44386261
has comment: http://stackoverflow.com/comment/44387334
has comment: http://stackoverflow.com/comment/44386507
upvote count: 1
has comment: http://stackoverflow.com/comment/44386243
linked to: http://stackoverflow.com/q/7162794
has comment: http://stackoverflow.com/comment/44386924
has comment: http://stackoverflow.com/comment/44386176
tagged with: internet-explorer-8
duplicate of: http://stackoverflow.com/q/7162794
answer count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44386633
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44387269
has body: this code on IE8 alert undefined, but Work on IE9 and IE7 (and FF, Chrome, etc) jQuery.attr() works on IE8 in many other cases, eg $(' ').attr('id', 'stackoverflow').appendTo('body'); alert( $("#stackoverflow").attr('id') ); // IE8 alert 'stackoverflow' That would appear on IE8 there is a problem with some values ​​(eg url) IE8 has limits with jQuery.attr()?
has title: jQuery.attr('data-*') not work on IE8 (work on IE7)
downvote count: 0
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/44386177
favorite count: 0
has comment: http://stackoverflow.com/comment/44386260
type: Question
has comment: http://stackoverflow.com/comment/44386319

http://stackoverflow.com/a/28006567
downvote count: 0
has comment: http://stackoverflow.com/comment/44405164
answers question: http://stackoverflow.com/q/28006511
has body: Here's a working plunkr, I made assumptions about the data you wanted to fetch: http://plnkr.co/edit/DVwQaRZeZiagGEzY4lCy?p=preview var app = angular.module('plunker', []); app.controller('MainCtrl', function($scope) { $scope.name = 'World'; $scope.games = { "games": { "game0001": { "first": "a", "second": "b" }, "game0002": { "first": "c", "second": "d" } } } $scope.gamesKeys = Object.keys($scope.games['games']); $scope.events = { "events": { "game0001": { "event": { "key": "a" }, "event": { "key": "b" }, "event": { "key": "c" } }, "game0002": { "event": { "key": "a" }, "event": { "key": "b" }, "event": { "key": "c" } } } } $scope.eventsKeys = Object.keys($scope.events['events']); }); The important part is the ng-repeat here: &lt;body ng-controller="MainCtrl"&gt; &lt;div ng-repeat="gameKey in gamesKeys"&gt; &lt;div ng-repeat="eventKey in eventsKeys"&gt; event: {{events['events'][eventKey].event.key}} - game: {{games['games'][gameKey].first}} &lt;/div&gt; &lt;/div&gt; &lt;/body&gt;
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28006511
has comment: http://stackoverflow.com/comment/44405956
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44405123

http://stackoverflow.com/q/28033340
tagged with: setinterval
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44451684
score: -5
linked to: http://stackoverflow.com/q/4758750
has title: how to restart setinterval
has comment: http://stackoverflow.com/comment/44451860
has answer: http://stackoverflow.com/a/28033480
has body: Line_Baslat(); setInterval(function(){ moveLeft(); Line_Baslat(); },4000); function Line_Tekrar () { $("#dv_line").animate({width:"0%"},0); }; function Line_Baslat () { $("#dv_line").animate({width:"100%"},4000); }; function refseh () { setInterval(update,4000); }; $("#prev").click(function(){ moveLeft(); refresh(); }); $("#next").click(function(){ moveRight(); refresh(); });
type: Question
has answer: http://stackoverflow.com/a/28033492
downvote count: 5
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/44451822
upvote count: 0

http://stackoverflow.com/q/28111496
has title: Type checking undefined in jQuery style guide
has answer: http://stackoverflow.com/a/28111672
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28111629
possible better answer: http://stackoverflow.com/a/28111672
upvote count: 1
type: Question
score: 1
has body: jQuery has a style guide here: http://contribute.jquery.org/style-guide/js/#type-checks Type checking undefined varies with scope: undefined: Global Variables: typeof variable === "undefined" Local Variables: variable === undefined Why is it necessary and/or preferred to vary this type check?
accepted answer: http://stackoverflow.com/a/28111629
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/44379654
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27994241
has text: A style block like the one I created above should go in an HTML file. I'm assuming you have one of those because you have to link this JavaScript file from somewhere?
score: 0

http://stackoverflow.com/comment/44415761
has text: Wouldn't it be more efficient to use ``$this.parent().parent().find('li').removeClass('active');``?
comment on: http://stackoverflow.com/a/28014240
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27975462
has answer: http://stackoverflow.com/a/27980325
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27980325
type: Question
possible better answer: http://stackoverflow.com/a/27989495
answer count: 3
has answer: http://stackoverflow.com/a/27989495
downvote count: 0
tagged with: ios
tagged with: web
tagged with: keyboard
favorite count: 0
has title: Prevent blur event on keyboard close
has answer: http://stackoverflow.com/a/39340367
has comment: http://stackoverflow.com/comment/44345723
score: 1
has comment: http://stackoverflow.com/comment/44343913
upvote count: 1
has body: This is for mobile web apps, not native. I have an autocomplete drop-down that closes on the blur event. But I want to prevent this from happening when the user closes the keyboard on mobile (ie the autocomplete dropdown should stay visible). Is there a way to distinguish a blur event caused by the keyboard closing, and other kinds of blur events? Can I prevent a blur event specifically caused by closing the keyboard in mobile?

http://stackoverflow.com/comment/44814008
score: 1
comment on: http://stackoverflow.com/a/28224608
type: AnswerComment
type: Comment
has text: [Here's some information on it](http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision) and [a polyfill](https://gist.github.com/paulirish/1579671). It looks like it was actually just a change in precision.

http://stackoverflow.com/q/28052506
score: -1
linked to: http://stackoverflow.com/q/12824549
has body: I have a problem with the "click" action on a new element created by a jQuery function, it doesn't work. I created a JSFiddle to this link (JSFiddle), but it doesn't work perfectly because I can't call a Ajax request in JSFiddle. I have these two buttons, &lt;input type="button" onclick="invia('SIC-034031','', 's');" value="AGGIUNGI" style="height: 20px; width: 110px; background-color: #A5EFC5 ; color: #000000; font-family: Arial,Helvetica,sans-serif; font-size: 12px; background-repeat: no-repeat; background-position: left center;" id="iscriviSIC-034031" class="pulsanteIscrizioni" name="xaggiorna"/&gt;&amp;nbsp; &lt;input type="button" onclick="invia('SIC-034031','R', 's');" value="RISERVA" style="height: 20px; width: 110px; background-color: #F00000; color: #FFFFFF; font-family: Arial,Helvetica,sans-serif; font-size: 12px; background-repeat: no-repeat; background-position: left center;" id="iscriviRSIC-034031" class="pulsanteIscrizioni" name="xaggiorna"/&gt; When you call the ajax function for the first time, button one answers with this output: OK;I;SIC-034031 Button two is only used to erase. Button one creates. &lt;input id="iscriviSIC-034031" class="pulsanteIscrizioni" type="button" name="xaggiorna" style="height: 20px; width: 110px; background-color: #03F; color: #FFF; font-family: Arial,Helvetica,sans-serif; font-size: 12px;" value="TOGLI" onclick="invia('SIC-034031','');"&gt; When I click this new button, the ajax function return this, OK;C;SIC-034031;; Button one goes away and button two comes back. Now there is where the problem is, if I click on the first button, everything works. If I click in the second button, it doesn't work. Can you try to help me to find the problem, please? Thanks ;)
accepted answer: http://stackoverflow.com/a/28052575
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Function doesn't work after appending new element
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28052575
has comment: http://stackoverflow.com/comment/44486991
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/203198
has comment: http://stackoverflow.com/comment/44495277
tagged with: javascript
has comment: http://stackoverflow.com/comment/44487022

http://stackoverflow.com/comment/44589344
type: Comment
comment on: http://stackoverflow.com/a/28107249
type: AnswerComment
has text: So what change should i do in that fiddle... or what change in code should i do, to access that obj
score: 0

http://stackoverflow.com/a/28075310
downvote count: 1
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/28075131
type: Answer
has body: Set some id to that nod and remove it with $( "#that-nod-id" ).remove();

http://stackoverflow.com/q/28042704
type: UnansweredQuestion
has body: I'm trying to use jquery combo box for my form but it ends up giving a huge list with all the words that are possible. Is it possible that you only choose the first word in that list and suggest that for the textbox to fil in? Instead of giving a big list. This is my code so far. Jquery: $(function() { var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; $( "#tags" ).autocomplete({ source: availableTags }); }); Html: aitem1 bitem2 bitem3 ditem4 eitem5 I couldn't get it to working in jsfiddle for some reason here is the working jquery example: http://jqueryui.com/autocomplete/
has title: Jquery combo box fill up textbox
tagged with: combobox
score: 0
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28043440
has comment: http://stackoverflow.com/comment/44469122
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/44469393

http://stackoverflow.com/comment/44518054
has text: "Inside auth check if authentication process is open if true wait on this variable until it ends periodically checking status (busy waiting), to prevent it you can keep list of subscribers that should be notified inside auth's callback" that part confuses me, how would you loop that 'periodically checking' thing and how do you callback all the `get` functions? I have [link](http://underscorejs.org/) available if that might help
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28068866

http://stackoverflow.com/a/28033541
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44463434
has comment: http://stackoverflow.com/comment/44462545
accepted answer of: http://stackoverflow.com/q/28032900
answers question: http://stackoverflow.com/q/28032900
type: AcceptedAnswer
downvote count: 0
has body: Here's one way to fetch the dataURL of a div's background-image: // get the dataURL of your div's background var bg = $('#sprite1').css('background-image'); bg = bg.replace('url(','').replace(')','').replace('"','').replace('"',''); Example code and a Demo: var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); var cw=canvas.width; var ch=canvas.height; // get the dataURL of your div's background var bg = $('#sprite1').css('background-image'); bg = bg.replace('url(','').replace(')','').replace('"','').replace('"',''); // build an image from the dataURL var img=new Image(); //img.crossOrigin='anonymous'; img.onload=function(){ // draw the image onto the canvas ctx.drawImage(img,20,20); } img.src=bg; body{ background-color: ivory; padding:10px; } #canvas{border:1px solid red;} #sprite1{ border:1px solid blue; width:75px; height:75px; background-image:url('https://dl.dropboxusercontent.com/u/139992952/multple/sun.png'); } Sprite1
has comment: http://stackoverflow.com/comment/44463889
type: Answer

http://stackoverflow.com/q/28088812
type: AnsweredQuestion
type: Question
has body: I am working with force layout and tree hierarchy. It almost works and its adding nodes and links, but they are not visible. Probably I am missing something trivial, but I have spent too many hours on this... Any help greatly appreciated. In this mock-up, after click, third node should be add to root. var width = 960, height = 500, root; var force = d3.layout.force() .linkDistance(80) .charge(-320) .gravity(0.05) .size([width, height]) .on("tick", tick); var svg = d3.select("#myviz").append("svg") .attr("width", width) .attr("height", height); var link = svg.selectAll(".link"), node = svg.selectAll(".node"); var mydata = '{ "name": "start_bubble", "children": [ { "name": "child_O1", "size": 31812},{ "name": "child_O2", "size": 31812}]}'; var myadd = '{"name": "new_child", "size": 100}'; root = JSON.parse( mydata); myaddparsed = JSON.parse( myadd); update(); force.start(); function update() { var nodes = flatten(root), links = d3.layout.tree().links(nodes); // Restart the force layout. force .nodes(nodes) .links(links) .start(); // Update links. link = link.data(links, function(d) { return d.target.id; }); link.exit().remove(); link.enter().insert("line", ".node") .style("stroke-width",2) .attr("class", "link"); // Update nodes. node = node.data(nodes, function(d) { return d.id; }); node.exit().remove(); var nodeEnter = node.enter().append("g") .attr("class", "node") .on("click", click) .call(force.drag); nodeEnter.append("circle") .attr("r", function(d) { return Math.sqrt(d.size) / 5 || 14.5; }); nodeEnter.append("text") .attr("dy", "2.3em") .text(function(d) { return d.name; }); node.select("circle") .style("fill", color); force.start(); } function tick() { link.attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { return d.target.x; }) .attr("y2", function(d) { return d.target.y; }); node.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); } function color(d) { return d…
tagged with: javascript
has answer: http://stackoverflow.com/a/28090687
answer count: 1
tagged with: d3.js
score: 0
has title: adding nodes to tree force layout - almost working
accepted answer: http://stackoverflow.com/a/28090687

http://stackoverflow.com/a/28013514
downvote count: 0
has comment: http://stackoverflow.com/comment/44414712
type: Answer
has comment: http://stackoverflow.com/comment/44414998
answers question: http://stackoverflow.com/q/28013097
has body: I think you should always use methods instead of using bind(this) because when you use external functions, you need to carry those along with that class. Why not just include them as a method on the class? Also, I don't get the point of the this.method2.bind(this) call. this.method2 is already bound to this because it is a property of this. Assuming you know some ES6 from your let statement, you could write your code like this: class Service { constructor(args) { this.args = args; } method1(query) { let res1 = Service2.get(query).map(this.method2); //btw, what is Service2 here? Is it just an object with methods or does it need to be initialized? } method2(data) { //use data } } let service = new Service(args); service.method1(req.query);
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/44415122
has comment: http://stackoverflow.com/comment/44414564

http://stackoverflow.com/a/28092783
answers question: http://stackoverflow.com/q/28089866
score: 0
type: AcceptedAnswer
has body: $("#da-thumbs li").hover(function () { $(this).find("div").show(); }, function () { $(this).find("div").hide(); }); $('#da-thumbs li').mousemove(function (e) { var $this = $(this); $this.find("div").css({ left: e.pageX - $this.position().left - 120 }); }); Here is a JSFiddle with working code. But with this you will totally lack the "easing"/animation that the demo you linked has. If that's something you want you would have to use a different approach. If so, maybe that's something I can help you with too.
has comment: http://stackoverflow.com/comment/44564387
has comment: http://stackoverflow.com/comment/44742672
type: Answer
accepted answer of: http://stackoverflow.com/q/28089866
has comment: http://stackoverflow.com/comment/44564541
has comment: http://stackoverflow.com/comment/44587811

http://stackoverflow.com/comment/44341836
comment on: http://stackoverflow.com/a/27974117
type: AnswerComment
score: 0
has text: Probably best to explain *why* ;)
type: Comment

http://stackoverflow.com/q/28057286
type: Question
has answer: http://stackoverflow.com/a/28057639
possible better answer: http://stackoverflow.com/a/28057372
tagged with: javascript
has answer: http://stackoverflow.com/a/28057372
answer count: 2
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/28057639
has title: pass value to popup window [javascript]
has body: Have problem with passing value to modal pop up. This is link to modal edit. edit here is code for modal pop up it works fine edit content < close My javascript code : The problem is, i can not pass the $id to pop up window, to edit content i am trying to. thanks for help in advance
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/comment/44473598
comment on: http://stackoverflow.com/q/28045534
type: QuestionComment
type: Comment
has text: FYI, don't use alert to debug code, use your console. But do you mean: `alert(availableMetrics[index]);` shows `null`? There is a difference between `null` and empty value, just saying
score: 0

http://stackoverflow.com/q/27998407
tagged with: node.js
has comment: http://stackoverflow.com/comment/45735645
score: 14
has comment: http://stackoverflow.com/comment/45038219
type: AnsweredQuestion
upvote count: 14
has body: I'm trying to create a websocket client-server app where client and server will run on two different instances. Setup Server/Back-end: running on localhost:9006 with angular-fullstack generator including socket.io Client/Front-end: running on localhost:9007 with angular generator + socket.io-client + btford.socket-io (a AngularJS socket.io bridge) Server Note: not complete code, but the pieces I think are relevant. // ----- socketio.js ----- // When the user connects.. perform this function onConnect(socket) { // When the client emits 'info', this listens and executes socket.on('info', function (data) { console.info('[%s] %s', socket.address, JSON.stringify(data, null, 2)); socket.emit('pong', 'OK!'); }); // Insert sockets below require('../api/thing/thing.socket').register(socket); } socketio.set('origins', 'http://localhost:9007'); // ----- express.js ----- app.use(function (req, res, next) { res.setHeader('Access-Control-Allow-Origin', 'http://localhost:9007'); res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE'); res.setHeader('Access-Control-Allow-Credentials', true); next(); }); // ----- app.js ----- // Start server server.listen(config.port, config.ip, function () { console.log('Express server listening on %d, in %s mode', config.port, app.get('env')); }); Client // ----- client app.js angular .module('weldCommentsClientApp', [ 'ngAnimate', 'ngAria', 'ngCookies', 'ngMessages', 'ngResource', 'ngRoute', 'ngSanitize', 'ngTouch', 'btford.socket-io' ]) .factory('mySocket', function (socketFactory) { var myIoSocket = window.io.connect('http://localhost:9006'); var mySocket = socketFactory({ ioSocket: myIoSocket }); mySocket.forward('pong'); console.log('mySocket', mySocket); return mySocket; }) // ----- client main.js angular.module('weldCommentsClientApp').controller('MainCtrl', function ($scope, mySocket) { $scope.$on('socket:pong', function (ev, data) { console.log('socket:pong', ev, data); }); mySocket.emit('info'); }); Result…
tagged with: socket.io
type: Question
has comment: http://stackoverflow.com/comment/45943623
has title: Socket.io cannot connect, resorts to "polling"
tagged with: javascript
has answer: http://stackoverflow.com/a/75988844
has comment: http://stackoverflow.com/comment/45942841
has answer: http://stackoverflow.com/a/28360126
has answer: http://stackoverflow.com/a/28836340
downvote count: 0
possible better answer: http://stackoverflow.com/a/28360126
favorite count: 0
has answer: http://stackoverflow.com/a/28841140
has comment: http://stackoverflow.com/comment/45038121
tagged with: angularjs
has answer: http://stackoverflow.com/a/28361443
answer count: 5
tagged with: sockets
has comment: http://stackoverflow.com/comment/44843968
accepted answer: http://stackoverflow.com/a/28841140

http://stackoverflow.com/comment/44495570
type: QuestionComment
type: Comment
has text: `1.2344 + 2.47373 + 3.444 != 3.444 + 2.47373 + 1.2344`
comment on: http://stackoverflow.com/q/28056862
score: 0

http://stackoverflow.com/q/27987071
has answer: http://stackoverflow.com/a/36332246
has title: Page is not waiting for response from SweetAlert confirmation window
score: 10
has body: I am trying to upgrade my JavaScript confirm() action to use SweetAlert. Currently my code is something like this: Delete This waits for the user to confirm before navigating to the delete page. I would like to use this example from SweetAlert to ask the user to confirm before deleting: swal({ title: "Are you sure?", text: "You will not be able to recover this imaginary file!", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Yes, delete it!", cancelButtonText: "No, cancel plx!", closeOnConfirm: false, closeOnCancel: false }, function(isConfirm){ if (isConfirm) { swal("Deleted!", "Your imaginary file has been deleted.", "success"); } else { swal("Cancelled", "Your imaginary file is safe :)", "error"); } }); Everything I have tried has failed. When the first alert is displayed, the page has gone ahead and deleted the item and refreshed before the user has even clicked on the alert buttons. How do I make the page wait for the users input? Any help would be greatly appreciated.
type: Question
has answer: http://stackoverflow.com/a/30287116
has answer: http://stackoverflow.com/a/40427926
downvote count: 0
tagged with: sweetalert
tagged with: javascript
upvote count: 10
answer count: 4
favorite count: 0
possible better answer: http://stackoverflow.com/a/36332246
has answer: http://stackoverflow.com/a/27987591
accepted answer: http://stackoverflow.com/a/27987591
type: AnsweredQuestion

http://stackoverflow.com/comment/44531180
comment on: http://stackoverflow.com/a/28050029
type: AnswerComment
score: 0
type: Comment
has text: I successfully done with XML. Thaaanks so much! ;) Next time I may use JSON instead :) I still would like to have question if no problem. Before this implementation I used XMLHttpRequest() function for getting the datas from the xml. Is it also AJAX? I have looked for it on the internet, and as far as I know, it is also AJAX.

http://stackoverflow.com/comment/44358627
score: 0
comment on: http://stackoverflow.com/q/27983560
type: Comment
type: QuestionComment
has text: Sorry if that's if it's unclear. I need to be able to add and parse other sections to the markdown file. for example, an area for css, an area for JS etc. How would this be done?

recursion
type: Tag
tags question: http://stackoverflow.com/q/27999021
tags question: http://stackoverflow.com/q/28035272
tag name: recursion
tags question: http://stackoverflow.com/q/28120068
tags question: http://stackoverflow.com/q/27974517
tags question: http://stackoverflow.com/q/28121222
tags question: http://stackoverflow.com/q/28037475
tags question: http://stackoverflow.com/q/28027342
tags question: http://stackoverflow.com/q/28038124
tags question: http://stackoverflow.com/q/28006064
tags question: http://stackoverflow.com/q/28036801

http://stackoverflow.com/comment/44649684
comment on: http://stackoverflow.com/a/28099943
has text: @JFathi Have you tried to define the getTemplate method when Polymer is ready (into the callback "polymer-ready") ? Have you tried retrieve the element by an ID ? I'm surprised and sorry. If you want remove the local storage usage I can look this part of your code with you.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28085259
has answer: http://stackoverflow.com/a/28085294
downvote count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/44548382
score: -2
has comment: http://stackoverflow.com/comment/44548274
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/44548354
has answer: http://stackoverflow.com/a/28085480
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: hasClass in if condition is not working
has comment: http://stackoverflow.com/comment/44548530
has comment: http://stackoverflow.com/comment/44548351
has comment: http://stackoverflow.com/comment/44548370
type: UnansweredQuestion
has body: I am not able to find why my .hasClass is not working. I am using the Quick Search jQuery plugin and my code is below: If anyone find error in my code, If so please let me know. Even I tried with different condition like if ($('.hide').css('display') == 'none') but still it's not working. There is no error in the console and it is adding hide class as well and there are so many hide class. HTML: Title-1 Sub title Sub title Sub title Sub title Sub title Title-2 Sub title Sub title . . . .

http://stackoverflow.com/comment/44602182
has text: **Self-shaming promotion:** I made a plugin for that kind of thing. You can take a look if it fit your needs. https://github.com/kagagnon/Responsive-Font
comment on: http://stackoverflow.com/q/28113987
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/109088554
type: Comment
comment on: http://stackoverflow.com/a/33024929
score: 1
type: AnswerComment
has text: `gulp-util` has been deprecated, use `fancy-log` instead

http://stackoverflow.com/comment/44551433
score: 0
type: Comment
type: QuestionComment
has text: Can you post example code that reproduces the problem please?
comment on: http://stackoverflow.com/q/28086994

http://stackoverflow.com/q/28011137
upvote count: 1
type: Question
has title: couchDB 401 error
tagged with: javascript
answer count: 2
has body: I have a couchDB database called "guestbook". I first used the code below to add the a user to the "_users" database: $scope.submit = function(){ var url = "https://sub.iriscouch.com/_users/org.couchdb.user:" + $scope.name; console.log(url); $http({ url: url, method: "PUT", data: {name : $scope.name, password: $scope.pass, roles: [], type: "user" }, withCredentials: true, headers: {"Authorization": auth_hash(adminUsername, adminPass)} }) .success(function(data, status, headers, config){ console.log(headers); console.log(config); }); } Once the user was added to _users I used Futon to add that user as member to my "guestbook" _security document. After that I tried to used that username and password (that was added as a member to "guestbook" _security) to get all the documents in the "guestbook" database. See code below: $scope.login = function(){ var url = "https://sub.iriscouch.com/guestbook/_all_docs"; $http({ url: url, method: 'GET', params: { include_docs: true, }, withCredentials: true, headers: {"Authorization": auth_hash($scope.uname, $scope.upass)} }) .success(function(data, status, headers, config){ $scope.book = data.rows; console.log($scope.book); }); } function auth_hash(username, password) { return "Basic" +btoa(username + ":" + password); } But everytime I tired access the "_all_docs" I get a 401 unauthorised error. The username I am using to access has been added as a member into the _security documents of the guestbook database. Can anyone help. What am I doing wrong.
downvote count: 0
score: 1
tagged with: couchdb
favorite count: 0
has answer: http://stackoverflow.com/a/28051533
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28011876

arrays
tags question: http://stackoverflow.com/q/28022797
tags question: http://stackoverflow.com/q/28080157
tags question: http://stackoverflow.com/q/28013834
tags question: http://stackoverflow.com/q/27966005
tags question: http://stackoverflow.com/q/28016049
tags question: http://stackoverflow.com/q/28059473
tags question: http://stackoverflow.com/q/28055770
tags question: http://stackoverflow.com/q/28087109
tags question: http://stackoverflow.com/q/28100152
tags question: http://stackoverflow.com/q/28013703
tags question: http://stackoverflow.com/q/28058519
tags question: http://stackoverflow.com/q/28041566
type: Tag
tags question: http://stackoverflow.com/q/28062012
tags question: http://stackoverflow.com/q/28026692
tags question: http://stackoverflow.com/q/27993410
tags question: http://stackoverflow.com/q/28042848
tags question: http://stackoverflow.com/q/28091906
tags question: http://stackoverflow.com/q/28117991
tags question: http://stackoverflow.com/q/28053284
tags question: http://stackoverflow.com/q/28011397
tags question: http://stackoverflow.com/q/27966020
tags question: http://stackoverflow.com/q/28029746
tags question: http://stackoverflow.com/q/28094394
tags question: http://stackoverflow.com/q/28079295
tags question: http://stackoverflow.com/q/28056487
tags question: http://stackoverflow.com/q/27997104
tags question: http://stackoverflow.com/q/28112707
tags question: http://stackoverflow.com/q/28039214
tags question: http://stackoverflow.com/q/28119710
tags question: http://stackoverflow.com/q/27975051
tags question: http://stackoverflow.com/q/27995952
tags question: http://stackoverflow.com/q/27999021
tags question: http://stackoverflow.com/q/28084405
tags question: http://stackoverflow.com/q/28013045
tags question: http://stackoverflow.com/q/27990133
tags question: http://stackoverflow.com/q/28062818
tags question: http://stackoverflow.com/q/28010754
tags question: http://stackoverflow.com/q/28118110
tags question: http://stackoverflow.com/q/28028480
tags question: http://stackoverflow.com/q/28013676
tags question: http://stackoverflow.com/q/28075531
tags question: http://stackoverflow.com/q/27985546
tags question: http://stackoverflow.com/q/28038168
tags question: http://stackoverflow.com/q/28070443
tags question: http://stackoverflow.com/q/28011782
tags question: http://stackoverflow.com/q/27997381
tags question: http://stackoverflow.com/q/28115536
tags question: http://stackoverflow.com/q/28002908
tags question: http://stackoverflow.com/q/28012526
tags question: http://stackoverflow.com/q/28099576
tags question: http://stackoverflow.com/q/27990863
tags question: http://stackoverflow.com/q/28011302
tags question: http://stackoverflow.com/q/27992064
tags question: http://stackoverflow.com/q/28010915
tags question: http://stackoverflow.com/q/28117631
tags question: http://stackoverflow.com/q/27998217
tags question: http://stackoverflow.com/q/28068302
tags question: http://stackoverflow.com/q/27991308
tags question: http://stackoverflow.com/q/28020439
tags question: http://stackoverflow.com/q/28051383
tags question: http://stackoverflow.com/q/27965076
tags question: http://stackoverflow.com/q/28104966
tags question: http://stackoverflow.com/q/28007949
tags question: http://stackoverflow.com/q/28076350
tags question: http://stackoverflow.com/q/28112249
tags question: http://stackoverflow.com/q/28049961
tags question: http://stackoverflow.com/q/27987218
tags question: http://stackoverflow.com/q/28094887
tag name: arrays
tags question: http://stackoverflow.com/q/28069574
tags question: http://stackoverflow.com/q/28025194
tags question: http://stackoverflow.com/q/28090293
tags question: http://stackoverflow.com/q/28033097
tags question: http://stackoverflow.com/q/27975339
tags question: http://stackoverflow.com/q/28080621
tags question: http://stackoverflow.com/q/28072209
tags question: http://stackoverflow.com/q/28095931
tags question: http://stackoverflow.com/q/28067566
tags question: http://stackoverflow.com/q/27992813

http://stackoverflow.com/a/28051422
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28051201
upvote count: 2
type: Answer
score: 2
has body: Consider a more object-oriented approach - this should be easy, since continents/countries/cities are things. function Continent(name) { this.name = name; this.countries = []; } Continent.prototype.addCountry = function(country) { if( !(country instanceof Country)) throw new Error("Not a country"); this.countries.push(country); // may want to add logic for duplicate checking } You can build function Country and function City in a similar way. Now that that's done, and you've built your structure, you can output it. Maybe something like: Continent.prototype.toString = function() { var list = " " + this.name, l = this.countries.length, i; if( l > 0) { list += " "; for( i=0; i<l; i++) { list += this.countries[i]; // toString implicitly called } list += " "; } list += " "; return list; } Add similar functions to Country and City. Now you can output the continent, say in someULelement.innerHTML, and it will render as desired. You may want to have a function World to act as an overall container. Object-oriented code can make tasks like this much easier to understand visually. // ------------------ BEGIN CLASS DEFINITIONS --------------------- function World() { this.continents = []; } World.prototype.addContinent = function(continent) { if (!(continent instanceof Continent)) throw new Error("Not a continent"); this.continents.push(continent); } World.prototype.toString = function() { var list = " ", l = this.continents.length, i; if (l > 0) { for (i = 0; i < l; i++) { list += this.continents[i]; // toString implicitly called } } list += " "; return list; } function Continent(name) { this.name = name; this.countries = []; } Continent.prototype.addCountry = function(country) { if (!(country instanceof Country)) throw new Error("Not a country"); this.countries.push(country); // may want to add logic for duplicate checking } Continent.prototype.toString = function() { var list = " " + this.name, l = this.countries.length, i; if (l > 0) { list += " "; for (i = 0; i < l; i++) {…
downvote count: 0
answers question: http://stackoverflow.com/q/28051201
has comment: http://stackoverflow.com/comment/44484942

http://stackoverflow.com/q/28008608
has comment: http://stackoverflow.com/comment/44420932
possible better answer: http://stackoverflow.com/a/34636492
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44420827
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/44421696
tagged with: javascript
has answer: http://stackoverflow.com/a/28009556
score: 4
has answer: http://stackoverflow.com/a/28029600
has comment: http://stackoverflow.com/comment/74128873
has body: I'm trying to draw a complex shape in Three.js using extruded arcs but they just didn't seem to be behaving properly. I don't know if I don't understand the API, but shouldn't this create a complete extruded circle of radius 100 centred at the origin? var path = new THREE.Path(); path.moveTo(0, 0); path.arc(0, 0, 100, 0, Math.PI * 2, false); var shape = path.toShapes(false, false); var extrudeSettings = { amount : 20, steps : 1 }; var geometry = new THREE.ExtrudeGeometry(shape, extrudeSettings); var mesh = new THREE.Mesh(geometry, material); Instead it draws a Pacman shape: Here's the JSFiddle: http://jsfiddle.net/c8shqzpn/
has title: Why can't I draw a complete circle with arc() in Three.js?
answer count: 3
downvote count: 0
accepted answer: http://stackoverflow.com/a/28029600
has comment: http://stackoverflow.com/comment/44412278
favorite count: 0
has answer: http://stackoverflow.com/a/34636492
has comment: http://stackoverflow.com/comment/44433923
tagged with: three.js
has comment: http://stackoverflow.com/comment/57066914

http://stackoverflow.com/comment/50484320
comment on: http://stackoverflow.com/a/28184050
has text: Thanks @AlexandrSkachkov. Last thing to find out is, when this exact V8 version from Chrome 45 lands in node / iojs. Currently they are merging V8 v4.5.89, but I don't know much about whats behind this version. Chrome 43 seems to have V8 4.3.61.30 installed so it looks like the Chrome Version is coherent with the major and minor version of the V8's versioning. With that in mind Chrome 45 should implement V8 v4.5.x and the issue should be solved when https://github.com/nodejs/io.js/pull/2091 is merged.
score: 1
type: AnswerComment
type: Comment

url
tags question: http://stackoverflow.com/q/28098233
tags question: http://stackoverflow.com/q/27979606
tags question: http://stackoverflow.com/q/28084073
tag name: url
tags question: http://stackoverflow.com/q/28082949
tags question: http://stackoverflow.com/q/28024273
tags question: http://stackoverflow.com/q/27966107
tags question: http://stackoverflow.com/q/28112092
tags question: http://stackoverflow.com/q/27977244
type: Tag

http://stackoverflow.com/comment/44347927
type: QuestionComment
has text: As far as what goes? For now I'm just test-driving it as I develop is on my computer. It's really a tool that I'm making for myself. It's possible I may eventually make it publicly available, but for now it's really just for me.
score: 0
comment on: http://stackoverflow.com/q/27977815
type: Comment

http://stackoverflow.com/comment/44478473
has text: Thanks a lot, I now have the log and it is saying the value of "name" is undefined. How do I go about defining the value? Sorry, I am fairly new to this.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28030221

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

http://stackoverflow.com/q/27973718
has title: Convert a date from one format to another javascript
has comment: http://stackoverflow.com/comment/44341441
answer count: 0
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44340758
tagged with: format
linked to: http://stackoverflow.com/q/14638018
tagged with: javascript
tagged with: date
has comment: http://stackoverflow.com/comment/44341022
downvote count: 0
has body: For some reason I am having an issue using getDate() and getFullYear() functions. I have the following input: Fri Jul 01 2005 00:00:00 GMT-0400 I am getting an error in an Oracle product stating "Cannot find function getDate in Object Fri Jul 01 2005 00:00:00 GMT-0400" I believe i need to convert the above format to mm/dd/yyyy for the getDate function to work. how can I convert to the format I want ? Thanks in Advance. here is my Code: var bftStartDt = input1[0]; var bftEndDt = input1[4]; var aDt = new Date("12/01/2099"); var strtDt = new Date(bftStartDt); var endDt = new Date(bftEndDt); var flag1 = 0; //false var flag2 = 0; //false var flag3 = 0; //false var flag4 = 0; // false var dblDelta = 0 var endDtDay = 0; var bftEndDtMnth = 0; var endDtYr = 0; var holdEndMnth = 0; var endDt_Sub = ""; var endDtOutput = ""; if (endDt &lt;= strtDt){ flag1 = 1; // true } if (endDt &gt; aDt){ endDt = aDt; flag3 = 1; } // Set end date to the last payment period before '12/1/2099' if (flag1 === 1 || flag2 === 1 || flag3 === 1){ if (endDt - aDt != 0) { // check they are equal/same if (pmtFreq === 1){ dblDelta = 1; }else if (pmtFreq === 2){ dblDelta = 3; }else if (pmtFreq === 3){ dblDelta = 6; }else if (pmtFreq === 4){ dblDelta = 12; } // get day of the month &amp; full year endDtDay = endDt.getDate(); endDtYr = endDt.getFullYear(); holdEndMnth = parseInt(endDt.getMonth() + 1) - dblDelta; // Check for negative month if (holdEndMnth &lt; 1){ holdEndMnth = holdEndMnth + 12; endDtYr = parseInt(endDt.toDateString().substr(11,14)) - 1; bftEndDtMnth = holdEndMnth; }else { bftEndDtMnth = holdEndMnth; } flag4 = 1; }else { //do nothing - output original endDt flag4 = 0; } }else { //do nothing - output original endDt flag4 = 0; }
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/27980413
has body: Given your current code: nameInput.onchange = editAddressHidden(validLoadedEmails); You can think of this as saying "handle the onchange event of nameInput with whatever's returned from my editAddressHidden function". But that's not right (in this instance), as you want to handle the onchange event with the editAddressHidden function itself. So wrap it up in an anonymous function: nameInput.onchange = function(){ editAddressHidden(validLoadedEmails) }; Now every time the onchange event fires, it will invoke your function, and this will in turn call the editAddressHidden function.
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/44352466
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27980286
answers question: http://stackoverflow.com/q/27980286
type: AcceptedAnswer

http://stackoverflow.com/a/28083263
has body: here is fiddle here is the snippet for better understand i have changed the event Reason: if you wish to instant change HTML CODE Table2 JAVASCRIPT CODE $(document).on('keyup', '#table1 tbody tr td input', function (e) { var cls = $(this).attr('class'); var oldValue ='?';//get the input value before keypress or edit var newValue = "?"; //get the input value after keypress or edit newValue = $(this).val(); $('#table2').find('tbody tr').each(function (i) { var targInp = $(this).find('td input.'+cls)//$(this).find('td input:text')hasClass(cls); oldValue = $(this).find('td input.'+cls).val(); console.log('got it', oldValue); if (oldValue != newValue){ targInp.val(newValue); } }); });
answers question: http://stackoverflow.com/q/28082757
score: 0
type: Answer

http://stackoverflow.com/comment/54330559
score: 1
comment on: http://stackoverflow.com/q/28079139
has text: Hi prob a bit late now but just to let you know i finally added a feature for multiple y axis, a full answer is on a similar question posted recently http://stackoverflow.com/questions/33236941/chart-js-with-dual-axis-on-bar-and-line-graph/33264462#33264462
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44504999
comment on: http://stackoverflow.com/a/28058225
has text: Yes. But this approach yields a problem. From Sam Berans post: "[...], Startup speed was around 8-10 seconds - even worse than JVM Clojure! Some quick measurements indicated that the bulk of the time was spent with Rhino parsing the JS sources for cljs/core.js. I was pleased to discover that Rhino supports bytecode precompilation via the jsc utility [3]. I was able to precompile the ClojureScript output to bytecode, and achieve much faster startup - around 150ms on device. This is well within the target performance range, and is fast enough to eliminate any noticeable UI lag."
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/a/28021976
type: AcceptedAnswer
type: Answer
has body: Do this task in angular way, forget everything about jQuery and just think of angularjs. Angular var app = angular.module('demo', []); app.controller('MainCtrl', function($scope) { $scope.name ="World!"; $scope.someVar = 'This is controller content'; $scope.applyTemplate = function() { $scope.template = "mytemplate.html"; } }); Markup Hello {{name}}! Load Template Better view this live demo in Plunkr
accepted answer of: http://stackoverflow.com/q/28021655
score: 0
answers question: http://stackoverflow.com/q/28021655

http://stackoverflow.com/comment/44679172
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28121060
type: Comment
has text: (1) I assume you are using SIMPLE mode. In ADVANCED mode, the increase cause by including Closure's "base.js" is 0 bytes. (2) If you are willing to modify the file, then you don't need @define. Otherwise, using a bit of shell script to build or swap configuration files seems easy enough and not much harder than putting "--define='Foo=X'" somewhere.

http://stackoverflow.com/q/28083325
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44545372
has comment: http://stackoverflow.com/comment/44544667
has comment: http://stackoverflow.com/comment/44545263
has comment: http://stackoverflow.com/comment/44544657
has body: Can we add external javscript files or Css files in html Dom Elements i have created a popup and want to add few js libraries var alert_box=document.createElement('div'); alert_box.setAttribute('id', 'myhive'); var inline_css="box-sizing: content-box;font-family: Arimo, sans-serif;z-index: 214748364898;position: fixed;right:30px;top:30px;"; inline_css+="width:470px;height:100px;background:#333333;padding:7px 35px 0;box-shadow:#000 1px 1px 2px;margin: 0px;border:none;outline: none;"; alert_box.setAttribute('style', inline_css); popup_text="Test popup for demo"; alert_box.innerHTML="&lt;h3 style='font-size:15px !important;color:white;height:30px'&gt;"+popup_text+"&lt;/h3&gt;&lt;div class='button_walk'&gt;"+ "&lt;input type=text id='input_txt' style='float:left;margin-left:0px;width:200px'&gt;"+ "&lt;input type=button name=txtbtn id=clbtn value=Save style='margin-left:30px'&gt;&lt;/div&gt; "; document.body.appendChild(alert_box); here is my jsfiddle
has comment: http://stackoverflow.com/comment/44544948
has title: Adding javascript files or css files under HTML DOM Elements
has answer: http://stackoverflow.com/a/28083475
has comment: http://stackoverflow.com/comment/44544659
has comment: http://stackoverflow.com/comment/44545345
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/28083420
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/44545249
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/44423471
comment on: http://stackoverflow.com/q/28018173
type: Comment
type: QuestionComment
has text: @Hellodueworld See this fiddle: [Collaborate](http://jsfiddle.net/#&togetherjs=DeqfENni2g)
score: 0

http://stackoverflow.com/comment/44333233
comment on: http://stackoverflow.com/q/27968746
score: 0
type: Comment
has text: To be honest I dont know....
type: QuestionComment

http://stackoverflow.com/q/28104181
has answer: http://stackoverflow.com/a/28104216
tagged with: http://stackoverflow.com/tag/html
has title: How to identify difference between http request originate from JS script and HTML<FORM>submit event
has answer: http://stackoverflow.com/a/28104235
answer count: 4
has body: Can server identify whether a http POST request originate from a JS script or HTML submit event. Like is there any attribute, indication with request added by browser to figure this at server side ?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44583287
tagged with: http
type: Question
has answer: http://stackoverflow.com/a/28104306
has answer: http://stackoverflow.com/a/28104234
has comment: http://stackoverflow.com/comment/44616167
tagged with: forms
score: 0
linked to: http://stackoverflow.com/q/504947
tagged with: javascript
has comment: http://stackoverflow.com/comment/44587438

http://stackoverflow.com/comment/44607121
type: AnswerComment
comment on: http://stackoverflow.com/a/28116507
score: 0
type: Comment
has text: @AidanEwen you welcome. Please, add an id to your select element and let me know. Thanks

http://stackoverflow.com/comment/44565650
has text: The reason is not the selector. Look at this fiddle: http://jsfiddle.net/t4btg2oj/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28086322
type: Comment

http://stackoverflow.com/a/28018780
upvote count: 2
answers question: http://stackoverflow.com/q/28018739
score: 2
downvote count: 0
type: Answer
has body: You can't display an image in Javascript alert box, it can only show text. You may implement modal with any of the available ui libraries like Bootstrap/jQuery/ jQuery-UI, etc. You can also refer to this link for some inputs.

http://stackoverflow.com/a/28114736
has body: Flash has closures on methods, so it gets called in the right scope. JavaScript doesn't. You have defined these functions as anonymous, since they just live in the frame's function (check out the exported AS), so the scope is lost when the functions are called. You can solve this by storing the functions on this Instead of: function pulse() {} pulse(); Use: this.pulse = function() {} this.pulse(); You also have to ensuring that calls made by utilities like TweenLite also include a scope. If there is no support for scoping methods in TweenLite, you will have to do it manually.Binding your functions is an easy way to provide a scope, but it isn't supported in all browsers. TweenLite.ticker.addEventListener("tick", callRandomPulse.bind(this)); Hope this helps. Feel free to take a stab at this, and let me know if you still get hung up, and I can provide more assistance.
score: 0
has comment: http://stackoverflow.com/comment/44679299
answers question: http://stackoverflow.com/q/28087696
has comment: http://stackoverflow.com/comment/44650731
has comment: http://stackoverflow.com/comment/44838749
has comment: http://stackoverflow.com/comment/44838047
type: Answer
has comment: http://stackoverflow.com/comment/44841600

http://stackoverflow.com/a/27996062
score: 1
accepted answer of: http://stackoverflow.com/q/27995835
type: AcceptedAnswer
downvote count: 0
has body: Introducing a callback parameter for your moveNext() function doesn't help if you don't actually pass a function when you call moveNext(). The code you've shown still only passes the original five arguments, so then when you try to use callback(totalBusLoc) you'll find that callback is undefined. So you could change the call to moveNext() to pass a callback function: moveNext(coord.x, coord.y, index, busList, totalBusLoc, function(newTotalBusLoc) { totalBusLoc = newTotalBusLoc; }); That should work because the function I've introduced has the original totalBusLoc variable in scope. But it seems kind of messy, passing the value back and forth like that. Given that you confirmed in a comment that moveNext() isn't used anywhere else and doesn't contain much code I'd probably get rid of that function and move its body directly into the anonymous function that you pass to setTimeout(): getAllBusLoc(function(busList) { var totalBusLoc = busList.length; document.getElementById("busStopLeft").innerHTML = totalBusLoc; pointArr.forEach(function(coord,index){ setTimeout(function(){ if (busList.indexOf(coord.x + "," + coord.y) &gt; -1) document.getElementById("busStopLeft").innerHTML = --totalBusLoc; }, 1500* index); }); }); The inner anonymous function that you pass to setTimeout() has access to variables declared in its containing function(s), so it can access the outer totalBusLoc variable directly. That is, all three places that reference totalBusLoc in the code I've shown are referencing the same variable. (Note: I also simplified your code a little. Where you had variables that were only used once after being assigned a value I got rid of those variables. But what I've shown should still do the same thing.)
type: Answer
answers question: http://stackoverflow.com/q/27995835
upvote count: 1

http://stackoverflow.com/comment/44483161
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28049859
has text: http://www.w3.org/TR/xhtml1/#h-4.8
score: 0

http://stackoverflow.com/q/28046567
upvote count: 1
has comment: http://stackoverflow.com/comment/44477039
answer count: 1
has comment: http://stackoverflow.com/comment/44475440
has comment: http://stackoverflow.com/comment/44476578
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44475566
has body: my requirement when selectindexchanged on ddl_fvr ,value of ddl_fvr ddl must be selected in ddl_customer listbox.i only want to do in javascript. &lt;asp:DropDownList ID="ddl_fvr" runat="server" AutoPostBack="true" &gt; &lt;asp:ListItem Text="a" Value="ezhisai,raja" /&gt; &lt;asp:ListItem Text="b" Value="devi,kumar,sith" /&gt; &lt;asp:ListItem Text="c" Value="bala,raja" /&gt; &lt;asp:ListItem Text="d" Value="ezhisai,kumar,devi" /&gt; &lt;/asp:DropDownList&gt; &lt;asp:ListBox ID="ddl_customer" runat="server" SelectionMode="Multiple" style="width:300px" &gt; &lt;asp:ListItem Text="ezhisai" Value="ezhisai" /&gt; &lt;asp:ListItem Text="raja" Value="raja" /&gt; &lt;asp:ListItem Text="devi" Value="devi" /&gt; &lt;asp:ListItem Text="kumar" Value="kumar" /&gt; &lt;asp:ListItem Text="sith" Value="sith" /&gt; &lt;asp:ListItem Text="bala" Value="bala" /&gt; &lt;/asp:ListBox&gt; window.onload = function () { var queue = document.getElementById("&lt;%=ddl_fvr.ClientID%&gt;"); queue.onchange = function () { var queuval = queue.value; var getSUBqueue = queuval.substring(0, queuval.length-1); $.each(getSUBqueue.split(","), function (i, e) { $("#ddl_customer option[value='" + e + "']").prop("selected", true); }); }; } i tried above code but not worked
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44476094
favorite count: 0
has comment: http://stackoverflow.com/comment/44476891
type: Question
has answer: http://stackoverflow.com/a/28047524
has title: How to set multiple selected value of listbox on onchange event of parent dropdownlist in javascript
tagged with: javascript
has comment: http://stackoverflow.com/comment/44475516

http://stackoverflow.com/q/27970815
answer count: 2
has title: How to get co-responding JavaScript value from a table when a cell is clicked?
upvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27970982
tagged with: http://stackoverflow.com/tag/html
score: -2
tagged with: php
accepted answer: http://stackoverflow.com/a/27970982
type: AnsweredQuestion
downvote count: 2
possible better answer: http://stackoverflow.com/a/27970868
type: Question
has answer: http://stackoverflow.com/a/27970868
tagged with: javascript
has body: I'm trying to get a value from this table when a cell is clicked: while ($result = $query->fetch(PDO::FETCH_ASSOC)){ echo " ".$result['firstName']." "; echo " ".$result['lastName']." "; echo " ".$result['day']." "; echo " ".$result['dutiesPerformed']." "; echo " ".$result['classification']." "; echo " \n"; } This is what I have so far to get values (it doesn't work): $("td[column = classification]").click(function() { $.post('dropDowntest.php', { id: this.id}, function(data) { }) var overlayTeacherId = $(this).attr("id"); alert(overlayTeacherId); }); I'm trying to get the "id" value from the classification cell, but the alert just returns undefined. Any help would be appreciated. Thanks! edit: the quotes on the this are actually not there in the code, I mistyped them when I was typing out this quesiton, sorry
has comment: http://stackoverflow.com/comment/44334524

http://stackoverflow.com/comment/44558514
type: Comment
comment on: http://stackoverflow.com/a/28089711
score: 1
type: AnswerComment
has text: Observe: http://jsfiddle.net/3ob9ekno/ I'll edit your post if that's what you want. The first edit should have been rejected as invalid.

http://stackoverflow.com/q/28024981
score: 0
has answer: http://stackoverflow.com/a/28026702
answer count: 3
tagged with: mixins
has answer: http://stackoverflow.com/a/28107223
accepted answer: http://stackoverflow.com/a/28026702
has body: After reading this article: A fresh look at javascript mixins I wanted to move some common knockout computed functions to a mixin and mix that into each viewmodel that needs the functionality. First the mixin function var asActor = function() { this.nrOfEmployees = ko.computed(function () { if (this.employees()) return this.employees().length; return 0; }, this).extend({ throttle: 20 }); this.nrOfAddresses = ko.computed(function () { if (this.addresses()) return this.addresses().length; return 0; }, this).extend({ throttle: 20 }) }; Then the call to mix the mixin into the target objects prototype asActor.call(SenderActor.prototype); asActor.call(ReceiverActor.prototype); My problem seems to be that this (or self which is set to this inside the viewmodel) points to the windows object and not the viewmodel. Any ideas? Javascript mixins is new to me so I'm probably missing something obvious here.
possible better answer: http://stackoverflow.com/a/28025821
has answer: http://stackoverflow.com/a/28025821
type: AnsweredQuestion
has title: Add mixin with ko.computed to knockout viewmodel
tagged with: knockout.js
type: Question
tagged with: javascript

http://stackoverflow.com/a/28031011
answers question: http://stackoverflow.com/q/28030985
has body: To the script scope add this same all others: var image4 = new Image() image4.src = "http://jgsprograms.weebly.com/uploads/2/1/5/7/21578716/3920613_orig.jpg" The code: document.images.slide.src = eval("image"+step+".src"); will take it automaticly, because it's taking all your Image() objects in this HTML
score: 0
type: Answer

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/28076933
tags question: http://stackoverflow.com/q/28040007
tags question: http://stackoverflow.com/q/28065222
tags question: http://stackoverflow.com/q/28039214
tags question: http://stackoverflow.com/q/28085655
tags question: http://stackoverflow.com/q/27993234
tags question: http://stackoverflow.com/q/27995952
tags question: http://stackoverflow.com/q/28078351
tags question: http://stackoverflow.com/q/28036795
tags question: http://stackoverflow.com/q/27991776
tags question: http://stackoverflow.com/q/27980616
tags question: http://stackoverflow.com/q/28118582
tags question: http://stackoverflow.com/q/28078556
tags question: http://stackoverflow.com/q/28116679
tags question: http://stackoverflow.com/q/28081877
tags question: http://stackoverflow.com/q/28062818
tags question: http://stackoverflow.com/q/28120177
tags question: http://stackoverflow.com/q/28118644
tags question: http://stackoverflow.com/q/28061993
tags question: http://stackoverflow.com/q/28030246
tags question: http://stackoverflow.com/q/27977697
tags question: http://stackoverflow.com/q/27984248
tags question: http://stackoverflow.com/q/28014316
tags question: http://stackoverflow.com/q/28095094
tags question: http://stackoverflow.com/q/28107624
tags question: http://stackoverflow.com/q/27991488
tags question: http://stackoverflow.com/q/27988389
tags question: http://stackoverflow.com/q/27980999
tags question: http://stackoverflow.com/q/27983637
tags question: http://stackoverflow.com/q/28073135
tags question: http://stackoverflow.com/q/28013769
tags question: http://stackoverflow.com/q/28028542
tags question: http://stackoverflow.com/q/28008398
tags question: http://stackoverflow.com/q/28008852
tags question: http://stackoverflow.com/q/27991754
tags question: http://stackoverflow.com/q/28115172
tags question: http://stackoverflow.com/q/28058732
tags question: http://stackoverflow.com/q/28070443
tags question: http://stackoverflow.com/q/28018719
tags question: http://stackoverflow.com/q/28061059
tags question: http://stackoverflow.com/q/28067266
tags question: http://stackoverflow.com/q/27992967
tags question: http://stackoverflow.com/q/28022875
tags question: http://stackoverflow.com/q/28115536
tags question: http://stackoverflow.com/q/27973339
tags question: http://stackoverflow.com/q/28108234
tags question: http://stackoverflow.com/q/28031299
tags question: http://stackoverflow.com/q/28011016
tags question: http://stackoverflow.com/q/28119815
tags question: http://stackoverflow.com/q/27987748
tags question: http://stackoverflow.com/q/28002094
tags question: http://stackoverflow.com/q/28050071
tags question: http://stackoverflow.com/q/28049877
tags question: http://stackoverflow.com/q/28032615
tags question: http://stackoverflow.com/q/28061937
tags question: http://stackoverflow.com/q/28022419
tags question: http://stackoverflow.com/q/28109050
tags question: http://stackoverflow.com/q/28063760
tags question: http://stackoverflow.com/q/28027215
tags question: http://stackoverflow.com/q/28015741
tags question: http://stackoverflow.com/q/28119959
tags question: http://stackoverflow.com/q/27997690
tags question: http://stackoverflow.com/q/27998217
tags question: http://stackoverflow.com/q/27996437
tags question: http://stackoverflow.com/q/27979475
tags question: http://stackoverflow.com/q/28107749
tags question: http://stackoverflow.com/q/28014174
tags question: http://stackoverflow.com/q/28117733
tags question: http://stackoverflow.com/q/28109871
tags question: http://stackoverflow.com/q/27997839
tags question: http://stackoverflow.com/q/28053774
tags question: http://stackoverflow.com/q/28102194
tags question: http://stackoverflow.com/q/28104966
tags question: http://stackoverflow.com/q/28082399
tags question: http://stackoverflow.com/q/28117729
tags question: http://stackoverflow.com/q/28121222
tags question: http://stackoverflow.com/q/28046574
type: Tag
tags question: http://stackoverflow.com/q/27998230
tags question: http://stackoverflow.com/q/28054931

http://stackoverflow.com/comment/50393971
type: AnswerComment
comment on: http://stackoverflow.com/a/28464097
type: Comment
has text: This worked. I don't know why, but it did... Not happy I had to change the event type though.
score: 0

http://stackoverflow.com/q/28008888
has title: Jquery AJAX POST get ID from response URI
has answer: http://stackoverflow.com/a/28008937
has body: This may be a really simple one but I have been searching the net for a few hours and can't find an answer! I make a POST call to an API and it returns the ID in the URL (for example, the POST goes to /api/user and the response is /api/user/1). I want to be able to retrieve that 1. Calling this.url in the .done function just returns http://localhost/api/user Code is as follows: ajaxHelper(url + '/api/user/', 'POST', user).done(function (item) { //want to get the ID here alert(this.url) //Returns the original URL without the ID (i.e. http://localhost/api/user } function ajaxHelper(uri, method, data) { var headers = {}; return $.ajax({ type: method, url: uri, headers: headers, dataType: 'json', contentType: 'application/json', data: data ? JSON.stringify(data) : null }).fail(function (jqXHR, textStatus, errorThrown) { alert(errorThrown); }); }
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44405772
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/44405880
type: UnansweredQuestion

http://stackoverflow.com/q/27980996
has comment: http://stackoverflow.com/comment/44387245
has comment: http://stackoverflow.com/comment/44398194
accepted answer: http://stackoverflow.com/a/28006379
has answer: http://stackoverflow.com/a/51511138
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27983964
tagged with: constructor
possible better answer: http://stackoverflow.com/a/51511138
has comment: http://stackoverflow.com/comment/44384209
score: 23
downvote count: 1
upvote count: 24
type: Question
has comment: http://stackoverflow.com/comment/44387101
has comment: http://stackoverflow.com/comment/44396631
tagged with: javascript
has comment: http://stackoverflow.com/comment/50058469
has answer: http://stackoverflow.com/a/28006379
tagged with: ecmascript-6
answer count: 3
has body: Recently I've been testing out classes with ES6, I've noticed that when creating a class you cannot specify the value given by the constructor. Previously in ES5 this was possible. In both cases I would instantiate the class with new MyClass The reason I want to do this is so I can return a subset of the current class with only functions on it. ES5 - returns My class was init with: Blah var MyClass = function() { this.initVar = 'Blah' return 'My Class was init with: ' + this.initVar } ES6 - returns {} class Bob { constructor() { return 'hello' } }
has title: Return a value other than the class in ES6
favorite count: 0
has comment: http://stackoverflow.com/comment/44354066
has comment: http://stackoverflow.com/comment/44400884

http://stackoverflow.com/q/28102177
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/44579724
has title: simple terminal javascript chess game not understanding the error
tagged with: arrays
tagged with: javascript
score: -1
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/44579680
answer count: 1
has body: Tried to create a function to move a "chess" piece and Im not too sure what is happening. any help is appreciated var board = [ ['R', 'N', 'B', 'Q', 'K', 'B', 'N', 'R'], ['P', 'P', 'P', 'P', 'P', 'P', 'P', 'P'], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], ['p', 'p', 'p', 'p', 'p', 'p', 'p', 'p'], ['r', 'n', 'b', 'q', 'k', 'b', 'n', 'r'], ]; var printBoard = function () { console.log(board.join('\n') + '\n\n'); }; printBoard(); // printBoard is a function that takes no arguments since it just prints a board from the array var moveMe = function (fromX, fromY, toX, toY) { board[toY][toX] = [fromY][fromX]; board[fromY][fromX] = ' '; printBoard(); }; moveMe(1, 1, 1, 2);
favorite count: 0
has comment: http://stackoverflow.com/comment/44579702
has answer: http://stackoverflow.com/a/28102202
accepted answer: http://stackoverflow.com/a/28102202

http://stackoverflow.com/comment/44493907
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28055966
has text: I know i've been staring at it for hours looking for little mistakes but it just wont work! It will only load my standard img src that is in my html. Images will change if i use `$(window).resize()` instead of `$(function())` but i dont want to have to drag the browser around to force the images to change if you know what i mean.

http://stackoverflow.com/comment/44437242
type: Comment
has text: do you have jQuery included there?
score: 0
comment on: http://stackoverflow.com/a/28025775
type: AnswerComment

http://stackoverflow.com/comment/44396071
has text: $http call from directive would be better..using $intervals
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28003161
score: 0

http://stackoverflow.com/a/27992049
accepted answer of: http://stackoverflow.com/q/27991029
type: Answer
has body: A good way to figure out how a component from a site you've seen works is to use your browser's developer tools. In Chrome for example you can right click the settings button and inspect it to see its HTML and CSS. So I did that and I've copied the important HTML and CSS for this into this jsfiddle. It's very simple, with poor UI, but I hope it can help. On the CSS part what it does is just to position the nodes as fixed and add a simple transition for when its right css rule is changed. #config-tool { position: fixed; right: -200px; top: 120px; width: 200px; z-index: 1000; transition: all 0.2s ease-in-out 0s; } Then you just need some js to capture clicks on the button and change the css class so that the component is positioned in a way to show the rest of the content: configNode.addEventListener('click', function() { if (isOpen) { configNode.className = ''; } else { configNode.className = 'open'; } isOpen = !isOpen; }); Take a look at the jsfiddle for more details.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27991029
score: 0

http://stackoverflow.com/a/28032746
answers question: http://stackoverflow.com/q/28031289
type: Answer
score: 11
has body: Promises and Generators are different software patterns (constructs): http://en.wikipedia.org/wiki/Futures_and_promises http://en.wikipedia.org/wiki/Generator_(computer_programming) In fact, generators aren't asynchronous. Generators are useful when you need to get a series of values not at once, but one per demand. Generator will return next value immediately (synchronously) on every call until it reaches the end of the sequence (or endless in case of infinite series). Promises are useful when you need to "defer" the value, that may not be computed (or may not be available) yet. When the value is available - it's the whole value (not part of it) even it is an array or other complex value. You can see more details and examples in wikipedia articles.
upvote count: 11
downvote count: 0

http://stackoverflow.com/q/28099051
has body: I want to find data by "createdAt" field but i need to search with date only (without time). var d = new Date(); var query = new Parse.Query("TableName"); query.equalTo("createdAt", d);
tagged with: parse-platform
score: 13
type: AnsweredQuestion
upvote count: 14
downvote count: 1
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/32370436
has answer: http://stackoverflow.com/a/32370436
tagged with: javascript
has answer: http://stackoverflow.com/a/28099490
has title: parse.com - how i can create query equal createdAt by date only with javascript
accepted answer: http://stackoverflow.com/a/28099490
favorite count: 0

http://stackoverflow.com/comment/44558446
comment on: http://stackoverflow.com/a/28087667
type: Comment
has text: I tried the code and it didn't work as I could see, but to be more specified I want to read the cookie or just display it on the result page, but I'm also pretty sure that keyCode dosen't work on my computer I 've tried it before so charCode and keypress is the only thing that's working on the computer
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44559222
type: AnswerComment
comment on: http://stackoverflow.com/a/28091237
score: 0
has text: Thank you, hadn't thought of this possibility yet. Works fine.
type: Comment

http://stackoverflow.com/comment/44615172
comment on: http://stackoverflow.com/a/28117234
type: Comment
has text: True. You can fix that by setting `max-height: 100%` and `overflow:scroll` in `#side_bar`. Is that the behaviour you would like to have?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44554215
comment on: http://stackoverflow.com/q/28072029
score: 0
type: Comment
type: QuestionComment
has text: Do you mean set different tickInterval in navigator ?

http://stackoverflow.com/q/27988830
has answer: http://stackoverflow.com/a/27989351
has body: I am trying to get the id of a child li element and see if that id contains the word "unit". Here is the segment of javascript that I have been working on: insertSearchIcon: function(evt){ var treeExists = $( '.jstree-icon' ).html(); var currentTarget = $(evt.currentTarget); if (treeExists != null){ //Check to see if tree exists var elementExists = document.getElementsByClassName( 'oob-dropdown' ); zero = 0; if(elementExists.length == zero){ //Check to see if button is already there var idOfParent = currentTarget.siblings('li').id; if(idOfParent.indexOf("unit") != -1){ //Check to see if element is not a unit currentTarget.$( '.jstree-leaf' ).prepend(' '); } } } } I am trying to get the id that goes along with the ".jstree-leaf" under the ".jstree-icon" that was clicked: <--!Not this one> S2 SEC 330 MED
type: Question
possible better answer: http://stackoverflow.com/a/27988914
has title: How can I get the id of a child element/
has answer: http://stackoverflow.com/a/27988914
has answer: http://stackoverflow.com/a/27989021
tagged with: javascript
answer count: 6
score: 0
has answer: http://stackoverflow.com/a/28033848
tagged with: jquery
has comment: http://stackoverflow.com/comment/44368735
has answer: http://stackoverflow.com/a/27989008
has answer: http://stackoverflow.com/a/27989121
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28033848
has comment: http://stackoverflow.com/comment/44369253

http://stackoverflow.com/q/28118849
has comment: http://stackoverflow.com/comment/44719111
has title: Range slider input event not firing in IE 10
has comment: http://stackoverflow.com/comment/44612391
possible better answer: http://stackoverflow.com/a/34692580
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/44612060
has answer: http://stackoverflow.com/a/52205361
answer count: 3
score: 5
downvote count: 0
has answer: http://stackoverflow.com/a/28253939
accepted answer: http://stackoverflow.com/a/28253939
has body: I have a range slider and I want to listen to its change and input events. This works fine in most browsers, but in IE 10, there is no input event firing and change fires over and over like input is supposed to. Here is the code: html: &lt;input id="slider" type="range" /&gt; js: window.addEventListener('load', function() { var input = document.getElementById('slider'); input.addEventListener('input', function(e) { console.log('input'); }); input.addEventListener('change', function(e) { console.log('change'); }); }); And here it is on codepen: http://codepen.io/ZevanRosser/pen/YPQVzJ I'm wondering if there is a workaround for this - a polyfill or some simple trick.
favorite count: 0
has comment: http://stackoverflow.com/comment/44673387
has answer: http://stackoverflow.com/a/34692580
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44612863
has comment: http://stackoverflow.com/comment/44612772
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44613229
tagged with: internet-explorer-10
type: Question

http://stackoverflow.com/q/27992044
tagged with: css
has answer: http://stackoverflow.com/a/27992076
has title: How can I rotate a pie chart in charts.js?
type: AnsweredQuestion
has body: It looks like a pie in charts.js is drawn by taking a vertical radius on the top half of the circle, and then moving clockwise from there. This works great most of the time, but for a pie with only 2 categories, it would be nice if it could be rotated so that the slice is centered, like this: The rotation is calculated by taking the percentage of 360 and dividing by 2. (.14*360)/2 = 25.2 degrees left, so if I could just apply transform: rotate(-25.2deg); to the circle I would be good. Since charts.js puts this on a canvas (as opposed to &lt;svg&gt;) I don't know how to apply any transformations to this. Not sure if relevant, but here is my code for the chart: HTML &lt;canvas id=canvas style='width:300px;height:300px;'&gt;&lt;/canvas&gt; JS openRate = [ { value: 488, color: "#FF9030", highlight: "rgba(255, 144, 48, 0.44)", }, { value: 3475, color: "#008DB7", highlight: "rgba(0, 141, 183, 0.82)" } ]; var ctx=document.getElementById('canvas').getContext("2d"); var chart=new Chart(ctx).Pie(openRate); And a fiddle: http://jsfiddle.net/msy6kf3a/
tagged with: chart.js
score: 4
type: Question
upvote count: 4
answer count: 2
tagged with: canvas
possible better answer: http://stackoverflow.com/a/27992076
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/40593882
accepted answer: http://stackoverflow.com/a/40593882

http://stackoverflow.com/comment/44383625
has text: @MattBall That says that not all sets can be decomposed, but for those which can, you can certainly find a solution.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27996620
score: 0

http://stackoverflow.com/a/32909852
downvote count: 0
score: 1
has body: If you are using the less version to compile Bootstrap modify @modal-backdrop-opacity in your variables override file $modal-backdrop-opacity for scss.
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28096346

http://stackoverflow.com/a/28104779
type: Answer
answers question: http://stackoverflow.com/q/28104723
upvote count: 1
has body: if(qs_trip_type == 0){ $('#rdo_pick').prop('checked',true); }else{ //not ekse $('#rdo_pick').prop('checked',true); } Here's the jsfidlle http://jsfiddle.net/urLh9qnh/
has comment: http://stackoverflow.com/comment/44584415
score: 1
has comment: http://stackoverflow.com/comment/44588524
downvote count: 0

http://stackoverflow.com/comment/44434449
score: 0
type: Comment
type: QuestionComment
has text: please show your code little bit
comment on: http://stackoverflow.com/q/28022597

http://stackoverflow.com/comment/46699261
has text: this is the problem i have let me start with how the data are load inorder for the select option to have values we have set them to be populated on change. But what if the data is from database since no onchange happens it will not be populated when i put on so that the select will have value thus it can be populated the problem is the value from the database is not the on that is select. the selected value is always the first value (alphabetically). I hope i am making clear if not please let go to chat so i can explain
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28059053

jquery-selectors
tags question: http://stackoverflow.com/q/27993968
type: Tag
tags question: http://stackoverflow.com/q/28025259
tags question: http://stackoverflow.com/q/27974082
tags question: http://stackoverflow.com/q/28000614
tags question: http://stackoverflow.com/q/28088830
tags question: http://stackoverflow.com/q/28061578
tags question: http://stackoverflow.com/q/28070932
tags question: http://stackoverflow.com/q/28022810
tags question: http://stackoverflow.com/q/28096158
tag name: jquery-selectors
tags question: http://stackoverflow.com/q/28042601

http://stackoverflow.com/a/28041171
upvote count: 2
has comment: http://stackoverflow.com/comment/44466231
score: 2
answers question: http://stackoverflow.com/q/28040489
downvote count: 0
has body: After declaring a function, its name becomes a (locally) preserved word. It means that creating a variable with the same name might cause some problems. I took your code and changed var TTS = new TTS(); TTS.speakText(); Into var tts = new TTS(); tts.speakText(); And the error disappeared.
type: Answer

http://stackoverflow.com/a/28047781
has body: http://jsfiddle.net/naeemshaikh27/u0x15oj3/ calculate the real height of the image. subtract the height of the div shown, this is the threshold. clear the interval when this threshold is reached
type: Answer
answers question: http://stackoverflow.com/q/28047529
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/a/28077512
accepted answer of: http://stackoverflow.com/q/28077353
has body: You could write a function like this: function indexesOf(myWord, myLetter) { var indexes = new Array(); for(var i = 0; i &lt; myWord.length; i++) { if(myWord.charAt(i) == myLetter) { indexes.push(i); } } return indexes; } console.log(indexesOf("tree", "e"));
answers question: http://stackoverflow.com/q/28077353
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/44534281
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44535016
type: Answer

http://stackoverflow.com/comment/44458452
type: Comment
score: 0
type: AnswerComment
has text: Can you share the output HTML? just the part where your dropdown comes
comment on: http://stackoverflow.com/a/28036779

http://stackoverflow.com/q/28072443
tagged with: epoch
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/28072830
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44524592
has comment: http://stackoverflow.com/comment/44524644
score: 1
has comment: http://stackoverflow.com/comment/44524639
has comment: http://stackoverflow.com/comment/66106390
upvote count: 1
type: Question
tagged with: charts
has title: Trying to use Epoch Charts by Fastly, can't even follow the tutorial
tagged with: javascript
has answer: http://stackoverflow.com/a/28414444
has comment: http://stackoverflow.com/comment/44524376
has body: I've done some cool things in javascript and html before, but I don't do enough of it to see what I'm missing here. I'm certain its something fairly simple that I'm forgetting or doing wrong. For an upcoming project at work I want to use Epoch charts by Fastly, and I'm trying to get my feet wet but I cant get a single simple chart happening. The code here is just taken from Epoch's Getting Started page, and I've got all the scripts downloaded except jquery... I don't see why it wont work? Any answers are greatly appreciated.
answer count: 2
has answer: http://stackoverflow.com/a/28072830
has comment: http://stackoverflow.com/comment/44524785
downvote count: 0
possible better answer: http://stackoverflow.com/a/28414444
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/27973737
type: Answer
answers question: http://stackoverflow.com/q/27973380
score: 0
has body: Here's an if condition to isolate the invalid keys while you loop the data. Used as a filter, you can choose to delete the keys you do not want - like this: $('#ssd').click(function(e){ var data = $(this).data(); for(var key in data) { //here is a condition to use only those data-info items if(data.hasOwnProperty(key) &amp;&amp; key.indexOf('info') === -1) { console.log(key); //just to see which key it is delete data[key]; //if you need to build a collection of only data-info keys } } }); Alternatively, negate the if condition to include only those keys you want.

knockout.js
tags question: http://stackoverflow.com/q/28025236
tags question: http://stackoverflow.com/q/27999027
tags question: http://stackoverflow.com/q/28013542
tags question: http://stackoverflow.com/q/28069897
tags question: http://stackoverflow.com/q/28013617
tags question: http://stackoverflow.com/q/28050277
tags question: http://stackoverflow.com/q/27998963
tags question: http://stackoverflow.com/q/28027643
tags question: http://stackoverflow.com/q/28024981
tags question: http://stackoverflow.com/q/28029997
tags question: http://stackoverflow.com/q/28050561
tags question: http://stackoverflow.com/q/28076350
tags question: http://stackoverflow.com/q/28018151
tags question: http://stackoverflow.com/q/28008397
tags question: http://stackoverflow.com/q/28073204
tags question: http://stackoverflow.com/q/28118738
tags question: http://stackoverflow.com/q/28029974
tags question: http://stackoverflow.com/q/27983692
tags question: http://stackoverflow.com/q/28072757
tags question: http://stackoverflow.com/q/28114747
tags question: http://stackoverflow.com/q/28087885
tags question: http://stackoverflow.com/q/28059748
tags question: http://stackoverflow.com/q/27964711
tag name: knockout.js
tags question: http://stackoverflow.com/q/27992826
tags question: http://stackoverflow.com/q/28049288
tags question: http://stackoverflow.com/q/28076252
tags question: http://stackoverflow.com/q/28026426
tags question: http://stackoverflow.com/q/28099598
tags question: http://stackoverflow.com/q/28115285
tags question: http://stackoverflow.com/q/28026651
tags question: http://stackoverflow.com/q/28036773
tags question: http://stackoverflow.com/q/27964957
tags question: http://stackoverflow.com/q/28105825
tags question: http://stackoverflow.com/q/27991496
tags question: http://stackoverflow.com/q/27995675
tags question: http://stackoverflow.com/q/28011933
tags question: http://stackoverflow.com/q/28048035
tags question: http://stackoverflow.com/q/28099389
tags question: http://stackoverflow.com/q/27986161
tags question: http://stackoverflow.com/q/27992873
tags question: http://stackoverflow.com/q/28017446
tags question: http://stackoverflow.com/q/28021065
tags question: http://stackoverflow.com/q/27966923
type: Tag
tags question: http://stackoverflow.com/q/28096336
tags question: http://stackoverflow.com/q/28028215
tags question: http://stackoverflow.com/q/28022059
tags question: http://stackoverflow.com/q/27985387
tags question: http://stackoverflow.com/q/27989347
tags question: http://stackoverflow.com/q/28004377
tags question: http://stackoverflow.com/q/28117986
tags question: http://stackoverflow.com/q/28013045
tags question: http://stackoverflow.com/q/28010022
tags question: http://stackoverflow.com/q/27978357
tags question: http://stackoverflow.com/q/28118901
tags question: http://stackoverflow.com/q/28031605

http://stackoverflow.com/comment/44558551
has text: That talks about JSON in a JavaScript *string literal*. The problem is with the string literals in that case. That doesn't apply to JSON itself.
type: AnswerComment
comment on: http://stackoverflow.com/a/28082189
score: 0
type: Comment

http://stackoverflow.com/comment/44341022
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27973718
has text: No I am not passing anything to DB. i am using an Oracle product that allows me to script. Scripting is done in JS. It seems like getDate is not able to get the day based on the format. I think i need to change the format to mm/dd/yyyy for it to work.
score: 0

http://stackoverflow.com/comment/44379725
type: Comment
has text: Edited the answer again. I hope you include some kind of extension on your image file too. Doesn't it end in .jpg or .png or something?
comment on: http://stackoverflow.com/a/27994241
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44435803
comment on: http://stackoverflow.com/a/28024875
score: 0
has text: I dont think that there is any possibility then
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28019495
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/44425399
has comment: http://stackoverflow.com/comment/44428457
has comment: http://stackoverflow.com/comment/44425737
has comment: http://stackoverflow.com/comment/44425922
answers question: http://stackoverflow.com/q/28019457
score: 1
accepted answer of: http://stackoverflow.com/q/28019457
has comment: http://stackoverflow.com/comment/44425830
has comment: http://stackoverflow.com/comment/44425778
has comment: http://stackoverflow.com/comment/44426026
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44426084
downvote count: 0
has comment: http://stackoverflow.com/comment/44425846
has body: To save the data you need to do two things: On the client you need to send the changed data back to the server. This will typically be done with a POST request. For example: $.post("resources-locale_fr.fcgi", { "remember me", updated_variable }); On the server you will need some server side code, written in the language of your choice, that accepts the POST request and writes the data to the file (usually after performing some authentication/authorization check). For this sort of application you would usually replace the static JSON file with a database and then generate JSON on demand with a server side program.
has comment: http://stackoverflow.com/comment/44425581

http://stackoverflow.com/comment/44545398
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28083528
score: 1
has text: To give your code every change of keeping up, (a) don't delegate the event handling, (b) avoid unnecessary DOM interaction in foo() - do as much as possible in javascript.

http://stackoverflow.com/a/28098000
answers question: http://stackoverflow.com/q/28097770
has comment: http://stackoverflow.com/comment/44571977
downvote count: 0
has body: It's possible for you to do this in your controller : $scope.$watch('typeCheckBoxes', function(newObject, oldObject) { // You can do what you want with your newObject here }, true); Don't forget the true as the second parameter. This is allow you to watch an entire object and not just a simple value. This $watch will be triggered at each change. Because the ids of your checkboxes are the labels, you will have it too in the newObject.
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/44447995
score: 0
comment on: http://stackoverflow.com/q/28031639
type: Comment
type: QuestionComment

web
tags question: http://stackoverflow.com/q/27968014
tags question: http://stackoverflow.com/q/28063056
tags question: http://stackoverflow.com/q/28020706
tags question: http://stackoverflow.com/q/27988114
tags question: http://stackoverflow.com/q/28023660
tags question: http://stackoverflow.com/q/27988012
tags question: http://stackoverflow.com/q/27993124
type: Tag
tags question: http://stackoverflow.com/q/28004475
tags question: http://stackoverflow.com/q/28037402
tags question: http://stackoverflow.com/q/28059250
tags question: http://stackoverflow.com/q/28022875
tag name: web
tags question: http://stackoverflow.com/q/28078529
tags question: http://stackoverflow.com/q/28014113
tags question: http://stackoverflow.com/q/28040489
tags question: http://stackoverflow.com/q/27991361
tags question: http://stackoverflow.com/q/28052074
tags question: http://stackoverflow.com/q/27975462
tags question: http://stackoverflow.com/q/27969590
tags question: http://stackoverflow.com/q/28040234
tags question: http://stackoverflow.com/q/28103367
tags question: http://stackoverflow.com/q/28064846

http://stackoverflow.com/comment/122798397
type: Comment
score: 1
comment on: http://stackoverflow.com/a/28103073
type: AnswerComment
has text: Specifically, the point is to wrap the replacement string in a function; that way no escaping is done to it.

http://stackoverflow.com/comment/44437991
type: QuestionComment
has text: use this: `$("article[name='']").hide()` when the name is empty.
score: 1
comment on: http://stackoverflow.com/q/28026314
type: Comment

http://stackoverflow.com/comment/44553481
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28084057
has text: It prevents current event from happening. You have it on `load` event. Try putting into `click` event (which doesn't appear in the code you shared)
score: 0

http://stackoverflow.com/a/79356776
has body: There are several ways to name an arrow function without a var statement. const x = () =&gt; console.log('with a const') let x = () =&gt; console.log('with a let') const a = { x: () =&gt; console.log('as a property') } In some environments you could do this, assigning it to a temporary variable and calling it immediately, without using any var, const or let. (x = () =&gt; console.log('x'))() Or similarly, ((x = () =&gt; console.log('x')), x()) Perhaps the most legitimate way which doesn't require any assignment at all is this: ({ z: () =&gt; console.log('z') }).z() Or, alternatively: ({ a() { console.log('a'); }}).a()
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27977525

http://stackoverflow.com/q/28084523
favorite count: 0
has title: document.execCommand('copy') on objects not in DOM?
has comment: http://stackoverflow.com/comment/44546865
accepted answer: http://stackoverflow.com/a/28084590
tagged with: clipboard
has comment: http://stackoverflow.com/comment/44547548
has comment: http://stackoverflow.com/comment/44547501
has comment: http://stackoverflow.com/comment/44547533
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44547579
score: 1
upvote count: 1
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/28084590
has body: I'm not 100% sure how to describe this, so I will simply paste three pieces of relevant code. I am able to do this: var dl = $('&lt;a&gt;',{ style: 'display: none', download: this.name + '.txt', href: window.URL.createObjectURL(data, {type: "octet/stream"})) }); dl[0].click(); and I am able to do this: copydeck = $("&lt;textarea&gt;").val(this.list.join("\r\n")); $('body').append(copydeck); copydeck.select(); document.execCommand('copy'); copydeck.remove(); But I cannot do this: copydeck = $("&lt;textarea&gt;").val(this.list.join("\r\n")); copydeck[0].select(); document.execCommand('copy'); Why? What am I missing here? Am I unable to select or copy elements not in the DOM? Is there a way to do this without appending the object to the body?
tagged with: javascript
has comment: http://stackoverflow.com/comment/44546915
tagged with: jquery
has comment: http://stackoverflow.com/comment/44547134
tagged with: google-chrome-extension
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/44562692
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28092367
type: Comment
has text: i got it finally...can u gimme tips on how to retrieve data from the database now using AJAX?

http://stackoverflow.com/comment/44388665
has text: try save in window variable `window.skill = "JavaScript";` then console log inside function will be `console.log(window.skill)`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27999654
score: 0

http://stackoverflow.com/comment/44518178
comment on: http://stackoverflow.com/q/28069368
score: 0
type: Comment
type: QuestionComment
has text: Post the code here please.

http://stackoverflow.com/comment/44560897
comment on: http://stackoverflow.com/q/28092111
type: QuestionComment
type: Comment
has text: After processing the data on the server side redirct to a page called `close.html` or something and the only thing the page does is `window.close()`. I have used this method before.
score: 0

http://stackoverflow.com/q/27996437
has title: Ajax unable to parse JSON data
has comment: http://stackoverflow.com/comment/44383504
has comment: http://stackoverflow.com/comment/44383561
has comment: http://stackoverflow.com/comment/44383842
has comment: http://stackoverflow.com/comment/44383152
tagged with: http://stackoverflow.com/tag/json
has body: I know there are many questions out there on the same topic and I've read all of them but they don't help my case. I am trying to parse some JSON data returned from my serverside PHP script. I've used JSONLint to verify that the PHP output is a valid JSON string. I have the following ajax code: $(document).ready(function(){ $('#update-stats-submit').on("click", function(){ if (requestRunning) { // don't do anything if an AJAX request is pending return; } $.ajax({ type: "GET", url: "calculate.php", data: "q="+$("#table-info").val(), dataType: "json", success: function(data){ $("#update-result").animate({ opacity: 100 }); $("#update-result").html(data.output_msg); $("#update-result").delay(3000).animate({ opacity: 0 }); setTimeout(function() { $("#update-result").empty(); }, 4000); alert(data.avg + "\n" + data.var + "\n" + data.count + "\n" + data.est + "\n" + data.min + "\n" + data.max); }, error: function(xhr, ajaxOptions, thrownError){ $("#update-result").html(xhr.responseText + "\n" + xhr.status + "\n" + thrownError); } }) return false; }); }); I've not gotten this piece of code to execute successfully. Each time the following error is returned. 200 SyntaxError: Unexpected end of input Sample JSON output returned from calculate.php: { "output_msg":"Success!", "avg":5.79916666667, "var":4.63505345486, "n":40, "est":"1", "min":"3", "max":"4" } Any tips would be greatly appreciated.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44383456
has comment: http://stackoverflow.com/comment/44383895
has comment: http://stackoverflow.com/comment/44383114
has comment: http://stackoverflow.com/comment/44383499
upvote count: 0
has comment: http://stackoverflow.com/comment/44383169
linked to: http://stackoverflow.com/q/20827372
has comment: http://stackoverflow.com/comment/44383377
tagged with: javascript
has comment: http://stackoverflow.com/comment/44383565
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/44383482
has answer: http://stackoverflow.com/a/27996956
has comment: http://stackoverflow.com/comment/44383367
has comment: http://stackoverflow.com/comment/44383473
has comment: http://stackoverflow.com/comment/44383513
has comment: http://stackoverflow.com/comment/44383148
has comment: http://stackoverflow.com/comment/44383536
type: Question
has comment: http://stackoverflow.com/comment/44383465
has comment: http://stackoverflow.com/comment/44383254
has comment: http://stackoverflow.com/comment/44383887
score: -1
has comment: http://stackoverflow.com/comment/44383554
has comment: http://stackoverflow.com/comment/44383526
has comment: http://stackoverflow.com/comment/44383174
has comment: http://stackoverflow.com/comment/44383437
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/44383855
has comment: http://stackoverflow.com/comment/44383517

http://stackoverflow.com/q/28026800
has comment: http://stackoverflow.com/comment/44439117
tagged with: css
has comment: http://stackoverflow.com/comment/44439115
type: AnsweredQuestion
upvote count: 0
has body: My website is split into 4 divs: header, navigation, content, footer. There are 6 content sections: home, downloads, skills, practice, projects and about. Inside navigation I have a menu that has linked button for each section. Edit: I want to know how or what to use to pass data from one php file to another without using a form.
has comment: http://stackoverflow.com/comment/44439119
has comment: http://stackoverflow.com/comment/44438893
has comment: http://stackoverflow.com/comment/44438963
has comment: http://stackoverflow.com/comment/44438925
type: Question
has title: PHP/Javascript: Pass simple string defining which section to include
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/44439103
has comment: http://stackoverflow.com/comment/44438905
has comment: http://stackoverflow.com/comment/44438875
accepted answer: http://stackoverflow.com/a/28027071
downvote count: 2
has comment: http://stackoverflow.com/comment/44438950
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/44439075
favorite count: 0
has answer: http://stackoverflow.com/a/28027071
tagged with: php

http://stackoverflow.com/a/28096914
accepted answer of: http://stackoverflow.com/q/28096879
score: 4
answers question: http://stackoverflow.com/q/28096879
has body: document.getElementsByName returns a collection, you have to iterate and remove: var collection = document.getElementsByName('date[]'); for (var i = 0; i &lt; collection.length; i++) { collection[i].removeAttribute('id'); }
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/28006064
has answer: http://stackoverflow.com/a/68750988
has answer: http://stackoverflow.com/a/50051411
has answer: http://stackoverflow.com/a/28006124
has answer: http://stackoverflow.com/a/66013976
answer count: 11
has answer: http://stackoverflow.com/a/66467815
has answer: http://stackoverflow.com/a/66293802
upvote count: 3
has comment: http://stackoverflow.com/comment/44400485
has comment: http://stackoverflow.com/comment/44421715
has title: Recursively Reverse the Elements in an Array
downvote count: 1
tagged with: recursion
has comment: http://stackoverflow.com/comment/44401708
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28007054
has answer: http://stackoverflow.com/a/28006967
has answer: http://stackoverflow.com/a/28007054
has comment: http://stackoverflow.com/comment/44401770
type: AnsweredQuestion
score: 2
tagged with: arrays
has answer: http://stackoverflow.com/a/28006604
has answer: http://stackoverflow.com/a/45405423
favorite count: 0
has body: I want to write a recursive function in javascript that returns an array with its elements reversed. This code generates the following error: undefined is not a function function reverseArray (toBeReversed){ var reversed = []; function reverser (toBeReversed){ if (toBeReversed.length == 1) reversed.push(toBeReversed[0]); else { reversed.push(toBeReversed.lastOfIndex(0)); //error on this line reverser(toBeReversed.slice(-1)); } } reverser(toBeReversed); return reversed; }
accepted answer: http://stackoverflow.com/a/28006124
type: Question
has comment: http://stackoverflow.com/comment/44400608
has answer: http://stackoverflow.com/a/66466238

http://stackoverflow.com/q/28049961
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28050312
linked to: http://stackoverflow.com/q/1295584
tagged with: populate
score: -1
has body: I have an array with multiple variables defined in it. But when trying to set each of them to 0 I get an error that states the first variable of the array is undefined. Here is what I have: var keys = [key1, key2, key3, etc...]; function loadKeys(){ for(i=0;i&lt;36;i++) { keys[i] = 0; } }
tagged with: for-loop
answer count: 3
has comment: http://stackoverflow.com/comment/44483032
upvote count: 0
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/44482125
has comment: http://stackoverflow.com/comment/44482081
favorite count: 0
has answer: http://stackoverflow.com/a/28050078
has comment: http://stackoverflow.com/comment/44481995
has answer: http://stackoverflow.com/a/28050224
tagged with: undefined
has comment: http://stackoverflow.com/comment/44483805
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44482050
has title: How can I define an array with variables and then populate each with a number?

http://stackoverflow.com/a/28085142
has comment: http://stackoverflow.com/comment/44553074
has body: It's a problem with your test. Your tests are: values.forEach(add); and values.forEach(function(val) { sum += val; }); In the second test, you're timing the creation of the function as well as the execution of the forEach. In the first test, you're not timing the creation of the function; that's done during the setup phase of the test, which isn't timed. Davin Tryon created a test that creates the functions in both cases: function add(val) { sum += val; } values.forEach(add); vs. values.forEach(function(val) { sum += val; }); ...in which the difference in performance disappears on some engines, and goes the other way (declaration being slower) on some. (The latter is probably that the engine figures out during the test that it can inline the function, or at least skip some of the steps that it can't skip with a declaration.)
downvote count: 0
upvote count: 6
accepted answer of: http://stackoverflow.com/q/28085021
has comment: http://stackoverflow.com/comment/44548695
answers question: http://stackoverflow.com/q/28085021
has comment: http://stackoverflow.com/comment/44549374
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44548452
has comment: http://stackoverflow.com/comment/44548941
has comment: http://stackoverflow.com/comment/44549013
has comment: http://stackoverflow.com/comment/44549461
score: 6
has comment: http://stackoverflow.com/comment/44548000
type: Answer

http://stackoverflow.com/a/28028149
answers question: http://stackoverflow.com/q/28027248
type: Answer
has body: Other answers before give some possible solutions. But, the short answer for the specific option you are asking is : No. There is no such thing called a "Select Statement Trigger", that too for a single column, although triggers come close for this kind of expectation, but only for Insert, Update and Delete operations.
score: 0

http://stackoverflow.com/comment/44393163
comment on: http://stackoverflow.com/q/28002054
score: 1
has text: possible duplicate of [Can JavaScript be expressly used to develop Unity games?](http://stackoverflow.com/questions/27809074/can-javascript-be-expressly-used-to-develop-unity-games)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44490909
comment on: http://stackoverflow.com/q/28054176
score: 0
type: Comment
type: QuestionComment
has text: I did try that but it did not work.

http://stackoverflow.com/a/28005224
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/28000924
type: Answer
score: 1
has body: Above is the correct answer, although I would encourage you, going forward, when possible, to go open up the JavaScript console in your browser and figure it out yourself. console.log(Date.now()) in your code and test it. When I first got into coding, I would always turn to pros for simple questions (out of habit), but in my experience, being successful in coding often means knowing HOW to get the answer, as opposed to just knowing WHAT the answer is. Additionally, I would argue you're much more likely to remember the answer if you identified it yourself instead of someone just telling you. Good luck!

http://stackoverflow.com/a/52060385
downvote count: 0
answers question: http://stackoverflow.com/q/28096880
upvote count: 2
type: Answer
has body: event.clientX, event.clientY do not work in every browser. However, jQuery has a solution which does. Also, what do you do when your iframe is inside another iframe? I have a solution which works cross browser with nested iframes. GetPosition: function (event) { var $body = $("body"); var offsetLeft = event.pageX - $body.scrollLeft(); var offsetTop = event.pageY - $body.scrollTop(); if (window != parent.window) { // event was fired from inside an iframe var $frame = parent.$("iframe#" + window.frameElement.id); var framePos = $frame.position(); offsetLeft += framePos.left; offsetTop += framePos.top; } if (parent.window != parent.parent.window) { // event was fired from inside an iframe which is inside another iframe var $frame = parent.parent.$("iframe#" + parent.window.frameElement.id); var framePos = $frame.position(); offsetLeft += framePos.left; offsetTop += framePos.top; } return [offsetLeft, offsetTop]; } I wish this were a perfect solution. It works if your iframe is positioned in a fixed layout or absolutely positioned as a modal dialog. However, if your iframe is inside another absolutely positioned container, you will have to get the .position() of that container as well and add it to the total offsets.
score: 2

http://stackoverflow.com/comment/44356609
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27982786
score: 1
has text: You can upload files with ajax. Just search google.

http://stackoverflow.com/comment/44650148
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28054787
type: Comment
has text: @user3436868 thanks for the clarification, my mistake, I misunderstood the problem. I'll have a look and tell you something if I come up with a solution, cheers!

http://stackoverflow.com/comment/44339276
type: Comment
comment on: http://stackoverflow.com/a/27968536
score: 1
type: AnswerComment
has text: Sure. I explained at the top of my answer. In your code, there is no `parentFunction` of the `Parent` prototype because you are assigning to `this` in the constructor. `this` is a reference to the current object, *not* to the prototype, so the prototype is never assigned the `parentFunction` property. In my version I assigned the property to the prototype. The second issue is that your code to access the prototype of the prototype of instances of `Child` was incorrect: should be `this.prototype` instead of `this.construtor.prototype`.

http://stackoverflow.com/comment/44393691
score: 0
type: Comment
has text: ok, so what is the question?
type: QuestionComment
comment on: http://stackoverflow.com/q/28002127

http://stackoverflow.com/comment/44478792
comment on: http://stackoverflow.com/a/28046629
has text: how would i add class="pure-table-odd" to a tr?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/28116966
favorite count: 0
upvote count: 2
downvote count: 2
has title: Differences in inheritance in javascript
accepted answer: http://stackoverflow.com/a/28117308
type: AnsweredQuestion
type: Question
tagged with: javascript
has body: function Person() { this.name="Person" } Person.prototype.hi=function(){ alert("Hello! I'm"+this.name) } function Iwanttoinherit(){ ... } What is the main difference in OOP inheriting between using Iwanttoinherit.prototype=new Person() and Iwanttoinherit.prototype=Object.create(Person.protoype)
has answer: http://stackoverflow.com/a/28117308
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44608341

http://stackoverflow.com/q/28003835
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/44396497
has comment: http://stackoverflow.com/comment/44410365
has body: I am trying to run below code while implementing appending data in scrolling window : $.get(URL,function(data){ $(".daily_list").append(data); page++; isLoading=false; $(".loadingText").hide(); }); But unfortunately, application is not reaching to line below $(".daily_list").append(data); where I am trying to initialize other variable after loading data. I am also not getting any error so please suggest.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44550850
has title: Unable to execute scroll jquery
has comment: http://stackoverflow.com/comment/44396335
answer count: 0
score: 0
tagged with: scroll
has comment: http://stackoverflow.com/comment/44410664

http://stackoverflow.com/comment/44624237
has text: If you don't want to use separate elements, you'd have to get the position of the click and determine the distance to each word to choose the closest one.
score: 1
comment on: http://stackoverflow.com/q/28120779
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44479838
has text: What's causing the spew -- the FileReader's attempt to load the file, or the tag not accepting the input?
comment on: http://stackoverflow.com/q/28048861
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28035537
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28035376
score: 1
has body: To do this without regex, you can set the string to lower case, then iterate once over, calling toUpperCase() on each vowel. function letterChanges(string){ var vowels = 'aeiou'; var lowerString = string.toLowerCase(); var result = ''; for( var i=0; i&lt;lowerString.length; i++){ if( vowels.indexOf( lowerString[i] ) &gt;= 0 ){ //if lowerString[i] is a vowel result += lowerString[i].toUpperCase(); } else { result += lowerString[i] } } return result; }
downvote count: 0

forms
tags question: http://stackoverflow.com/q/27997531
tags question: http://stackoverflow.com/q/28026155
tags question: http://stackoverflow.com/q/27964085
tags question: http://stackoverflow.com/q/27998744
tags question: http://stackoverflow.com/q/28029328
tags question: http://stackoverflow.com/q/28004175
tags question: http://stackoverflow.com/q/28032136
tags question: http://stackoverflow.com/q/27968454
tags question: http://stackoverflow.com/q/28061032
tags question: http://stackoverflow.com/q/28076281
tags question: http://stackoverflow.com/q/27994080
tags question: http://stackoverflow.com/q/28040934
tags question: http://stackoverflow.com/q/28069585
tags question: http://stackoverflow.com/q/27978229
type: Tag
tags question: http://stackoverflow.com/q/28104502
tags question: http://stackoverflow.com/q/27999615
tags question: http://stackoverflow.com/q/27986107
tags question: http://stackoverflow.com/q/27971638
tags question: http://stackoverflow.com/q/28085698
tags question: http://stackoverflow.com/q/28022512
tags question: http://stackoverflow.com/q/28047368
tags question: http://stackoverflow.com/q/28038698
tags question: http://stackoverflow.com/q/27968856
tags question: http://stackoverflow.com/q/27970513
tags question: http://stackoverflow.com/q/27966791
tags question: http://stackoverflow.com/q/28048423
tags question: http://stackoverflow.com/q/28069925
tags question: http://stackoverflow.com/q/28001835
tags question: http://stackoverflow.com/q/28011809
tags question: http://stackoverflow.com/q/28091038
tags question: http://stackoverflow.com/q/28047656
tags question: http://stackoverflow.com/q/28076781
tags question: http://stackoverflow.com/q/27967465
tags question: http://stackoverflow.com/q/28073673
tags question: http://stackoverflow.com/q/27980235
tags question: http://stackoverflow.com/q/28104181
tags question: http://stackoverflow.com/q/27986755
tags question: http://stackoverflow.com/q/28009464
tags question: http://stackoverflow.com/q/28051245
tags question: http://stackoverflow.com/q/28065721
tags question: http://stackoverflow.com/q/28037573
tags question: http://stackoverflow.com/q/28003261
tags question: http://stackoverflow.com/q/28004725
tags question: http://stackoverflow.com/q/28066202
tags question: http://stackoverflow.com/q/28033759
tags question: http://stackoverflow.com/q/28107703
tags question: http://stackoverflow.com/q/28092676
tags question: http://stackoverflow.com/q/28115187
tags question: http://stackoverflow.com/q/28048174
tags question: http://stackoverflow.com/q/28096404
tags question: http://stackoverflow.com/q/28107030
tags question: http://stackoverflow.com/q/27987693
tags question: http://stackoverflow.com/q/28010697
tags question: http://stackoverflow.com/q/28000665
tags question: http://stackoverflow.com/q/27973409
tags question: http://stackoverflow.com/q/28095851
tags question: http://stackoverflow.com/q/28037482
tags question: http://stackoverflow.com/q/28099406
tags question: http://stackoverflow.com/q/28091575
tags question: http://stackoverflow.com/q/27990685
tag name: forms
tags question: http://stackoverflow.com/q/28057225
tags question: http://stackoverflow.com/q/28102383
tags question: http://stackoverflow.com/q/28080806
tags question: http://stackoverflow.com/q/28112646
tags question: http://stackoverflow.com/q/28082921
tags question: http://stackoverflow.com/q/28018743
tags question: http://stackoverflow.com/q/27979663
tags question: http://stackoverflow.com/q/28009115
tags question: http://stackoverflow.com/q/28109598
tags question: http://stackoverflow.com/q/28048276
tags question: http://stackoverflow.com/q/27977028
tags question: http://stackoverflow.com/q/28108982
tags question: http://stackoverflow.com/q/28045719
tags question: http://stackoverflow.com/q/28035701
tags question: http://stackoverflow.com/q/28044232
tags question: http://stackoverflow.com/q/28078413
tags question: http://stackoverflow.com/q/28053561
tags question: http://stackoverflow.com/q/28052480

http://stackoverflow.com/comment/44327176
type: Comment
has text: Try adding more details to you original question to explain what you are trying to achieve. This might lead to more inspired answers that will help you along in your design.
comment on: http://stackoverflow.com/a/27966857
score: 0
type: AnswerComment

http://stackoverflow.com/a/28094684
has comment: http://stackoverflow.com/comment/44582782
has comment: http://stackoverflow.com/comment/44579674
type: Answer
score: 1
has body: So I'd like to also suggest using UI Bootstrap's Modal Dialog, but read the full answer before you string me up :) First, here is a demo of your EXACT scenario. Now let me walk through the code. The only change I made to your markup was to drop the custom directive in favor of a simple ng-click handler. ng-click="subCtrl.toggleAutoRenew($event, subscription) Notice the $event I am passing in there, that is important because it allows us to be able to call .preventDefault(), which will stop the model from being updated, and give us a chance to show a confirmation dialog to the user. The toggle method passes in the entire subscription object, and then simply cancels further event processing. toggleAutoRenew: function($event, subscription) { var _this = this; $event.preventDefault(); $event.stopPropagation(); _this.confirmAutoRenew(subscription) .then(function() { subscription.auto_renew = !subscription.auto_renew; }); } We then make a call to another method responsible for showing the dialog that returns a promise. If the promise is resolved, then we toggle the auto_renew flag on the subscription object and everything works as expected. If the promise is rejected, then we do nothing, and the subscription is never updated. To the user, it's as though they never clicked the checkbox at all. You can look at the example to see how that method is making use of UI Bootstrap and the $modal service to show a dialog and handle the result, but the logic is all inside the toggle method, and it's 100% handled by the controller.
answers question: http://stackoverflow.com/q/28090186
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28090186
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/44414273
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28013547
has text: `$(function() { ... });` is shorthand for document.ready in jQuery. Also, the scenario would exist in both cases.
type: AnswerComment

http://stackoverflow.com/comment/44595372
has text: @Ji_in_coding Thanks! Just discovered that jquery wasn't loading in other pages and that's why the code didn't worked :)
type: QuestionComment
comment on: http://stackoverflow.com/q/28095676
score: 0
type: Comment

http://stackoverflow.com/a/28078709
type: Answer
answers question: http://stackoverflow.com/q/28076312
downvote count: 0
has comment: http://stackoverflow.com/comment/44577543
score: 1
has body: First off, in the Fiddle, you have two elements with an id called map-navigation. That's invalid HTML. An id is not supposed to be used on multiple elements, that's what classnames are for. Next, you're trying to bind the onclick event by quering for an element with id map-navigation. This will just bind the first element it finds with id map-navigation and will ignore the rest because getElementById will always return one element. Solution is to query all the elements with class map-navigation, since classes can be used on multiple elements using getElementsByClassname. An example: HTML: Paris London Javascript: // Handler function var handler = function (e) { var position = e.target.getAttribute('data-position'); var zoom = e.target.getAttribute('data-zoom'); if (position && zoom) { var location = position.split(','); map.setView(location, zoom, { animation: true }); } } // Fetch all elements with class map-navigation var elements = document.getElementsByClassName('map-navigation'); // Loop over nodelist and attach handler to onclick for (var i = 0; i < elements.length; i++) { elements[i].onclick = handler; } Here's a working example on Plunker: http://plnkr.co/edit/hOwyeU?p=preview
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28076312

http://stackoverflow.com/comment/46259434
has text: NodaTime 1.3.1 and .NET 4.5, tests simply loop through days, and compares results of convertion using momentjs and TimeZoneInfo. https://github.com/ScreenshotMonitor/WindowsTimeZoneToMomentJs/blob/noda/src/Pranas.WindowsTimeZoneToMomentJs.Test/TimeZoneToMomentConverterTest.cs
comment on: http://stackoverflow.com/a/28981828
score: 0
type: AnswerComment
type: Comment

angularjs
tags question: http://stackoverflow.com/q/27973542
tags question: http://stackoverflow.com/q/28053129
tags question: http://stackoverflow.com/q/28049715
tags question: http://stackoverflow.com/q/28108230
tags question: http://stackoverflow.com/q/28055956
tags question: http://stackoverflow.com/q/28117411
tags question: http://stackoverflow.com/q/28007136
tags question: http://stackoverflow.com/q/28121652
tags question: http://stackoverflow.com/q/27998304
tags question: http://stackoverflow.com/q/28040176
tags question: http://stackoverflow.com/q/28087288
tags question: http://stackoverflow.com/q/28083545
tags question: http://stackoverflow.com/q/28066343
tags question: http://stackoverflow.com/q/28055374
tags question: http://stackoverflow.com/q/28074583
tags question: http://stackoverflow.com/q/28090008
tags question: http://stackoverflow.com/q/28062784
tags question: http://stackoverflow.com/q/28031800
tags question: http://stackoverflow.com/q/28069219
tags question: http://stackoverflow.com/q/28068638
tags question: http://stackoverflow.com/q/28040732
tags question: http://stackoverflow.com/q/28036945
tags question: http://stackoverflow.com/q/28064207
tags question: http://stackoverflow.com/q/28087973
tags question: http://stackoverflow.com/q/28001490
tags question: http://stackoverflow.com/q/28088958
tags question: http://stackoverflow.com/q/28022055
tags question: http://stackoverflow.com/q/27998888
tags question: http://stackoverflow.com/q/28012603
tags question: http://stackoverflow.com/q/28005281
tags question: http://stackoverflow.com/q/28020440
tags question: http://stackoverflow.com/q/28035126
tags question: http://stackoverflow.com/q/27991309
tags question: http://stackoverflow.com/q/28097091
tags question: http://stackoverflow.com/q/28086935
tags question: http://stackoverflow.com/q/28062585
tags question: http://stackoverflow.com/q/27978220
tags question: http://stackoverflow.com/q/28030457
tags question: http://stackoverflow.com/q/27978266
tags question: http://stackoverflow.com/q/27977240
tags question: http://stackoverflow.com/q/28016976
tags question: http://stackoverflow.com/q/28096756
tags question: http://stackoverflow.com/q/28109675
tags question: http://stackoverflow.com/q/27989720
tags question: http://stackoverflow.com/q/28054982
tags question: http://stackoverflow.com/q/27997306
tags question: http://stackoverflow.com/q/27973316
tags question: http://stackoverflow.com/q/27999600
tags question: http://stackoverflow.com/q/27974437
tags question: http://stackoverflow.com/q/28097154
tags question: http://stackoverflow.com/q/28092809
tags question: http://stackoverflow.com/q/27991846
tags question: http://stackoverflow.com/q/28074750
tags question: http://stackoverflow.com/q/28030246
tags question: http://stackoverflow.com/q/28077870
tags question: http://stackoverflow.com/q/28097484
tags question: http://stackoverflow.com/q/27979950
tags question: http://stackoverflow.com/q/28073968
tags question: http://stackoverflow.com/q/28036900
tags question: http://stackoverflow.com/q/27982418
tags question: http://stackoverflow.com/q/28069506
tags question: http://stackoverflow.com/q/28085876
tags question: http://stackoverflow.com/q/27978743
tags question: http://stackoverflow.com/q/28106901
tags question: http://stackoverflow.com/q/28019257
tags question: http://stackoverflow.com/q/28089022
tags question: http://stackoverflow.com/q/28107243
tags question: http://stackoverflow.com/q/28008385
tags question: http://stackoverflow.com/q/28008528
tags question: http://stackoverflow.com/q/27981722
tags question: http://stackoverflow.com/q/28095332
tags question: http://stackoverflow.com/q/28087699
tags question: http://stackoverflow.com/q/28097770
tags question: http://stackoverflow.com/q/28016049
tags question: http://stackoverflow.com/q/28057453
tags question: http://stackoverflow.com/q/28076442
tags question: http://stackoverflow.com/q/27993598
tags question: http://stackoverflow.com/q/28080612
tags question: http://stackoverflow.com/q/28083021
tags question: http://stackoverflow.com/q/28019245

http://stackoverflow.com/a/28044569
has body: Get the hash from the URL: How can you check for a #hash in a URL using JavaScript? Once you have the hash, simple get the element with the id selector of the hash and then: $(hash).modal('show')
score: 0
answers question: http://stackoverflow.com/q/28044339
type: Answer
has comment: http://stackoverflow.com/comment/44472175

java
tags question: http://stackoverflow.com/q/28115789
tags question: http://stackoverflow.com/q/28068222
tags question: http://stackoverflow.com/q/28031185
tags question: http://stackoverflow.com/q/28080816
tags question: http://stackoverflow.com/q/27988473
tags question: http://stackoverflow.com/q/28045048
tags question: http://stackoverflow.com/q/28048276
tags question: http://stackoverflow.com/q/28045953
tags question: http://stackoverflow.com/q/28032756
tags question: http://stackoverflow.com/q/28107710
tags question: http://stackoverflow.com/q/28082392
tags question: http://stackoverflow.com/q/27996950
tags question: http://stackoverflow.com/q/28084436
tags question: http://stackoverflow.com/q/27982344
tags question: http://stackoverflow.com/q/28054849
tags question: http://stackoverflow.com/q/28017351
tags question: http://stackoverflow.com/q/27989239
tags question: http://stackoverflow.com/q/28036723
tags question: http://stackoverflow.com/q/27998908
tags question: http://stackoverflow.com/q/28074557
tags question: http://stackoverflow.com/q/28091965
tags question: http://stackoverflow.com/q/28081550
tags question: http://stackoverflow.com/q/28012930
tags question: http://stackoverflow.com/q/28011682
tags question: http://stackoverflow.com/q/28012168
tags question: http://stackoverflow.com/q/28019120
tags question: http://stackoverflow.com/q/28022327
tags question: http://stackoverflow.com/q/28085764
tags question: http://stackoverflow.com/q/28040336
tags question: http://stackoverflow.com/q/28069315
tags question: http://stackoverflow.com/q/28103861
tags question: http://stackoverflow.com/q/28084001
tags question: http://stackoverflow.com/q/28028403
tags question: http://stackoverflow.com/q/27992550
tags question: http://stackoverflow.com/q/28025606
tags question: http://stackoverflow.com/q/28057104
tag name: java
tags question: http://stackoverflow.com/q/27985487
tags question: http://stackoverflow.com/q/28117109
tags question: http://stackoverflow.com/q/28099714
tags question: http://stackoverflow.com/q/27999549
tags question: http://stackoverflow.com/q/28022250
tags question: http://stackoverflow.com/q/28023519
tags question: http://stackoverflow.com/q/28048078
tags question: http://stackoverflow.com/q/28072269
tags question: http://stackoverflow.com/q/28019069
tags question: http://stackoverflow.com/q/27974477
tags question: http://stackoverflow.com/q/28107255
tags question: http://stackoverflow.com/q/27966840
tags question: http://stackoverflow.com/q/28042360
tags question: http://stackoverflow.com/q/28088714
tags question: http://stackoverflow.com/q/28106114
tags question: http://stackoverflow.com/q/28041840
tags question: http://stackoverflow.com/q/28115575
tags question: http://stackoverflow.com/q/28086916
type: Tag
tags question: http://stackoverflow.com/q/27991754
tags question: http://stackoverflow.com/q/28100431
tags question: http://stackoverflow.com/q/28015741
tags question: http://stackoverflow.com/q/28027888
tags question: http://stackoverflow.com/q/28048571
tags question: http://stackoverflow.com/q/28099433
tags question: http://stackoverflow.com/q/27998155

http://stackoverflow.com/q/28079374
tagged with: javascript
answer count: 3
has body: I have a symlink in my images folder that points to another folder containing external images provided by a third party library (managed by bower - gotta love javascript). As part of my build process, I compress all images as follows: gulp.task('images', function() { return gulp.src('static/img/**/*') .pipe(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true })) .pipe(gulp.dest('dist/img')) }); When gulp gets to the symbolic link folder in the img folder, it returns events.js:72 throw er; // Unhandled 'error' event ^ Error: EISDIR, read Using gulp-debug shows that it baulks on the symlink folder. I am on Mac OSX and the symlink was created using ln -s. Any ideas?
downvote count: 0
tagged with: gulp
has comment: http://stackoverflow.com/comment/58141181
favorite count: 0
has title: Gulp giving error on symlinks in gulp.src()
has comment: http://stackoverflow.com/comment/44550796
has answer: http://stackoverflow.com/a/28115830
type: AnsweredQuestion
score: 7
tagged with: osx-mavericks
possible better answer: http://stackoverflow.com/a/35372812
upvote count: 7
tagged with: gulp-imagemin
has answer: http://stackoverflow.com/a/35372812
type: Question
has answer: http://stackoverflow.com/a/37408004
has comment: http://stackoverflow.com/comment/44591999
accepted answer: http://stackoverflow.com/a/28115830

http://stackoverflow.com/comment/44537412
comment on: http://stackoverflow.com/q/28079345
score: 0
type: QuestionComment
type: Comment
has text: @joshhunt, Hmm, this page says it is included. http://getbootstrap.com/2.3.2/javascript.html#typeahead . At the top it says it's in the .js files.

global
type: Tag
tag name: global
tags question: http://stackoverflow.com/q/28064295
tags question: http://stackoverflow.com/q/27996259
tags question: http://stackoverflow.com/q/28014480

http://stackoverflow.com/q/28098791
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28098849
type: AnsweredQuestion
score: 0
has title: Passing in variable 'left' to jQuery animate()
has comment: http://stackoverflow.com/comment/44573556
accepted answer: http://stackoverflow.com/a/28098849
tagged with: scroll
has body: I'm trying to pass in a variable called pixels to jquery animate. But it doesn't seem to be working. It won't allow my webpage to load when I do it like this (so I assume I'm not syntactically correct): var options = {}; var pixels = 300; options['left'] = pixels; options['easing'] = "swing"; $( "#scroll" ).animate({ options }); This however, works fine but it's a static number which I don't want: $( "#scroll" ).animate({ easing: "swing", left: "-=300" });
type: Question
tagged with: jquery-animate
tagged with: javascript
tagged with: jquery
answer count: 1

http://stackoverflow.com/comment/127537153
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27991366
has text: I think what is meant by "props should not be changed" is that they should not be changed by children components. The parent who passes down props to children can (and likely will) change them.

http://stackoverflow.com/comment/48833009
has text: I am trying to implement reCaptcha and this seems promising but not getting it right. If you can post ur main Js or better yet if you have done reCaptcha. thanks
comment on: http://stackoverflow.com/a/28076001
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/q/27994914
tagged with: trigonometry
tagged with: user-interface
downvote count: 0
has body: I am playing around with a wheel UI. And one thing I would like for it to do is count beyond &lt; 0 and > 360 A demo says a thousand words: http://jsfiddle.net/p0eabyj3/ mouseX = parseInt(e.clientX - offset.left); mouseY = parseInt(e.clientY - offset.top); var rads = Math.atan2(mouseY - center, mouseX - center); var x = 100 * Math.cos(rads) + center; var y = 100 * Math.sin(rads) + center; var _degree = (rads &gt; 0 ? rads : (fullCircle + rads)) * 360 / fullCircle; ... It is placing a dot using basic trig on a circle when moving your mouse around. The values I am getting is from 0-359. But I would like it to continuously count above 360 when moving clockwise, so it always counts upwards no mater how many times the dot goes clockwise around the circle, and count downwards when going clockwise.
score: 1
favorite count: 0
type: Question
has title: Drag dot around circle beyond < 0 and > 360
has answer: http://stackoverflow.com/a/27997527
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/44384592
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44380507
has answer: http://stackoverflow.com/a/27995029

http://stackoverflow.com/comment/44533751
comment on: http://stackoverflow.com/a/28077111
score: 1
type: AnswerComment
has text: On which line are you getting this error? I cannot see where you are calling Locatieknop(); if the file that function is in referenced correctly? - can you add a JS Fiddle?
type: Comment

http://stackoverflow.com/q/28012310
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/28012542
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/28012542
tagged with: firefox
downvote count: 0
has body: I want to develop a file drag and drop component with a div and some styling: dragenter: change div border color dragleave: revert to original div border color On Firefox 35 (Ubuntu), when the div have a scrollbar (horizontal or vertical) and when moving a file through the scrollbar then I have following events: dragenter: Moving over div border dragenter: Moving over scrollbar dragleave: Leaving scrollbar So I'm in the div but dragleave have been fired and it cancel div new style. I don't have this issue with Chromium. Is there a way to control those scrollbar events in Firefox ? HTML : test-test-test-test-test-test-test-test-test-test-test-test CSS: div#appu { height: 200px; width: 300px; border: 2px dotted black; overflow-x: auto; white-space: nowrap; } div#appu.over { border: 2px dotted red; } JavaScript : $("#appu").on("dragenter", function(event) { console.log("dragenter"); if (!$(this).hasClass("over")) { $(this).addClass("over"); } }); $("#appu").on("dragleave", function() { console.log("dragleave"); if ($(this).hasClass("over")) { $(this).removeClass("over"); } }); http://jsfiddle.net/ag5vo9sb/
tagged with: javascript
score: 1
tagged with: jquery
has title: Firefox fires drag events when moving over div scrollbar
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/44390770
type: Comment
comment on: http://stackoverflow.com/a/28000392
score: 0
type: AnswerComment
has text: @JuanMendes I agree :)

http://stackoverflow.com/a/28021497
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/28013546
has body: Just modify the THREE.OrbitControls.onMouseMove and THREE.OrbitControls.onMouseDown methods. Add event.stopPropagation() after the event.preventDefault()
answers question: http://stackoverflow.com/q/28013546

http://stackoverflow.com/comment/44651766
type: Comment
has text: Remember, blending is not commutative. For comparison, google "order independent transparency". `PointCloud` particles are not sorted. You can try with two separate point clouds, as long as they have different `position`s, and the clouds are disjoint.
score: 0
comment on: http://stackoverflow.com/q/28011525
type: QuestionComment

ajax
tags question: http://stackoverflow.com/q/28102126
tags question: http://stackoverflow.com/q/28004312
tags question: http://stackoverflow.com/q/28057579
tags question: http://stackoverflow.com/q/28008888
tags question: http://stackoverflow.com/q/27972079
tags question: http://stackoverflow.com/q/28005823
tags question: http://stackoverflow.com/q/27971189
tags question: http://stackoverflow.com/q/28072381
tags question: http://stackoverflow.com/q/28116384
tags question: http://stackoverflow.com/q/28114460
tags question: http://stackoverflow.com/q/27976238
tags question: http://stackoverflow.com/q/28090038
tags question: http://stackoverflow.com/q/28003664
tags question: http://stackoverflow.com/q/28088841
tags question: http://stackoverflow.com/q/28046849
tags question: http://stackoverflow.com/q/28115187
tags question: http://stackoverflow.com/q/28014316
tags question: http://stackoverflow.com/q/27981722
tags question: http://stackoverflow.com/q/28008302
tags question: http://stackoverflow.com/q/28044010
tags question: http://stackoverflow.com/q/28106427
tags question: http://stackoverflow.com/q/28014323
tags question: http://stackoverflow.com/q/27981339
tags question: http://stackoverflow.com/q/28028402
tags question: http://stackoverflow.com/q/27983801
tags question: http://stackoverflow.com/q/28035701
tags question: http://stackoverflow.com/q/28073419
tags question: http://stackoverflow.com/q/28058780
tags question: http://stackoverflow.com/q/28037742
tags question: http://stackoverflow.com/q/27991754
tags question: http://stackoverflow.com/q/28099930
tags question: http://stackoverflow.com/q/28001169
type: Tag
tags question: http://stackoverflow.com/q/27984228
tags question: http://stackoverflow.com/q/28114216
tags question: http://stackoverflow.com/q/28115172
tags question: http://stackoverflow.com/q/27975563
tags question: http://stackoverflow.com/q/27990010
tags question: http://stackoverflow.com/q/28074191
tags question: http://stackoverflow.com/q/28100431
tags question: http://stackoverflow.com/q/28000665
tags question: http://stackoverflow.com/q/28049256
tags question: http://stackoverflow.com/q/28044727
tags question: http://stackoverflow.com/q/28103491
tags question: http://stackoverflow.com/q/28085914
tags question: http://stackoverflow.com/q/27981882
tags question: http://stackoverflow.com/q/28081905
tags question: http://stackoverflow.com/q/28050399
tags question: http://stackoverflow.com/q/28107345
tags question: http://stackoverflow.com/q/27997531
tags question: http://stackoverflow.com/q/28082308
tags question: http://stackoverflow.com/q/27987969
tags question: http://stackoverflow.com/q/28040938
tags question: http://stackoverflow.com/q/28068841
tags question: http://stackoverflow.com/q/28002627
tags question: http://stackoverflow.com/q/28049949
tags question: http://stackoverflow.com/q/28002094
tags question: http://stackoverflow.com/q/28083652
tags question: http://stackoverflow.com/q/28029328
tags question: http://stackoverflow.com/q/28064567
tags question: http://stackoverflow.com/q/28115839
tags question: http://stackoverflow.com/q/28046318
tags question: http://stackoverflow.com/q/28069942
tags question: http://stackoverflow.com/q/28040265
tags question: http://stackoverflow.com/q/28037438
tags question: http://stackoverflow.com/q/27989450
tags question: http://stackoverflow.com/q/28095530
tags question: http://stackoverflow.com/q/28084510
tags question: http://stackoverflow.com/q/28119199
tags question: http://stackoverflow.com/q/27982674
tags question: http://stackoverflow.com/q/28015711
tags question: http://stackoverflow.com/q/27967762
tags question: http://stackoverflow.com/q/28072405
tags question: http://stackoverflow.com/q/28044436
tags question: http://stackoverflow.com/q/28084073
tags question: http://stackoverflow.com/q/28092646
tags question: http://stackoverflow.com/q/28040302
tags question: http://stackoverflow.com/q/28107749
tags question: http://stackoverflow.com/q/28014174
tags question: http://stackoverflow.com/q/28080125

http://stackoverflow.com/a/28024875
has comment: http://stackoverflow.com/comment/44435304
has comment: http://stackoverflow.com/comment/44435386
accepted answer of: http://stackoverflow.com/q/28024529
upvote count: 3
answers question: http://stackoverflow.com/q/28024529
score: 3
has body: That won't work because the circle hides the content below it. However there are possibilities you can check out: Make the circle child of the content. This way the hover-event bubbles up. This way all the content of the circle will output both "over text" and "over svg" which is not really what you wanted Write a bit math and check if you are over the text I will try one approach for the second one here: var output = $("#output"); var inCircle = false; $("#content").mouseenter(function(e) { output.text("in text"); }).mouseout(function(e) { output.text("out text"); }); var output2 = $("#output2"); $("#svg").mouseenter(function(e) { output2.text("in svg"); inCircle = true; }).mouseleave(function(e) { output2.text("out svg"); inCircle = false; }); $(document).mousemove(function(e) { if (!inCircle) return; // When not in circle we return here var $content = $('#content'); var offset = $content.offset(); // Check if in content-element if (e.pageX > offset.left && e.pageX < offset.left + $content.width() && e.pageY > offset.top && e.pageY < offset.top + $content.height()) { $content.trigger('mouseenter'); } else { $content.trigger('mouseout'); } }); #content { background-color: green; } #svg { position: absolute; left: 100px; top: 15px; } 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. The trick here is that we listen to the document-mousemove. Whenever we are in the circle and the mouse moves over the content we trigger the mouseenter on the content. Vice versa with mouseleave.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44435803
has comment: http://stackoverflow.com/comment/44435725
type: Answer

http://stackoverflow.com/comment/44544815
has text: Thank you guys you are the best! it's working on my page :)
comment on: http://stackoverflow.com/q/28082878
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/44489259
score: 0
type: Comment
has text: Where do you test it? You need to inject a content script in response to the context menu event and do it _there_.
type: QuestionComment
comment on: http://stackoverflow.com/q/28053346

http://stackoverflow.com/comment/44800061
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28182653
score: 1
has text: i found out one small issue with the code, you should also add the onNewIntent and maybe change the LaunchMode, please take a look at the edit

http://stackoverflow.com/a/28061673
has body: I am just simplifying the question and showing you the way to change the value of button on another button click $(document).ready(function() { $(".image-id-btn").on("click", function(){ var imageId = $(this).attr("data-image"); alert(imageId); $(".image-id-holder").children("button").attr("value",imageId); $(".image-id-holder").children().children("input").attr("value",imageId) alert( $(".image-id-holder").children("button").attr("value")); }); }); edit
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28059008

http://stackoverflow.com/comment/44327035
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27966911
type: Comment
has text: i update my code, you have to use this split("\\") instead of split("/");

http://stackoverflow.com/q/28076252
tagged with: c#
tagged with: knockout.js
type: Question
has answer: http://stackoverflow.com/a/28077633
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has title: How to Update ViewModel without Using Mapping
type: UnansweredQuestion
has body: I have a knockout ViewModel that has a few observables, some observable arrays that have observables. var FulfillRequistionRequestModel = function (data) { data = data || {}; var self = {}; self.RequisitionId = ko.observable(data.RequisitionId || null); self.FulfillItemList = ko.observableArray( ko.utils.arrayMap(data.FulfillItemList, function (item_list) { return new FulfillItemModel(item_list); }) ); self.NumberOfItems = ko.computed(function () { return self.FulfillItemList().length; }); //add-remove FullfillItem in FulfillItemList (this is per line number) self.removeItemFromList = function (fulfill_item) { self.FulfillItemList.remove(fulfill_item); }; self.addItemToList = function () { self.FulfillItemList.push(new FulfillItemModel()); }; return self; }; var FulfillItemModel = function (data) { data = data || {}; var self = {}; self.BoxNumber = ko.observable(data.BoxNumber || null); self.LineNumber = ko.observable(data.LineNumber || null); self.SourceBin = ko.observable(new BinModel(data.SourceBin) || null); self.ItemDetailList = ko.observableArray( ko.utils.arrayMap(data.ItemDetailList, function (item_list) { return new ItemDetailModel(item_list); }) ); self.NumberOfItems = ko.computed(function () {return self.ItemDetailList().length;}); //add-remove something from ItemDetailList (ItemDetail) self.removeItemFromList = function (item) { self.ItemDetailList.remove(item); }; self.addItemToList = function () { self.ItemDetailList.push(new ItemDetailModel()); }; return self; }; var ItemDetailModel = function(data) { data = data || {}; var self = {}; self.Part = ko.observable(data.Part || null); self.Owner = ko.observable(data.Owner || null); self.Condition = ko.observable(data.Condition || null); self.Bcn = ko.observable(data.Bcn || null); self.SerialNumber = ko.observable(data.SerialNumber || null); self.Quantity = ko.observable(data.Quantity || null); return self; }; var myModel = new FulfillRequistionRequestModel(thing); ko.applyBindings(myModel); You get the ide…

http://stackoverflow.com/comment/44343604
score: 0
type: Comment
type: QuestionComment
has text: what defines a match? Any first level property of `matrix` that contains the same key/value pair? A set of expected results might help
comment on: http://stackoverflow.com/q/27975304

http://stackoverflow.com/comment/44538998
type: AnswerComment
comment on: http://stackoverflow.com/a/28079937
score: 0
type: Comment
has text: 1. locate the input field by the radio button value which user selected. 2. use the jquery filter to find the input field.(based on the radio button value. `#show-ielts` and `#show-tofel`), then show it. 3. when submit, we should use the `input[type="radio"]:checked` to filter the radio button which one is checked. 4. also use the radio button's value to find the input field and get the value from it.

http://stackoverflow.com/q/27995187
score: 0
tagged with: loops
has comment: http://stackoverflow.com/comment/44380975
type: Question
has comment: http://stackoverflow.com/comment/44381193
has title: JavaScript Async Loop does not return result
has comment: http://stackoverflow.com/comment/44381665
tagged with: javascript
has comment: http://stackoverflow.com/comment/44381019
has comment: http://stackoverflow.com/comment/44381154
tagged with: asynchronous
has body: I was having some logic problem when trying to do a function in JavaScript. Basically I have a pointArr to store the coordinates along the route. Then I got a moveNext() which takes in each coordinates along the route and plot onto the map. Then inside the moveNext(), I got another array which is busList. If the coordinates along the route match the coordinates of busList, then I minus the totalBusStopLeft by one. Here is the code where I call the moveNext(): getAllBusLoc(function(busList) { //At first I set the totalBusLeft by the length of busList which is 13 in this case var totalBusLoc = busList.length; document.getElementById("busStopLeft").innerHTML = totalBusLoc; //Then I set the value to busList for the minus calculation busLeft = totalBusLoc; timeout = 1500; pointArr.forEach(function(coord,index){ setTimeout(function(){ moveNext(coord.x, coord.y, index, busList, busLeft); }, timeout * index); }); }); function moveNext(coordx, coordy, k, busList, busLeft){ document.getElementById("busStopLeft").innerHTML = busLeft; //pointToCompare is the coordinates in the route but not the coordinates of busList var pointToCompare = coordx + "," + coordy; //If the coordinates in route matches the coordinate in busList, I minus busLeft by one if(busList.indexOf(pointToCompare) &gt; -1){ parseFloat(busLeft--); } //Code to Add marker } However, with this code, my Html component busStopLeft keep showing 13 which is the totalBusLoc but not the busLeft. Any ideas? Thanks in advance. EDIT totalBusLoc = busList.length; document.getElementById("busStopLeft").innerHTML = totalBusLoc; timeout = 1500; pointArr.forEach(function(coord,index){ setTimeout(function(busLeft){ moveNext(coord.x, coord.y, index, busList, totalBusLoc); }, timeout * index); }); }); function moveNext(coordx, coordy, k, busList, totalBusLoc, callback){ var pointToCompare = coordx + "," + coordy; if(busList.indexOf(pointToCompare) &gt; -1){ parseFloat(totalBusLoc--); document.getElementById("busStopLeft").innerHTML…
has comment: http://stackoverflow.com/comment/44381694
tagged with: logic
has comment: http://stackoverflow.com/comment/44381642
has comment: http://stackoverflow.com/comment/44383632
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44383233
has comment: http://stackoverflow.com/comment/44381471
answer count: 0

http://stackoverflow.com/q/27988268
has title: Clear all changes done with jquery animation before starting a new animation
has comment: http://stackoverflow.com/comment/44367608
linked to: http://stackoverflow.com/q/9398870
has answer: http://stackoverflow.com/a/27988668
has comment: http://stackoverflow.com/comment/44367789
type: UnansweredQuestion
has body: I used jQuery animation to animate some div's. I there any way to clear all changes done to first div before animation second div? $(".order-b").click(function(event){ $(".order-t").animate({top:'30%'}, "slow" ); }); $(".counsel-b").click(function(){ $(".counsel-t").animate({top:'30%'}, "slow" ); }); Order Order CSS code: .order-t, counsel-t { position:absolute; top:52%; width: 100%; margin:0 auto; z-index:2; } I want to clear animation of the first div when I click on the second div. How can I do that?! I don't want to do it like the code below: $(".order-b").click(function(event){ $(".order-t").animate({top:'30%'}, "slow" ); $(".counsel-t").animate({top:'52%'}, "slow" ); });
tagged with: animation
has comment: http://stackoverflow.com/comment/44367743
tagged with: css
has comment: http://stackoverflow.com/comment/44367656
has answer: http://stackoverflow.com/a/27988480
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44368180
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/44368320
has comment: http://stackoverflow.com/comment/44368019
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/28118441
downvote count: 0
has body: Recurse through the DOM and adjust each level by -2px starting at 16px. Alternatively, you could replace the decreasing levels with an object which correlated to depth and font size. Further, this will hit every element in the document, you may wish to change the iteration to start somewhere other than at document.body. (function fonts(parent,depth){ for(var i = 0; i < parent.children.length; i++){ var child = parent.children[i]; child.style.fontSize = (16-2*depth)+"px"; if(child.firstChild != null ) fonts(child,depth+1); } })(document.body,0) Main Issue Level1 Sublevel Another sublevel Level2 Second sublevel
type: Answer
accepted answer of: http://stackoverflow.com/q/28118205
score: 4
answers question: http://stackoverflow.com/q/28118205
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/comment/44540314
type: Comment
has text: @iamnotmaynard It was pointing to the very last `}`, I just got rid of some extraneous blank lines in my question
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28080816

http://stackoverflow.com/q/28006300
tagged with: css
has body: Hi I am having an issue with a jQuery Waterwheel not showing up in Internet Explorer 11, It works fine in Chrome, Firefox but shows nothing in IE Been looking at the code for hours and haven't got any closer to solving the issue, This is the js in the head of the document The code I am referencing is the carousel The CSS Related #carousel { width:1105px; height:440px; position:relative; clear:both; overflow:hidden; } #carousel img { visibility:hidden; /* hide images until carousel can handle them */ cursor:pointer; /* otherwise it's not as obvious items can be clicked */ } Here is the HTML that I am using I am a bit lost as to why it shows in all other browsers and not IE.
score: 2
has comment: http://stackoverflow.com/comment/44401128
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/48283386
type: Question
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/44403214
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44401001
has comment: http://stackoverflow.com/comment/44406702
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: jQuery waterwheel not showing in internet explorer

http://stackoverflow.com/comment/44455981
score: 0
type: Comment
has text: also the arrays only get populated inside the call back function calls. But what if I want to use them as global variables ie use images outside the readImages function call in the main.js?
type: AnswerComment
comment on: http://stackoverflow.com/a/28035294

http://stackoverflow.com/comment/44556505
type: Comment
score: 0
type: QuestionComment
has text: Yes, I have many divs
comment on: http://stackoverflow.com/q/28089781

http://stackoverflow.com/comment/44577462
comment on: http://stackoverflow.com/q/28100958
score: 0
has text: So you probably could shorten the question to "how to handle dates in the request" as well as showing a sample of how the "body" fields are parsed from the form input as well as the Schema for your `EventModel`
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28070019
linked to: http://stackoverflow.com/q/8433319
answer count: 2
has answer: http://stackoverflow.com/a/28070160
tagged with: javascript
has comment: http://stackoverflow.com/comment/44519482
has title: Display html from external site
has answer: http://stackoverflow.com/a/28070128
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I want to create application to generate html code. What does this mean? I think example will be best here. I have created some html samles on my site. I would like to let user to display these samples on his/her site. For example user copy some link: &lt;script scr='some/path'&gt;&lt;/script&gt; If he will paste this script on his site then my compiled html code will show on his site. My question is how to do it most effective? I have never done something like this. Maybe you can give me some concept, tool which help me. I saw that in the past develepers solved these problem with iframe. But I think it isn't perfect solution.
type: UnansweredQuestion
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/44519566
type: Question

http://stackoverflow.com/comment/44573100
score: 0
has text: Why can't you just completely overwrite Foo? since .do is being defined in the constructor, the only place where you can override it is either on each instance after it is instantiated, or inside said constructor that you "can't change".
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28098602

http://stackoverflow.com/comment/44608703
type: Comment
has text: I have updated without the .live and just mouseenter
comment on: http://stackoverflow.com/q/28117141
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44730872
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28033986
score: 1
has text: @AmitKumarGupta Do you know how to do either one? I'm not familiar with AJAX, but at this point I would be really happy with either approach, whichever is easier for you or if you're are unable to help than can you suggest an approach out of the two for me to look into?

http://stackoverflow.com/q/28075111
favorite count: 0
has comment: http://stackoverflow.com/comment/44529443
has answer: http://stackoverflow.com/a/28075689
has comment: http://stackoverflow.com/comment/44529979
type: UnansweredQuestion
upvote count: 1
score: 1
type: Question
has comment: http://stackoverflow.com/comment/44530298
answer count: 1
downvote count: 0
has title: JS - how to provide a smooth movement in x-direction
tagged with: javascript
has body: I want to provide a smooth movement in x-direction. The Object A is supposed to be twice as fast as Object B. Somehow the movement of A does not look smooth. jsfiddle JS var ax = bx = 0; window.requestAnimFrame = (function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function( callback ){ window.setTimeout(callback, 1000 / 60); }; })(); (function animloop(){ requestAnimFrame(animloop); render(); })(); function render() { ax+=4; $('.A').css("left", ax); bx++; $('.B').css("left", bx); }
tagged with: jquery
has comment: http://stackoverflow.com/comment/44530858

http://stackoverflow.com/q/27978528
has body: I'm trying to edit data from a table . Fiddle the important part of codes are : Edit $scope.editUser = function(param){ if(param == 'new' ){ $scope.fName = ''; $scope.lName = ''; $scope.edit = true; }else{ $scope.edit = false; $scope.fName = $scope.users[param-1].fName; $scope.lName = $scope.users[param-1].lName; //console.log($scope.users[param-1].lName); } }; ng-click on Save button $scope.add = function(){ $scope.users.push({ fName:$scope.users.fName, lName:$scope.users.lName }); $scope.users.fName = ""; $scope.users.lName = ""; console.log($scope.users.lName); }; how can i pass data from edit function to add function for saving ? many thanks
accepted answer: http://stackoverflow.com/a/27978821
tagged with: javascript
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/27978566
tagged with: angularjs
has answer: http://stackoverflow.com/a/27978566
has answer: http://stackoverflow.com/a/27978821
type: AnsweredQuestion
has title: Passing data from one function to another
has answer: http://stackoverflow.com/a/27978728
type: Question

http://stackoverflow.com/q/28096240
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44571516
has title: Radiobuttons ng-checked not displaying div by default and works only onclick
score: 1
upvote count: 1
type: Question
tagged with: angularjs-ng-init
has body: I'm new to web development with Angular js. I'm trying to show and hide a textbox inside a div using class. I have two radio buttons "Yes" and "No". So, I'm trying to show the div containing the textbox when I click on Yes and hide when I click on No. Now, I'm trying to do this using ng-class and ng-model only and not using ng-show/ng-hide. When I keep a radiobutton clicked by default (say Yes) using ng-checked="true", why is the div not displayed and only gets displayed onclick of the button again. Doesn't the ng-checked work for ng-class. Fiddle &lt;label class="ui-radio checkbox-inline"&gt; &lt;input type="radio" name="toggle1" data-check="1" value="Yes" ng-model="request_same" /&gt; &lt;span&gt; Yes &lt;/span&gt; &lt;/label&gt; &lt;label class="ui-radio checkbox-inline"&gt; &lt;input type="radio" ng-Checked="true" name="toggle1" data-check="2" value="No" ng-model="request_same" /&gt; &lt;span&gt; No &lt;/span&gt; &lt;/label&gt;
has answer: http://stackoverflow.com/a/28097848
tagged with: javascript
tagged with: radio-button
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs-ng-checked
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/28097848

http://stackoverflow.com/a/27967259
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27965829
type: Answer
downvote count: 0
score: 1
has body: There's not much good reason to duplicate 500 lines 60 times in any browser, chrome or otherwise. This type of operation is going to be resource intensive no matter how you write it which is why you should really think about what you are trying to accomplish and see if you can work it another way. That said, this should improve performance. $("#duplicate").click(function(){ var lines = $("#input").val().split("\n"); var txt = ""; var count = parseInt($("#duplicate_num").val()); var line; console.log(lines.length, $("#duplicate_num").val()); for(var i = 0; i &lt; lines.length; i++){ line = lines[i] + "\n"; for(var j = 0; j &lt; count; j++){ txt += line; } } $('#input').val(txt); });
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27965829

http://stackoverflow.com/q/27965797
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
downvote count: 0
has title: Access current custom directive element inside link function
type: Question
score: 1
tagged with: javascript
has body: I am manipulating DOM from the link function to add custom css using the directive attributes. So here, first I will append one div with a class name, then find the div and add another div inside. (function(){ "use strict"; var directive = function() { return { restrict: 'E', link: function (scope, element, attrs) { // Configuration var id = Math.floor(Math.random()*100); attrs.id = attrs.id || 'my-directive-'+id; element.attr('id', attrs.id); element.append(' Here '); element.append(' '); element.find('.my-directive-background').css({'background-color':attrs.bColor}); // add css element.find('.my-directive-background').append(' '); // add css element.find('.my-directive-foreground').css({'background-color':attrs.fColor}); } }; } var directives = angular.module("directives"); directives.directive("myDirective",[directive]); })(); The problem is, when I use more than one same directive, the find method detects previous element also. How to find only the div belongs to current directive element? Update: (Simple Solution) @Shripal's solution works fine. But the problem was because of the element closing syntax. It's simply fixed when I changed to
has comment: http://stackoverflow.com/comment/44324582
has comment: http://stackoverflow.com/comment/44324527
upvote count: 1
has comment: http://stackoverflow.com/comment/44324408
answer count: 1
has answer: http://stackoverflow.com/a/27966151
accepted answer: http://stackoverflow.com/a/27966151
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44324668
tagged with: angularjs

http://stackoverflow.com/comment/44359198
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27983802
has text: @Sascuash try `split(/\s+|\n/)`

http://stackoverflow.com/a/27998191
accepted answer of: http://stackoverflow.com/q/27997839
answers question: http://stackoverflow.com/q/27997839
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44386200
has comment: http://stackoverflow.com/comment/44386170
type: Answer
has body: Use this JavaScript Code: &lt;script&gt; $(document).ready(function(){ $("#btnBooking").on("click", function(e){ // as you have used hyperlink(a tag), this prevent to redirect to another/same page e.preventDefault(); // get values from textboxs var uName = $('#userName').val(); var mailId = $('#addressemailId').val(); var mobNum = $('#userContactNumber').val(); $.ajax({ url:"http://192.168.1.11/customerhomes/customer.php", type:"GET", dataType:"json", data:{type:"booking",Name:uName, Email:mailId, Mob_Num:mobNum}, //type: should be same in server code, otherwise code will not run ContentType:"application/json", success: function(response){ alert(JSON.stringify(response)); }, error: function(err){ alert(JSON.stringify(err)); } }) }); }); &lt;/script&gt; PHP Code &lt;?php header('Access-Control-Allow-Origin: *');//Should work in Cross Domaim ajax Calling request mysql_connect("localhost","root","1234"); mysql_select_db("customer_details"); if(isset($_GET['type'])) { $res = []; if($_GET['type'] =="booking"){ $name = $_GET ['Name']; $mail = $_GET ['Email']; $mobile = $_GET ['Mob_Num']; $query1 = "insert into customer(cust_name, cust_mobile, cust_email) values('$name','$mail','$mobile')"; $result1 = mysql_query($query1); if($result1) { $res["flag"] = true; $res["message"] = "Data Inserted Successfully"; } else { $res["flag"] = false; $res["message"] = "Oppes Errors"; } } } else{ $res["flag"] = false; $res["message"] = "Invalid format"; } echo json_encode($res); ?&gt; If data is inserted successfully it return true flag with message, otherwise false flag with message
upvote count: 1
has comment: http://stackoverflow.com/comment/44386123

http://stackoverflow.com/q/27968321
upvote count: 2
has body: I am trying to destroy all form sessions as follows: i have a sidenav.php bar, when the user clicks on it, it goes to this page: <?php session_start(); unset($_SESSION['applicationID']); session_destroy(); echo' '; ?> which in turn bring up the new application form, however, the "$userid" fails to echo. it comes back as blank. any ideas?
type: Question
linked to: http://stackoverflow.com/q/768431
has comment: http://stackoverflow.com/comment/44329448
score: -2
has comment: http://stackoverflow.com/comment/44329524
has comment: http://stackoverflow.com/comment/44329422
tagged with: javascript
has comment: http://stackoverflow.com/comment/44329520
has comment: http://stackoverflow.com/comment/44329565
answer count: 2
downvote count: 4
has title: pass php variables javascript window location
has answer: http://stackoverflow.com/a/27968458
favorite count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/44329409
has comment: http://stackoverflow.com/comment/44329301
has answer: http://stackoverflow.com/a/27968742

http://stackoverflow.com/comment/44538249
comment on: http://stackoverflow.com/q/28079226
type: Comment
type: QuestionComment
score: 0
has text: If you've not considered it already, give **[ng-cloak](https://docs.angularjs.org/api/ng/directive/ngCloak)** a shot.

http://stackoverflow.com/a/28010150
downvote count: 1
has comment: http://stackoverflow.com/comment/44407987
has body: At line console.log($.fn.myPlugin.textSend); use testfield.textSend . now it has become proprty of selector via myplugin.
answers question: http://stackoverflow.com/q/28010058
score: 0
type: Answer
upvote count: 1

http://stackoverflow.com/a/28015119
answers question: http://stackoverflow.com/q/28015076
type: Answer
score: 0
has body: You have to think the script tag as a content-inclusion tag. What you are doing in the first code is to include a content (the script) that needs data that comes after it's introduction. More than that, you have to keep in mind that DOM (the programmatic representation of your HTML) takes some time to be formed, so you need for that to be completed. There are a couple of ways to wait as per the answers above.

http://stackoverflow.com/q/28070118
type: UnansweredQuestion
downvote count: 1
linked to: http://stackoverflow.com/q/46585
has answer: http://stackoverflow.com/a/28070182
score: -1
tagged with: mysql
has comment: http://stackoverflow.com/comment/44519674
has comment: http://stackoverflow.com/comment/44519903
has comment: http://stackoverflow.com/comment/44519811
type: Question
has title: Pull data from database on click?
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44520157
has comment: http://stackoverflow.com/comment/44519702
has comment: http://stackoverflow.com/comment/44519640
has comment: http://stackoverflow.com/comment/44519701
answer count: 1
has comment: http://stackoverflow.com/comment/44519801
has body: I was wondering whether it is possible in JavaScript (preferably jQuery) to pull data from a database using MySQL after clicking on a button? I currently pull data when the page loads, but I don't want to load 100's of items at the beginning as I want to be able to pull certain rows with different buttons?

http://stackoverflow.com/comment/44557958
type: Comment
type: QuestionComment
has text: @Malachi I just tried, but sorry it doesn't work. It's the same as before
comment on: http://stackoverflow.com/q/27969017
score: 0

http://stackoverflow.com/q/27974777
tagged with: html5-history
type: AnsweredQuestion
score: 1
has title: Using replaceState with jQuery Mobile to update URL on partial page AJAX refresh
upvote count: 1
type: Question
downvote count: 0
tagged with: jquery-mobile
tagged with: javascript
has answer: http://stackoverflow.com/a/28031266
has body: I'm using jQuery Mobile 1.4.2, and have some pages in my app where I use AJAX to refresh parts of the page inline (NOT doing a full "page navigate" in jQM). I'd like to make updates to the current URL without adding history points to track the state of these AJAX operations, so that if a user navigates to a sub-page, and then goes back, they'll be back where they left off (we don't cache pages in the DOM) -- and if they copy/paste the URL into a new browser, it will also look exactly the same. history.replaceState is perfect for this, but I can't figure out how to properly integrate it with jQuery Mobile. If I call it while performing my AJAX operation, the URL updates correctly. If I navigate to a sub-page, and then go back, however, while the browser address bar shows the correct URL (with modifications), the jQuery Mobile script appears to fetch just the original URL of the page, so the content is not as expected. I believe jQM is using its own history API/stack, which is where it is storing the original page URL. Are there any APIs in there that I can use that wrap replaceState, or is there a way to notify jQM's history that the page URL has changed without adding a history point? I see $.mobile.navigate() in the docs, but after experimenting with it, it always appears to add a new history point, which I don't want in this scenario.
tagged with: ajax
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/48454699
accepted answer: http://stackoverflow.com/a/28031266
possible better answer: http://stackoverflow.com/a/48454699

http://stackoverflow.com/q/27973316
has body: My requirement is how can I pass some data to my angular controller from my mvc controller. so that in the angular html view I can use that parameter and search the data from my web api service. as of now my angular view open as blank. and as per the user selection it fetch the data from the service. but now I need to pass some default parameter on the load of html view.so it should open up with some data. so I how can I do this. Below is my controller code. app.controller('SearchController', ['$scope','$http',function ($scope, $http) { $scope.sessionGuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r &amp; 0x3 | 0x8); return v.toString(16); }); $scope.searchValue = ""; $scope.stockNumber = ""; $scope.searchRequest = { Criteria: [], resultsTabIndex: 0, orderBy: "sortbypopularity" }; Thanks
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/28951582
type: UnansweredQuestion
type: Question
tagged with: model-view-controller
has comment: http://stackoverflow.com/comment/46157063
has title: pass data from mvc controller to angular controller
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/44366718
type: QuestionComment
comment on: http://stackoverflow.com/q/27987742
score: 0
has text: May you put your entire code on http://jsfiddle.net/ ? Too less informations to help you
type: Comment

http://stackoverflow.com/comment/44458043
type: Comment
score: 0
comment on: http://stackoverflow.com/a/28036032
type: AnswerComment
has text: Your question said "messages that were sent by Tony and received by Bob", so that's what I modeled in my answer. If you want messages **between** Tony and Bob, you can model for that, e.g. by ordering the name before putting them in the key. So a key like "messages_between_Bob_and_Tony".

http://stackoverflow.com/comment/44437295
type: QuestionComment
comment on: http://stackoverflow.com/q/28025999
score: 0
has text: If you're trying to avoid global variables, EVERYTHING has to be within that `function(global)` function, including `APP.init()`.
type: Comment

http://stackoverflow.com/q/28047686
tagged with: javascript
has comment: http://stackoverflow.com/comment/44479826
has answer: http://stackoverflow.com/a/28049063
has comment: http://stackoverflow.com/comment/44479992
has title: Document element click() method not triggering in ionic angular app
has comment: http://stackoverflow.com/comment/44478119
tagged with: dom-events
favorite count: 0
has comment: http://stackoverflow.com/comment/44480114
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/28049063
upvote count: 1
has comment: http://stackoverflow.com/comment/44477624
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44477653
score: 1
tagged with: dom
has comment: http://stackoverflow.com/comment/44477917
tagged with: ionic-framework
possible better answer: http://stackoverflow.com/a/28049597
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/28049597
has body: I have an angular ionic cordova app where I'm trying to trigger the click of an input from another span (so that I can trigger the native datetime keyboard in cordova) . However the click event doesn't seem to be triggered on the input field. Looking at the debugger, the click function of the document element is not null, but doesn't seem to do anything when triggered from the span. This works on a normal jsfiddle as commenters have noted, but when in an ionic environment, it doesn't - see this codepen http://codepen.io/MonkeyBonkey/pen/OPmOrZ &lt;span onclick="document.getElementById('whenPickerInput').click();"&gt; {{(when | amCalendar)}} &lt;/span&gt; &lt;input onclick="alert('input clicked')" id="whenPickerInput" type="datetime-local" ng-model="when" /&gt;
downvote count: 0

http://stackoverflow.com/comment/104549947
type: Comment
comment on: http://stackoverflow.com/a/28116341
type: AnswerComment
score: 0
has text: check this: https://sequelize.org/master/class/lib/model.js~Model.html#static-method-init

http://stackoverflow.com/a/28074615
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28074557
has comment: http://stackoverflow.com/comment/44528427
has body: This syntax is shorthand for a conditional action in Javascript. (condition) ? (true action) : (false action) Related: JavaScript ternary operator example with functions

http://stackoverflow.com/a/32485318
answers question: http://stackoverflow.com/q/27967819
has comment: http://stackoverflow.com/comment/57753490
has body: Documentation Just change the html to the following:
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/52832957
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/52833234

http://stackoverflow.com/comment/44559206
has text: try use quotes like `$('@Html.Partial("../Modal/Index", new { id = 1 })')`
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28091222
type: QuestionComment

http://stackoverflow.com/comment/44927657
score: 0
type: AnswerComment
has text: Okay, so that worked beautifully on the shopping cart page. But now I need to add it to the homepage too...any thoughts? http://ezndb.cwjea.servertrust.com/
comment on: http://stackoverflow.com/a/28008663
type: Comment

http://stackoverflow.com/q/27992242
tagged with: ruby-on-rails
tagged with: checkbox
score: 1
upvote count: 1
has body: Hi I'm trying to "check all or deselect all" check boxes in my rails app. it does working when I use the checkbox and JS. But, I also want the user the have the same function with links as well. So, when the click on the link it will "check all or deselect all" checkboxes. Thanks, Select All None This is the loop where next to each user I have the checkbox. <% @users.each do |user| %> <tr class="<%= cycle("even", "odd") %>"> <input id= "user_id_<%="#{user.id}"%>" name="user_ids[]" value=<%= user.id %> type="checkbox" class="checkbox1"> <%= user.full_name %> <%= user.email %> <% end %> This is the js at the bottom of the page <% content_for :javascripts do %>
type: Question
has answer: http://stackoverflow.com/a/27992278
has title: select all check boxes javascript
tagged with: javascript
tagged with: jquery
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27992371
type: UnansweredQuestion

http://stackoverflow.com/comment/44562695
score: 5
type: Comment
has text: attaching a click inside of a click....bad bad idea.
type: QuestionComment
comment on: http://stackoverflow.com/q/28093210

http://stackoverflow.com/q/28023942
has title: I desperately need somebody to help me make my CSS slider autoplay
has comment: http://stackoverflow.com/comment/44433555
has body: I have this css only slider and I need to make it autoplay. I'm not too familiar with coding javascript so this is a rather challenging problem for me. I'm aware that the Javascript will/may have to be written for this code, but I figure that someone out there can could help clarify this for me? ‹ › ‹ › ‹ › ‹ › ‹ › ‹ › Any help you can give me will be extremely helpful, thanks
downvote count: 7
has comment: http://stackoverflow.com/comment/44433350
type: Question
has comment: http://stackoverflow.com/comment/44433589
has comment: http://stackoverflow.com/comment/44433334
has answer: http://stackoverflow.com/a/28024024
tagged with: autoplay
answer count: 2
upvote count: 0
accepted answer: http://stackoverflow.com/a/28024024
possible better answer: http://stackoverflow.com/a/28024116
tagged with: javascript
score: -7
tagged with: jquery
has answer: http://stackoverflow.com/a/28024116
favorite count: 0
linked to: http://stackoverflow.com/q/27640896
tagged with: slider
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/28011666
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/44410844
has comment: http://stackoverflow.com/comment/44410697
tagged with: php
tagged with: css
has title: Adding class to active taxonomy link in sidebar
type: AnsweredQuestion
tagged with: wordpress
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28021632
has body: i want to add a css class to taxonomy active link in my sidebar, i have this code.. function list_posts_by_taxonomy( $post_type, $taxonomy, $get_terms_args = array(), $wp_query_args = array() ){ $tax_terms = get_terms( $taxonomy, $get_terms_args ); if( $tax_terms ){ foreach( $tax_terms as $tax_term ){ $query_args = array( 'post_type' => $post_type, "$taxonomy" => $tax_term->slug, 'post_status' => 'publish', 'posts_per_page' => -1, 'ignore_sticky_posts' => true ); $query_args = wp_parse_args( $wp_query_args, $query_args ); $my_query = new WP_Query( $query_args ); if( $my_query->have_posts() ) { ?> <div class="panel-heading" role="tab" id="heading<?php echo $tax_term->slug; ?>"> <a data-toggle="collapse" data-parent="#accordion" href="#collapse<?php echo $tax_term->slug; ?>" aria-expanded="true" aria-controls="collapse<?php echo $tax_term->slug; ?>"> <?php echo $tax_term->name; ?> <div id="collapse<?php echo $tax_term->slug; ?>" class="panel-collapse collapse<?php if ( is_singular('csis_project') ) { ?> in<?php } ?>" role="tabpanel" aria-labelledby="heading<?php echo $tax_term->slug; ?>"> <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> <a href="<?php the_permalink() ?>"><?php the_title(); ?> <?php endwhile; ?> <?php } wp_reset_query(); } } } and it look like this i want the the link in active page with different color such as red, how can i do that.. thx guys
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28021632
tagged with: function
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/44574449
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28081262
has text: Nema problema lega:=)
type: AnswerComment

http://stackoverflow.com/comment/44401437
type: QuestionComment
comment on: http://stackoverflow.com/q/28006511
score: 0
type: Comment
has text: What are you asking...give more detail...

http://stackoverflow.com/q/28052080
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 1
accepted answer: http://stackoverflow.com/a/28052312
has comment: http://stackoverflow.com/comment/44486408
type: Question
has comment: http://stackoverflow.com/comment/44486296
has title: Getting an attribute value from the element above the selected element html
has body: Actually I want to get the attribute value from the closest element. I am unable to get attribute value from my desired element. This is what I have done so far. I have searched a lot and hardly came up with anything useful. Any help would be greatly appreciated. Hello There Find
score: 1
has comment: http://stackoverflow.com/comment/44486593
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44486365
has answer: http://stackoverflow.com/a/28052312
has comment: http://stackoverflow.com/comment/44486246

http://stackoverflow.com/q/27966724
tagged with: jsp
tagged with: javascript
tagged with: ajax
has answer: http://stackoverflow.com/a/27967125
type: AnsweredQuestion
has title: Populate JSTree with JSON from JSP
has body: I am trying to populate a JSTree with a JSON String which i retrieve from a JSP file. This is my attempt: function initDirs() { var req = new XMLHttpRequest(); req.overrideMimeType("application/json"); req.open("GET", "svntojson.jsp?expandedNodePath=/root", true); req.onreadystatechange = function receive() { if (req.readyState == 4) { createTree(req.responseText.trim()); } }; req.send(); } initDirs(); function createTree(jsonData) { console.log(jsonData); $('#treeview').jstree({ 'core' : { 'data' : jsonData } }); } Unfortunately the jstree is empty. I logged the returned json which looks good to me: { "id" : "root", "parent" : "#", "text" : "root" }, {"id":"branches","parent":"root","text":"branches"}, {"id":"README.txt","parent":"root","text":"README.txt"}, {"id":"svn.ico","parent":"root","text":"svn.ico"}, {"id":"Desktop.ini","parent":"root","text":"Desktop.ini"}, {"id":"vgt","parent":"root","text":"vgt"}, {"id":"trunk","parent":"root","text":"trunk"}, {"id":"format","parent":"root","text":"format"} If is set the returned json manually it works: function createTree(jsonData) { console.log(jsonData); $('#treeview').jstree({ 'core' : { 'data' : [ { "id" : "root", "parent" : "#", "text" : "root" }, {"id":"branches","parent":"root","text":"branches"}, {"id":"README.txt","parent":"root","text":"README.txt"}, {"id":"svn.ico","parent":"root","text":"svn.ico"}, {"id":"Desktop.ini","parent":"root","text":"Desktop.ini"}, {"id":"vgt","parent":"root","text":"vgt"}, {"id":"trunk","parent":"root","text":"trunk"}, {"id":"format","parent":"root","text":"format"} ] } }); } Anyone who can help me to show my returned json in the treeview ? EDIT: This is my final solution: function initDirs() { var req = new XMLHttpRequest(); var path = "root/"; req.overrideMimeType("application/json"); req.open("GET", "svntojson.jsp?expandedNodePath="+path, true); req.onreadystatechange = function receive() { if (req.readyState == 4) { var jsonData = JSON.parse(req.responseText.trim()); $('#treevie…
type: Question
tagged with: jstree
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/27967125
score: 0
answer count: 1

http://stackoverflow.com/a/28102820
score: 2
has comment: http://stackoverflow.com/comment/44581431
has comment: http://stackoverflow.com/comment/44581462
has comment: http://stackoverflow.com/comment/44611504
downvote count: 0
has comment: http://stackoverflow.com/comment/44580895
has body: If it were me, I'd probably use the request module and just stream a file up. fs.createReadStream('foo.xpi').pipe(request.put('http://localhost:8888/foo.xpi')); Of course, you could also use POST if that makes more sense, and take in the file path as a parameter to a CLI tool etc. EDIT From Comments So, the requestjs code I showed is pretty straight forward, and does work. My thinking is that perhaps the corruption of your file comes b/c the file server can't handle the streamed upload (perhaps). That said, you should also be able to post it w/o using the pipe syntax like so: var req = request.post(url, function (err, resp, body) { if (err) { console.log('Error!'); } else { console.log('URL: ' + body); } }); var form = req.form(); form.append('file', fs.createReadStream(filepath));
has comment: http://stackoverflow.com/comment/44600040
has comment: http://stackoverflow.com/comment/44581305
type: Answer
has comment: http://stackoverflow.com/comment/44581155
has comment: http://stackoverflow.com/comment/44581314
upvote count: 2
has comment: http://stackoverflow.com/comment/44581870
has comment: http://stackoverflow.com/comment/44611481
answers question: http://stackoverflow.com/q/28102771
has comment: http://stackoverflow.com/comment/44581742

http://stackoverflow.com/q/28030052
tagged with: loops
type: Question
tagged with: arrays
tagged with: javascript
score: 0
tagged with: while-loop
has comment: http://stackoverflow.com/comment/44445020
has body: I am trying to edit the values in an array index. I wrote a while loop &amp; iterate over 10 times and add the iterator to the array index value. var values = [[100,0],[0,100],[3,400]]; i=0; while(i&lt;10){ values[0][0]+=i; values[0][1]+=i; i++; } values[0][1]; //this returns 45 ??? However values[0][1] returns 45??? I didn't expect to get 45 from that addition? I can't figure out how to correctly add values to array indexes.
has comment: http://stackoverflow.com/comment/44447611
has comment: http://stackoverflow.com/comment/44445093
has comment: http://stackoverflow.com/comment/44445011
has comment: http://stackoverflow.com/comment/44445555
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44447514
has comment: http://stackoverflow.com/comment/44445218
answer count: 0
has title: Simple math addition in array indicies?

http://stackoverflow.com/comment/44552556
type: Comment
comment on: http://stackoverflow.com/a/28087123
has text: @JakkyD Yes, promises and the `then()` method are very important for asynchronous tasks. I recommend reading [this book](https://github.com/getify/You-Dont-Know-JS/tree/master/async%20%26%20performance) when you have the time. I don't entirely understand your second question, but generally, you should be doing asyncrhonous tasks inside a `then()` handler _somewhere_.
score: 0
type: AnswerComment

http://stackoverflow.com/q/28047356
tagged with: database
tagged with: javascript
tagged with: jquery
score: 0
has body: I have the following code: var _this = this, $div = _this.$div, opts = _this.settings, $table = $div.find(opts.tableSelector); var listaCamposAExibir = ["Identificação Direta", "Identificação Indireta", "Total", "REINCIDÊNCIAS COM IDENTIFICAÇÃO DIRETA", "REINCIDÊNCIAS COM IDENTIFICAÇÃO INDIRETA", "Total", "TOTAL DE IDENTIFICAÇÕES N"]; var i = 0; document.write(' ') for (var j = 0; j < list.length; j++) { i = 0; for (p in list[j]) { if (p === "Nome") { document.write(' '); document.write(' ' + list[j][p] + ' '); document.write(' '); } else { if(p === "TotalGeral" && list[j].Nome === "Interior"){ document.write(' '); document.write(' ' + listaCamposAExibir[i] + 'O INTERIOR ' + list[j][p] + ' '); document.write(' '); } else { if(p === "TotalGeral" && list[j].Nome === "Metropolitana"){ document.write(' '); document.write(' ' + listaCamposAExibir[i] + 'A CAPITAL ' + list[j][p] + ' '); document.write(' '); } else { document.write(' '); document.write(' ' + listaCamposAExibir[i] + ' ' + list[j][p] + ' '); document.write(' '); i++; } } } } } document.write(' TOTAL: ' + (parseInt(list[0].TotalGeral) + parseInt(list[1].TotalGeral)) + ' '); document.write(' ') And the following html: Resultado da Pesquisa But when I click on the button, the table continues empty, only with When I used the document.write, it used to appear the table, like this: Interior Identificação Direta 2 Identificação Indireta 3 Total 5 REINCIDÊNCIAS COM IDENTIFICAÇÃO DIRETA 1 REINCIDÊNCIAS COM IDENTIFICAÇÃO INDIRETA 1 Total 2 TOTAL DE IDENTIFICAÇÕES NO INTERIOR 7 Metropolitana Identificação Direta 3 Identificação Indireta 2 Total 5 REINCIDÊNCIAS COM IDENTIFICAÇÃO DIRETA 1 REINCIDÊNCIAS COM IDENTIFICAÇÃO INDIRETA 1 Total 2 TOTAL DE IDENTIFICAÇÕES NA CAPITAL 7 TOTAL: 14 And the result of the query in database is this: Nome IdDireta IdIndireta SubTotal RIdDireta RIdIndireta RSubTotal Total Interior 2 3 5 1 1 2 7 Metropolitana 3 2 5 1 1 2 7
tagged with: sql
answer count: 1
has answer: http://stackoverflow.com/a/28052930
accepted answer: http://stackoverflow.com/a/28052930
type: AnsweredQuestion
type: Question
has title: Retrieve data from database throught javascript & jquery
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/44483440

voip
tags question: http://stackoverflow.com/q/27987985
tag name: voip
type: Tag

http://stackoverflow.com/q/28083372
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: I'm just curious about this JS I found
has comment: http://stackoverflow.com/comment/44545614
has comment: http://stackoverflow.com/comment/44544731
has answer: http://stackoverflow.com/a/28083486
type: UnansweredQuestion
downvote count: 3
score: -3
has answer: http://stackoverflow.com/a/28083660
has comment: http://stackoverflow.com/comment/44544766
tagged with: hashtag
has body: I found this Javascript somewhere and want to learn. Therefore, I'll just give questions for what I don't know. 1) I wonder why there's hashtag to the builder variable. (function($) { $(document).ready(function() { 'use strict'; var builder = $('#builder'); 2) Seems like the builder written down there has got sth to do with #builder... /** * Gets the json for the form in the embedded builder. * * @return string the form's json. */ var getFormDocument = function() { if (document.getElementById('builder').contentWindow.getFormDocument == null) { return '{}'; } return document.getElementById('builder').contentWindow.getFormDocument(); }; 3) Again, a hash tag here. Is it from the css? /** * Adjusts the builder's height to the window. */ var resizer = function() { var w = $(window).height(), h = $('header').height(), t = $('#top-row').height(), p = 12, // top padding o = (w - h - t - p) + 'px'; builder.css('height', o); }; 4) Is .js-form-document one of JQuery's function? /** * Called when the user is done building their form. */ var clickedSave = false; var save = function() { clickedSave = true; jQuery('.js-form-document').val(getFormDocument()); jQuery('#builderModal_signup').reveal(); }; 5) Why there's TODO saying iframe goes bonkers? And after the user save the form, how does this js code get connected to database? /** * Adds listeners for the embedded builder and keeps the * builder properly positioned. */ var init = function() { // TODO: iframe width at 100% goes bonkers. var width = $($('div.twelve.columns')[0]).width(); builder.css('display', 'block'); builder.css('width', width + 'px'); $('.js-save').click(save); }; var hasFields = function() { var formDocument = JSON.parse(getFormDocument()); if (formDocument.fields == null) { return false; } var sections = formDocument.fields; if (sections.length === 0 || sections[0].fields.length === 0) { return false; } else { return true; } }; 6) Don't get what the hash tag here means... /* * Triggers a call to action for …
type: Question
answer count: 2

http://stackoverflow.com/comment/44456677
type: Comment
has text: @AndySanchez You are welcome. i will hook up the link in the answer. And as i said try to avoid placing any DOM specific logic i the controller.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28035370

http://stackoverflow.com/a/28038922
score: 10
accepted answer of: http://stackoverflow.com/q/28038630
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44488068
has body: You are using jade.compile(), right? As the error message states, you are not passing the filename option. Since you are only giving a string to compile to Jade, it does not know where to look for the included files. An example where the script and the jade files are in the same folder. The index.jade file includes another file using include foo: var jade = require('jade'), fs = require('fs'), path = require('path'); var fn = jade.compile(fs.readFileSync('index.jade', 'utf-8'), { filename: path.join(__dirname, 'index.jade'), pretty: true }); console.log(fn()); Or with "absolute paths" that in Jade are absolute in reference to the given basedir you would do the following. The index.jade file now includes the same file but using absolute path, ie. include /foo: var jade = require('jade'), fs = require('fs'); var fn = jade.compile(fs.readFileSync('index.jade', 'utf-8'), { basedir: __dirname, pretty: true }); console.log(fn()); For all options see the API docs.
upvote count: 10
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/103685454
answers question: http://stackoverflow.com/q/28038630

http://stackoverflow.com/q/28012318
has comment: http://stackoverflow.com/comment/44418773
type: Question
has comment: http://stackoverflow.com/comment/44418741
has comment: http://stackoverflow.com/comment/44412046
tagged with: javascript
has comment: http://stackoverflow.com/comment/44411982
score: 0
has title: Text field can't be set with returned value of a function
has comment: http://stackoverflow.com/comment/44422085
has comment: http://stackoverflow.com/comment/44411960
tagged with: return-value
answer count: 0
has body: I have text field defined like this- &lt;input type="text" name="minutes" id="Duration_Minutes"/&gt; along with two other fields for Timein and Timeout. Following function returns the value of total time in minutes (differnce of timein and timeout). function timespent(){ var starttime = $j("#time_start").val(), stoptime = $j("#time_end").val(); . . . var totalminutes = (hours * 60) + minutes; alert(totalminutes); return totalminutes; } On the change event of timein, I want to set the value of text field based on the returned value from the above function as follows. $j('#time_start').change(function() { var newvalue= timespent(); alert(newvalue); $j('#duration_minutes').val(newvalue); //this does not work The last line of code does not work. why? Thanks for any help!
type: UnansweredQuestion

http://stackoverflow.com/comment/44437209
type: Comment
type: QuestionComment
has text: I will actually try and check if it blocks or not. May be it will help me understand event loops and process more clearly. Thank you for the help @James
score: 0
comment on: http://stackoverflow.com/q/27986436

http://stackoverflow.com/q/27965700
tagged with: jquery
tagged with: vimeo-api
has body: Let's say I have the following json result from an api: { id: 116213129, title: "“An Episode,” by Palaxy Tracks", description: "Music: Palaxy Tracks&lt;br /&gt; Animation: Luca Tóth and Stephen McNally", url: "http://vimeo.com/116213129", thumbnail_small: "http://i.vimeocdn.com/video/502490003_100x75.jpg", thumbnail_medium: "http://i.vimeocdn.com/video/502490003_200x150.jpg", thumbnail_large: "http://i.vimeocdn.com/video/502490003_640.jpg", user_id: 14252792, width: 1920, height: 1080, tags: "palaxy tracks, music, an episode, animation, music video" } Now let's say I have some jQuery code and I want to only retrieve title and url, but nothing else and do something with them like push them into the value of a textbox on my page or a hidden input. I have seen the $.each method that loops through them, but I don't wt to do that. I just want a few values and I want to get them by their key. Here is the sample jQuery code that loops through them, I got from jQuery API docs. How can I modify to just get those specific values? &lt;script&gt; $.getJSON("http://vimeo.com/api/v2/video/116213129.json?jsoncallback=?", function (result) { var title = result.title; var description = result.description; $("#popVals").click(function () { $('#Video_Title').val(title); $('#Video_Description').val(description); }); }); &lt;/script&gt;
favorite count: 0
has comment: http://stackoverflow.com/comment/44324210
upvote count: 1
has answer: http://stackoverflow.com/a/27965836
has comment: http://stackoverflow.com/comment/44377705
accepted answer: http://stackoverflow.com/a/27965836
type: AnsweredQuestion
has title: Get selected json value by key using jQuery and jsonp (vimeo api)
has comment: http://stackoverflow.com/comment/44324258
score: 1
type: Question
tagged with: jsonp
answer count: 1
has comment: http://stackoverflow.com/comment/44366501
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44325851

http://stackoverflow.com/q/28045743
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28045781
has answer: http://stackoverflow.com/a/28045844
has comment: http://stackoverflow.com/comment/44474528
downvote count: 1
type: Question
answer count: 2
upvote count: 0
tagged with: evaluation
tagged with: javascript
tagged with: monitoring
score: -1
tagged with: analytics
has comment: http://stackoverflow.com/comment/44473991
has body: Our app is a widget based, for the client-side used mostly JavaScript. For the evaluation purpose information about user behaviour should be gathered. Is it possible to gather information about user click events without accessing server side code?
tagged with: client-side
has title: How to monitor user actions without server side?
favorite count: 0

http://stackoverflow.com/q/28044758
has answer: http://stackoverflow.com/a/33188136
answer count: 2
downvote count: 0
tagged with: javascript-automation
has comment: http://stackoverflow.com/comment/129566334
favorite count: 0
has body: Using AppleScript I can call a shell script with: do shell script "echo 'Foo &amp; Bar'" But I can't find a way to do this with JavaScript in the Yosemite Script Editor.
linked to: http://stackoverflow.com/q/48201173
upvote count: 6
accepted answer: http://stackoverflow.com/a/28048221
tagged with: applescript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44511343
linked to: http://stackoverflow.com/q/27586694
linked to: http://stackoverflow.com/q/28773207
score: 6
has comment: http://stackoverflow.com/comment/44474977
type: Question
has title: Calling Shell Script with JavaScript for Automation
tagged with: javascript
possible better answer: http://stackoverflow.com/a/33188136
has answer: http://stackoverflow.com/a/28048221

http://stackoverflow.com/a/27973829
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27973735
has comment: http://stackoverflow.com/comment/44340688
answers question: http://stackoverflow.com/q/27973735
has body: looks like the id is "rightside" and class is "scroll2" var div = $("#rightside.scroll2")
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/28111021
answer count: 1
accepted answer: http://stackoverflow.com/a/28145550
tagged with: fullcalendar
has comment: http://stackoverflow.com/comment/44595994
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: AgendaWeek Time slots always shows default value i.e 00.00.00 (hour:minute:second)
has comment: http://stackoverflow.com/comment/44611178
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/28145550
upvote count: 2
has body: I have implemented full calendar with default view as agendaWeek. My motive here is to get date and time of clicked slot in calendar. So as an implementation I have done below code in calendar.js file: dayClick: function (date, allDay, jsEvent, view) { var now = new Date(); var targetDate = new Date(); targetDate.setDate(targetDate.getDate() + 10); if ((date.setHours(0, 0, 0, 0) < now.setHours(0, 0, 0, 0)) || (date.setHours(0, 0, 0, 0) > targetDate.setHours(0, 0, 0, 0))) { alert("Wrong slot of booking!!!"); } else { console.log(date); alert(date.getDate()+','+ (date.getMonth()+1) +',' + date.getYear()); } }, So in console it shows me date correct but time is 00:00:00. So it would be great if anyone help me in this issue.

http://stackoverflow.com/a/48805497
type: Answer
downvote count: 0
has body: This will be triggered only if someone clicks on "X" or Esc key $(document).ready(function () { $(".fancybox").fancybox({ closeClick: false, // prevents closing when clicking INSIDE fancybox openEffect: 'none', closeEffect: 'none', enableEscapeButton: false, helpers: { overlay: { closeClick: false // prevents closing when clicking OUTSIDE fancybox } }, beforeClose: function () { return confirm('Are you sure?') } }) });
score: 1
answers question: http://stackoverflow.com/q/28020517
upvote count: 1

http://stackoverflow.com/a/70677874
score: 3
has body: This code is based on the answer by @kishkin: /** * https://stackoverflow.com/questions/28038768 * @param {string} fileId - id of the spreadsheet to add permission to import * @param {string} donorId - donor or source spreadsheet id, you should get it somewhere */ function addImportrangePermission_(fileId, donorId) { // adding permission by fetching this url var url = 'https://docs.google.com/spreadsheets/d/' + fileId + '/externaldata/addimportrangepermissions?donorDocId=' + donorId; var token = ScriptApp.getOAuthToken(); var params = { method: 'post', headers: { Authorization: 'Bearer ' + token, }, muteHttpExceptions: true }; UrlFetchApp.fetch(url, params); } It is compatible with the ES5 engine and easily used as a function outside.
has comment: http://stackoverflow.com/comment/125378667
downvote count: 0
answers question: http://stackoverflow.com/q/28038768
has comment: http://stackoverflow.com/comment/136833432
has comment: http://stackoverflow.com/comment/125318914
type: Answer
upvote count: 3

http://stackoverflow.com/comment/64533208
has text: Also - it throws the same error if you use `template` when you should be using `templateUrl`.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/34284646
score: 3

http://stackoverflow.com/comment/44337303
has text: `currentTime` is a float, not an integer, and could skip a number.
comment on: http://stackoverflow.com/a/27972353
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44504458
has text: Ok. Thanks. I will read it.
comment on: http://stackoverflow.com/q/28061403
score: 0
type: Comment
type: QuestionComment

regex
tags question: http://stackoverflow.com/q/28048836
tags question: http://stackoverflow.com/q/28073801
tags question: http://stackoverflow.com/q/28079176
tags question: http://stackoverflow.com/q/28076624
tags question: http://stackoverflow.com/q/28088949
tags question: http://stackoverflow.com/q/28089351
tags question: http://stackoverflow.com/q/28104142
tags question: http://stackoverflow.com/q/27983766
tags question: http://stackoverflow.com/q/28073693
tags question: http://stackoverflow.com/q/27977382
tag name: regex
tags question: http://stackoverflow.com/q/28108990
tags question: http://stackoverflow.com/q/27974760
tags question: http://stackoverflow.com/q/28077049
tags question: http://stackoverflow.com/q/28110685
tags question: http://stackoverflow.com/q/28066571
tags question: http://stackoverflow.com/q/28087401
tags question: http://stackoverflow.com/q/28089796
tags question: http://stackoverflow.com/q/27989388
tags question: http://stackoverflow.com/q/28107384
tags question: http://stackoverflow.com/q/28092429
tags question: http://stackoverflow.com/q/27985084
tags question: http://stackoverflow.com/q/28020540
tags question: http://stackoverflow.com/q/27972595
tags question: http://stackoverflow.com/q/28022381
tags question: http://stackoverflow.com/q/27985309
tags question: http://stackoverflow.com/q/27974244
tags question: http://stackoverflow.com/q/28048097
tags question: http://stackoverflow.com/q/28067309
tags question: http://stackoverflow.com/q/27985955
tags question: http://stackoverflow.com/q/27988567
tags question: http://stackoverflow.com/q/28055315
tags question: http://stackoverflow.com/q/28084868
tags question: http://stackoverflow.com/q/28060925
tags question: http://stackoverflow.com/q/28108953
tags question: http://stackoverflow.com/q/28064949
tags question: http://stackoverflow.com/q/27981958
tags question: http://stackoverflow.com/q/28058787
tags question: http://stackoverflow.com/q/28096511
tags question: http://stackoverflow.com/q/28085764
tags question: http://stackoverflow.com/q/28102326
tags question: http://stackoverflow.com/q/27999513
tags question: http://stackoverflow.com/q/28070995
tags question: http://stackoverflow.com/q/27973556
tags question: http://stackoverflow.com/q/28001009
tags question: http://stackoverflow.com/q/28102491
tags question: http://stackoverflow.com/q/28117569
tags question: http://stackoverflow.com/q/27988168
tags question: http://stackoverflow.com/q/28057243
tags question: http://stackoverflow.com/q/28010677
tags question: http://stackoverflow.com/q/28061199
tags question: http://stackoverflow.com/q/28064812
tags question: http://stackoverflow.com/q/28021865
tags question: http://stackoverflow.com/q/28039741
tags question: http://stackoverflow.com/q/28072806
tags question: http://stackoverflow.com/q/28027318
tags question: http://stackoverflow.com/q/28061988
tags question: http://stackoverflow.com/q/28040444
tags question: http://stackoverflow.com/q/28038800
tags question: http://stackoverflow.com/q/28121766
tags question: http://stackoverflow.com/q/28058771
tags question: http://stackoverflow.com/q/27968623
tags question: http://stackoverflow.com/q/28058379
tags question: http://stackoverflow.com/q/28063553
tags question: http://stackoverflow.com/q/28000906
tags question: http://stackoverflow.com/q/28035950
tags question: http://stackoverflow.com/q/28046571
tags question: http://stackoverflow.com/q/28004478
tags question: http://stackoverflow.com/q/28086004
tags question: http://stackoverflow.com/q/27988845
type: Tag
tags question: http://stackoverflow.com/q/28011306
tags question: http://stackoverflow.com/q/27977601
tags question: http://stackoverflow.com/q/28111033
tags question: http://stackoverflow.com/q/28073357

http://stackoverflow.com/comment/44746984
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28148905
has text: Yeah, I would suggest you let go on move on to a different solution. Like the example 1 I made a post back, or have a look at the [run-sequence plugin](https://www.npmjs.com/package/run-sequence) and see if that might be a solution for your case. If your dead set to continue as is, good luck, *post back your success), but if not, dive into the `run-sequence` rabbit hole, and see what you can find. godspeed!
score: 0

http://stackoverflow.com/q/27995611
has answer: http://stackoverflow.com/a/27996616
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/28002899
tagged with: jquery
has title: Ping pong javaScript test: Unexpected list after every 5th index?
tagged with: http://stackoverflow.com/tag/html
has body: So I'm learning javascript and decided to do the ping pong test challenge. Basically you it prompts you a number and displays all the numbers except "ping" for multiples of 3, "pong" for multiples of 5, and "ping-pong" for multiples of 15. I got it to work, but for some reason it displays an empty list after every 5th index. I don't know why this is, and so hopefully I can get some help with this and some explanation. Here is my code: Ping Pong Test $(document).ready(function() { var number = parseInt(prompt("What number would you like me to ping-pong up to?")); for(index = 1; index <= number; index += 1) { if (index % 15 === 0) { $("#list").append(" " + "ping-pong" + " "); } else if (index % 3 === 0) { $("#list").append(" " + "ping" + " "); } else if (index % 5 === 0) { $("#list").append(" " + "pong" + " "); } else { $("#list").append(" " + index + " "); } } }); Also, do for loops in javascript require a semi-colon after closing the loop?
has answer: http://stackoverflow.com/a/27995647
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/44381640
linked to: http://stackoverflow.com/q/4539253

http://stackoverflow.com/q/28053951
has answer: http://stackoverflow.com/a/28054969
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/44490106
upvote count: 4
answer count: 2
accepted answer: http://stackoverflow.com/a/28054969
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/28054023
tagged with: promise
has comment: http://stackoverflow.com/comment/44490013
tagged with: angularjs
has answer: http://stackoverflow.com/a/28054023
tagged with: angular-promise
type: AnsweredQuestion
has title: Promise factory in Angular
type: Question
has body: New to Angular, may be using promises wrong. I have a factory returning a promise: .factory('myData', ['$http', '$q', function($http, $q) { var deferred = $q.defer(); $http.get('/path/to/endpoint') .success(function(data) { deferred.resolve(data); }) .error(function(err) { deferred.reject(err.what()) }); return deferred.promise; }]) Now if I inject my factory somewhere I can use the promise: .controller('myController', ['$scope', 'myData', function($scope, myData) { myData.then(function(result) { $scope.data = result; }); }]); This is fine, but I'm starting to use myData in several places and I don't want to be writing a new .then in every directive and controller I use the data in. After the promise is resolved I don't care about it anymore, is there any way to make myData return a promise if it's unresolved but return just the result after it's finished resolving? To word it another way, can myData simple be the .then result after resolution, or do I have to write a new .then every time?

http://stackoverflow.com/q/28072271
tagged with: jquery
has comment: http://stackoverflow.com/comment/44528144
has comment: http://stackoverflow.com/comment/44525912
has comment: http://stackoverflow.com/comment/44528172
type: UnansweredQuestion
tagged with: draggable
has body: I am using the draggable.js as it is the only thing I could find that would drag my read-only input elements. The problem with this is that when dragging on a scaled element (example here), it focuses on the div's movement and not the mouse so when moving it through a large space, the mouse becomes detached from the div. I've figured out that on event I can track the exact mouse movement inside a div using these variables: var elementNewXPosition = (event.offsetX != null) ? event.offsetX : event.originalEvent.layerX; var elementNewYPosition = (event.offsetY != null) ? event.offsetY : event.originalEvent.layerY; Now when I move the div, the mouse is positioned on the div however it is still very glitchy. You can see a jsfiddle in action here with the full draggable.js embedded to play with. If anyone can take a look at the above jsfiddle and offer me some guidance, it would be greatly appreciated. Link to non-edited version of draggable.js Link to my glitchy edited version of draggable.js And I guess i'll post the javascript here my edited version of draggable.js just incase someone want to see what I'm working with. !(function(moduleName, definition) { // Whether to expose Draggable as an AMD module or to the global object. if (typeof define === 'function' &amp;&amp; typeof define.amd === 'object') define(definition); else this[moduleName] = definition(); })('draggable', function definition() { function addEventListener(element, eventName, handler) { if (element.addEventListener) { element.addEventListener(eventName, handler, false); } else if (element.attachEvent) { element.attachEvent('on' + eventName, handler); } else { element['on' + eventName] = handler; } } function removeEventListener(element, eventName, handler) { if (element.removeEventListener) { element.removeEventListener(eventName, handler, false); } else if (element.detachEvent) { element.detachEvent('on' + eventName,handler); } else { element['on' + eventName] = null; } } function toCamelCase(s){ retu…
answer count: 0
has title: Drag element based on mouse not div
has comment: http://stackoverflow.com/comment/44529128
has comment: http://stackoverflow.com/comment/44524719
has comment: http://stackoverflow.com/comment/44527455
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44528366
score: 0
has comment: http://stackoverflow.com/comment/44525986

http://stackoverflow.com/a/28048022
has body: $scope.items = Item.getWithName({q:$route.current.params.name});
answers question: http://stackoverflow.com/q/28047966
type: Answer
accepted answer of: http://stackoverflow.com/q/28047966
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/28098239
has comment: http://stackoverflow.com/comment/44572401
has title: Eval vs IF statements (many IF statements)
type: Question
has comment: http://stackoverflow.com/comment/44572514
answer count: 1
tagged with: javascript
has body: This fiddle pretty much explains what I'm looking for. I'm trying to find the simplest way to go about coding something WITHOUT using eval. I can do it without eval but I think I will have to write 1000s of IF statements. Or is there another way? http://jsfiddle.net/243rz8eq/9/ HTML Eval way... Window-A Window-B Window-C Non-Eval way. Requires if statement for each window (there will be thousands). Or is there a simpler way I'm not seeing? Window-A Window-B Window-C JavaScript window.core = { launch: function(obj_string) { //we init a blank dhtmlxwindow and do some other things here, then... var x = eval("new " + obj_string); //fill dhtmlxwindow with proper content }, launch_no_eval: function(id) { //we init a blank dhtmlxwindow and do some other things here, then... if (id==="window_a") var x = wins.a({x:1}); //fill dhtmlxwindow with proper content else if (id==="window_b") var x = wins.b({x:1}); //fill dhtmlxwindow with proper content else if (id==="window_c") var x = wins.c({x:1}); //fill dhtmlxwindow with proper content //and so on for literally thousands of items. } }; window.wins = { a: function(args) { //this.myName = 'wins.a'; is used for the help topic. //DB contains columns: [item] / [helpurl] //Example Data: [wins.a] / [/help/gettingstarted.html] //That is why in this previous post (http://stackoverflow.com/q/28096922/3112803) //I was wanting to know if a function could know it's own name so I wouldn't //have to type this line below for 1000s of items. this.myName = 'wins.a'; console.log('Window-A is now displayed. Use "'+this.myName+'" to make link to help topic.'); }, b: function(args) { this.myName = 'wins.b'; console.log('Window-B is now displayed. Use "'+this.myName+'" to make link to help topic.'); }, c: function(args) { this.myName = 'wins.c'; console.log('Window-C is now displayed. Use "'+this.myName+'" to make link to help topic.'); } };
accepted answer: http://stackoverflow.com/a/28098453
tagged with: eval
has comment: http://stackoverflow.com/comment/44572408
favorite count: 0
has comment: http://stackoverflow.com/comment/47088579
has comment: http://stackoverflow.com/comment/44572546
downvote count: 2
has comment: http://stackoverflow.com/comment/44572544
linked to: http://stackoverflow.com/q/28096922
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44572329
has answer: http://stackoverflow.com/a/28098453
score: -1

http://stackoverflow.com/a/27965836
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/27965700
has body: From the JQuery.getJSON docs: The success callback is passed the returned data, which is typically a JavaScript object or array as defined by the JSON structure and parsed using the $.parseJSON() method. It is also passed the text status of the response. In your case its a Javascript object which will be accessible via property access &lt;script&gt; $.getJSON("http://vimeo.com/api/v2/video/116213129.json?jsoncallback=?", function (result) { var title = result.title; var url = result.url; //do something }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/44324611
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27965700
has comment: http://stackoverflow.com/comment/44324985
has comment: http://stackoverflow.com/comment/44325196
type: Answer

http://stackoverflow.com/comment/44476764
score: 0
comment on: http://stackoverflow.com/q/28047147
type: Comment
type: QuestionComment
has text: Where is a callback expected?

http://stackoverflow.com/q/27989053
has body: I need to create a raw TCP Socket connection from the client side (browser) in JavaScript. Is there any native (language supported) way of crating or working with TCP Sockets. I need the TCP Connection, not a WebSocket neither any HTTP backed solution.
type: Question
has comment: http://stackoverflow.com/comment/44369874
has comment: http://stackoverflow.com/comment/44369335
has comment: http://stackoverflow.com/comment/44369888
tagged with: javascript
has title: Is there any JavaScript native way of creating a raw TCP Socket for the client side?
has comment: http://stackoverflow.com/comment/44370248
downvote count: 0
has comment: http://stackoverflow.com/comment/44369270
favorite count: 0
has comment: http://stackoverflow.com/comment/44369269
tagged with: sockets
has comment: http://stackoverflow.com/comment/44369154
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: tcp

http://stackoverflow.com/q/28071716
has body: I have designed a online magazine with turn.js that works fine , the size is A4 (842px x 595px) for screen, but when someone looks at it in smaller screens (13 ") it doesnt show all in same viewport and they have to scroll down. when i zoom out with javascript the browser even the pictures zoom out propertionally the text does not. any recommendations please how to scale a div with text propertionally smaller. the url to development page is here. http://www.lambuka.com/magazine/final-magazine.php?m_id=78
has answer: http://stackoverflow.com/a/28071924
tagged with: scale
answer count: 1
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has title: rescaling for smaller screens
type: Question
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/28005920
has answer: http://stackoverflow.com/a/28005947
tagged with: angularjs-ng-repeat
favorite count: 0
has answer: http://stackoverflow.com/a/35944290
tagged with: angularjs
type: UnansweredQuestion
has title: AngularJS: ng-model setter inside ng-repeat
linked to: http://stackoverflow.com/q/28298256
has body: I've found some great answers on how to get the value of an ng-model inside an ng-repeat, but so far, I haven't found any that cover the setter. Suppose I have something like this: &lt;div ng-repeat="item in getItems()"&gt; &lt;input ng-model="itemTitle" ng-model-options={getterSetter:true}"&gt; &lt;/div&gt; If I had a single input box, I'd use something like this: ... var _val = ''; $scope.itemTitle = function(val){ return angular.isDefined(val) ? (_val = val) : _val; } ... However, that would change the value for every single input box. Is it possible to define the variables and a setter, potentially using arrays? Or is there a better method to get and set input boxes inside an ng-repeat?
type: Question
tagged with: angularjs-ng-model
tagged with: angularjs-directive
score: 5
upvote count: 5
tagged with: javascript
answer count: 2
downvote count: 0

http://stackoverflow.com/a/28074445
type: AcceptedAnswer
type: Answer
downvote count: 1
accepted answer of: http://stackoverflow.com/q/28053389
score: -1
has body: Using WAMP, CodeIgniter, JavaScript, if you need to include JavaScript file in a view file with src attribute, you have to put js file outside the application folder. If the src address points to a subfolder of codeigniter application folder, CodeIgniter doesn't know to interpret this address. Why, I don't know.
answers question: http://stackoverflow.com/q/28053389
upvote count: 0

http://stackoverflow.com/a/27981876
downvote count: 0
score: 6
upvote count: 6
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/71679349
accepted answer of: http://stackoverflow.com/q/27981760
type: Answer
answers question: http://stackoverflow.com/q/27981760
has body: You can be defensive and check if a key exists before using it: if("comboFilters[Agencies]" in partDic) { var ag = partDic["comboFilters[Agencies]"].substring(1); $('.Agency .dropdown-toggle').html(ag).append(' &lt;span class="caret"&gt;&lt;/span&gt;'); } or just safeguard it with an empty string: var ag = (partDic["comboFilters[Agencies]"] || "").substring(1);

http://stackoverflow.com/a/28045103
score: 1
answers question: http://stackoverflow.com/q/28044357
upvote count: 1
has body: jQuery is not suitable here, because by the time you run your jQuery code inside jQuery.ready(), the elements in "category-image" class are not created yet. For solution of your problem you can use two methods: 1) Use the "ng-click", as proposed before. You can also pass "$index" to function inside ng-click. This way you will know index of icon in imageList.travel that was clicked. But this way you will have no information about dom element. 2) Create a directive. The main difference between directives and controllers is that directive have information about dom object. You can treat element as typical jQuery object JS: app.directive('imageClick', [function () { return { link: function (scope, element, attr) { element.on("click", function(e){ //do some stuff here }) } } }]); HTML nounwords nountravel
type: Answer
downvote count: 0

http://stackoverflow.com/comment/44813727
comment on: http://stackoverflow.com/a/28224608
type: AnswerComment
type: Comment
score: 1
has text: @Sheraff That thought actually just crossed my mind. I've switch the code to use the timestamp argument. It's probably slightly more accurate and slightly more-efficient this way, but not significantly.

http://stackoverflow.com/q/28025140
accepted answer: http://stackoverflow.com/a/28025270
answer count: 1
has title: JSLint suppress warning on IntellijJ
tagged with: jslint
linked to: http://stackoverflow.com/q/9621162
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28025270
type: AnsweredQuestion
type: Question
tagged with: jshint
has body: I´m using intellij 14 and I just active the JSLint and JSHint, and it´s pretty useful, burt I dont like the code style of declare variables like var a,b,c instead var a; var b; and var c; So now all my code is full of warnings saying 'combine this with the previous var statement'. Can anybody tell me where can I suppress this warning?. I cannot find it. Regards.
tagged with: intellij-idea

http://stackoverflow.com/comment/44362747
comment on: http://stackoverflow.com/q/27984939
score: 1
has text: Which version of jQuery are you using? The 2.x branch does not support IE8.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44772779
has text: Nothing changed; same situation. No, there are no special reason for not be static. Can we try something else? What are you thinking about?
comment on: http://stackoverflow.com/a/28199985
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44498748
comment on: http://stackoverflow.com/q/28058476
type: QuestionComment
type: Comment
score: 0
has text: Sounds like a job for a directive if you ask me

http://stackoverflow.com/comment/44355685
type: AnswerComment
has text: I already try this method. Duplicate content appears in the submenu and not where it is removed, and just by enlarging the window.
type: Comment
comment on: http://stackoverflow.com/a/27982120
score: 0

http://stackoverflow.com/comment/44552104
score: 0
has text: Not sure if I understand, @KirillPisarev. Sometimes I write functions that don't return anything, they just process some data or something. Does that help?
type: AnswerComment
comment on: http://stackoverflow.com/a/28087230
type: Comment

http://stackoverflow.com/comment/44602348
type: QuestionComment
score: 2
has text: `display: inline-block`?
type: Comment
comment on: http://stackoverflow.com/q/28114164

http://stackoverflow.com/comment/44790560
type: QuestionComment
comment on: http://stackoverflow.com/q/28111943
score: 0
type: Comment
has text: Hi @Dennis ...let me know ..U got any solution...?.please

http://stackoverflow.com/q/28054195
accepted answer: http://stackoverflow.com/a/28055055
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/44490916
has comment: http://stackoverflow.com/comment/44490287
has body: In scenario 1 the user is not logged into our app and is not logged into google in their browser. This shows them a pop up and tells them to log in to google and then tells them to authorize our app. However, in my scenario, the user is already logged in and already has authorized my app. I log them in automatically but the problem is that the popup keeps appearing each time. Is there a way to call the signin of google api without having the popup show? Thanks in advance.
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/28055055
has comment: http://stackoverflow.com/comment/44490515
answer count: 1
favorite count: 0
tagged with: oauth-2.0
has comment: http://stackoverflow.com/comment/44491135
has title: Google Auth don't show popup if logged in

http://stackoverflow.com/comment/45735645
score: 0
type: Comment
type: QuestionComment
has text: Did you try by removing the restriction.. `socketio.set('origins', 'http://localhost:9007')`
comment on: http://stackoverflow.com/q/27998407

http://stackoverflow.com/comment/44532289
has text: @David im not familiar with that concept, I will do more research on it, thank you.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28076297
type: Comment

http://stackoverflow.com/comment/44504376
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28059265
type: Comment
has text: Although your approach is correct (probably the only one) I failed to mention in my question that I wasn't looking for a geometry solution, having in mind devices that are battery depended and don't like 'heavy' computations. If no other way exists I'll select your answer as correct.

http://stackoverflow.com/q/27972031
has comment: http://stackoverflow.com/comment/44336634
has comment: http://stackoverflow.com/comment/44336760
has comment: http://stackoverflow.com/comment/44336668
type: Question
has answer: http://stackoverflow.com/a/27972166
tagged with: javascript
tagged with: jquery
score: 0
has body: Dynamically adding and removing items to select jquery Here is the example to add and removing items dynamically using jquery to select html Select Volvo Saab new old JQUERY $('#add').on('click',function(){ $("#List").append(' '+$('#readme').val()+' '); $('.result').html('1 item added to select list').hide(2000); }); $('#delete').on('click',function(){ $("#List option:selected").remove(); $('.result').html('1 item deleted to select list').hide(2000); }); Demo: http://jsfiddle.net/bxsnevzs/3/
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: html-select
type: UnansweredQuestion
has title: Dynamically adding and removing items to select jquery
has comment: http://stackoverflow.com/comment/44336839

http://stackoverflow.com/comment/44582961
comment on: http://stackoverflow.com/q/28103894
type: Comment
type: QuestionComment
has text: writing `output1.css` would make the original CSS file invalid, no?
score: 0

http://stackoverflow.com/a/28062750
type: Answer
has body: Found the answer, just have to do this.
answers question: http://stackoverflow.com/q/28062423
score: 0

http://stackoverflow.com/q/28072841
has body: Can I include javascript in the property binding Query Text field of a BIRT report Data Set? The reason why I want to do this is to select a query depending on a report parameter passed by the user.
type: Question
type: AnsweredQuestion
tagged with: mysql
has answer: http://stackoverflow.com/a/28074824
answer count: 1
tagged with: javascript
tagged with: property-binding
linked to: http://stackoverflow.com/q/18607429
score: 0
has title: Javascript in either property binding or Query in Birt
has comment: http://stackoverflow.com/comment/44555060
accepted answer: http://stackoverflow.com/a/28074824
tagged with: birt

http://stackoverflow.com/q/28041371
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/28041487
accepted answer: http://stackoverflow.com/a/28041621
has answer: http://stackoverflow.com/a/28041621
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28041428
has body: Hi i am want to make href link background alternate color how can i achieve this Category <?php $data=mysql_query("select categoryname from category"); while($row=mysql_fetch_array($data)) { ?> <?php echo $row['categoryname']; ?> <?php } ?>
has comment: http://stackoverflow.com/comment/44466195
has title: How to set alternate color for href background
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28041487
score: 0
answer count: 3

http://stackoverflow.com/comment/44611093
type: Comment
has text: I apologize for my misunderstanding. I first thought your answer didn't calculate the percentages, and just showed the original mousehover data again, but with a %-mark after them). Later, I noticed I was mistaken. --- You had already achieved this aspect of the question, great! --- The only remaining part is getting the labels (**apples** and **pears**) on the pie.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28118178

http://stackoverflow.com/comment/44392502
type: QuestionComment
comment on: http://stackoverflow.com/q/28001539
has text: Use `document.create` it allows you to create elements in javascript. You can append these elements to the DOM using `element.appendChild`
score: 0
type: Comment

http://stackoverflow.com/comment/44464975
score: 0
type: AnswerComment
type: Comment
has text: Thank you Rahul, but I am looking for replacing {color:red}text{color} this content with text in red. and the selected text in the textarea has to be changed.
comment on: http://stackoverflow.com/a/28040552

http://stackoverflow.com/comment/44364505
score: 1
comment on: http://stackoverflow.com/q/27986750
has text: Hrm, what exactly are you trying to do in this particular instance? What exactly isn't working?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28038211
has comment: http://stackoverflow.com/comment/44489940
has comment: http://stackoverflow.com/comment/44491547
tagged with: fullcalendar
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/28073699
accepted answer: http://stackoverflow.com/a/28073699
has title: Full calendar does not display events, but google receives request
score: 0
has body: I wrote my code below, I can see the calendar being displayed but not the events itself. It gets the events from Google Calendar. Now I feel like I am missing something, but when I go to the Google Developer Console next to my project name I see that request are going in but the same amount of errors also displays. I got two questions How can I see those errors? Did I miss anything in my code?
tagged with: google-calendar-api
type: AnsweredQuestion

http://stackoverflow.com/q/27996921
has comment: http://stackoverflow.com/comment/44383886
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27996936
favorite count: 0
upvote count: 0
has body: I've used CDNs for all my scripts but I get the error "Uncaught SyntaxError: Unexpected token <" I've been stuck on this for hours, and I don't know why there's an error. AngularJS Routing AngularJS Routing Application
type: AnsweredQuestion
has title: Uncaught SyntaxError: Unexpected token < CDN
type: Question
downvote count: 2
has comment: http://stackoverflow.com/comment/44383905
score: -2
answer count: 1
has answer: http://stackoverflow.com/a/27996936

http://stackoverflow.com/comment/44470430
score: 2
comment on: http://stackoverflow.com/q/28043783
type: QuestionComment
has text: Can you post an example or be more clear?
type: Comment

http://stackoverflow.com/comment/44595651
type: QuestionComment
comment on: http://stackoverflow.com/q/28110966
score: 0
has text: is not `click()` function working?
type: Comment

http://stackoverflow.com/a/27988108
has comment: http://stackoverflow.com/comment/44369757
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27987555
downvote count: 0
has body: In your data you have a data point every 10 years but if I'm reading this correctly your x-value is x: years[j]: &gt; d3.range(startYear, endYear) [1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012] So, you are plotting x at 1950, 1951, 1952, 1953, instead of 1950, 1960, 1970, etc... Easy fix is to use d3.range(startYear, endYear, 10), proper fix is to get your x-values from the header of your CSV file.
accepted answer of: http://stackoverflow.com/q/27987555

http://stackoverflow.com/q/28061016
downvote count: 0
has body: What is the best way to generate a 32 bit random unsigned number in Node? Here is what I tried: var max32 = Math.pow(2, 32) - 1 var session = Math.floor(Math.random() * max32); I need this for a unique id.
has answer: http://stackoverflow.com/a/28061457
type: Question
has title: Generate Random 32 Bit Number in Node
answer count: 1
upvote count: 6
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44503340
has comment: http://stackoverflow.com/comment/127792665
has comment: http://stackoverflow.com/comment/44503235
score: 6
accepted answer: http://stackoverflow.com/a/28061457
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/78196483
type: AnswerComment
has text: https://stackoverflow.com/questions/45594682/owl-carousel-populated-my-multiple-ng-repeats
comment on: http://stackoverflow.com/a/44176693
score: 0
type: Comment

http://stackoverflow.com/a/28118302
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/28116561
upvote count: 2
has body: The unhandled exceptions are passed to the default response in the api/responses/serverError.js as a first argument data. Here's an example of how such exceptions can be handled: var Exception = require('../exceptions/Exception.js'); module.exports = function serverError (data, options) { var request = this.req; var response = this.res; var sails = request._sails; // Logging error to the console. if (data !== undefined) { sails.log.error('Sending 500 ("Server Error") response: \n', String(data)); } else { sails.log.error('Sending empty 500 ("Server Error") response'); } response.status(500); if (data instanceof Exception) { return response.json({ success: false, exception: { type: data.constructor.name, message: data.message } }); } else { return response.json(data); } }; When exception is thrown in the controller: // api/controllers/TempController.js var NotFoundException = require('../exceptions/NotFoundException.js'); module.exports = { index: function(request, response) { throw new NotFoundException('Specific user is not found.'); } }; This will output the following JSON: { "success": false, "exception": { "type": "NotFoundException", "message": "Specific user is not found." } }
answers question: http://stackoverflow.com/q/28116561
type: AcceptedAnswer

http://stackoverflow.com/a/28042429
answers question: http://stackoverflow.com/q/28042244
upvote count: 1
score: 1
downvote count: 0
has body: Controllers are initialised once per view. When you pass the controller option you are specifying how it is constructed. Changing view leaves the controller in existence.
type: Answer

http://stackoverflow.com/q/28064819
has title: Multiple jQuery versions [advice]
has answer: http://stackoverflow.com/a/28065088
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44509955
type: Question
accepted answer: http://stackoverflow.com/a/28065088
tagged with: javascript
has body: I would like to hear your advice on the matter i'm about to describe. I'm part of the development team of a large web app, that makes medium to heavy use of jQuery, being continuously developed for the last 7-8 years. As a consequence of the long lifetime, during that period, many versions of jQuery have been released and used in the app. Since there is the chance of incompatibilities between versions, what's your advice on developing features that require jQuery? Include a specific version of jQuery in each page where it is used? Include a generic jQuery.js file, that gets continuously updated to the latest version? Something else? Both alternatives have pros and cons but i would much like to hear your experience on similar situations. Thanks in advance.
tagged with: jquery
has comment: http://stackoverflow.com/comment/44509947
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/28064903
has answer: http://stackoverflow.com/a/28064903
has comment: http://stackoverflow.com/comment/44510064

http://stackoverflow.com/a/27982308
downvote count: 1
has comment: http://stackoverflow.com/comment/44375713
has comment: http://stackoverflow.com/comment/44355871
score: 1
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/44356174
has body: Avoid tricks and go with divs instead of UL or LI for further compatibility. Also, you don't need to listen to the start event to setup the z-index property. The .draggable() api exposes the zIndex prop for that reason. Here is the demo working: http://jsfiddle.net/zbo7g5nz/8/
answers question: http://stackoverflow.com/q/27981873

bulkinsert
type: Tag
tag name: bulkinsert
tags question: http://stackoverflow.com/q/28056083

http://stackoverflow.com/comment/106522860
has text: Great solution. Just little improvement : the height of menu can change (dynamic content or responsive website) so I set height of the wrap div in JS just before the class `fixedNav` is added and i removed it when the class is removed.
comment on: http://stackoverflow.com/a/28146369
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/27985434
score: 0
has body: This answer was posted by Aamir Suleman on another thread: onChange: function (value) { var min = value[0]; var max = value[1]; var expression = "POP_Total_Class &gt;= " + min + " AND POP_Total_Class &lt;= " + max; POP_Total.setDefinitionExpression(expression); }
type: Answer
answers question: http://stackoverflow.com/q/27968072

http://stackoverflow.com/comment/44356670
has text: @DouglasLudlow because imho answers should be more than just a codesnipplet. It should probably link to a site explaining modulus and show why this works. And I dont have the time for that right now. :p
comment on: http://stackoverflow.com/q/27982382
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44560942
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28091694
has text: You would need to convert the chart client side to image using canvas, or use alternate server side image charting script for pdf

http://stackoverflow.com/comment/44560207
score: 1
type: Comment
type: QuestionComment
has text: @RocketHazmat Ya on FF IIRC, the fix could be to just set disabled in a timeout with delay 0 because of stack event
comment on: http://stackoverflow.com/q/28091575

http://stackoverflow.com/comment/44342184
has text: Have you tried using jQuery instead of pure javascript?
comment on: http://stackoverflow.com/q/27974761
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44452825
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28033712
has text: I am just seeking the best way to load in a world map (my own image) and change the hover state of each continent so when you hover Europe for example the continent highlights and adds a stroke around the continent and shows a tooltip. Sounds more complicated than it is but it does not need to be responsive.
score: 0

local-variables
tags question: http://stackoverflow.com/q/28016616
tag name: local-variables
type: Tag

http://stackoverflow.com/comment/44416228
type: QuestionComment
has text: it fires the first time i load the page.
comment on: http://stackoverflow.com/q/28014437
score: 0
type: Comment

http://stackoverflow.com/q/28026627
tagged with: listview
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: infinite-scroll
tagged with: ember.js
has body: If I just run ember new testlistview and then in templates/index.hbs: {{#collection Ember.ListView contentBinding="controller" height=500 rowHeight=50 width=500}} {{name}} {{/collection}} and in routes/index.js: import Ember from 'ember'; export default Ember.Route.extend({ model: function() { var items = []; for (var i = 0; i &lt; 10000; i++) { items.push({name: "Item " + i}); } return items; } }); I get an error: Uncaught Error: Assertion Failed: Ember.ListView must be a subclass or an instance of Ember.View, not DEBUG: ------------------------------- DEBUG: Ember : 1.8.1 DEBUG: Ember Data : 1.0.0-beta.12 DEBUG: Handlebars : 1.3.0 DEBUG: jQuery : 1.11.2 DEBUG: ------------------------------- Does anyone know how to make it work or can offer any alternatives? Also, what about Ember 1.9.1 and Handlebars 2.0.0 ? https://github.com/emberjs/list-view/issues/188
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28110281
has title: Ember.ListView doesn't work with latest ember-cli (0.1.7)

http://stackoverflow.com/q/28121629
has body: I have a boostrap navbar with white links on black. When I reload the page the links are black until I select them with my cursor which causes the white to appear as I slide. The problem is solved if I add a blank href="" attribute. However I would like to figure out why this is happening and if there is another solution. Home This solves issue: Home Attached is a shot of what I mean - I am slidig the mouse from left to right over the link.
type: Question
has title: ui-sref css incorrect on Safari
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
type: UnansweredQuestion
tagged with: css
tagged with: angular-ui-router
answer count: 0
upvote count: 1

http://stackoverflow.com/comment/44348246
score: 0
type: Comment
type: QuestionComment
has text: Use clearInterval to stop interval timer funciton...
comment on: http://stackoverflow.com/q/27978093

http://stackoverflow.com/q/28013834
type: AnsweredQuestion
tagged with: list
has comment: http://stackoverflow.com/comment/44415014
type: Question
has body: I've an array and I want to sort it by "id" and "date" from smaller to bigger. How can I do this correctly ? Example : var unsorted = [ {id: 1, date: "2015-01-18T15:00:00+01:00"}, {id: 1, date: "2015-01-18T14:30:00+01:00"}, {id: 2, date: "2015-01-18T10:00:00+01:00"}, {id: 1, date: "2015-01-18T16:00:00+01:00"}, {id: 3, date: "2015-01-18T14:15:00+01:00"}, {id: 2, date: "2015-01-18T14:00:00+01:00"} ] Should return : var sorted = [ {id: 1, date: "2015-01-18T14:30:00+01:00"}, {id: 1, date: "2015-01-18T15:00:00+01:00"}, {id: 1, date: "2015-01-18T16:00:00+01:00"}, {id: 2, date: "2015-01-18T10:00:00+01:00"}, {id: 2, date: "2015-01-18T14:00:00+01:00"}, {id: 3, date: "2015-01-18T14:15:00+01:00"} ]
score: 3
tagged with: arrays
has answer: http://stackoverflow.com/a/28013910
tagged with: javascript
has answer: http://stackoverflow.com/a/28013864
tagged with: sorting
has comment: http://stackoverflow.com/comment/44414985
upvote count: 3
accepted answer: http://stackoverflow.com/a/28013911
has comment: http://stackoverflow.com/comment/44415493
downvote count: 0
has answer: http://stackoverflow.com/a/28013979
favorite count: 0
linked to: http://stackoverflow.com/q/492994
answer count: 5
has answer: http://stackoverflow.com/a/28013911
has answer: http://stackoverflow.com/a/28013894
has comment: http://stackoverflow.com/comment/44414964
possible better answer: http://stackoverflow.com/a/28013864
has title: JavaScript sort array by 2 values
has comment: http://stackoverflow.com/comment/44414872

http://stackoverflow.com/a/28048595
has body: In your function featured_remove() is undefined because it's out of the context. Pass a parameter to use the outer function: //define your function var featured_remove = function (model_num){ console.log('Remove Featured Image: #featured-' + model_num); $('#featured-' + model_num).remove(); } //using closure $('.model-gallery-image').click(function(featured_remove){//pass variable here featured_remove($(this).attr('data-model-id')); });
answers question: http://stackoverflow.com/q/28048275
score: 0
type: Answer

http://stackoverflow.com/comment/44482831
has text: so you mean forcing a regular html.beginform to submit an ajx request, using javascript is valid approach regardless if i am uing .net or at ever ?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28044814

http://stackoverflow.com/q/28034701
has answer: http://stackoverflow.com/a/28034814
has body: I'm making an interactive map with Leaflet. I've markers on the map (based on their longitude and latitude coordinates) and I want some markers to have a different color than others. For example, some coordinates I give it a score of "10" and I want it to be pink while the other markers have a score of "5" and I want to give the markers they have red. I have a marker.js file: var myIcon = L.icon({ iconUrl: 'icon_ping.png', iconSize: [20, 15], iconAnchor: [5, 23], popupAnchor: [0, -11] }); for ( var i=0; i &lt; markers.length; ++i ) { L.marker( [markers[i].lat, markers[i].lng], {icon: myIcon} ) .bindPopup( '&lt;a target="_blank"&gt;' + markers[i].name + '&lt;br&gt;' + markers[i].address + '&lt;br&gt;' +'Score: ' + markers[i].score + '&lt;/a&gt;' ) .addTo( map ); } I also have a coordinates.json file that contains the coordinates and my scores markers = [ { "name": "Place", "address": "123, TX", "score": "10", "lat": 12.123, "lng": 23.234 } ... ]; Basically I just want the markers of the same scores to have the same color marker. I was thinking that I need to create another var myIcon_2 and put a if statement inside the for loop? Will that work or is there another better way to approach this? Thanks.
has title: Leaflet: Different color markers for different coordinates
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44454420
accepted answer: http://stackoverflow.com/a/28034814
type: Question
tagged with: leaflet
score: 0
tagged with: http://stackoverflow.com/tag/json
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/44569066
score: 0
has text: Only input fields of type password, otherwise you need some dynamic magic, probably best to avoid a prompt
comment on: http://stackoverflow.com/q/28096547
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44324757
type: AnswerComment
has text: I don't agree with this answer. It appears that the user wants just `Test` and not the entire: `function Test(){ Log(); }`.
type: Comment
comment on: http://stackoverflow.com/a/27965681
score: 1

http://stackoverflow.com/q/28080393
favorite count: 0
accepted answer: http://stackoverflow.com/a/28080471
has comment: http://stackoverflow.com/comment/44539606
has comment: http://stackoverflow.com/comment/44539457
linked to: http://stackoverflow.com/q/5224071
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44539497
has body: I have a dropdown list that is generating dynamically using PHP. Its rendered HTML is something similar to below markup - kamala@gmail.com tk@g.com myexample.com samadhi@gmail.com facebook.com lankainstitute.com Using this markup, just I want to check whether item is selected or not using JavaScript. If it is not selected an item, then I need to get an alert message. I tried it something like this. But I can not get it to work. JavaScript - var email = document.getElementById("email"); var selectedValue = email.options[email.selectedIndex].value; if (selectedValue == '') { alert("Please select a email"); } Hope somebody may help me out. Thank you.
upvote count: 2
duplicate of: http://stackoverflow.com/q/5224071
has title: Check if an item is not selected from a dropdown
has comment: http://stackoverflow.com/comment/44539467
type: Question
has answer: http://stackoverflow.com/a/28080471
has comment: http://stackoverflow.com/comment/44539511
tagged with: javascript
has comment: http://stackoverflow.com/comment/44539650
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44539474

http://stackoverflow.com/q/28034781
answer count: 1
has body: Node.js has some very good bindings for SQLite thanks to the SQLite3 package, but unfortunately, since Node runs single-threaded, all queries are done in the same connection. SQLite runs all queries per connection in series, meaning that it is impossible to actually do parallel queries in SQLite under Node. For more details check this https://github.com/mapbox/node-sqlite3/issues/394 This is true whether you wrap your query-logic in async.each/async.parallel, or any of the other helper packages for parallelising/serialising database IO. At the end of the day, to benefit from Node's async IO architecture under SQLite3, you are going to need more than one processing thread. How can this be done? :)
has comment: http://stackoverflow.com/comment/44454946
tagged with: multithreading
has comment: http://stackoverflow.com/comment/44455090
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/51740772
accepted answer: http://stackoverflow.com/a/51740772
score: 0
has title: Parallel SQLite queries in Node.js
tagged with: sqlite

http://stackoverflow.com/a/28034759
answers question: http://stackoverflow.com/q/28033729
accepted answer of: http://stackoverflow.com/q/28033729
has comment: http://stackoverflow.com/comment/44462701
type: Answer
upvote count: 5
has comment: http://stackoverflow.com/comment/44454658
downvote count: 0
has comment: http://stackoverflow.com/comment/44454528
has comment: http://stackoverflow.com/comment/44454498
score: 5
has body: You are mixing old legacy datatables api with new version of datatables. Use new API: AJAX DATA format I didn't manage to use "Demo PLNKR" example due to cross domain policy of that JSON data source : Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://itunes.apple.com/search?term=apple&amp;_=1421706895095. This can be fixed by moving the resource to the same domain or enabling CORS. At the end my advice is to : Change sAjaxSource to ajax , aoColumns to columns, mData to data... Take care of JSON format Ajax response that you are getting, map that properly with data column field example. If you are using itunes result it will be something like this : "ajax": { "url" : "https://itunes.apple.com/search?term=apple", "dataSrc" : "results" }, "columns": [ {"data": "artistName"}, {"data": "collectionName"}, {"data": "trackName"}, {"data": "collectionCensoredName"}, {"data": "trackCensoredName"}, {"data": "artistViewUrl"}, ... ]
type: AcceptedAnswer

http://stackoverflow.com/comment/44378889
type: Comment
score: 0
has text: hi, sorry to bother again but as i can't find the issue that is causing me the same Array [ ], i log this and i can see that at the end the value does not remain in the array. I can't save them outside the scope of the jsonService: http://hastebin.com/ukaduvocof.coffee
comment on: http://stackoverflow.com/a/27992182
type: AnswerComment

http://stackoverflow.com/q/28070824
tagged with: javascript
tagged with: jquery
score: 0
has title: Saving off an element's CSS and reapply later
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/44522039
has comment: http://stackoverflow.com/comment/44522070
has comment: http://stackoverflow.com/comment/44521339
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/44521498
has comment: http://stackoverflow.com/comment/44521021
has comment: http://stackoverflow.com/comment/44521712
type: AnsweredQuestion
has body: Is it possible to save off all CSS that is 'currently' applied to an element, then later reapply it? I am working on a sticking table header, and when I i change position:fixed it loses all the applied styles. I currently save off the column widths and reapply to the table header with: $('#tableHeader').css({ position:'fixed', width:$('#tablePanel').width(), top:$('#top').height(), }); $('.column1Value').width(col1Width); $('#col1').width(col1Width); $('.column2Value').width(col2Width); $('#col2').width(col2Width); $('.column3Value').width(col3Width); $('#col3').width(col3Width); $('.column4Value').width(col4Width); $('#col4').width(col4Width); $('.column5Value').width(col5Width); $('#col5').width(col5Width); $('.column6Value').width(col6Width); $('#col6').width(col6Width); $('.column7Value').width(col7Width); $('#col7').width(col7Width); This make the columns the correct size and line up closely, but there is extra padding or margin being applied from somewhere I can't completely figure out (bootstrap probably), and this makes the headers and columns not line up. I was hoping for something like: var savedCSS = $('#table').css(); and retrieve it like $('#table').css(savedCSS)
has comment: http://stackoverflow.com/comment/44521231
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/44521749
has answer: http://stackoverflow.com/a/28072580
accepted answer: http://stackoverflow.com/a/28072580

http://stackoverflow.com/a/28028422
upvote count: 2
has comment: http://stackoverflow.com/comment/44442193
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/44441955
accepted answer of: http://stackoverflow.com/q/28028374
has body: Attach yourself to the document keydown event and prevent the default behavior. document.onkeydown = function (event) { if (event.keyCode === 27) { event.preventDefault(); } }
answers question: http://stackoverflow.com/q/28028374
has comment: http://stackoverflow.com/comment/44441934
score: 2
downvote count: 0

http://stackoverflow.com/q/28095931
answer count: 1
tagged with: arrays
has title: creating objects from a group of data or an array
has comment: http://stackoverflow.com/comment/44567838
favorite count: 0
score: -3
accepted answer: http://stackoverflow.com/a/28096074
downvote count: 3
has comment: http://stackoverflow.com/comment/44568290
type: AnsweredQuestion
tagged with: object
has comment: http://stackoverflow.com/comment/44567795
has comment: http://stackoverflow.com/comment/44568187
tagged with: javascript
has body: I am really having trouble trying to put this together for some reason. anyone who can point me in the right direction. im sure im close just cant figure it out. my data is being created into an array with the code below. but what I really want is to make a nice object that contains the data for pieces,taken,top and left with their associated values attached. something nice and pretty looking pieces.push(objdata[a]) taken.push(objdata[b]) top.push(objdata[c]) left.push(objdata[d]) http://jsfiddle.net/emz8snek/ my trouble isn't with object creation in general but with combining these arrays into an object. I have googled a lot in face the link eddie put up the first 2 pages ive looked at already.
type: Question
upvote count: 0
has answer: http://stackoverflow.com/a/28096074

http://stackoverflow.com/a/28042788
has body: After some Trials I noticed In case of Internet explorer local Storage is not persistent across tabs. I made a page which updates a local storage in user operation after some operation in different tabs I noticed same key was having different values in different tabs under same domain. sample code : 404 : Resource Not Found A B C
answers question: http://stackoverflow.com/q/28023906
score: 0
type: Answer

http://stackoverflow.com/q/27981836
answer count: 4
score: 2
type: AnsweredQuestion
has title: How to handle links in Phonegap + JQM app?
has answer: http://stackoverflow.com/a/28141479
type: Question
has answer: http://stackoverflow.com/a/27990727
has body: I am building an app with Phonegap and jQuerymobile. The app roughly works like this: 1) The app downloads a ZIP file from a public server and then unzips them to a local folder. I got the local folder path from fileSystem.root.toNativeURL() (in OS, it's something like this: file://var/mobile/Container/Data/Application/xxxx/Documents/) 2) App redirects to HTML that was unzipped in local folder (ex: file://var/mobile/Container/Data/Application/xxxx/Documents/index.html) I am now facing issues b/c inside the index.html file, all the links are absolute path (ex: Link). This breaks all the links since (I assume) they are all now pointing to file://content/index2.html instead of file://var/mobile/Container/Data/Application/xxxx/Documents/content/index2.html. My question is, how should I handle the links? I am thinking i should just rewrite all the links to force prepend the local folder URL in front of it. Is there a better way? And if rewriting links is the way to go, how can I do this with jQuerymobile? I did this in jQuery which seems to work http://jsfiddle.net/jg4ouqc5/ but this code doesn't work in my app (jQueryMobile)
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28141479
downvote count: 0
has answer: http://stackoverflow.com/a/28118324
favorite count: 0
possible better answer: http://stackoverflow.com/a/28016792
tagged with: cordova
upvote count: 2
has answer: http://stackoverflow.com/a/28016792

http://stackoverflow.com/q/28085848
has comment: http://stackoverflow.com/comment/51513229
has body: So I currently found this photo cropping plugin called cropit . Demos are here . So what I want to do is grab the cropped photo and upload the name of the photo to the mysql database and save it to a directory using php. So far I have this : HTML : Resize image Submit jQUERY : $('form').submit(function() { // Move cropped image data to hidden input var imageData = $('.image-editor').cropit('export'); $('.hidden-image-data').val(imageData); // Print HTTP request params var formValue = $(this).serialize(); $('#result-data').text(formValue); // Prevent the form from actually submitting return false; }); All I need help is with the php set up code because when I crop the photo and select submit, jquery returns the serialize code, and all this code that I'm usually not familiar with appears. Here is a few characters of the serialized code jquery returns: image-data=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhE...
upvote count: 13
has title: How to crop and upload photo using cropit jquery plugin with php
score: 13
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/33963859
has comment: http://stackoverflow.com/comment/53757950
tagged with: mysql
possible better answer: http://stackoverflow.com/a/33963859
has answer: http://stackoverflow.com/a/28086429
type: Question
has comment: http://stackoverflow.com/comment/78495253
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/28086429

http://stackoverflow.com/q/28090440
accepted answer: http://stackoverflow.com/a/28090608
has title: select.val returning undefined in array
has body: I'm doing the following: $('#clear-button').click(function () { var clearableFieldArray = $('.clearable-field'); var array = Array.prototype.slice.call(clearableFieldArray); for (var i = 0; i &lt; 7; i++) { if (i == 6) { array[i].val(''); } else { array[i].val('All'); } } }); when I do console.log(array[i]) it prints the correct elements and children, however when I try to access the .val() it keeps returning undefined, why is it doing that
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44557428
has comment: http://stackoverflow.com/comment/44557530
has comment: http://stackoverflow.com/comment/44557498
type: Question
possible better answer: http://stackoverflow.com/a/28090606
answer count: 2
has answer: http://stackoverflow.com/a/28090606
has answer: http://stackoverflow.com/a/28090608
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44557448
has comment: http://stackoverflow.com/comment/44557655

http://stackoverflow.com/a/28098026
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/28097554
type: Answer
upvote count: 1
has body: You may be able to get what you want by using the "sensitivity" option. The Intl.Collator.prototype is not writable. You may be able to create and array with sort and character to set you own sort order. $convert[character]= sortOrder ; Array structure would depend on purpose. With this structure you'd have to convert the result back again. $letters = [$convert[a],$convert[n],$convert[ñ],$convert[x]); This one would probably work best in most cases. $letters = [[$convert[a],a],[$convert[n],n],[$convert[ñ],[ñ],[$convert[x],x]);

http://stackoverflow.com/a/28099589
has comment: http://stackoverflow.com/comment/44575125
has body: You will want to use loadDataWithBaseURL for your purpose. UPDATE: I don't see an actual method loadScript() that is loaded into the page anywhere so you can try to create the loadScript method yourself before you call to javascript:loadScript(). view.loadUrl("javascript:function loadScript(url, callback)" + "{" + " var head = document.getElementsByTagName('head')[0];" + " var script = document.createElement('script');" + " script.type = 'text/javascript';" + " script.src = url;" + " script.onreadystatechange = callback;" + " script.onload = callback;" + " head.appendChild(script);" + "}"); view.loadUrl("javascript:loadScript('file:///android_asset/jquery.js','callback')");
has comment: http://stackoverflow.com/comment/44576768
has comment: http://stackoverflow.com/comment/44576810
has comment: http://stackoverflow.com/comment/44576750
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/44576923
has comment: http://stackoverflow.com/comment/44576684
has comment: http://stackoverflow.com/comment/44577272
downvote count: 0
answers question: http://stackoverflow.com/q/28099546
has comment: http://stackoverflow.com/comment/44575066
has comment: http://stackoverflow.com/comment/44576865
type: Answer
has comment: http://stackoverflow.com/comment/44577605

http://stackoverflow.com/a/28003017
has comment: http://stackoverflow.com/comment/44395124
has body: These classes that are added to your DOM elements are directives (directive can be elements, attributes, classes, or comments). When angular is compiling the DOM and hits a directive it then runs through that directives logic to change, manipulate, update, or do whatever task it is that the directive is asking angular to do. For example it will take your ng-repeat directives and build out multiple DOM elements accordingly. By removing these directives (classes like ng-scope &amp; ng-isolated-scope) angular will not stop at these locations and execute logic. Because of this the performance increase is achieved.
type: Answer
has comment: http://stackoverflow.com/comment/60239469
upvote count: 13
has comment: http://stackoverflow.com/comment/44394918
score: 13
accepted answer of: http://stackoverflow.com/q/28002113
has comment: http://stackoverflow.com/comment/44395071
has comment: http://stackoverflow.com/comment/44395018
has comment: http://stackoverflow.com/comment/44395225
answers question: http://stackoverflow.com/q/28002113
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44395167

http://stackoverflow.com/q/28002266
downvote count: 0
has comment: http://stackoverflow.com/comment/44409151
possible better answer: http://stackoverflow.com/a/57737890
favorite count: 0
has answer: http://stackoverflow.com/a/57737890
upvote count: 2
tagged with: node.js
has comment: http://stackoverflow.com/comment/44409033
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28012738
has comment: http://stackoverflow.com/comment/44394147
type: Question
tagged with: debugging
tagged with: javascript
has title: node-inspector/chrome instance showing no source files, no call stack, nothing
answer count: 2
accepted answer: http://stackoverflow.com/a/28012738
has body: Trying to get node-inspector to actually debug a very simple sample server app. I can start the debugger from the command line (node-inspector simple.js) just fine and it gives me the standard Node Inspector v0.8.3 Visit http://127.0.0.1:8080/debug?port=5858 to start debugging message after starting. I go to that address in Chrome and the expected debugging interface shows up. However, there is no data. Absolutely no data anywhere - nothing in source files, callstack, breakpoints, console. I hit F8. It unpauses - still no data anywhere. I've tried the --debug-brk option during startup - same result - no data anywhere in the debugger. What am I missing? node-inspector: v0.8.3 nodejs: v0.10.35 chrome (chromium): Version 39.0.2171.65 Built on Ubuntu 14.04, running on LinuxMint 17 Here's the code I'm trying to debug (filename is simple.js). It runs fine via nodejs simple.js var http = require('http'); function func(arg1, arg2) { var result = 'Hello from func. '; result += arg1; result += ' '; result += arg2; return result; } var server = http.createServer(function(req, resp) { debugger; var str = 'string', num = 10, array = [1, 2, 3, 4, 5], buffer = new Buffer('x'), undef; resp.setHeader('Content-Type', 'text/plain'); resp.end(func(str, num) + '\n'); }); server.listen(8080, function() { console.log('listening on port 8080'); });

http://stackoverflow.com/q/28014945
favorite count: 0
tagged with: reference
upvote count: 0
type: UnansweredQuestion
type: Question
has body: Noob here. I have an example where two variable are pointing to the same place in memory (changing the second changes the first). I can do an operation on the second variable and that will change the first. But if I try a different operation, then the values of the variables are no longer the same, meaning, I guess, that the variable are now pointing to their own places in memory. var arr1 = "john".split(''); console.log(arr1); var arr2 = arr1; console.log(arr2 === arr1); arr1 = arr2.reverse(); //changes both arr1 and arr2 --meaning they are pointing to the same object console.log(arr2 === arr1); //returns true arr1 = arr2.slice(3);//only changes arr1--meaning they are not pointing to the same object ??? console.log(arr2 === arr1); //returns false Why is this? How can you change the value of arr2 and always have it effect arr1?
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/28015124
has comment: http://stackoverflow.com/comment/44417472
has comment: http://stackoverflow.com/comment/44417107
tagged with: javascript
has title: Javascript variables copy or reference
tagged with: variables
downvote count: 1
has answer: http://stackoverflow.com/a/28015015

http://stackoverflow.com/comment/44506771
type: Comment
has text: i think i gave up too early on experimenting with the syntax. my bad. thanks a lot
comment on: http://stackoverflow.com/a/28050396
type: AnswerComment
score: 0

http://stackoverflow.com/q/28116519
downvote count: 0
tagged with: javascript
has title: Xceed MaskedTextBox does not start at beginning when focused
tagged with: jquery
favorite count: 0
has body: I am using Xceed MaskedTextBox; &lt;xctk:MaskedTextBox Mask="000-000-0000" x:Name="PhoneTextBox"&gt; &lt;xctk:MaskedTextBox.Style&gt; &lt;xctk:MaskedTextBox.Style&gt; &lt;Style.Triggers&gt; &lt;MultiTrigger&gt; &lt;MultiTrigger.Conditions&gt; &lt;Condition Property="Text" Value="___-___-____"/&gt; &lt;/MultiTrigger.conditions&gt; &lt;/MultiTrigger&gt; &lt;/Style.Triggers&gt; &lt;/xctk:MaskedTextBox.Style&gt; When ever I click in the text box to enter a number, it always positions my cursor where i clicked instead of at the beginning of the textbox. This causes the user to start typing a number and quickly running out of room since if they click near the end, they can enter fewer numbers. Q: Is there a way to click anywhere in the box and have the cursor start position at the front?
has answer: http://stackoverflow.com/a/53657563
type: UnansweredQuestion
tagged with: maskedtextbox
upvote count: 1
has answer: http://stackoverflow.com/a/28603192
tagged with: wpf
tagged with: xceed
score: 1
type: Question
answer count: 2

http://stackoverflow.com/q/28017962
has body: If I load an external css from a CDN (different host) for example: https://cdn.mydomain.com/css/styles.css and then in styles.css do: background: url('../img/bg.png') bg.png loads from the CDN host (https://cdn.mydomain.com/img/bg.png) not the origin. However if I do the same with an external JavaScript from a CDN (https://cdn.mydomain.com/js/main.js) and inject a script tag from main.js: var a,b; b = document.createElement("script"); b.src="/js/foobar.js"; b.type="text/javascript"; b.async=!0; a = document.getElementsByTagName("script")[0]; a.parentNode.insertBefore(b,a); foobar.js is loaded from the origin, not the CDN host. Why is this?
has comment: http://stackoverflow.com/comment/44422842
has comment: http://stackoverflow.com/comment/44422847
tagged with: javascript
score: 0
tagged with: same-origin-policy
has comment: http://stackoverflow.com/comment/44422862
has comment: http://stackoverflow.com/comment/44422835
type: UnansweredQuestion
has title: Why does injecting a script tag from a CDN JavaScript file use the origin host
tagged with: css
answer count: 0
tagged with: http
type: Question

filter
tags question: http://stackoverflow.com/q/28117500
tags question: http://stackoverflow.com/q/28030528
tags question: http://stackoverflow.com/q/28092549
tags question: http://stackoverflow.com/q/28033563
tags question: http://stackoverflow.com/q/28113726
tags question: http://stackoverflow.com/q/28076015
tag name: filter
tags question: http://stackoverflow.com/q/28004984
tags question: http://stackoverflow.com/q/28116288
type: Tag
tags question: http://stackoverflow.com/q/27975297

http://stackoverflow.com/a/27982368
answers question: http://stackoverflow.com/q/27982320
type: Answer
has comment: http://stackoverflow.com/comment/44445459
has comment: http://stackoverflow.com/comment/44359224
type: AcceptedAnswer
has body: Angular will not parse the string and replace {pid} like in views, so you could simply do: this.getItems = function () { return $http({ url: '/api/project/' + pid + '/users', method: 'GET' }); } Or even shorter: this.getItems = function () { return $http.get('/api/project/' + pid + '/users'); }
accepted answer of: http://stackoverflow.com/q/27982320
score: 0
has comment: http://stackoverflow.com/comment/44356935

http://stackoverflow.com/comment/44604511
has text: Yes it is not code review, but your lack of knowledge of `eq()` just produced a bad answer. Yeah the code works, so does opening a window with a hammer. Yeah it was quick way to open a window, but it will lead to issues in the future.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28112478

http://stackoverflow.com/a/28083281
score: 0
type: Answer
has body: hope this code would be help you Search Product Search Search Item Name: {{searchText}} and use given code inside controller $scope.check=function(searchText){};
answers question: http://stackoverflow.com/q/28082921

http://stackoverflow.com/comment/44413827
score: 1
comment on: http://stackoverflow.com/q/28013323
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/2338942/access-a-javascript-variable-from-php

http://stackoverflow.com/comment/44356264
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27981129
has text: Then you are forced to use a web browser or to simulate it, as far as I know.. Just a side question: why are you using a windows form application for such a thing?

http://stackoverflow.com/comment/44433194
type: QuestionComment
has text: it is not working when i put some values in textarea javascript method is not calling
type: Comment
comment on: http://stackoverflow.com/q/28023814
score: 0

http://stackoverflow.com/q/27989676
tagged with: date
type: Question
has answer: http://stackoverflow.com/a/28369282
answer count: 2
tagged with: javascript
tagged with: jquery
has title: Get days from substract to dates using Moment.js
score: 0
accepted answer: http://stackoverflow.com/a/28244975
tagged with: momentjs
has answer: http://stackoverflow.com/a/28244975
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28369282
has body: I want to set a countdown for events, so only on the case the event hasn't started, a countdown of the days before the event shows. The dates are stored on the database like this DD-MM-YYYY, so I convert them using Moment.js, but I still don't get the remaining days. Here is my code moment.locale('es'); var hoy = moment().format("DD-MM-YYYY"); var finicio = moment("20-01-2015", "DD-MM-YYYY").format("DD-MM-YYYY"); var ffin = moment("19-01-2015", "DD-MM-YYYY").format("DD-MM-YYYY"); $(function () { if (finicio &lt; hoy) { $("#estadoevento").text("EXPIRADO"); } else if (finicio &gt; hoy) { $("#estadoevento").text("EN ESPERA"); var contador = moment(finicio).diff(moment(hoy)); var espera = moment.duration(contador); var restante = espera.asDays(); $("#contador").text("FALTAN " + restante + " DÍAS"); } else { $("#estadoevento").text("EN ESTE MOMENTO"); } }); But I don't get the values, I don't know if I have to redeclare my variables, currently the code just shows a message on a span tag if event is expired, incoming or today, and works correctly. Variable finicio is the one that contains the starting date for the event, so if the event starts on five days, I wan't to get that number, I tried, but it returns a 0 value. I'm using jQuery too. contador variable is the substract of the two dates, variable espera gets the duration of contador, and finally restante changes into days, but I don't know where my code is wrong.

http://stackoverflow.com/comment/44418649
has text: That did work! +1 to that! But "assignment" is just the name given to the group of text boxes and is not a property. It worked for the rest of the cases but why not for the particular case? (Case: 2) ? My question lies there!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28015383
type: Comment

http://stackoverflow.com/a/28094497
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/28094284
has body: jQuery will only retrieve the data-test attribute for the value .data('test') if it hasn't stored one already. So it offers the .removeData method, which you can call when you change the attribute to force jQuery to retrieve .data('test') from the attribute again next time: $('.value').html($(this).text()) .removeData('test') .attr('data-test', $(this).text()); http://jsfiddle.net/mblase75/8mp6k2w2/ However, it would be better to just be consistent and use either .attr() or .data() to both set and get the value: $('.value').html($(this).text()) .data('test', $(this).text());
accepted answer of: http://stackoverflow.com/q/28094284
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/28084001
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/28086172
tagged with: javascript
tagged with: android
has answer: http://stackoverflow.com/a/28086172
has body: I have two class and I want to get 'JSI.var' in MainActivity. Firstly i getting "" empty value when i button clicked. So, no log. Secondly i getting document.getElementsByName('name')[4].src) value. So, there are document.getElementsByName('name')[4].src) in next logs. How i get another class in @JavascriptInterface method. in onCreate() method in MainActivity webview.getSettings().setJavaScriptEnabled(true); webview.addJavascriptInterface(new JSI(), "HTMLOUT"); bt1.setOnClickListener(new OnClickListener(){ public void onClick(View v){ for(int i=0;i&lt;5;i++){ webview.loadUrl("javascript:window.HTMLOUT.processHTML(document.getElementsByName('name')["+i+"].src);"); Log.i("CODE : ",JSI.var); //or String str = JSI.var;} }}); JSI class import android.webkit.JavascriptInterface; public class JSI { static String var=""; @JavascriptInterface public static void processHTML(String html) { var=html; } }
favorite count: 0
has comment: http://stackoverflow.com/comment/44549444
downvote count: 0
has title: Java get variable from another class in Android JavascriptInterface
tagged with: webview
type: AnsweredQuestion
score: 1
tagged with: java
has comment: http://stackoverflow.com/comment/44549503
type: Question

http://stackoverflow.com/comment/44451316
has text: that sports object is already an Array of objects and if any of the properties of these objects are strings, Angular filter will match against them. Can you clarify what is the problem and maybe provide an example plunker
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28033097

http://stackoverflow.com/q/27975452
upvote count: 3
has answer: http://stackoverflow.com/a/33761776
answer count: 1
favorite count: 0
has title: how can I make sure the header cookie is passed on a post method in frisby.js
type: UnansweredQuestion
tagged with: session-cookies
score: 3
downvote count: 0
tagged with: cookies
has body: I'm running tests on my api via frisby.js. When I login a user, I'm setting a header cookie from the response like this .after(function(err, res, body){ header: { content-type: 'application/json', Cookie: res.headers['set-cookie'] ...} Then in my following tests I write frisby.create('test with cookie') .get('http://myapi/',{ headers: header}) This works fine, but when I do a post request frisby.create('test update email') .post('http://myapi/user/update', { email: 'newEmail@test.com', headers: header }) I look at my console from the server, and the header is coming across as { 'content-type': 'application/x-www-form-urlencoded', 'host': config.baseDomain, 'content-length': '269', 'connection': 'keep-alive' } I thought maybe frisby was checking that the applied header was of the correct type, and updating the header without the Cookie, so I created a separate postHeader as var postHeader = { 'content-type': 'application/x-www-form-urlencoded', 'host': config.baseDomain, 'content-length': '269', 'connection': 'keep-alive' }; and appended the cookie to the post header and sent that through, but that doesn't work either. Any way I can get the cookie sent in a post header?
tagged with: http-headers
type: Question
tagged with: javascript

http://stackoverflow.com/comment/44389672
has text: Ah, thank, so `jshint -W000` notation doesn't disable inspection for the one line, but for all lines following the notation?
comment on: http://stackoverflow.com/a/28000206
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44524494
comment on: http://stackoverflow.com/a/28072406
type: Comment
has text: If that's the case, why does the first example work within the JSFiddle, but mine doesn't? I tried removing the parent div tags, and only leaving the table in the fiddle, just like the working example, but still no luck.
type: AnswerComment
score: 0

http://stackoverflow.com/q/27995835
tagged with: javascript
has comment: http://stackoverflow.com/comment/44382371
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44382157
has comment: http://stackoverflow.com/comment/44382380
tagged with: asynchronous
type: Question
has comment: http://stackoverflow.com/comment/44382186
has comment: http://stackoverflow.com/comment/44382176
answer count: 2
has comment: http://stackoverflow.com/comment/44382242
tagged with: dojo
has answer: http://stackoverflow.com/a/27996062
accepted answer: http://stackoverflow.com/a/27996062
has comment: http://stackoverflow.com/comment/44382208
score: 0
has comment: http://stackoverflow.com/comment/44382276
has body: I was having some problem when trying to do a async function in JavaScript. Basically I have a pointArr to store the coordinates along the route. Then I got a moveNext() which takes in each coordinates along the route and plot onto the map. Then inside the moveNext(), I got another array which is busList. If the coordinates along the route match the coordinates of busList, then I minus the totalBusStopLeft by one. Here is the code where I call the moveNext(): getAllBusLoc(function(busList) { //At first I set the totalBusLeft by the length of busList which is 13 in this case var totalBusLoc = busList.length; document.getElementById("busStopLeft").innerHTML = totalBusLoc; timeout = 1500; pointArr.forEach(function(coord,index){ setTimeout(function(){ moveNext(coord.x, coord.y, index, busList, totalBusLoc); }, timeout * index); }); }); function moveNext(coordx, coordy, k, busList, totalBusLoc ){ //pointToCompare is the coordinates in the route but not the coordinates of busList var pointToCompare = coordx + "," + coordy; //If the coordinates in route matches the coordinate in busList, I minus busLeft by one if(busList.indexOf(pointToCompare) &gt; -1){ parseFloat(totalBusLoc--); document.getElementById("busStopLeft").innerHTML = totalBusLoc ; } //Code to Add marker } However, with this code, my Html component busStopLeft keep showing 13 which is the original totalBusLoc. I wonder how could I return the minused totalBusLoc from moveNext(). Any ideas? I have tried to use async.eachSeries but when I imported that async.js, it was giving me another error message which crash with dojo. Thanks in advance. Here is the part where I tried to use callback: totalBusLoc = busList.length; document.getElementById("busStopLeft").innerHTML = totalBusLoc; timeout = 1500; pointArr.forEach(function(coord,index){ setTimeout(function(busLeft){ moveNext(coord.x, coord.y, index, busList, totalBusLoc); }, timeout * index); }); }); function moveNext(coordx, coordy, k, busList, totalBusLoc, callb…
has title: JavaScript Asynchronous Loop does not return results
tagged with: loops
possible better answer: http://stackoverflow.com/a/27996058
has answer: http://stackoverflow.com/a/27996058

http://stackoverflow.com/comment/44439107
type: AnswerComment
score: 0
type: Comment
has text: I updated. My bad, I didn't see what's the event listener was targeted to.
comment on: http://stackoverflow.com/a/28026831

http://stackoverflow.com/comment/44442340
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28028649
has text: Have you considered using a date library, like moment.js?
type: Comment

http://stackoverflow.com/comment/44561583
score: 2
has text: You'd have better to use a class or any transversal selector to bind event, e.g: `$('.form form').validate(...);`
comment on: http://stackoverflow.com/q/28092676
type: QuestionComment
type: Comment

http://stackoverflow.com/a/28118567
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/28118289
answers question: http://stackoverflow.com/q/28118289
downvote count: 0
score: 1
has body: Don't try to echo this out manually. What you can do is build the same structure in PHP, then use json_encode. JSON is actually valid JavaScript code, so it will work. Try it like this: &lt;?php $lookup = array(); $sql = "SELECT name FROM swords ORDER BY animals, colors"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) &gt; 0) { while($row = mysqli_fetch_assoc($result)) { $lookup[$row['name']] = array('url' =&gt; 'images/'.$row['name'].'.jpg'); } } else { //echo "No records"; } ?&gt; var lookup = &lt;?=json_encode($lookup); ?&gt;;
upvote count: 1

http://stackoverflow.com/q/28054318
answer count: 0
has comment: http://stackoverflow.com/comment/44491299
has comment: http://stackoverflow.com/comment/44490564
has comment: http://stackoverflow.com/comment/44491263
has title: variable with content console output undefined angularjs
tagged with: angularjs-scope
type: Question
has comment: http://stackoverflow.com/comment/44490847
linked to: http://stackoverflow.com/q/500431
has body: Am having trouble to update a variable, am getting undefined when I can see the content, am trying to keep the value of the variable data[0] outside the then() function, and finally add to a $scope variable. My code is this: var user = function(){ var usuario; var uno = MGAindexdb.regresarUsr().then(function(data){ console.log('Dentro de usr'); console.log(data[0]); // here I see the object with it's content usuario = data[0]; // copy the value to usuario console.log(usuario); // same data with the object }).catch(function (e) { log(e, "error"); }); console.log(usuario); // print undefined } user(); // This is how the content looks like in dev chrome tool: // Object {usr_id: 45, nombre: "jose", email: "jose@gmail.com", fb_email: "jose@gmail.com", registration_date: "2014-05-31T18:03:33.000Z"…} I read this article that explains how closures work and i think it wasn't exactly my case and also read this great post that explains javascript scope. But still can't figure out why the value is not been saved. Thanks in advance for your time.
has comment: http://stackoverflow.com/comment/44491051
has comment: http://stackoverflow.com/comment/44490825
has comment: http://stackoverflow.com/comment/44491131
has comment: http://stackoverflow.com/comment/44490797
tagged with: javascript
tagged with: scope
score: 0
has comment: http://stackoverflow.com/comment/44491155
duplicate of: http://stackoverflow.com/q/14220321
tagged with: undefined
has comment: http://stackoverflow.com/comment/44491205
linked to: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/44494923
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44490924
linked to: http://stackoverflow.com/q/16855836

http://stackoverflow.com/comment/44543151
type: AnswerComment
comment on: http://stackoverflow.com/a/28082066
has text: sir K.Toress i have a problem in XMLHttpRequest cannot load http://192.168.1.10/android_connect/JsonReturn.php. Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers. In android phone .. When i am include the this in my php files but any answer when i enable in this extension https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi then show me the proper answer
score: 0
type: Comment

http://stackoverflow.com/q/28077585
tagged with: javascript
has title: Draw and move shapes across canvas with an interval
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/28078332
favorite count: 0
has comment: http://stackoverflow.com/comment/44535053
has body: I'm trying to make my own "Flappy Bird" clone in my spare time, but I'm having trouble getting the "pipes" to draw and scroll at a set interval. I'm able to draw one set and move it, but having it repeatedly draw and move it in an interval is eluding me. Any insight as to what I need to do would be appreciated. $(document).ready(function(){ //global vars var world = document.getElementById('gameWorld'); var startScreen = document.getElementById('startScreen'); var context = world.getContext('2d'); window.requestAnimFrame = (function(callback) { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60); }; })() //bord constructor function bordBuilder(){ this.radius = 10; this.x = world.width / 2; this.y = world.height / 2; this.vy = -20; this.gravity = 0.8; } function pipesBuilder(){ this.width = 50; this.x = world.width; } // draw the Bord on the stage function drawBord(bord, context){ context.beginPath(); context.arc(bord.x, bord.y, bord.radius, 0, 2 * Math.PI, false); context.fillStyle = 'blue'; context.fill(); context.lineWidth = 1; context.strokeStyle = 'navyblue'; context.stroke(); } //function to check whether or not the bord is hitting the top or bottom of the stage function fallingBord(bord){ bord.y += bord.gravity; if(bord.y < 0 + bord.radius){ bord.y = bord.radius; }else if(bord.y + bord.radius > world.height){ bord.y = world.height - bord.radius; } } //animation function always running function startAnimation(bord, context, pipes){ context.clearRect(0, 0, world.width, world.height); drawBord(bord, context); fallingBord(bord); setInterval(function(){ drawPipes(pipes, context); }, 3000); movePipes(pipes); requestAnimFrame(function(){ startAnimation(bord, context, pipes); }); } //make the bird fly higher every click function flyHigher(bord){ console.log('higher'); bord.y += bord.v…
has answer: http://stackoverflow.com/a/28078332
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44555820
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44534121
type: Question
tagged with: canvas

http://stackoverflow.com/q/28119199
score: 0
has comment: http://stackoverflow.com/comment/44612763
has body: Pulling my hair out with this. Suddenly receiving the following error which wasn't there before: &gt;&gt;PHP Notice: Undefined index: rmvFileList in C:\wamp\www\somesubdirectory\members\delete.php on line 7 This is coming from an Ajax submission to delete.php. Although the "notice" is appearing, the script is executing properly as it should (database deletion completed correctly, file deleted correctly, and the success call being logged correctly in the console.log). Probably just some sort of sick obsession, but I want to get rid of the warning popping up in my error log every time the delete script is called. Here is the ajax: var rmvFile = "Some file name"; $.ajax({ type: "POST", url: "delete.php", dataType:"text", data: {'rmvFileList' : rmvFile }, success: function(returnData) { console.log(returnData); } }); And here is delete.php: &lt;?php session_start(); include('../../phpincl/db.php'); $table = 'phoeteo_img_' . $_SESSION['memberID'] . '_' . $_SESSION['showID']; $name = $_POST['rmvFileList']; &lt;&lt;--This is line 7 $sql = "SELECT * FROM $table WHERE imgNameTime = '$name'"; $result = mysqli_query($conn, $sql) or die(mysqli_error($conn)); while($row = mysqli_fetch_assoc($result)) { $toBeDeletedIndex = $row['imgIndex']; $toBeDeletedFilename = $row['imgNameTime']; $sql = "DELETE FROM $table WHERE imgNameTime = '$name'"; mysqli_query($conn, $sql) or die('Failed: ' . mysqli_error($conn)); $path = 'repository/' . $_SESSION['memberID'] . '_' . $_SESSION['showID'] . '/' . $toBeDeletedFilename; unlink($path); } echo $name; ?&gt; Any and all help would be greatly appreciated. Thanks!
tagged with: http-post
answer count: 1
has comment: http://stackoverflow.com/comment/44632324
has comment: http://stackoverflow.com/comment/44612972
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/28119357
has title: Ajax / PHP Notice: Undefined index:
type: Question
has comment: http://stackoverflow.com/comment/44612826
has comment: http://stackoverflow.com/comment/44612668
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/a/28121887
has body: You can try this, text.match(/.+/g)
has comment: http://stackoverflow.com/comment/44618075
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28121766

http://stackoverflow.com/comment/44406184
comment on: http://stackoverflow.com/q/28009011
has text: Any particular reason you're not just using `bind()`? Is this an exercise?
type: QuestionComment
type: Comment
score: 0

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

http://stackoverflow.com/comment/97462934
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28006742
type: AnswerComment
has text: How do we get the position of current element in array ?

http://stackoverflow.com/q/27968509
downvote count: 0
tagged with: javascript
has body: In Paper.js, is it possible to change the frame rate of the onFrame(event)function? The paper.js website tutorial says the function is by default called 60 times per second, but it does not include if it is possible (and how) to change the frame rate of this function.
tagged with: paperjs
score: 8
favorite count: 0
upvote count: 8
accepted answer: http://stackoverflow.com/a/27968674
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27968674
has title: Change frame rate in paper.js
type: Question
answer count: 1

http://stackoverflow.com/comment/44518893
has text: Okay, tanks for your answer! Then let us face the transition thing :)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28069111

http://stackoverflow.com/q/28009082
type: Question
has answer: http://stackoverflow.com/a/28276880
has comment: http://stackoverflow.com/comment/44415424
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/44471834
has title: Try-Catch tasks in GruntJS
answer count: 2
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/37490273
score: 6
upvote count: 6
has body: Is there a way to catch when a GruntJS task fails and act upon it? The --force flag doesn't help, because I need to know if something broke along the way, and do something about it. I tried some arrangement similar to a try-catch, however it doesn't work. That is because grunt.registerTask pushes tasks into a queue - the execution is not synchronous. grunt.registerTask('foo', "My foo task.", function() { try { grunt.task.run('bar'); } catch (ex) { // Handle the failure without breaking the task queue } }); Creative javascript ideas are welcome as well as GruntJS know-how.

http://stackoverflow.com/comment/44443783
comment on: http://stackoverflow.com/a/28029265
score: 0
type: Comment
has text: Great. I updated the other one with getElementsByName in case you needed it
type: AnswerComment

http://stackoverflow.com/comment/44348248
comment on: http://stackoverflow.com/q/27977815
has text: A little more info would be helpful. What does your existing JavaScript look like?
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28059008
tagged with: javascript
has body: My html code where i store id : html code where i am getting id, $id coming from while function from php script edit I have javascript code : script> $(function(){ $(".image-id-btn").on("click", function(){ var imageId = $(this).attr("data-image"); alert(imageId); $(".image-id-holder").children("input").val(imageId); }); }); i want to put variable imageId into button value property cause i want to store in button-value property instead of input property. when i change children it's not work $(".image-id-holder").children("button").val(imageId); I am assigning this way : Whole idea is to fill all the fields on form for editing, so user doesn't have to rewrite all the fields on a form.
answer count: 2
has comment: http://stackoverflow.com/comment/44499696
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44499850
favorite count: 0
has comment: http://stackoverflow.com/comment/44502610
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44499813
has comment: http://stackoverflow.com/comment/44499736
has answer: http://stackoverflow.com/a/28060014
score: -1
has comment: http://stackoverflow.com/comment/44499615
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/28061673
has comment: http://stackoverflow.com/comment/44499529
type: Question
has comment: http://stackoverflow.com/comment/44501669
has title: How to set `value` attribute to a button element

http://stackoverflow.com/q/28116801
downvote count: 0
tagged with: javascript
has title: Why can't I retrieve the cookies exchanged from my AngularJS mobile application with the server?
favorite count: 0
tagged with: cordova
has comment: http://stackoverflow.com/comment/51010342
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: cookies
score: 1
type: Question
has body: I have built a hybrid mobile application based on Ionic, AngularJS and Cordova and I want to retrieve the cookies sent back from a server after the $http request and I can't! Invoking the backend server through the browser I can see, using the developer tools, some cookies were created. How can I invoke the same server from my AngularJS mobile application and retrieve these cookies? I'm trying the ngCookies module: &lt;script src="lib/angular-cookies/angular-cookies.js"&gt;&lt;/script&gt; And the application module seems to be configured correctly: angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'ngCookies']) As well as the controller: angular.module('starter.controllers', []) .controller('DashCtrl', ['$scope', '$http', '$cookieStore', function($scope, $http, $cookieStore) { $scope.signIn = function() { $http.post(url, inputObject) .success(function (data, status, header) { console.log("======&gt; Cookies: " + header('Set-Cookie')); console.log("Cookies are: " + JSON.stringify($cookieStore)); }) }; }]) The result is the first console log displays only a cookie (the browser developer tools displays more), and the $cookieStore shows an empty object!! Nevertheless, the cookies are got because they are sent back to the server in an implicit way if I invoke it again from my App. Then, why the $cookieStore did not show them? The problem is the cookies implicitly exchanged with the server are deleted when the application is stopped (because most of them are session cookies), so I wanted to read them once they are created, store it locally (e.g. localStorage) for avoiding its deletion when the application is stopped, and assign them to the backend request when the application is starting again. Can I do that?? How can I do it? I'd need help for retrieving the cookies and also for adding them again to a new $http request. Many thanks!! Sergi

http://stackoverflow.com/comment/44614223
comment on: http://stackoverflow.com/q/28119840
type: Comment
type: QuestionComment
has text: So create an array of names in your php code, and pick a random one when creating a post? What's the problem you're having?
score: 0

http://stackoverflow.com/comment/44361957
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27985363
has text: Well, "-ms-expand" is a vendor-specific extension and not on a standards track. It's not Modernizr's job to provide feature detection for non-standard/browser-or-platform-specific features like this one. It's also not a pseudo-element that's commonly used or referred to (hell, this is the first I'm hearing about it) so I can't imagine the demand for feature detection in Modernizr would be too great. :)
type: Comment

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

http://stackoverflow.com/q/28006295
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44401060
has body: I want to change the background color and text color of an element in my header when the menu is visible. I want to achieve a continuous menu look. however, i also want the element to go back to it's original style when the menu is hidden. However, my jQuery code does not work. There are no syntax errors but it still doesn't work. I have the code in an if statement. Here's the link to the jsFiddle http://jsfiddle.net/kamvkg14/2/ Here's the code responsible for the style change if ($('.account-menu').css('display') != 'none') { $('.header_account').css({ 'background-color': 'white', 'padding-bottom': '16px', 'color': 'black' }); } else { $('.header_account').css({ 'background-color': 'yellow', 'padding-bottom': '0px', 'color': '#00FFFF' }); }
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/28006447
favorite count: 0
has title: jQuery change css properties of an element when an element is visible
accepted answer: http://stackoverflow.com/a/28006447
tagged with: css
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/44401119

http://stackoverflow.com/comment/44365652
has text: Dang.. I could've sworn I'd done that the first time around - apparently not! Thanks for catching my stupid mistake! Works like a charm.
comment on: http://stackoverflow.com/a/27987237
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27966886
has body: You probably need an itemController (see docs) then you can have your isBeingEdited on that item controller, and the actions to toggle between displaying and editing a single track would go there too. The actions to save the model would go on the route
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/27966035
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27966035
type: Answer

http://stackoverflow.com/a/27984536
has comment: http://stackoverflow.com/comment/44362871
accepted answer of: http://stackoverflow.com/q/27984129
has body: You are correct, the $on and $emit should be avoided, as they create unnecessary noise. There's actually a pretty simple solution to this situation, I use it quite a bit. What you need to have is an object in your service and give one controller a reference to it, and the other that needs to trigger an action can watch the service variable (good job on the TypeScript by the way): class ItemSelectionWrapper { //just a wrapper, you could have other variables in here if you want itemSelected: IItemModel; } class EventBusService implements IEventBusService { private myObj: ItemSelectionWrapper; ... } Then in your controller that has itemSelected in its scope (let's assume Controller 1) you refer to the same variable: export class Controller1 { private eventBus : Components.IEventBusService; constructor(eventBus: Components.IEventBusService) { this.eventBus = eventBus; this.eventBus.myObj = this.eventBus.myObj || {}; this.eventBus.myObj.itemSelected = $scope.itemSelected; } } Now, since in Controller 2 you'll have the service injected, you'll watch the Service's variable: $scope.$watch(function(){ return busService.myObj,itemSelected; }, function (newValue) { //do what you need });
type: Answer
answers question: http://stackoverflow.com/q/27984129
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44362627
has comment: http://stackoverflow.com/comment/44371284
has comment: http://stackoverflow.com/comment/44378399
has comment: http://stackoverflow.com/comment/44362808
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/a/28000151
has comment: http://stackoverflow.com/comment/44390732
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/44390693
accepted answer of: http://stackoverflow.com/q/27999543
has comment: http://stackoverflow.com/comment/44397421
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27999543
has body: A good localization library should support this, generally you should be able to have several things to configure/pass: key, value, variables and more (pluralization, context, etc). The keys should be consistent across all the different language files, but the values can be whatever you want. Example Language files: en.js: {"Hello {name}, you have {points} points": "Hello {name}, you have {points} points"} {"HELLO_MSG": "Hello {name}, you have {points} points"} other-lang.js: {"Hello {name}, you have {points} points": "{points}, xxx, {name} yyyy yyy"} {"HELLO_MSG": "{points}, xxx, {name} yyyy yyy"} Then, in your code you should do something like this: en: var hello1 = translate("Hello {name}, you have {points} points", {name: "John", points: 3}; // Hello John, you have 3 points var hello2 = translate("HELLO_MSG", {name: "John", points: 3}; // Hello John, you have 3 points other-lang: var hello1 = translate("Hello {name}, you have {points} points", {name: "John", points: 3}; // 3, xxx, John yyyy yyy var hello2 = translate("HELLO_MSG", {name: "John", points: 3}; // 3, xxx, John yyyy yyy You can see a good example here: http://i18next.com/pages/doc_features.html#interpolation Hope this helps.
type: Answer

rest
tags question: http://stackoverflow.com/q/28013351
tags question: http://stackoverflow.com/q/28032615
tags question: http://stackoverflow.com/q/28012550
tags question: http://stackoverflow.com/q/28066373
tags question: http://stackoverflow.com/q/28091291
tags question: http://stackoverflow.com/q/28057137
tags question: http://stackoverflow.com/q/28045856
tags question: http://stackoverflow.com/q/28104514
tags question: http://stackoverflow.com/q/27973190
tags question: http://stackoverflow.com/q/28056083
tags question: http://stackoverflow.com/q/28026328
type: Tag
tags question: http://stackoverflow.com/q/27966775
tags question: http://stackoverflow.com/q/28028622
tags question: http://stackoverflow.com/q/28028719
tags question: http://stackoverflow.com/q/28097649
tags question: http://stackoverflow.com/q/27964471
tag name: rest
tags question: http://stackoverflow.com/q/27974647

http://stackoverflow.com/comment/44562296
comment on: http://stackoverflow.com/q/28092910
score: 0
type: QuestionComment
has text: if you stick an alert in the start of the window.openPdf function does it popup every time?
type: Comment

http://stackoverflow.com/comment/44370330
score: 0
comment on: http://stackoverflow.com/a/27981538
type: AnswerComment
type: Comment
has text: after enabling CORS on the backend server, it worked perfectly, thank you a lot.

http://stackoverflow.com/q/27984839
type: AnsweredQuestion
has title: Javascript not getting called from html button
has comment: http://stackoverflow.com/comment/44361207
has comment: http://stackoverflow.com/comment/44361134
has comment: http://stackoverflow.com/comment/44361302
type: Question
has answer: http://stackoverflow.com/a/27984907
answer count: 1
tagged with: button
tagged with: javascript
has comment: http://stackoverflow.com/comment/44361253
accepted answer: http://stackoverflow.com/a/27984907
has comment: http://stackoverflow.com/comment/44360978
tagged with: http://stackoverflow.com/tag/html
has body: I have the following html page with the button "NewPatients" that I am trying to set up to open up a modal with a form to fill out. I can't seem to get the modal to come up. The "openModal" function in the javascript doesn't seem to be getting called. cshtml file: @using PracticeApp.Controllers @{ ViewBag.Title = "Patients"; } @ViewBag.Title New Patient Delete Patient(s) close X Complete the form below to add a new patient: First Name* Last Name* Birthdate (mm/dd/yyyy)* Practice Name* SSN* This is the javascript file. PatientFormModal.js: var checkForm = function (e) { var dateRegEx = /^((0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])[- /.](19|20)?[0-9]{2})*$/; var form = (e.target) ? e.target : e.srcElement; var modal_init = function () { var wrapper = document.getElementById("content"); var window = document.getElementById("modal_window"); var openModal = function (e) { alert("Here"); wrapper.className = "overlay"; window.style.marginTop = (-modal_window.offsetHeight) / 2 + "px"; window.style.marginLeft = (-modal_window.offsetWidth) / 2 + "px"; e.preventDefault ? e.preventDefault() : e.returnValue = false; }; var closeModal = function (e) { wrapper.className = ""; e.preventDefault ? e.preventDefault() : e.returnValue = false; }; var clickHandler = function (e) { if (!e.target) e.target = e.srcElement; if (e.target.tagName == "DIV") { if (e.target.id != "modal_window") closeModal(e); } }; var keyHandler = function (e) { if (e.keyCode == 27) closeModal(e); }; if (document.addEventListener) { document.getElementById("NewPatient").addEventListener("click", openModal, false); document.getElementById("modal_close").addEventListener("click", closeModal, false); document.addEventListener("click", clickHandler, false); document.addEventListener("keydown", keyHandler, false); } else { document.getElementById("NewPatient").attachEvent("onclick", openModal); document.getElementById("modal_close").attachEvent("onclick", closeModal); document.attachEvent("onclick", clickHandler…
score: 0
has comment: http://stackoverflow.com/comment/44361331

http://stackoverflow.com/q/28117733
has comment: http://stackoverflow.com/comment/44609962
has comment: http://stackoverflow.com/comment/44609705
has comment: http://stackoverflow.com/comment/44609900
has answer: http://stackoverflow.com/a/28130518
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/28118351
has comment: http://stackoverflow.com/comment/44610893
tagged with: javascript
has comment: http://stackoverflow.com/comment/44613454
has comment: http://stackoverflow.com/comment/44609727
upvote count: 2
has comment: http://stackoverflow.com/comment/44609867
has comment: http://stackoverflow.com/comment/44613479
answer count: 2
tagged with: function
has comment: http://stackoverflow.com/comment/44610069
has comment: http://stackoverflow.com/comment/44610733
has comment: http://stackoverflow.com/comment/44613865
has comment: http://stackoverflow.com/comment/44610857
has comment: http://stackoverflow.com/comment/44611518
has title: How to pass function to client from Node.js server
favorite count: 0
has body: All: What I want to do is like: On Node server side: var fn = function(){ alert("hello"); } I want to send this function to client side(currently using AngularJS, but it does not matter as long as this problem can be solved), and bind it to a button click event. So I can get pop-out alert window when click that button. Thanks
has comment: http://stackoverflow.com/comment/44610060
has comment: http://stackoverflow.com/comment/44609835
has comment: http://stackoverflow.com/comment/44609840
has comment: http://stackoverflow.com/comment/44609585
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44611042
has comment: http://stackoverflow.com/comment/44612811
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44611208
has comment: http://stackoverflow.com/comment/44614171
has comment: http://stackoverflow.com/comment/44614605
has comment: http://stackoverflow.com/comment/44609799
has comment: http://stackoverflow.com/comment/44614059
tagged with: node.js
score: 2
has comment: http://stackoverflow.com/comment/44609940
has comment: http://stackoverflow.com/comment/44610079
downvote count: 0
has comment: http://stackoverflow.com/comment/44609620
has comment: http://stackoverflow.com/comment/44611040
has comment: http://stackoverflow.com/comment/44610240
has comment: http://stackoverflow.com/comment/44613918
has comment: http://stackoverflow.com/comment/44610087
has comment: http://stackoverflow.com/comment/44614088
has comment: http://stackoverflow.com/comment/44614203
has comment: http://stackoverflow.com/comment/44610287
has comment: http://stackoverflow.com/comment/44610034
has comment: http://stackoverflow.com/comment/44609631
has comment: http://stackoverflow.com/comment/44609839
type: Question
has comment: http://stackoverflow.com/comment/44617718

http://stackoverflow.com/comment/44370999
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27989885
has text: The .load() method was added on jquery version 1.0 so it should be available on your jquery 1.3.2. What errors are showing up with the `.get()` or the `.load()`

http://stackoverflow.com/comment/44547353
has text: Please don't write new code with jQuery 1.3. It is ancient and jQuery has changed a lot since then.
score: 0
comment on: http://stackoverflow.com/q/28080525
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28079983
accepted answer: http://stackoverflow.com/a/28080148
type: Question
upvote count: 0
score: -2
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Jquery attribute code to Javascript attribute code
favorite count: 0
has comment: http://stackoverflow.com/comment/44538718
has body: I have a scenario in my project where I should not use Jquery code(unfortunately). I am little good in writing jquery code but not javascript code. functionality: 1.I have few disabled controls on page with attribute clickdisabled=disable. 2. I am trying to set title to all elements with that attribute on a page(s). 3. when user clicks on disabled controls alert that controls title. 4. I am trying to make click on disabled controls Any help to make my java script code same as jquery code and make it working. Jquery code function DisableControlAction() { $('[clickdisabled=disable]').attr("title", "You are not authorized to perform this action."); $('[clickdisabled=disable]').removeAttr("disabled"); // to enable click for server controls $('[clickdisabled=disable]').click(function (e) { e.preventDefault(); alert($(this).attr("title")); return false; }); } Java script code I am trying function DisableControlAction() { document.getElementsByTagName('[clickdisabled=disable]').setAttribute("title", "You are not authorized to perform this action."); document.getElementsByTagName('[clickdisabled=disable]').removeAttribute("disabled"); document.getElementsByTagName('[clickdisabled=disable]').click(function (e) { e.preventDefault(); alert($(this).getAttribute("title")); return false; }); }
tagged with: attributes
has answer: http://stackoverflow.com/a/28080148
downvote count: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44538741

http://stackoverflow.com/comment/89201292
has text: Thanks. For my case, I set the width to `300` and height to `null` so it auto sizes the height.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/30541215
type: AnswerComment

http://stackoverflow.com/q/27986169
tagged with: jquery
score: 0
has title: JavaScript reset populated field in PHP/AJAX
answer count: 2
has body: I have some jQuery that uses AJAX and JSON to populate a UL tag with data. This is the jQuery code: $('#pSearch').on('click', function() { var partnername = $('#pNameSearch').val(); if($.trim(partnername) != '') { $.post('api/pNameSearch.php', {partnername: partnername}, function(data) { var obj = JSON.parse(data); $('#pName').empty(); var htmlToInsert = obj.map(function (item) { return ' ' + item.datestamp + ' - ' + item.comment + ' - ' + item.username + ' '; }).join(''); $('#pNames').html(htmlToInsert); }); }; }); The code above populates a UL field called pNames. It fills LI tags with parsed JSON data retrieved from a PHP script. What I need to do now is clear the pNames field. In the search window that prints the data, I have an HTML RESET button. Please note the TYPE in the input field, which I have set to 'reset', will clear out the FORM field, but it will not clear out the UL field that populated the data. Here is the JavaScript I attempted to use to clear out the field: $('#pReset').on('click', function () { document.getElementById('#pName').val(""); }); What can I try next?
has answer: http://stackoverflow.com/a/27986433
tagged with: reset
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27987425
has answer: http://stackoverflow.com/a/27987425
type: Question
accepted answer: http://stackoverflow.com/a/27986433
tagged with: javascript

http://stackoverflow.com/q/27975346
has comment: http://stackoverflow.com/comment/44343498
type: UnansweredQuestion
tagged with: css
type: Question
has title: How to trigger css animation on page scroll with flexible height?
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/53539430
has body: my design is using a height: 100%; for the top image - so is there any way to trigger a css3 animation like the one on the top image when the user scrolls down to another section of the page and not just on the page load? My design; if you scroll to the bottom (quality networks) and refresh the page you can see what i want, but I only want it to trigger when the user has scrolled down to that section http://www.webxury.net/datacenter/ I want to make the content below like this site when the user scrolls down the text/images fades in from the sides http://cloudfire.uk/ HTML &lt;div id="animated-example" class="animated fadeInDown"&gt;&lt;/div&gt; CSS .animated { -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-fill-mode: both; animation-fill-mode: both; } @-webkit-keyframes fadeInDown { 0% { opacity: 0; -webkit-transform: translateY(-20px); } 100% { opacity: 1; -webkit-transform: translateY(0); } } @keyframes fadeInDown { 0% { opacity: 0; transform: translateY(-20px); } 100% { opacity: 1; transform: translateY(0); } } .fadeInDown { -webkit-animation-name: fadeInDown; animation-name: fadeInDown; }
answer count: 0

http://stackoverflow.com/q/28096366
has comment: http://stackoverflow.com/comment/44569208
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44569809
has title: When is it okay to attach properties to window?
linked to: http://stackoverflow.com/q/4862193
answer count: 1
has answer: http://stackoverflow.com/a/28096461
has body: While browsing, I frequently take a look at the source code of webpage to check how certain things have been realized. One thing I frequently see is stuff like: window.myApp.apiKey = 12345; or window.myApp.welcomeMsg = "Hello there!"; I always was under the impression that it's bad practice to attach properties to the window object (like explained in this accepted answer), but it looks like myApp is used as a kind of namespace &amp; since it's often the brand name, it's unlikely to clash with anything. Still – how is it okay to do it this way, are there any indicators for that? (i.e. when I know no 3rd libraries will be used in the project, which can change quickly in real life).
has comment: http://stackoverflow.com/comment/44569942
has comment: http://stackoverflow.com/comment/44569625
accepted answer: http://stackoverflow.com/a/28096461
has comment: http://stackoverflow.com/comment/44568464
linked to: http://stackoverflow.com/q/12743007
has comment: http://stackoverflow.com/comment/44569158
has comment: http://stackoverflow.com/comment/44569511
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44569390
has comment: http://stackoverflow.com/comment/44570223
type: Question
has comment: http://stackoverflow.com/comment/44568632

http://stackoverflow.com/comment/44545429
score: 0
comment on: http://stackoverflow.com/q/28083385
type: Comment
type: QuestionComment
has text: can use Yahoo's YQL to get data

http://stackoverflow.com/q/28010677
has answer: http://stackoverflow.com/a/28010723
has comment: http://stackoverflow.com/comment/44408899
has comment: http://stackoverflow.com/comment/44409068
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/44409439
upvote count: 2
has title: Extract text outside HTML tag with jQuery
possible better answer: http://stackoverflow.com/a/28010877
has answer: http://stackoverflow.com/a/28010894
tagged with: regex
has answer: http://stackoverflow.com/a/28010877
answer count: 4
accepted answer: http://stackoverflow.com/a/28010723
type: AnsweredQuestion
has body: Lets say I have the following markup: My Link And More How can I extract only My Link with jQuery without the content of the ?
has comment: http://stackoverflow.com/comment/44412014
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44408988
has answer: http://stackoverflow.com/a/30591825
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/28056731
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28056242
type: Answer
accepted answer of: http://stackoverflow.com/q/28056242
has comment: http://stackoverflow.com/comment/44526374
has comment: http://stackoverflow.com/comment/44530414
upvote count: 1
has body: I don't see where mastermanager.js is required, but module.exports.db is set in your callback, which is probably executing long after mastermanager.js is required. Just guessing, but you might try moving the declaration of db until you're actually going to use it, like this: module.exports.getCollection = function( callback){ var db = mongoConnection.db; db.collection('masters', function(err, collection){ if(!err){ callback(null, collection); } else{ console.log("getcolelction error " + err); callback(err); } }); };
score: 1

http://stackoverflow.com/comment/44563363
has text: Agree for the class. Also, attribute selector *might* work as well `$('[id^="logo-"]')`.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28093533

http://stackoverflow.com/comment/44587805
score: 0
type: Comment
has text: Actually, I kind of feeling that I have problem in understanding of the variable resolving process in js.From object perspective OR closure perspective?Or more specifically, which way will happen in resolving process?
comment on: http://stackoverflow.com/a/28105970
type: AnswerComment

http://stackoverflow.com/q/28086870
favorite count: 0
type: Question
tagged with: android
tagged with: facebook
tagged with: http://stackoverflow.com/tag/html
has body: I am making a html5 responsive web page that have a facebook sharing functionnality. I already made this javascript code for FB.ui: &lt;script&gt; window.fbAsyncInit = function () { FB.init({appId: 'appid', status: true, cookie: true, xfbml: true}); }; (function () { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }()); &lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $('#fb-share-button').click(function (e) { e.preventDefault(); FB.ui( { method: 'feed', name: 'title', link: ' http://linkToShare.com', picture: 'http://helloImage.png', caption: 'Caption Best', description: 'Desc', message: '', display: 'touch' }); }); }); &lt;/script&gt; I want that the attribute "display" attribute get the value 'touch' if it is a mobile phone browser and get 'dialog' value if it is desktop browser. I tried to put it always 'dialog' but it has strange showing issues on Firefox on Android. Thank you;
accepted answer: http://stackoverflow.com/a/28326439
upvote count: 3
answer count: 1
tagged with: javascript
has title: FB.ui for both web and Mobile phone
has answer: http://stackoverflow.com/a/28326439
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/44332233
score: 0
comment on: http://stackoverflow.com/q/27969451
type: QuestionComment
type: Comment
has text: Hi,thank you for fast reply. I'm not very skilled could you please give me an example of that?

http://stackoverflow.com/comment/44381901
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27980706
has text: When I said that _"this is not possible in Haskell because one function can't return two results"_, I was referring to the `action` function, not the `seq` function. The `action(x)` returns either `x` or else `seq(x, y)` (wrapped in a superfluous function for laziness) depending upon whether or not you pass the argument `y`. It is not possible to implement the `action` function in Haskell because in Haskell functions when supplied with the same arguments must return the same results. It is possible to implement `seq` in Haskell (it is called `>>` in Haskell). `action` is a hack. Don't use it.

http://stackoverflow.com/a/69787999
has body: jquery-migrate-wrapper.js define(['jquery', 'jquery-migrate'], function ($) { // additional initialization logic can be added here $.UNSAFE_restoreLegacyHtmlPrefilter(); return $; }) require-config.js require.config({ ...otherConfigOptions, shim: { ...otherShimSettings, 'jquery-migrate':{deps: ['jquery']}, }, map: { // provides 'jquery-migrate-wrapper' for all (*) modules that require'jquery' '*': { 'jquery': 'jquery-migrate-wrapper' }, // but provides the original 'jquery' for 'jquery-migrate-wrapper' and // 'jquery-migrate' 'jquery-migrate-wrapper': { 'jquery': 'jquery' }, 'jquery-migrate': {'jquery': 'jquery'} } })
type: Answer
answers question: http://stackoverflow.com/q/27971479
score: 0

http://stackoverflow.com/comment/44447304
type: QuestionComment
has text: how many times do you need to search by id after the sort?
comment on: http://stackoverflow.com/q/28031145
type: Comment
score: 0

http://stackoverflow.com/a/28078067
type: Answer
answers question: http://stackoverflow.com/q/28076933
score: 0
has body: Because you've provided no specifics about the API or JSON file, an answer can't be made very specific either so here's a general concept. Use an async file access method in node.js, read the JSON file into memory and when it loads, parse it into a Javascript array. As soon as you start the async file read, then start your API call. When both async operations have finished (I personally would use Bluebird in nodejs to promisify both operations so they each returned a promise and would then use Promise.all() to know when both async operations were done. Then, get the employee.id from the API call and do a search for that id in the array of employees that came from the JSON file. If you only have to do this once, you can do a brute force search through the array (just looping through the array and comparing each object in the array to see if the id matches). Once you find the matching id in the array, you can then get the age and name from that same object and you should now have all the info you want. If this is a common operation, then you probably want to load the JSON file just once, save it persistently in your nodejs application and you may also want to create an index by id so you can just do a direct lookup on the id rather than having to do a brute force search each time. A brute force search of an array of objects for a particular .id property could look like this: function findEmployeeById(id) { for (var i = 0; i &lt; employeeData.length; i++) { if (employeeData[i].id === id) { return employeeData[i]; } } return null; }

http://stackoverflow.com/comment/44513823
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28066225
has text: check if it is giving any divided by 0 exception
score: 0

http://stackoverflow.com/q/28028525
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/44442174
answer count: 1
has body: I set up a site with a full-page filling background image (img/bg_start.jpg): http://test.coffeeshop.abcde.biz/cascara/ If you move the mouse above the animal in the center of the page the current image (img/bg_start.jpg) should be faded-out and an other picture (img/bg_start2.jpg) should be faded in. What I basically did is the following: Catching onMouseOver and -Out Event Executing in the case of onMouseOver: $('#mask2').css({height: $(window).height(),width: $(window).width()}).fadeIn(800, function(){ $('#mask1').fadeOut(800); }); And in the case of OnMouseOut I do basically the same just in an other order (mask2/mask1) mask1 and mask2 are defined like the following: &lt;div id="mask1" style="position: absolute; top: 0; left: 0; z-index:-1000; opacity: 1.0;"&gt; &lt;div id="mask2" style="position: absolute; top: 0; left: 0; z-index:-1000; opacity: 1.0; display:none"&gt; Unfortunately the effect is not smooth but it's flickering.. can anyone help me please?!
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28029644
tagged with: css
has title: css background-image fadeout and fadein
upvote count: 0
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44443173
tagged with: javascript

http://stackoverflow.com/q/27993742
has comment: http://stackoverflow.com/comment/44381526
type: Question
has body: I have a button to copy data from a user uploaded file to the clipboard in a specific format. I already have that data saved in the database as it was uploaded in a separate file form. I currently have it so that upon clicking the copy to clipboard button it is linked to a copy_data view in my views.py that requires an HTTP request which redirects to the current template containing the copy to clipboard button with something like this: HttpResponseRedirect('previous/template/here') This works fine except for the fact that since it links to my copy_data view which then redirects to the original view containing the button it reloads the entire page which is undesirable. I think a better solution would be to somehow bind a python function directly to the button click rather than worrying about redirecting from one view to another. I've found many examples using ajax, but haven't found any that work for my use case. I tried binding a click event to the button without any problems, but I am stuck on figuring out how to bind the python function with the click. How can I bind a python function in my Django template upon a button press?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44382920
has comment: http://stackoverflow.com/comment/44381264
has title: How to call a specific python function from within a Django template
has answer: http://stackoverflow.com/a/27994601
upvote count: 1
answer count: 1
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
tagged with: django
tagged with: python
linked to: http://stackoverflow.com/q/400212
downvote count: 0
score: 1

http://stackoverflow.com/a/28040093
answers question: http://stackoverflow.com/q/28039526
score: 0
type: Answer
has body: I'm not sure what you meant, basing on your code, you just wanted to add the class 'fadeInUp' to your divs. But try this maybe it will help. function fade(e){ $(e+":not(:visible):first").fadeIn(function(){ fade(e); }); } to use the function just pass the class 'c' as an argument: eg. fade('.c');

http://stackoverflow.com/a/28032914
has comment: http://stackoverflow.com/comment/44452796
has body: Best way of creating inherited classes is: function User(firstName, surName){ // Make assigment to properties. this.firstName = firstName; this.surName = surName; }; // Declare default properties values: User.prototype.firstName = '';//Set to empty string or whatever you need. User.prototype.surName = '';//Set to empty string or whatever you need. //Export functions to prototype. User.prototype.sayHi = function(){/* Some code */}; function AdminUser(firstName, surName){ //Call parent class constructor User.call(this, firstName, surName); //Add addition logic here. }; //Make prototype inheritance. AdminUser.prototype = Object.create(User.prototype); AdminUser.prototype.edit = function(){/* Some code */}; Now your AdminUser inherits from User class and you can make check: var au = new AdminUser('Name','SurName'); console.log(au instanceOf User); //true console.log(au instanceOf AdminUser); //true
upvote count: 1
has comment: http://stackoverflow.com/comment/44451334
score: 1
has comment: http://stackoverflow.com/comment/44452591
accepted answer of: http://stackoverflow.com/q/28032802
answers question: http://stackoverflow.com/q/28032802
has comment: http://stackoverflow.com/comment/44450831
has comment: http://stackoverflow.com/comment/44451169
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44450644
has comment: http://stackoverflow.com/comment/44450924
type: Answer
has comment: http://stackoverflow.com/comment/44452818

http://stackoverflow.com/comment/44577899
type: Comment
has text: are you talking about `value` attribute? if so #1) value attribute in pure html is only for specifying default, #2) just put ` ` and type in and see inspect you wont see an value or anything. it is the value property that gets updated not the attribute #3) When using angular you dont worry about DOM you only worry about ng-model and your view model bindings, let angular manage DOM however it needs to, isn't it the point of doing _angular way_.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/28096753

http://stackoverflow.com/comment/44411338
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28011936
has text: How would I go about checking them in the console?

http://stackoverflow.com/comment/44349746
has text: Still has to be * 3 ;)
comment on: http://stackoverflow.com/a/27964407
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/44517916
comment on: http://stackoverflow.com/a/28069025
score: 0
type: Comment
has text: but i have code behind functionality on both the form
type: AnswerComment

http://stackoverflow.com/comment/44575713
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28099714
has text: That was my first strategy. But I run the angular app standalone during development. If I define the global variable in the jsp, I then have to do a try-catch in angular to handle running it alone when that variable would not exist. That seemed too goofy, so I was wondering if there's a "right" way to accomplish this. But if not, I'll be reverting back to that strategy.
score: 0

http://stackoverflow.com/comment/44497296
type: Comment
type: QuestionComment
has text: Lovely! Another "question" that looks more like a job ad seeking for short-term contractors
comment on: http://stackoverflow.com/q/28057695
score: 2

http://stackoverflow.com/q/28103125
possible better answer: http://stackoverflow.com/a/62483446
answer count: 3
has title: Disable inertia scroll for "single-page" webapp
has answer: http://stackoverflow.com/a/28181319
has answer: http://stackoverflow.com/a/62483446
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/9651215
has comment: http://stackoverflow.com/comment/81035307
has answer: http://stackoverflow.com/a/28103182
tagged with: single-page-application
linked to: http://stackoverflow.com/q/14926366
tagged with: css
tagged with: macos
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28181319
has body: I'm trying to create a "single-page" web-app, in the same style as Gmail, Google Docs, Evernote, etc. where it doesn't make sense to allow inertia scroll to yank at the page. Here is a video of the effect I'm trying to disable: http://tinypic.com/r/2eb6fc5/8 How can we accomplish this? There are solutions listed in Disable elastic scrolling in Safari but they are old, don't work on OSX Chrome, while Gmail/Google Docs/Evernote clearly have a solution that works on all OSX browsers.
tagged with: scroll
upvote count: 7
type: Question
has comment: http://stackoverflow.com/comment/81124765
score: 7
tagged with: javascript
linked to: http://stackoverflow.com/q/8150191

http://stackoverflow.com/comment/44418382
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28014103
type: Comment
has text: This actually helped me with the texture, but still remain the main question, which is to position the camera in the middle of the box. I've put together other code and I think I'm almost there, so I'll update my question

http://stackoverflow.com/comment/44386188
score: 1
has text: You test the value *before* you try to convert it to a date object.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27998286

http://stackoverflow.com/q/28084436
tagged with: algorithm
has comment: http://stackoverflow.com/comment/44547020
tagged with: javascript
tagged with: http://stackoverflow.com/tag/c
has comment: http://stackoverflow.com/comment/44546695
has answer: http://stackoverflow.com/a/28085031
possible better answer: http://stackoverflow.com/a/28085309
has comment: http://stackoverflow.com/comment/44547063
answer count: 3
has answer: http://stackoverflow.com/a/28085309
has comment: http://stackoverflow.com/comment/44546953
downvote count: 0
has comment: http://stackoverflow.com/comment/44546746
has comment: http://stackoverflow.com/comment/44546928
has comment: http://stackoverflow.com/comment/44547006
favorite count: 0
has comment: http://stackoverflow.com/comment/44546960
has comment: http://stackoverflow.com/comment/44546996
has answer: http://stackoverflow.com/a/28084706
accepted answer: http://stackoverflow.com/a/28085031
has comment: http://stackoverflow.com/comment/44546845
has comment: http://stackoverflow.com/comment/44546918
has title: Algorithm for extracting a subarray out of an integer array, which contains the maximum summation
has comment: http://stackoverflow.com/comment/44547415
tagged with: c++
has comment: http://stackoverflow.com/comment/44546975
type: AnsweredQuestion
has body: There is an array of integers (both positive and negative). Please, advice an algorithm which will give you the subarray with maximum sum. Example: int a[] = new int[]{2,3,-1,4,5,7,8,13,-20}; then the answer should be {4,5,7,8,13} as 4 + 5 + 7 + 8 + 13 = 37. I am unable to design the algorithm for this problem.
score: 1
tagged with: java
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44547117

http://stackoverflow.com/q/28092447
tagged with: objective-j
tagged with: javascript
score: 0
has body: I just started developing with Cappuccino Framework and I wonder if it is possible to use native javascript code in Objective-J? I just tried to implement a simply alert(); in Objective-J code but it doesn't work at the browser... var label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; [label setStringValue:@"Hello World!"]; [label setFont:[CPFont boldSystemFontOfSize:24.0]]; alert("simple test");
answer count: 1
has title: Native JavaScript code in Objective-J
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28093554
accepted answer: http://stackoverflow.com/a/28093554
type: Question

http://stackoverflow.com/q/28110666
tagged with: angularjs
upvote count: 1
has title: Understanding the AngularJS $compile function
type: AnsweredQuestion
score: 1
has body: I try to build my menue with n sub menues with AngularJS. this is my scope: $scope.menu = [ {"type": "folder", "name": "TestFolder1", "subfolder": []}, {"type": "folder", "name": "TestFolder2", "subfolder": [ {"type": "folder", "name": "TestFolder2", "subfolder": [ {"type": "folder", "name": "TestFolder2", "subfolder": []}, {"type": "folder", "name": "TestFolder2", "subfolder": []} ]}, {"type": "folder", "name": "TestFolder2", "subfolder": []} ]}, {"type": "file", "name": "testfile"} ]; this is my directive codeApp.directive('item', ['$compile', function ($compile) { return { restrict: 'E', replace: true, scope: { item: '=' }, template: ' '+ '{{item.name}}'+ ' ', link: function($scope, $element) { if (angular.isArray($scope.item.subfolder) && $scope.item.subfolder.length > 0) { $element.append(' '); $compile($element.contents())($scope); } } }; }]); and my first line is this : The menu is created, but only the first level and I'm not sure how the compile function works. How can I achieve that the line is appended after the ?
has answer: http://stackoverflow.com/a/28111080
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/14430655
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/28111080

http://stackoverflow.com/comment/101546529
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28100048
has text: The question was "How to download whole page in .html format in node.js?" Seems like that's what that is doing. What is the difference between "view-source code" and "original html code"?

http://stackoverflow.com/q/28080125
has body: Hi please I'm new to javascript and ajax and i read that to convert javascript ( client-side)variable to php(server side) variable we have to pass by AJAX. Please can someone give the the same code using AJAX. Here I'm using bad method but i just post this code to show what is my goal which is : when the user select an id from select tag HTML i want that others information appears in inputs tags (type text) so that he can modify the information here is my source code: &lt;script type="text/javascript"&gt; document.getElementById('id').onchange = function(){ var identifiant = document.getElementById('id').value; &lt;?php $phpvar='"+identifiant+"'; $sql="select * from inscrits where id=".$phpvar; $res=mysql_query($sql) or die ('Unable to run query:'.mysql_error()); $ligne=mysql_fetch_array($res); ?&gt; //document.getElementById('nom').value ="&lt;?php echo $phpvar;?&gt;"; document.getElementById('nom').value = "&lt;?php echo $ligne['nom'] ?&gt;"; document.getElementById('prenom').value = "&lt;?php echo $ligne['prenom'] ?&gt;"; document.getElementById('profession').value = "&lt;?php echo $ligne['profession'] ?&gt;"; document.getElementById('etablissement').value = "&lt;?php echo $ligne['etablissement'] ?&gt;"; document.getElementById('telephone').value = "&lt;?php echo $ligne['telephone'] ?&gt;"; document.getElementById('email').value = "&lt;?php echo $ligne['email'] ?&gt;"; document.getElementById('acceptation').value = "&lt;?php echo $ligne['acceptation'] ?&gt;"; } &lt;/script&gt; Please appreciate my situation i'm new to javascript programming i just get started if it is possible to post me the code that i can use in same page.php thank you
has answer: http://stackoverflow.com/a/28080379
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44539018
type: Question
score: -2
tagged with: javascript
tagged with: jquery
tagged with: ajax
downvote count: 2
answer count: 1
accepted answer: http://stackoverflow.com/a/28080379
has title: How can i do the same function using Ajax
favorite count: 0
upvote count: 0
has comment: http://stackoverflow.com/comment/44538943

http://stackoverflow.com/a/28033125
has body: The value of your "hello" property on the prototype is a reference to an object. Each constructed instance will have access to that reference, but there's only one object involved. Thus, changes made to that object via one instance will be visible from all others. You can see this by adding console.log(testA.hello === testB.hello); // will log "true" If you want each instance to have it's own "hello" object, you'll have to assign the property in the constructor. var Test = function() { this.hello = { hum: null, ya: null }; };
type: Answer
has comment: http://stackoverflow.com/comment/44451263
answers question: http://stackoverflow.com/q/28033101
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44451773
score: 4
accepted answer of: http://stackoverflow.com/q/28033101

http://stackoverflow.com/comment/44538385
score: 0
has text: @charliefti there is one..i just trimmed it and uploaded the needed code.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28079806

http://stackoverflow.com/comment/44596352
score: 0
type: AnswerComment
type: Comment
has text: This is excellent Phillip, a very elegant solution indeed!! I appreciate your time and help.
comment on: http://stackoverflow.com/a/28111209

http://stackoverflow.com/comment/44363781
score: 1
comment on: http://stackoverflow.com/q/27986436
has text: There is no IO in that function, so I don't see any use of converting it to use callbacks/promises or so.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28081716
has body: Taken directly from highcharts documentation pages: To combine several chart types in one chart you only need to create series of different types: series: [{ type: 'column', name: 'Jane', data: [3, 2, 1, 3, 4] }, { type: 'column', name: 'John', data: [2, 3, 5, 7, 6] }, { type: 'column', name: 'Joe', data: [4, 3, 3, 9, 0] }, { type: 'spline', name: 'Average', data: [3, 2.67, 3, 6.33, 3.33] }] JSfiddle example.
has comment: http://stackoverflow.com/comment/44542001
type: Answer
has comment: http://stackoverflow.com/comment/44541931
answers question: http://stackoverflow.com/q/28081425
upvote count: 3
score: 3
downvote count: 0

http://stackoverflow.com/q/27972209
has body: I need a 'Page section' to stick in place for (x) amount of scrolling and then move onto the next section. I've tried putting them into the child theme but nothing... Can someone tell me a good way to do wthis that's not Javascript heavy? CSS .isSticky { top: 0; position: fixed; } HTML &lt;div&gt; &lt;section id="top"&gt;&lt;/section&gt; &lt;section id="test2"&gt;&lt;/section&gt; &lt;section id="bottom"&gt;&lt;/section&gt; &lt;/div&gt; JS $(document).ready(function () { var el = $('#test2'); var elTop = el.position().top; $(window).scroll(function () { var windowTop = $(window).scrollTop(); if (windowTop &gt;= elTop) { el.addClass('isSticky'); } else { el.removeClass('isSticky'); }
has comment: http://stackoverflow.com/comment/44337440
tagged with: wordpress
has answer: http://stackoverflow.com/a/27972290
type: Question
tagged with: javascript
tagged with: jquery
has title: Having a DIV 'stick' for x amount of scrolls
linked to: http://stackoverflow.com/q/15646747
score: 0
has comment: http://stackoverflow.com/comment/44337218
answer count: 1
has comment: http://stackoverflow.com/comment/44337550
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44337353
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/44356097
type: Comment
type: QuestionComment
has text: Please do not circumvent the quality filter. This is not your first question and [you have included code directly in the question before](http://stackoverflow.com/questions/27633120/website-with-scrollmagic-pins).
comment on: http://stackoverflow.com/q/27981873
score: 0

http://stackoverflow.com/comment/44387369
has text: Basically you want create a new site by just upload in js? It wont work because it will be accessible just by you. Even if you save in localStorage or something like this it's a very limited approach.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27990685

http://stackoverflow.com/comment/44388719
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27999731
has text: "You can use fieldset#navFieldset > input." ... or any of the other selectors that have already been shown to work.
type: Comment

http://stackoverflow.com/q/28076618
has title: Prototype: apply vs call, new vs create
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: prototype
type: Question
has answer: http://stackoverflow.com/a/28078152
accepted answer: http://stackoverflow.com/a/28078152
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have a constructor function which I want to use as prototype for another constructor. both receive arguments: function Proto(arg) {} function Sub(arg) {} What's a better way to pass the argument from Sub constructor to Proto constructor: Proto.apply(this, arg); Proto.call(this, arg); (pun unintended...) Second, when I want to actually set the prototype, what is the difference between: Sub.prototype = Object.create( Proto ); Sub.prototype = new Proto();
tagged with: constructor

http://stackoverflow.com/comment/44326759
has text: faint! Should ask you 2 days ago. Thank you so much!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27966824
type: Comment

http://stackoverflow.com/a/27976141
type: Answer
answers question: http://stackoverflow.com/q/27976096
has comment: http://stackoverflow.com/comment/44344738
has body: You are not delegating for window load event, you are invoking it, also your missing quotes around the id: window.onload = myFunction(document.getElementById(typeSelect)); Try wrapping it around: window.onload = function() { myFunction(document.getElementById('typeSelect')); //id in quotes }; EDIT You must take care of js file import, import must be first before invoking the function within: &lt;script src='your-script-file.js'&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; window.onload = function () { materialSelectionChange(document.getElementById('SquaresDropDownList')); }; &lt;/script&gt;
score: 4
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/44598105
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28107540
type: AnswerComment
has text: @brabertaser1992 I think I've run out of ideas unfortunately. One thing I would suggest is try to think of a different way of doing this. AngularJS has many ways of doing the same thing. Also, you may want to delete some of the comments on this page. Good luck and if I have any more thoughts I'll come back to this.

http://stackoverflow.com/comment/44492747
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28034092
has text: This sounds like a problem best resolved with a better data structure (i.e. storing the messages in an appropriate structure so there is no need to query by user, et al). See "Firechat":https://firechat.firebaseapp.com/ and "Firefeed":https://firefeed.io/ for examples.
type: Comment

http://stackoverflow.com/a/28059687
answers question: http://stackoverflow.com/q/28059574
has body: No you cannot. If I understand correctly, you want to detect if a user say for example goes to Yahoo! or Facebook (a site separate from your own) and if they decide to close that window, then do something or get some information out of it. Perhaps if the links are going to sites you own you could add some logic on those specific sites to send requests when they are being closed with an eventListener unload (although even this isn't 100% reliable) but if they are sites outside of your control, then there isn't much way for you to get that information. There would be some serious security issues if you could detect someone's interaction on other pages from your own site. A hacky alternative if say you were showing these sites in a modal is (I guess) you can show an iFrame in a modal of the site the user would be navigating to. This wouldn't be a new tab or even a new window in their browser -- rather this would be a modal you create in your site so you have total control. This wouldn't be just a simple window.open though and would require much more work on your end.
has comment: http://stackoverflow.com/comment/44529863
has comment: http://stackoverflow.com/comment/44516198
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/28059574

http://stackoverflow.com/comment/44552147
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28087205
has text: @RahulP: I don't know Java, but I guess it has a `split` function?
type: AnswerComment

http://stackoverflow.com/comment/44396018
has text: Done ;) i can just see the background color. I've also tried another image url, first with an manuell integratet facebook uid, that doesn't work, then i've tried it with just an simple image url, that works fine. Maybe you need to know that this "for" action is in a json request
comment on: http://stackoverflow.com/q/28003253
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44474455
has text: @MarkSmit: Yeah, I don't know all the ins and outs yet so I easily go back to pure Js/jQuery. But I was about to throw the whole factory thing out anyway. Thanks for your help.
type: Comment
comment on: http://stackoverflow.com/a/28028070
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44595926
type: AnswerComment
has text: Thanks! That was what I did, but didn't get it working, so starting doing a lot of funny things with the code. There must have been some syntax error somewhere else.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28110865

http://stackoverflow.com/comment/44488827
comment on: http://stackoverflow.com/a/28052560
has text: This is the one. Thanks! I knew it was something simple like this.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/28105627
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44586323
tagged with: angular-filters
tagged with: angularjs-ng-repeat
has body: I am trying to filter the data according to name and title but its not working. I have tried all the scenario but its not working. Please help me to find out the solution. I am getting all the data in list but unable to filter data according to name and title.Here is my json data so please help me to solve this problem thankyou in advance. { "0": { "data": { "_id": 0, "prefix": "Male", "firstname": "prem", "lastname": "Karn1", "phone": "23424242424", "email": "karnprem@cronj.com", "__v": 0, "zones": [ "0" ] }, "title": "Logistic Agent" } } by Name by Zone by Title All Zone Manager Logistic agent by Business Value First Name Last Name Title Telephone Email Address {{accDetails.data.firstname}} {{accDetails.data.lastname}} {{accDetails.title}} {{accDetails.data.phone}} {{accDetails.data.email}}</td Here is My Plnkr http://plnkr.co/edit/BGOPyQ7c3v5qNASk5Kg7?p=preview
tagged with: angularjs
upvote count: 2
has comment: http://stackoverflow.com/comment/44587053
has comment: http://stackoverflow.com/comment/44700183
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44702726
linked to: http://stackoverflow.com/q/28164921
score: 2
has comment: http://stackoverflow.com/comment/44585834
type: Question
has title: How to filter the data according to name and title in angularjs?
has answer: http://stackoverflow.com/a/28106039
downvote count: 0

http://stackoverflow.com/a/28053475
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/28053120
has body: I assume you block a site by injecting a content script at document_start and deciding there whether to block. A better approach would be to cancel the initial request entirely, and redirect it to your own error page. webRequest API can do that: chrome.webRequest.onBeforeRequest.addListener( function(details) { if(/* condition based on details */) { // The file might need to be in web_accessible_resources return {redirectUrl: chrome.runtime.getURL("my_error.html")}; } }, {urls: ["&lt;all_urls&gt;"], types: ["main_frame"]}, ["blocking"] ); Note: this will call your test code on every navigation request; this can potentially slow things down. If you have a specific list of sites, you may put them in the urls parameter of the filter to get better performance. You will need host permissions covering the sites you want to block (or "&lt;all_urls&gt;" if you potentially need all of them), "webRequest" and "webRequestBlocking".
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28053120

http://stackoverflow.com/comment/44604369
comment on: http://stackoverflow.com/a/28114198
score: 0
has text: Express doesn't explicitly support it, but some template engines support it themselves (not ejs though) and may look for the `layout` and other such view variables.
type: AnswerComment
type: Comment

laravel
tags question: http://stackoverflow.com/q/28018844
tags question: http://stackoverflow.com/q/28104966
tags question: http://stackoverflow.com/q/28038168
tags question: http://stackoverflow.com/q/27969700
tags question: http://stackoverflow.com/q/28092646
tags question: http://stackoverflow.com/q/28052810
tag name: laravel
tags question: http://stackoverflow.com/q/27983740
tags question: http://stackoverflow.com/q/28100537
tags question: http://stackoverflow.com/q/28035714
tags question: http://stackoverflow.com/q/28028226
type: Tag

http://stackoverflow.com/a/28036783
has body: The problem isn't with Lo-Dash; your problem is with your conditional within your callback function. This: return fruit === 'Apple' || 'Banana' || 'Orange'; Is not correct. You need to actually compare fruit with each string: return fruit === 'Apple' || fruit === 'Banana' || fruit === 'Orange'; Or, you can use another Lo-Dash function to make it a little more compact: _.remove(fruits, function (fruit) { return _.contains(['Apple', 'Banana', 'Orange'], fruit); }) Note: In the latest versions of Lo-Dash the _.contains function is deprecated. Please use _.includes
type: Answer
answers question: http://stackoverflow.com/q/28036716
score: 10
upvote count: 10
downvote count: 0

http://stackoverflow.com/q/28120585
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44615480
has comment: http://stackoverflow.com/comment/44616374
tagged with: css
has answer: http://stackoverflow.com/a/37489307
score: 1
has comment: http://stackoverflow.com/comment/44617006
upvote count: 1
tagged with: nodes
type: Question
has comment: http://stackoverflow.com/comment/44615471
tagged with: javascript
answer count: 1
has title: How to preserve white space in a textnode?
downvote count: 0
has body: I am intercepting a paste event and cleaning any html off of it using textNodes. It works great, other than the fact that it reduces all whitespace to a single space, and disregards new lines completely. For example if a user were to paste "hello world !" then it would paste as "hello world !" How can I keep the white space and new lines? Any javascript, jquery, or css tricks would be great. Here is my code: iframe.contentWindow.focus() var sel, range; if (iframe.contentWindow.getSelection) { sel = iframe.contentWindow.getSelection(); if (sel.getRangeAt &amp;&amp; sel.rangeCount) { range = sel.getRangeAt(0); range.deleteContents();} text = window.clipboardData.getData("Text"); frag = iframe.contentDocument.createTextNode(text); range.insertNode(frag);
tagged with: jquery

http://stackoverflow.com/comment/44360406
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27982830
score: 0
has text: You cannot add click action on object that doesnt exist. You could try using [.live(...)](http://api.jquery.com/live/) for objekt2 or [on(...)](http://api.jquery.com/on/). See the documentation. You could also append click function to objekt2 in first if, after objekt2 is created. You defenately gona have to update your function for removeing your div.

http://stackoverflow.com/comment/44528455
comment on: http://stackoverflow.com/q/28074583
score: 3
has text: Could you post the code for the modal window #registerModal? Thanks
type: QuestionComment
type: Comment

placeholder
tags question: http://stackoverflow.com/q/28083733
tag name: placeholder
tags question: http://stackoverflow.com/q/28014217
type: Tag
tags question: http://stackoverflow.com/q/28078413
tags question: http://stackoverflow.com/q/28069585
tags question: http://stackoverflow.com/q/28085698

http://stackoverflow.com/a/28066644
answers question: http://stackoverflow.com/q/28063366
has body: As you mentioned, you had to give your list some size by adding height and width but also your store won't have loaded in the list due to your reference of an xtype rather than an instance of that xtype. http://docs-origin.sencha.com/touch/2.4/2.4.1-apidocs/#!/api/Ext.dataview.List-cfg-store So your Main view should look like this: Ext.define('MyApp.view.Main', { extend: 'Ext.Container', xtype: 'main', renderTo: Ext.getBody(), requires: ['Ext.TitleBar'], config: { fullscreen: true, items: [{ xtype: 'titlebar', title: 'Employe Information', items: [{ xtype: 'button', ui: 'back', text: 'back' }] }, { xtype: 'emp_list', store: Ext.create('MyApp.store.Employee'), }] } }); and your EmpList like this: Ext.define('MyApp.view.EmpList', { extend: 'Ext.List', xtype: 'emp_list', config: { width: '100%', height: '100%', itemTpl: Ext.XTemplate('&lt;span&gt;{firstname}&lt;/span&gt;') } }); Demo: https://fiddle.sencha.com/#fiddle/gqr
has comment: http://stackoverflow.com/comment/44515697
type: Answer
score: 0

http://stackoverflow.com/a/28061295
upvote count: 2
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/28061199
has body: Seems like you want something like this, ^\d+(?:\.\d+)?(?:,\d+(?:\.\d+)?)*$ DEMO OR ^(?!.*(,,|,\.|\.,|\.\.))[\d.,]+$ Negative lookahead at the start asserts that the sting won't contain consecutive commas or dots or dots and commas. DEMO

http://stackoverflow.com/q/28099721
has answer: http://stackoverflow.com/a/28099787
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/28099753
has title: Why is my function returning undefined along with the reversed string
tagged with: javascript
answer count: 3
upvote count: 0
has comment: http://stackoverflow.com/comment/44575201
has comment: http://stackoverflow.com/comment/44575218
favorite count: 0
has answer: http://stackoverflow.com/a/28099753
possible better answer: http://stackoverflow.com/a/28099754
score: -1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28099754
has body: Why is my function returning undefined along with the reversed string function revString(str) { var a,c; a=str.length-1; while(a&gt;=0) { c = c + str[a]; a--; } return c; } console.log(revString("Google")); I am not sure on where it is breaking. I know there are lots of answers to the same question, but i just want to understand the mistake happening here. Below is the fiddle http://jsfiddle.net/c94fq78v/2/

http://stackoverflow.com/comment/44363480
score: 1
type: QuestionComment
has text: What do you mean by time?...you're showing dates. And what does the 21 mean?
type: Comment
comment on: http://stackoverflow.com/q/27986289

http://stackoverflow.com/q/28008393
tagged with: https
type: Question
has body: I need to make a crawler. For http request i used to do this. var http=require('http'); var options={ host:'http://www.example.com', path:'/foo/example' }; callback=function(response){ var str=''; response.on('data',function(chunk){ str+=chunk; }); response.on('end', function () { console.log(str); }); } http.request(options, callback).end(); but I have to make a crawler for https://example.com/foo/example If I am using the same for https://example.com/foo/example it is giving this error events.js:72 throw er; // Unhandled 'error' event ^ Error: getaddrinfo ENOTFOUND at errnoException (dns.js:37:11) at Object.onanswer [as oncomplete] (dns.js:124:16)
has comment: http://stackoverflow.com/comment/44404765
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/28008443
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
has title: How to make a https request in node.js
accepted answer: http://stackoverflow.com/a/28008443
upvote count: 1

http://stackoverflow.com/comment/44481324
type: Comment
has text: Really appreciate your help @MattBurland, hmm I kinda believe this would become a bottle neck in the future though
comment on: http://stackoverflow.com/a/28049538
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44583391
type: Comment
has text: If you see plunker there is two directive, in second directive when you open and try to type in search box it will not filter same as first directive but if you referene 1.0.0-beta.1. It will start working
type: QuestionComment
comment on: http://stackoverflow.com/q/28103165
score: 0

http://stackoverflow.com/comment/44460508
type: Comment
comment on: http://stackoverflow.com/a/28038003
has text: @ok sir I will try my own
score: 0
type: AnswerComment

http://stackoverflow.com/a/27973397
score: 1
answers question: http://stackoverflow.com/q/27972990
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27972990
has body: I have removed the 'display' styles from the CSS, leaving that up to jQuery, and it seems to have fixed the issues you have. http://jsfiddle.net/u7ttx2dd/6/ main .entry { overflow: hidden; display: inline; float: left; width: 33.33333125%; padding: 0 8px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; margin-bottom: 20px; } main .entry img { display: block; max-width: 100%; height: 180px; } main .entry a { color: #fff; text-decoration: none } main .entry .container { position: relative } main .entry .container.selected .hover { } main .entry .title { color: #fff; text-decoration: none; font-size: 18px; padding: 15px; background: #000; } main .entry .hover { background: #000; color: #fff; width: 100%; height: 100%; position: absolute; left: 0; bottom: -1000px; padding: 20px 20px 20px 20px; } main .entry .hover .title { padding: 0; background: none; width: 80%; margin-bottom: 30px; } main .entry .hover .moresmall:hover { background-color: #2f3035 }
type: Answer
has comment: http://stackoverflow.com/comment/44339736
downvote count: 0

http://stackoverflow.com/comment/45242157
has text: Leave a comment when you down-vote. This is a perfectly valid solution. OP obviously does not understand that CSS classes can be combined.
comment on: http://stackoverflow.com/a/27990759
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/28951582
type: Answer
answers question: http://stackoverflow.com/q/27973316
score: 0
has body: Finaly I cookies. I create a cookie from my mvc action method and need to read from my angular controller.

http://stackoverflow.com/comment/44492356
type: Comment
has text: http://blog.slaks.net/2015-01-04/async-method-patterns/
score: 2
comment on: http://stackoverflow.com/q/28055288
type: QuestionComment

http://stackoverflow.com/a/30765875
has body: Looks like @Mike had it close there. A few quick changes generated a decent looking file and brought up a print pop-up. 1 - Give the area that you want to print an ID of 'printArea' 2 - Add the $window service $scope.printIt = function(){ var table = document.getElementById('printArea').innerHTML; var myWindow = $window.open('', '', 'width=800, height=600'); myWindow.document.write(table); myWindow.print(); };
upvote count: 5
type: Answer
downvote count: 0
score: 5
answers question: http://stackoverflow.com/q/28072351
has comment: http://stackoverflow.com/comment/49851399

http://stackoverflow.com/a/28008323
type: Answer
has body: A bit hacky , but it can help you to find what is your object source : function Foo() {} var toClass = function(a) { var _name = a.constructor.toString().match(/^function (\w+)/i); //\w probably should be enhanced console.log(_name[1]) } toClass( new Foo()) //Foo toClass( [1, 2]) //Array toClass( new Date()) //Date toClass( {"a":2}) //Object Aside note : don't override toString just for debugging. toString has its purpose. and should be used as it was meant to be used.
score: 0
answers question: http://stackoverflow.com/q/28008156

http://stackoverflow.com/q/28075128
favorite count: 0
has answer: http://stackoverflow.com/a/28075282
accepted answer: http://stackoverflow.com/a/28075282
tagged with: node.js
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has body: I have a HTML form with a post method, and a post route app.post('/', c_emailController.create, c_bookingController.create ); When i press submit, i need send a email to me and to the client [emailController], and save the data in my bookings collection [bookingController], but sometimes, when i press the submit, this error appears: Can't set headers after they are sent The most strange part is: is not everytime, sometimes happens, sometimes don't. Can you check out my controllers code and see if there is a problem? I believe this is a problem with the next();. JS FIDDLE -> http://jsfiddle.net/a6s7npcg/ OBS: The code is working when the error not occurs
has title: Node.js Error: Can't set headers after they are sent, appears sometimes
downvote count: 0
tagged with: javascript
tagged with: express
answer count: 1

http://stackoverflow.com/comment/44384616
comment on: http://stackoverflow.com/q/27997373
score: 0
has text: You may use momentjs for data formatting: http://momentjs.com/
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44603598
score: 0
comment on: http://stackoverflow.com/q/28102932
type: Comment
type: QuestionComment
has text: Here is the answer http://stackoverflow.com/questions/6400343/jquery-binding-events-to-dynamically-loaded-html-elements

http://stackoverflow.com/comment/45986877
type: Comment
comment on: http://stackoverflow.com/a/27966043
has text: @user2700047 ... You cannot go up in security ... so you cannot jump from http to https ... so if they only use http does it work if you yourself start from http so the download would go from http to http whilst using the above src="//someurl trick
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44429650
has text: @Sadikhasan Answered. pls check
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28019465

http://stackoverflow.com/comment/44374476
type: Comment
type: QuestionComment
has text: then you have to use result[0].data to access the first element of result
comment on: http://stackoverflow.com/q/27991776
score: 0

http://stackoverflow.com/a/27975888
has comment: http://stackoverflow.com/comment/44421536
has comment: http://stackoverflow.com/comment/44379778
type: Answer
answers question: http://stackoverflow.com/q/27975041
has comment: http://stackoverflow.com/comment/44529404
has comment: http://stackoverflow.com/comment/44400157
has comment: http://stackoverflow.com/comment/44378495
has comment: http://stackoverflow.com/comment/44535866
score: 0
has body: You have to create a raycaster. (r69) mouse_vector = new THREE.Vector3(), mouse = { x: 0, y: 0, z: 1 }; var vector = new THREE.Vector3(); var raycaster = new THREE.Raycaster(); var dir = new THREE.Vector3(); function onMouseDown( event_info ) { event_info.preventDefault(); mouse.x = ( event_info.clientX / window.innerWidth ) * 2 - 1; mouse.y = - ( event_info.clientY / window.innerHeight ) * 2 + 1; mouse_vector.set( mouse.x, mouse.y, mouse.z ); mouse_vector.unproject(camera); var direction = mouse_vector.sub( camera.position ).normalize(); ray = new THREE.Raycaster( camera.position, direction ); ray.set( camera.position, direction ); intersects = ray.intersectObjects(scene.children, true); if( intersects.length ) { intersects.forEach(function(clicked) { // Your stuff like if (clicked.object.typ == 'yourObject') { //Event on click.. } }); } }
has comment: http://stackoverflow.com/comment/44391694
has comment: http://stackoverflow.com/comment/44402744

http://stackoverflow.com/q/28002574
has title: Internet Explorer 8 delay between pressing the button
upvote count: 1
has answer: http://stackoverflow.com/a/28003032
has body: Need to quickly press a button to +1 to the value. 1 When I click on the button very quickly, there is a delay. For example, a button has been pressed ten times, but value is 6. In other browsers everything works correctly.
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44394684
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/44394035
score: 1
has comment: http://stackoverflow.com/comment/44394976
has comment: http://stackoverflow.com/comment/44394030
possible better answer: http://stackoverflow.com/a/28003032
accepted answer: http://stackoverflow.com/a/28004356
type: Question
tagged with: internet-explorer
tagged with: internet-explorer-8
tagged with: javascript
has answer: http://stackoverflow.com/a/28004356
linked to: http://stackoverflow.com/q/7452237
answer count: 2

http://stackoverflow.com/comment/44538713
type: QuestionComment
comment on: http://stackoverflow.com/q/28076755
score: 0
has text: understand that part, but not hard to get inside an iframe using script so not really clear where the problems lie.
type: Comment

http://stackoverflow.com/q/28016196
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/28017003
accepted answer: http://stackoverflow.com/a/28017003
tagged with: http://stackoverflow.com/tag/html
has title: Why isn't is the drop down menu working
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/44419905
score: -3
tagged with: css
downvote count: 4
type: AnsweredQuestion
has body: I wanted to know why isn't the drop down menu working. When I click on the drop down menu it does not appear. I am using bootstrap. Please tell me why it isn't working. Categories
has comment: http://stackoverflow.com/comment/44419684
has comment: http://stackoverflow.com/comment/44419702

http://stackoverflow.com/comment/44585332
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28105403
type: Comment
has text: Why are you binding event handler inside event handler?

http://stackoverflow.com/comment/62476972
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/37487480
has text: Love the detailed answer!

http://stackoverflow.com/q/28065285
has title: Insert html code after element
favorite count: 0
has answer: http://stackoverflow.com/a/28065483
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28065467
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28065634
accepted answer: http://stackoverflow.com/a/28065634
has body: I have a html document which looks like this: ...html code... ...html code... Using javascript I want to insert the html code below inside the document, immediately after : Some text So far I have this, but not the expected results. Please, what am I doing wrong? var para1 = document.createElement("li"); var para2 = document.createElement("span"); var node = document.createTextNode("Some text"); para2.appendChild(node); var para3 = document.createElement("ul"); var element = document.getElementById("my_ul"); element.appendChild(para1); element.appendChild(para2); element.appendChild(para3);
has answer: http://stackoverflow.com/a/28065469
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/28065507
tagged with: javascript
answer count: 6
score: -1
has answer: http://stackoverflow.com/a/28065507
has comment: http://stackoverflow.com/comment/44510789
upvote count: 0
has answer: http://stackoverflow.com/a/28065559

http://stackoverflow.com/q/27966775
tagged with: security
answer count: 2
has answer: http://stackoverflow.com/a/27979152
possible better answer: http://stackoverflow.com/a/27968567
has answer: http://stackoverflow.com/a/27968567
downvote count: 0
has title: Where to store refresh_token for SPA/REST app with third-party OAuth2 service?
accepted answer: http://stackoverflow.com/a/27979152
favorite count: 0
tagged with: oauth
tagged with: rest
score: 2
type: AnsweredQuestion
upvote count: 2
has body: I have an client (SPA)/server (REST) application and I need to authenticate clients and keep them logged in in the resource server. The application in general has to use external OAuth2 service located on third-party authorization server. Now the question: where refresh_token should be stored? I have two ideas. I intentionally omit the case when refresh_token expires. Assumptions Valid token is always returned in response to the request to any secured resource and the login request. All communication with the authorization server must go through the resource server since client_id and client_secret are required. First Scenario Server stores refresh_token mapped by token and sends the token to the client with response to login request. Client makes a request with a token. Server checks if the token is valid. If not it uses the refresh_token associated with the token to generate a new one. Now for one minute (or any configured duration) old token is mapped to the new token and the new token is mapped to refresh_token to handle enqueued requests with the old token. Client makes a request with a token. Server checks if the token is valid. If not it checks if token is mapped to the new one. If so it behaves like request was send with the new token (see step 3). It sends 401 otherwise. Second Scenario Server sends the token and the refresh_token to the client with response to login request. Client makes a request with a token. Server checks if the token is valid. If not it responds with 401. If client consumes response with 401 status it tries to refresh the token and makes the same request with the new token. I'm aware that both of these solutions has their weaknesses. Is there any good practice applicable to this problem?
type: Question
tagged with: javascript

http://stackoverflow.com/comment/44462036
type: QuestionComment
comment on: http://stackoverflow.com/q/28038929
has text: @andrusieczko - they are already doing it in the onload handler from the ` ` tag.
score: 0
type: Comment

http://stackoverflow.com/a/27975975
has comment: http://stackoverflow.com/comment/44344569
type: Answer
has body: Javascript tends to be very callback oriented, since by default all the Javascript on a page runs in a single thread, which means that the UI isn't responsive while other code is busy running. So rather than looping in a function and looking for input on each loop, you likely want to register a callback function which will be called when your input element experiences a change -- for example, the onchange listener will run your callback whenever the value of the element changes. You could unregister this callback 5 seconds later to stop anything from happening if the user inputs something after the 5 seconds are up. Sparse example (referencing http://www.w3schools.com/jsref/event_onchange.asp): // Set a function to be called when the value of the input element changes. object.onchange = function() { valueAfterChange = document.getElementById("input").value; // Do something with valueAfterChange. } // window.setInterval calls a function after a set delay. window.setInterval(function() { object.onchange = null; // Anything else you might want to do after 5 seconds. }, 5000); // Call this function after 5000 milliseconds == 5 seconds.
answers question: http://stackoverflow.com/q/27975841
score: 0
has comment: http://stackoverflow.com/comment/44375731

http://stackoverflow.com/comment/44382590
has text: why u are using the POST method, if you want GET the data, and not pass?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27995990
type: Comment

http://stackoverflow.com/comment/44399441
comment on: http://stackoverflow.com/q/28005496
has text: I think you just answered your own question...
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44517199
comment on: http://stackoverflow.com/a/28068568
score: 0
type: AnswerComment
type: Comment
has text: @AndreCalenta, beyond what I've answered I'm afraid I have no idea what your code is meant to do, or what the current problem is. Sorry.

http://stackoverflow.com/q/27976191
has answer: http://stackoverflow.com/a/27977293
accepted answer: http://stackoverflow.com/a/27981229
linked to: http://stackoverflow.com/q/20002481
type: AnsweredQuestion
tagged with: angularjs-ng-show
possible better answer: http://stackoverflow.com/a/27977293
score: 0
type: Question
has body: I have a dictionary like this: var data = { a: [1, 2, 3, 4, 5], b: [ [1, 2], [3, 4], [5, 6] ] }; Now I need to use ng-hide to hide an element if 2 exists in data->a. It would be done easily like this: 2 not found Now how I can do it with data->b? I need to hide the message if 2 is found in any of data->b items. I found How do I only show an element if nested ng-repeat is not empty?. But I need to show to message only once.
answer count: 2
has comment: http://stackoverflow.com/comment/44344837
tagged with: javascript
has answer: http://stackoverflow.com/a/27981229
has title: AngularJS ng-hide in nested dictionary
tagged with: angularjs-filter
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/44345461
has comment: http://stackoverflow.com/comment/44344860
tagged with: angularjs

http://stackoverflow.com/a/27973096
type: Answer
upvote count: 2
has body: You can store the argument for css() as a variable, and then add the property to it: var propertyName = 'margin-top'; var cssArg = {}; cssArg[propertyName] = '10px'; $('elem').css(cssArg); Edit: In the future (ES6) you'll be able to do that in one line using computed properies: $('elem').css({ [propertyName] : '10px'}); But for now, you have to stick with the long way.
answers question: http://stackoverflow.com/q/27973042
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27973042

http://stackoverflow.com/comment/44325515
comment on: http://stackoverflow.com/a/27966356
type: AnswerComment
score: 0
type: Comment
has text: Hi, I should have stated in the original question I had already noticed this error in the DevTools and fixed that problem, the problem isn't actually anything to do with smooth scroll because I removed the scrolling aspect of this menu. Also the JS is in the wrong order in the prototype and the mobile version of the menu works in that. I have now updated the JS order and it gives a new error: Uncaught Error: The nav element you are trying to select doesn't exist

http://stackoverflow.com/q/28007514
favorite count: 0
has comment: http://stackoverflow.com/comment/44403526
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28007761
score: 3
upvote count: 3
tagged with: stream
has comment: http://stackoverflow.com/comment/44403342
type: Question
has title: Piping stream to a variable!? or ....?
has comment: http://stackoverflow.com/comment/44403430
has body: What are my options to pipe stream to a variable? Based on this documentation the examples of writable stream include: http requests, on the client http responses, on the server fs write streams zlib streams crypto streams tcp sockets child process stdin process.stdout, process.stderr So does it mean I cannot pipe stream to a variable to process it? In fact I dont want to save the stream on my disk, so what is the best way to pipe all of the streams and use that data? Thanks please let me know if you need more clarification!
tagged with: javascript
has comment: http://stackoverflow.com/comment/44403539
accepted answer: http://stackoverflow.com/a/28007761
tagged with: express
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/44608399
comment on: http://stackoverflow.com/a/28112325
type: AnswerComment
type: Comment
has text: Just to follow up, I have confirmed the pagecontainerbeforechange event does not fire until after the native iOS slide has completed, which is causing the flicker between old and new pages. Not sure if there's any way around that. Hoping I don't have to turn off ajax completely.
score: 1

http://stackoverflow.com/q/28117099
linked to: http://stackoverflow.com/q/28096039
has comment: http://stackoverflow.com/comment/44608579
has comment: http://stackoverflow.com/comment/44608959
has answer: http://stackoverflow.com/a/28136431
tagged with: css
has comment: http://stackoverflow.com/comment/44608813
has comment: http://stackoverflow.com/comment/44609486
has title: Get the first Element that is floating on next line
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28117417
score: 1
has answer: http://stackoverflow.com/a/28117417
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44608764
answer count: 2
accepted answer: http://stackoverflow.com/a/28136431
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have a list of Elements that are floating left: One Two Three ... ...having a window width of 200px the first Element that is floating on the second line would be #three... having a window width of just 100px that would be #two. Now on every there is a click-event bound, that should tell me which Element is the first Element on the next Line, seen by itself. Clicking on #one with a window width of 200px I want to get #three, and with a window width of 100px I want to get #two. I tried to solve this by getting the position of the Element that is clicked on, query the Position inside the window using .getBoundingClientRect(), get the height of the Element (taking 20px here), and then get the Element by using document.elementFromPoint(y,x)...something like this: y = clicked_element.getBoundingClientRect().left x = clicked_element.getBoundingClientRect().top + 21 first_element_on_next_line = document.elementFromPoint(y,x) so far, so good... but of course this is just working if the first element on the next line is really inside the window! :-\ and this is where I'm stuck...if I have a window width of 200px and a window height of just 20px (just for the example), I just can't select #three with document.elementFromPoint() because its position is outside the window. I could also use jQuery, it's included anyways, but everything came across was using document.elementFromPoint() Any Ideas??
has comment: http://stackoverflow.com/comment/44609276
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44608884
favorite count: 0

http://stackoverflow.com/q/28102085
linked to: http://stackoverflow.com/q/12109042
has title: Automatically list specific files in a directory and show them on a page
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28102159
has comment: http://stackoverflow.com/comment/44579537
has comment: http://stackoverflow.com/comment/44579516
type: Question
has answer: http://stackoverflow.com/a/28102159
tagged with: javascript
favorite count: 0
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I created a web MP3 player, It works fine, it's just that I have to edit my script every time I add new songs on my webserver. I want the list to update automatically as I add more songs. My script basically looks like this: Music 1 Music 2 Music 3 Music 4 My music files are all located at /www/usb I tried something like this: <?php ............... echo ' '; exec('find /www/usb/ -name "*.mp3"',$list); $x=0; while($x<count($list)){ if($list[$x]==$h[0]){ echo ' $list[$x] '; $x++; } } echo ' '; ?> But it gives me the following error: Fatal error: Maximum execution time of 30 seconds exceeded in /www/test2.php on line 64 My complete script: <?php echo ' '; exec('find /www/usb/ -name "*.mp3"',$list); $x=0; while($x<count($list)){ if($list[$x]==$h[0]){ echo ' $list[$x] '; $x++; } } echo ' '; ?> How do I solve that? Please note that I also want to be able to search in sub directories. Thank you. UPDATE 1 I tried @RhapX suggestion but instead the shown result is like this, and whenever I click the music1.mp3 or music2.mp3, it doesn't play because the url goes to http://192.168.1.1/music1.mp3 and http://192.168.1.1/music2.mp3 where the actual location is at http://192.168.1.1/usb/music1.mp3
has comment: http://stackoverflow.com/comment/44579561
upvote count: 1
tagged with: php
downvote count: 1

twitter-bootstrap
tags question: http://stackoverflow.com/q/28044124
tags question: http://stackoverflow.com/q/28090630
tags question: http://stackoverflow.com/q/28018826
tags question: http://stackoverflow.com/q/28103277
tags question: http://stackoverflow.com/q/27964285
tags question: http://stackoverflow.com/q/27982946
tags question: http://stackoverflow.com/q/27991029
tags question: http://stackoverflow.com/q/27978835
tags question: http://stackoverflow.com/q/27997837
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/27964176
tags question: http://stackoverflow.com/q/28007142
tags question: http://stackoverflow.com/q/28006146
tags question: http://stackoverflow.com/q/28044743
tags question: http://stackoverflow.com/q/27981673
tags question: http://stackoverflow.com/q/28057933
tags question: http://stackoverflow.com/q/27970247
tags question: http://stackoverflow.com/q/28008669
tags question: http://stackoverflow.com/q/28016196
tags question: http://stackoverflow.com/q/28057603
tags question: http://stackoverflow.com/q/28079721
tags question: http://stackoverflow.com/q/28031290
tags question: http://stackoverflow.com/q/28114769
tags question: http://stackoverflow.com/q/28107126
tags question: http://stackoverflow.com/q/28079345
tags question: http://stackoverflow.com/q/28072287
tags question: http://stackoverflow.com/q/27999537
tags question: http://stackoverflow.com/q/27992550
tags question: http://stackoverflow.com/q/28113036
tags question: http://stackoverflow.com/q/27983514
tags question: http://stackoverflow.com/q/28015361
tags question: http://stackoverflow.com/q/28007637
tags question: http://stackoverflow.com/q/28106251
tags question: http://stackoverflow.com/q/28038412
tags question: http://stackoverflow.com/q/27988222
tags question: http://stackoverflow.com/q/28110782
tags question: http://stackoverflow.com/q/28114328
tags question: http://stackoverflow.com/q/28034531
tags question: http://stackoverflow.com/q/27973549
tags question: http://stackoverflow.com/q/28108041
tags question: http://stackoverflow.com/q/28028857
tags question: http://stackoverflow.com/q/28102909
tags question: http://stackoverflow.com/q/28069463
tags question: http://stackoverflow.com/q/28055755
tags question: http://stackoverflow.com/q/28098152
tags question: http://stackoverflow.com/q/27999054
tags question: http://stackoverflow.com/q/28104569
tags question: http://stackoverflow.com/q/28037573
tags question: http://stackoverflow.com/q/28101693
tags question: http://stackoverflow.com/q/28058572
tags question: http://stackoverflow.com/q/28097477
tags question: http://stackoverflow.com/q/27967215
tags question: http://stackoverflow.com/q/27994960
tags question: http://stackoverflow.com/q/27977809
tags question: http://stackoverflow.com/q/28086573
tags question: http://stackoverflow.com/q/28090888
tags question: http://stackoverflow.com/q/28074583
tags question: http://stackoverflow.com/q/28093480
tags question: http://stackoverflow.com/q/28096756
tags question: http://stackoverflow.com/q/28004863
tags question: http://stackoverflow.com/q/28060883
tags question: http://stackoverflow.com/q/27987892
tags question: http://stackoverflow.com/q/28040371
tags question: http://stackoverflow.com/q/28079380
tags question: http://stackoverflow.com/q/28090706
tags question: http://stackoverflow.com/q/28090552
type: Tag
tags question: http://stackoverflow.com/q/28082267
tags question: http://stackoverflow.com/q/28005704
tags question: http://stackoverflow.com/q/27971705
tags question: http://stackoverflow.com/q/28117891
tags question: http://stackoverflow.com/q/28005475
tags question: http://stackoverflow.com/q/28026019
tags question: http://stackoverflow.com/q/28025815
tags question: http://stackoverflow.com/q/27965616
tags question: http://stackoverflow.com/q/28077829
tags question: http://stackoverflow.com/q/27973380
tags question: http://stackoverflow.com/q/28071628
tags question: http://stackoverflow.com/q/28099406
tags question: http://stackoverflow.com/q/28000172

http://stackoverflow.com/q/28069677
type: Question
tagged with: sails.js
score: 7
tagged with: javascript
has body: The issue I have is related to the following quote from the official documentation: Note If any connection to an adapter is used by a model, then all connections to that adapter will be loaded on sails.lift, whether or not models are actually using them. In the example above, if a model was configured to use the localMysql connection, then both localMysql and remoteMysql would attempt to connect at run time. It is therefore good practice to split your connection configurations up by environment and save them to the appropriate environment-specific config files, or else comment out any connections that you don't want active. How can you configure the connection for a production server? My connections.js file looks like this: module.exports.connections = { mongoDev: { adapter: 'sails-mongo', host: 'localhost', port: 27017, user: 'username', password: 'password', database: 'database' }, mongoLive: { adapter: 'sails-mongo', host: 'host.mongolab.com', port: 31681, user: 'user', password: 'password', database: 'database' } }; And in my environment config files I've got: development.js module.exports = { models: { connection: 'mongoDev' } }; production.js module.exports = { models: { connection: 'mongoLive' }, port: 3000, }; This works on my local machine, because the production database server is on an external server. On the production environment I'm getting the following error: [Error: failed to connect to [localhost:27017]] It works if I remove the mongoDev object from my the connections object. I've also tried using adaptors.js, but this only resulted in some deprecation errors. $ sails -v info: v0.9.9 I'm getting something different when running sails lift: info: Sails info: v0.10.5
has answer: http://stackoverflow.com/a/28080407
linked to: http://stackoverflow.com/q/28658299
downvote count: 0
answer count: 1
has title: Handling database environment configuration in Sails.js
favorite count: 0
tagged with: sails-mongo
accepted answer: http://stackoverflow.com/a/28080407
tagged with: node.js
type: AnsweredQuestion
tagged with: database-connection
upvote count: 7

http://stackoverflow.com/a/27964404
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27964349
upvote count: 2
has body: Multiplying the random number by 3 will allow you to do this without using decimals or fractions: var choice = Math.random() * 3; if (choice &lt;= 1) { choice = "option1"; } else if (choice &lt;= 2) { choice = "option2"; } else { choice = "option3"; }

http://stackoverflow.com/comment/44335821
type: QuestionComment
has text: Also related: http://stackoverflow.com/questions/18470702/how-do-i-convert-a-c-sharp-liststring-to-a-javascript-array
comment on: http://stackoverflow.com/q/27971546
score: 0
type: Comment

http://stackoverflow.com/comment/44383842
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27996437
has text: @epascarello its blank
score: 0

http://stackoverflow.com/q/28118757
type: Question
has comment: http://stackoverflow.com/comment/44612269
answer count: 2
tagged with: javascript
has title: How to check if a tag has any text
tagged with: jquery
has comment: http://stackoverflow.com/comment/44611711
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/28118778
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28119018
has body: selInf Query: $("taMsg").each(function(){ if (!$(this).text().trim().length) { alert("THERE IS NO TEXT"); } });​ The above isn't working. How can I modify so if taMsg doesn't have any text, I get an alert.
has comment: http://stackoverflow.com/comment/44611663
has comment: http://stackoverflow.com/comment/44612089
downvote count: 1
has comment: http://stackoverflow.com/comment/44612128

http://stackoverflow.com/comment/44481084
has text: I added some info at the end of my answer.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28030221
type: Comment

http://stackoverflow.com/q/28071708
favorite count: 0
possible better answer: http://stackoverflow.com/a/28072173
has title: How do I make my click catcher work?
has answer: http://stackoverflow.com/a/28072173
upvote count: 1
accepted answer: http://stackoverflow.com/a/28071800
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44522833
has comment: http://stackoverflow.com/comment/44523379
answer count: 2
tagged with: unobtrusive-javascript
downvote count: 0
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/28071800
has body: I'm trying to create a simple click catcher where if you click .image-class the javascript will take the href from another element with a class name of .btn and send you to it's destination. Though I keep getting errors on lines 7 &amp; 10 saying that undefined is not a function. How do I make this work? &lt;script&gt; var ClickCatcher= { init:function(){ var link = jQuery('.btn')[1].href; var imgCatch = jQuery('.image-class'); imgCatch.addEventListener("click", ClickCatcher.clickListener, false); }, clickListener:function(){ window.location = link; } }; ClickCatcher.init(); &lt;/script&gt;

http://stackoverflow.com/q/28114164
has title: How to float text within a block like it was inline?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/45432834
tagged with: javascript
has comment: http://stackoverflow.com/comment/44602917
downvote count: 4
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/28123738
score: -4
has comment: http://stackoverflow.com/comment/44602413
favorite count: 0
has comment: http://stackoverflow.com/comment/44602348
has body: Given an image and a div which is is a column that is inside another div which is the content, how to make the column which has a fixed width and is a display block float its text aside the image? &lt;img src="https://www.google.com/images/srpr/logo11w.png"&gt; &lt;div id="content"&gt; &lt;div class="column"&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est. &lt;/div&gt; &lt;/div&gt; This is the code reference http://codepen.io/anon/pen/rawjLQ The closest thing I can think of is to place an empty div into the column, grab the width of the image with js and set it to the empty div inside the column and float like the two elements where inside the same container... Is there a jquery library to do such a thing?
tagged with: css
accepted answer: http://stackoverflow.com/a/28123738
type: Question

http://stackoverflow.com/comment/44384587
has text: Because i want to redirect after pressing ok in alert box, not in dialog box
score: 0
comment on: http://stackoverflow.com/q/27997352
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28036393
has answer: http://stackoverflow.com/a/28079558
tagged with: css
has title: Scrollable Sidebar When Scrolling Main Content Div
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44457490
has answer: http://stackoverflow.com/a/28036710
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44457688
has body: I am wanting to create a side bar similar to the adminstrator sidebar in the back end of Wordpress meaning when I scroll down the main page, if the sidebar has more content, it will scroll as well until it reaches the bottom of its content and stops. When scrolling up the reverse happens. The basic layout I have is below: &lt;body&gt; &lt;header id="Brand"&gt; &lt;div id="Content"&gt;&lt;/div&gt; &lt;/head&gt; &lt;div id="Main"&gt;&lt;/div&gt; &lt;/body&gt; My CSS curretly is: #Brand { bottom: 0; left: 0; min-width: 300px; overflow: auto; position: fixed; top: 0; width: 34%; } #Main { float: right; width: 63%; }
score: 0
linked to: http://stackoverflow.com/q/18952623
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44607506
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28116633
has text: Well, I'll take a look at both of these. If it gets closed thanks for quick responses :)

http://stackoverflow.com/a/28091468
has comment: http://stackoverflow.com/comment/44562518
type: Answer
has comment: http://stackoverflow.com/comment/44560064
score: 2
has body: Make sure there aren't other hidden inputs on the page with the same id and view the html in your browser and verify that the value on the element is correct before jquery modifies it. The jquery id selector (http://api.jquery.com/id-selector/) will only select the first element in the DOM that has that id. If there are multiple hidden input elements with the same name on the form, they will all get posted to the server.
answers question: http://stackoverflow.com/q/28091248
upvote count: 2
accepted answer of: http://stackoverflow.com/q/28091248
has comment: http://stackoverflow.com/comment/44560184
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/28057738
has comment: http://stackoverflow.com/comment/44498770
has comment: http://stackoverflow.com/comment/132802110
accepted answer of: http://stackoverflow.com/q/28057338
score: 20
has comment: http://stackoverflow.com/comment/44499382
has comment: http://stackoverflow.com/comment/44497325
upvote count: 20
has comment: http://stackoverflow.com/comment/44502839
has body: Here's the reference to the two APIs (well it's Javadoc, but the functions are the same), and here's an excerpt from it that highlights the difference [executeAsyncScript] Execute an asynchronous piece of JavaScript in the context of the currently selected frame or window. Unlike executing synchronous JavaScript, scripts executed with this method must explicitly signal they are finished by invoking the provided callback. This callback is always injected into the executed function as the last argument. Basically, execSync blocks further actions being performed by the selenium browser, while execAsync does not block and calls on a callback when it's done. Since you've worked with protractor, I'll use that as example. Protractor uses executeAsyncScript in both get and waitForAngular In waitForAngular, protractor needs to wait until angular announces that all events settled. You can't use executeScript because that needs to return a value at the end (although I guess you can implement a busy loop that polls angular constantly until it's done). The way it works is that protractor provides a callback, which Angular calls once all events settled, and that requires executeAsyncScript. Code here In get, protractor needs to poll the page until the global window.angular is set by Angular. One way to do it is driver.wait(function() {driver.executeScript('return window.angular')}, 5000), but that way protractor would pound at the browser every few ms. Instead, we do this (simplified): functions.testForAngular = function(attempts, callback) { var check = function(n) { if (window.angular) { callback('good'); } else if (n &lt; 1) { callback('timedout'); } else { setTimeout(function() {check(n - 1);}, 1000); } }; check(attempts); }; Again, that requires executeAsyncScript because we don't have a return value immediately. Code here All in all, use executeAsyncScript when you care about a return value in a calling script, but that return value won't be available immediately. This is e…
has comment: http://stackoverflow.com/comment/44503044
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28057338
type: Answer

http://stackoverflow.com/comment/44601240
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28090589
score: 0
has text: In my opinion, You have confused, beacase DIV is default value for tagName not el. In general you have two way. 1. Define el for an exist DOM element. 2. Define tagName, className and id for dom element that unavailiable yet. so empty div created by backbone because you havent specified el. and next important tip you should know is html elements should attach to the DOM to get visibility. DOM Element must attach to DOM Tree.

http://stackoverflow.com/comment/44748285
type: AnswerComment
comment on: http://stackoverflow.com/a/28076790
score: 0
type: Comment
has text: @PhilipWalton Thanks! I've managed to gain a 83-key Access Token using the way you described (ya29.XX-XX), but when I substitute it into the code provided above and enter my Google Analytics ID, I still get a blank page :-(

http://stackoverflow.com/comment/50582953
score: 1
comment on: http://stackoverflow.com/a/28046235
type: AnswerComment
has text: You can't just offset the vertices by a constant value though since this will produce lines of varying thickness depending on how far the points are from the camera. I wish they would just fix this already.
type: Comment

http://stackoverflow.com/q/28058833
tagged with: google-maps-api-3
answer count: 3
has answer: http://stackoverflow.com/a/42101702
tagged with: dom-events
favorite count: 0
has answer: http://stackoverflow.com/a/49828631
has body: Per the Google Autocomplete Places API documentation, the getPlace() call should return a Places object with all the location data, or, if that place doesn't exist (i.e. - the user ignored the suggestions), it should return a stub with just the name element of the Places object filled in. However, it only does this latter operation when the user hits ENTER, not if they TAB out of the field. I've tried looking at the change event, the keyup, keydown events. I've tried triggering a keydown event with keycode 13 on blur, etc. etc. Nothing seems to work. Has anyone overcome this issue? It seems pretty obvious that a user would tab through a form, and there's always the possibility they ignore the suggestions.
upvote count: 4
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/42101702
type: Question
has title: Google Autocomplete Places API not triggering event on change via TAB
has comment: http://stackoverflow.com/comment/44505080
tagged with: javascript
has answer: http://stackoverflow.com/a/28062160
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28062160
score: 4

http://stackoverflow.com/q/28050403
tagged with: jquery-events
has body: I'm trying to build a complex WYSIWYG, and for this I want to create some actions after some keys are pressed. For this I'm adding the jquery keypress and keyup listeners on a div with contenteditable. One of my actions make some changes on the HTML, and after this changes my cursor position should stay the same. My problem that when I'm processing the keyup event, there is no relation between keyup and keydown. The keyup events shouldn't be fired in a time relation. If you start writing in the example bellow, you can see that there is no order between keydown and keyup. If the key A was pressed after the key B the ´keyup` for A should be fired after the event for B. var result = document.getElementById('div-result'); function log(msg) { result.innerHTML = result.innerHTML + '&lt;br&gt;' + msg; } $('#div-editable').keydown(function(e) { log('down:&amp;nbsp;' + e.keyCode); }); $('#div-editable').keyup(function(e) { log('up:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;' + e.keyCode); }); log('Iniciando log...'); div#div-editable { background: #F2F2F2; padding: 10px; border: solid 1px #333333; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="div-editable" contenteditable&gt;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.&lt;/div&gt; &lt;div id="div-result"&gt;&lt;/div&gt; There is no way to synchronize these methods. In other words, when I'm processing keyup, keydown SHOULD wait.
possible better answer: http://stackoverflow.com/a/28052865
tagged with: synchronization
accepted answer: http://stackoverflow.com/a/28050463
has comment: http://stackoverflow.com/comment/44482964
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44484874
has answer: http://stackoverflow.com/a/28050463
has answer: http://stackoverflow.com/a/28052865
type: Question
answer count: 2
tagged with: jquery-1.8
has comment: http://stackoverflow.com/comment/44484340
tagged with: javascript
tagged with: event-handling
has title: keyup and keydown are not synchronized?
has comment: http://stackoverflow.com/comment/44494595
score: 0

http://stackoverflow.com/a/27998897
type: Answer
upvote count: 3
has body: You will need to use the JavaScriptSupport service. Your java file: @Import(library = "RoomManagement.js") public final class RoomManagement{ @Inject private JavaScriptSupport javascriptSupport; @Property private long contactId; @AfterRender private void setup() { JSONObject jsonObject = new JSONObject(); jsonObject.put("contactId", contactId); javascriptSupport.addInitializerCall("RoomManagement",jsonObject); } } Your RoomManagement.js Tapestry.Initializer.RoomManagement = function (parameters) { //do whatever you need here alert('Your contactId: ' + parameters.contactId); };
accepted answer of: http://stackoverflow.com/q/27988473
answers question: http://stackoverflow.com/q/27988473
score: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/28080407
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28069677
answers question: http://stackoverflow.com/q/28069677
type: Answer
has comment: http://stackoverflow.com/comment/49000042
has body: You want to save the actual connection definition in the either development.js or production.js and remove them from connections.js. It's a little non-intuitive. development.js module.exports = { connections : { mongoDev: { adapter: 'sails-mongo', host: 'localhost', port: 27017, user: 'username', password: 'password', database: 'database' } }, models: { connection: 'mongoDev' } }; production.js module.exports = { connections : { mongoLive: { adapter: 'sails-mongo', host: 'host.mongolab.com', port: 31681, user: 'user', password: 'password', database: 'database' } }, models: { connection: 'mongoLive' }, port: 3000, };
has comment: http://stackoverflow.com/comment/48986672
score: 12
upvote count: 12

http://stackoverflow.com/a/36771171
downvote count: 0
has body: Valid phone number is required Phone number should be 10 digits
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27986173

http://stackoverflow.com/comment/47426657
has text: For newer jQuery versions (2.1 +) and jQuery Validation(1.13 +) plugin including `additional-methods.min.js` resolves this error.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27965397

http://stackoverflow.com/a/27971286
has body: This might be the best thing I can do to help! http://jsfiddle.net/vcy80edg/ var editApp = angular.module('myApp',[]); function EditController($scope) { $scope.name = 'Hey friend!'; }
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/27970924
type: Answer
answers question: http://stackoverflow.com/q/27970924

http://stackoverflow.com/a/72103763
type: Answer
answers question: http://stackoverflow.com/q/27991366
has body: "Props" are external inputs passed a component (1), "state" is internal, private data managed by the component (2).
score: 0

http://stackoverflow.com/comment/44471461
has text: That does work, thanks. Any idea why IE11 behaves like this? Is it a bug or a behaviour for a specific reason?
comment on: http://stackoverflow.com/a/28044409
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27991918
downvote count: 0
answers question: http://stackoverflow.com/q/27991756
type: Answer
score: 2
has body: var option, count = -1; while ((option = $('#select1 option')[++count]).value != "") { $(option).clone().appendTo('#select2'); } $($('#select1 option')[count]).clone().appendTo('#select2'); //for the '=====' one option A option B ============= option AA option BB
has comment: http://stackoverflow.com/comment/44375478
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27991756
type: AcceptedAnswer

http://stackoverflow.com/a/28104839
type: Answer
answers question: http://stackoverflow.com/q/28104723
downvote count: 0
has body: Try this if(qs_trip_type == 0){ $('#rdo_pick').prop('checked',true); }else{ $('#rdo_drop').prop('checked',true); }
score: 1
upvote count: 1

http://stackoverflow.com/comment/44491359
has text: Because jsfiddle is designed for **HT**ML code, not **CF**ML ;-) HTML is the *output* of your CF code, and that is what you should post. (Hint: Load the script in your browser and do a "view source").
score: 0
comment on: http://stackoverflow.com/a/28052761
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28112987
score: 0
has body: Try to change the order. Firt name then value: data:{fname:"fname" , lname:"lname"},
answers question: http://stackoverflow.com/q/28045076
type: Answer

http://stackoverflow.com/q/28048898
accepted answer: http://stackoverflow.com/a/28049135
has comment: http://stackoverflow.com/comment/44480112
has comment: http://stackoverflow.com/comment/44479956
type: Question
has comment: http://stackoverflow.com/comment/44480093
has comment: http://stackoverflow.com/comment/44480041
has title: Accessing arguments collection in bind function
upvote count: 2
has comment: http://stackoverflow.com/comment/44479983
answer count: 1
has body: When returning .bind() from a higher order function, is it possible to access the arguments collection within the bound context? Take the following function as an example: function reverse(fn) { return function () { return fn.apply(this, [].slice.call(arguments).reverse()) }; } Ideally I'd like to remove the inner function wrapper and simply return something like: return fn.apply.bind(fn, [].slice.call(arguments).reverse()); (Obviously arguments is scoped to the outer function and not the returned function, which is what I'm after). Is this possible through some mechanism I'm unaware of or is the function wrapper a necessity?
tagged with: javascript
favorite count: 0
type: AnsweredQuestion
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44479989
has answer: http://stackoverflow.com/a/28049135

http://stackoverflow.com/comment/44456744
type: AnswerComment
comment on: http://stackoverflow.com/a/28035998
score: 0
type: Comment
has text: Ya i dont want to add it to the scope and wanted to avoid calling the api again but looks like thats the only option i have. I was hoping there would be another way but i didnt think so.

http://stackoverflow.com/comment/44524062
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28062579
has text: Oh, I see. I made a mistake then.
score: 0

http://stackoverflow.com/a/28082703
has body: posting the solution so that others might get some help... :) ::::::::::::::::::::::::::EDIT::::::::::::::::::::::::::::::: addedd data-count to the dynamic input field itemname[] and modified the success function of ajax: $('#units-' + thecount).attr('value', data.unit); $('#unitprice-' + thecount).attr('value', data.price); now things are working and when i press enter it also changes the value of units[] and unitprice[] input field, ::::::::::::::updated solution:::::::::::::::: var count = 1; $('#add-items').click(function () { $('#items').append('&lt;div&gt;&lt;br&gt;&lt;i class="fa fa-angle-right"&gt;&lt;/i&gt;. &lt;input data-count="'+ count +'" type="text" name="itemname[]" id="itemname-' + count + '" class="itemname" placeholder="item name"/&gt;\n\ &lt;input type="text" name="units[]" id="units-' + count + '" class="units" size="10" placeholder="units" style="text-align: right"/&gt;\n\ &lt;input type="text" name="unitprice[]" id="unitprice-' + count + '" class="unitprice" size="10" placeholder="unit price" style="text-align: right"/&gt;\n\ &lt;a href="javascript:void(0);" id="remove-items"&gt;&lt;i class="fa fa-trash-o"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/div&gt;'); $('#itemname-' + count).autocomplete({ source: "&lt;?= site_url('administrator/item-autocomplete') ?&gt;", minLength: 2 }); $('#itemname-' + count).on('keypress', function (e) { var name = jQuery(this).val(); var thecount = jQuery(this).data('count'); var code = (e.keyCode ? e.keyCode : e.which); if (code == 13) { e.preventDefault(); $.ajax({ type: "POST", url: "&lt;?= base_url() ?&gt;administrator/get-unit-and-price/", data: {name: name}, dataType: "json", success: function (data) { if (data.valid == true) { $('#units-' + thecount).attr('value', data.unit); $('#unitprice-' + thecount).attr('value', data.price); } else { alert(data.html); } } }); } }); count++; }); thanks to every one....
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28072122
answers question: http://stackoverflow.com/q/28072122
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/27970160
answers question: http://stackoverflow.com/q/27970047
has body: [Assumption that you want to upload and play your .mp3 from SC] Yea it is possible. If it is from sound cloud you will play. If it is from upload, you will upload on sound cloud and you will play that particular uploaded .mp3 or what extension you accept. Here is the javascript official soundcloud sdk : https://github.com/soundcloud/soundcloud-javascript Here is a extracurricular ruby example, but you can inspire from: https://github.com/soundcloud/soundcloud-ruby Another approach is to stream that file, but i didn't implement something like that. Embedded example: SC.oEmbed("http://soundcloud.com/forss/flickermood", {auto_play: true}, function(oembed){ console.log("oEmbed response: ", oembed); }); And you can read more here : https://developers.soundcloud.com/docs/api/sdks#javascript
type: Answer
has comment: http://stackoverflow.com/comment/44353461
has comment: http://stackoverflow.com/comment/44359019
score: 0
has comment: http://stackoverflow.com/comment/44352487

http://stackoverflow.com/a/28080916
upvote count: 2
has comment: http://stackoverflow.com/comment/44541138
has body: I would make ani a class instead of ids, then just do $('.ani').hover(function().... like the below. Note that I am using sudo CSS since none was posted but it gets the point across. Remember you can always get the individual elements by class too by using eq(). For example, $('.ani:eq(0)').hide(); would hide the first panel, $('.ani:eq(1)').hide(); would hide the second, etc... $(document).ready( function(){ $('.ani').hover(function(){ var $icon = $( this ).find( ".fa-refresh" ); $icon.addClass( "icon-animate" ); /* use `mouseout` later instead of a timeout here, unless want the icon to stop spinning after a few seconds of hovering window.setTimeout( function(){ $icon.removeClass( "icon-animate" ); }, 2000 ); */ }); $( ".ani" ).mouseout(function() { $( this ).find( ".fa-refresh" ).removeClass( "icon-animate" ); }); }); .ani{ width:150px; height:75px; background-color:#cccccc; margin-top:15px; margin-left:15px; float:left; padding:5px; } .fa-refresh{ float:right; } .icon-animate { font-size:14px; -webkit-animation-name: spin; -webkit-animation-duration: 1000ms; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; -moz-animation-name: spin; -moz-animation-duration: 1000ms; -moz-animation-iteration-count: infinite; -moz-animation-timing-function: linear; -ms-animation-name: spin; -ms-animation-duration: 1000ms; -ms-animation-iteration-count: infinite; -ms-animation-timing-function: linear; animation-name: spin; animation-duration: 1000ms; animation-iteration-count: infinite; animation-timing-function: linear; } @-ms-keyframes spin { from { -ms-transform: rotate(0deg); } to { -ms-transform: rotate(360deg); } } @-moz-keyframes spin { from { -moz-transform: rotate(0deg); } to { -moz-transform: rotate(360deg); } } @-webkit-keyframes spin { from { -webkit-transform: rotate(0deg); } to { -webkit-transform: rotate(360deg); } } @keyframes spin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } } Banana ... Blogspot Toko Onli…
type: Answer
answers question: http://stackoverflow.com/q/28080634
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44540665
has comment: http://stackoverflow.com/comment/44540721
has comment: http://stackoverflow.com/comment/44541265

http://stackoverflow.com/a/28121402
accepted answer of: http://stackoverflow.com/q/28121193
has body: You can use any element instead of , for example a . The difference is you set its .innerHTML[1], not .value, so use ids and document.getElementById("ids").innerHTML = ids[y.selectedIndex]; to set the HTML of an element instead of value of an input. http://jsfiddle.net/zunrk/171/ [1] innerText/textContent would be a better choice, but it could introduce unnecessary complexity
type: Answer
answers question: http://stackoverflow.com/q/28121193
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/44393599
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28001543
type: AnswerComment
has text: @BGG _"But I want the scrips execute BEFORE the website to show Google Charts correctly "_ Is requirement to execute several deferred processes _before_ calling google charts scripts ?

http://stackoverflow.com/a/48510953
has body: You could create two functions. One to basically process each character of the string and the other to check if that character is numeric or not. I have included an example that I have tested in my code in another use. // Validation functions // Checks if argument is numeric or not function isNumeric(n) { if (!isNaN(n)) { return true; } else { return false; } } // Checks if argument contains any numeric characters or not function hasNumber(s) { for (var i = 0; i &lt; s.length; i++) { var n = s.charAt(i); if (isNumeric(n)) { return true; } } return false; }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28109150

http://stackoverflow.com/a/28074281
type: Answer
has body: Seems to be trying to submit the form. A quick and easy fix is to change your onclick as follows: Graficar and add a return false; to the end of the dibujarCurva() function. This is useful if you want to conditionally submit. However, as slicedtoad and acontell pointed out the following will also solve it without any modification to the function. Graficar
has comment: http://stackoverflow.com/comment/44527967
score: 3
accepted answer of: http://stackoverflow.com/q/28074188
upvote count: 3
has comment: http://stackoverflow.com/comment/44527895
answers question: http://stackoverflow.com/q/28074188
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/28011767
tagged with: javascript
has body: Hi I got a question that I would like to get some help with. First I was wondering how to detect which key that was pressed and then after that send the key that was pressed to another page or more or less another file that I have on my computer ? Not redirecting I already know how to do that, but more like send the keypress to a "result file" or something like that. So far I got a keypress that redirects to next page/file and when the user presses the button it logs the charCode to the console. But I want it to send the key to another file instead of sending it to the console. Here is my code so far: jQuery: document.onkeypress = function(b) { b = b || window.event; var charCode = b.charCode || b.keyCode, character = String.fromCharCode(charCode); console.log(charCode); window.location.href="Test3.html"; }; And I got two of those b and r. If there's a possible way to do it in jQuery or JavaScript it would be awesome, but if there's another way to do it in another language I need a detailed description.
has title: Send which key that was pressed to file
answer count: 2
has answer: http://stackoverflow.com/a/28012394
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44411652
has answer: http://stackoverflow.com/a/28011831
has comment: http://stackoverflow.com/comment/44411687
linked to: http://stackoverflow.com/q/582268
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44411423
has comment: http://stackoverflow.com/comment/44410941
type: Question
has comment: http://stackoverflow.com/comment/44411419
has comment: http://stackoverflow.com/comment/44411481

http://stackoverflow.com/q/28114056
type: AnsweredQuestion
has body: I'm using jQuery's XML parser on some simple content that contains HTML. Extracting the full HTML text using jQuery's .html() or standard javascript .innerHTML works fine in Chrome, but not in Internet Explorer 9. jQuery's .text() works in both cases, but I need the html tags extracted as well. How can I make it work with IE9 as well? You can test it out here: http://jsfiddle.net/199vLsgz/ XML: Code: $(function() { var xml = $("#xml_data").text(); var xmlDoc = $.parseXML(xml); $xml = $(xmlDoc); var desc = $xml.find("model_data > objects > object[id='obj1'] > description"); alert(desc.html()); })
tagged with: innerhtml
score: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/28114512
has title: innerHTML missing when XML parsing with jQuery in IE9 but not Chrome
tagged with: javascript
tagged with: jquery
tagged with: jquery-xml
answer count: 1
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/28114512
tagged with: http://stackoverflow.com/tag/xml

http://stackoverflow.com/q/27977357
has body: I would like to be able to print out what the request object when using parse.com cloud code. For example: Parse.Cloud.define("createRelationship", function(request, response) { Parse.Cloud.useMasterKey(); console.log("request: "); console.log(request); However, I don't see any output for console.log(request). I know the request is not empty. How can I get a "javascript" object or a parse object "to_string" and have it print out to the log files. This is for debugging purposes. Thanks,
type: AnsweredQuestion
tagged with: parse-platform
upvote count: 3
has comment: http://stackoverflow.com/comment/44377281
accepted answer: http://stackoverflow.com/a/28093959
type: Question
score: 3
has answer: http://stackoverflow.com/a/28093959
has comment: http://stackoverflow.com/comment/44404932
has comment: http://stackoverflow.com/comment/44538731
has title: Inspect parse.com request object
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44377290
has comment: http://stackoverflow.com/comment/44349627

http://stackoverflow.com/q/28118901
type: UnansweredQuestion
tagged with: textarea
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: How to obtain input from multiple textareas and radio buttons on the click of a button using knockout?
has body: I have several textareas and radio buttons that are dynamically generated inside a ko: foreach binding. When a user decides they are done typing their input, they will click a button 'OK' which takes all of the input of the textareas and values of the radio buttons they have chosen and it should trigger an ajax call to the server because the input needs to be stored in a database. Each textarea and radiobutton value is stored separately, so they need to be sent to the server as distinguished values. I've been having a lot of trouble given the foreach binding, so I'm not sure where to begin because the textareas do not have an accessible unique identifier because they're generated using foreach. Thank you. So, in simpler terms: User types in multiple textareas and clicks on radio buttons. User clicks 'OK' button when finished typing. Button click function retrieves user input in all textareas and radio button values. Trigger ajax call and send values to server. Any help is appreciated or links to any resources that I can follow. My google searches didn't quite answer my questions. Picture: Server: //retrieves form data from the client and serialized it if (Request.HttpMethod == "POST") { // get json out of body var serializer = new JsonSerializer(); var sr = new StreamReader(Request.InputStream); var jtr = new JsonTextReader(sr); dynamic data = serializer.Deserialize(jtr); if (data.action == "getProjects") { getProjects(data); } } Example Object that is posted via ajax: Obj = {}; Obj.action = "getProjects"; Obj.list = arrayOfCheckboxValues; View: Did it already Didn't do it, but interested Never done it; not interested Interested in doing more No plans to do this again //this is the button that captures all input View Model: function ViewModel(proj) { var self = this; var wrappedProjects = proj.map(function (p) { return new Project(p); }); self.projects = ko.observableArray(wrappedProjects); } function Project(proj) { var self = proj; self.firstAnswers = ko.observabl…
upvote count: 1
answer count: 1
tagged with: knockout.js
has answer: http://stackoverflow.com/a/28122724
tagged with: javascript

http://stackoverflow.com/comment/44458663
type: Comment
has text: Ok got the plunker ready here, mind a look? :) http://plnkr.co/edit/0efF1Av4lhZFGamxKzaO?p=preview
comment on: http://stackoverflow.com/a/28036878
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44466662
comment on: http://stackoverflow.com/a/28041026
score: 1
type: AnswerComment
has text: @Vikram the problem is the name of the submit button... change it to anything other than submit like ` ` then it should be fine
type: Comment

http://stackoverflow.com/comment/44554981
comment on: http://stackoverflow.com/a/28088801
type: Comment
score: 0
type: AnswerComment
has text: thanx, I had same filename in two different location and I had loaded the other one.

http://stackoverflow.com/q/28070894
answer count: 5
tagged with: string-formatting
has answer: http://stackoverflow.com/a/28071647
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/28071123
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/28071091
possible better answer: http://stackoverflow.com/a/28071463
has answer: http://stackoverflow.com/a/28071301
has answer: http://stackoverflow.com/a/28071123
has answer: http://stackoverflow.com/a/28071463
score: 0
has title: Convert array to string while grouping by pairs
has body: I have an array of latitudes and longitudes in javascript, like this: a = [lat1, lon1, lat2, lon2, lat3, lon3, ...] // assert(a.length % 2 = 0) and I would like to create a string like this: s = "lat1,lon1 lat2,lon2 lat3,lon3 ..." that is, each latlon pair has a comma separating the pair, and the pairs are separated by a space. I'm a bit stuck here (mostly because I know very little of javascript): function polylineToKml(p) { var s = ""; for (var i = 0; i &lt; p.length; i+=2) { var lat = p[i]; var lon = p[i+1] // now what? } }
tagged with: string

http://stackoverflow.com/comment/44385814
type: Comment
comment on: http://stackoverflow.com/a/27997618
has text: Unfortunately, this was not the solution. Further output displays: Data length is 81 network.js (line 34) Data 0 is : undefined network.js (line 36) Data 1 is : undefined and links.source is This is the links source : undefined network.js (line 45) This is the sourceundefined
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44602672
comment on: http://stackoverflow.com/q/28113948
has text: Can you show us the exact structure of your html, and where `closest()` fits into this? What are you *really* trying to do when clicking on either div element?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44347279
type: Comment
comment on: http://stackoverflow.com/a/27977298
type: AnswerComment
has text: `window.location.href = "disp.php?price="+pricee+"&quantity=" +quants;` is this right on my function?
score: 0

http://stackoverflow.com/q/28004902
answer count: 1
tagged with: javascript
tagged with: event-handling
tagged with: jquery
tagged with: ajax
score: 0
tagged with: jquery-events
has title: Store variable at the time button is clicked for use when ajaxComplete event fires
has answer: http://stackoverflow.com/a/28130146
has body: I have 4 buttons on a page with the same class. When any of these buttons are clicked, an Ajax event is triggered, which I listen for with ajaxComplete. The problem is, if I click a button right after another, the variables assigned to the first one seem to overwrite the second, so the actions intended for the second do not happen. I attached namespaces specific to the elements to separate ajaxComplete handlers, but this hasn't solved the issue. I'm probably missing or not using something obvious. The main problem, as I see it, is that I'm storing the IDs based on the last button that was clicked, so when the event is triggered, it's affecting the wrong element. (The most recent variable assigned to $sheetBlock). I need to store these variables at the time the button corresponding to the event is clicked. A few caveats—I can't add any extra properties to the html elements, however, each button and element affected does have its own ID. I thought storing the $flippyFunc function in a var and running when each button is pressed would allow me to store the ID for each button at the time that it is clicked alongside each ajax Event to be used together. How can I do this? var $id = null; var $laddaButtons = []; var $it = null; var $results = []; var $sheetBlock = []; var runOnAjax = function(button, id){ $(button).off('mousedown.button'); $sheetBlock[id] = $('#'+button.parentNode.parentNode.parentNode.parentNode.id); }; var $flippyFunc = function($id){ $sheetBlock[$id].flippy({ //options }); }; $('.ladda-button').on('mousedown.this', function(e) { $id = this.id; $it = this; runOnAjax($it, $id); $(document).on("ajaxComplete."+$id, function(e) { $(document).off("ajaxComplete."+$id); $flippyFunc($id); }); });
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28130146
type: Question

http://stackoverflow.com/a/28051987
has comment: http://stackoverflow.com/comment/44486832
has comment: http://stackoverflow.com/comment/44487191
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28051494
has body: By default ASP.NET MVC will look for Contollers in the Controllers folder. It will attempt to find a controller that follows the name XController where X is the {controller} part of the URL matched in your route. Within that controller it will then attempt to find a method that matches the name in the {action} part of the route. The controller you wish to match is JournalVoucher and the action you want is GetJournalVoucherDataAsync so the URL you actually require is: /JournalVoucher/GetJournalVoucherDataAsync Aside: As @Jonesy points out in the comments it's probably not a good idea to name [POST] methods with the Get prefix. It will work but it's confusing.
has comment: http://stackoverflow.com/comment/44491872
type: Answer
accepted answer of: http://stackoverflow.com/q/28051494
upvote count: 1
score: 1

http://stackoverflow.com/a/28055206
type: Answer
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/28035364
has body: Instead of using the created method, which is one of the first ones triggered in the element's lifecycle, you would probably have more luck using domReady, which is, according to Polymer official docs: Called when the element’s initial set of children are guaranteed to exist. This is an appropriate time to poke at the element’s parent or light DOM children.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28035364

http://stackoverflow.com/comment/69162542
type: AnswerComment
has text: `.on("end")` and `.on("finish")` differ by what?
type: Comment
comment on: http://stackoverflow.com/a/33024929
score: 0

http://stackoverflow.com/q/28089172
type: UnansweredQuestion
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44741106
tagged with: draw
score: 0
has title: Implementing an eraser with paperjs
tagged with: canvas
has comment: http://stackoverflow.com/comment/44729751
tagged with: paperjs
has comment: http://stackoverflow.com/comment/44739139
has body: I've checked, similar questions have been asked, but have been left partially answered or not answered at all. I need to build an eraser tool with PaperJS that will be able to erase existing paths, without erasing the image underneath. So the image can reside on the first layer, and the paths on the second. See the accompanying JSFiddle: jsfiddle which shows two attempts: paper.install(window); var canvas = document.getElementById("myCanvas"); paper.setup(canvas); //the yellow background (can also be background image) which should NOT be erased var rect = new Rectangle(new Point(0, 0), new Point(paper.view.size.width, paper.view.size.height)); var rectPath = new Path.Rectangle(rect); rectPath.fillColor = 'yellow'; //first attempt to erase the black line var first = paper.project.activeLayer; var second = new Layer(); var from = new Point(50, 0); var to = new Point(50, 100); var path1 = new Path.Line(from, to); path1.strokeColor = 'black'; path1.strokeWidth = 40; var from = new Point(0, 50); var to = new Point(100, 50); var path2 = new Path.Line(from, to); path2.strokeColor = 'green'; //I've tried other colors as well, this seems irrelevant path2.strokeWidth = 40; path2.blendMode = 'destination-out'; //So I saw this var path = new CompoundPath({ children: [ new Path.Circle({ center: new Point(200, 50), radius: 30 }), new Path.Circle({ center: new Point(200, 50), radius: 10 }) ], fillColor: 'black', selected: true }); //second attempt //I need to actually erase with one line through lots of paths, not sure how to implement it with this var path = new CompoundPath({ children: [ new Path.Line({ from: [350, 0], to: [350, 100], strokeWidth: 30, strokeColor: 'green' //irrelevant it seems }), new Path.Line({ from: [300, 50], to: [400, 50], strokeWidth: 30, strokeColor: 'white' //irrelevant it seems }) ], strokeColor: 'black', selected: true, strokeWidth: 20 }); paper.view.draw(); This does not support HTML5 canvas The first attempt tries to use blendMode='destination-out' b…
answer count: 0

http://stackoverflow.com/q/27999050
has title: Google Maps Places Autocomplete search any position
type: Question
upvote count: 2
answer count: 2
tagged with: google-maps
tagged with: autocomplete
tagged with: javascript
accepted answer: http://stackoverflow.com/a/30013132
favorite count: 0
possible better answer: http://stackoverflow.com/a/29812023
has answer: http://stackoverflow.com/a/30013132
tagged with: google-places-api
downvote count: 0
has body: When I use google places autocomplete api and as search places with keyword &amp;input=MyWord result is places that start with MyWord. e.g. MyWord1 , MyWord2, MyWordblalba I want to get results that contain MyWord in middle or at any position of result. e.g. blablaMyWordbla Is it possible ? I can't find any parameter or wildcard in documentation https://developers.google.com/maps/documentation/javascript/places-autocomplete
tagged with: maps
has answer: http://stackoverflow.com/a/29812023
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/44494316
has text: After you last comment edit, I don't really follow what you are trying to accomplish. I'm sorry, but could you elaborate?
score: 0
comment on: http://stackoverflow.com/a/28056103
type: Comment
type: AnswerComment

http://stackoverflow.com/a/27980025
answers question: http://stackoverflow.com/q/27979707
score: 2
downvote count: 0
has body: I guess this method gets called when a hyperlink is tapped from page or some redirection happens. So make sure this thing.
type: Answer
upvote count: 2

http://stackoverflow.com/comment/44394612
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28002800
has text: Do you open the link to your page with https, or with normal http?
score: 0

objective-c
tags question: http://stackoverflow.com/q/28045346
tags question: http://stackoverflow.com/q/28019250
type: Tag
tags question: http://stackoverflow.com/q/28105156
tags question: http://stackoverflow.com/q/28012211
tag name: objective-c
tags question: http://stackoverflow.com/q/28091535
tags question: http://stackoverflow.com/q/28058127

http://stackoverflow.com/comment/44559128
score: 0
type: Comment
has text: Also jQuery is not tagged here :)
type: AnswerComment
comment on: http://stackoverflow.com/a/28091111

http://stackoverflow.com/comment/44519351
has text: Is it possible that the image contains a null byte?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28069853

http://stackoverflow.com/q/28096174
has body: I am trying to simulate a live search with Meteor JS (btw, surprisingly tough task!) This is in client.js: Template.newDiagnostic.events({ "keyup .entry-search": function(e) { Session.set("search-query", e.currentTarget.value) } }) Template.registerHelper("searchQuery", function(value){ var query = new RegExp(Session.get("search-query")) return query.test(value) }) Template.newDiagnostic.helpers({ symptoms: function() { return Symptoms.find({}) } }) Basically, I have an event, watching the keyup in the search input, changing a session variable. Next, I registered a helper to check if a given string match (RegExp) that session variable. Lastly, the helper is only to provide the data. Then, I have this in my HTML: &lt;template name="newDiagnostic"&gt; &lt;input type="text" class="form-control entry-search" placeholder="Filtrar por nome"&gt; {{#each symptoms}} {{#if searchQuery name}} &lt;div class="checkbox"&gt; &lt;label&gt; &lt;input class="checkbox-symptoms" type="checkbox" value="{{_id}}"&gt; {{name}} &lt;/label&gt; &lt;/div&gt; {{/if}} {{/each}} &lt;/template&gt; Here, I try to filter (hiding) entries not in the query. The simulates live search works fine so far: you type something in that input text and the entries are filtered. The problem is when you search for something and check an entry. Then, if you search for another term and check for that one, your first checked entry is gone. I don't want this behaviour. I want to search for an entry, check it, search for another entry, check it too, and so on. I think that this problem has to do with the reloading of the template, but I have no idea how to get this working. I thought about saving the checked entries in a Session variable, but that would be my last option. I have also tried matteodem:easy-search, but the same problem happens.
tagged with: javascript
tagged with: meteor-blaze
score: 0
tagged with: meteor
has comment: http://stackoverflow.com/comment/44578170
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44571070
has title: Unchecking checkbox during live search with Blaze in Meteor JS
type: Question

http://stackoverflow.com/a/28107320
accepted answer of: http://stackoverflow.com/q/28107255
score: 5
has comment: http://stackoverflow.com/comment/44588969
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28107255
downvote count: 0
has comment: http://stackoverflow.com/comment/44589171
type: Answer
has comment: http://stackoverflow.com/comment/44589250
has comment: http://stackoverflow.com/comment/44589696
has comment: http://stackoverflow.com/comment/44589746
has comment: http://stackoverflow.com/comment/44589567
has body: You can do it by using name of the select Your select must be inside the form Technology Administration Biology Science UserId Password In your Login servlet, in your servlet post method just use the request.getparameter to get that value eg protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException { String selectedvalue = request.getparameter("jobCat"); // you will get that value in the string selectedvalue }
has comment: http://stackoverflow.com/comment/44589661
has comment: http://stackoverflow.com/comment/44589296
has comment: http://stackoverflow.com/comment/44589146
upvote count: 5
has comment: http://stackoverflow.com/comment/44589083
has comment: http://stackoverflow.com/comment/44589368

http://stackoverflow.com/q/28068302
tagged with: arrays
tagged with: javascript
has body: So I'm trying to make a quiz.html file which will prompt the user for the no. of questions they want to answer. Based on their input, the random questions will be generated. So I understand it's gonna have to be a loop that will loop till the no. input into the alert box. So my scoreMe() function apparently isn't giving any answer. I'm trying to check if the checked radio button for a particular question is equal to the correct answer but I'm just getting my score as 0%. So can anyone tell me what's wrong with my code?
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28069236
type: AnsweredQuestion
tagged with: loops
accepted answer: http://stackoverflow.com/a/28069236
possible better answer: http://stackoverflow.com/a/28069099
type: Question
has answer: http://stackoverflow.com/a/28069099
answer count: 2
tagged with: radio-button
has title: How do I check if my radio button is selected and the loop is working?

http://stackoverflow.com/q/28121271
has answer: http://stackoverflow.com/a/28121338
accepted answer: http://stackoverflow.com/a/28121338
answer count: 1
favorite count: 0
type: AnsweredQuestion
upvote count: 0
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44616749
tagged with: javascript
has body: I found a script which outputs the last words of each line in a paragraph. Can someone help out to only output the last word of the third line? 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.
score: -1
has title: Getting last word of third line

http://stackoverflow.com/comment/53109985
has text: @Dan Do you have a working sample of the modified sampler-scaffold? How does the switch between multiple pages works?
type: AnswerComment
comment on: http://stackoverflow.com/a/28079892
score: 0
type: Comment

http://stackoverflow.com/q/27968469
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/39960065
has answer: http://stackoverflow.com/a/30787546
score: 0
answer count: 2
tagged with: turbolinks
tagged with: jquery
has title: Smooth scrolling not working in Rails unless page is refreshed
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: We converted a page in our application that previously rendered content from various pages into a single page that smoothly scrolls to each section using Javascript. The function does not work unless the page is refreshed. I believe it has to do with turbolinks cacheing the page. Transition cacheing is enabled throughout Turbolinks.enableTransitionCache() The smooth scroll function $(function() { $('.scroll-button').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') &amp;&amp; location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top - 160 }, 1000); return false; } } }); }); I've tried opting out of turbolinks and transition cacheing in various ways, most recently by tagging each link, the page container, and target section with data-no-turbolink="true" Each link in example_links.html.slim has been tagged li = link_to 'INFO', path, class: 'tab-link scroll-button', 'data-no-turbolink'=>'true' The show.html.slim has the page container tagged .row data-no-transition-cache="true" data-no-turbolink="true" And each section targeted on that page is tagged p.section-heading#someLabel data-no-turbolink="true" How can I ensure that when the page is visited, either by clicking a link or using the back button, that the smooth scrolling function is enforced?
tagged with: ruby-on-rails

http://stackoverflow.com/comment/44441422
has text: All set, just edited it @SwarajGiri
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28018035
score: 0

http://stackoverflow.com/comment/44562188
type: QuestionComment
comment on: http://stackoverflow.com/q/28092850
has text: Hi Frederic, I do like that too, But Not Working .
score: 0
type: Comment

http://stackoverflow.com/a/28041694
score: 1
has comment: http://stackoverflow.com/comment/44473763
has comment: http://stackoverflow.com/comment/44467947
has comment: http://stackoverflow.com/comment/44471496
downvote count: 0
has comment: http://stackoverflow.com/comment/44467051
type: Answer
has comment: http://stackoverflow.com/comment/44475512
answers question: http://stackoverflow.com/q/28026267
upvote count: 1
has body: There is currently no official support for using splash in conjunction with Portia but adding support for it is a high priority. https://github.com/scrapinghub/portia/issues/2 If you would like to use splash for simply rendering the page you can do so by adding the splash middleware to the Portia projects settings.
has comment: http://stackoverflow.com/comment/44472956

http://stackoverflow.com/a/27999681
downvote count: 1
answers question: http://stackoverflow.com/q/27999654
score: 0
upvote count: 1
has body: This is what happens behind the scenes: var skill = "JavaScript"; function printSkill() { var skill; // skill is undefined and scoped to printSkill, // it is no longer the same `skill` variable console.log(skill); // &lt;-- This prints undefined skill = "Java"; // &lt;-- How can this possibly work? console.log(skill); // &lt;-- This prints "Java" } printSkill(); This is called variable hoisting.
type: Answer

http://stackoverflow.com/comment/44421166
type: Comment
comment on: http://stackoverflow.com/q/28016935
has text: How do you think to write HTML in java? Template languages are used to make writing HTML much easier to programmers. And as you sad, you can't place logic in HTML (actually you can, but very limited).
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44499795
type: QuestionComment
comment on: http://stackoverflow.com/q/28059099
score: 0
has text: I think we need a little more information to help you, such as the associated html and possibly more of the servlet code. It would also be helpful if you could be a bit more clear on if you are currently getting -any- data displayed.
type: Comment

http://stackoverflow.com/comment/44464272
type: QuestionComment
comment on: http://stackoverflow.com/q/28039944
has text: try to move render function in top of your first.js file
score: 0
type: Comment

http://stackoverflow.com/comment/44447674
score: 0
type: Comment
has text: Thanks for the reply mdml! So using: var response = {"record":[{"status":"request"},{"status":"requirements"},{"status":"request"}]}; var data = d3.nest() .key(function(d){ return d.status; }) .rollup(function(leaves){ return leaves.length; }) .entries(response.record) .map(function(d){ return {label: d.key, value: d.values}; }); console.log(data); I'm getting an error: "Unexpected value translate(NaN,NaN) parsing transform attribute"
type: AnswerComment
comment on: http://stackoverflow.com/a/28031253

http://stackoverflow.com/comment/44503382
type: Comment
has text: I did but its not working I just console and found Object {posts: Array[0], success: false, msg: "No record found"}msg: "No record found"posts: Array[0]success: false__proto__: Object
type: QuestionComment
comment on: http://stackoverflow.com/q/28061025
score: 0

http://stackoverflow.com/q/28087109
has comment: http://stackoverflow.com/comment/44551908
has comment: http://stackoverflow.com/comment/44551356
downvote count: 1
has comment: http://stackoverflow.com/comment/44551643
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28087230
has body: I'm really confused as this script has worked fine for several months and then today I noticed it was no longer working. It is built using Google Scripts which uses Javascript, I can only log data using Logger.log so it's a little different to most Javascript but it works mainly the same. I have found the area where the problem occurs. My for loop does not iterate through the array. function checkGetAmount(currentDate,data){ var arrayLength = data.length; // this outputs as 28 - is correct for (var i = 0; i &lt; arrayLength; i++) { // This is where the error occurs. If I try to output var I, it shows as "0" always if (data[i] == currentDate){ i++; var amount = data[i]; return amount; }else{ return 'Not today';} } } I have tried to test why it is not crawling through all 29 elements of data. When I console logged var i it returned only 0. I had expected it to output many console logs, starting with 0 then 1 etc up to 28 Any ideas where I'm going wrong? Or how else I can iterate through my array data? The purpose of the function is to run through each element of the array named data and check whether the var currentDate matches the data found in there. If it does, it should return the next array element.
type: Question
tagged with: for-loop
upvote count: 0
tagged with: arrays
answer count: 1
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/28087230
has title: For loop does not iterate, does not output more than first task of data?
has comment: http://stackoverflow.com/comment/44551451
favorite count: 0
has comment: http://stackoverflow.com/comment/44551628

http://stackoverflow.com/a/27966062
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27964957
has body: I think you ca try this to get the result. HTML (the button and textarea are the last two controls): Have you done project this before? JavaScript: function displayTextArea(element) { var my_disply = element.nextSibling if (my_disply == "block") document.getElementById('oppyDoneTextArea').style.display = "none"; else document.getElementById('oppyDoneTextArea').style.display = "block"; } Hope it will help you and will work only when the textarea is the next sibling to button on clicking of which you have to show the textarea
downvote count: 1
score: -1

http://stackoverflow.com/comment/44393044
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27995647
type: AnswerComment
has text: @Tamothy also, to know if you're missing `;` or other stuff you can check your code on jshint or jslint .com Or simply use a better code editor (that will highlight errors for you.)

http://stackoverflow.com/q/28039290
downvote count: 0
has answer: http://stackoverflow.com/a/77240208
has title: how to set rails background image url in javascript?
favorite count: 0
has answer: http://stackoverflow.com/a/28039457
tagged with: http://stackoverflow.com/tag/html
tagged with: ruby-on-rails
tagged with: css
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/28039457
upvote count: 1
has body: In my rails application, I have some set of content and image-button (each piece of content has an image). When a user clicks the button, I want to show the respective image. In my project, I saved all my images under assets/images/preview/id1.png (for example). In my javascript code, when clicking the view-content button i want to change the background image to display the respective image. I want to lookup the image based on the id assigned to that button. How can I achieve this? How to set that image url for back ground image: _page2.html.erb content about the image <div id="<%= content[:lable].delete(' ')%>" class="view"> VIEW-IMAGE content about the image <div id= "<%= content[:lable].delete('')%>" class="view">VIEW-IMAGE content/preview.js $('.view').click(function (event){ var image = $(this).id $(this).css("background", "url(image.jpg) no-repeat"); }); }); link in Jsfiddle: http://jsfiddle.net/bkrx2rxz/1/ In content/preview.js $('.view').click(function (event){ $(this).css("background", "url(sample.png) no-repeat"); }); I tried using the code listed above. It appears the image is not loaded because it searches images in content/sample.png instead of assets/images/sample.png.
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/77240208

http://stackoverflow.com/comment/44458541
type: Comment
has text: in addition to jQuery('#jform_report').prop('disabled', true).trigger("chosen:updated"); you can also try jQuery('#jform_report').removeAttr('aria-required'); and see what happens
comment on: http://stackoverflow.com/a/28036779
type: AnswerComment
score: 0

http://stackoverflow.com/a/28112378
type: Answer
answers question: http://stackoverflow.com/q/28112291
has body: Try using two different timers. One for $trackListing and another for $infoIcon
score: 0

http://stackoverflow.com/a/27973885
has comment: http://stackoverflow.com/comment/44343069
has comment: http://stackoverflow.com/comment/44343418
has comment: http://stackoverflow.com/comment/44342489
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44341320
answers question: http://stackoverflow.com/q/27973439
has body: This is how you do it properly... HTML: link 1 link 2 more link 3 link 4 CSS: ul ul { display: none;} .more:hover + ul { display: block;} What you need to make note of, is the use of + in the selector. Anything after your hover state will need this so it knows the immediate siblings need to be affected.
upvote count: 1

http://stackoverflow.com/comment/97425940
has text: These are two different fields what if the query is if to is either bob or julie how to do that?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/28036032
type: AnswerComment

http://stackoverflow.com/q/28107811
has title: Medium.js editor
tagged with: javascript
tagged with: jquery
has body: I'm using Medium.js (http://jakiestfu.github.io/Medium.js/docs/) to handle contenteditables. My problem is following: In the contenteditable i have some media elements (videos,images,maps) wrapped with figure. These elements are on the left side of the contenteditable. When i want to write something on the right side of an media element, there is just no Paragraph - and no paragraph is created. So i can not write there. Here is my code: &lt;div id="itemBlocks" contenteditable="true"&gt; &lt;figure class="mediaElement" contenteditable="false"&gt; &lt;/figure&gt; &lt;/div&gt; editor: new Medium({ element: document.getElementById('itemBlocks'), modifier: 'auto', placeholder: "Your text", autofocus: true, autoHR: true, mode: MediumEditor.richMode, maxLength: -1, modifiers: { 'b': 'bold', 'i': 'italicize', 'u': 'underline', 'v': 'paste' }, tags: { 'break': 'br', 'paragraph': 'p', 'outerLevel': ['pre', 'blockquote', 'figure', 'div'], 'innerLevel': ['a', 'b', 'u', 'i', 'img', 'strong', 'div', 'button'] }, cssClasses: { editor: 'Medium', pasteHook: 'Medium-paste-hook', placeholder: 'Medium-placeholder', clear: 'Medium-clear' }, attributes: { remove: [], }, pasteAsText: true, }); Thanks for your help :) EDIT: I created a jsfiddle: http://jsfiddle.net/wm4dn947/10/ In this case i just set a p Element under the figure Element. But the problem remains, that the figure gets destroyed and that the Medium.js is not creating automatically a new p Element.
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44852907
favorite count: 0
type: UnansweredQuestion
tagged with: css
answer count: 0
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44870844
type: Question

http://stackoverflow.com/comment/44423219
type: AnswerComment
comment on: http://stackoverflow.com/a/27996616
type: Comment
has text: console.log(index) lets you see the value in index while debugging
score: 0

http://stackoverflow.com/comment/44615347
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28118024
has text: Thanks for this answer, this is what I needed. I am now getting an Error: [$injector:unpr] Unknown provider: inputProvider <- input <- pageFilter
type: AnswerComment

http://stackoverflow.com/comment/46401545
has text: I'm using your script :) - it's putting the text in a different place in every document... rather than uniformly placing the text.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27972951
score: 0

http://stackoverflow.com/comment/44461007
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28034771
has text: I don't know about coffeescript but the browsers these days come equipped with debugging consoles (specifically for client script). When you Press F12 on your browser it will show you the debugging controls. You can check the data values in the console but posting console.log (this is what I do in JavaScript) so if I do console.log(data) it will show me what my data contains.
score: 0

http://stackoverflow.com/comment/44391386
score: 0
type: Comment
has text: In your question, you said "hide", which means "put or keep out of sight; conceal from the view". You should have mentioned that in your question.
comment on: http://stackoverflow.com/a/27998340
type: AnswerComment

http://stackoverflow.com/q/28055545
has comment: http://stackoverflow.com/comment/44493530
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/44493778
has comment: http://stackoverflow.com/comment/44492993
upvote count: 0
has comment: http://stackoverflow.com/comment/44493386
has comment: http://stackoverflow.com/comment/44493718
has answer: http://stackoverflow.com/a/28055929
tagged with: javascript
has comment: http://stackoverflow.com/comment/44493048
has comment: http://stackoverflow.com/comment/44492915
has comment: http://stackoverflow.com/comment/44492903
answer count: 1
has body: there is a failure of my php script to parse. The Mozilla error console gives me syntax error: expected expression, got &lt; can anyone tell me what is wrong with my script. any help is much appreciated. thankyou &lt;?php Header("content-type: application/x-javascript"); function returnimages($dirname=".") { $pattern="\.(jpg|jpeg|png|gif|bmp)$"; $files = array(); $curimage=0; if($handle = opendir($dirname)) { while(false !== ($file = readdir($handle))){ if(eregi($pattern, $file)){ echo 'galleryarray[' . $curimage .']=["' . $file . '"];' . "\n"; $curimage++; } } closedir($handle); } return($files); } echo "var galleryarray=new Array();" . "\n"; returnimages(); ?&gt;
has comment: http://stackoverflow.com/comment/44493339
has comment: http://stackoverflow.com/comment/44493692
favorite count: 0
has comment: http://stackoverflow.com/comment/45050611
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/44493013
tagged with: php
has title: php embeded javascript parse error php tags causing "syntax error: expected expression, got <"
has comment: http://stackoverflow.com/comment/44493736

http://stackoverflow.com/comment/44452870
type: Comment
type: QuestionComment
has text: You're not stupid. There's a lot we don't know; fortunately Stack Overflow helps us fill in those gaps more easily.
comment on: http://stackoverflow.com/q/28033932
score: 3

http://stackoverflow.com/q/28070967
has body: In an angular application using angular-ui-bootstrap, we have some icons which provide some information to the user: I'm using phantomjs to create screenshots of the application, and I need the popover to be visable on the screenshot. While in the angular-ui documentation there is nothing mentioned about showing a popover programmatically, I found a section in the bootstrap documentation which mentioned the popover method, so I tried: $('.icon-info').popover('show') which is not working (but jQuery is available in the application). How do I open the popover programmatically (from the context of PhantomJS / browser console)?
tagged with: phantomjs
type: AnsweredQuestion
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/44527500
type: Question
accepted answer: http://stackoverflow.com/a/28083206
tagged with: javascript
tagged with: angular-ui-bootstrap
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
has title: Programmatically open popover in angular-bootstrap
linked to: http://stackoverflow.com/q/23073156
has answer: http://stackoverflow.com/a/28083206

http://stackoverflow.com/q/27971489
has comment: http://stackoverflow.com/comment/44335777
downvote count: 0
has comment: http://stackoverflow.com/comment/44371579
has title: Refresh specific page with Angular, Express and Jade (using html5mode)
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/28090860
has comment: http://stackoverflow.com/comment/44492169
has comment: http://stackoverflow.com/comment/44493438
has comment: http://stackoverflow.com/comment/44493208
has comment: http://stackoverflow.com/comment/44493507
has comment: http://stackoverflow.com/comment/44370825
has comment: http://stackoverflow.com/comment/44514806
score: 6
tagged with: page-refresh
upvote count: 6
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44493635
has comment: http://stackoverflow.com/comment/44494294
has comment: http://stackoverflow.com/comment/44515288
has comment: http://stackoverflow.com/comment/44493841
type: Question
accepted answer: http://stackoverflow.com/a/28090860
has comment: http://stackoverflow.com/comment/44335881
has comment: http://stackoverflow.com/comment/44494193
has comment: http://stackoverflow.com/comment/44492371
possible better answer: http://stackoverflow.com/a/28160999
has comment: http://stackoverflow.com/comment/44336401
tagged with: javascript
has answer: http://stackoverflow.com/a/28160999
tagged with: express
has comment: http://stackoverflow.com/comment/44336071
has body: I'm trying to refresh a page and execute client route to open a template inside ng-view Index.jade extends layouts/default block content section(data-ng-view) script(type="text/javascript"). window.user = !{user}; default.jade doctype html html(lang='en', xmlns='http://www.w3.org/1999/xhtml', xmlns:fb='https://www.facebook.com/2008/fbml', itemscope='itemscope', itemtype='http://schema.org/Product') include ../includes/head body div(data-ng-include="'static/modules/core/views/core.header.view.html'", data-role="navigation") div(data-ng-include="'static/modules/core/views/core.index.view.html'", data-role="navigation") div(data-ng-include="'static/modules/core/views/core.menu.view.html'", data-role="navigation") div(data-ng-include="'static/modules/core/views/core.footer.view.html'", data-role="navigation") include ../includes/foot Server route // Camera Routes app.get('/api/cameras', cameras.all); app.post('/api/cameras', auth.requiresLogin, cameras.create); app.get('/api/cameras/:cameraId', cameras.show); app.put('/api/cameras/:cameraId', auth.requiresLogin, auth.article.hasAuthorization, cameras.update); app.del('/api/cameras/:cameraId', auth.requiresLogin, auth.article.hasAuthorization, cameras.destroy); app.param('cameraId', cameras.camera); // Home route app.get('/', index.render); express.js /** * Module dependencies. */ var express = require('express'); var flash = require('connect-flash'); var helpers = require('view-helpers'); var config = require('./config'); module.exports = function(app, passport) { console.log('Initializing Express'); app.set('showStackError', true); //Prettify HTML app.locals.pretty = true; //Should be placed before express.static app.use(express.compress({ filter: function(req, res) { return (/json|text|javascript|css/).test(res.getHeader('Content-Type')); }, level: 9 })); //Setting the fav icon and static folder app.use(express.favicon()); app.use('/static',express.static(config.root + '/public')); //Don't use logger for test env if (…
has comment: http://stackoverflow.com/comment/44336161
has comment: http://stackoverflow.com/comment/44494124
has comment: http://stackoverflow.com/comment/44335712
has comment: http://stackoverflow.com/comment/44492234
answer count: 2
has comment: http://stackoverflow.com/comment/44528687
has comment: http://stackoverflow.com/comment/44492966

jquery-ui-layout
tags question: http://stackoverflow.com/q/28071098
tag name: jquery-ui-layout
type: Tag

http://stackoverflow.com/comment/44384309
type: AnswerComment
type: Comment
has text: hurray. nice work. i tried and it is working perfectly. http://i.imgur.com/3kVY86p.jpg
comment on: http://stackoverflow.com/a/27997067
score: 0

requestanimationframe
tags question: http://stackoverflow.com/q/27982470
type: Tag
tag name: requestanimationframe
tags question: http://stackoverflow.com/q/28071002

http://stackoverflow.com/q/27973970
possible better answer: http://stackoverflow.com/a/27974047
upvote count: 1
has answer: http://stackoverflow.com/a/27974034
type: Question
has title: jQuery .on() not working correctly
accepted answer: http://stackoverflow.com/a/27974024
tagged with: javascript
has body: This is going to be a hard one to explain... I have a button which is a custom like button. Like Post After the user clicks like, I do an AJAX call and add a row to the DB and then add and remove the class. btn.removeClass('btn-success') .removeClass("like-post") .addClass('btn-default') .addClass('unlike-post') .html(" Un-like"); This is all working okay, except after the class have changed to 'unlike-post' the button still reacts to a like-post class trigger. So I have this: $(".like-post").on('click', function(){ }); Which carries out that action even after the button doesn't have a class of like-post. I have checked and the class is definitely getting removed / added correctly. I want to carry out another action with the unlike-post class but can't until this is resolved. I have noticed a similiar issue elsewhere on my site regarding .on(). I cannot recreate the issue in jsFiddle since it works fine there. Using bootstrap + latest jQuery version. Any ideas? I know its a long shot but thought someone might have had a similiar issue. Thanks.
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27974024
has answer: http://stackoverflow.com/a/27974065
has comment: http://stackoverflow.com/comment/44340874
has answer: http://stackoverflow.com/a/27974047
answer count: 4
tagged with: jquery-on
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/44446980
comment on: http://stackoverflow.com/q/28030299
has text: That would be the whole script at least the part which is not working '11111....' is visible including the input. '222222...' is not visible, not even the string of 2. '333333...' is visible but result === null
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27983405
score: -2
has body: I am using Bootstrap Tabs in my HTML page. Here is the HTML code. I am trying to activate the #descr tab through an explicit a element, but one that is outside of the nav-tabs structure. Any idea how it can be done. Read More Specification Description HELLO Description
has answer: http://stackoverflow.com/a/27983481
linked to: http://stackoverflow.com/q/7862233
has comment: http://stackoverflow.com/comment/44358682
has comment: http://stackoverflow.com/comment/44358923
has title: Activate a Tab using a link elsewhere on the page
downvote count: 4
has comment: http://stackoverflow.com/comment/44358795
has answer: http://stackoverflow.com/a/27983583
tagged with: javascript
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/44358858
accepted answer: http://stackoverflow.com/a/27983583
upvote count: 2
tagged with: twitter-bootstrap
answer count: 2
possible better answer: http://stackoverflow.com/a/27983481

http://stackoverflow.com/comment/44526211
type: AnswerComment
score: 4
has text: @JLRishe I guess you're right, it is indeed iterators that are ordered - iterables are not.
type: Comment
comment on: http://stackoverflow.com/a/28066851

http://stackoverflow.com/comment/44546975
has text: Jarlax subset should be in continuous order.
type: Comment
comment on: http://stackoverflow.com/q/28084436
type: QuestionComment
score: 0

http://stackoverflow.com/q/27995730
type: Question
tagged with: if-statement
tagged with: javascript
has comment: http://stackoverflow.com/comment/44381904
upvote count: 1
has body: I'm really trying to avoid nesting in this code snippet... deal_trade_in_model_1 = document.getElementById('deal_trade_in_model_1').value; deal_trade_in_amount_1 = document.getElementById('deal_trade_in_amount_1').value; if (typeof deal_trade_in_model_1 !== 'undefined' &amp;&amp; deal_trade_in_model_1 !== null) { console.log(deal_trade_in_amount_1); console.log(deal_trade_in_model_1); if (deal_trade_in_model_1 !== null || deal_trade_in_model_1 !== "") { if (deal_trade_in_amount_1 == null || deal_trade_in_amount_1 == "") { console.log('entered into function'); document.getElementById("deal_trade_in_model_1").value = ""; document.getElementById("deal_trade_in_amount_1").value = ""; } } } Basically, what this function does is take the value of two fields... things to know about them and what I want to do to them: 1) They're NOT required 2) If one of them is filled out, the other must be 3) If ONLY one of them is filled out, the user clicks submit, and this part of the function is called upon, I want to delete the value of both of them. I've tried doing a compound of &amp;&amp; (and) and || (or) buttttt it odiously it didn't work. Primary question: What's the best way to get rid of the nesting (I planned on doing this twice and just swapping the code) that will be the most efficient? This, I want, to be done preferably in the smallest amount of IF statements possible. Please note: If you change the code a lot, I might not know what you're talking about.. please be prepared to teach me or help me learn!
answer count: 1
tagged with: nested
favorite count: 0
has answer: http://stackoverflow.com/a/27995770
has comment: http://stackoverflow.com/comment/44381906
accepted answer: http://stackoverflow.com/a/27995770
has comment: http://stackoverflow.com/comment/44381876
has comment: http://stackoverflow.com/comment/44381893
has title: "If" consolidation/avoiding nesting
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/q/28101041
has body: return res.send({"user": user}); the user object returned is like this(see below), but I want to hide the password, confirmationToken and also the __v fields. { "user": { "_id": "566786", "detail": { "lastUpdate": "2015-01-22T22:06:22.951Z", "registrationDate": "2015-01-22T02:15:07.379Z", "firstName": "Testing", "lastName": "Testing", }, "info": { "confirmationToken": "3dc917fbfd6f47e", "password": "$2a$08$4ugeIPC.5nCMQiyutL11i", "email": "testing@abcdefgxxxxxx.com", } }, } I want it to be like this: { "user": { "_id": "566786", "detail": { "lastUpdate": "2015-01-22T22:06:22.951Z", "registrationDate": "2015-01-22T02:15:07.379Z", "firstName": "Testing", "lastName": "Testing", }, "info": { "email": "testing@abcdefgxxxxxx.com", } }, } How should I filter out those fields that I don't want?
answer count: 1
tagged with: javascript
has title: Don't want to return the whole object, how to filter out the things that I don't want?
type: UnansweredQuestion
tagged with: node.js
score: 0
type: Question
has comment: http://stackoverflow.com/comment/44577755
has answer: http://stackoverflow.com/a/28101062

http://stackoverflow.com/q/28117769
tagged with: javascript
tagged with: jquery
score: 0
has body: I have an array of strings, within each string I want to call a variable Strings = ["$username thanks for visiting","Thanks $username, but I don't understand the command $userProvidedCommand"] now I know I can use string replace msg.replace('$username', userame) however I don't want to write a string replace for every possibility. what would be ideal , I think. would be to have have some sort of pattern replacement where it looks for the $ and breaks the string up and concatenates it back together with the variable. Is there a way to do that, or maybe there is a better solution ? thanks
answer count: 1
has title: replace string value with variable
has comment: http://stackoverflow.com/comment/44609672
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28117858
has comment: http://stackoverflow.com/comment/44609774
type: Question
accepted answer: http://stackoverflow.com/a/28117858

http://stackoverflow.com/comment/44329565
score: 1
type: Comment
has text: If it is declared in your index page when are you including this?
type: QuestionComment
comment on: http://stackoverflow.com/q/27968321

http://stackoverflow.com/q/28091248
has comment: http://stackoverflow.com/comment/44559340
type: Question
accepted answer: http://stackoverflow.com/a/28091468
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44561152
answer count: 1
has comment: http://stackoverflow.com/comment/44560505
has title: Why is my value getting appended to the hidden field instead of overwritten?
has comment: http://stackoverflow.com/comment/44559317
has answer: http://stackoverflow.com/a/28091468
has body: I have a simple filesector i have made (with links as the file names). When i click a filename the following javascript is run: The value being set in the hidden field is the internal id of my file (database id), and the filename is for display. My problem is that when i repeatedly select a new file, post the form and then selct and post then form etc. etc. Then the value from the file select is appended to the forms collection, so that when i post the form i get something like: 176, 178, 179, as the values, instead of just 176 which is the latest value I have selected. *edit: markup added * This is the markup, please ignore the Razor variables, i named the id's of the input fields to match the javascript, in my code they are generated server side: @setting.SettingData.Name @setting.SettingData.Description Select File @setting.SettingData.Alias edit: This the entire markup, rendered: Name : Description : This is a poll to take when entering the library Template : Simple Poll Template Path : Block host exit : Change Picture Application configuration Submit Text This is the text for the submit button submittext Multiple choice This determines if the poll has multiple right answers ismultiplechoice Question This is the question and the answers for the poll question werwe Answer: Show Answer to user determines if the user should see answers showanswer Background Please select a background image Select File background ×Close Select file All iStock_000032787140Large.jpg 52_fordele.jpg 11376047043_a06bed34bd_o.jpg DigitalSignage.png mediawall_search_br.jpg Test interactive folder 611a756c4c3d338fc4ffcebf8b1979d6.png Close background sdhsdsd
has comment: http://stackoverflow.com/comment/44560097
linked to: http://stackoverflow.com/q/841722
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44559519
score: 0
has comment: http://stackoverflow.com/comment/44559171
has comment: http://stackoverflow.com/comment/44559951

http://stackoverflow.com/q/28121820
upvote count: 4
type: AnsweredQuestion
downvote count: 0
has title: How to write a getworldposition function in Three.js?
possible better answer: http://stackoverflow.com/a/51111484
has answer: http://stackoverflow.com/a/51111484
favorite count: 0
accepted answer: http://stackoverflow.com/a/28143865
type: Question
answer count: 2
tagged with: three.js
score: 4
has body: How to write a getworldposition function in Three.js that returns a vector? That's my code to get the World Position of obj stored in vector vec. obj.updateMatrixWorld(); var vec= new THREE.Vector3(); vec.setFromMatrixPosition(obj.matrixWorld); Now I want use this three lines as a function to use it like: var vector = getWorldPosition(obj); Is this the right way to do it? function getWorldPosition(obj) { obj.updateMatrixWorld(); var vec= new THREE.Vector3(); vec.setFromMatrixPosition(obj.matrixWorld); return {vec.x, vec.y, vec.z}; // Like this? }
has answer: http://stackoverflow.com/a/28143865
tagged with: javascript

http://stackoverflow.com/q/28021488
tagged with: postmessage
has title: Chrome Extension Stops When Page Refreshes
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/44429661
type: Question
has comment: http://stackoverflow.com/comment/44429697
has comment: http://stackoverflow.com/comment/44442941
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44442987
has body: I have written a chrome extension that works on a page that has a countdown. When the countdown finishes, the site runs some xhr requests to update the page. When the page is updated from the xhr request, my extension stops working. I first tried setting a timeout on the content script, but this does not work. I then tried getting it to wait in the background page until countdown is finished, then send a postMessage request back to the content script, but this does not work either. Is there another way to keep the content script alive when the page refreshes? I apologise that I can't be more specific and supply code, but the project is for a company that do not want details passed on at the moment. Any help would be greatly appreciated. I can't get authorisation to post actual code, but here is how I pass messages from background to content: content.js var port = chrome.extension.connect({ name: "Background Sniper" }); port.onMessage.addListener(function (msg) { //code goes here to test the msg } background.js var port = chrome.extension.onConnect.addListener(function (port) { port.onMessage.addListener(function (msg) { //code goes here } The webpage tells me an epoch time when the countdown ends, so in the background.js I set: function(countdownEndTime){ setTimeout(function(){ port.postMessgae("GO") }, new Date().getTime - countdownEndTime) But for some reason the content.js never receives the "GO" message.
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/44438166
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44433734
answer count: 0

http://stackoverflow.com/a/28007761
has body: You probably can pipe a stream to a variable, but pipe is generally used to pipe the stream to some other method that can utilize the stream, as pipe pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream. For instance, piping a stream to a file someReadableStream.pipe(fs.createWriteStream("result.json")); If you just want the data in a variable, there are events for that, that are probably easier to use, like on('data') var readable = getReadableStreamSomehow(), result = ''; readable.on('data', function(chunk) { result += chunk; }); readable.on('end', function () { // do something with "result" });
upvote count: 8
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/59026277
type: Answer
accepted answer of: http://stackoverflow.com/q/28007514
score: 8
answers question: http://stackoverflow.com/q/28007514
downvote count: 0
has comment: http://stackoverflow.com/comment/59027638

http://stackoverflow.com/comment/44424138
type: AnswerComment
type: Comment
has text: I actually mean to add a eventlistener only to the intended element i.e.., #parent.
comment on: http://stackoverflow.com/a/28005859
score: 0

http://stackoverflow.com/q/28112161
tagged with: javascript
has answer: http://stackoverflow.com/a/28112280
tagged with: express
favorite count: 0
accepted answer: http://stackoverflow.com/a/28112280
has body: I am trying to create a tagging system for my records, and assumed that I would be able to create separate tags by using req.body.tags.trim().split(","); on my post method, but all of the comma separated values I provide are displated as one URL. Values being written: Values displayed and hovered over: POST method: router.route('/admin/posts/create') // START POST method .post(function(req, res) { console.log("New instance"); var blogpost = new Blogpost(); // create a new instance of a Blogpost model blogpost.title = req.body.title; // set the blog title blogpost.featureImage = req.body.featureImage; // set the blog image blogpost.blogUrl = blogpost.title.toLowerCase().replace(/\s+/g,"-"); blogpost.author = req.body.author; // set the author name blogpost.tagline = req.body.tagline; // set the tagline blogpost.content = req.body.content; // set the blog content blogpost.category = req.body.category; // set the category blogpost.tags = req.body.tags.trim().split(","); // set the tags //Save Blog Post blogpost.save(function(err) { if (err) res.send(err); res.redirect(303, '/'); //NEEDS TO BE CHANGED }); }) // END POST method .get(isLoggedIn, function(req, res, blogpost) { res.render('pages/blogpost-create', { blogpost : blogpost }); }); Blogpost-create.ejs: Header Image: Please select a file Title: Author: Blog Author Category: Test 1 Test 2 Test 3 Test 4 Tagline: Content: Tags: Blogpost.ejs (Where values are displayed): <% include ../partials/header %> <%= blogpost.title %> <img src="<%= blogpost.featureImage %>" class="img-responsive" id="blogpost-feature-image"> <%= blogpost.dateString %> <%= blogpost.category %> <%= blogpost.tagline %> <%- blogpost.content %> <a href="<%= blogpost.tags %>"><%= blogpost.tags %>
tagged with: ejs
tagged with: node.js
has title: ExpressJS Comma Separating Values
downvote count: 0
type: AnsweredQuestion
score: 1
type: Question
upvote count: 1
answer count: 1

http://stackoverflow.com/q/27989885
has comment: http://stackoverflow.com/comment/44370839
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27990000
score: 0
has title: How to load ajax data into DIV without using .get() or .load()?
linked to: http://stackoverflow.com/q/3595515
answer count: 1
has comment: http://stackoverflow.com/comment/44378067
linked to: http://stackoverflow.com/q/12409600
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44370999
type: Question
has answer: http://stackoverflow.com/a/27990000
has comment: http://stackoverflow.com/comment/44371276
has body: I have been given a URL by a partnering company to load content into a DIV. We put the following onto a page: &lt;div id="catalog"&gt;&lt;/div&gt; And then use .get() to put content into it. A problem arises due to the fact that we're using jQuery 1.3.2 on some of the older sites, and the engineering department is not going to update that any time soon. Both .get() and .load() are giving me errors. I tried things such as: $(document).ready(function () { $.ajax("http://appserv.ourpartneringcompany.com/catalog/?acct=12345",function(data){ $('#catalog').html(data); }); }); The error goes away, but the data doesn't load. Could I use jQuery.ajax()?
has comment: http://stackoverflow.com/comment/44370923

http://stackoverflow.com/comment/44454578
type: Comment
comment on: http://stackoverflow.com/a/28034359
score: 0
has text: I like vanilla ice baby ;-)
type: AnswerComment

http://stackoverflow.com/comment/44365461
type: QuestionComment
comment on: http://stackoverflow.com/q/27987099
has text: Sorry should of been clearer there. The Jquery validation generates that div container with the error message. Element I believe is the input field as that is what it's validating. That's what I've been going on.
score: 0
type: Comment

http://stackoverflow.com/a/28029116
has body: The html button calls the function addPatient(). Note that calling the addPatient function has got nothing to do with executing the previous five lines (outside the function) , which is where the values are getting picked up into the variables. That's why, when the function is called, nothing happens. Also, the function expects 5 parameters in its definition. Then you must call the function with 5 parameters. Or put the act of picking up the values, inside the function, and calling with no parameters. In other words, here are the two ways : Option 1 : Move this code inside the function addPatient. Remove the parameters definition for the function and make it a function with no parameters. var fName = document.getElementById("fname").value; var lName = document.getElementById("lname").value; var bDate = document.getElementById("bday").value; var sName = document.getElementById("location").value; var SSN = document.getElementById("pat_ssn").value; Option 2 : Keep the addPatient function as it is. But, make another function, say, Fetch_And_Add_Patient() that has the following code : function Fetch_Add_Patient() { var fName = document.getElementById("fname").value; var lName = document.getElementById("lname").value; var bDate = document.getElementById("bday").value; var sName = document.getElementById("location").value; var SSN = document.getElementById("pat_ssn").value; addPatient(fName, lName, bDate, sName, SSN); } And then in the HTML button, call the above function, without any parameters, instead of calling addPatient without any parameters. &lt;p&gt;&lt;input type="button" value="Add Patient" onclick="addPatient()"&gt;&lt;/p&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/28027300
answers question: http://stackoverflow.com/q/28027300
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/44540408
type: AnswerComment
score: 0
type: Comment
has text: @LewJasonNuyda: Operator precedence. Use `return !temp[obj.name] && (temp[obj.name] = true);` instead.
comment on: http://stackoverflow.com/a/28080689

http://stackoverflow.com/a/28019213
type: Answer
answers question: http://stackoverflow.com/q/28019074
upvote count: 1
score: 1
downvote count: 0
has body: If you need to edit your firstname and lastname from one single input field, then try using ngchange and call a function to split with space.

http://stackoverflow.com/comment/44403339
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28007569
has text: Post what are you trying (code)
score: 0

http://stackoverflow.com/q/28014538
accepted answer: http://stackoverflow.com/a/28014718
has body: I am writing a plugin to process useful information for myself inside the Amazon seller central dashboard. For some reason a click() call on a Next page link will not fire from inside the context script. The code is running, but this does nothing: var $next = $('a:contains(Next)'); $next.click(); but strangely this works: var $next = $('a:contains(Next)'); window.location = $next.attr("href"); The example of the HTML of the link is: &lt;td align="right" valign="middle" width="60%" class="tiny"&gt; &lt;nobr&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://sellercentral-europe.amazon.com/gp/feedback-manager/view-all-feedback.html?ie=UTF8&amp;amp;currentPage=2&amp;amp;dateRange=&amp;amp;descendingOrder=1&amp;amp;pageSize=50&amp;amp;sortType=Date"&gt;Next&lt;/a&gt; &lt;/nobr&gt; &lt;/td&gt; Are there any restrictions on running click events inside Chrome extension? A button press on another page works just fine (although that one is structured differently - see below): &lt;a class="buttonImage" name="View all your feedback" href="https://sellercentral-europe.amazon.com/gp/feedback-manager/view-all-feedback.html/ref=fb_fbmgr_vwallfb?ie=UTF8&amp;amp;dateRange=&amp;amp;descendingOrder=1&amp;amp;sortType=Date"&gt; &lt;span class="awesomeButton buttonLarge primaryLargeButton inner_button"&gt; &lt;span class="button_label"&gt;View all your feedback&lt;/span&gt; &lt;/span&gt; &lt;/a&gt;
tagged with: javascript
tagged with: jquery
tagged with: google-chrome-extension
answer count: 1
downvote count: 1
upvote count: 4
favorite count: 0
type: AnsweredQuestion
score: 3
type: Question
has title: jQuery click() not working in Google Chrome extension
has answer: http://stackoverflow.com/a/28014718

http://stackoverflow.com/comment/44373189
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27991152
has text: Meteor.publish("my_channel", function() { var userId = this.userId; myFunction(userId); });

http://stackoverflow.com/comment/44455539
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28035059
has text: @PimpTrizkit excellent addendum. `Eval()` is often maligned, typically to prevent XSS attacks. If you control all the script and aren't using any user-input in your `eval()` it is generally safe, if not fast. It remains in the language because it is a useful tool when used properly.
type: Comment

http://stackoverflow.com/comment/44512265
comment on: http://stackoverflow.com/q/28066202
has text: Please show the HTML of the form and name field.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/44617144
type: AnswerComment
type: Comment
has text: @user3208676 All you have to do is move your `xScale.domain` line after the for loop, like you did with the `yScale`.
comment on: http://stackoverflow.com/a/28121168
score: 0

http://stackoverflow.com/a/28077073
type: Answer
score: 0
answers question: http://stackoverflow.com/q/28076930
has body: yes you can do it the same way as java/c# for (var i = 79; i &lt;=80; i++) { $("#DetailsBtn"+i).click(function () { ... } }

http://stackoverflow.com/q/28006499
has answer: http://stackoverflow.com/a/28006552
tagged with: scroll
type: Question
has answer: http://stackoverflow.com/a/28006557
tagged with: javascript
score: 0
answer count: 3
has title: get scroll y position doesn't work in my case
has answer: http://stackoverflow.com/a/28006525
type: UnansweredQuestion
has body: var get_scroll = function(){ y = 0; if( document.body &amp;&amp; ( document.body.scrollTop ) ) { y = document.body.scrollTop; } return y; }; It always return 0, what's wrong in above code? I do console.log(get_scroll());

http://stackoverflow.com/a/28235600
answers question: http://stackoverflow.com/q/28113474
score: 0
has body: It seems that, the problem was that I need to SET !EXTRACT NULL before adding another value to it! That was the problem! VERSION BUILD=8881205 RECORDER=FX SET !ERRORIGNORE YES SET !EXTRACT_TEST_POPUP NO SET !TIMEOUT_STEP 2 TAB T=1 TAG POS= TYPE=A ATTR=CLASS:lienPhotoGrid&amp;&amp;HREF:#/detail/* EXTRACT=HREF TAB OPEN TAB T=2 URL GOTO= TAG POS=1 TYPE=A ATTR=CLASS:unLike&lt;SP&gt;allCommentsLikes&lt;SP&gt;majuscule WAIT SECONDS=2 SET !EXTRACT NULL TAG POS=1 TYPE=A ATTR=CLASS:unLike&amp;&amp;HREF:#/user/*/ EXTRACT=HREF TAB OPEN TAB T=3 URL GOTO= WAIT SECONDS=3 TAG POS=1 TYPE=A ATTR=CLASS:followAction&lt;SP&gt;user-relation-action&amp;&amp;HREF:#&amp;&amp;TXT:Follow TAB CLOSE WAIT SECONDS=1 SET !EXTRACT NULL TAG POS=2 TYPE=A ATTR=CLASS:unLike&amp;&amp;HREF:#/user/*/ EXTRACT=HREF TAB OPEN TAB T=3 URL GOTO= TAG POS=1 TYPE=A ATTR=CLASS:followAction&lt;SP&gt;user-relation-action&amp;&amp;HREF:#&amp;&amp;TXT:Follow TAB CLOSE
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28113474
type: Answer

http://stackoverflow.com/q/28079878
has answer: http://stackoverflow.com/a/28086931
type: Question
tagged with: javascript
tagged with: jquery
score: -1
has title: JavaScript to dynamically make a SVG wont work, why?
answer count: 3
has body: so i wrote this simple script that reads values from input and uses them to build a bar graph dynamically, but for some reason the script isnt working' any ideas? &lt;figure id="fg1"&gt; &lt;input type="hidden" id="myText" value ="10 20 30 15 40 5" /&gt; &lt;figcaption &gt;&lt;br/&gt;Activity Graph &lt;/figcaption &gt; &lt;/figure&gt; &lt;script&gt; var str = document.getElementById("myText").value; var res = str.split(" "); var s = "&lt;svg id="svg1"&gt;"; for (i=0 ; i &lt; res.length; i++) { var cx = i*20; s+="&lt;rect class="hist" " +"x=""+cx+"+"width="20""+"height=""+res[i]*20+" style="fill:rgb(0,0,255);stroke-width:10;stroke:rgb(0,0,0)" /&gt;"; } s+="&lt;/svg&gt;"; $('s').appendTo("#fg1"); &lt;/script&gt;
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/28079898
type: UnansweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/44538471
has answer: http://stackoverflow.com/a/28079933
downvote count: 1

http://stackoverflow.com/a/28108497
type: Answer
has body: You need to wrap it into $(document).ready or move it near the end of body &lt;script type="text/javascript"&gt; $(function() { // this is the equivalent of $(document).ready(function(){ var $answers = $("#answers"); $("#Type").on("change", function() { if ($(this).val() === "click") { $answers.hide(); } else { $answers.show(); } }); }); &lt;/script&gt; The reason is that when the script executes it looks for the elements, but the elements are not yet in the DOM so it can't find them. You need to either tell it to wait until it's ready or move the script at the end after all the elements are ready.
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28108376
answers question: http://stackoverflow.com/q/28108376

http://stackoverflow.com/comment/44577239
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28100834
has text: A prompt is blocking, there's no way to validate the input before the prompt is closed and the value returned. Prompts are generally a horrible idea for a website in 2015, when so many nice alternatives excists.

http://stackoverflow.com/q/27986635
has answer: http://stackoverflow.com/a/27986742
type: AnsweredQuestion
score: 0
has title: jQuery animations conflict
accepted answer: http://stackoverflow.com/a/27986742
has body: I tried to use jQuery animation to animate a div's content and reset everything to default using a close button. The problem is here that after clicking on close button and resetting everything to default, the first animation starts again. $(document).ready(function(){ $(".order-b").click(function(){ $(".order-t").animate({top:'30%'}, "slow" ); $(".order-c").animate({opacity: '1', top:'70%'}, "slow" ); $(".order-ca").delay('800').animate({opacity:'1'}, "slow" ); }).clearQueue().stop(); $(".order-c").click(function(){ $(".order-ca").animate({opacity:'0'}, "fast" ); $(".order-t").delay('800').animate({top:'52%'}, "slow" ); $(".order-c").delay('800').animate({opacity: '0', top:'70%'}, "slow" ); }); }); Order Text What am I doing wrong?!
type: Question
possible better answer: http://stackoverflow.com/a/27986722
has answer: http://stackoverflow.com/a/27986722
tagged with: javascript
answer count: 2
tagged with: jquery
tagged with: animation
has comment: http://stackoverflow.com/comment/44364082

http://stackoverflow.com/comment/44326716
score: 0
comment on: http://stackoverflow.com/q/27966791
has text: @GeorgeOiko there ya go
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28018899
type: Question
tagged with: javascript
has body: I am teaching myself Gulp and am running into a problem using gulp-file-include and Jade—which relies on proper markup indentation. gulp-file-include successfully includes the partials (for things like footers and navigation), but messes up the indentation of the jade when it included these partials. Obviously a wrongly indentated Jade file is going to produce wrongly nested HTML. app/index.jade body ul.navbar h1.logo | Logo .container | Lorem Ipsum... .footer @@include('./_footer.jade') app/_footer.jade .footer-content | hello a(href) my link app/gulpfile.js var gulp = require('gulp'); var fileinclude = require('gulp-file-include'); return gulp.src('./index.jade') .pipe(fileinclude({ prefix: '@@', basepath: '@file' })) .pipe(gulp.dest('dist/')); }); The output body ul.navbar h1.logo | Logo .container | Lorem Ipsum... .footer .footer-content | hello a(href) my link The @@include('./_footer.jade') is clearly nested under .footer in the code but the content of _footer.jade are rendered outside it. If anyone has any experience using this gulp-file-include plugin with a templating language I'd be interested to hear how you solved it!
answer count: 1
downvote count: 0
tagged with: gulp
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46326969
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/29043553
has title: gulp-file-include and jade nesting problems

http://stackoverflow.com/q/28004167
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44397174
has comment: http://stackoverflow.com/comment/44403378
has comment: http://stackoverflow.com/comment/44399415
favorite count: 0
has body: Pulling my hair out on this one. I would like to refresh an access token if the user's access token is just about to expire. authService.isUserLoggedIn() returns a promise and checks if the the user is logged in or not. If not the user's access token is being refreshed. However the problem is that authService.isUserLoggedIn() is async call and before it returns the value, the interceptor will finish its job and the Authorization header will not be populated with the new token... I was looking for a way to wait for the promise to resolve before the script continues. Unfortunately I'm not able to complete what is required. Code: .factory('SEHttpInterceptor', function($injector, ngWebApiSettings) { return { // optional method 'request': function(config) { // add Authorization header if available if (config.url.indexOf(ngWebApiSettings.apiServiceBaseUri) &gt;-1){ var authService = $injector.get('authService2'); authService.isUserLoggedIn().then(function(response){ var authData = $injector.get('$localStorage').getObject("authorizationData"); config.headers.Authorization = 'Bearer ' + authData.token; }); } return config; } }; });
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44397108
has comment: http://stackoverflow.com/comment/60382646
has title: Refresh Token in Interceptor before request is fired
score: 7
has answer: http://stackoverflow.com/a/28004322
upvote count: 7
has answer: http://stackoverflow.com/a/28004329
type: Question
has comment: http://stackoverflow.com/comment/44397006

http://stackoverflow.com/comment/44368735
has text: The `ins` element's `style` attribute will be an error if that's how it actually is and not just a copy/paste mistake.
score: 1
comment on: http://stackoverflow.com/q/27988830
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44382697
score: 0
type: Comment
has text: You should be using a database honestly, JavaScript isn't suppose to be storing this kind of thing. Try NoSQL or SQL DB's.
comment on: http://stackoverflow.com/a/27996123
type: AnswerComment

http://stackoverflow.com/comment/44324613
type: QuestionComment
comment on: http://stackoverflow.com/q/27965834
score: 1
has text: Of course it won't work. After the first error, the element's style is `none`, and you never reset it to `block` to make it visible again.
type: Comment

http://stackoverflow.com/q/28088706
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: asp.net
has title: Remove Radio Button List radio button in Content Place Holder
has answer: http://stackoverflow.com/a/28088862
type: Question
has body: This is workable at normal webpage with body form tag but it cannot get the elements by name when i apply this in a master page content place holder. Can anyone help me out. Thanks a lot. &lt;asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { hideRadioSymbol(); }); function hideRadioSymbol() { var rads = new Array(); var rads1 = new Array(); rads = document.getElementsByName('RadioButtonList1'); //Whatever ID u have given to ur radiolist. rads1 = document.getElementsByName('RadioButtonList2'); for (var i = 0; i &lt; rads.length; i++) document.getElementById(rads.item(i).id).style.display = 'none'; //hide for (var i = 0; i &lt; rads1.length; i++) document.getElementById(rads1.item(i).id).style.display = 'none'; //hide } &lt;/script&gt; &lt;input type="button" data-name="hide" value="Toggle" id="toggle2" class="btnMenu blueMenu"/&gt; &lt;div id="sidebar2"&gt; &lt;asp:RadioButtonList ID="RadioButtonList1" runat="server" CssClass="ph-buttonMenu ph-btn-greyMenu" &gt; &lt;asp:listitem&gt;s1&lt;/asp:listitem&gt; &lt;asp:listitem&gt;s2&lt;/asp:listitem&gt; &lt;asp:listitem&gt;s3&lt;/asp:listitem&gt; &lt;asp:listitem&gt;s4&lt;/asp:listitem&gt; &lt;/asp:RadioButtonList&gt; &lt;/div&gt; &lt;br /&gt; &lt;input type="button" data-name="hide" value="Toggle" id="toggle3" class="btnMenu blueMenu"/&gt; &lt;div id="sidebar3"&gt; &lt;asp:RadioButtonList ID="RadioButtonList2" runat="server" CssClass="ph-buttonMenu ph-btn-greyMenu" &gt; &lt;asp:listitem&gt;s1&lt;/asp:listitem&gt; &lt;asp:listitem&gt;s2&lt;/asp:listitem&gt; &lt;asp:listitem&gt;s3&lt;/asp:listitem&gt; &lt;asp:listitem&gt;s4&lt;/asp:listitem&gt; &lt;/asp:RadioButtonList&gt; &lt;/div&gt; &lt;/asp:Content&gt;
score: 0
has comment: http://stackoverflow.com/comment/44554251
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/27975887
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/27969217
score: -1
upvote count: 0
has body: Remove L.mask(latLngs).addTo(map);

http://stackoverflow.com/comment/44554565
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28087195
has text: "Using it, you can filter your model before using it into the directive." - Could you please give me some examples or show me the direction for this?

http://stackoverflow.com/a/28034081
has body: Heads up: This requires your data to be ordered in a way that parent nodes appear before children reference them. A sort could be done first, if required. Edit: a no-sort solution is posted below Here's a way to do it using Array.prototype.reduce. var arr = [ {id: 1, parent_id: null, title: "Row 1"}, {id: 2, parent_id: 1, title: "Row 2"}, {id: 3, parent_id: 2, title: "Row 3"}, {id: 4, parent_id: 2, title: "Row 4"} ]; var x = arr.reduce(function(map, node) { map.i[node.id] = node; node.children = []; node.parent_id === null ? map.result.push(node) : map.i[node.parent_id].children.push(node); return map; }, {i:{}, result:[]}).result; Explanation. I'll step through the reduce process I used initialize the reduce with {i:{}, result:[]} We'll use the i object as a means of referencing parent nodes and the result array to store top-level root nodes index each node by id using map.i[node.id] = node If the node is a root node (parent_id === null), add it to the result with map.result.push(node) If the node is a child node (parent_id !== null), add it to the children array of the parent node with map.index[node.parent_id].children.push(node) Okay, let's check if it worked // all root nodes // see output below console.log(JSON.stringify(x, null, " ")); // first "root" node console.log(x[0].id); //=> 1 // first child of first root node console.log(x[0].children[0].id); //=> 2 // first child of first child of first root node console.log(x[0].children[0].children[0].id); //=> 3 // second child of first child of first root node console.log(x[0].children[0].children[1].id); //=> 4 All root nodes output [ { "id": 1, "parent_id": null, "title": "Row 1", "children": [ { "id": 2, "parent_id": 1, "title": "Row 2", "children": [ { "id": 3, "parent_id": 2, "title": "Row 3", "children": [] }, { "id": 4, "parent_id": 2, "title": "Row 4", "children": [] } ] } ] } ] If your initial data is unsorted... The reduce method is a little more difficult in this case. Admittedly, pretty much all eleg…
has comment: http://stackoverflow.com/comment/44454017
has comment: http://stackoverflow.com/comment/44453405
has comment: http://stackoverflow.com/comment/44453616
downvote count: 0
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/44454157
has comment: http://stackoverflow.com/comment/44454210
has comment: http://stackoverflow.com/comment/44453373
has comment: http://stackoverflow.com/comment/44467031
answers question: http://stackoverflow.com/q/28033458
score: 3

http://stackoverflow.com/comment/44530670
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28075477
has text: Note that in my example above, itemCount would be a variable that was set outside the loop. I'm presuming that it could be dynamic, but if it's always a known number you could hardcode it, "i < 90" for example.
score: 0

http://stackoverflow.com/q/28038594
type: Question
has title: How can one write correct HTML to an inline Javascript inside a JSP?
tagged with: javascript
upvote count: 2
tagged with: jstl
has answer: http://stackoverflow.com/a/28038847
answer count: 1
tagged with: jsp
favorite count: 0
tagged with: jspx
type: UnansweredQuestion
score: 2
downvote count: 0
has body: Due to some reasons, I have to load two separate page header HTMLs in my page. One of them is a header for mobile view, and the other is for the desktop view. The rest of my page is responsive. My plan is to load both headers' HTMLs inside a JS that loads on page load and depending on page width populate the correct header's HTML inside my page, and hope the corresponding JS and CSS to load. I am doing this since the JS and CSS of the two header HTMLs are prone to clashing (and I can't tinker with these HTMLs), so I want only of them to load on a page load. The problem is in writing HTML in JSP inside this inline JS. I repeatedly get errors like "Uncaught SyntaxError: Unexpected token ILLEGAL". My code in JSP looks like this: &lt;c:when test="${not empty hdrLoggedInHtml and not empty hdrLoggedInHtml_M}"&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ if($(window).width()&gt;420) { $("#desktopHeader").html('&lt;c:out value="${hdrLoggedInHtml}" escapeXml="false"/&gt;'); $("#mobileHeader").html(""); }else { $("#mobileHeader").html('&lt;c:out value="${hdrLoggedInHtml_M}" escapeXml="false"/&gt;'); $("#desktopHeader").html(""); } }); }); &lt;/script&gt; &lt;/c:when&gt; I tried using fn:escapeXml but that didn't work either. It seems to me that the new line after &lt;html&gt; inside the string is not getting output properly or some invisible character is coming somehow. Please help.

http://stackoverflow.com/comment/44374411
score: 0
type: Comment
has text: i just edited my code and put the JSON tree . please take a look at that
type: AnswerComment
comment on: http://stackoverflow.com/a/27991853

http://stackoverflow.com/q/28097541
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: gulp
favorite count: 0
tagged with: gulp-watch
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28098638
score: 2
upvote count: 2
type: Question
has title: Why is gulp so slow on windows machine?
has body: Gulp runs 4 times slower for me on windows than on a mac. I have added the gulp file as well as the command-line output below.The gulpfile is pretty simple. Here is the command-line output: $ gulp [14:00:06] Using gulpfile c:\gulpSample\gulpfile.js [14:00:06] Starting 'scripts'... [14:00:07] Finished 'scripts' after 26 ms [14:00:07] Starting 'watch'... [14:00:07] Finished 'watch' after 30 ms [14:00:07] Starting 'default'... [14:00:07] Finished 'default' after 23 μs The times on a mac are usually 4 times faster Here's the gulp file: var gulp = require('gulp'); var uglify = require('gulp-uglify'); var sass = require('gulp-ruby-sass'); //var plumber = require('gulp-plumber'); //scripts Task //uglifies function errorLog(error){ console.error.bind(error); this.emit('end'); } gulp.task('scripts', function(){ gulp.src('js/*.js') //.pipe(plumber()) .pipe(uglify()) .on('error', errorLog) .pipe(gulp.dest('build/js')); }); //Watch Task gulp.task('watch', function(){ gulp.watch('js/*.js',['scripts']); gulp.watch('scss/*.scss',['styles']); }); gulp.task('default',['scripts','watch']);

http://stackoverflow.com/comment/44493819
type: QuestionComment
score: 0
has text: numerous typos in all the variables `respose0` vs `response` vs `respose`. Hard to know what's what. Suggest you name them differently in each success handler while debugging and readability but make differences more obvious
comment on: http://stackoverflow.com/q/28055960
type: Comment

http://stackoverflow.com/q/28108816
tagged with: visual-studio-2013
tagged with: gridview
type: UnansweredQuestion
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28110594
tagged with: c#
score: 1
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: asp.net
favorite count: 0
has body: Good morning, I have a really strange problem. I created an ASP project using Visual Studio 2013 and I inserted a simple GridView. Then I added a button that allow me to open a modal window with another aspx page. The problem is that when open the modal window, the gridview in the parent page change layout. This is the code: Home.aspx <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> <asp:GridView ID="GridView1" runat="server" CssClass="table table-hover table-striped" AutoGenerateColumns="False"> <asp:BoundField DataField="GymSessionID" HeaderText="ID" /> <asp:BoundField DataField="SessionDate" HeaderText="Date" /> </asp:GridView> Home.aspx.cs protected void Page_Load(object sender, EventArgs e) { TestSimoneEntities ent = new TestSimoneEntities(); GridView1.DataSource = ent.GymSession.ToList(); GridView1.DataBind(); } protected void Button1_Click(object sender, EventArgs e) { string script = @" "; Response.Write(script.ToString()); } Dialog.aspx <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> Dialog.aspx.cs protected void Page_Load(object sender, EventArgs e) { string script = @" "; Response.Write(script.ToString()); } protected void Button1_Click(object sender, EventArgs e) { Label1.Text = "text"; } } As you can see the code is really simple but the gridview changes layout
has title: Asp Gridview Change Layout when open a modal dialog

http://stackoverflow.com/comment/44406114
has text: That's a good idea in spirit, but effectively the only error message we are seeing is during JSON.parse, and that error reporting is very sparse unless you know a better way.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28008852
score: 0

http://stackoverflow.com/q/28036297
linked to: http://stackoverflow.com/q/19338032
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28036298
tagged with: drawimage
score: 0
type: Question
has title: DropzoneJS - IndexSizeError: Index or size is negative or greater than the allowed amount
tagged with: firefox
tagged with: javascript
tagged with: dropzone.js
answer count: 1
has body: I started using DropzoneJS that is a great open source library with 7,043 stars on Github. It provides drag and drop file uploads with image previews. However uploading images bigger than 100k resulted in the following error in Firefox: IndexSizeError: Index or size is negative or greater than the allowed amount in dropzone.js that was raised in the following line: return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); Others have reported experiencing this behavior for thumbnails creation here. This is a common error in Firefox after a bit of research. Most relevant stackoverflow question: 1- Canvas - IndexSizeError: Index or size is negative or greater than the allowed amount

http://stackoverflow.com/comment/44522893
has text: @Daniel I made this example to illustrate my issue, the property that I am trying to bind doesn't persist so I don't want to put it in my model.
score: 0
comment on: http://stackoverflow.com/q/28070943
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44568581
type: Comment
has text: Right. What that means is that you can link to a specific variant of an item. That doesn't mean that it has to be on each page. It shouldn't be on each page. For instance, if there are solid color shorts and plaid shorts, you can link specifically to each of them specifically without having to create separate items in the collection. Right now every URL including the base URL has a variant id at the end of it which shouldn't be happening.
type: AnswerComment
comment on: http://stackoverflow.com/a/28087732
score: 0

http://stackoverflow.com/q/28079874
duplicate of: http://stackoverflow.com/q/17249125
has title: Is there a way to make the window event to be triggered first
answer count: 1
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/28079914
has body: I need to make the event of the window to be triggered first, on clicking on the #myDiv, is there a way to do it? (function ($, w, d) { $(d).ready(function () { $(w).click(function() { alert('window has been clicked'); }); $('#myDiv').click(function () { alert('myDiv has been clicked'); }); }); })(jQuery, window, document); check this out http://jsfiddle.net/au1hpj5L/
score: 1
type: Question
linked to: http://stackoverflow.com/q/17249125
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/28036040
has body: If you wanna get it on separate lines like that for easier readability create your html as a variable and concatenate with the "+" symbol. Also use single quotes for any quotes inside of the main html. Something like: var html = " Add Message " + "Title: " + "Text: " + " "; document.getElementById("add_message").innerHTML = html
score: 0
answers question: http://stackoverflow.com/q/28035938
type: Answer

http://stackoverflow.com/comment/44395768
score: 0
type: Comment
type: QuestionComment
has text: possible duplicate of [How to pass JavaScript variables to PHP?](http://stackoverflow.com/questions/1917576/how-to-pass-javascript-variables-to-php)
comment on: http://stackoverflow.com/q/28003505

http://stackoverflow.com/q/27999600
downvote count: 0
tagged with: javascript
score: 1
linked to: http://stackoverflow.com/q/5873624
favorite count: 0
accepted answer: http://stackoverflow.com/a/27999702
tagged with: angularjs
has title: Javascript/AngularJS: Bind function to every object or make helper object?
possible better answer: http://stackoverflow.com/a/28001098
has body: Just a quick thought, of which I have no idea how to google it. If you get a list of lets say 'persons' from an API in JSON format with AngularJS and you convert it to a JS array/object: [ {firstName: 'Foo', lastName: 'Bar'}, {firstName: 'Banana', lastName: 'Fruit'} ] And you want some general function that joins first and last name into fullName. Is it then generally considered better to use solution 1 or 2? Solution 1 Array consists of objects which have all methods they need inside themself. [ {firstName: 'Foo', lastName: 'Bar', fullName: function(){return this.firstName+' '+this.lastName;}}, {firstName: 'Banana', lastName: 'Fruit', fullName: function(){return this.firstName+' '+this.lastName;}} ] I think this is the most OOP solution, but is in also the best solution in case of Javascript (and long lists)? Solution 2 Make helper function that's only being instantiated once. var helper = function(person) { return person.firstName+' '+person.lastName; } I know this is very basic, but sometimes that is the best stuff to get right ;)
has answer: http://stackoverflow.com/a/28001098
upvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27999702
tagged with: oop
answer count: 2
tagged with: function

http://stackoverflow.com/comment/44400557
comment on: http://stackoverflow.com/q/28006037
has text: possible duplicate of [Can I programmatically open the devtools from a Google Chrome extension?](http://stackoverflow.com/questions/6801577/can-i-programmatically-open-the-devtools-from-a-google-chrome-extension)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27969410
score: 3
downvote count: 0
upvote count: 3
answers question: http://stackoverflow.com/q/27969279
type: Answer
has body: No need for a timeout. Simply call the next iteration as a callback of the last fadeTo method: $(document).ready(function() { var slide = 1; nextSlide(slide); function nextSlide(slide) { $('.content' + slide.toString()) .fadeTo(2000, 1.0) .delay(5000) .fadeTo(2000, 0.0, function(){ if(slide &gt; 5) { slide = 1; } else { slide++; } nextSlide(slide); }); }; }); http://jsfiddle.net/3L09b505/

http://stackoverflow.com/q/28051730
upvote count: 3
type: Question
tagged with: javascript
answer count: 2
score: 3
has title: Preventing cyclic JavaScript events
downvote count: 0
tagged with: events
favorite count: 0
has answer: http://stackoverflow.com/a/28051824
has body: This problem happens to involve D3-specific functions, but is not a D3-specific problem. I have two D3 charts that I have created and attached zoom functionality to, with the goal of keeping the zoom scale and transform positions equal, such that when one chart is zoomed, the other will automatically zoom to the same scale and location. To do this, I trigger a custom event when one chart is zoomed so that I can automatically adjust the other chart: // Within the chart definition: var svg = ...; // The chart body definition var zoom = d3.behavior.zoom() .on("zoom", function(e){ // do stuff... $("#chart-div").trigger({ type: "my.zoom", translate: d3.event.translate, scale: d3.event.scale }); }); svg.call(zoom); I then create methods that allow me to adjust the zoom level of each chart manually, triggering the D3 zoom event in the process: var adjustZoom = function(t,s){ svg.transition().duration(500).call(zoom.scale(s).translate(t).event); }; I then attach event listeners to each of my charts, so that when I interact with one of them and cause its zoom level to change, the other is updated automatically: $("#chart-div1").on("my.zoom", function(e){ chart2.adjustZoom(e.translate, e.scale); }); $("#chart-div2").on("my.zoom", function(e){ chart1.adjustZoom(e.translate, e.scale); }); The obvious problem is that calling the adjustZoom method triggers the D3 zoom event, so attaching event listeners on both charts creates cyclical events, as each chart tries to adjust the other one infinitely. 1. chart1 [manual zoom] --&gt; trigger d3.zoom --&gt; triggers my.zoom 2. chart2 [my.zoom listener] --&gt; trigger d3.zoom --&gt; triggers my.zoom 3. chart1 [my.zoom listener] --&gt; trigger d3.zoom --&gt; triggers my.zoom etc... What I would like to implement is a way to check whether the my.zoom event has already been fired when deciding to trigger another my.zoom event, to prevent the cyclic firing of events (prevent step 3 in the above example), but I don't know how to go about doin…
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28054658

http://stackoverflow.com/q/28013513
has answer: http://stackoverflow.com/a/28013547
score: 0
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28013547
tagged with: jquery
tagged with: flask
accepted answer: http://stackoverflow.com/a/28013975
has comment: http://stackoverflow.com/comment/44414260
has comment: http://stackoverflow.com/comment/44414340
has comment: http://stackoverflow.com/comment/44414317
has comment: http://stackoverflow.com/comment/44414248
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44414299
has comment: http://stackoverflow.com/comment/44414237
has body: I've been stuck with a very stupid and mysterious issue for a few hours. JQuery works when between , but not when called from an external file. I must be making a stupid mistake, but where?? I have this in my HTML (standard bootstrap imports, as you'll notice): ... now, if I code directly inside the file, as below, Title gets displayed as expected: However if I put the same code in custom.js, nothing is displayed. Here is custom.js content: $(function() { $( "#Title" ).append( ' Title ' ); }); And the modified HTML:
has title: Script is not executing from external file
type: Question
has comment: http://stackoverflow.com/comment/44414214
has answer: http://stackoverflow.com/a/28013975
has comment: http://stackoverflow.com/comment/44414210
has comment: http://stackoverflow.com/comment/44414338

http://stackoverflow.com/q/28014727
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44416733
accepted answer: http://stackoverflow.com/a/28014793
answer count: 1
score: 0
has title: JQuery - check checkboxes in table
has body: I'm populating rows in a table from an array. Each row has a checkbox, which I want to be checked depending on certain conditions. So after populating each row, I'm trying to check the checkbox, but using this doesn't seem to check it: if(invoices[i].paid == 'yes'){ $('.filterPaid').prop('checked', false); }else{ $('.filterPaid').prop('checked', true); } This is the code: var invoices = {% raw json_encode(invoices) %}; //console.log(invoices); var addRow = ''; for(var i = 0; i &lt; invoices.length; i++){ //alert(invoices[i].invoiceDueYear); var date = new Date(invoices[i].invoiceDueYear,invoices[i].invoiceDueMonth,invoices[i].invoiceDueDay); var d = date.getDate(); var month = new Array(); month[0] = "Jan"; month[1] = "Feb"; month[2] = "Mar"; month[3] = "Apr"; month[4] = "May"; month[5] = "Jun"; month[6] = "Jul"; month[7] = "Aug"; month[8] = "Sep"; month[9] = "Oct"; month[10] = "Nov"; month[11] = "Dec"; var m = month[date.getMonth()]; var y = date.getFullYear(); var inv = pad(invoices[i].invoiceNo,9,3); if(invoices[i].currency === 'GB'){ var currency = '&amp;#163;'; }else if(invoices[i].currency === 'US'){ var currency = '&amp;#36;'; }else{ var currency = '&amp;#8364;'; } addRow += '&lt;tr&gt;&lt;td&gt;&lt;input type="checkbox" class="filterPaid" id="invPaid'+i+'" value="outstanding" name="filterTasks[]"&gt;&lt;/td&gt;&lt;td class="invoiceView" value="'+invoices[i].uid+'"&gt;&lt;a href="#"&gt;' + inv + '&lt;/a&gt;&lt;/td&gt;&lt;td&gt;' + invoices[i].creditorName + '&lt;/td&gt;&lt;td&gt;' + currency + '' + invoices[i].balance + '&lt;/td&gt;&lt;td&gt;' + d + ' '+ m +' '+y+'&lt;/td&gt;&lt;/tr&gt;'; if(invoices[i].paid == 'yes'){ $('.filterPaid').prop('checked', false); }else{ $('.filterPaid').prop('checked', true); } } $('#invoiceTable tr').first().after(addRow); Why wouldn't it check the checkboxes in this instance?
tagged with: checkbox
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/28014793

http://stackoverflow.com/comment/48342427
has text: Not sure if it's only me, but hashbang url doesnt work for me either, http://example.com/page.html#!key=value is changed into http://example.com/page.html in the table below for me after fetch and render.
comment on: http://stackoverflow.com/a/28043153
type: AnswerComment
type: Comment
score: 2

http://stackoverflow.com/comment/44336008
type: QuestionComment
comment on: http://stackoverflow.com/q/27971660
has text: Submit buttons submit.
score: 0
type: Comment

http://stackoverflow.com/q/27984007
has answer: http://stackoverflow.com/a/27984134
has answer: http://stackoverflow.com/a/27984182
has comment: http://stackoverflow.com/comment/44359285
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I want the data in the text field to transfer to a popup, but when I trigger the popup, it is always blank, no matter what is in the box. Popup Click for popup
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27984224
answer count: 4
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/27984143
has comment: http://stackoverflow.com/comment/44359371
type: Question
has comment: http://stackoverflow.com/comment/44359221
downvote count: 0
tagged with: javascript
has title: How do you use data in a text field?

http://stackoverflow.com/a/27966481
has body: TL;DR instead of removeClass, do this: $('.home').off('click') The event handler (the "function" part after "click") is still attached to the DOM element (the actual element that originally had the class .home) This is what happens: $('.home') creates a jQuery object of the all elements that match ".home", creates an event listener and attaches a handler (the function) to that listener. As long as you don't replace or remove the elements, all event listeners are still working on those elements, and running those functions. You don't need to remove the class, you just need to turn off (remove) the event listener.
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27966271
type: Answer

http://stackoverflow.com/a/27989499
answers question: http://stackoverflow.com/q/27989417
upvote count: 2
type: Answer
score: 2
downvote count: 0
has body: something like this? http://jsfiddle.net/swm53ran/117/ $(document).ready(function() { $('.navbar-toggle').click(function () { if ($(window).innerWidth() &gt; 768) { alert("wide screen"); } else { alert("mobile"); } }); }); the if statement is inside the onclick of the button/link. what you were seeing before was the initial size of the screen (when the if statement was outside the click). so onload of the page, the initial screen size was either wide screen or mobile, and even if you adjusted the width, it was still working off the initial width. however, with this code, when the click event is triggered, it will check the current screen size and alert accordingly

http://stackoverflow.com/comment/44447331
type: QuestionComment
has text: OK, and are you implementing this "custom sorting function" yourself, or is it coming from a library you don't have access to?
comment on: http://stackoverflow.com/q/28031145
score: 0
type: Comment

http://stackoverflow.com/comment/44464643
score: 0
comment on: http://stackoverflow.com/a/28030851
type: AnswerComment
type: Comment
has text: Thanks for this, this is the right direction. With the current version of RxJs (2.3.24) it actually does not work, but I think there is a bug in RxJs, with a small fix the valueOf suggestion works fine. I created a pull request for that: https://github.com/Reactive-Extensions/RxJS/pull/510

http://stackoverflow.com/a/28044109
has comment: http://stackoverflow.com/comment/44471611
has comment: http://stackoverflow.com/comment/44470910
answers question: http://stackoverflow.com/q/28043824
has body: I'm using this one, Check this out. $('#tableSelect tr').click(function(){ $(this).find('input[type=radio]').prop('checked', true); });
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/44471699

http://stackoverflow.com/q/28009734
accepted answer: http://stackoverflow.com/a/28046235
type: AnsweredQuestion
tagged with: webgl
has body: I'm drawing a vbo filled with vertices which look like this: [x, y, r, g, b, ...] using the render mode: LINE_STRIP. I add a value to my vbo using the following function: this.gameBuffer.vertices[this.gameBuffer.vertices.count * this.gameBuffer.vertices.step + 0] = circle.x; this.gameBuffer.vertices[this.gameBuffer.vertices.count * this.gameBuffer.vertices.step + 1] = circle.y; this.gameBuffer.vertices[this.gameBuffer.vertices.count * this.gameBuffer.vertices.step + 2] = circle.r; this.gameBuffer.vertices[this.gameBuffer.vertices.count * this.gameBuffer.vertices.step + 3] = circle.g; this.gameBuffer.vertices[this.gameBuffer.vertices.count * this.gameBuffer.vertices.step + 4] = circle.b; this.gameBuffer.vertices.count++; this.setFloatValues(); I then call it like so: this.addBufferValue({x: x, y: y, r: 1, g: 1, b: 1}); and this is my rendering code: this.gl.vertexAttribPointer(this.defaultShader.prog.attribs['vertexPos'], 2, this.gl.FLOAT, false, 20, 0); this.gl.vertexAttribPointer(this.defaultShader.prog.attribs['acolour'], 3, this.gl.FLOAT, false, 20, 8); this.drawDynamic(this.gameBuffer, this.gl.LINE_STRIP, this.gameBuffer.vertices.length / this.gameBuffer.vertices.step, 1); Game.prototype.drawDynamic = function(updatedData, method, count, step) { this.gl.bufferSubData(this.gl.ARRAY_BUFFER, 0, updatedData.floatVertices); this.gl.drawArrays(method, 0, count * step); } However the width of my lines seems to only be 1px and after further investigation this seems to be the only thickness available. My question is: is it possible to achieve this effect with LINE_STRIP and if it is, how would I achieve that. If it isn't are there any other ways to achieve my goal?
type: Question
tagged with: javascript
has title: WebGl LINE_STRIP Width
has answer: http://stackoverflow.com/a/28046235
score: 0
answer count: 1
tagged with: vbo

http://stackoverflow.com/comment/44577602
comment on: http://stackoverflow.com/a/28100522
has text: I've changed my mind :) The main idea is the same and you were the first who answered,
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/44327207
type: Comment
type: AnswerComment
score: 0
has text: I want to add the foreground only to the current element. When I run two directive, the second one adds foreground to first one also.
comment on: http://stackoverflow.com/a/27966151

http://stackoverflow.com/a/28268672
has body: @Oleg, I had to make some changes to your patch as i was getting javascript errors at 'self'. I think if I had used complete script, it would have worked i guess. Here is my revised code and please let me know if it doesn't look right. } else if (ts.firstElementChild) { //Fix applied by Oleg for gridView=true in IE9. ts.firstElementChild.innerHTML += rowData.join(''); // append to innerHTML of tbody which contains the first row (.jqgfirstrow) ts.grid.cols = ts.rows[0].cells; // update cached first row } else { // for IE8 for example $("#"+$.jgrid.jqID(ts.p.id)+" tbody:first").append($("#"+$.jgrid.jqID(ts.p.id)+" tbody:first").html() + rowData.join('')); //Modified //$tbody.html($tbody.html() + rowData.join('')); // append to innerHTML of tbody which contains the first row (.jqgfirstrow) //doesn't work. ts.grid.cols = ts.rows[0].cells; // update cached first row } It is working now. Thanks for your help. I will test my grid with your forked code tomorrow and let you know the result.
has comment: http://stackoverflow.com/comment/44894578
answers question: http://stackoverflow.com/q/28089919
score: 0
type: Answer

http://stackoverflow.com/a/28037784
accepted answer of: http://stackoverflow.com/q/28037335
has comment: http://stackoverflow.com/comment/44460213
has body: I am not sure what you mean by json API. if you want to submit the json data then here is how you do it. $scope.submit_info = function() { console.log($scope.info) $http({ method: 'POST', url: '/mortgage/submit', data: $scope.info }).success (function(data) { console.log('Data stored'); console.log(data); //redirect only after you recieve response. //$location.path(path); }).error(function(reason) { console.log(reason); //redirect only after you recieve response. //$location.path(errorPath); }); }; go to the following jsFiddle link to see the full code. Mind you there is no backend so it will go to error function. Also you need to add the validations and there are various ways to do it. the best way as per me is to create your own wrapper input fields each validating itself.
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/44820639
answers question: http://stackoverflow.com/q/28037335
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44819373

http://stackoverflow.com/comment/44410263
type: Comment
comment on: http://stackoverflow.com/a/28011319
type: AnswerComment
has text: what is the error?can you see the request in the network tab of your browser,the request header and body?
score: 0

http://stackoverflow.com/comment/44430023
comment on: http://stackoverflow.com/a/28021977
score: 0
type: AnswerComment
type: Comment
has text: Ah, I can't use integers. It needs to be a string. Thanks!

http://stackoverflow.com/comment/44452591
score: 1
type: Comment
comment on: http://stackoverflow.com/a/28032914
has text: `var admin = new AdminUser(arg1, arg2)` it creates a new instance of AdminUser. In AdminUser function `this` and `admin` is the same object. Then you call function `User` and specify that `this` in function `User` will be set to `this` from function `AdminUser` which currently is object `admin`. If you will create new AdminUser and asign it to `superAdmin` (`var superAdmin = new AdminUser(arg1, arg2)`) then `this` in `AdminUser` will refer to `superAdmin` and `this` in `User` will refer also to `superAdmin`.
type: AnswerComment

http://stackoverflow.com/comment/44484723
type: Comment
type: QuestionComment
has text: possible duplicate of [JQuery Add Multiple Check Action Values (of Checkboxes) to Input Text](http://stackoverflow.com/questions/26727045/jquery-add-multiple-check-action-values-of-checkboxes-to-input-text)
score: 0
comment on: http://stackoverflow.com/q/28051245

http://stackoverflow.com/a/28065217
has comment: http://stackoverflow.com/comment/44542012
has body: You need to customize your code and also JSON Object AJAX - Oriented Country: Select City: {{item.name}} Suburb: Your Angular function AjaxCtrl($scope) { $scope.countries = ['usa', 'canada', 'mexico', 'france']; $scope.$watch('country', function(newVal) { if (newVal) $scope.cities = [ { id: 1, name: '11111'}, { id: 2, name: '22222', disabled: true }, { id: 3, name: '33333', disabled: true } ] }); $scope.$watch('city', function(newVal) { if (newVal) $scope.suburbs = ['SOMA', 'Richmond', 'Sunset']; }); } function AjaxCtrl($scope) { $scope.countries = ['usa', 'canada', 'mexico', 'france']; $scope.$watch('country', function(newVal) { if (newVal) $scope.cities = [ { id: 1, name: '11111'}, { id: 2, name: '22222', disabled: true }, { id: 3, name: '33333', disabled: true } ] }); $scope.$watch('city', function(newVal) { if (newVal) $scope.suburbs = ['SOMA', 'Richmond', 'Sunset']; }); } AJAX - Oriented Country: Select usa canada mexico france City: 11111 22222 33333 Suburb: Reference
upvote count: 1
answers question: http://stackoverflow.com/q/28064651
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44541904

set-theory
type: Tag
tag name: set-theory
tags question: http://stackoverflow.com/q/27996620

http://stackoverflow.com/a/28044043
downvote count: 0
has body: A simple way of doing that is creating multiple divs, make all display: none and use Javascript to control the buttons and show/hide divs based on where you are. For example, use the following javascript: var page = 1; $('#next').click( function() { $('#' + page).hide(); page = page + 1; $('#' + page).show(); }); $('#previous').click( function() { $('#' + page).hide(); page = page - 1; $('#' + page).show(); }); I created a jsfiddle so you can see the effect. Basically I have 3 divs with different content, and I switch the content by hiding and displaying the divs depending on what 'page' you are on. This does require jQuery. Using this example that I made, you will not be able to navigate to not existing pages.
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/28044006

http://stackoverflow.com/comment/44678501
type: QuestionComment
has text: @AaronDufour I'm actually using node through an intel edison. Not a browser. I'm trying to connect to a device that has a stream output of events over websockets. I really just need to authenticate and get the event messages. I'm trying https://github.com/theturtle32/WebSocket-Node right now. I've tried the stuff listed above as well as making an options object with the auth header to no avail. I'm kind of surprised this is so difficult.
comment on: http://stackoverflow.com/q/28118695
score: 0
type: Comment

http://stackoverflow.com/comment/57066914
type: Comment
type: QuestionComment
has text: @thenickdude you need more curves there http://board.flashkit.com/board/showthread.php?369672-Draw-a-circle-with-quadratic-bezier-curves&s=0b60c6e70c86babf3bc97000f8e48bb9&p=1977790&viewfull=1#post1977790
score: 0
comment on: http://stackoverflow.com/q/28008608

http://stackoverflow.com/comment/44458306
has text: @Andrew - I made the edit you tried to make based on the [chat discussion](http://chat.stackoverflow.com/transcript/message/21052440#21052440) between yourself and Rodrigo so that the answer would be up to date. Rodrigo, I only edited because it was your suggestion; roll back if you disagree.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28033920

http://stackoverflow.com/comment/44341029
score: 0
has text: Is your goal to understand javascript or to write a pubsub client? look at projects like backbone or node's event emitter for an example.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27973872

http://stackoverflow.com/q/28101121
possible better answer: http://stackoverflow.com/a/28132219
has answer: http://stackoverflow.com/a/28132219
has answer: http://stackoverflow.com/a/28201539
tagged with: css
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/28202648
has body: I'm trying to figure out how to minify &amp; combine js/css code given this situation: I purchased a theme, didn't develop it I'm using several plugins. They are useful, but they output some very ugly code (lot of inline CSS &amp; js, mostly development code with full comments) I'm fairly new to grunt, I've used it in the past with custom web apps, but never with wordpress, I wonder if it can help when you have lots of PHP scripts / pluging which injects their ugly code. So my question is: is there a way to make grunt work with wordpress so that production code is served in the case above? If so, how?
score: 6
tagged with: wordpress
has comment: http://stackoverflow.com/comment/44771071
tagged with: php
upvote count: 6
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28202648
has answer: http://stackoverflow.com/a/28255699
has title: Use grunt with an existing wordpress instance
tagged with: gruntjs
type: Question
has comment: http://stackoverflow.com/comment/44637091
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/28246469

http://stackoverflow.com/a/28099799
has body: if you already have an allow rule, there is not necessary use a Meteor call. Try with this 2 solutions. Template.example.events({ 'click #removeImage':function(event){ event.preventDefault(); var mensaje = confirm('are you sure you want to delete this image?'); if(mensaje === true){ this.remove(); } else { console.log("Nothing was deleted"); } } }) or this. Template.example.events({ 'click #removeImage':function(event){ event.preventDefault(); var mensaje = confirm('are you sure you want to delete this image?'); if(mensaje === true){ Images.remove({_id:this._id},function(err,result){ if(!err){ console.log("Remove success"); } }) } else { console.log("Nothing was deleted"); } } }) Both should work, or latest throw a Access denied on console.
upvote count: 2
answers question: http://stackoverflow.com/q/28099560
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28099560
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44575607

http://stackoverflow.com/comment/44555588
comment on: http://stackoverflow.com/a/28089412
has text: Guys i have spent about 2 days just on this code please have a good look at it - i'm only about a year with JQuery so i may be missing some. as to the php code - echoing - the code is a snippet from a class that does quite a lot so i left out the other code...
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44442909
has text: That's not what I'm saying... Your result is available within the anonymous function that you have passed in: function (results, status). The purpose of that callback is to wait for the results to be ready, so any code that needs to wait for those results should be put within that callback. Another way of doing this would be to follow Felix Kling's advice and pass in your own function as a second callback.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/28028766

http://stackoverflow.com/a/28022273
has comment: http://stackoverflow.com/comment/44433561
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/44434552
answers question: http://stackoverflow.com/q/28022055
has body: You must define the use of '$http' inside the controller, then you can use it in the function. angular.module("Textarea", []).controller("TextAreaCtrl", ['$scope', '$http', function($scope, $http) { $scope.orderList = function() { $http.post('http://example.com'). success(function(data) { $scope.data = data; }). error(function(data, status) { console.log(data); console.log(status); }); }; }];

http://stackoverflow.com/a/27971562
has body: Yes, but you have to change the option, then rebind the event handlers to see the option changes. I hacked this into the "basic" demo from the documentation site: $('#basic-modal .basic').click(function (e) { var modal = $('#basic-modal-content').modal(); $('#overclose').text(modal.o.overlayClose ? 'true' : 'false'); window.setTimeout(function() { // These three lines will do it: modal.o.overlayClose = true; modal.unbindEvents(); modal.bindEvents(); $('#overclose').text('true'); }, 5000); return false; }); After 5 seconds, the option kicks in as you expected. I also hacked an indicator, a span id'd as "overclose", into the modal itself to show you the state and when it changes.
answers question: http://stackoverflow.com/q/27971068
downvote count: 0
has comment: http://stackoverflow.com/comment/44342692
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44347045
accepted answer of: http://stackoverflow.com/q/27971068
type: AcceptedAnswer

http://stackoverflow.com/comment/44364717
type: Comment
type: QuestionComment
has text: @Teemu you are right, I didn't mean to use strings but numbers instead. Thank you, question updated again
score: 0
comment on: http://stackoverflow.com/q/27986800

http://stackoverflow.com/comment/44587412
type: Comment
has text: @RachelD'cruz Yes, i did. It worked when i opened it manually and clicked manually and also it did work when i ran the script and clicked manually. Please check if 'javascript.enabled` is `true` or not when you launch the browser manually.
comment on: http://stackoverflow.com/q/28104277
score: 0
type: QuestionComment

gulp
tags question: http://stackoverflow.com/q/27971458
tags question: http://stackoverflow.com/q/28098487
tags question: http://stackoverflow.com/q/28097541
tags question: http://stackoverflow.com/q/28071361
tags question: http://stackoverflow.com/q/28115226
tags question: http://stackoverflow.com/q/28029929
tags question: http://stackoverflow.com/q/28051743
tags question: http://stackoverflow.com/q/28055894
type: Tag
tag name: gulp
tags question: http://stackoverflow.com/q/27975129
tags question: http://stackoverflow.com/q/27999351
tags question: http://stackoverflow.com/q/28048029
tags question: http://stackoverflow.com/q/28067507
tags question: http://stackoverflow.com/q/28112810
tags question: http://stackoverflow.com/q/28113447
tags question: http://stackoverflow.com/q/28079374
tags question: http://stackoverflow.com/q/28018899
tags question: http://stackoverflow.com/q/28092885
tags question: http://stackoverflow.com/q/27967709
tags question: http://stackoverflow.com/q/27972067

http://stackoverflow.com/comment/44576903
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28100662
type: Comment
has text: tried it, now I'm just getting "Uncaught SyntaxError: Unexpected token ILLEGAL"

http://stackoverflow.com/q/28085481
has title: Angular data-bs-datepicker directive + on date change
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28085904
score: 0
answer count: 1
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/28085904
tagged with: datepicker
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44550928
has comment: http://stackoverflow.com/comment/44550292
tagged with: date
has body: So I have a list of tasks. Each task has a planned start date and a planned end date (plannedStartDate / plannedEndDate). I use ng-repeat to create my table. I need a simple anchor which on click triggers a datepicker AND: has the start date set to the plannedStartDate of the task (it is never null) is bound to the plannedEndDate of the task, as in, whenever a value is selected, I have to somehow catch this event so I can update the DB value (plannedEndDate) of the task. I have to show the date in format: dd/mm/yyyy BUT: both the plannedStartDate and plannedEndDate have this format: 2015-01-01T00:00:00.000 Currently, my datepicker looks like: &lt;a href="#" data-bs-datepicker data-date-startDate="task.plannedStartDate" data-ng-model="task.plannedEndDate" data-date-format="dd/mm/yyyy" data-date-type="string"&gt; &lt;/a&gt; I've tried with and without the date-format and date-type, but neither seem to help me. Also, the start date is automatically set to TODAY if I use this, even though the plannedStartDate of the task is not today. (I'm guessing it's a date formatting issue?) I have tried putting a watch on the tasks array: $scope.$watch('tasks', function (newVal) { /*...*/ }, true); (and with a few more variations like using watch collection etc), but nothing! The change is simply not caught. (also, the dateIndication filter looks like: .filter('dateIndication', function () { return function (task) { if (task.plannedEndDate) { var plannedEndDate = moment(task.plannedEndDate); return plannedEndDate.format('L'); } else { return messages.dashboard.todosAndTasks.noDueDate(); } } }) I would very much need some help. Thank you!
type: Question

http://stackoverflow.com/q/28030328
has answer: http://stackoverflow.com/a/28031941
tagged with: jquery
favorite count: 0
tagged with: mapbox
has title: Lazy loading images that are appended by appendChild() in javascript/leaflet
possible better answer: http://stackoverflow.com/a/28031941
has body: I'm working on a website, http://atlantaartmap.com, which uses leaflet/mapbox to plot street art around Atlanta. The image details are read from a geojson file. While leaflet is reading the geojson, I append thumbnails to a nav bar at the bottom that also link to the corresponding map marker. Appending the images instead of hard coding them allows me to update a single file to change all aspects of the page. I am attempting to use lazy load on these images, but it doesn't seem to work with items that are appended using java script. Any tips? Here is the lazy version of the page I am testing: http://atlantaartmap.com/lazy.html Here is the normal version of the site: http://atlantaartmap.com Thanks in advance. edit: For clarification, I would like the lazy loading script to avoid loading images until they are within the window.
answer count: 4
has answer: http://stackoverflow.com/a/28034710
type: AnsweredQuestion
tagged with: leaflet
tagged with: lazy-loading
score: 1
upvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28034710
has answer: http://stackoverflow.com/a/28030714
has comment: http://stackoverflow.com/comment/44447017
downvote count: 0
has answer: http://stackoverflow.com/a/32530366

http://stackoverflow.com/q/28083156
has answer: http://stackoverflow.com/a/35503430
has answer: http://stackoverflow.com/a/28083313
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/44544558
has answer: http://stackoverflow.com/a/28083443
has comment: http://stackoverflow.com/comment/44544816
type: Question
has title: Angular $http.get query returning html data doesn't display as normal html.. Instead it display as text in website ..
tagged with: javascript
has comment: http://stackoverflow.com/comment/44544947
linked to: http://stackoverflow.com/q/19415394
score: 0
has body: Basically my problem is that when i fetch data using $http.get method of the AngularJS , the Json encoded data which is printed by the PHP doesnt render in the website instead it shows as plain text.. for ex when PHP prints &lt;h3 class=\"someclass\"&gt;Hello World&lt;\/div&gt;" and also simultaneously i try to parse the JSON using JSON.parse but it gives me Syntax Error: Unexpected token o . Basically the received HTML markup is not rendered.. Its just as plain text.. See below: The h3 tag that i rectangled in black doesn't render in the page. Even in the source you can see its not as a markup but as a plain text.
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/28029692
answers question: http://stackoverflow.com/q/28018678
has comment: http://stackoverflow.com/comment/44474316
has body: This is possible by using the document.onkeydown method. You have to get the key press code for the arrow keys: 37 = left 39 = right Then you have to know what data point you are already on. I did this with a scoped variable that contains the point index we are trying to get with a starter value (p). I then changed the naming of the point's options to ttPoint and passed that to the this.tooltip.refresh(); method. The code to capture the key press uses onkeydown. This is document wide. I get the current chart options and the maximum index of the data point such that we do not try to change the tooltip location to a point that does not exist. document.onkeydown = function (e) { var theChart = $('#container').highcharts(); var maxP = theChart.series[0].points.length; console.log(p); switch (e.keyCode) { case 37: console.log('left'); if (p == 0) { p = p; } else { p = p - 1; } theChart.tooltip.refresh(theChart.series[0].points[p]); break; case 38: console.log('up'); break; case 39: console.log('right'); if (p == maxP) { p = p; } else { p = p + 1; } theChart.tooltip.refresh(theChart.series[0].points[p]); break; case 40: console.log('down'); break; } }; I left the up/down codes in there as well if you need them to change the series you are looking at. Sample jsFiddle.
has comment: http://stackoverflow.com/comment/44466047
has comment: http://stackoverflow.com/comment/44466189
has comment: http://stackoverflow.com/comment/44460582
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/28018678

http://stackoverflow.com/comment/44341416
score: 0
has text: Are you certain you have the jsapi imported? Take a look at this example. Works with no errors. And if you put a bad one in the chrome console will tell you which it is. http://jsfiddle.net/a615sx0q/3/
type: Comment
comment on: http://stackoverflow.com/a/27973404
type: AnswerComment

http://stackoverflow.com/a/27975248
has body: Let's talk about page rendering upon initialization and global scope. A scope is the context in which values and expressions are "visible," or can be referenced. The global scope is the context for the whole document. If a value or function is declared here it's visible in every function or expression. The JavaScript in your page is being parsed one script block at a time. When the script block is parsed without errors the script block is transferred into the global scope. The thread (stored in the window object) where all public values and expressions are available. Functions are parsed first, then the rest of the block. However script blocks are parsed one at a time I wrote earlier. So if you make a call to a function not yet in the global scope since it's in another script block that hasn't been parsed yet your code will fail and throw and undefined error. Consider this: A nice alert is shown. the function test is parsed first and test is executed thereafter. This also works. Since functions are parsed first test() still works and alerts 1. This however won't work. Since the function test in the second script block isn't yet parsed calling test() will result in a script error. This does work. The function is declared first and added to the global scope. In the second script block test() looks for a function test in the global scope, finds it and executes it. This is the explanation above applied to your code: Starten
accepted answer of: http://stackoverflow.com/q/27975027
has comment: http://stackoverflow.com/comment/44352102
answers question: http://stackoverflow.com/q/27975027
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/28025728
has title: AngularJs $http post on page load
has answer: http://stackoverflow.com/a/28025801
score: 0
has comment: http://stackoverflow.com/comment/44436769
answer count: 1
has body: my page is display users from database. when form submit i can display $http.post data. But page loaded nothing is displayed. How i can display my $http.post data page loaded(sorry everyone my english very bad) This is my view.html {{mylist.name}} {{mylist.password}} {{mylist.role}} Add new user: Name: Login: user admin data: {{da}} status: {{st}} This is my query.php $con = mysql_connect('localhost', 'root', ''); mysql_select_db('phpang'); if(json_decode(file_get_contents("php://input"))){ $data=json_decode(file_get_contents("php://input")); $fn=$data->name; $ln=$data->pass; $rl=$data->role; $query_ins='insert into users (name,password,role) values("'.$fn.'","'.$ln.'","'.$rl.'")'; mysql_query($query_ins); } $query='select * from users'; $select=mysql_query($query); $myphplist=[]; while ($row=mysql_fetch_array($select)) { $myphplist[]=$row; } $myJson=json_encode($myphplist); echo $myJson;
has comment: http://stackoverflow.com/comment/44436813
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28025801
type: AnsweredQuestion
tagged with: angularjs
type: Question
tagged with: php

http://stackoverflow.com/a/28027651
type: Answer
score: 2
answers question: http://stackoverflow.com/q/28027560
downvote count: 0
has body: In fact oOrigValue is not a number, it's a string. To be able to add another number to it, you'll have to parse it first. There is several methods to do it: var parsedValue = parseInt(oOrigValue, 10); // remember about the second parameter - the radix or simpler, but less readable var parsedValue = +oOrigValue;
upvote count: 2

http://stackoverflow.com/comment/44570763
comment on: http://stackoverflow.com/a/28097427
score: 0
type: AnswerComment
has text: Can you please explain what exactly is a "digest cycle" or a couple of web links explaining the same?
type: Comment

http://stackoverflow.com/comment/44728599
comment on: http://stackoverflow.com/a/28117133
score: 0
type: AnswerComment
has text: Thanks for this Ethaan, only reason I didn't pick it was that Manto had simpler code, unless this one is better or more reliable in some way that I'm not seeing?
type: Comment

http://stackoverflow.com/comment/108075965
score: 0
type: Comment
comment on: http://stackoverflow.com/a/43056160
has text: I undestand the rest of the code but can you explain what this line do? input.dispatchEvent(new Event('input', {bubbles: true}));
type: AnswerComment

http://stackoverflow.com/a/28074741
score: 0
answers question: http://stackoverflow.com/q/28050811
type: Answer
has body: &lt;script&gt; function wizcontroller($scope) { console.log("Controller in the page:" + $scope.$id) var doStuff = function() { console.log("TEST") return "test"; // &lt;- The function needed to return something. :P } }; &lt;/script&gt;

http://stackoverflow.com/q/27994345
linked to: http://stackoverflow.com/q/21358015
score: 0
has answer: http://stackoverflow.com/a/27995082
type: Question
answer count: 2
has title: Using node.js with browserless jQuery via the command line
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27994438
tagged with: jquery
has body: I am trying to run this script below via the command line var argv = require('optimist').argv, $ = require('jquery'), fs = require('fs'); var file = argv._[0]; var html = fs.readFileSync(file, 'UTF-8'); $(html).find('p').each(function(index) { var content = $(this).html(); console.log('Paragraph ' + (index + 1) + ': ' + content); }); //script.js The command is $ node script.js page.html where page.html is the argument The error I get is: ./node_modules/jquery/dist/jquery.js:29 throw new Error( "jQuery requires a window with a document" ); Error: jQuery requires a window with a document at module.exports (./node_modules/jquery/dist/jquery.js:29:12) ... I am using jquery-2.1.3. I know that this used to work, once upon a time, but it looks like something has changed. Also I did follow the instructions at http://rkulla.blogspot.com/2014/04/using-browserify-with-jquery-backbonejs.html but I am still getting the same error. Any help to fix this error would be greatly appreciated. Thank you very much!
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27994438
tagged with: node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27995082

http://stackoverflow.com/a/27996345
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27996110
has body: I have what I was trying to do figured out. Prototype is simply an object type inside an object, refer to this. The second part, and what I was trying to do was set something accessable by _$.function(args) The way to do this, discovered through expierements is: var _$ = function() { //args and variables etc. . . }; _$.myFunc = function(args) { return args; } Then, _$.myFunc(5) returns: 5

http://stackoverflow.com/q/28112273
linked to: http://stackoverflow.com/q/5880318
tagged with: php
has title: PHP JQuery Dialog & Datatables + losing layout
has body: So, I've a file (incident_view.php) with data from database. Everything works ok, and i'm using Datatables... But, i've another page (status.php), and I'm using onclick to open it in a JQuery dialog "incident_view.php" page... Everything works great, the Jquery Dialog opens with correct data, but the table dont have the "Datatable's" layout :( My code in status.php: <?php $plant="MNovo"; ?> <?php echo utf8_encode("$plant");?> What is wrong with it? :/ PS: Datatables inicialization in "incident_view.php"
score: 1
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28112620
tagged with: datatables
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/28123576
has comment: http://stackoverflow.com/comment/47979477
type: Answer
has comment: http://stackoverflow.com/comment/47979084
downvote count: 6
has body: Edit, Updated Removed "nested" ternary pattern; added a) dfd.err(), .catch() to handle Promise.reject(/* reason ? */) arguments passed to dfd.fn(); b) args === "" within dfd.process() to handle "": empty String passed as argument to dfd.fn() c) substituted "chaining" .then() calls for then.apply(dfd.promise, [contactExists, getFirstContact]) Native Error() passed as argument:dfd.fn(new Error("error")) handled at global scope; dfd.fn() still returns dfd.promise. Could possibly adjust before or at dfd.process(), to return "early" at Error or pass Error to dfd.err() ; depending on requirement. Not addressed at js below. Try var dfd = { // set `active` : `false` "active": false, // set `promise`: `undefined` "promise": void 0, // process `arguments`, if any, passed to `dfd.fn` "process": function process(args) { // return `Function` call, `arguments`, // or "current" `dfd.promise`; // were `args`:`arguments` passed ? // handle `""` empty `String` passed as `args` return args === "" || !!args // if `args`:`Function`, call `args` with `this`:`dfd`, // or, set `args` as `value`, `reason` // of "next" `dfd.promise` // return "next" `dfd.promise` ? args instanceof Function &amp;&amp; args.call(this) || args // set `dfd.active`:`false` // when "current" `dfd.promise`:`Promise` `fulfilled`, // return "current" `dfd.promise` : this.active = true &amp;&amp; this.promise }, // handle `fulfilled` `Promise.reject(/* `reason` ? */)`, // passed as `args` to `dfd.fn` "err": function err(e) { // notify , log `reason`:`Promise.reject(/* `reason` ? */)`, if any, // or, log `undefined` , if no `reason` passed: `Promise.reject()` console.log("rejected `Promise` reason:", e || void 0); }, // do stuff "fn": function fn(args /* , do other stuff */) { // set `_dfd` : `this` : `dfd` object var _dfd = this; // if "current" `dfd.promise`:`Promise` processing, // wait for `fulfilled` `dfd.promise`; // return `dfd.promise` _dfd.promise = !_dfd.active // set, reset `dfd.promise` // process call to `…
upvote count: 2
answers question: http://stackoverflow.com/q/28107460
has comment: http://stackoverflow.com/comment/47979368
has comment: http://stackoverflow.com/comment/47979447
score: -4
has comment: http://stackoverflow.com/comment/47979244

http://stackoverflow.com/a/28064336
answers question: http://stackoverflow.com/q/28063455
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28063455
type: Answer
has body: This is now correct and it works.... $(document).ready(function() { $("#to-top").css("display","none"); }); $(window).scroll(function() { if ($(this).scrollTop()) { $("#to-top").fadeIn(); } else { $("#to-top").fadeOut(); } if($(window).scrollTop() + $(window).height() &lt; $(document).height() - $("#sc-main-footer").height()) { $('#to-top').css("position","fixed"); //resetting it $('#to-top').css("bottom","0"); //resetting it } if($(window).scrollTop() + $(window).height() &gt; $(document).height() - $("#sc-main-footer").height()) { $('#to-top').css("bottom","188px"); } }); $("#to-top").click(function() { $("html, body").animate({scrollTop: 0}, 1000); });
score: 0

http://stackoverflow.com/a/28064965
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28064359
has body: var found = test.filter(function( obj ) { return obj.testId == 99; })[0]; if (found) found.current = true;

http://stackoverflow.com/comment/44458212
type: AnswerComment
type: Comment
has text: Since jQuery is in the mix, how about using [`.data()`](http://api.jquery.com/data/) rather than `attr`?
comment on: http://stackoverflow.com/a/28031213
score: 0

http://stackoverflow.com/q/28010866
upvote count: 1
tagged with: underscore.js
possible better answer: http://stackoverflow.com/a/28010985
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28010985
has answer: http://stackoverflow.com/a/28011841
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: backbone.js
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: Backbone router not working
accepted answer: http://stackoverflow.com/a/28011841
has body: I'm trying to create a short document router where contents of a document can be accessed by clicking on its title. I wrote the following program using backbone and underscore, but it is not working! (The program is working to the extent that the title of documents are appearing as a list on the browser) Document Router Any help is much appreciated, thanks!
answer count: 2

http://stackoverflow.com/comment/123320431
score: 0
has text: @nnnnnnn I didn't know that you can only change inline styles like this, but for external styles we have to use `getComputedStyle()`. Should we just always use `getComputedStyle()` since then it wouldn't matter whether the element has an inline style or an external one?
type: Comment
comment on: http://stackoverflow.com/a/28101246
type: AnswerComment

http://stackoverflow.com/q/28006037
has title: Link to DevTools F12
tagged with: internet-explorer
linked to: http://stackoverflow.com/q/6801577
tagged with: firefox
tagged with: javascript
has comment: http://stackoverflow.com/comment/44400413
has comment: http://stackoverflow.com/comment/44400681
has body: I just wondered if there is an opportunity to open the DevTools (in IE,Chrome,FF) via JavaScript or similar? I found a couple of Questions about Chrome here on SO but they al say ist not possible. I thought maybe you there is a way to through a keypress Event for F12?
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44402053
has answer: http://stackoverflow.com/a/28227576
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44402614
has comment: http://stackoverflow.com/comment/44400557
has comment: http://stackoverflow.com/comment/44400558
has comment: http://stackoverflow.com/comment/44400689
tagged with: google-chrome
type: Question

http://stackoverflow.com/comment/44444991
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28029994
has text: Your answer is good by suggesting to bind event on the input, and not on all labels. Anyway, if you mean use spacebar to check the checkbox when you say *"allows for people that navigate forms using the keyboard"*, it think there is no problem at all since the spacebar triggers the `click` as well. +1

http://stackoverflow.com/a/28015084
type: AcceptedAnswer
score: 0
has body: Please see here for demo http://plnkr.co/edit/MLTlizDbck1tzciWltOd?p=preview in your HTML you've got {{contact.name}} instead {{contact.Name}} HTML : {{contact.Name}} {{number.Name}} | {{number.Phone}} JS: var app = angular.module('app', []); app.controller('getPhonebook', function($scope, $http) { $http.get('phonebook.json'). success(function(data, status, headers, config) { $scope.phonebook = data; }). error(function(data, status, headers, config) { alert('error'); }); });
type: Answer
accepted answer of: http://stackoverflow.com/q/28014889
answers question: http://stackoverflow.com/q/28014889
has comment: http://stackoverflow.com/comment/44417532

http://stackoverflow.com/comment/44554762
score: 0
comment on: http://stackoverflow.com/a/28088862
type: Comment
has text: @Amit I agree with you I don't consider that. But the `Name` will not be static event if you use `ClientIDMode="Static"`. AS he is using `getElementsByName`
type: AnswerComment

http://stackoverflow.com/a/28021129
has comment: http://stackoverflow.com/comment/53073454
downvote count: 0
answers question: http://stackoverflow.com/q/28020923
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/44431541
has body: The proper way to send messages between nested controllers is using $scope.broadcast and $scope.emit. Specifically, $broadcast travels downwards in the parent-child scope relationship, and $emit travels upwards. Therefore, if you wanted to communicate with one-controller from within four-controller: function one-controller($scope) { $scope.$on('myEvent', function(event, data) { console.log(data); }); //Output will be ["apple","orange","banana"] } function four-controller($scope) { $scope.$emit('myEvent', ["apple","orange","banana"]); } And using $broadcast if you wanted to communicate downwards instead: function four-controller($scope) { $scope.$on('myEvent', function(event, data) { console.log(data); }); //Output will be ["apple","orange","banana"] } function one-controller($scope) { $scope.$broadcast('myEvent', ["apple","orange","banana"]); }
score: 3

http://stackoverflow.com/comment/44345920
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27976461
has text: Aha, indeed a duplication... Thanks, @DelightedD0D~ Now there should be more keywords pointing to the same question:)

storage
tag name: storage
tags question: http://stackoverflow.com/q/27977815
type: Tag

http://stackoverflow.com/q/28009066
answer count: 1
tagged with: javascript
has title: Define objects to only contain elements of specific type
score: 0
accepted answer: http://stackoverflow.com/a/28009081
has comment: http://stackoverflow.com/comment/44406130
has body: I often use objects in JavaScript to ensure that a list of elements provides a unique key for each entry and to access elements by that key: var obj = { key1: "anObject", key2: "anotherObject", ...}; Note that each entry has the same type (in this case it's a string). How do I model this scenario with TypeScript? I need something like var obj: {...DataType}; It means that an object can contain any number of attributes, which all share the same type.
tagged with: typescript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28009081
type: Question

http://stackoverflow.com/comment/44584210
type: QuestionComment
comment on: http://stackoverflow.com/q/28104697
has text: What function `.tab()` means?
score: 0
type: Comment

http://stackoverflow.com/q/28026377
has title: How to automatically show a dialog that ask confirmation when the user click in an image using JavaScript?
possible better answer: http://stackoverflow.com/a/28026631
has body: I am absolutly new in JavaScript and I have this doubt. I have this clickable image: &lt;img src="&lt;%=request.getContextPath()%&gt;/images/delete.png" alt="remove" id="RemoveProject" style="cursor: pointer;" title="remove" onClick="submitMyProjectAction('&lt;s:property value="idProjectInfo"/&gt;', this.id)" /&gt; As you can see when the user click on the image it is performed this JavaScript function that simply submit a form: function submitMyProjectAction(id, imgId) { alert(imgId); document.getElementById("projectActionId").value = id; document.getElementById("clickedActionId").value = imgId; document.getElementById('myProjectAction').submit(); } I know that should exist a way to automatically open something like a dialog that ask confirmation for this operation. So if the user click on yes the submitMyProjectAction() JavaScript function is performed. But I can't remember the name of this stuff. Can you help me?
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/xhtml
has answer: http://stackoverflow.com/a/28026500
type: Question
answer count: 2
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/28026500
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28026631

http://stackoverflow.com/q/28037680
has body: I'm looking for a way to position the #header element of my page as "fixed" only after having scrolled for around 100% to the right. If left &lt; 100% Then #header { display:none; } If Left > 100% Then #header { position:fixed, top:0, left:0, width:50px, height:50px, color:red, z-index:9999; } I tried this : &lt;script type='text/javascript'&gt; var header = $("#header"); $(document).scroll(function() { if($(this).scrollLeft() &gt; 1920) { header.css({"position" : "fixed", "top" : "0", "left" : "0", "width" : "50px", "height" : "50px", "background" : "red", "z-index" : "9999"}); } else { header.css({"display" : "none"}); } }); &lt;/script&gt; But it doesn't work. And is it possible to make a condition with a percentage instead of an amount of pixels ? (100% instead of 1920) Could you help me, please ?
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28037795
answer count: 1
accepted answer: http://stackoverflow.com/a/28037795
tagged with: css
has title: How to position a div element only after having scrolled horizontally?
tagged with: scroll
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/44344056
has text: I'm sure I could just assign Ids and that will work. I was wondering if there is a way without doing that. This is sort of a learning thing for me.
type: Comment
comment on: http://stackoverflow.com/q/27975760
score: 0
type: QuestionComment

http://stackoverflow.com/a/28009870
type: AcceptedAnswer
score: 4
has body: do I have to do an individual query for each returned id? No ! You only need to make only one another request with the result of your previous request. 1 - Actually you have this : var request = gapi.client.youtube.search.list({ q: q, part: 'snippet', type: 'video' }); request.execute(function(response) { var str = JSON.stringify(response.result); $('#search-container').html('&lt;pre&gt;' + str + '&lt;/pre&gt;'); }); This request give you the id of some YouTube video. 2 - Then you need to concatenate all this video's ID separated with a comma. Example : 'P95nErnCoC4, 1d6z0gyA5ys' See this post: Create comma-delimited string 3 - You need to create another request with the ressource videos.list var request = gapi.client.youtube.search.list({ part: 'statistics', id: 'P95nErnCoC4, 1d6z0gyA5ys, id_next.....' //concatenate ID }); request.execute(function(response) { console.log(response); }); Then you have statistics in only one more request.
answers question: http://stackoverflow.com/q/28001518
accepted answer of: http://stackoverflow.com/q/28001518
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/44547558
score: 0
comment on: http://stackoverflow.com/a/28072540
type: AnswerComment
type: Comment
has text: Sorry, doesn't help, the jquery definition of el/$el explains that $el is a cached version of el and there is no reason you use el directly. Like id, the el parameter given is already stored in the view without having to write this.$el=el

http://stackoverflow.com/comment/44470185
type: AnswerComment
type: Comment
has text: Yes, track by did the trick! I used track by form.displaySize(size) and it worked!
comment on: http://stackoverflow.com/a/28042543
score: 0

http://stackoverflow.com/q/28031887
tagged with: jquery
has body: I'm trying to loop through each tr in my table and get the value of each td where td is a certain class. I'm populating my table like this: var attr = "checked"; $('#mytbody').prepend('&lt;tr&gt;&lt;td class="cb" value="' + attr + '"&gt;&lt;input type="checkbox" ' + attr + ' disabled class="filterPaid" id="invPaid' + i + '" value="outstanding" name="filterTasks[]"&gt;&lt;/td&gt;.......&lt;/tr&gt;'); I'm trying to search like this: $("#paidFilter").change(function() { if(this.checked) { $('#mytbody &gt; tr &gt; td.cb').each(function(){ console.log($(this).val()); }); } }); However this doesn't return any values for the td of class = 'cb'. How could these values be retrieved?
upvote count: 1
has comment: http://stackoverflow.com/comment/44448471
has comment: http://stackoverflow.com/comment/44448603
favorite count: 0
has title: JQuery - Looping through table rows
has comment: http://stackoverflow.com/comment/44448610
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/28032010
has comment: http://stackoverflow.com/comment/44448467
accepted answer: http://stackoverflow.com/a/28032010
type: Question
possible better answer: http://stackoverflow.com/a/28031993
answer count: 2
has answer: http://stackoverflow.com/a/28031993
tagged with: javascript

http://stackoverflow.com/a/27994312
has body: Create customRender : renderCustom('index', { layout: 'layouts/dashboard/slim', title: 'Dashboard', section_one: foo, section_two: bar }); function renderCustom(name, object) { object.partials = {}; object.partials.partial_one = "path/to/partial_one.hjs"; object.partials.partial_two = "path/to/partial_two.hjs"; res.render(name, object); } Or alternatively, you could hot patch the render function. app.use(function (req, res, next) { var render = res.render; res.render = function (view, locals, cb) { if (typeof locals == 'object') { locals.partials = {}; locals.partials.partial_one = "path/to/partial_one.hjs"; locals.partials.partial_two = "path/to/partial_two.hjs"; } render.call(res, view, locals, cb); }; next(); });
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44422881
accepted answer of: http://stackoverflow.com/q/27994159
type: Answer
answers question: http://stackoverflow.com/q/27994159

http://stackoverflow.com/a/27968366
type: Answer
has body: Explanation to the posted problem function addArrayElems(arr) { var sum = 0; for (var i = 0; i &lt; arr.length; i++) { if (typeof arr[i] === "number") sum += arr[i]; for (var j = 0; j &lt; arr.length; j++) { if (typeof arr[i][j] === "number") sum += arr[i][j]; //added this line here. If arr[i][j] is defined and [i][j][0] return sum. if (arr[i][j] &amp;&amp; typeof arr[i][j][0] === "number") sum += arr[i][j][0]; } for (var l = 0; l &lt; arr.length; l++) { if (typeof arr[i][j] === "number") sum += arr[i][j]; } } return sum; } var arr = [1, 2, 3, 4, 5, [6, 7, 8, [9], [10]]]; console.log(addArrayElems(arr)); In your own code you iterated over the parent array arr. When you access arr[i] this will always work. JavaScript will return a value if set or else returns undefined. However when you try to access a property on an non-property (undefined) this will return a script error. You can't ask for the colour of an object that doesn't exist. The code above should return the desired results based upon the sample you've provided (Since the third level arrays are only 1 in length). The above example is just to explain how accessing values in multidimensional arrays work. However you want to do this recursively. I shall show you an example here below: Improved answer (http://jsfiddle.net/o80e7f53/) function addArrayElems(arr) { var sum = 0; for (var i = 0; i &lt; arr.length; i++) { if (typeof arr[i] === "number") { sum += parseInt(arr[i]); //parse number and add to sum. } else if (Object.prototype.toString.call(arr[i]) === '[object Array]') { sum += addArrayElems(arr[i]); } } return sum; } var arr = [1, 2, 3, 4, 5, [6, 7, 8, [9], [10]]]; console.log(addArrayElems(arr)); A recursive function calls itself again. Essentially if your multidimensional array is 100 arrays deep this function would still return all values. In your approach this should take 100 for loops you needed to write singlehandedly. This function loops over the values of an array and returns the sum when a number…
answers question: http://stackoverflow.com/q/27968162
score: 0
has comment: http://stackoverflow.com/comment/44334798

http://stackoverflow.com/a/27976172
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27976106
has comment: http://stackoverflow.com/comment/44345245
has comment: http://stackoverflow.com/comment/44344776
type: Answer
has body: Something similar to the following should work for you in the click event: var myForm = $(this).closest('form'); alert(myForm.prop('id')); You can find more information about closest at http://api.jquery.com/closest/.
has comment: http://stackoverflow.com/comment/44344843
accepted answer of: http://stackoverflow.com/q/27976106
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44344799
has comment: http://stackoverflow.com/comment/44344859
has comment: http://stackoverflow.com/comment/44345272

http://stackoverflow.com/q/28091021
has comment: http://stackoverflow.com/comment/44558680
has comment: http://stackoverflow.com/comment/44558665
linked to: http://stackoverflow.com/q/20764881
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/44558684
upvote count: 4
has answer: http://stackoverflow.com/a/31361168
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: ubuntu
has comment: http://stackoverflow.com/comment/44558833
type: Question
tagged with: node.js
favorite count: 0
score: 4
linked to: http://stackoverflow.com/q/19778249
has body: im trying to set up node on my machine.... installed npm and grunt-cli with -g at root and when i run npm install inside my code directory i get the following error sudo npm install npm WARN prefer global grunt-cli@0.1.13 should be installed with -g npm WARN unmet dependency /home/bhavan/oyo/website/node_modules/grunt-browserify/node_modules/watchify/node_modules/browserify requires resolve@'~0.7.1' but will load npm WARN unmet dependency /home/bhavan/oyo/website/node_modules/grunt-browserify/node_modules/resolve, npm WARN unmet dependency which is version 1.0.0 npm WARN unmet dependency /home/bhavan/oyo/website/node_modules/grunt-browserify/node_modules/watchify/node_modules/browserify requires through2@'^1.0.0' but will load npm WARN unmet dependency /home/bhavan/oyo/website/node_modules/grunt-browserify/node_modules/watchify/node_modules/through2, npm WARN unmet dependency which is version 0.5.1 npm WARN unmet dependency /home/bhavan/oyo/website/node_modules/grunt-bower-task/node_modules/bower/node_modules/bower-config requires mout@'~0.9.0' but will load npm WARN unmet dependency undefined, npm WARN unmet dependency which is version undefined npm WARN unmet dependency /home/bhavan/oyo/website/node_modules/grunt-bower-task/node_modules/bower/node_modules/bower-json requires graceful-fs@'~2.0.0' but will load npm WARN unmet dependency /home/bhavan/oyo/website/node_modules/grunt-bower-task/node_modules/bower/node_modules/graceful-fs, npm WARN unmet dependency which is version 3.0.5 npm WARN unmet dependency /home/bhavan/oyo/website/node_modules/grunt-bower-task/node_modules/bower/node_modules/bower-registry-client requires async@'~0.2.8' but will load npm WARN unmet dependency /home/bhavan/oyo/website/node_modules/grunt-bower-task/node_modules/async, npm WARN unmet dependency which is version 0.1.22 npm WARN unmet dependency /home/bhavan/oyo/website/node_modules/grunt-bower-task/node_modules/bower/node_modules/bower-registry-client requires graceful-fs@'~2.0.0' but…
answer count: 1
has title: Error with npm install
has comment: http://stackoverflow.com/comment/44558732

http://stackoverflow.com/q/28073881
has answer: http://stackoverflow.com/a/28074951
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/28074951
has comment: http://stackoverflow.com/comment/44529028
tagged with: classiejs
tagged with: javascript
has comment: http://stackoverflow.com/comment/44529123
has title: Toggling a second menu with ClassieJS or jQuery?
answer count: 1
downvote count: 0
has body: Currently the code is set up to toggle the same menu for every icon. Here is a fiddle of my current progress http://jsfiddle.net/2Lyttauv/ What I want to achieve is adding a unique menu for each individual icon. I started by creating the following HTML MENU Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 Item 7 Now I'd like to add a second menu to navItem2 the second icon in the sidebar I've tried creating a second menu using the exact same HTML from above except that I've changed the id="slider-menu-s1 and proceeded to make a separate function but that didn't seemed to work. If anyone could help or point me in the right direction.
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/44534553
type: AnswerComment
has text: you are welcome! do you still have any doubts about it or got it completely?
type: Comment
comment on: http://stackoverflow.com/a/28077649
score: 0

http://stackoverflow.com/a/28016076
answers question: http://stackoverflow.com/q/28014972
accepted answer of: http://stackoverflow.com/q/28014972
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44420891
score: 1
has body: I'll take a guess that you're surprised that the following returns undefined: console.log(chart.__privateStatus.yscale); That is because when the following line is executed: render.__privateStatus = { yscale: yscale } the value of the yscale variable is undefined, so that's the value that gets assigned. Changing the value of the variable later has no effect. Note that in javascript, assigning a primitive assigns the actual value, assigning an object assigns a reference to the object. So while __privateStatus is passed a reference to the object, the yscale property is assigned the actual value undefined. For the same reason: console.log(chart.__privateStatus2.yscale); returns undefined because there is: var yscale; var status = { yscale: yscale // yscale is undefined when this assignment is made }; so status.yscale is undefined and later: render.__privateStatus2 = status; is assigned a reference to the same object. Changing the value of yscale later has no effect, its previous value has already been assigned. Same again for: console.log(chart.__privateStatusGetter().yscale); // undefined To get the current value of yscale, change the function to: render.__privateStatusGetter = function() { return yscale; // use closure to variable to get current value } then: console.log(chart.__privateStatusGetter());
type: Answer
upvote count: 1

es6-promise
tags question: http://stackoverflow.com/q/28105248
tags question: http://stackoverflow.com/q/28107460
tags question: http://stackoverflow.com/q/28066429
tag name: es6-promise
tags question: http://stackoverflow.com/q/28079758
type: Tag

http://stackoverflow.com/a/28109059
has comment: http://stackoverflow.com/comment/44594148
downvote count: 0
type: Answer
has body: Sometimes (I had the same problem with the google Hosted librarys) its just the wrong line submitet from the window.onerror event. You probably call a method from the external file, and in this method an error occurs. Just download the javaScript file returned from http://open.mapquestapi.com/sdk/js/v7.2.s/mqa.toolkit.js?key=mykey and include it directly from your webspace (even better if you get the unminified version).
has comment: http://stackoverflow.com/comment/44592950
score: 1
answers question: http://stackoverflow.com/q/28108821
has comment: http://stackoverflow.com/comment/44592659
upvote count: 1

http://stackoverflow.com/q/28112739
has answer: http://stackoverflow.com/a/28114006
has answer: http://stackoverflow.com/a/30046601
has comment: http://stackoverflow.com/comment/44600857
favorite count: 0
has answer: http://stackoverflow.com/a/28177819
has comment: http://stackoverflow.com/comment/44599315
type: UnansweredQuestion
answer count: 4
has answer: http://stackoverflow.com/a/29990007
downvote count: 2
has title: Javascript Files loading in undesired order
type: Question
has comment: http://stackoverflow.com/comment/44599323
upvote count: 0
score: -2
tagged with: javascript
has body: I have two js files I pulled out of script elements. Everything was working until then. Now they're running in the wrong order. // HTML &lt;script src="setup.js"&gt;&lt;/script&gt; &lt;div id="fruit"&gt;&lt;/div&gt; &lt;script src="display.js"&gt;&lt;/script&gt; //// NEW FILE: setup.js window.fruit = {}; window.fruit = "apples"; // this is populated with ajax not shown //// NEW FILE: display.js $('#fruit').text(window.fruit); I get an error saying that window.fruit is undefined. How can I tell the browser to wait to run the second file? I looked at defer, but it only works in IE10. I need IE 8 to work.

http://stackoverflow.com/comment/44553366
type: Comment
has text: There's not enough data in the question to provide a definitive answer. Could you make a MCVE?
score: 0
comment on: http://stackoverflow.com/q/28088082
type: QuestionComment

http://stackoverflow.com/a/28007608
downvote count: 0
answers question: http://stackoverflow.com/q/28007335
has comment: http://stackoverflow.com/comment/44403781
type: Answer
upvote count: 1
has body: You need ensure that your window.onerror be a at the top of your code, if any error was thrown before the window.onerror was declared it will never be catch.
score: 1

http://stackoverflow.com/q/28119001
score: 1
upvote count: 1
type: Question
has title: How to remove a class while typing using jquery
has body: I would like to remove the class that disables the button to submit the form. Can i do it while the user starts typing in the form? the button has the id "add" and the class is "disabled". this is the html form SlackSpot Name SlackSpot Description SlackSpot Latitude SlackSpot Longitude Close this is my jquery code $("#nome,#lat,#lon").on('keyup', function (e) { if ($(this).val().length == 0) { $('#add').prop("disabled", true); } else { $('#add').prop("disabled", false); } })
tagged with: javascript
has answer: http://stackoverflow.com/a/28119128
possible better answer: http://stackoverflow.com/a/28119044
has answer: http://stackoverflow.com/a/28119044
answer count: 2
accepted answer: http://stackoverflow.com/a/28119128
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/a/29329213
has body: you can simply recall chosen plugin after inserting the dynamic dropdown /* code of creating dynamic dropdown after it add: */ $('#ID_OF_DYNAMIC_DROPDOWN').chosen(); in my case i use: var i=$('#table_invoice tbody tr').length; $(".addmore").on('click',function(){ html = ' '; html += ' '+ItemOptions+' '; html += ' '; $('#table_invoice').append(html); $('#itemName_'+i).chosen(); i++; });
type: Answer
score: 0
answers question: http://stackoverflow.com/q/28079984

http://stackoverflow.com/q/27994930
tagged with: jquery-ui-dialog
has body: When I click the "Yes" button on the dialog box, it will stay on screen for 5-10 seconds until the startProcess() function completes. Shouldn't the dialog close before startProcess() begins? I'd like the dialog to respond right away by closing instead of waiting for the startProcess() to complete. $("#dialog-confirm").dialog({ dialogClass: 'no-close', resizable: false, autoOpen: false, maxWidth: 600, width: 400, fluid: true, height: 'auto', modal: true, buttons: { "Yes": function() { $(this).dialog("close"); startProcess(); return true; }, No: function() { $(this).dialog("close"); return false; } } }).css("font-size", "14px");
has answer: http://stackoverflow.com/a/27994958
type: UnansweredQuestion
type: Question
tagged with: jquery-ui
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: jQuery UI modal dialog hangs before closing

http://stackoverflow.com/q/28028599
tagged with: javascript
tagged with: base64
has comment: http://stackoverflow.com/comment/44442451
tagged with: image
score: 0
linked to: http://stackoverflow.com/q/8499633
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44535224
answer count: 0
type: Question
has body: I am having some trouble with displaying a binary image in my HTML from a database. First I am getting the image from the db, and then encoding the response as base 64 using the following function: $scope.frontImage=$window.btoa(unescape(encodeURIComponent(response))); Then in my html I am passing that into the img tag's source like so: src="data:image/jpeg;base64,{{frontImage}}" This, however, is not working. When I inspect the element it only says . The string I am getting from the btoa function looks like this (except obviously much longer): 77+977+977+977+9ABBKRklGAAECAQEsASwAAO+/ve+/vRLvv71FeGlmAABNTQAqAAAACAAHARIAAwAAAAEAAQAAARoABQAAAAEAAABiARsABQAAAAEAAABqASgAAwAAAAEAAgAAATEAAgAAAB0AAAByATIAAgAAABQAAADvv73vv71pAAQAAAABAAAA77+9 Any thoughts? Thank you!
has comment: http://stackoverflow.com/comment/44442766
has title: Using binary image in html tag - Angular

http://stackoverflow.com/q/28037737
has comment: http://stackoverflow.com/comment/44459815
has comment: http://stackoverflow.com/comment/44459855
accepted answer: http://stackoverflow.com/a/28038027
has title: Is script type text/javascript required for IE8?
type: AnsweredQuestion
score: 1
has body: I'm debugging Javascript issue on IE8, and I want to make sure that the problem is not because of this. I can't quite tell if the problem is because of this or because of something else. I search on the whole internet, but I feel it's very hard to get a very straightforward answer on this. Even w3school (people said that it's unreliable) that usually has "which browser support what feature starting from what version" is removing that information for this script tag. I understand there's many similar question on stack overflow that asking if it is okay to omit type attribute on script in general, and the usual answer is yes. But the client decided that the website must support IE8 too, and that's why I just need a straightforward answer: Can I omit type attribute on script tag, on IE8? If I omit it, will it has a problem, like raising Javascript error box, code not run properly, or anything, on IE8? Thanks.
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/4195427
tagged with: internet-explorer-8
has answer: http://stackoverflow.com/a/28038027
tagged with: javascript
has comment: http://stackoverflow.com/comment/44459831
has comment: http://stackoverflow.com/comment/44459786
has comment: http://stackoverflow.com/comment/44464477
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/44503795
comment on: http://stackoverflow.com/q/28061155
type: Comment
type: QuestionComment
has text: have you included angular-route.js in your index.html ?
score: 0

http://stackoverflow.com/comment/44467634
has text: It appears from what op is doing that whole contents should be removed.
comment on: http://stackoverflow.com/a/28042111
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44583937
type: Comment
has text: Hi i have solved this problem :)
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28089517

http://stackoverflow.com/q/28026010
has title: How to run the script both 'on load' and 'on resize' (on a particular window width!) in jQuery?
has comment: http://stackoverflow.com/comment/44437750
tagged with: javascript
has body: In my current website project I've integrated Alvaro Trigo's FullPage plugin but since it had a very uncommon behaviour on mobile devices (also due to my project's design requirements), I've decided to switch it off when the viewport width is below 768px. For this purpose I just add a simple if-statement to the script: $(document).ready(function(){ if ($(window).width() &gt; 768 ) { $('#fullpage').fullpage({ // code... code... code... }); } }); The problem is that it only takes effect after refreshing the page; so when I go below 768px and reload the page the plugin is switched off, but when I then resize the browser above the mentioned breakpoint, it's still off (and vice versa). I think I should add some lines of code dealing with resize, but unfortunately my current knowledge of JS/jQ doesn't let me do that. Thanks in advance for your time.
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28026067
has answer: http://stackoverflow.com/a/28026180
type: Question
has answer: http://stackoverflow.com/a/28026059
score: 0
answer count: 4
has answer: http://stackoverflow.com/a/28026064

http://stackoverflow.com/a/28054710
type: Answer
has comment: http://stackoverflow.com/comment/44497991
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/44503534
has comment: http://stackoverflow.com/comment/44491450
accepted answer of: http://stackoverflow.com/q/28054649
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28054649
has body: Issue is with the selection of rootElement, you need to just get the body via document.body instead you are trying to retrieve it as document.getElementById('body') which does not return anything. angular.element(document).ready(function () { angular.bootstrap(document.body, ['myApp']); }); Plnkr

http://stackoverflow.com/q/28074790
has comment: http://stackoverflow.com/comment/44534235
type: Question
tagged with: javascript
has title: Angular $asyncValidators transferring error code to template
score: 0
has answer: http://stackoverflow.com/a/28114277
has body: I'm trying to implement an Angular asynchronous validation. The basic works, but I fail to understand how to pass validation result from controller to my template. My HTTP/post call going through my PHP Laravel server works. The handler to process my response too. What I do not understand it is how to pass "success/fail" status from the controller to my template. The pending status works fine, but how to display en OK/FAIL message ??? Question: what is the right pattern to pass the OK/Fail status from an asynchronous validation to template ? Here after my controller and template. Note that OPACFG is out of scope, it is a constant that I use to pass information from Laravel to Angular. My controller app.directive ('myValidationWithBackend', ['OPACFG', '$http','$q', function(OPACFG, $http, $q) { result= { restrict: 'A', require: 'ngModel', link: function(scope, elem, attr, ngModel) { ngModel.$asyncValidators.username = function(modelValue, viewValue) { var value = modelValue || viewValue; var handler = $http.post('check-device', {_token: OPACFG.token, username: value}); handler.success(function(data, status, headers, config) { console.log ("handler ok"); $q.reject ('hoops'); }); handler.error(function(data, status, headers, config) { console.log ("handler err"); return true; }); return handler; }; } }; return result; } ]); My Template xxxxxx Value missing in val1 Invalid val2 should start with 'A' Invalid val3 Waiting val 3 response DoIt
answer count: 1
accepted answer: http://stackoverflow.com/a/28114277
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/q/28053900
answer count: 1
has answer: http://stackoverflow.com/a/28054213
tagged with: meteor
type: UnansweredQuestion
has body: Error on Meteor Server: (webapp_server.js:457) Error serving static file Error: Requested Range Not Satisfiable This error occurs on the server whenever I try to get id3 tags from .mp3 files, using this library. The problem is not caused by the library, as it is only doing it the second time the id3 tags are requested. id3({ file: src }, function(err, tags) { if (!err) { console.log(tags); if (tags.hasOwnProperty('title')) { $('.title').text('Title: ' + tags.title); } if (tags.hasOwnProperty('album')) { $('.album').text('Album: ' + tags.album); } if (tags.hasOwnProperty('artist')) { $('.artist').text('Artist: ' + tags.artist); } if (tags.hasOwnProperty('year')) { $('.year').text('Year: ' + tags.year); } if (tags.hasOwnProperty('genre')) { $('.genre').text('Genre: ' + tags.v1.genre); } if (tags.v2.hasOwnProperty('image')) { $('.image').html(tags.v2.image.data); } } else { alertify.error(err); } }); The src variable looks like: var src = 'songs/' + title + '.mp3';
has title: Meteor error 416: Error serving static file Error: Requested Range Not Satisfiable
score: 0
type: Question
tagged with: javascript

http://stackoverflow.com/comment/44543522
type: Comment
comment on: http://stackoverflow.com/q/28082556
type: QuestionComment
score: 1
has text: Sometimes an example is better then a long text where the essential informations are hidden between the lines. My comment to how I interpret your question: In modern browser (older IE create multiple rules if they have multiple selectors) the selectors of the rules are left untouched. As of that you can always do `#my-id-i-only-use-for-searching-123, .the-actual select .or { color: black }` and then you could search for all rules having the selector `#my-id-i-only-use-for-searching-123`.

http://stackoverflow.com/a/27971881
has body: Silly mistake, I realized my controller variable @new_answer was named differently than in my create.js.erb file, @answer. That solved the issue.
score: 0
answers question: http://stackoverflow.com/q/27970913
type: Answer

http://stackoverflow.com/comment/44612158
has text: If you want to use the remove / append method, you can use this as a start: http://jsfiddle.net/r8vx07ae/6/ it removes the sub-menu and appends it to the menu so it can appear behind the other list elements. Don't have time to finish it now but maybe it can help you!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28117453
type: Comment

http://stackoverflow.com/comment/44487015
type: QuestionComment
type: Comment
score: 0
has text: may this helps http://stackoverflow.com/questions/710853/base64-string-throwing-invalid-character-error
comment on: http://stackoverflow.com/q/28052073

http://stackoverflow.com/q/27996502
tagged with: jquery
score: 0
has body: Hi i need some with the this script i manage to show the panel with the mouseclick but i wanted when my mouse leave the panel it will close it this is the sample http://jsfiddle.net/jikey/w9s7pt25/ $(function(){ $('.slider-arrow').click(function(){ if($(this).hasClass('show')) { $( ".slider-arrow, .spanel" ).animate({ right: "+=182" }, 700, function() { // Animation complete. }); $(this).html('&lt;img src="images/sideclose.png" /&gt;').removeClass('show').addClass('hide'); } else { $( ".slider-arrow, .spanel" ).animate({ right: "-=182" }, 700, function() { // Animation complete. }); $(this).html('&lt;img src="images/sideopen.png" /&gt;').removeClass('hide').addClass('show'); } }); });
has answer: http://stackoverflow.com/a/27996992
accepted answer: http://stackoverflow.com/a/27996992
has answer: http://stackoverflow.com/a/27996839
answer count: 4
possible better answer: http://stackoverflow.com/a/27996784
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27996885
has title: Jquery on click show mouseleave hide sidebar
type: Question
has answer: http://stackoverflow.com/a/27996784
tagged with: javascript

http://stackoverflow.com/comment/44408215
type: QuestionComment
has text: using postMessages? http://davidwalsh.name/window-iframe
type: Comment
score: 1
comment on: http://stackoverflow.com/q/28008595

http://stackoverflow.com/q/28020697
downvote count: 0
has answer: http://stackoverflow.com/a/28021133
possible better answer: http://stackoverflow.com/a/28021102
has answer: http://stackoverflow.com/a/28021102
has comment: http://stackoverflow.com/comment/44427636
tagged with: timestamp
type: Question
tagged with: javascript
tagged with: caching
linked to: http://stackoverflow.com/q/49547
score: 5
has answer: http://stackoverflow.com/a/28021119
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28041336
has title: Append timestamp on src or href attribute with JavaScript
favorite count: 0
upvote count: 5
has comment: http://stackoverflow.com/comment/44427675
has body: For 2 days I've been looking an answer, but I can't find a good solution to my problem. I'm developing a web application where I can only use standard front-end files (HTML, CSS, JavaScript (I use jQuery)). There's no back-end script merged with the HTML. What I'm trying to achieve is to add an &lt;script&gt; tag to my HTML, but with a timestamp added as a variable, such as: &lt;script type="text/javascript" src="js/javascript.js?c=1421656264439"&gt;&lt;/script&gt;. With PHP it would be simple to achieve, because you can just add the timestamp along with the HTML. But since I must work with front-end code only, what would be the best way to add a script or link tag with a timestamp, so the script doesn't get loaded from the cache? Since the client uses Internet Explorer 10, I will need an answer that will work with that... Could anyone help me out?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28041336
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/q/28023829
downvote count: 0
has answer: http://stackoverflow.com/a/28028170
tagged with: javascript
linked to: http://stackoverflow.com/q/6126584
tagged with: http://stackoverflow.com/tag/html
answer count: 1
duplicate of: http://stackoverflow.com/q/6126584
favorite count: 0
type: UnansweredQuestion
tagged with: node.js
score: 3
tagged with: server
upvote count: 3
type: Question
has title: How can I dynamically generate Html content with Node.js?
has body: I understand how I can serve Html pages through Node.js to a client. Now I'm looking for a way to programatically generate Html on the server side (and then do whatever I want with it: save to a file, send to a client). Similiar to the way you'd do the same on the client side, with methods such as document.createElement or jQuery. How can programatic Html generation be done with Node.js? (And I don't mean hardcoded Html writing to a file, of course).

http://stackoverflow.com/a/28088964
upvote count: 5
type: Answer
downvote count: 0
score: 5
answers question: http://stackoverflow.com/q/28088949
accepted answer of: http://stackoverflow.com/q/28088949
has body: Seems like you want something like this, new RegExp(/^\+?\d+$/); Replace space in your regex with +. \d+ matches one or more digits.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44554776

http://stackoverflow.com/q/28039895
tagged with: openlayers-3
type: Question
tagged with: polymer
tagged with: javascript
has answer: http://stackoverflow.com/a/28860458
has comment: http://stackoverflow.com/comment/44476874
has body: Here is my Polymer element. It's basically a copy of drawing example from openlayers. Here is working fiddle That proves that I have no errors in my script and it's related to Polymer. My Map Here is how I use my element.
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44472957
type: UnansweredQuestion
has title: Drawing doesn't work in openlayers3 with Polymer

http://stackoverflow.com/comment/44551531
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28086355
has text: It is not working. Let's forget about this function. We can do it with simple alert('it is working'); I have add this: And it is working if it's true or not. Here is [link](http://adobe-muse.github.io/MuCowDocs/)
type: AnswerComment

http://stackoverflow.com/comment/44416081
score: 0
comment on: http://stackoverflow.com/q/28014412
type: QuestionComment
has text: You should get output from your php. `success:function()` is that your request successfully sent and answered
type: Comment

http://stackoverflow.com/comment/44353138
score: 0
type: AnswerComment
type: Comment
has text: If the class .active is removed from .toggle, the margin does not return to it's original value in the css file. How would I achieve this
comment on: http://stackoverflow.com/a/27980534

http://stackoverflow.com/q/28069368
score: -2
has answer: http://stackoverflow.com/a/28072292
has comment: http://stackoverflow.com/comment/44518381
has comment: http://stackoverflow.com/comment/44518937
type: Question
has body: The directive uitkFooterLink and uitkFooterText are not getting registered. The function i pass as second argument to 'directive' function is not getting called. For debugging purpose i did put some console.log statements. they are not getting executed. angular.module('uitk.component.uitkFooter', ['ngSanitize']) .directive('uitkFooter', function() { function controller($scope) { $scope.links = []; $scope.htmlText = null; this.addLink = function(link) { $scope.links.push(link); console.log(link); }; this.addText = function(htmlText) { $scope.htmlText = htmlText; console.log(htmlText); }; console.log("footer ctrl"); } console.log("running through definition of footer ...."); return { restrict: 'E', replace: true, scope: { logo: "@", url: "@" }, template: [ '&lt;footer&gt;', ' &lt;ul class="tk-foot-links"&gt;', ' &lt;li ng-repeat="link in links"&gt;', ' &lt;a href="{{link.url}}" target="_blank"&gt;{{link.label}}&lt;/a&gt;', ' &lt;/li&gt;', ' &lt;/ul&gt;', ' &lt;p ng-bind-html="htmlText"&gt;&lt;/p&gt;', '&lt;/footer&gt;' ].join(''), controller: controller }; }) .directive('uitkFooterLink', function() { function link($scope, $element, $attrs, uitkFooterCtrl) { console.log("footerlink link"); uitkFooterCtrl.addLink($scope); } console.log("running through definition of footer link ...."); return { restrict: 'E', replace: true, require: '^uitkFooter', scope: { url: '@', label: '@' }, link: link }; }) .directive('uitkFooterText', function() { function link($scope, $element, $attrs, uitkFooterCtrl) { console.log("footerText link"); uitkFooterCtrl.addText($element.html()); } console.log("running through definition of footer text ...."); return { restrict: 'E', replace: true, require: '^uitkFooter', scope: false, link: link }; }); /************************************************************************************ Footer */ html, body { height: 100%; } .tk-wrapper { box-sizing: border-box; min-height: 100%; margin: 0 auto -101px; /* bottom margin = negative value of (the foote…
downvote count: 2
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44518206
has comment: http://stackoverflow.com/comment/44518178
has title: AngularJS : Custom directive link function is not getting registered
upvote count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/q/28008500
has comment: http://stackoverflow.com/comment/44404996
has comment: http://stackoverflow.com/comment/44410281
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44436132
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/30812224
has body: I requested to do the fllip animation for my web app. the issue is i need to include the ie9. I did for the modern browsers, but i am stucked with ie9. And any one figure-out the best alternative to make this in ie9 I have modernizer already, so using that i can find the browser properly. Please i am looking for simple approach. as much as possible please avoid plug-ins. here is my existing code : HTML : Front :) Back :D CSS : .container{ margin:30px auto; /* How pronounced should the 3D effects be */ perspective: 500; -webkit-perspective: 500; -moz-perspective: 500; -ms-perspective: 500; -o-perspective: 500; width:150px; height:150px; position:relative; /*Some UI */ border-radius:6px; -webkit-border-radius:6px; -moz-border-radius:6px; -ms-border-radius:6px; -o-border-radius:6px; font-size:28px; line-height:150px; vertical-align:middle; cursor:pointer; } .box-front,.box-back{ /* Enable 3D transforms */ transform-style: preserve-3d; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; -ms-transform-style: preserve-3d; -o-transform-style: preserve-3d; transform-style: preserve-3d; backface-visibility: hidden; -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden; -ms-backface-visibility: hidden; -o-backface-visibility: hidden; width:100%; height:100%; position:absolute; background-color:#0090d9; /* Animate the transitions */ -webkit-transition:0.8s; text-align:center; -moz-transition:0.8s; text-align:center; -ms-transition:0.8s; text-align:center; -o-transition:0.8s; text-align:center; transition:0.8s; text-align:center; color:#FFF; border-radius:6px; -webkit-border-radius:6px; -moz-border-radius:6px; -ms-border-radius:6px; -o-border-radius:6px; } .box-back{ /* The back side is flipped 180 deg by default */ transform:rotateY(180deg); -webkit-transform:rotateY(180deg); -moz-transform:rotateY(180deg); -ms-transform:rotateY(180deg); -o-transform:rotateY(180deg); background-color:#f35958; } .container:hover .box-front{ /* When the conta…
tagged with: css
has title: how to get css3 flip animation to ie9
score: 2
has comment: http://stackoverflow.com/comment/44423071
downvote count: 0

http://stackoverflow.com/q/28000096
has answer: http://stackoverflow.com/a/28000161
tagged with: javascript
tagged with: resize
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28000142
possible better answer: http://stackoverflow.com/a/28000161
tagged with: onresize
has title: Change variable on resize?
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/28000142
score: 0
answer count: 2
has body: I'm trying to make the containerHeight variable change depending on the width of the browser. This is what I have so far but I'm not sure how to proceed even after reading the docs. Can someone help me out? var containerHeight = $('#project-container').outerHeight(); window.onresize = containerHeight; $('#project-wrapper.activated').css('max-height', containerHeight);

http://stackoverflow.com/q/28067889
tagged with: slider
linked to: http://stackoverflow.com/q/1552572
answer count: 1
has answer: http://stackoverflow.com/a/28068217
has comment: http://stackoverflow.com/comment/44515520
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/44524081
tagged with: css
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/28068217
type: Question
has body: I'm trying to get this done: When user clicks on one of the boxes, the following should happen: box changes color, slides to the left and the text for this subject becomes visible (like in these images for illustration) Can anyone point me in a right direction or solution for this matter? Help would be really appreciated! I came up with this: W 1111111111111111111111111111111111111111111. W 222222222222222222222222222222222222222222222. W 333333333333333333333333333333333333333333333. W 44444444444444444444444444444444444444444. $(document).ready(function() { $("#example10").zAccordion({ auto: false, width: 1300, speed: 2000, slideClass: "slider", slideWidth: 846, height: 150 }); }); which actually works only for some reason the text (class: slider-text) doesn't get displayed at all, I've tried multiple things but I can't get it to display into the accordion. Any solutions?
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: JQuery horizontal slide effect
linked to: http://stackoverflow.com/q/17460116
has comment: http://stackoverflow.com/comment/44515370

http://stackoverflow.com/a/32801021
downvote count: 0
score: 16
answers question: http://stackoverflow.com/q/28083400
type: Answer
upvote count: 16
has body: I guess you want to disable the onclick if someCondition is true. This should work: list1 list2 list3 So if someCondition is true it will not execute changeStatus() since an OR statement will not execute the next statement when the previous is already true.

http://stackoverflow.com/comment/44690947
has text: Thank you very much, this was a great option. I think the JSON would have worked just as well but I felt this was a little cleaner. I appreciate the help.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28100236
score: 1

http://stackoverflow.com/comment/44353649
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27980428
has text: Can you post the rest of the code or add to a fiddle.
score: 0

http://stackoverflow.com/comment/44460839
has text: You're reloading the page. Can you post the html for the tabs?
comment on: http://stackoverflow.com/q/28038329
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44585357
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28105117
has text: I'm trying to make the .service-shortcut become active after a certain delay similar to the dropdown I have added .delay(200).fadeIn(500) after this .addClass('active') but its not working. any ideas?

http://stackoverflow.com/q/28095313
tagged with: css
has title: Change css button to css active without link
has answer: http://stackoverflow.com/a/28095795
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/28095839
score: 0
has answer: http://stackoverflow.com/a/28095565
tagged with: javascript
has body: We have a problem. We have a top menu on our website with css styles. The problem is we have functions attached to the buttons, to simply set something on and off. But we cannot use the "active" css style becaus there is no url attached to this link. But we want to change the color of the button when it's active. Can someone help us out with this ? This is our menu html: buton one button two This is triggering the functions, that part is working correctly. The function change() is in the function of myFunction! document.getElementById('box_two').addEventListener("click", myFunction); Css style of the part that should be active when click on button and off when click again on the button: #actieflink:active { padding-right: 16px; background-color: #004D0e; border-right: 0; -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.7); box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.7); } I tried this but it doesn't work for me function change() { document.getElementById("actieflink").className='active'; }
possible better answer: http://stackoverflow.com/a/28095565
answer count: 3
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/28095839

http://stackoverflow.com/comment/44424318
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28018844
score: 0
has text: Where to begin to create a formula to calculate the number of days.

http://stackoverflow.com/comment/44500573
type: QuestionComment
comment on: http://stackoverflow.com/q/28059552
has text: see [not working](http://jsfiddle.net/arunpjohny/sBk3M/496/) and [working](http://jsfiddle.net/arunpjohny/sBk3M/497/)
score: 0
type: Comment

http://stackoverflow.com/q/28057881
tagged with: canvas
answer count: 1
linked to: http://stackoverflow.com/q/8696631
has comment: http://stackoverflow.com/comment/44498226
favorite count: 0
has comment: http://stackoverflow.com/comment/44499498
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 3
downvote count: 0
has answer: http://stackoverflow.com/a/28061572
accepted answer: http://stackoverflow.com/a/28061572
has comment: http://stackoverflow.com/comment/44501015
type: Question
tagged with: javascript
has title: JavaScript either strokeRect or fillRect blurry depending on translation
has body: Earlier on I noticed that strokeRect (and any other method that involved stroke such as lineTo) created a grey 2 px wide line instead of a 1px wide black line. After some Google searching I found that context.translate(0.5, 0.5) fixed this. but now fillRect (and like before any other method that involves fill) creates a black box with a grey border around it. Does anyone know a good way to make it so that both fillRect and strokeRect have crisp edges with no grey borders? I also don't know whether or not I should use context.translate(0.5, 0.5) for images, as it seems like SVGs have crisp edges regardless of whether or not I translate. Here is a jsfiddle demonstrating this: http://jsfiddle.net/Tysonzero/ydm21pkt/1/ Note that the bottom strokeRect is crisp while the top one is blurry, and the top fillRect is crisp while the bottom one is blurry.
upvote count: 3

http://stackoverflow.com/q/28025125
type: Question
has comment: http://stackoverflow.com/comment/44510039
upvote count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44520106
has comment: http://stackoverflow.com/comment/44511974
has comment: http://stackoverflow.com/comment/44513103
answer count: 0
tagged with: nicedit
type: UnansweredQuestion
has title: nicEdit dynamical instances binding 2 of the functions
downvote count: 0
score: 1
has body: I have read all the answers provided on this questions and none of them are applying to my needs. Also, i have already asked an 'almost similar' question about binding on dynamically created elements. I also applied these answers (which worked on other scripts) but it does not work on this one. Explanation: I have a form, where i give the possiblity to add a new row to my table (row with multiple cells) one of these cell is a textarea. What i want to do is be able to add nicedit to these text area created dynamically. The creation of the new row and cells: var index = 2; function myCreateFunction() { var table = document.getElementById("myTable"); var row = table.insertRow(-1); var cell1 = row.insertCell(0); var cell2 = row.insertCell(1); var cell3 = row.insertCell(2); var cell4 = row.insertCell(3); var cell5 = row.insertCell(4); cell1.innerHTML = "&lt;textarea type='text' id='des" + index + "' name='des" + index + "' placeholder='' rows='1' class='form-control input-sm' value=''/&gt;&lt;/textarea&gt;"; cell1.vAlign = "top"; cell2.innerHTML = "&lt;input type='text' id='qu" + index + "' name='qu" + index + "' placeholder='' class='form-control input-sm qu' value=''/&gt;"; cell2.vAlign = "top"; cell3.innerHTML = "&lt;input type='text' id='pu" + index + "' name='pu" + index + "' placeholder='' class='form-control input-sm pu' value=''/&gt;"; cell3.vAlign = "top"; cell4.innerHTML = "&lt;input type='text' id='rl" + index + "' name='rl" + index + "' placeholder='' class='form-control input-sm rl' value=''/&gt;"; cell4.vAlign = "top"; cell5.innerHTML = "&lt;input type='text' id='tl" + index + "' name='tl" + index + "' placeholder='' class='form-control input-sm total' value=''/&gt;"; cell5.vAlign = "top"; index++; return false; Each clic adds a row and the textarea is on the first cell Now the nicedit with instances: bkLib.onDomLoaded(function() { var myNicEditor = new nicEditor(); myNicEditor.setPanel('myNicPanel'); myNicEditor.addInstance('des1'); myNicEditor.addInstance…

http://stackoverflow.com/comment/44468181
type: Comment
comment on: http://stackoverflow.com/a/28021639
score: 0
type: AnswerComment
has text: you could also disable the double button when nothing is in focus

http://stackoverflow.com/a/28076277
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/28076015
type: Answer
has body: You have several options to improve performance. Bind only once using the :: syntax (assuming you don't need 2 way binding). &lt;div ng-repeat="app in ::client.apps | filter: { name: 'Facebook', used: 'Y' }"&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;/div&gt; If you are using Angular &lt; 1.3, you need the 3rd party bind-once library, which has a different syntax. If you are really only filtering by the hard coded filter as in the example, you could filter your data before it gets to the view (in the controller, or better yet, in the service that retrieves the data). This will prevent Angular from reevaluating your filter in every digest loop. You can also use the track by syntax to improve performance. In this case, I'm guessing by client.name (but it's just a guess): ng-repeat="app in ::client.apps | filter: { name: 'Facebook', used: 'Y' } track by client.name You may need to tweak that if the client names are not unique. I suspect implementing just bind once will give you significant performance gains.
has comment: http://stackoverflow.com/comment/44532235

http://stackoverflow.com/q/28097484
tagged with: multi-select
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/28099934
type: Question
has comment: http://stackoverflow.com/comment/44572937
tagged with: javascript
downvote count: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28099934
favorite count: 0
has title: Angular JS: "Select All" options of "multi-select select box"
tagged with: angularjs
has body: I have created a multiselect select box using Angular JS: below is the code for the same: JS: $scope.foobars = [{ 'foobar_id': 'foobar01', 'name': 'foobar01', }, { 'foobar_id': 'foobar02', 'name': 'foobar02', }, { 'foobar_id': 'foobar03', 'name': 'foobar03', }, { 'foobar_id': 'foobar04', 'name': 'foobar04', }, { 'foobar_id': 'foobar05', 'name': 'foobar05', }]; HTML: Select All And the output is : Question 1: Why am I not getting the default option "Select All" in the list? And How do I get that? Question 2: How can I Select All optiions on click of "First Option : Select All"?? Please suggest!
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/18751129

http://stackoverflow.com/comment/44438669
type: Comment
comment on: http://stackoverflow.com/a/28023834
has text: please look at this question http://stackoverflow.com/questions/28026703/generate-different-fields-depends-on-dom-elements-in-angularjs
score: 0
type: AnswerComment

http://stackoverflow.com/a/28012108
has comment: http://stackoverflow.com/comment/98949476
has body: Cannot reproduce in Firefox, here is a JSFiddle, I've tried adding the class with jQuery and with plain JavaScript, both work. HTML &lt;div contentEditable="true"&gt;&lt;/div&gt; CSS This is just to visualize the blockquote. .quote{ width:300px; height:100px; background-color:khaki; } JavaScript document.designMode = "on"; document.execCommand('formatBlock', false, "&lt;blockquote&gt;"); var quote = window.getSelection().focusNode.parentNode; $(quote).addClass("quote"); //quote.className = "quote"; Maybe this helps, maybe I did something differently :)
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28011890
answers question: http://stackoverflow.com/q/28011890
type: Answer
upvote count: 5

http://stackoverflow.com/q/28058619
tagged with: google-chrome
answer count: 1
has title: Chrome stuck on print preview "loading preview" POS Printer
tagged with: javascript
type: UnansweredQuestion
tagged with: printing
downvote count: 0
score: 1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/28058672
has body: i have Web Based POS System with thermal printer the problem is everytime i print on chrome it always stuck on loading preview i already tried the ff. *Disable Print Preview *--kiosk Mode(it prints but not all the lable, more on dots "." ) i use window.print() mode it prints on firefox but not on chrome the problem on firefox is the barcode scanner there are some few digits missing so i need to use chrome I use win xp is there anything to fix this issue?
upvote count: 1

http://stackoverflow.com/a/28115180
has comment: http://stackoverflow.com/comment/44608434
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/28114568
has body: Xotic has provided a fine answer, but another interesting way you could do this is to have your function generate other functions that carry out the work: function makeDomUpdater(bg, color, size, margin, content) { return function(element){ element.style.backgroundColor = bg; element.style.color = color; element.style.fontSize = size; element.style.marginLeft = margin; element.innerHTML = content; }; } var green = makeDomUpdater("green", "white", "20px", "20", "the green one"), blu = makeDomUpdater("blue", "white", "48px", "0", "the blue one"); green(document.getElementById("demo")); Demo This doesn't make use of object constructors, but then again, not everything has to. :)

http://stackoverflow.com/comment/44405645
type: Comment
comment on: http://stackoverflow.com/a/28008657
score: 0
has text: Actually, I'm not getting you. What you want to select is myyy-classs with its parent that it .General. But if you want to select offset parent then use .offsetParent() function.
type: AnswerComment

http://stackoverflow.com/comment/44477008
type: QuestionComment
score: 1
has text: Keep coding server side and don't use client side scripting if you don't need anything from the user
comment on: http://stackoverflow.com/q/28047255
type: Comment

http://stackoverflow.com/q/27968083
type: Question
has answer: http://stackoverflow.com/a/27968536
answer count: 1
has title: set an object's prototype using object.create
tagged with: javascript
has comment: http://stackoverflow.com/comment/44328921
linked to: http://stackoverflow.com/q/27966786
score: 0
upvote count: 1
downvote count: 1
tagged with: prototype-chain
has comment: http://stackoverflow.com/comment/44329128
favorite count: 0
has body: i was answering to a question where i encountered this problem In the following code how the child's prototype can be set to parent using object.create() method.I can do it using child.prototype=new Parent(); But i want to do it using object.create.using child.prototype=Object.create(Parent) didn't set the prototype to Parent function Parent() { this.parentFunction = function(){ console.log('parentFunction'); } } Parent.prototype.constructor = Parent; function Child() { this.parentFunction = function() { this.constructor.prototype.parentFunction.call(this); console.log('parentFunction from child'); } } Child.prototype = Object.create(Parent); Child.prototype.constructor = Child; var child = new Child(); console.dir(child); child.parentFunction();
has comment: http://stackoverflow.com/comment/44329223
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44329148
accepted answer: http://stackoverflow.com/a/27968536
linked to: http://stackoverflow.com/q/17392857
has comment: http://stackoverflow.com/comment/44329042
tagged with: prototype

http://stackoverflow.com/comment/44426102
type: QuestionComment
has text: Where are you getting these unique actions from? Are they stored in the JSON?
comment on: http://stackoverflow.com/q/28019873
score: 0
type: Comment

http://stackoverflow.com/comment/44433087
has text: Why would you do that?? you can simply insert the same HTML of your select in your next page. because `getParameter`and `getParameterValues` will not take all the selct options.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28023630

http://stackoverflow.com/q/28084966
linked to: http://stackoverflow.com/q/26169962
has comment: http://stackoverflow.com/comment/44548330
has answer: http://stackoverflow.com/a/28090937
type: Question
score: 1
has comment: http://stackoverflow.com/comment/44548026
answer count: 2
tagged with: linkedin-jsapi
tagged with: linkedin-api
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/37122564
has title: Sign in button does not appear sometimes on Angular
favorite count: 0
tagged with: angularjs
has body: I hve the standard LinkedIn JSAPI script in my index.html: I am using Angular.js and have this code in my sign-in page: Connect with Facebook On certain random chances, the button just does not appear at all. I've somewhat noticed that if I removed all the fields() options, then the button will reliably show up, but I'm not if this is the reason. Any suggestions?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44549018
upvote count: 1

http://stackoverflow.com/comment/44622565
score: 0
type: Comment
type: QuestionComment
has text: Not because it is my answer, but I'm pretty sure that you was not binding the selector as well. Initializing a variable, in this case, does not change the behaviour.
comment on: http://stackoverflow.com/q/28112291

http://stackoverflow.com/comment/44467093
comment on: http://stackoverflow.com/a/28041547
score: 0
type: AnswerComment
type: Comment
has text: I believe you function is used top highlight the text but that I have achieved using button tag , the main problem is how to perform an on click operation when I click on that button

http://stackoverflow.com/comment/44321412
has text: how this work ? i mean with `.change()` or `.keydown()`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27964153
score: 0

http://stackoverflow.com/q/28079770
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/28081262
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44563237
accepted answer: http://stackoverflow.com/a/28079835
type: Question
score: 5
tagged with: jquery-animate
has answer: http://stackoverflow.com/a/28079835
upvote count: 5
has title: Animating background color, pulse effect
tagged with: javascript
has comment: http://stackoverflow.com/comment/44538287
has answer: http://stackoverflow.com/a/28081262
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I have made a script for animating my menu li element after mouseovering the a element inside it. Everything works fine, but I want something else. I want the effect not to disappear but to linger as long as the mouse is over the a element. What function to use? Script so far: jQuery(document).ready(function($){ $(".main-navigation a").mouseover(function() { $(this).parent().animate({ backgroundColor: "green" }, "normal"), $(this).parent().animate({ backgroundColor: "transparent" }) .mouseleave(function() { $(this).parent().animate({ backgroundColor: "transparent" }, "normal") }); }); }); http://jsfiddle.net/neugu8r9/

http://stackoverflow.com/comment/44350886
type: QuestionComment
has text: Which browser are you using for debugging? Chrome? Safari? @user3166680
score: 0
comment on: http://stackoverflow.com/q/27971189
type: Comment

http://stackoverflow.com/q/28057102
score: 0
tagged with: char
tagged with: string
has body: I've been doing some work with url's and uri's and I have a question regarding a function I was using to encode/decode. I've looked up online, and found a function to properly encode my code, using mostly String.fromCharCode() method. But the question is about the parameters passed. I have something like this: _utf8_encode : function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n &lt; string.length; n++) { var c = string.charCodeAt(n); if (c &lt; 128) { utftext += String.fromCharCode(c); } else if((c &gt; 127) &amp;&amp; (c &lt; 2048)) { utftext += String.fromCharCode((c &gt;&gt; 6) | 192); utftext += String.fromCharCode((c &amp; 63) | 128); } else { utftext += String.fromCharCode((c &gt;&gt; 12) | 224); utftext += String.fromCharCode(((c &gt;&gt; 6) &amp; 63) | 128); utftext += String.fromCharCode((c &amp; 63) | 128); } } return utftext; } What bugs me is that operations inside the parenteses. I've done some tests with the c value to see if I got to any conclusion, but my efforts were in vain. Does anyone know what those operators (if I can call them that, '>>', '&amp;', '|') mean? Note that the function works, I just wanted to properly understand it. Thanks very much! Bye!
tagged with: utf-8
duplicate of: http://stackoverflow.com/q/9549780
has comment: http://stackoverflow.com/comment/44495929
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44520947
tagged with: fromcharcode
has comment: http://stackoverflow.com/comment/44520883
type: Question
has title: String.fromCharCode((x >> y) | z) operation?
has comment: http://stackoverflow.com/comment/44496481
linked to: http://stackoverflow.com/q/9549780
tagged with: javascript
has comment: http://stackoverflow.com/comment/44496011

http://stackoverflow.com/comment/44559849
score: 1
type: QuestionComment
has text: last attempt: exec in console and show us results: `$("#convo-abierta").attr('value', 'foo');`. May be the color of input and backgroung color are the same?)
type: Comment
comment on: http://stackoverflow.com/q/28091235

http://stackoverflow.com/q/28043733
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/28045501
has title: Angular custom filter not updating ng-repeat
has comment: http://stackoverflow.com/comment/44470659
has body: There are alot of questions on here about ng-repeat and custom filters but none of them address the problem I am facing. Take this: &lt;div class="row" ng-repeat="row in rows | chunk:columns"&gt; &lt;!-- Now loop over the row chunk to output the column --&gt; &lt;div ng-class="{'col-xs-12':row.length&lt;=1,'col-xs-6':row.length&gt;1" ng-repeat="item in row" &gt; {{ item.name }} &lt;/div&gt; &lt;/div&gt; The filter chunk is a custom filter that I made to return a chunk of $scope.rows that is an array of objects. This works fine until I change the value of $scope.columns. At this point I would expect the ng-repeat directive to add itself to the digest loop to re-draw but it doesn't. How would I get this to re-draw when the value of $scope.columns changes? From comments the chunk filter is: var _ = require('lodash'); /** * Chunk an array into pieces * @param collection * @param chunkSize * @returns {array} */ var chunk = function (collection, chunkSize) { if (!collection || _.isNaN(parseInt(chunkSize, 10))) { return []; } return _.toArray( _.groupBy(collection, function (iterator, index) { return Math.floor(index / parseInt(chunkSize, 10)); }) ); } /** * Angular filter to cache array chunks and return * x number of chunks from an array via a filter. * * @example * &lt;div ng-repeat="item in items | chunk:2"&gt; ... &lt;/div&gt; * @returns {array} */ module.exports = function() { return _.memoize(chunk); // If I console.log(_.memoize(chunk)()) here I get the output // from the first digest only. }; $scope.columns is being updated by a directive /** * toggleGridView directive * @returns {object} */ module.exports = ['localStorageService', function(localStorageService) { return { replace : true, template: '&lt;button type="button" ng-click="toggleView()"&gt;&lt;/button&gt;', link : function(scope, el, attr) { scope.gridView = localStorageService.get('itemlistgrid') == "true"; scope.columns = scope.gridView ? 2 : 1; scope.toggleView = function() { localStorageService.set( …
type: AnsweredQuestion
upvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/44470327
tagged with: javascript
has answer: http://stackoverflow.com/a/28045501
score: 3
tagged with: angularjs-filter
answer count: 1
has comment: http://stackoverflow.com/comment/44470342
downvote count: 0
tagged with: angularjs-ng-repeat

http://stackoverflow.com/comment/44581750
type: Comment
has text: Your explanation was very helpful thanks and i accepted the answer.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28020283

http://stackoverflow.com/q/28017925
score: 0
answer count: 2
has title: How to show image with Angular
tagged with: angularjs
type: UnansweredQuestion
has body: I've got a problem with IMG SRC. I use Angular and PhoneGap and JSON data... I get json data img url and try &lt;img src="{{image}}"&gt; It's work very good on Android 4.4.2 but any older version aren't work This is my controller $http.get('http://katalog.mirada.kz/start.php?head=json').success(function(data) { $scope.image = data.level0.image_url; $scope.id_link = data.level0.id_link; What's wrong in my code?
has answer: http://stackoverflow.com/a/28020239
tagged with: cordova
type: Question
has comment: http://stackoverflow.com/comment/44447088
tagged with: javascript
has answer: http://stackoverflow.com/a/28017967
tagged with: onsen-ui

http://stackoverflow.com/comment/44436898
score: 0
comment on: http://stackoverflow.com/q/28025383
type: Comment
type: QuestionComment
has text: When function is called, it does not set the time. @atmd

http://stackoverflow.com/a/28069971
has comment: http://stackoverflow.com/comment/44519793
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28069259
has body: Give this a shot: self.printDomElement = function(selector) { var newWindow = window.open("", "Test", "width=500,height=500,scrollbars=1,resizable=1"); var sectionOfDom = $(selector); newWindow.document.open(); for (var i = 0; i &lt; sectionOfDom.length; i++) { newWindow.document.write(sectionOfDom[i].innerHTML); } newWindow.document.close(); newWindow.print(); newWindow.close(); }; EDIT: From what I've read, an iFrame will work only if it doesn't violate the same origin policy. There is a different way to access the innerHTML property of iFrames as well, so you would have to have a conditional to access it differently if it's an iFrame. Here is the edited code to handle iframe content: self.printDomElement = function(selector) { var newWindow = window.open("", "Test", "width=500,height=500,scrollbars=1,resizable=1"); var sectionOfDom = $(selector); newWindow.document.open(); for (var i = 0; i &lt; sectionOfDom.length; i++) { if ($(sectionOfDom[i]).is('iframe')) { try { newWindow.document.write(sectionOfDom[i].contentDocument.body.innerHTML); } catch(err) { console.log('Caught exception with message: [' + err.message + '] while trying to write content to print window.'); } } else { newWindow.document.write(sectionOfDom[i].innerHTML); } } newWindow.document.close(); newWindow.print(); newWindow.close(); };

http://stackoverflow.com/comment/44384475
type: AnswerComment
has text: if there isn't any error, then check if you are getting any value in $url variable from mysql result. If it's blank your code will not send ajax request.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27996911

http://stackoverflow.com/comment/44462686
type: AnswerComment
has text: @karthik As and when you click on button, it should display one by one in some div?Or All of string at a time?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28039179

http://stackoverflow.com/comment/44601071
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28113527
has text: It doesn't have any syntax errors, the first thing I did was check the console

http://stackoverflow.com/a/27987856
score: 0
has body: Use this date : {{guests[0].date}} http://plnkr.co/edit/RCVexXqwcAD3JD3SwSaR?p=preview
type: Answer
answers question: http://stackoverflow.com/q/27987748

http://stackoverflow.com/q/28087842
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44552635
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/28087876
has answer: http://stackoverflow.com/a/41167909
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28087983
has answer: http://stackoverflow.com/a/30330600
upvote count: 5
has body: I have a variable called 'age' and am trying to work out if it is between two numbers. In this case I want to find out if the age is between 30 and 80. I have this so far... if (age &gt;= 30 &amp;&amp; age &lt;= 80) { $('.display').each(function () { $(this).css('display', ''); }); } This works great if the age is below 30 then the .display div does not get displayed, but the last part where it checks if the number is less than 80 does not work. Can anyone point me in the direction of a similar function I can read up on? Or am I doing something obvious wrong?
has title: Check if number is between two numbers
type: Question
has answer: http://stackoverflow.com/a/28087958
score: 5
linked to: http://stackoverflow.com/q/5029409
downvote count: 0

http://stackoverflow.com/q/27982937
has comment: http://stackoverflow.com/comment/44357248
has comment: http://stackoverflow.com/comment/44358154
upvote count: 6
answer count: 4
score: 4
downvote count: 2
has comment: http://stackoverflow.com/comment/44356999
has answer: http://stackoverflow.com/a/78680203
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/47397540
has comment: http://stackoverflow.com/comment/44357033
has title: How to change the selected option of a select box onload?
has answer: http://stackoverflow.com/a/39425280
favorite count: 0
has answer: http://stackoverflow.com/a/27983019
type: UnansweredQuestion
has body: i am working on a project, where i have to select a particular option of a select box, i know how to do this, but the problem is a function must be called whenever value of select box changes, when we do it manually it works, but when i do it with jquery onload, that function not works. Because it only work when a user manually change the option from select box. Please tell me how to do this. example: here is some of my efforts which i have tried: $("select").val('5');

http://stackoverflow.com/comment/44339846
comment on: http://stackoverflow.com/q/27973380
score: 1
has text: When you are looping, you will have the key. If the key is "info#" then you know it's one of the ones you want. ***There is no built-in way to filter the properties returned to only the ones you want.***
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44423470
has text: Hi John, upon clicking the search button, I want the selected checkbox values to be sent.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27986737

http://stackoverflow.com/q/28064359
has answer: http://stackoverflow.com/a/28064445
has body: I have an array of objects named test. Using modern browsers is there an easy way for me to find an element in that array with a testId set to 99 and set that element's current field to true? If possible I would like to avoid something like a for each loop but I am not sure what can do that.
possible better answer: http://stackoverflow.com/a/28064965
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28064965
accepted answer: http://stackoverflow.com/a/28064445
type: Question
has title: How can I set the value of an array element to true for an element with another value?
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/comment/44558175
type: Comment
has text: that works, but i want modal to stay open after i clicked submit for 10 sec
comment on: http://stackoverflow.com/a/28090647
type: AnswerComment
score: 0

http://stackoverflow.com/a/28024616
has body: move the "deferred.resolve(canvasOpt)" to the start function in the fillcanvas method, also the image calculation part to the start method. function start() { // ***************** // resize image to 800xZ or Zx800 // ***************** var imgOrigWidth = img.width; var imgOrigHeight = img.height; var resizeRatio = 1; if (imgOrigHeight &gt;= imgOrigWidth) { resizeRatio = 800 / imgOrigHeight; } else { resizeRatio = 800 / imgOrigWidth; } canvas.width = img.width * resizeRatio; canvas.height = img.height * resizeRatio + 100; ctx.drawImage(img, 0, 0, img.width * resizeRatio, img.height * resizeRatio); var cw = canvas.width; var ch = canvas.height - 100; var canvasOpt = { ch: canvas.height, cw: canvas.width } // $q deferred.resolve(canvasOpt); // HERE I WANT IT TO SHOW THE SIZE OF THE RESIZED IMAGE, BUT IT SHOWS 150x300 (default value) window.alert("start: " + canvasOpt.cw + "x" + canvasOpt.ch) } refer the fiddle http://jsfiddle.net/tedvt37c/1/
upvote count: 2
accepted answer of: http://stackoverflow.com/q/28023712
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44435134
answers question: http://stackoverflow.com/q/28023712
type: Answer
score: 2

http://stackoverflow.com/a/28053313
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28053194
accepted answer of: http://stackoverflow.com/q/28053194
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: A good practice to pass configuration parameters to browsified widgets would be declare it in attributes. &lt;div prop1="abc" prop2="def" id="testwidget"&gt;&lt;/div&gt; and access them in javascript as required by using getAttribute() method... document.getElementById("testwidget").getAttribute("prop1"); This will help you maintain configuration at the DOM level rather than keep a global variable. Hope it helps!

http://stackoverflow.com/q/27992374
type: Question
tagged with: javascript
score: -1
tagged with: amazon-web-services
accepted answer: http://stackoverflow.com/a/27993748
upvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
has title: Modal Element Refreshing Page: NEEDS TO STOP
has answer: http://stackoverflow.com/a/27993748
has body: I currently have a webpage that makes a call to a modal element where a user can upload a file. Once the user clicks upload, the file is uploaded to Amazon Web Services (S3) and the page gets refreshed. This would be fine except that I am also trying to send metadata about that particular upload event back to a personal server that way there is a record of the event occurring and with the refresh, it can't complete sending the data back to my server. Here is the code I'm using in my html to declare the button: Upload And here is my JS: $scope.showModal = function(item){ item.$promise.then(item.show); item.$options.show = true; }; $scope.showModal = function(item){ item.$promise.then(item.show); item.$options.show = true; }; $scope.closeModal = function(result){ if(result){ console.log("Sending File..."); $scope.modalBox.$promise.then($scope.modalBox.hide); } else{ console.log("Closing..."); $scope.modalBox.$promise.then($scope.modalBox.hide); } }; $scope.newDoc = function(){ $scope.uploadModal = {}; $scope.createdString = $scope.uniqueString(); $scope.showUpload(); }; //Show Modal $scope.showUpload = function(){ $scope.modalBox = $modal({ title: ' ', placement: 'center', template: 'documents/docModal.html', scope: $scope, show: false, }); $scope.showModal($scope.modalBox); }; A lot of this code is inherited from another project and I'm still new to this. I figured that if I can't change the HTML (I tried changing the button type from 'submit' to 'button') I'd change the JS and what I found was that it's probably occurring on this line: $scope.modalBox.$promise.then($scope.modalBox.hide); I don't know how to manipulate this though to keep it from refreshing.
downvote count: 1

http://stackoverflow.com/a/28069996
answers question: http://stackoverflow.com/q/28068906
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/44519460
has body: This is a different approach to solve the hide/show more text functionality which requires no Javascript. It will, though, require some clever styling/positioning to look like you want it to look. I've created a small demonstration using a checkbox for switching purposes, making use of the :checked css 3 pseudo selector. #more { display: none; } label { float: right; } .morecontent { display: inline-block; height: 20px; width: 200px; overflow: hidden; } #more:checked ~ .morecontent { height: auto; overflow: visible; } label+label { display: none; } #more:checked + label { display: none; } #more:checked + label + label { display: inline; } .morecontainer { width: 250px; } .morecontent p { margin-top: 0; } ...more ...less This is the container that is supposed to have that more text functionality applied to it. This solution requires no Javascript. You can use a tiny little bit of JS for pure animation purposes.

http://stackoverflow.com/a/28056049
answers question: http://stackoverflow.com/q/28055505
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/44561106
downvote count: 0
has body: you can change the height and width of your slider from this part of your code. &lt;div id="sliderb_container" style="position: relative; width: 600px; height: 300px; overflow: hidden;"&gt; With your current implementation that will do the trick as you have commented out the height and width on the jssor side. It will automatically pick up the height and width that you set here. And to manage the position of the slider, add a additional container to wrap your entire code and use CSS magic. Do not change the default implementation of the codes that you got from jssor apart from the height and width. &lt;div class='wrapper' style='margin-left:15%;margin-right:15%'&gt; //all the contents inside the div with id = "sliderb_container" including the div &lt;/div&gt; This should do the trick. Look at some of their examples in the downloads, that will give you some more ideas as well.
has comment: http://stackoverflow.com/comment/44562895
type: Answer
has comment: http://stackoverflow.com/comment/44559787

http://stackoverflow.com/comment/44562820
comment on: http://stackoverflow.com/a/28093092
has text: tyvm, now I got it working! Proper escaped in my specific example it should be `PF('sel').jq.find('input:radio[value=false]').parent().next().trigger('click.selectOneRadio');`
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27991307
accepted answer of: http://stackoverflow.com/q/27991273
type: Answer
upvote count: 6
answers question: http://stackoverflow.com/q/27991273
downvote count: 1
score: 5
type: AcceptedAnswer
has body: You're using document.getElementById("modal_content"), but modal_content is the class.

http://stackoverflow.com/comment/44522595
comment on: http://stackoverflow.com/a/28056169
score: 0
type: Comment
has text: Oh, I missed this before. It's also giving an error "undefined is not a function"
type: AnswerComment

http://stackoverflow.com/a/28058877
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44499451
answers question: http://stackoverflow.com/q/28058841
type: Answer
accepted answer of: http://stackoverflow.com/q/28058841
has comment: http://stackoverflow.com/comment/44499304
downvote count: 0
has comment: http://stackoverflow.com/comment/44499310
has body: var $webPage = "http://localhost/collin-sanderson/"; if (location.href == $webPage) { $('body').addClass('home') } else { $('body').removeClass('home') } I have altered the code so it uses a comparison operator instead of an assignment operator. Assignment operators are used to write a value to a variable, on the other hand a comparison operator compares two variables like you require. See JavaScript Operators Also here is a helpful/interesting read on the difference between document and window objects. Difference between document and window objects.
has comment: http://stackoverflow.com/comment/44499397
has comment: http://stackoverflow.com/comment/44499346
score: 1

http://stackoverflow.com/comment/44327661
has text: so what will migrate 1.2.1 do exactly ? can u adivce ?
type: AnswerComment
comment on: http://stackoverflow.com/a/27966009
type: Comment
score: 0

http://stackoverflow.com/comment/44430595
score: 0
comment on: http://stackoverflow.com/q/28021132
type: Comment
has text: A normal web pages opens tens of connections for scripts, css files, images and all sort of things and browsers are very fast and very good at doing this. If you "lose" time in the backend preparing the initial page, you're delaying the start of all these connections and you're probably making your page slower to display, not faster. Also you'll lose any caching advantage (and with CDNs nowadays almost all the main js libraries are cached).
type: QuestionComment

http://stackoverflow.com/q/28054411
accepted answer: http://stackoverflow.com/a/28054576
tagged with: coffeescript
has comment: http://stackoverflow.com/comment/44490987
type: Question
has body: I'm new to coffeeScript and am having some trouble with what should be a fairly straightforward operation: iGetCalledOnEvents = -&gt; _counter if condition1 _counter = setInterval( =&gt; if condition2 # do some stuff else clearInterval(_counter) # this properly clears the interval , 500) else console.log _counter # this always returns undefined clearInterval(_counter) # hence this fails and my world breaks Am I missing something here?
tagged with: javascript
tagged with: clearinterval
score: 0
has comment: http://stackoverflow.com/comment/44490939
answer count: 1
tagged with: setinterval
has title: Strange behavior for clearInterval in coffeeScript (not in scope?)
has comment: http://stackoverflow.com/comment/44490913
has answer: http://stackoverflow.com/a/28054576
type: AnsweredQuestion

http://stackoverflow.com/q/28049555
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/28049590
has answer: http://stackoverflow.com/a/28049590
has title: How to get href url if href contains in div tag using jquery
answer count: 4
type: AnsweredQuestion
has body: How to get href url if href attribute contains in anchor tag in div tag google facebook gmail
type: Question
has answer: http://stackoverflow.com/a/28049876
accepted answer: http://stackoverflow.com/a/28049876
score: -2
has answer: http://stackoverflow.com/a/28049822
has comment: http://stackoverflow.com/comment/44481378
downvote count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/28050135
tagged with: javascript

http://stackoverflow.com/a/28001731
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28001698
score: 1
accepted answer of: http://stackoverflow.com/q/28001698
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44394201
has body: Simply reduce the opacity and put it in a loop that repeats itself until the picture has opacity 0, then set display to none: var img = document.getElementById('id of image to be faded').style; img.opacity = 1; (function fade(){(img.opacity-=.1)&lt;0?img.display="none":setTimeout(fade,40)})();

http://stackoverflow.com/q/28050434
has comment: http://stackoverflow.com/comment/44482948
type: AnsweredQuestion
tagged with: force-layout
type: Question
tagged with: javascript
upvote count: 11
has comment: http://stackoverflow.com/comment/44483441
has title: Introducing Arrow(directed), in Force Directed Graph d3
answer count: 1
downvote count: 0
has body: I am using the force-directed graph in the sample here - http://bl.ocks.org/mbostock/4062045 But since my data is directed, I need the links in the graph to be represented as arrow connections. Maybe like in, http://bl.ocks.org/d3noob/5141278. Can someone please suggest the alterations or additions that create a directed graph as in http://bl.ocks.org/mbostock/4062045 I am new to D3, and I couldn't find a solution, maybe its trivial, but a little help is appreciated.
has answer: http://stackoverflow.com/a/28050566
favorite count: 0
accepted answer: http://stackoverflow.com/a/28050566
tagged with: d3.js
score: 11

http://stackoverflow.com/a/28028108
has body: Use grep: ids = [-1,3,4,-2] ids = jQuery.grep(ids, function( n, i ) { return n&gt;=0; }); console.log(ids) Description: Finds the elements of an array which satisfy a filter function. The original array is not affected.
answers question: http://stackoverflow.com/q/28028033
score: 0
type: Answer

http://stackoverflow.com/a/28028070
has comment: http://stackoverflow.com/comment/44477107
has body: Setting a timeout works, but it is hacky I guess. I will try to rewrite in a more angular way. .factory('producteffecten', function() { var effecten = {}; //SETTING TIMEOUT WORKS SOMEHOW effecten.showdescription = setTimeout(function() { $('ul').hover(function (){ $(this).append(" Test "); }); }, 10); return effecten; })
type: Answer
has comment: http://stackoverflow.com/comment/44474455
has comment: http://stackoverflow.com/comment/44471143
answers question: http://stackoverflow.com/q/28027215
score: 0

http://stackoverflow.com/comment/44325398
type: Comment
comment on: http://stackoverflow.com/q/27966215
score: 0
has text: as above, seems responsice-nav.js depends on scroll.js, therefor the latter should appear 1st in source code.
type: QuestionComment

http://stackoverflow.com/comment/44368475
comment on: http://stackoverflow.com/q/27984033
type: Comment
type: QuestionComment
has text: You do have an ads license, right? You need that in order to run VAST.
score: 1

http://stackoverflow.com/q/28088275
has comment: http://stackoverflow.com/comment/44553386
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44553331
linked to: http://stackoverflow.com/q/842336
has comment: http://stackoverflow.com/comment/44557246
has comment: http://stackoverflow.com/comment/44553388
has answer: http://stackoverflow.com/a/28089818
type: UnansweredQuestion
score: -4
upvote count: 1
has comment: http://stackoverflow.com/comment/44553431
type: Question
has comment: http://stackoverflow.com/comment/44553411
downvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/44553680
has comment: http://stackoverflow.com/comment/44553356
answer count: 2
has title: how to get an id beneath an other id in javascript?
has body: Is it possible to get an id that is under an other id like this: Mamamia Pizzaria So if i know that my id is "moe1", how can i find what is the id under "moe1"?
has comment: http://stackoverflow.com/comment/44553371
has answer: http://stackoverflow.com/a/28088843
favorite count: 0

http://stackoverflow.com/comment/44332941
type: Comment
type: AnswerComment
has text: also submit button is outside my scope im just a piece of play template where the outer form and button can't be changed...
comment on: http://stackoverflow.com/a/27970027
score: 0

http://stackoverflow.com/q/27995733
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28005768
accepted answer: http://stackoverflow.com/a/28005768
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44381944
tagged with: highcharts
has title: Can't load highcharts.js and highmaps.js (map.js don't work)
tagged with: javascript
score: 0
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/44382191
tagged with: jquery
has body: In a single web page a need make 3 different plot with highcharts.js and highmaps.js. The first that I try is load both script, but obviously don't work. Reading the HighMaps Doc, if already have load Highcharts, instead of highmaps.js I have to load: &lt;script src="http://code.highcharts.com/maps/modules/map.js"&gt;&lt;/script&gt; So I try that but it does not work, I can't see the 3 plots, why? This is my code, and this are the 3 plots: plot 1, plot 2 and plot 3 Thanks!
favorite count: 0

http://stackoverflow.com/comment/44360529
type: QuestionComment
comment on: http://stackoverflow.com/q/27984719
has text: that shouldn't be a problem. Show the data as is
score: 0
type: Comment

http://stackoverflow.com/a/27999921
accepted answer of: http://stackoverflow.com/q/27997811
has body: Well, after a lot of smoke out of my ears i got it to work: add json2 $ bower install --save json2 This does not work out of box because there is no tags in the repo. Edit the bower.js File to set the version to "master". Then it works. add jStorage $ bower install --save jstorage Install the dependencies (not sure if necessary but i did it) $ ember install:bower Then the files are available in the folder bower_components, which is ignored by git and apparently my editor (atom.io) too. Import the files in the Brockfile.js like this ... app.import('bower_components/json2/json2.js'); app.import('bower_components/jstorage/jstorage.js'); module.exports = app.toTree(); Use it, prefixing $ with Ember not to upset JSHint (would work without) ... var stored = Ember.$.jStorage.get(id); ...
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27997811
type: Answer

http://stackoverflow.com/q/28054430
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44491274
type: Question
has comment: http://stackoverflow.com/comment/44490912
has comment: http://stackoverflow.com/comment/44491328
tagged with: javascript
has answer: http://stackoverflow.com/a/28056816
has title: selectize doesn't render inside dropdown
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/28056816
has body: I'm trying to use selectize.js to populate a text box from a database based on user input, but it's not rendering inside the dropdown. I'm getting the correct data from the database, but not sure how to get it to render. Maybe the JSON isn't formed correctly? Here's the JS: var $select = $('#tags').selectize({ delimiter: ',', persist: false, valueField: 'PKID', labelField: 'TAG', searchField: ['TAG'], maxOptions: 10, create: true, render: { option: function (item, escape) { return '&lt;div&gt;' + escape(item.TAG) + '&lt;/div&gt;'; } }, load: function (query, callback) { if (!query.length) return callback(); $.ajax({ url: '/components/nl', type: 'POST', dataType: 'json', data: { method: 'getTags', tag: query, maxresults: 10 }, error: function () { callback(); }, success: function (res) { callback(res); } }); } }); Here's the input box: &lt;input id="tags" class="selectize" type="text" name="tags" value="" placeholder="Tags separated by commas (optional)"&gt; Here's what's being returned if the person starts to type in "straw". {"COLUMNS":["PKID","TAG"],"DATA":1475,"strawberries"} This is exactly what it should return, but not sure why I don't see "strawberries" as a choice in the dropdown. I only see "straw" which is what I have typed.
tagged with: jquery
tagged with: selectize.js

http://stackoverflow.com/q/28086822
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/28087058
has body: in PHP I can use memory_get_usage(). Is there anything like that in nodejs? The memwatch library doesn't seem to provide that info, it only emits some events when a "leak" occurs
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28086961
has answer: http://stackoverflow.com/a/28087058
upvote count: 1
has answer: http://stackoverflow.com/a/28086961
downvote count: 1
has title: Find out how much memory is used by the script
type: Question
tagged with: javascript

http://stackoverflow.com/a/27989396
answers question: http://stackoverflow.com/q/27984173
type: Answer
upvote count: 1
has body: The answer is to change the following line: dropDownControl.dropdown(); To this: dropDownControl.show();
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27984173

http://stackoverflow.com/q/28037753
tagged with: angularjs
has title: Best way to write DI in AngularJS?
has comment: http://stackoverflow.com/comment/44459842
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28046827
score: 0
tagged with: coffeescript
upvote count: 1
downvote count: 1
type: Question
tagged with: dependency-injection
has body: The codes without inline array dependency injection looks like this angular .module('app') .controller('TripListController', (TripListService, $scope, uiGmapGoogleMapApi) -&gt; return ) .controller('UserListController', (UserListService, $scope, uiGmapGoogleMapApi) -&gt; return ) What I need is to inject different TripListService (TripListServiceFake, TripListServiceDev or TripListServiceDist) but keep other service such as $scope and uiGmapGoogleMapApi unchanged. I tried to rewrite it like this: useConfig = { fake: TripListService: 'TripListServiceFake' UserListService: 'UserListServiceFake' dist: TripListService: 'TripListServiceDist' UserListService: 'UserListServiceDist' } angular .module('app') .controller('TripListController',[useConfig.fake.TripListService, (TripListService, $scope, uiGmapGoogleMapApi) -&gt; return ]) .controller('UserListController',[useConfig.fake.UserListService, (UserListService, $scope, uiGmapGoogleMapApi) -&gt; return ]) But I find this doesn't work because angularJS doesn't support partial inline array DI. Therefore, $scope and uiGmapGoogleMapApi also needs DI, though I don't want to write inline array DI for every constant service clumsily. Moreover, I found this still looks clumsy, is there better way to refactor codes like this?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28046827
has comment: http://stackoverflow.com/comment/44459890
answer count: 1
favorite count: 0

e10s
tag name: e10s
tags question: http://stackoverflow.com/q/28037177
type: Tag

http://stackoverflow.com/q/28045534
score: 0
has answer: http://stackoverflow.com/a/28045655
tagged with: multidimensional-array
has body: I am trying to setup a jquery autocomplete input based on the user's input in a previous field. I have a php script that returns a json variable to this jquery post function. however I can't seem to set up my array correctly after. I have tried just setting a variable to the data and processing the array outside of the $.post function, but still no luck. I am just unsure how and why the sub-value of my array is alerted correctly when the "parent" value as such is shown as null? function populateMetrics(light_id){ var availableMetrics = []; $.post( "getLightMetrics.php", { light_id: light_id, }, function(data) { $.each(data, function(index, item){ alert(index); //correct index availableMetrics[index] = []; availableMetrics[index]['value'] = item.benchmark_id; alert(availableMetrics[index]['value']); //correct value alert(availableMetrics[index]); //null? availableMetrics[index]['label'] = item.benchmark_variant + "-" + item.benchmark_metric; alert(availableMetrics[index]['label']); //correct alert(item.benchmark_id + " = " + item.benchmark_variant + "-" + item.benchmark_metric); alert(availableMetrics[index]); //still null }); alert(availableMetrics); //all null, but correct amount $( "#metric" ).autocomplete({ source: availableMetrics, focus: function( event, ui ) { $( "#metric" ).val( ui.item.label ); return false; }, select: function( event, ui ) { $( "#metric" ).val( ui.item.label ); $( "#metric_id" ).val( ui.item.value ); return false; } }); }, "json" ); }
accepted answer: http://stackoverflow.com/a/28045655
type: AnsweredQuestion
has title: javascript multidimensional array acting strangely
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/44473598
tagged with: post
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27974579
answers question: http://stackoverflow.com/q/27970857
type: Answer
upvote count: 11
score: 11
has body: If your "Creator" column is of type Pointer&lt;_User> and your allFriends array is an array of IDs for Users, then this is what you need to do: Create an array of Pointer&lt;_User> objects from allFriends: var pointers = _.map(allFriends, function(friendId) { var pointer = new Parse.User(); pointer.id = friendId; return pointer; }); Once you have an array of Pointer&lt;_User> you can then compare your column: query.containedIn('Creator', pointers); You were very close, it was just a matter of creating the right kind of pointers.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27970857

http://stackoverflow.com/q/28033899
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/35910219
has answer: http://stackoverflow.com/a/28034306
answer count: 3
linked to: http://stackoverflow.com/q/14012239
accepted answer: http://stackoverflow.com/a/28053412
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44453480
favorite count: 0
possible better answer: http://stackoverflow.com/a/28034306
has comment: http://stackoverflow.com/comment/44453064
tagged with: angularjs-validation
tagged with: angularjs
has body: Angular adds ng-invalid class automatically to email input field if it's invalid, how's it possible to have the class ng-invalid added to input#confirmEmail if it's doesn't match to input#email and remove if they match. Basically I'm not required to show any messages in case of mismatch, just wanna highlight the input field through ng-invalid class and validate the form based on that. Email Confirm Email
type: AnsweredQuestion
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/28053412
has title: adding ng-invalid class on input mismatch

http://stackoverflow.com/comment/44521428
type: AnswerComment
score: 0
type: Comment
has text: JQuery was loading after highcharts.js and that was causing this to not render properly. Any idea how to move the chart higher up in the container div?
comment on: http://stackoverflow.com/a/28060624

http://stackoverflow.com/a/28013910
has body: Give this a shot var sorted = unsorted.sort(function(a, b) { return a.id === b.id ? Date.parse(a.date) - Date.parse(b.date) : a.id - b.id ; }); Explanation If the id field is equal, we want to return the comparison of the date field. If the id field is not equal, we will return the comparison of the id field
upvote count: 3
answers question: http://stackoverflow.com/q/28013834
score: 3
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44361060
comment on: http://stackoverflow.com/a/27985001
type: Comment
has text: if user select male female both..?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44325727
score: 0
comment on: http://stackoverflow.com/q/27966400
type: Comment
type: QuestionComment
has text: By the way, after I reinstalled the extension - it worked without problems.

http://stackoverflow.com/a/28071252
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28071096
downvote count: 0
has body: You could change it slightly to get the H2 element by the tag name document.getElementsByClassName("CentralContainer")[0]. getElementsByClassName("PlayFlowSelect")[0]. getElementsByTagName('h2')[0].innerHTML; Reads a bit cleaner (IMO) then more array node indexes and avoid additional id's

http://stackoverflow.com/comment/44499139
type: Comment
score: 0
has text: I mean, in the middle of a word is what I mean. @Thilo
comment on: http://stackoverflow.com/q/28058771
type: QuestionComment

http://stackoverflow.com/comment/44459565
type: Comment
has text: Thanks for the quick response! I have changed the structure of my controllers. Am I correct in thinking that it will fix my dependency issue? I receive 0 errors.
comment on: http://stackoverflow.com/a/28037377
score: 0
type: AnswerComment

http://stackoverflow.com/a/28103912
type: Answer
answers question: http://stackoverflow.com/q/28103691
score: 1
upvote count: 1
has body: I think this may help you. Based on CSS3: .trans { -webkit-transition: 0.3s ease; -moz-transition: 0.3s ease; -ms-transition: 0.3s ease; -o-transition: 0.3s ease; transition: 0.3s ease; } .test_outer { display: block; width: 512px; height: 381px; margin: 1em auto; position: relative; overflow: hidden; } .test_cover { width: 100px; height: 100px; border: 512px solid rgba(0, 0, 0, .35); border-radius: 50%; position: absolute; left: -325px; top: -465px; } .test_cover:hover { width: 150px; height: 150px; left: -350px; top: -490px; } .test_cover:hover:after { content: "Look at me~"; margin: 50px 0 0 -30px; color: #fff; font: bold 20px/1.2 'Lucida Console'; text-shadow: 1px 1px rgba(0, 0, 0, .35); position: absolute; } &lt;a href="#" class="test_outer"&gt; &lt;span class="test_cover trans"&gt;&lt;/span&gt; &lt;img src="https://i.sstatic.net/e5sjf.jpg" width="512" height="381" border="0" /&gt; &lt;/a&gt; ==>> jsfiddle
downvote count: 0

http://stackoverflow.com/comment/44453922
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28034389
has text: Thanks, but I'm now getting a [ngTransclude:orphan] error. Any ideas?

http://stackoverflow.com/a/28081695
downvote count: 0
answers question: http://stackoverflow.com/q/28081592
has body: See this php i whipped up. This would make your modals unique and the appropriate information would be inputted into the modal based on which modal id is open. you could do the same to echo the buttons to open the modal using the dynamic id. EDIT: Added a connect to sql script. EDIT: Set query to your select query EDIT: Added mysql_num_rows, set it to $totalRows_rsEvents $db_host = "host url"; $db_username = "username"; $db_pass = "password"; $db_name = "database name"; mysql_connect("$db_host","$db_username","$db_pass"); mysql_select_db("$db_name"); $modalList = ''; $rsEvents = mysql_query("SELECT * FROM ri_Events WHERE eventPromote AND eventStatus = '1' ORDER BY eventDate ASC"); $totalRows_rsEvents = mysql_num_rows($rsEvents); while($row_rsEvents = mysql_fetch_array($rsEvents)){ $modalList .= '&lt;div class="modal fade" id="myModal'.$id = $row_rsEvents["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-hidden="true"&gt;&amp;times;&lt;/button&gt; &lt;h1 class="modal-title" id="myModalLabel1"&gt;'.$row_rsEvents['eventTitle'].'&lt;/h1&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;div class="row"&gt; &lt;div id="eventHolder" class="col-sm-12"&gt; &lt;div class="col-sm-7"&gt;'.$row_rsEvents['eventContent'].'&lt;/div&gt; &lt;div class="col-sm-5 pull-right"&gt; &lt;div&gt;&lt;img src="img/events/'.$row_rsEvents['eventPhoto'].'" alt="ALT"&gt;&lt;/div&gt; &lt;div&gt;'.$row_rsEvents['eventPhotoCaption'].'&lt;/div&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="modal-footer"&gt;&lt;div class="pull-left"&gt;'.(($row_rsEvents['eventDate'])?date('d M Y',strtotime($row_rsEvents['eventDate'])):'').'&lt;/div&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;'…
type: Answer
has comment: http://stackoverflow.com/comment/44602279
has comment: http://stackoverflow.com/comment/44599345
score: 1
upvote count: 1

http://stackoverflow.com/a/27966151
has comment: http://stackoverflow.com/comment/44327207
has comment: http://stackoverflow.com/comment/44327146
downvote count: 1
has comment: http://stackoverflow.com/comment/68473953
has comment: http://stackoverflow.com/comment/44327260
has comment: http://stackoverflow.com/comment/44327455
accepted answer of: http://stackoverflow.com/q/27965797
has comment: http://stackoverflow.com/comment/44328874
score: 0
answers question: http://stackoverflow.com/q/27965797
has comment: http://stackoverflow.com/comment/44330715
type: AcceptedAnswer
has body: If jQuery is not added to your project, then find with class selector will not work. I have created a working plunker using angular only with element.children() Edit: Updated plunker with jquery. I have optimized the code to first prepare the DOM and then appeded it to the element.
has comment: http://stackoverflow.com/comment/44331188
has comment: http://stackoverflow.com/comment/44328490
type: Answer
has comment: http://stackoverflow.com/comment/44330150
upvote count: 1
has comment: http://stackoverflow.com/comment/44327318

http://stackoverflow.com/comment/44723118
type: AnswerComment
type: Comment
has text: it's done !! "disableButton = !disableButton" trick did all my work. thanks a ton ! :-)
comment on: http://stackoverflow.com/a/28101859
score: 0

http://stackoverflow.com/a/28061532
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/44504450
answers question: http://stackoverflow.com/q/28061403
has body: Just create two local variable inside the scope and change their value according to the current value of clicked button. Like :- &lt;body ng-controller="hello"&gt; &lt;input type="button" class="button" ng-click="click()" value="{{myvalue}}"/&gt;&lt;div class="text_block"&gt;{{value}}&lt;/div&gt; &lt;script&gt; var app=angular.module('app',[ ]); app.controller("hello",function($scope){ $scope.value="STOP";//default value $scope.myvalue="click"; $scope.click=function(){ if($scope.myvalue=="click"){ $scope.myvalue="clicked"; $scope.value="START"; }else{ $scope.myvalue="click"; $scope.value="STOP"; } } }); &lt;/script&gt; &lt;/body&gt; Here is the plunker:- http://plnkr.co/edit/QsW1zzQF4BdslMwMFPxU?p=preview

http://stackoverflow.com/comment/44565046
type: Comment
has text: It should be temperatures[$index] actually but that did it, thanks :) what exactly is the $index? Is that the current iteration value (1, 2, 3 etc) from cities loop?
comment on: http://stackoverflow.com/a/28094481
score: 0
type: AnswerComment

http://stackoverflow.com/q/28119710
has comment: http://stackoverflow.com/comment/44667165
score: 0
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44800987
tagged with: charts
has comment: http://stackoverflow.com/comment/44683318
has comment: http://stackoverflow.com/comment/44780142
has title: Restacking cumulative columns in Highcharts marimekko charts
type: Question
has body: I've got a basic variable width column chart (aka Marimekko) set up using Highcharts but am having trouble getting it to restack the columns properly to eliminate the data gap once a series has been removed or hidden. JSFIDDLE DEMO &lt;-- I've set up a demo of the issue here. You'll notice clicking on a legend item removes the series from the chart, but it also removes all of the following data points in the array (i.e. clicking on series C removes series C, D, and E whereas it should redraw to A-B-D-E). Since the y-axis data is meant to display a cumulative sum of all series, these should re-shuffle as adjacent columns with no gaps. How can I get this to render properly? THIS POST uses similar demo code and attempting to solve the same problem, however the answer is somewhat elusive and I am unable to get it working. Thanks in advance! $(function () { var dataArray = [ { name: 'A', x: 200, y: 120 }, { name: 'B', x: 380, y: 101 }, { name: 'C', x: 450, y: 84 }, { name: 'D', x: 198, y: 75 }, { name: 'E', x: 95, y: 55 } ]; function makeSeries(listOfData) { var sumX = 0.0; for (var i = 0; i &lt; listOfData.length; i++) { sumX += listOfData[i].x; } var allSeries = [] var x = 0.0; for (var i = 0; i &lt; listOfData.length; i++) { var data = listOfData[i]; allSeries[i] = { name: data.name, data: [ [x, 0], [x, data.y], { x: x + data.x / 2.0, y: data.y, dataLabels: { enabled: false, format: data.x + ' x {y}' } }, [x + data.x, data.y], [x + data.x, 0] ], w: data.x, h: data.y }; x += data.x + 0; } return allSeries; } $('#container').highcharts({ chart: { type: 'area' }, xAxis: { tickLength: 0, labels: { enabled: true} }, yAxis: { title: { enabled: false} }, plotOptions: { series: { events: { legendItemClick: function () { var pos = this.index; var sname = this.name; var chart = $('#container').highcharts(); while(chart.series.length &gt; 0) { chart.series[pos].remove(true); } dataArray[pos]= { name: sname, x: 0, y: 0 }; chart.series[0].setData(dataArray); } } }, area: { lineWid…
linked to: http://stackoverflow.com/q/27692037
tagged with: highcharts
tagged with: arrays
tagged with: javascript
tagged with: marimekko-chart

http://stackoverflow.com/a/28005099
has body: The radio buttons need the same "name" in order for only one to be allowed to be selected and you can set a value for each. Try this... Gender : Male Female
downvote count: 0
has comment: http://stackoverflow.com/comment/44902540
has comment: http://stackoverflow.com/comment/44406543
type: Answer
answers question: http://stackoverflow.com/q/28004531
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/44419372

http://stackoverflow.com/q/28093859
answer count: 1
has body: I need to identify if a Bootstrap modal was hide, but just when the form inside it was not submitted, I tried using: $('#ModalID').on('hidden.bs.modal', function () {}); But it is fired even when the commit is made. I need just when is cancelled, or cliked outside the modal, or even in close button. There is any way to identify it?
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
upvote count: 1
score: 1
type: Question
tagged with: modal-dialog
has answer: http://stackoverflow.com/a/28094340
has title: Close modal without commit listner
tagged with: javascript
tagged with: jquery
downvote count: 0

http://stackoverflow.com/a/28047039
type: Answer
has body: You are using the notification.alert incorrectly, try like this: $(document).on( 'taphold', '.swipebox',tapholdHandler); function tapholdHandler( event ){ navigator.notification.alert( "Do you want to download this photo?", alertCallback, "Download", ["No","Yes"]); } function alertCallback(buttonIndex){ if (buttonIndex == 1) download(); }
score: 0
answers question: http://stackoverflow.com/q/28043227

http://stackoverflow.com/a/28063685
has body: Ive been using Gulp for a couple of year now and never found an issue to this. When you run Gulp, during its compilation it takes note of the existing files and watches them only. A newly added file is not in Gulps memory, therefore it struggles to 'watch' new files... Being able to watch a folder would be a better choice.
answers question: http://stackoverflow.com/q/27972067
type: Answer
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/q/28056812
type: Question
has comment: http://stackoverflow.com/comment/44495340
tagged with: javascript
tagged with: image
has title: How to dynamically alter JPEG contrast and zoom level in the browser
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/28057232
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: http://stackoverflow.com/tag/jpeg
score: 0
has body: My educational website displays single medical images (such as chest X-rays) as a JPEG in a div. I'd like to add the ability for the user to dynamically change the contrast, zoom and pan within the div containing the JPEG. I've been searching for days for a Javascript library that could do this but I'm come up empty. Does anybody have any suggestions that might help?
has comment: http://stackoverflow.com/comment/44495344
has comment: http://stackoverflow.com/comment/44523647

http://stackoverflow.com/comment/44568365
type: Comment
comment on: http://stackoverflow.com/a/28096038
has text: @seroth can you link the website?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44490208
score: 0
type: AnswerComment
has text: @RickHitchcock I've just tested with mouse wheel click and it allows to scroll. How can I prevent this please?
comment on: http://stackoverflow.com/a/28053693
type: Comment

http://stackoverflow.com/a/28145657
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28113726
type: Answer
upvote count: 1
has body: In Webix 2.2 you can use separator property next to a filter configuration. Something like next header:{ content:"multiSelectFilter", separator:";" } Full sample can be checked by the next link http://webix.com/snippet/e3ed3929
accepted answer of: http://stackoverflow.com/q/28113726
score: 1

http://stackoverflow.com/q/28024391
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/28024613
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28024455
possible better answer: http://stackoverflow.com/a/28024613
tagged with: javascript
score: -1
answer count: 2
tagged with: element
upvote count: 0
accepted answer: http://stackoverflow.com/a/28024455
tagged with: string
has title: how do you select a json array if you know the name as a string?
favorite count: 0
has body: { "slider1": [ { "title": "titleof", "description": "something", "coverlink": "images/search-icon.png", "download": "link" } ] }, so the json gets loaded and a for loop uses the json to generate the content. for (b = 0; b &lt; floorvar; b++) { addeles[b].innerHTML = "&lt;img src='"+ jsonLoader[slider][b].coverlink +"'/&gt;" } in this case slider = slider1 , how can i use the string that i have (slider1) and get it to do the same as addeles[b].innerHTML = "&lt;img src='"+ jsonLoader.slider1[b].coverlink +"'/&gt;" Note: b is the index of the slider as it will have multiple elements, slider1 is a json array so slider1[0] selects the first element
type: AnsweredQuestion

http://stackoverflow.com/q/28039490
accepted answer: http://stackoverflow.com/a/28039555
has title: How to apply this code from 2 function to 1 function?
has answer: http://stackoverflow.com/a/28039554
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28039536
type: Question
score: -2
has comment: http://stackoverflow.com/comment/44462909
tagged with: javascript
has body: How to apply this code from 2 function to 1 function ? First, for show element i use show_box(value) function. And then for hide element i use hide_box(value) function. Now i want to apply for work in 1 function , How can i do that ? http://jsfiddle.net/k0rphh1e/ &lt;script LANGUAGE="JavaScript"&gt; function show_box(value) { var array_val = value.split("-"); $("#box-"+array_val[1]).stop().animate({left: '47px' , opacity: 1}, 100); } &lt;/script&gt; &lt;script LANGUAGE="JavaScript"&gt; function hide_box(value) { var array_val = value.split("-"); $("#box-"+array_val[1]).stop().animate({left: '27px' , opacity: 0}, 100); } &lt;/script&gt;
downvote count: 3
answer count: 3
possible better answer: http://stackoverflow.com/a/28039536
upvote count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/28039555

http://stackoverflow.com/q/28050811
has body: I am building a directive that implements a multi-step wizard-like functionality. To that end, I have 3 directives defined, one for the wizard container, one for the actual panels or steps and one for the next/prev controls. I have an wizard directive that is defined like so: function(angular, plBootstrap, plModalWizardTemplate, plModalWizardPanelTemplate, element) { 'use strict'; plBootstrap.directive('plModalWizard', function() { var controller = ['$scope', function($scope) { console.log('Controller in the directive: ' + $scope.$id); $scope.steps = {}; // step tracking $scope.currentStep = $scope.prevStep = ""; // Helper methods to add steps to the wizard. this.addStep = function(step, nextHandler) { //construct object $scope.steps[step] = nextHandler; }; // Nav functions this.moveForward = function() { // should really look up the hash // upon being called, this function checks the currentStep // then gets the corresponding nextHandler // then handles the navigation to the next step console.log("Current Step:" + $scope.currentStep); var foo = $scope.steps[$scope.currentStep](); console.log("Scope in directive:" + $scope.$id) } this.setAsFirstStep = function(step) { this.setCurrentStep(step) } }]; return { restrict: 'AE', transclude: true, replace: true, template: plModalWizardTemplate, controller: controller, scope: { firstStep: '@' }, link: function(scope, element, attributes, ctrl) { ctrl.printHash(); ctrl.setAsFirstStep(scope.firstStep); // set the first step } }; }); Then, I have the panel/step directive that basically adds the step names and the next-step handlers as key-value pairs into a hash. The idea is that the Wizard will read the $scope.currentStep and will execute the corresponding next step handler from the hash. As you can see from the above code, the stepForward() function is invoked when the Next button is clicked on the DOM. {{stepId}} {{stepId}} {{stepId}} {{stepId}} {{stepId}} {{stepId}} Previous Next Here, the "panels" or "steps" have a step-…
has comment: http://stackoverflow.com/comment/44507778
has comment: http://stackoverflow.com/comment/44485257
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44489131
type: UnansweredQuestion
has title: Not able to invoke function defined on $scope
has comment: http://stackoverflow.com/comment/44486282
type: Question
has comment: http://stackoverflow.com/comment/44484007
has comment: http://stackoverflow.com/comment/44487857
tagged with: javascript
has comment: http://stackoverflow.com/comment/44484212
has comment: http://stackoverflow.com/comment/44484654
score: 0
has comment: http://stackoverflow.com/comment/44484414
has comment: http://stackoverflow.com/comment/44485957
answer count: 1
has answer: http://stackoverflow.com/a/28074741

http://stackoverflow.com/a/28109861
score: -3
type: Answer
has body: Why don't you try this? Offcource you should create this functions with alerts first.
downvote count: 3
upvote count: 0
answers question: http://stackoverflow.com/q/28109743

http://stackoverflow.com/q/27976155
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: force switch language to english for an input element
has comment: http://stackoverflow.com/comment/44344956
has answer: http://stackoverflow.com/a/27976271
upvote count: 3
has comment: http://stackoverflow.com/comment/44344742
linked to: http://stackoverflow.com/q/12303593
type: Question
has body: OK, here's the stuff: I got one element &lt;input type="text" id="username" size="15"&gt; and I need this element to force switch keyboard layout from ANY other language to English when users type something in this element. I DO NOT need to send it to the server. I simply need to force switch the language while typing in it. Does anyone have a simple JS solution for it? Here's what I've been thinking about: Theoretically. If i knew the language it shoud switch from, then i could write a JS which would replace every symbol to English
has comment: http://stackoverflow.com/comment/44344725
tagged with: javascript
linked to: http://stackoverflow.com/q/12595970
has comment: http://stackoverflow.com/comment/44344732
answer count: 2
score: 3
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/44344863
favorite count: 0
has comment: http://stackoverflow.com/comment/44344990
has answer: http://stackoverflow.com/a/78858525

http://stackoverflow.com/a/28327026
type: AcceptedAnswer
type: Answer
has body: It is possible to change keyframes on loaded stylesheets. Here you have a stack overflow answer from 2011. And here's a link to a recent blog post about it.
answers question: http://stackoverflow.com/q/28007794
accepted answer of: http://stackoverflow.com/q/28007794
score: 0

http://stackoverflow.com/q/28073801
type: AnsweredQuestion
has body: I'm trying to write a RegEx that returns true if the string starts with / or http: and only allows alpha numeric characters, the dash and underscore. Any white space and any other special characters should fire a false response when tested. Below works fine (except that it allows special characters, I have not figured out how to do that yet) when tested at https://www.regex101.com/#javascript. Unfortunately returns false when I implement it in my site and test it with /products/homedecor/tablecloths. What am I doing wrong and is there a better regEx to use that would accomplish my goals? ^(\\/|(?:http:))\S+[a-zA-Z0-9-_]+$
score: 1
has title: RegEx works in tester not on site using JavaScript
type: Question
has comment: http://stackoverflow.com/comment/44526966
answer count: 2
accepted answer: http://stackoverflow.com/a/28073828
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28073830
has comment: http://stackoverflow.com/comment/44527256
has answer: http://stackoverflow.com/a/28073828
favorite count: 0
has answer: http://stackoverflow.com/a/28073830
upvote count: 1
tagged with: regex

http://stackoverflow.com/comment/44866864
comment on: http://stackoverflow.com/a/28102396
score: 0
type: AnswerComment
type: Comment
has text: @rmdsf 3 per paragraph - if you only want 3 per page, you'd have to select the container for all of the paragraphs rather than each paragraph element separately. So, for example, your "article" was in a `DIV` with class `content`, `$('.content').replacetext(...)`

http://stackoverflow.com/q/27991066
favorite count: 0
downvote count: 5
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 0
score: -5
has title: What is wrong with my code for a basic calculator?
accepted answer: http://stackoverflow.com/a/27991097
type: Question
has body: I'm trying to program a calculator, but I can't find the bug in my code. Here's my code: * times If you know how, and want to, can you help me to make it a calculator for +,-,:,* etc all in one? Thank you very much!
tagged with: javascript
has answer: http://stackoverflow.com/a/27991097
has comment: http://stackoverflow.com/comment/44372977
answer count: 1
tagged with: calculator

http://stackoverflow.com/q/28111395
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1861030
has answer: http://stackoverflow.com/a/28111866
score: 0
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28111866
answer count: 1
tagged with: jquery
has body: Hello I am working on a site that uses a jquery accordion. The customer is asking me to make it that they can link to individual accordion panels from a different page. I am not sure how to do it preferably using a url # (hash). Can someone please tell me what I would need to do. My current code can be seen at: JsFiddle For quick reference this is the code that triggers the accordion: $(document).ready(function () { $('.accordion').accordion({ defaultOpen: 'section1' }); //some_id section1 in demo });
tagged with: accordion
has title: Opening Jquery Accordion via url hash
has comment: http://stackoverflow.com/comment/44596742

http://stackoverflow.com/q/28020294
tagged with: javascript
has comment: http://stackoverflow.com/comment/44454023
tagged with: infinite-scroll
tagged with: css
answer count: 0
type: UnansweredQuestion
score: 0
has title: iphone 6 paul irish javascript crash
has body: I have added infinite scroll to my tumbleblog and it seems to make the theme crash on iphone 6 plus. Having looked at other sites on the same phone using the same script, the problem seems to only happen on my tumbleblog. The code I have used is below: (function () { var $tumblelog = $('.grid'); $tumblelog.infinitescroll({ navSelector: ".bar", nextSelector: ".next a", itemSelector: ".post", loading: { finishedMsg: '{lang:No more posts}', img: 'http://static.tumblr.com/cmghtlm/zWPnh0xhe/ajax-loader.gif', msgText: '' } }, function (newElements) { var $newElems = $(newElements).css({ opacity: 1 }); }); })(); I wondered are there any CSS3 styles and transitions that affect infinite scroll or mobile browsers? I am quite positive it is infinite scroll causing the issue. I tried removing it briefly and the problem seemed to disappear. Any help would be much appreciated. Thanks !! :) Example: http://ineedtreefiddy.tumblr.com/
has comment: http://stackoverflow.com/comment/44466496
type: Question
has comment: http://stackoverflow.com/comment/44428628
tagged with: ios

http://stackoverflow.com/comment/44587236
comment on: http://stackoverflow.com/a/28106204
score: 0
type: AnswerComment
type: Comment
has text: This is not easy, the addresse may also be in this form: var address = 'Dr Hans-Kapfinger-Strasse 1, 94057 Bad Kötzing'; or var address = 'Bahnhofstrasse 1, 80000 Munich';

http://stackoverflow.com/q/28005708
tagged with: javascript
tagged with: jquery
upvote count: 1
favorite count: 0
downvote count: 0
type: UnansweredQuestion
has body: How can i put a div in the bottom of the screen not the page ? But i don't want to use position:fixed because i want once i scroll down , the div go up like other elements. like the div in this web site
tagged with: css
has answer: http://stackoverflow.com/a/28005735
has answer: http://stackoverflow.com/a/28005725
has title: Div in the bottom of the screen
score: 1
has comment: http://stackoverflow.com/comment/44400108
type: Question
answer count: 2

http://stackoverflow.com/a/28043234
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: Try this:
type: Answer
accepted answer of: http://stackoverflow.com/q/28043116
answers question: http://stackoverflow.com/q/28043116
score: 1

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/28044615
tags question: http://stackoverflow.com/q/28050403
tags question: http://stackoverflow.com/q/27988342
tags question: http://stackoverflow.com/q/28120295
tags question: http://stackoverflow.com/q/28004902
type: Tag
tags question: http://stackoverflow.com/q/28054692
tags question: http://stackoverflow.com/q/28004863
tags question: http://stackoverflow.com/q/27987441

http://stackoverflow.com/a/28039555
type: Answer
score: 1
answers question: http://stackoverflow.com/q/28039490
accepted answer of: http://stackoverflow.com/q/28039490
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: Try This function show_box(value,type) { var array_val = value.split("-"); if(type=='show') { $("#box-"+array_val[1]).stop().animate({left: '47px' , opacity: 1}, 100);} else { $("#box-"+array_val[1]).stop().animate({left: '27px' , opacity: 0}, 100); } } Demo

http://stackoverflow.com/a/27966701
score: 0
answers question: http://stackoverflow.com/q/27966562
type: Answer
has body: fiddle red letter 1 red letter 2 red letter 3 red letter 4 red letter 5 The red letters was pressed 0 times.

http://stackoverflow.com/q/28107684
has comment: http://stackoverflow.com/comment/58881287
score: 2
has title: Multiple Filter to access nested JSON array
answer count: 0
upvote count: 2
type: Question
tagged with: nested-loops
tagged with: http://stackoverflow.com/tag/json
has body: I have a $filter which filters a (un-nested)JSON file just fine by passing filterMultiple:{dept:selectedDept,gender:selectedGender} this behavior is replicated in the fiddle: http://jsfiddle.net/UiCandy/mro6pxa9/1/ I've made two entries in the JSON file which contain nested objects. I want to be able to filter based on JSON data (One level deeper). There is no need to check the existence of nested objects in every record as all the records will contain nested objects(Just like the first two in the JSON file), I've only added the other records to show that it works for un-nested objects. I want my view to accept and filter values based on those nested objects: filterMultiple:{details.name:some-Model} However the filter does not accept 'foo.bar' or foo['bar'] notation. So if someone can point me in the right direction, it would be a huge help. What I tried: To check if(typeof(keyObj) == 'Object') and then hook a recursive function to it, with little success or probably my implementation is wrong. Can someone try that in the fiddle? Thanks for your time!
tagged with: javascript
tagged with: angular-filters
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/q/28102916
has comment: http://stackoverflow.com/comment/44584810
downvote count: 0
has title: window.location.href doesn't yield the exact url
has answer: http://stackoverflow.com/a/28110687
has comment: http://stackoverflow.com/comment/44594008
type: Question
has body: For some reason in my javascript the window.location.href returns only the domain name and not the current page address. function addLink() { console.log('hey'); var body_element = document.getElementsByTagName('body')[0]; var selection; selection = window.getSelection(); // added lines begin var htmlDiv = document.createElement("div"); for (var i = 0; i &lt; selection.rangeCount; ++i) { htmlDiv.appendChild(selection.getRangeAt(i).cloneContents()); } var selectionHTML = htmlDiv.innerHTML; // added lines end var pagelink = "&lt;br /&gt;&lt;br /&gt;Read more: " + window.location.href + " &lt;br /&gt;"; var copytext = selectionHTML + pagelink; // &lt;------------------- changed line var newdiv = document.createElement('div'); newdiv.style.position='absolute'; newdiv.style.left='-99999px'; body_element.appendChild(newdiv); newdiv.innerHTML = copytext; selection.selectAllChildren(newdiv); window.setTimeout(function () { body_element.removeChild(newdiv); }, 0); } document.oncopy = addLink; The file is active on http://www.chefsuccess.com thanks!
tagged with: javascript
has comment: http://stackoverflow.com/comment/44585167
upvote count: 2
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/12048477
type: UnansweredQuestion
score: 2

http://stackoverflow.com/a/27997126
score: 0
type: Answer
has body: $(".test").each(function(){ //You will get all elements contains test class });
answers question: http://stackoverflow.com/q/27997090

http://stackoverflow.com/q/28074610
has answer: http://stackoverflow.com/a/28074657
accepted answer: http://stackoverflow.com/a/28074657
type: Question
upvote count: 2
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/28074696
has body: I have a div that I need to hide when an option is selected in an option, below is my current html: Type: Multiple choice Image/Video Click Image Correct Answer: Wrong Answer 1: Wrong Answer 2: Wrong Answer 3: So what I need is when the option with the value "click" is selected the div with the id "answers" is hidden, if either the other options are selected this div should be shown. I am sure this can be dome with javas
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/28074696
score: 2
type: AnsweredQuestion
has title: Hide Div when option from select chosen
downvote count: 0

webbrowser-control
type: Tag
tags question: http://stackoverflow.com/q/28031562
tag name: webbrowser-control
tags question: http://stackoverflow.com/q/28009093

http://stackoverflow.com/a/28113936
upvote count: 4
has body: jQuery normalizes events using (undocumented, so prone to change in the future) jQuery.event.fix and you can use it in your code: document.getElementById("id").addEventListener("click", function(eventObject) { var jqNormalized = jQuery.event.fix( eventObject ); console.log(jqNormalized ); // jQuery.Event {...} }, true); http://jsfiddle.net/ghkfhg5d/1/
answers question: http://stackoverflow.com/q/28113830
downvote count: 0
has comment: http://stackoverflow.com/comment/44601890
score: 4
has comment: http://stackoverflow.com/comment/44602849
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44604446
type: Answer
has comment: http://stackoverflow.com/comment/44601771
accepted answer of: http://stackoverflow.com/q/28113830

creative-cloud
tags question: http://stackoverflow.com/q/27971675
tag name: creative-cloud
type: Tag

http://stackoverflow.com/a/28119403
upvote count: 1
has comment: http://stackoverflow.com/comment/44613131
downvote count: 1
score: 0
has comment: http://stackoverflow.com/comment/44613279
has comment: http://stackoverflow.com/comment/44613090
has comment: http://stackoverflow.com/comment/44613225
type: Answer
answers question: http://stackoverflow.com/q/28119361
has body: Because you're using two selectors and checking hello with the value will only work for those whose both value returns the same value. If both selector value results in different values then your condition never match. So, it will only match if both values are the same.

http://stackoverflow.com/comment/44434557
comment on: http://stackoverflow.com/q/28013128
score: 0
type: Comment
has text: I thought that $scope.image will return a searialized byte array that I can use to construct the image in the fron end. Does: $scope.image = data; $scope.imageUrl = "http://mywebsite/assets/now.png"; means that I make two requests for the same resource?
type: QuestionComment

http://stackoverflow.com/comment/44539880
score: 0
comment on: http://stackoverflow.com/q/28080574
type: Comment
type: QuestionComment
has text: your width option value is the problem... it should be `width: '100%'`, not `width: 100%`

http://stackoverflow.com/comment/59241246
has text: so many other attempts failed where this worked perfectly. Thank you
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28014604

http://stackoverflow.com/comment/44597478
has text: Maybe you can use `class` instead of an `id`
comment on: http://stackoverflow.com/q/28111878
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44614240
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28119963
has text: Without looking closer on you code, one obvious problem is the `$(strDlg).dialog("open");` this code is executed at the time when the click event happens, but at that time, the value for `strDlg` is the same for all the click callbacks.

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/28017970
tags question: http://stackoverflow.com/q/28012232
type: Tag

http://stackoverflow.com/a/27977680
has body: You have to wait until DOM finishes loading. Then you can apply your scripts. Since, in your master page, it is always a best practice to put all your scripts at bottom rather than at the header since the parser uses top down approach, it executes the script, after the body is completed loading. add your script tag and all @Script.Render code just before the &lt;/body&gt; and first add all the @Script.Render and then the &lt;script&gt;&lt;/script&gt; tag like &lt;body&gt; &lt;div id='calendar' style="border:dashed 2px red;"&gt;&lt;/div&gt; @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryval") @Scripts.Render("~/bundles/jqueryui") @Scripts.Render("~/bundles/fullcal") &lt;script type='text/javascript'&gt; $(document).ready(function () { var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); var calendar = $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'resourceDay' }, titleFormat: 'ddd, MMM dd, yyyy', defaultView: 'resourceDay', selectable: true, selectHelper: true, select: function (start, end, allDay, event, resourceId) { var title = prompt('Event Title:'); if (title) { console.log("@@ adding event " + title + ", start " + start + ", end " + end + ", allDay " + allDay + ", resource " + resourceId); calendar.fullCalendar('renderEvent', { title: title, start: start, end: end, allDay: allDay, resourceId: resourceId }, true // make the event "stick" ); } calendar.fullCalendar('unselect'); }, eventResize: function (event, dayDelta, minuteDelta) { console.log("@@ resize event " + event.title + ", start " + event.start + ", end " + event.end + ", resource " + event.resourceId); }, eventDrop: function (event, dayDelta, minuteDelta, allDay) { console.log("@@ drag/drop event " + event.title + ", start " + event.start + ", end " + event.end + ", resource " + event.resourceId); }, editable: true, resources: [ { name: 'Resource 1', id: 'resource1' }, { name: 'Resource 2', …
has comment: http://stackoverflow.com/comment/44347782
score: 0
has comment: http://stackoverflow.com/comment/44347775
has comment: http://stackoverflow.com/comment/44348004
answers question: http://stackoverflow.com/q/27977434
type: Answer
has comment: http://stackoverflow.com/comment/44347931
has comment: http://stackoverflow.com/comment/44348199
has comment: http://stackoverflow.com/comment/44347890
has comment: http://stackoverflow.com/comment/44348153

http://stackoverflow.com/comment/44403354
score: 0
type: Comment
type: QuestionComment
has text: use processData to false:
comment on: http://stackoverflow.com/q/28007574

css
tags question: http://stackoverflow.com/q/28039558
tags question: http://stackoverflow.com/q/28000926
tags question: http://stackoverflow.com/q/27983004
tags question: http://stackoverflow.com/q/28061218
tags question: http://stackoverflow.com/q/27973459
tags question: http://stackoverflow.com/q/28037021
tags question: http://stackoverflow.com/q/27969030
tags question: http://stackoverflow.com/q/28077374
tags question: http://stackoverflow.com/q/28023210
tags question: http://stackoverflow.com/q/28106735
tags question: http://stackoverflow.com/q/28018132
tags question: http://stackoverflow.com/q/28087202
tags question: http://stackoverflow.com/q/28112863
tags question: http://stackoverflow.com/q/28011625
tags question: http://stackoverflow.com/q/28031705
tags question: http://stackoverflow.com/q/28041371
tags question: http://stackoverflow.com/q/28110309
tags question: http://stackoverflow.com/q/28088510
tags question: http://stackoverflow.com/q/28077255
tags question: http://stackoverflow.com/q/28120580
tags question: http://stackoverflow.com/q/28120990
tags question: http://stackoverflow.com/q/28032461
tags question: http://stackoverflow.com/q/28087458
tags question: http://stackoverflow.com/q/28065885
tags question: http://stackoverflow.com/q/28015966
tags question: http://stackoverflow.com/q/28061916
tags question: http://stackoverflow.com/q/28081914
tags question: http://stackoverflow.com/q/27989810
tags question: http://stackoverflow.com/q/28120547
tags question: http://stackoverflow.com/q/28008679
tags question: http://stackoverflow.com/q/28031290
tags question: http://stackoverflow.com/q/28121210
tags question: http://stackoverflow.com/q/28110568
tags question: http://stackoverflow.com/q/28072408
tags question: http://stackoverflow.com/q/28010404
tags question: http://stackoverflow.com/q/27978294
tags question: http://stackoverflow.com/q/28107269
tags question: http://stackoverflow.com/q/28006732
tags question: http://stackoverflow.com/q/27965254
tags question: http://stackoverflow.com/q/28019422
tags question: http://stackoverflow.com/q/28115576
tags question: http://stackoverflow.com/q/27988878
tags question: http://stackoverflow.com/q/28103125
tags question: http://stackoverflow.com/q/28014467
tags question: http://stackoverflow.com/q/28095617
tags question: http://stackoverflow.com/q/28026405
tags question: http://stackoverflow.com/q/28117141
tags question: http://stackoverflow.com/q/27965797
tags question: http://stackoverflow.com/q/27999003
tags question: http://stackoverflow.com/q/28001325
tags question: http://stackoverflow.com/q/27970324
tags question: http://stackoverflow.com/q/27973042
tags question: http://stackoverflow.com/q/28085090
tags question: http://stackoverflow.com/q/28059552
tags question: http://stackoverflow.com/q/28023757
tags question: http://stackoverflow.com/q/28096346
tags question: http://stackoverflow.com/q/28106089
tags question: http://stackoverflow.com/q/28012337
tags question: http://stackoverflow.com/q/27970131
tags question: http://stackoverflow.com/q/27965269
tags question: http://stackoverflow.com/q/28041675
tags question: http://stackoverflow.com/q/28092637
tags question: http://stackoverflow.com/q/28070321
tags question: http://stackoverflow.com/q/28024928
tags question: http://stackoverflow.com/q/28026800
tags question: http://stackoverflow.com/q/28107942
tags question: http://stackoverflow.com/q/28075366
tags question: http://stackoverflow.com/q/27989938
tags question: http://stackoverflow.com/q/28067889
tags question: http://stackoverflow.com/q/28027302
tags question: http://stackoverflow.com/q/28082872
tags question: http://stackoverflow.com/q/28003731
tags question: http://stackoverflow.com/q/28088186
tags question: http://stackoverflow.com/q/28110782
tags question: http://stackoverflow.com/q/28006540
tags question: http://stackoverflow.com/q/28106778
tags question: http://stackoverflow.com/q/28023849
tags question: http://stackoverflow.com/q/28050548
tags question: http://stackoverflow.com/q/28012829
tags question: http://stackoverflow.com/q/28019240

http://stackoverflow.com/a/28033300
downvote count: 0
has body: Here is a plunkr with the filter working, I just set the array you were making equal to a $scope.variable and used that for the ng-repeat. Plunkr I altered the code a bit since I wasn't doing the GET request in the plunkr but the idea is the same. var mySports = _.values($scope.sports); $scope.sportsArray = _.sortBy(mySports, function(sport) { return sport.priority; }); console.log($scope.sportsArray); //and the HTML &lt;div ng-repeat="sport in sportsArray | filter:query"&gt;&lt;/div&gt; Let me know if that makes sense.
type: Answer
accepted answer of: http://stackoverflow.com/q/28033097
has comment: http://stackoverflow.com/comment/44452105
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44452334
answers question: http://stackoverflow.com/q/28033097
type: AcceptedAnswer

http://stackoverflow.com/q/28061937
tagged with: ajax
type: AnsweredQuestion
has title: Populate Highchart Column From JSON
type: Question
score: 0
has comment: http://stackoverflow.com/comment/44508653
has answer: http://stackoverflow.com/a/28062576
answer count: 1
tagged with: http://stackoverflow.com/tag/json
has body: I have to create a column chart in my project using Highchart. I am using $.ajax to populate this data. My current JSON data is like this : [{ "city": "Tokyo", "totalA": "10", "totalB": "15" }, { "city": "Seoul", "totalA": "20", "totalB": "27" }, { "city": "New York", "totalA": "29", "totalB": "50" }] How to resulting JSON string look like this: [{ "name": "city", "data": ["Tokyo", "Seoul", "New York"] }, { "name": "totalA", "data": [10, 20, 29] }, { "name": "totalB", "data": [15, 27, 50] }] Thank you.
accepted answer: http://stackoverflow.com/a/28062576
tagged with: highcharts
has comment: http://stackoverflow.com/comment/44505383
tagged with: javascript

http://stackoverflow.com/q/27964176
tagged with: carousel
has answer: http://stackoverflow.com/a/27964549
tagged with: css
has comment: http://stackoverflow.com/comment/44321603
has comment: http://stackoverflow.com/comment/44321780
type: AnsweredQuestion
upvote count: 2
has title: Bootstrap 3 carousel code
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/44321511
has comment: http://stackoverflow.com/comment/44321386
accepted answer: http://stackoverflow.com/a/27964549
has body: I need to create Bootstrap 3 carousel, it needs to have image on the right side of the slide and text on the left side of the slide, but I simply can not make it, whatever code i tried it either bugged or didn't worked. Tried this: TEXT TEXT TEXT And it didnot worked. I need something like this http://www.dodaj.rs/f/18/29/4TNTTm5d/untitled.png
tagged with: javascript
score: -1
answer count: 1
favorite count: 0
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/44321270

http://stackoverflow.com/comment/44455152
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/28035005
has text: @Bergi I never said (nor implied) that it does.
type: Comment

http://stackoverflow.com/q/28050192
accepted answer: http://stackoverflow.com/a/29224329
type: Question
answer count: 2
has body: I have the below code in a script I am using for Google AdWords and it is working well however was hoping that it could be shortened or consolidated in some way easily. It is currently working however has nearly double the script run time and is not very easy for changes and expansion in the future (if needed). Please let me know how you would do this or if you need any other information! //projections by Campaign row 22 sheet.getRange("E10").setValue("=A22"); sheet.getRange("E11").setValue("=H22"); sheet.getRange("E12").setValue("=J22"); sheet.getRange("E13").setValue("=Round(E11/E12)"); sheet.getRange("E14").setValue("=B22"); sheet.getRange("E15").setValue("=D22"); sheet.getRange("E17").setValue("=sum((G22/E3)*100)"); sheet.getRange("E18").setValue("=E11-E3"); sheet.getRange("E19").setValue("=ROUND(E18/B6)"); //projections by Campaign row 23 sheet.getRange("F10").setValue("=A23"); sheet.getRange("F11").setValue("=H23"); sheet.getRange("F12").setValue("=J23"); sheet.getRange("F13").setValue("=Round(F11/F12)"); sheet.getRange("F14").setValue("=B23"); sheet.getRange("F15").setValue("=D23"); sheet.getRange("F17").setValue("=sum((G23/F3)*100)"); sheet.getRange("F18").setValue("=F11-F3"); sheet.getRange("F19").setValue("=ROUND(F18/B6)"); //projections by Campaign row 24 sheet.getRange("G10").setValue("=A24"); sheet.getRange("G11").setValue("=H24"); sheet.getRange("G12").setValue("=J24"); sheet.getRange("G13").setValue("=Round(G11/G12)"); sheet.getRange("G14").setValue("=B24"); sheet.getRange("G15").setValue("=D24"); sheet.getRange("G17").setValue("=sum((G24/G3)*100)"); sheet.getRange("G18").setValue("=G11-G3"); sheet.getRange("G19").setValue("=ROUND(G18/B6)"); //projections by Campaign row 25 sheet.getRange("H10").setValue("=A25"); sheet.getRange("H11").setValue("=H25"); sheet.getRange("H12").setValue("=J25"); sheet.getRange("H13").setValue("=Round(H11/H12)"); sheet.getRange("H14").setValue("=B25"); sheet.getRange("H15").setValue("=D25"); sheet.getRange("H17").setValue(…
tagged with: javascript
tagged with: google-ads-api
score: 0
has answer: http://stackoverflow.com/a/29224329
has title: Consolidate AdWords Script
has comment: http://stackoverflow.com/comment/44485597
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28363132
tagged with: consolidation
possible better answer: http://stackoverflow.com/a/28363132

http://stackoverflow.com/a/28038532
has body: try this &lt;img alt="" src="images/search-icon.png" width="16" height="16" style="display: inline;height:16px;cursor:pointer; width: 16px;" onclick="ViewLookUpPayment('&lt;%=btnShowCorpCode.ClientID %&gt;');" /&gt; function ViewLookUpPayment(obj) { document.getElementById(obj).style.display = "block"; }
score: 0
has comment: http://stackoverflow.com/comment/44461202
answers question: http://stackoverflow.com/q/28038494
type: Answer
has comment: http://stackoverflow.com/comment/44461512

http://stackoverflow.com/comment/44373190
score: 0
type: QuestionComment
has text: Thierry, I ended with a solution very similar to yours which allowed me to assign a specific icon image to one location and default the rest. Much appreciated.
type: Comment
comment on: http://stackoverflow.com/q/27987967

http://stackoverflow.com/q/28029764
has comment: http://stackoverflow.com/comment/44444316
tagged with: list
downvote count: 2
has comment: http://stackoverflow.com/comment/44444992
has comment: http://stackoverflow.com/comment/44480327
has answer: http://stackoverflow.com/a/28030672
type: Question
has comment: http://stackoverflow.com/comment/44444387
has comment: http://stackoverflow.com/comment/44444951
tagged with: javascript
tagged with: for-loop
has body: I can't run through this list and I've tried all ways: list=[{'fullName': 'doubleparty', 'name': 'double'}, {'fullName': 'runtime', 'name': 'run'}, }]; for (var i in list) {} I tried to parse it to JSON but the simple quotes are not accepted ( I think ) Thanks a lot.
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44444445
has title: run through JS object list
favorite count: 0
has comment: http://stackoverflow.com/comment/44444405
type: UnansweredQuestion
score: -2

http://stackoverflow.com/q/28100688
score: 2
linked to: http://stackoverflow.com/q/6715571
type: Question
tagged with: debugging
has body: I found this question which is "close" to what I'm looking for: How to get result of console.trace() as string in javascript with chrome or firefox? However, is there a way to actually replace which JS file (and line number) the log entry originates from? I'm funneling all my debug traces through another method, so no matter what I log/trace, it always shows up as the same file:line# (and once clicked on, there's no way to traverse the stack / code like you can during a live debug session). I could try to simply log the stack Error.captureStackTrace(obj, trace); immediately after the given object (since concatenating them in the same trace would treat them as Strings, instead of clickable log entries), but I'm hoping there's a way to hijack Chrome's console a bit :)
answer count: 1
downvote count: 0
tagged with: javascript
has title: Is there a way to trick/redirect Chrome's stacktrace when calling console.log?
has comment: http://stackoverflow.com/comment/44578046
favorite count: 0
has comment: http://stackoverflow.com/comment/44577939
tagged with: console.log
upvote count: 2
type: UnansweredQuestion
tagged with: google-chrome
has answer: http://stackoverflow.com/a/28101208

http://stackoverflow.com/a/28121838
has body: To get an array of sentences: var matches = text.match(/.+?(?:(?:\\n)+|$)/g);
answers question: http://stackoverflow.com/q/28121766
score: 0
has comment: http://stackoverflow.com/comment/44618019
has comment: http://stackoverflow.com/comment/44618067
type: Answer
has comment: http://stackoverflow.com/comment/44617934

http://stackoverflow.com/q/27985486
type: Question
has answer: http://stackoverflow.com/a/27985808
tagged with: javascript
has title: Substring filter on angular-data resource
score: 0
answer count: 1
tagged with: angularjs
has body: DEFAULT_RECORDS = [{ id: 1, name: 'John Evans', number: '01928 356115' },{ id: 16, name: 'Murbinator', number: '053180 080000' }]; - lookup: function (name) { var retrievedRecords = {}; var _this = this; Record.findAll().then(function () { var params = { where: { name: { 'in': name } } }; retrievedRecords = Record.filter(params); debugger; _this.lookupSuccess(retrievedRecords); }).catch(function (error) { console.log(error); }); }, Where 'in': name is "John" no record is found Where 'in': name is "John Evans" one record is found. Looking at angular-data issue 238 that appears to be the way I should be filtering but is not the value I expect to be return for sub-string filtering. I can't figure out why no records are returned for the sub-string filter at the point debugger stops execution. angular-data : 1.5.3 angular : 1.3.8
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27985808
tagged with: angular-data

http://stackoverflow.com/comment/44324448
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27965263
has text: @dystroy as long as you stay within the reasonable part of javascript, the statement is true. For numbers (as is the case in the question) it *is* always true.
type: AnswerComment

promise
tags question: http://stackoverflow.com/q/28030476
tags question: http://stackoverflow.com/q/28074531
tags question: http://stackoverflow.com/q/27965485
tags question: http://stackoverflow.com/q/28080290
tags question: http://stackoverflow.com/q/28053951
tags question: http://stackoverflow.com/q/28001722
tags question: http://stackoverflow.com/q/28086991
tags question: http://stackoverflow.com/q/28088034
tags question: http://stackoverflow.com/q/28121652
tags question: http://stackoverflow.com/q/28045319
tags question: http://stackoverflow.com/q/28030457
tags question: http://stackoverflow.com/q/28016976
tag name: promise
type: Tag
tags question: http://stackoverflow.com/q/27967799
tags question: http://stackoverflow.com/q/28117851
tags question: http://stackoverflow.com/q/27970647
tags question: http://stackoverflow.com/q/28066429
tags question: http://stackoverflow.com/q/27974517
tags question: http://stackoverflow.com/q/28074191
tags question: http://stackoverflow.com/q/27973617
tags question: http://stackoverflow.com/q/28105248
tags question: http://stackoverflow.com/q/28107460
tags question: http://stackoverflow.com/q/28031289
tags question: http://stackoverflow.com/q/27985332
tags question: http://stackoverflow.com/q/28000060
tags question: http://stackoverflow.com/q/27976943
tags question: http://stackoverflow.com/q/28119901
tags question: http://stackoverflow.com/q/28024210

http://stackoverflow.com/q/28068639
has comment: http://stackoverflow.com/comment/44516898
favorite count: 0
has comment: http://stackoverflow.com/comment/44517846
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/28067815
score: -3
downvote count: 3
has comment: http://stackoverflow.com/comment/44516777
has comment: http://stackoverflow.com/comment/44517764
has title: JS - Why my output is Object { } Instead of: MyObj { }?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44516716
duplicate of: http://stackoverflow.com/q/28067815
has comment: http://stackoverflow.com/comment/44517707
has answer: http://stackoverflow.com/a/28068686
upvote count: 0
answer count: 1
has body: When using the webdev tools console, if type a browser object, it returns console &gt; console Console { } &gt; console.log(console) undefined &gt; Console { } Works in this way for all browser objects; But if I do it with my own object, the output don't have my objectName(MyObj), only "Object" like this: &gt; var MyObj=function(){} undefined &gt; var instance = new MyObj(); undefined &gt; instance Object { } &gt; console.log(instance); undefined Object { } Question: Why my output is Object { } Instead of: MyObj { } ? NOTE: This is my second try to clarify this question, the first one was js how to print the objectName to console and it was not effective. Please do not make a simple response like "write a toString() function" it's not what i'm looking for. I'm looking for the SAME behavior not only on toString (intance+'') output, but too in "instance" output itself.

http://stackoverflow.com/comment/44548370
type: QuestionComment
has text: @RoryMcCrossan Actually I want to hide the ` ` tag which is just before ` `
comment on: http://stackoverflow.com/q/28085259
score: 0
type: Comment

http://stackoverflow.com/comment/44397923
comment on: http://stackoverflow.com/a/28004554
score: 0
type: AnswerComment
type: Comment
has text: If you do not know how to set up an interval function, then the Mutation Observer is probably too advanced for you. You can see the usage of interval in the following links: https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers.setInterval http://www.w3schools.com/jsref/met_win_setinterval.asp

http://stackoverflow.com/comment/44373219
has text: @showdev Your absolutely right, I'm so used to jQuery that I didn't even realized it...
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27991097
type: AnswerComment

http://stackoverflow.com/comment/44590375
comment on: http://stackoverflow.com/q/28108079
score: 0
type: Comment
type: QuestionComment
has text: Click & change events are the area of Javascript. There is no equivalent in CSS.

http://stackoverflow.com/comment/44549347
has text: You could, but you should rather try to find the exact problem, instead of doing this. By the way, the simplest hack would be redefining your ajax function with NOP.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28085914
score: 2

http://stackoverflow.com/q/28001924
tagged with: jquery
has comment: http://stackoverflow.com/comment/44392935
has title: Access attribute from console, js
answer count: 1
has body: I found the following script-snippet on a website $(document).ready(function() { $('.paper-image').click(function() { if(confirm(testResults)) { window.location.href = $(this).attr('congrats-url'); } }) }) How do I get the value of $(this).attr('congrats-url'); from a console in Firefox.
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/28002061
type: Question
tagged with: javascript

http://stackoverflow.com/comment/44403305
type: QuestionComment
comment on: http://stackoverflow.com/q/28007542
score: 0
has text: http://stackoverflow.com/questions/7737463/contenteditable-paragraph-tag-on-enter?rq=1 and so on and so on...
type: Comment

http://stackoverflow.com/q/28096583
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/44569025
tagged with: javascript
has title: IE and jQuery posts are not working
tagged with: post
score: 0
has comment: http://stackoverflow.com/comment/44569402
answer count: 1
has body: I'm trying to post to my backend with jQuery ajax, and it works in all browsers except internet explorer (ie 11). Am i missing something for IE? var example = "example/1234"; jQuery.post('#{test_path}', { uri: example }, function(r) { if (r.status === 201) { // success } else { // failure } }); my backed at test_path def test render :json =&gt; {:status =&gt; 401} end edit: The code just hangs. The post never reaches my controller, console log remains blank and the network tab doesn't show any post information.
tagged with: jquery
has answer: http://stackoverflow.com/a/28097098
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/44569231
accepted answer: http://stackoverflow.com/a/28097098
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44569105
upvote count: 1
has comment: http://stackoverflow.com/comment/44570087
downvote count: 1
type: Question

conditional-statements
tags question: http://stackoverflow.com/q/27968511
tags question: http://stackoverflow.com/q/27990920
tags question: http://stackoverflow.com/q/28001835
tags question: http://stackoverflow.com/q/28120525
tag name: conditional-statements
type: Tag

http://stackoverflow.com/comment/44439572
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28022528
has text: Yes, I am using requirejs.
score: 0

http://stackoverflow.com/comment/44608979
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28117082
has text: `SideBarHeight = $('.SideNav').height()` gets the sidebars height after the accordion has resized then `SideBarMax = SideBarHeight + 46;` gets how far the the bottom is from the top of the window.

http://stackoverflow.com/q/28091301
favorite count: 0
tagged with: avatars.io
has body: I'm trying to deal with avatars.io JS lib. I want to send HTTP/HTTPS requests based on current page protocol. When I send HTTPS request to avatars.io service, like this https://avatars.io/v1/upload?authorization=... I got response http://s3.amazonaws.com/cdn.getchute.com/v1/images/avatars.io/avatar-32.png And this causes 'Mixed Content' error. Also there is a question: how I can change the host before uploader initialization to prevent unwanted requests to default host?
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
has title: HTTPS request to avatars.io returns HTTP url that causes 'Mixed Content' error
type: Question
tagged with: javascript
downvote count: 0

http://stackoverflow.com/comment/44327612
score: 0
type: Comment
type: QuestionComment
has text: Your code looks ok here. Have you checked the console to ensure that the request is working correctly and there are no server-side errors?
comment on: http://stackoverflow.com/q/27967395

http://stackoverflow.com/comment/44515933
has text: U can change the js file name when u update or clean the browsers before run. As you can't clean user browsers so better to change the file name. It mostly happen due to form and cookies data
comment on: http://stackoverflow.com/q/28068222
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28013209
has comment: http://stackoverflow.com/comment/44413837
score: 0
has comment: http://stackoverflow.com/comment/44413781
answers question: http://stackoverflow.com/q/28012781
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/44413764
has comment: http://stackoverflow.com/comment/44413648
has body: You can do like this also &lt;input type="button" value="setValue" onClick="setValue()"&gt; &lt;input type="button" value="getValue" onClick="getValue()"&gt; Your javascript code :- var theValue= ''; function setValue() { theValues = "test"; alert(theValues); return theValues; } function getValue() { theValues = setValue(); alert(theValues); }
has comment: http://stackoverflow.com/comment/44415794
type: Answer

http://stackoverflow.com/comment/44522121
type: Comment
score: 1
comment on: http://stackoverflow.com/a/28071238
type: AnswerComment
has text: The difference is that `el.textContent = 'Hi!';` would display `Hi` in the page, while `el.innerHTML = 'Hi!';` would display **Hi!** in the page. The best practice is to avoid `innerHTML` unless you _specifically_ treat a value as HTML. `innerHTML` creates a risk for [XSS](http://en.wikipedia.org/wiki/Cross-site_scripting) vulnerabilities and other problems.

http://stackoverflow.com/comment/44503640
score: 0
has text: actually i want the selected date to be displayed after page load..not the predefined date...
type: Comment
comment on: http://stackoverflow.com/a/28061283
type: AnswerComment

http://stackoverflow.com/comment/44496497
type: QuestionComment
has text: The friend does have the application, If he didint then he would not exist in my database in parse.com @Ramsel
comment on: http://stackoverflow.com/q/28055432
score: 0
type: Comment

http://stackoverflow.com/comment/44368729
comment on: http://stackoverflow.com/q/27988012
type: Comment
type: QuestionComment
has text: Browser requests would vary a lot across vendors, OS, version, etc. A typical approach is a text blurb on your site warning users about popups for access. e.g. below that applet : http://www.spiralknights.com/play.xhtml
score: 1

http://stackoverflow.com/q/27975563
favorite count: 0
has answer: http://stackoverflow.com/a/27975641
tagged with: onbeforeunload
accepted answer: http://stackoverflow.com/a/27975641
has title: window.onbeforeunload, closing browser and synchronous AJAX
score: 2
type: AnsweredQuestion
tagged with: synchronous
possible better answer: http://stackoverflow.com/a/45286879
downvote count: 0
linked to: http://stackoverflow.com/q/4316488
has body: I've been searching for any reasonable example of a situation, when synchronous AJAX makes sense. I've found this SO question, where the author mentions window.onbeforeunload and claims, that "the request would never stop" if the AJAX call was asynchronous. Can anybody explain this? I mean - window.onbeforeunload is fired when the user wants to close the tab. What had to be going on to make the tab still alive, even though somebody clicked to close it? Can somebody give more specific example?
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/44343766
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/44343935
has comment: http://stackoverflow.com/comment/44347295
answer count: 2
has answer: http://stackoverflow.com/a/45286879

http://stackoverflow.com/comment/44342119
comment on: http://stackoverflow.com/a/27974689
type: AnswerComment
score: 0
has text: Thank you. That's what I wanted to know :)
type: Comment

http://stackoverflow.com/q/28036716
upvote count: 29
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/20002503
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/28036796
has body: I have this array: var fruits = ['Apple', 'Banana', 'Orange', 'Celery']; And I use Lodash's remove like so: _.remove(fruits, function (fruit) { return fruit === 'Apple' || 'Banana' || 'Orange'; }) The result is ['Apple', 'Banana', 'Orange', 'Celery'], while I expected it to be ['Apple', 'Banana', 'Orange']. Why is this so?
has answer: http://stackoverflow.com/a/28036749
tagged with: javascript
possible better answer: http://stackoverflow.com/a/35991110
has answer: http://stackoverflow.com/a/40673088
has answer: http://stackoverflow.com/a/35991110
favorite count: 0
score: 28
has answer: http://stackoverflow.com/a/28036783
answer count: 5
has title: Removing elements in an array using Lodash
has answer: http://stackoverflow.com/a/28036796
tagged with: lodash

http://stackoverflow.com/q/28085030
answer count: 0
has comment: http://stackoverflow.com/comment/44550612
type: UnansweredQuestion
has body: Before creating tree I use canvas to draw some icons (plus, minus, node. etc.). Then I put images to object and stop using canvas. Like this: var imgFromCnvs = NewElem.toDataURL("image/png"); var ElemIdName = 'treeVLineLast'; treeEl.imgs[ElemIdName]=imgFromCnvs Then I use them in background images on the tree: NewElem.style.backgroundImage = 'url("'+treeEl.imgs.treeVLineLast+'")'; So, as I understand, it extremely enlarges data amount on page, because I place data from object strictly to every element instead of using link to it. Since there can be hundreds or even thousands tree elements in a tree, it will cause some memory issues, I think. I guess, it could be the best way to use link to data in the object somehow, but I do not know how. May be, create some new element? Is there any way to solve this problem? P.S.: I'm learning JavaScript and need to understand the basics without using any libraries.
tagged with: background
has title: Javascript: how can I use link to image in my object, created by toDataURL, instead of placing data to every screen element
tagged with: image
type: Question
score: 0
has comment: http://stackoverflow.com/comment/44548209
tagged with: javascript
tagged with: todataurl

http://stackoverflow.com/comment/44477237
type: Comment
type: QuestionComment
has text: Great, it works. Thanks, WestLangley
score: 0
comment on: http://stackoverflow.com/q/28038728

http://stackoverflow.com/a/28084821
has body: The problem is the position of the initialization of your variables. I've fiddled around with it and came to this piece of code: var popUpDetailsData = []; for (var i = 0; i &lt; gridData.length; i++) { if (gridData[i].events.length !== 0) { for (var j = 0; j &lt; gridData[i].events.length; j++) { var eventGridDetailsData = []; eventGridDetailsData.servicePoint = gridData[i].spId; eventGridDetailsData.isInFlow = gridData[i].isInFlow; eventGridDetailsData.eventType = gridData[i].events[j].eventName; eventGridDetailsData.startDay = gridData[i].events[j].startDate; eventGridDetailsData.endDay = gridData[i].events[j].endDate; eventGridDetailsData.volume = gridData[i].events[j].eventVolume; eventGridDetailsData.noOfdays = gridData[i].events[j].noOfDays; popUpDetailsData.push(eventGridDetailsData); } } } As you can see, I've placed the var eventGridDetailsData inside the second for loop. This is because we want an CLEAR array object every time ( no leftovers of the previous time ). Same for the servicePoint and isInFlow, but that is because the variable is placed later on, so these lines also had to be placed later on...
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44548236
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28084405
accepted answer of: http://stackoverflow.com/q/28084405
type: Answer

http://stackoverflow.com/comment/45802402
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28107757
score: 0
has text: BTW: `display:hidden` is wrong. I thing you mean `display:none`.

http://stackoverflow.com/comment/74084330
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28020774
has text: Note that the use of flexbox causes the parent container to collapse when you float child elements and clearfix won't work.
score: 0

http://stackoverflow.com/comment/44341422
score: 0
type: QuestionComment
has text: `if(/[^A-Za-z0-9]/.exec(value) {}` this approach (despite missing a bracket `)` ). Is the most simplest way of doing. Except update to: `if(/[^A-Za-z0-9]+$/.exec(value)) {}`
type: Comment
comment on: http://stackoverflow.com/q/27974244

http://stackoverflow.com/comment/44558686
score: 0
type: Comment
type: QuestionComment
has text: possible duplicate of [How to make twitter bootstrap menu dropdown on hover rather than click](http://stackoverflow.com/questions/8878033/how-to-make-twitter-bootstrap-menu-dropdown-on-hover-rather-than-click)
comment on: http://stackoverflow.com/q/28090630

http://stackoverflow.com/a/28059085
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28058293
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44499640
answers question: http://stackoverflow.com/q/28058293
type: Answer
has body: A solution using jQuery (see change() and load()): Apple Banana EDIT: To address the JSON/server-side part of the question have a look at ScalaJsonHttp (or JavaJsonActions).
score: 1

http://stackoverflow.com/comment/44423655
has text: Do you have any errors?
comment on: http://stackoverflow.com/q/28009738
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44588860
has text: Yes, actually it was cors issue and agatha rest service did not enable cors. Thanks :)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28102519
score: 0

http://stackoverflow.com/q/27978819
favorite count: 0
has answer: http://stackoverflow.com/a/58351913
tagged with: time
tagged with: angular-moment
has answer: http://stackoverflow.com/a/27979128
tagged with: datetime
answer count: 4
tagged with: momentjs
has answer: http://stackoverflow.com/a/53899894
type: AnsweredQuestion
has title: Extract time from moment js object
type: Question
possible better answer: http://stackoverflow.com/a/27979128
tagged with: javascript
has body: How do i extract the time using moment.js? "2015-01-16T12:00:00" It should return "12:00:00 pm". The string return will be passed to the timepicker control below. http://jdewit.github.com/bootstrap-timepicker Any idea?
score: 79
upvote count: 79
downvote count: 0
has answer: http://stackoverflow.com/a/27979171
accepted answer: http://stackoverflow.com/a/27979171

http://stackoverflow.com/comment/44405485
type: AnswerComment
has text: sorry mohammed , what about if the .General not the parent and it in the different div
comment on: http://stackoverflow.com/a/28008657
score: 0
type: Comment

http://stackoverflow.com/comment/44414339
has text: @SuchMuchFunny Sure you can use it, it will work fine, but some linting tools will cough up on it since an expression instead of a statement is often a mistake.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28013432

http://stackoverflow.com/q/28078908
has body: I have created a sidebar with multiple sticky titles based off the code in this popular codepen example: http://codepen.io/chrissp26/pen/gBrdo The titles that are sticky, are also clickable, and on click, I am showing/hiding items related to the title. While both the sticky titles and expanding/collapsing the related items, are functional, when I use them together I get undesired results. The following code is what is used to handle the sticky titles: function stickyTitles(stickies) { this.load = function() { stickies.each(function(){ var thisSticky = jQuery(this).wrap('&lt;div class="followWrap" /&gt;'); thisSticky.parent().height(thisSticky.outerHeight()); jQuery.data(thisSticky[0], 'pos', thisSticky.offset().top); }); } this.scroll = function() { stickies.each(function(i){ var thisSticky = jQuery(this), nextSticky = stickies.eq(i+1), prevSticky = stickies.eq(i-1), pos = jQuery.data(thisSticky[0], 'pos') - 70; if (pos &lt;= jQuery('#container').scrollTop()) { thisSticky.addClass("fixed"); if (nextSticky.length &gt; 0 &amp;&amp; thisSticky.offset().top &gt;= jQuery.data(nextSticky[0], 'pos') - thisSticky.outerHeight()) { thisSticky.addClass("absolute").css("top", jQuery.data(nextSticky[0], 'pos') - thisSticky.outerHeight()); } } else { thisSticky.removeClass("fixed"); if (prevSticky.length &gt; 0 &amp;&amp; jQuery('#container').scrollTop() &lt;= jQuery.data(thisSticky[0], 'pos') - prevSticky.outerHeight() + 200) { prevSticky.removeClass("absolute").removeAttr("style"); } } }); } } I see the function is calculating the distance from the top, so when I collapse/expand the items, the position relative to the top changes. This is what causes the undesired user experience. I added the following code inside my click event, hoping the position from the top would be recalculated AFTER the items are collapsed/expanded: var newStickies = new stickyTitles(jQuery(".followMeBar")); newStickies.load(); jQuery('#container').on("scroll", function() { newStickies.scroll(); }); Unfo…
has title: How to reinitialize Multiple Sticky Titles after showing/hiding items
tagged with: javascript
tagged with: jquery
score: 0
tagged with: sticky
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/30617813
type: UnansweredQuestion
tagged with: css
type: Question

http://stackoverflow.com/comment/102904511
score: 2
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28083939
has text: Oh you are my life saver! I did spend a lot of time try to find out how to prevent user from clicking on an item. Later on, "cursor event" phrase appeared in my head and I got your answer. Cool, isn't it?

http://stackoverflow.com/comment/44584926
score: 0
type: AnswerComment
type: Comment
has text: seem's like i need to redo this all over again using something else
comment on: http://stackoverflow.com/a/28092356

http://stackoverflow.com/comment/44656812
has text: Not JS, but are you in a position to open the htaccess file? [this for htaccess](http://perishablepress.com/how-to-block-proxy-servers-via-htaccess/) and [this for PHP](http://perishablepress.com/block-tough-proxies/) may be two options, though I haven't tried either of them. Good luck and don't let the bastards get you down!
comment on: http://stackoverflow.com/q/28120294
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44587504
comment on: http://stackoverflow.com/a/28101229
has text: Thanks, it's clear to me now. I was using the material-ui components and lot of them have methods to set and get data so I started to wonder. But I understand that the state (if any) should live in the parent component X and not the owned component Y.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/28088773
tagged with: velocity.js
has comment: http://stackoverflow.com/comment/44554481
tagged with: frontend
tagged with: famo.us
has comment: http://stackoverflow.com/comment/44554615
has comment: http://stackoverflow.com/comment/44554335
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/28088932
accepted answer: http://stackoverflow.com/a/28088932
tagged with: javascript
has body: I am having a hard time to figure out the right technology to build a modern web app with a slick front end. Basically I am thinking of having a slide here, an automated scroll there and a animated bounce somewhere in my web application. Nothing too fancy. Maybe if it makes sense even more advanced animation, but nothing like a quick animation sequence with many particles. I worked recently with http://famo.us/ and find it heavy loaded for most modern web app needs. I think http://julian.com/research/velocity/ is interesting too. What would you recommend to use, maybe something else?
favorite count: 0
has title: Building a slick web app - what do I use for front end animations nowadays?
tagged with: css

http://stackoverflow.com/comment/44617615
type: AnswerComment
has text: in yii2 i use activeform, in your example i donot need to use it?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28121640

http://stackoverflow.com/q/27997952
has body: In my game1.html i have a function called Showhide() i call this via: < Click Me but in my init.js i have a function this is how the function is called: document.getElementById('bodyresize').onclick = function() but now i need those 2 in 1 html button so when i press a button showhide first does something and then the function in init.js does something Do you guys know how to do that?
tagged with: javascript
has comment: http://stackoverflow.com/comment/44385664
score: -4
answer count: 2
downvote count: 4
upvote count: 0
has title: call 2 functions in html
favorite count: 0
has answer: http://stackoverflow.com/a/27997993
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27998077
type: Question

http://stackoverflow.com/comment/44478836
comment on: http://stackoverflow.com/q/28047351
type: Comment
type: QuestionComment
has text: This question needs more upvotes....
score: 0

http://stackoverflow.com/q/27975159
accepted answer: http://stackoverflow.com/a/27975402
type: AnsweredQuestion
tagged with: mean-stack
tagged with: javascript
has body: Note: Need help with respect to MEAN stack implementation otherwise with respect to standalone html file where I can just include the script src to ngprogress.min.js, its working in that case. Starting with what I have tried is: Installed ngProgress bower module by bower install ngProgress. 1st scenario Tried to access it in my controller by : angular.module('articles').controller('ArticlesController', ['ngProgress',function(ngProgress) { // getting undefined provider unpr error ngProgress.start(); }]); 2nd Scenario Tried using it through access through service, took hint from http://www.ng-newsletter.com/posts/d3-on-angular.html, this works sometimes I can include ngprogress.min.js in the html file. But then while using ngProgress.start(); ngProgress is reported undefined. Contoller code: angular.module('articles').controller('ArticlesController', ['ngProgress',function(ngProgress) { // getting undefined provider unpr error ngProgress.start(); }]); Service Code: 'use strict'; angular.module('ngProgress', []) .factory('progressService', ['$document', '$q', '$rootScope', function($document, $q, $rootScope) { var d = $q.defer(); function onScriptLoad() { // Load client in the browser $rootScope.$apply(function() { d.resolve(window.ngProgress); }); } // Create a script tag with d3 as the source // and call our onScriptLoad callback when it // has been loaded var scriptTag = $document[0].createElement('script'); scriptTag.type = 'text/javascript'; scriptTag.async = true; scriptTag.src = 'bower_components/ngprogress/build/ngprogress.min.js'; scriptTag.onreadystatechange = function () { if (this.readyState === 'complete') { onScriptLoad(); } }; scriptTag.onload = onScriptLoad; var s = $document[0].getElementsByTagName('body')[0]; s.appendChild(scriptTag); return { ngProgress: function() { return d.promise; } }; }]); I have also tried using packageName.angularDependencies(['ngProgress']) and packageName.aggregateAssets(js, ngprogress.min.js) in app.js file of the package, …
type: Question
possible better answer: http://stackoverflow.com/a/27981235
has answer: http://stackoverflow.com/a/27981235
tagged with: angularjs
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27975402
has title: Angularjs : Inject ngProgress service in controller file using MEAN Stack

http://stackoverflow.com/comment/44504708
type: Comment
has text: @Muhaimin Abdul :where to place the above code
comment on: http://stackoverflow.com/q/28061628
type: QuestionComment
score: 0

http://stackoverflow.com/q/28118644
favorite count: 0
has comment: http://stackoverflow.com/comment/44611976
score: 0
has answer: http://stackoverflow.com/a/28118986
possible better answer: http://stackoverflow.com/a/28119753
has comment: http://stackoverflow.com/comment/44611613
has answer: http://stackoverflow.com/a/28119753
has title: PHP JSON_encode output not as expected
upvote count: 2
downvote count: 2
tagged with: php
accepted answer: http://stackoverflow.com/a/28118986
has comment: http://stackoverflow.com/comment/44611912
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/44613215
has body: Hello I have a PHP script that pulls info from a database table. The table structure is : Delaytype(varchar)| Delayhours(int) The PHP script groups by delay type. <?php ?> <?php include "config.php"; // Check connection if (mysqli_connect_errno($con)) { echo "Failed to connect to DataBase: " . mysqli_connect_error(); } else { $result = mysqli_query($con, "SELECT Delaytype, COUNT(1) as cnt FROM delays GROUP BY Delaytype; "); echo " Delay Type Delay Hours "; $pieData = array(); while($row = mysqli_fetch_array($result)) { $pieData[] = array('value' =>$row['cnt'], 'color' =>'#878BB6 '); } ?> <?php mysqli_close($con); } ?> I am trying to output the JSON in the following format - The example below works with just the entered values. Its Javascript to creat a pie chart with chart js. It expects the JSON like [{value:?,color:"?"},{value:?,color:"?"}] When I echo my JSON I get [{"value":"?",color:"?"}],[{"value":?,color:"?"},{"value":?,color:"?"}] The first set is a duplicate of the second and then it works?. Is there a better way of doing this? With the above code I get part of a chart. The other issue is I have to get a different color for each row?currently it is the same color as I do not know how I can get different colors in as it is not part of my database structure? The below example works to create the chart not using the database. So ideally I would like some advice on 1) how to get the JSON out of my database to fit in the below format. 2) Is there a way without storing colors in a database table where I can apply different color values to the below var pieData = [ { value: 20 , // ideal :I want database data color:"#878BB6"//color that I have chosen }, { value : 40, color : "#4ACAB4" }, { value : 10, color : "#FF8153" }, { value : 30, color : "#FFEA88" } ]; when I do VAR_DUMP i GET THE FOLLOWING : array(2) {[0]=>array(2) {["value"]=> string(2) "21"["color"]=>string (8) "#878BB6"}[1]=>array(2){["value"]=>string(2)"99"["color"]=>string (8)"#878BB6"}}
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/44453474
type: Comment
type: QuestionComment
has text: @Marcus: Thanks for the comments .. If anything from both your comments I at least know the basic pros and cons of using bootstrap. I will look at bootstrap modals as I didn't know a great deal about it. My first reaction was to build the popup window from scratch using CSS.
comment on: http://stackoverflow.com/q/28022743
score: 1

http://stackoverflow.com/comment/44456820
comment on: http://stackoverflow.com/q/28035868
type: Comment
type: QuestionComment
has text: Is this going to be a production site. If so please use **PDO** of **MySQLI**. Your current method for sending queries is deprecated.
score: 0

http://stackoverflow.com/q/28026314
score: 0
has answer: http://stackoverflow.com/a/28026419
has comment: http://stackoverflow.com/comment/44437991
type: AnsweredQuestion
has body: How can I hide a article if the name is empty. I am using some articles on my site to display certain information. <article name="<?php echo $name[0];?>"> Content How can I hide that article if the name is empty or there is another article with the same name?
possible better answer: http://stackoverflow.com/a/28026419
type: Question
has answer: http://stackoverflow.com/a/28026545
has answer: http://stackoverflow.com/a/28026526
has comment: http://stackoverflow.com/comment/44438032
tagged with: javascript
tagged with: jquery
tagged with: css
accepted answer: http://stackoverflow.com/a/28026526
has title: css / jquery code to hide article if the name is empty
has answer: http://stackoverflow.com/a/28026446
has answer: http://stackoverflow.com/a/28026657
answer count: 5

http://stackoverflow.com/a/30732907
downvote count: 0
type: Answer
upvote count: 1
has body: Step for Integrate In-App billing in Phone-gap app. 1>> clone this project in your pc from this link In-App billing Library 2>> using CMD go to your root directory of your phonegap application 3>> then run this command cordova plugin add /path/to/your/cloned project --variable BILLING_KEY="QWINMERR..........RIGR" Notes : for BILLING_KEY go to Developer console then open your application and go to Service& APIs for more info Please refer attached screenshots
answers question: http://stackoverflow.com/q/27967792
score: 1

http://stackoverflow.com/q/28082624
has body: I dont seem to get the persistence of data in HTML5's localstorage in ios/android webviews. I am developing the HTML side of a hybrid app. To store data that is needed on my side, I use local storage. I do not clear the localstorage, I only read and write. But after a few tests, there are rare occurrence of localstorage being cleared. I tested this on other versions of android and ios, it's rare, but it still occurs and it is inconsistent. I tested the app in the same version of android 4.4( different phone models). There is no occurrence in the first one, the other one however, occurs after closing the app and opening it after a few hours. Same goes for ios. Am I the only one experiencing this problem?
downvote count: 0
has answer: http://stackoverflow.com/a/28083828
duplicate of: http://stackoverflow.com/q/7750857
favorite count: 0
type: Question
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28082775
score: 4
has comment: http://stackoverflow.com/comment/86150867
answer count: 3
tagged with: webview
tagged with: ios
tagged with: javascript
has title: Localstorage persistence in ios/android webview
type: UnansweredQuestion
upvote count: 4
linked to: http://stackoverflow.com/q/7750857
has comment: http://stackoverflow.com/comment/65542332
has answer: http://stackoverflow.com/a/28083026

http://stackoverflow.com/q/28090671
type: AnsweredQuestion
has title: Three.js issue with object position when using matrix make rotation
type: Question
has answer: http://stackoverflow.com/a/28093123
accepted answer: http://stackoverflow.com/a/28093123
score: 0
answer count: 1
tagged with: javascript
has body: Im trying to rotate an object I called "moon" (its a sphere) trying to use matrix for that instead moon.rotation.y in this way: moon.applyMatrix(new THREE.Matrix4().makeRotationY(Math.PI/100)); The good thing is that the object is rotating well, but I dont know why the object changed his initial position: moon.position.set(30,1,30); to (0,0,0) Could you tell me why, if I execute the first line, the object is placed in 0,0,0 and if not remains in the right position (30,1,30)? Thanks. Regards. Jose.
has comment: http://stackoverflow.com/comment/44560900
tagged with: three.js

http://stackoverflow.com/comment/44402933
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28007354
has text: I would suggest always specifying the expected radix for `parseInt()`

http://stackoverflow.com/comment/44409892
type: QuestionComment
comment on: http://stackoverflow.com/q/28010643
has text: +1 with this button and cps is calculating stuff per second
score: 0
type: Comment

http://stackoverflow.com/a/42948173
downvote count: 0
score: 14
type: Answer
has body: let sortedDates = dates.sort(function(a, b){ return moment(b).format('X')-moment(a).format('X') }); Since moment can format valid dates the best way is to use the sort method javascript, so when formatting the date to timestamp, basically you sort by number. References: http://www.momentjs.com/docs/#/displaying/format http://www.w3schools.com/jsref/jsref_sort.asp
upvote count: 14
answers question: http://stackoverflow.com/q/28013045

http://stackoverflow.com/q/28014719
tagged with: jasmine
linked to: http://stackoverflow.com/q/28012603
tagged with: angularjs
has answer: http://stackoverflow.com/a/28015216
accepted answer: http://stackoverflow.com/a/28015216
type: AnsweredQuestion
tagged with: karma-runner
tagged with: unit-testing
type: Question
has body: I'm trying to wrap my head around unit testing with Angular and I'm running into some road blocks. In trying to create a plnkr for this question: Jasmine test fails making $httpbackend call I've encountered a different error. I was hoping if someone could help figure out this plunkr, it would help fix the original question: http://plnkr.co/edit/lJTx0ldR9nEnlYbU5pJd (function(){'use strict'; var RestService = function($http, $rootScope){ var _postData = function(url, params, data, successFunction, errorMsg, errorFunction, config) { if(config &amp;&amp; config.hasOwnProperty('showLoader')){ $rootScope.showLoader = config.showLoader; } $http({ method: 'POST', url: url, params: params, data: data, cache: false }) .success(function(data, status, headers, config) { $rootScope.showLoader = false; if (successFunction === undefined) { _defaultSuccessFunction(data, status, headers, config); } else { successFunction(data, status, headers, config); } }) .error(function (data, status, headers, config) { $rootScope.showLoader = false; if(status === 401){ _processError(data, status, headers, config, errorMsg, errorFunction); } }); }; return { postData: _postData }; }; angular.module('ram-utilities.ui.rest.service', []).factory('RestService', ['$http', '$rootScope', RestService]); })(); (function(){ 'use strict'; var LoginController = function($scope, RestService){ var _user = undefined; var _message = 'hello'; var _login = function(user){ var _success = function(response){ _message = response.success; _user = response.user; }; var _error = function(response){ _message = response.success; }; RestService.postData('/api/login', null, {username: user.username, password: user.password}, _success, 'Invalid login, please try again', _error, {showLoader: true}); }; $scope.model = { login: _login, user: _user, message: _message }; }; angular.module('danny',['ram-utilities.ui.rest.service']).controller('LoginController',['$scope', 'RestService',LoginController]); })(); describe('LoginContro…
tagged with: javascript
score: 0
answer count: 1
has title: Cannot get jasmine test to succeed calling injected service

http://stackoverflow.com/q/27976268
score: 1
has answer: http://stackoverflow.com/a/27976291
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: drop-down-menu
has body: I'm not sure how to build this although I've spent several hours trying. My code seems somewhat close but I'm unable to pass my selection from the HTML back to the controller. My Angular code: var Categories = Parse.Object.extend("bizCategories"); $scope.categories = [ {category: "Food and Drink"}, {category: "Healthcare"}, {category: "Recreation"}, {category: "Service"}, {category: "Shops"}, {category: "Travel"} ] $scope.setPrimary = function (category) { $scope.offer.primary = category; $scope.secondaryCategories(category); }; $scope.secondaryCategories = function(category){ var Secondary = new Parse.Query(Categories); Secondary.limit(1000); Secondary.find({ success:function(list){ $scope.SecondaryCategories = _.uniq(_.filter(_.map(list, function(item){ return{primary: item.get('secondary') }} )),'primary',true) console.log($scope.SecondaryCategories); }, error: function(error){alert("A mistake was made."); } }) } My html: Primary Business Category Secondary Business Category You'll see that I picked XXX in my html for ng-options. I picked that because from what I can tell from the tutorials, the purpose to call it anything in particular is arbitrary and I made this XXX as a not on that matter. Also, I need info from the first dropdown to carry over to the function for the second dropdown (category) but that is showing up as undefined. The data source:
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27976291
has title: Two dropdown filters. The first determines the info in the second
upvote count: 1
type: AnsweredQuestion
tagged with: underscore.js

http://stackoverflow.com/q/28086944
answer count: 4
linked to: http://stackoverflow.com/q/1847220
has comment: http://stackoverflow.com/comment/44552234
type: AnsweredQuestion
downvote count: 0
tagged with: amazon-s3
has body: I want to download a HTML file on click of a span. I am not using any anchor tag in this. I want to do this on simple click of a span. Url is having .html extension. And the url to html file is on another domain(Amazon s3) How to achieve this in JavaScript, as in anchor tag it would have been easy where I would have written attribute 'download' in it.
score: 1
has comment: http://stackoverflow.com/comment/44551417
has answer: http://stackoverflow.com/a/28089889
has answer: http://stackoverflow.com/a/28087169
type: Question
has answer: http://stackoverflow.com/a/28088115
has comment: http://stackoverflow.com/comment/44551173
accepted answer: http://stackoverflow.com/a/28088115
tagged with: javascript
has comment: http://stackoverflow.com/comment/44551230
linked to: http://stackoverflow.com/q/7271524
upvote count: 1
has comment: http://stackoverflow.com/comment/44551526
has title: Download a html file on click of span
favorite count: 0
possible better answer: http://stackoverflow.com/a/28087280
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28087280

http://stackoverflow.com/q/28069942
type: Question
tagged with: settimeout
has title: clearTimeout doesn't work due to ajax jquery function, bootstrap modal event not handled
score: 0
has body: I’ve a ridiculous problem with my javascript setTimeout and jquery ajax function. I’ve a webpage who needed to be refreshed every x seconds. I use a setTimeout who call my ajax function every x seconds. The user has the opportunity to use a boostrap modal to enter information. What I want is to clear the timeout when the modal is shown and restart the timeout when the user closed. My problem is on the event “shown.bs.modal” none of the functions are executed, even the alerts so my setTimout is still running while the modal is open. If the DOM is uploaded while the modal is shown, the modal source code will be deleted and so I’ll have a frozen webpage, without scrollbar. The problem comes from the ajax function. If I change the code of doRefresh to just an alert(); everything works perfectly. //refresh delay in ms var delayRefresh=5000; // stored setTimeout's id var refresh; //First call of the ajax function $(document).ready(function(){ refresh=window.setTimeout(function(){doRefresh();}, delayRefresh); }); //code executed when the user open a modal $('.modal').on('shown.bs.modal', function () { alert(refresh); //Stopped the refresh clearTimeout(refresh); }); //code executed when the user close the modal $('.modal').on('hidden.bs.modal', function () { alert(refresh); //restart of the refresh refresh=window.setTimeout(function(){doRefresh();}, delayRefresh); alert(refresh); }); /* Fonction that run the ajax request to the server */ var doRefresh = function (){ $.ajax({ type:"PUT", url:"<c:url value="/checklist"/>", contentType: false, async: true, processData: false, success:function(data){ // DOM update $("#content_needed_to_be_updated").html(data) ; //restart of the refresh refresh=window.setTimeout(function(){doRefresh();},delayRefresh); }, error:function(xhr){ toastr.error('Le serveur n\'a pas pu être atteint.', 'Erreur !'); //restart of the refresh refresh=window.setTimeout(function(){doRefresh();}, delayRefresh+20000); } }); }; New version: //refresh delay in ms…
answer count: 1
accepted answer: http://stackoverflow.com/a/29778842
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44521973
tagged with: ajax
has comment: http://stackoverflow.com/comment/44520715
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47687704
has comment: http://stackoverflow.com/comment/47687522
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/44519291
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29778842

http://stackoverflow.com/comment/44463142
comment on: http://stackoverflow.com/q/28039526
type: Comment
type: QuestionComment
has text: you can detect animation ended for first element than you can add animation for next element...
score: 0

paperjs
tags question: http://stackoverflow.com/q/28016966
tag name: paperjs
tags question: http://stackoverflow.com/q/28089172
type: Tag
tags question: http://stackoverflow.com/q/28080572
tags question: http://stackoverflow.com/q/27968509
tags question: http://stackoverflow.com/q/28035898

http://stackoverflow.com/comment/44342795
type: QuestionComment
comment on: http://stackoverflow.com/q/27975072
type: Comment
score: 0
has text: maybe you are not running it ondomready. wrap your js in $(function(){/*your js here*/});

http://stackoverflow.com/q/28056631
score: 0
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44496587
has comment: http://stackoverflow.com/comment/44498106
answer count: 0
has body: I have this $.mobile.changePage( "mainmenu.php", { transition: "slide", reverse: true }); to change pages using a slide, but when I test on my desktop or my phone, it just changes pages instantly without a slide... Does anyone know whats wrong?
type: Question
has title: jquery mobile page transition is not working
has comment: http://stackoverflow.com/comment/44496686
tagged with: jquery-mobile
tagged with: javascript

http://stackoverflow.com/q/27977712
tagged with: ionic-framework
type: Question
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/68609347
downvote count: 0
tagged with: javascript
score: 4
has body: I'm creating an hybrid mobile app using AngularJS, Cordova, and Ionic framework. Here is an Android 5.0 keyboard. Take a look at the blue button in the bottom-right corner. I'd like to do 2 things: Control which "type" of button displays (sometimes it's a "next" button, a "done" button, or a "search" button. The icon changes.) Control the behaviour of this button. For example, I'm signin up and typing my name in a first fied. In my case, the default behaviour of the keyboard button is to submit the form instead of going to the next field. I'd like to control this button to go to the next field. All topics I found talked about native Android app with Java code. Thanks!
tagged with: angularjs
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
has title: How to handle 'done' button on an Android keyboard app with AngularJS/Ionic?
has answer: http://stackoverflow.com/a/38878847

http://stackoverflow.com/q/28075201
has answer: http://stackoverflow.com/a/28075516
has title: Hover effect is under the image
favorite count: 0
has body: So I'm struggling with hover effect. The black box is the image and I want the red mask color (which has the same width and height) to be placed in front of the black box whenever user will hover on that image, I cannot do this because it seems the effect is under the image whenever I hover mouse on that image.... .third-effect .mask { opacity: 0; overflow: visible; border: 100px solid rgba(0, 0, 0, 0.7); -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-transition: all 0.4s ease-in-out; -moz-transition: all 0.4s ease-in-out; -o-transition: all 0.4s ease-in-out; -ms-transition: all 0.4s ease-in-out; transition: all 0.4s ease-in-out; width: 274px; height: 197px; } .third-effect a.info { position: relative; top: -10px; opacity: 0; -webkit-transition: opacity 0.5s 0s ease-in-out; -moz-transition: opacity 0.5s 0s ease-in-out; -o-transition: opacity 0.5s 0s ease-in-out; -ms-transition: opacity 0.5s 0s ease-in-out; transition: opacity 0.5s 0s ease-in-out; } .third-effect:hover .mask { opacity: 1; border: 100px solid rgba(0, 0, 0, 0.7); } .third-effect:hover a.info { opacity: 1; -moz-transition-delay: 0.3s; -webkit-transition-delay: 0.3s; -o-transition-delay: 0.3s; -ms-transition-delay: 0.3s; transition-delay: 0.3s; } Full Image
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44529549
tagged with: css
answer count: 4
tagged with: hover
has answer: http://stackoverflow.com/a/28075330
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/44529816
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/28075376
has comment: http://stackoverflow.com/comment/44530916
upvote count: 0
has answer: http://stackoverflow.com/a/28075401

http://stackoverflow.com/comment/44338744
score: 0
has text: Thanks, I blanked about the default action. Would you know how to hide it again on another click?
type: Comment
comment on: http://stackoverflow.com/a/27972846
type: AnswerComment

http://stackoverflow.com/comment/44349011
type: Comment
comment on: http://stackoverflow.com/a/27978268
score: 0
type: AnswerComment
has text: Make sure `getData` returns promise: return `$http.get(...)`.

http://stackoverflow.com/q/27977214
has answer: http://stackoverflow.com/a/27987394
tagged with: d3.js
upvote count: 1
has title: Updating d3 line graph shows incorrect data, perhaps due to path transitions
type: Question
accepted answer: http://stackoverflow.com/a/27987394
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has body: Thanks to the path transitions tutorials (here and here) from Mike Bostock, I have cobbled together a working graph that updates using d3. However, when it goes from point to point the graph seems to misrepresent the values for those points. Below is a visual example. As you'll see the values go: 0, -1, -4, -4, 4, -2, -2, 0 , -3 But the graph doesn't convey that pattern. Instead it looks more like: 0, -1, -4, 2, -2, -1, -3 Here's a jsfiddle with my code that produces the above (but with different values): http://jsfiddle.net/q5onmfbd/9/ Does anyone have an idea as to what could be happening? I have a feeling it deals with path transitions but I could be wrong.
type: AnsweredQuestion

http://stackoverflow.com/q/28087505
has title: Disappearance of "Sign in with LinkedIn" button after log-in
has answer: http://stackoverflow.com/a/28090902
score: 0
has body: My goal is implement a social log-in button for the 3 big (Fb, LinkedIn, Twitter) and use data captured from social (email, first name, last name) to prefill a form inside the landing page. I have implemented a "Sign in with LinkedIn" Button with the following code: //LinkedIn Button The code works but the "Sign in with LinkedIn" Button disappears when I logged in with LinkedIN. I would mantain the LinkedIn button after the login. How can I avoid the disappearance of LinkedIn button? Thank You for the support. Alex
tagged with: authentication
has comment: http://stackoverflow.com/comment/86111524
answer count: 1
type: UnansweredQuestion
tagged with: linkedin-api
tagged with: button
tagged with: javascript
type: Question

http://stackoverflow.com/comment/44584158
comment on: http://stackoverflow.com/a/28095351
type: AnswerComment
score: 0
type: Comment
has text: Is there a link/document where I can find the dojo conventions? I've been searching for this but couldn't find anything.

http://stackoverflow.com/comment/44504744
type: Comment
type: QuestionComment
has text: You don't see the ambiguity?
score: 0
comment on: http://stackoverflow.com/q/28061320

http://stackoverflow.com/comment/44518987
comment on: http://stackoverflow.com/a/28069697
type: Comment
has text: That `if` is completely useless... function statements like that get hoisted, there is no block scope in JS, just function scope. Try this: `if(false){function test(){console.log(1)}} test();`
score: 0
type: AnswerComment

http://stackoverflow.com/q/28078556
type: Question
score: 5
upvote count: 5
has title: Threejs blender exporter exports in wrong format
tagged with: javascript
has comment: http://stackoverflow.com/comment/44536697
accepted answer: http://stackoverflow.com/a/28078978
possible better answer: http://stackoverflow.com/a/28083686
has answer: http://stackoverflow.com/a/28083686
answer count: 2
downvote count: 0
favorite count: 0
tagged with: three.js
has answer: http://stackoverflow.com/a/28078978
type: AnsweredQuestion
has body: I'm trying to export a blender model to threejs json with the help of the provided blender exporter. On parsing the json file I get an error: Uncaught TypeError: Cannot read property 'length' of undefined The json file looks as following (ommiting vertices and faces): { "textures": [], "metadata": { "version": 4.3, "sourceFile": "UV-World.blend", "type": "Object", "generator": "io_three" }, "images": [], "materials": [], "object": { "matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1], "children": [{ "type": "Mesh", "name": "Kugel", "uuid": "5051D840-9982-4F9A-8CFF-36303B38E091", "position": [0.0,0.0,0.0], "rotation": [-1.5707964897155762,0.0,0.0], "scale": [1.0,0.9999999403953552,0.9999999403953552], "visible": true, "castShadow": true, "receiveShadow": true, "geometry": "DEAE2CE2-9824-4F91-BE4C-1C80BEDC566A" }], "type": "Scene", "uuid": "8C543616-2AB0-4D1D-B76D-549E32A0E468" }, "geometries": [{ "type": "Geometry", "data": { "name": "KugelGeometry", "metadata": { "version": 3, "faces": 512, "vertices": 482, "generator": "io_three" }, "vertices": [...], "faces": [...] }, "uuid": "DEAE2CE2-9824-4F91-BE4C-1C80BEDC566A" }] } This seems to be not in the format that threejs expects it to be. If I manually change the json to be the following threejs parses and displays the model as expected. { "scale": 1, "vertices": [...], "faces": [...] } Exporting and importing to/from obj works as expected. As I could not find anyone also having this problem, I guess it's a usage error. I'm new to blender, so maybe I did something wrong there? I'm using Blender 2.73a and threejs just cloned from the repository.
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/30766252
type: Answer
answers question: http://stackoverflow.com/q/28043104
has body: You can use the templateResult option to customize options you see in the dropdown. This can also be used if there are certain options you don't want to display. You pass a javascript function as the value of the templateResult option. Example: $('#color').select2({ templateResult: formatColorOption }); Before calling .select2() on your select element, you first need to define the formatColorOption() javascript method. Example: function formatColorOption (color) { if (!color.id) { return color.text; } // this next line prevents the currently selected option from showing up in the dropdown list if ($('#color').find(':selected').val() == color.element.value) { return null; } // otherwise display the name of the color return color.text; }; To see a fancy example that combines TemplateResult with some other options, check out the JSFiddle. https://jsfiddle.net/vatdoro/4xu6vcc5/
score: 0

http://stackoverflow.com/a/27996338
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/116237491
answers question: http://stackoverflow.com/q/27992147
has comment: http://stackoverflow.com/comment/44418301
type: Answer
accepted answer of: http://stackoverflow.com/q/27992147
has comment: http://stackoverflow.com/comment/44397939
has comment: http://stackoverflow.com/comment/44401188
score: 4
has body: Here is the pattern to follow if you want to load a model by parsing a JSON data structure. Modify your mountain.json file and give your data structure a name. var mountain = { "metadata": { "formatVersion" : 3.1, "generatedBy" : "Blender 2.7 Exporter", ... etc ... } Include the following code in your source: &lt;script src="mountain.js"&gt;&lt;/script&gt; Now you can load your model like so: var loader = new THREE.JSONLoader(); var model = loader.parse( mountain ); mesh = new THREE.Mesh( model.geometry, model.materials[ 0 ] ); scene.add( mesh ); three.js r.70

http://stackoverflow.com/a/28012656
has body: Pure JavaScript: console.log('ID : ' + document.getElementsByClassName('elementa')[0].innerHTML); jQuery: console.log('ID : ' + $('.elementa').text());
score: 0
answers question: http://stackoverflow.com/q/28012614
type: Answer

http://stackoverflow.com/q/27974647
tagged with: spring
type: Question
has body: Can I use AWS Cognito IdentityID as HMAC key on SSL to protect my REST services? I would like to secure and setup the following application. A HTML/Javascript client using AWS Cognito (future plans to sync across clients) on an SSL Page A Spring Boot REST app AWS DynamoDB So the flow would be: I setup the javascript buttons for google+, amazon and Facebook logins and grab the AWS Cognito token. Once I have the Cognito ID, I make a call to my user service (/user/auth) and see if the user exists using the ID. If they don't I create a profile record in DynamoDB. (cognito id is the key) If they exist I can look up the user profile in dynamoDB and get their authorisation to be used in Spring Security. I want to now secure all calls to my service with HMAC by using the Cognito ID. is this safe? Can I just add spring security on top of Spring boot and implement HMAC checks? If so how? Why isn't this in spring already via OAUTH? thanks in advance.
tagged with: hmac
upvote count: 2
tagged with: javascript
tagged with: amazon-web-services
favorite count: 0
tagged with: rest
score: 2
downvote count: 0
answer count: 0
has title: using was cognito identity id to protect my rest end points via hmac?
type: UnansweredQuestion

http://stackoverflow.com/q/28024851
has title: Calender in inputbox
type: AnsweredQuestion
score: 1
has body: I want to show datepicker in input box.4 days before This code show datepicker.Now I modified unknownly.I dont know What I changed.Here I attached my code Content Delv Logs
type: Question
has answer: http://stackoverflow.com/a/28024913
has comment: http://stackoverflow.com/comment/44435028
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28024937
answer count: 3
possible better answer: http://stackoverflow.com/a/28024945
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28024945
accepted answer: http://stackoverflow.com/a/28024913
favorite count: 0
upvote count: 1

mapshaper
tags question: http://stackoverflow.com/q/28075867
tag name: mapshaper
type: Tag

http://stackoverflow.com/q/28059891
type: Question
has body: I'm working on an SPA which uses body height:100% and one of the pages contains a form with several fields for entering information. On an Android tablet when you tap on one of these fields the soft keyboard appears, which resizes the window element and subsequently the body element, subtracting the height of the soft keyboard. This results in the page being reduced to less than 300px high, making the form unusable. On iPad the keyboard is overlaid on top of the page, so the window height is unchanged. I have found a partial fix, which involves setting the body height to equal the window height on page load, and also on orientationchange: $("body").height($(window).height()); window.addEventListener("orientationchange",function(){ $("body").height($(window).height()); } This fixes the height squishing issue and means that the form can be used, however there is an issue in the instance where the user changes the orientation while the soft-keyboard is open. The keyboard remains open after the orientation change and the window height (and the body height) is changed to the height minus the keyboard. When the field is blurred and the keyboard disappears, the body remains the reduced height and has a nasty white bar at the bottom. To illustrate the problem, here's some numbers: Landscape - Closed Keyboard: 688px Landscape - Open Keyboard: 273px Portrait - Closed Keyboard: 1168px Portrait - Open Keyboard: 716px If you switch from Landscape - Open Keyboard to Portrait - Open Keyboard, and then close the keyboard, the body height remains at 716px, putting a white bar along the bottom. I need to somehow work out the height that it SHOULD be with Closed Keyboard, at the point of orientationchange, while the keyboard is still open. Bearing in mind the fact that the device resolution, application chrome and keyboard sizes will vary.
has answer: http://stackoverflow.com/a/28063499
tagged with: dom
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: android
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has title: Single page web application height issue on Android tablet

http://stackoverflow.com/comment/44472108
has text: In a web page i want to highlight the selected content by the user. Not using Ctrl key and all. Ex. in a tutorial if any impotent points the user want to highlight with there own session not for entire web site.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28044089
type: Comment

http://stackoverflow.com/q/28041056
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/44465888
has comment: http://stackoverflow.com/comment/44465790
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28381302
linked to: http://stackoverflow.com/q/28027305
answer count: 3
has comment: http://stackoverflow.com/comment/44556275
has comment: http://stackoverflow.com/comment/44465701
has answer: http://stackoverflow.com/a/47356812
favorite count: 0
upvote count: 8
has comment: http://stackoverflow.com/comment/81335219
has answer: http://stackoverflow.com/a/30593522
type: UnansweredQuestion
has title: jQuery's closest doesn't work in IE8/9
has comment: http://stackoverflow.com/comment/44465754
has comment: http://stackoverflow.com/comment/44465670
has body: I have this jQuery code: $(this).closest('div:has(.FIND_ME)').find('.FIND_ME').hide(); But element with class .FIND_ME doesn't hide in IE8 and 9. This question is a continuation of Search for an item with a common ancestor HTML: some text click here sometext Result Here some text click here sometext Result Here
score: 7
has comment: http://stackoverflow.com/comment/44465858
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44465866

http://stackoverflow.com/comment/44336987
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27972072
has text: This is true, but I was assuming it was just for testing purposes. Though, it still won't remove the addon code that the host adds. ^^

http://stackoverflow.com/comment/44588238
score: 9
comment on: http://stackoverflow.com/q/28106229
type: Comment
type: QuestionComment
has text: Provide the output .js from ghcjs please. That is how to answer the question.

http://stackoverflow.com/comment/44577489
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28100152
has text: You're right Oriol :) That was a mistake I made while I was simplifying the question looking at my real code :) I fixed it.
score: 0

http://stackoverflow.com/comment/44426834
score: 0
type: AnswerComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/69104/discussion-between-hemant-and-som).
type: Comment
comment on: http://stackoverflow.com/a/28019752

typeahead
type: Tag
tag name: typeahead
tags question: http://stackoverflow.com/q/28079345
tags question: http://stackoverflow.com/q/27989168

http://stackoverflow.com/a/28089121
upvote count: 2
has body: You are evaluating "false" string value not boolean value... function edit_click(){ document.getElementById("save").disabled=false; document.getElementById("cancel").disabled=false; }
answers question: http://stackoverflow.com/q/28088990
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/28118743
has body: With the introduction of the valueAllowUnset in the pull request: #647 - add option that allows the value binding to accept a selected value that is not currently in the list of options This old bug/feature has been fixed. So if you upgrade your fiddle to use at least KO version 3.1 it is working as you described: Demo JSFiddle
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28117986
downvote count: 0
has comment: http://stackoverflow.com/comment/44674816
accepted answer of: http://stackoverflow.com/q/28117986
type: AcceptedAnswer

http://stackoverflow.com/a/28016326
downvote count: 0
answers question: http://stackoverflow.com/q/28015966
score: 1
has body: The FireFox Plug-In "Web Developer, Responsive Design View" is a big help in judging Responsive design. And Google Chrome's Developer Tools has an Emulation mode for most of the popular mobile devices. Put a page div around the entire page and set a max width for the page like 60em (960px) and width:100%. The max with is for desktops so things don't get stretched out too much. Set the viewport &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt; A width of 320px is obsolete. For a list of current viewports see: http://viewportsizes.com/ For widths where applicable (e.g. columns and boxes) use min-width and a percentage width. Design first for mobile, and test with W3C mobileOK and Google PageSpeed Insights A score of 90% on mobileOK is very good. Google insights 100% is easy. When you are satisfied with the design and test results, Then use media queries using screen height and width to target a desktop. These are some basic usable queries: @media only screen and (min-width : 1024px) {} @media only screen and (min-width : 768px) and (max-width : 1023px) {} @media only screen and (max-width : 767px) {}
upvote count: 1
type: Answer

http://stackoverflow.com/q/28114328
tagged with: javascript
tagged with: jquery
has title: Ellipsis with children div
upvote count: 2
answer count: 1
accepted answer: http://stackoverflow.com/a/28114579
has body: I have the following html that is also bound to a bootstrap popover (if that makes any difference) Layouts test Starts 2014/12/12, 11:00 Ends 2015/1/16, 00:00 with associated scss: & > div.event { // position: absolute; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background-color: rgba(41, 128, 185,.7); outline: 1px solid rgba(155, 89, 182,1.0); min-height: 30px; color: white; // width: 100%; height: 30px; padding: 5px; z-index: 1; font-size: 0.7em; .test { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; float:left; // text-transform: uppercase; font-weight: 200; padding: 0; } .value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; float:left; color: rgba(255,255,255,0.5); margin-bottom: 5px; i.fa-external-link { cursor: pointer; line-height: 23px; } } .value, .test { padding-right: 5px; } My problem is that when I shrink the '.event' container (lets say to 5%) the text gets truncated and I would like to display it as ellipsis. From what I've read, the key is really to have overflow:hidden with white-space:nowrap as well as the text-overflow set. I juggled around, moving them to various elements, but nothing seems to work. I am doing something obviously wrong ? I can post more html and css if it appears that the problem lies at a higher level. Fiddle to show problem: http://jsfiddle.net/q1go1471/2/
favorite count: 0
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/28114579
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/44602968

http://stackoverflow.com/comment/44420771
has text: The question is whether it can be ***EDITED***, not used
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28016616

http://stackoverflow.com/q/28086734
has body: I use the tree in project but it is working in IE but isn't working in Chrome. I saw this code document.getElementById(name).options[0] it doesnt work in Chrome and Firefox. How can i pass the this problem or alternative this code ? My js code function bosalt(elm) { alert("bosalt function"); while(document.getElementById(elm).options[0]!=null) document.getElementById(elm).options[0]=null; } and another place; function listele(elm,val,txt) { alert("fasa fiso"); document.getElementById(elm).options[document.getElementById(elm).length]=new Option(txt,val); } I saw it isnt working because when i add block comment this code the project is running. Please help me. And thank you so much everything.
has comment: http://stackoverflow.com/comment/44553854
answer count: 0
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44553267
has comment: http://stackoverflow.com/comment/44553773
has comment: http://stackoverflow.com/comment/44554724
tagged with: google-chrome
has title: document.getElementById(name).options[0] work in IE but doesnt work in Chrome
has comment: http://stackoverflow.com/comment/44553379
has comment: http://stackoverflow.com/comment/44550828
has comment: http://stackoverflow.com/comment/44553327
type: Question
has comment: http://stackoverflow.com/comment/44553881
tagged with: javascript
has comment: http://stackoverflow.com/comment/44553949
has comment: http://stackoverflow.com/comment/44550814
has comment: http://stackoverflow.com/comment/44554699
has comment: http://stackoverflow.com/comment/44550760

http://stackoverflow.com/a/28059383
score: 0
type: Answer
has body: Your JS code is valid from testing on JSFiddle, so this is likely a bug or limitation of Intellisense. Try setting the value directly on the document.getElementById instead of setting a variable first. So change var elem = document.getElementById("mytext"); elem.value = "My default value"; To: var elem = document.getElementById("mytext").value = "My default value"; Or, use jQuery: $('#mytext').val("my default value");
answers question: http://stackoverflow.com/q/28055914

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/28071628
tags question: http://stackoverflow.com/q/28064816
tag name: datetimepicker
tags question: http://stackoverflow.com/q/28018159

http://stackoverflow.com/comment/44437414
type: Comment
comment on: http://stackoverflow.com/a/28020283
type: AnswerComment
has text: Ya i agree with you. Thanks for your help my issue got solved. it was some code problem.
score: 0

http://stackoverflow.com/comment/95841615
type: Comment
comment on: http://stackoverflow.com/a/28182653
score: 0
type: AnswerComment
has text: This works really well without the need to install a plugin or set anything up. What would be the equivalent of this for the iOS?

http://stackoverflow.com/q/28003176
type: UnansweredQuestion
has title: how to use the jquery autocomplete label in my web application
upvote count: 1
downvote count: 1
has body: how to use the jquery autocomplete label in my web application . i want to use the jquery autocomplete lebel . i want the result like New york, USA $('#countryname_1').autocomplete({ source: function( request, response ) { $.ajax({ url : 'ajax.php', dataType: "json", method: 'post', data: { name_startsWith: request.term, type: 'country_table', row_num : 1 }, success: function( data ) { response( $.map( data, function( item ) { var code = item.split("|"); var len=code.length; var co= code[0]; return { label: code[0], value: code[0], data : item } })); } }); }, autoFocus: true, minLength: 0, select: function( event, ui ) { var names = ui.item.data.split("|").length; var dat = ui.item.data.split("|"); //alert(dat); //$('#country_no_1').val(names[1]); } });
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/44395354
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44395428
favorite count: 0
score: 0
answer count: 0

http://stackoverflow.com/q/28072242
has comment: http://stackoverflow.com/comment/44524424
tagged with: scope
score: 0
has body: So, I have a problem with isolating a directive's scope. Before I isolated the scope, it worked fine, pulling the function that got data from a factory, from the parent scope. This directive will be a slider which will need to be able to have multiple instances on a page. For this reason, I needed to isolate the scope. I have tried a few different things and nothing has worked, so I'm guessing I have something else wrong. Here are snippets of my code. Thank you in advance for your help. :) Edited to add: Scope is now successfully isolated, but functions don't seem to be. When multiple instances of the directive, functions effect each instance, rather than just one. Controller: // function BaseController ($scope, dataFactory) { $scope.getMedia = function () { dataFactory.getMedia() .success(function (data) { console.log(data); $scope.sliderItems = data.Items; $scope.topItems = []; $scope.bottomItems = []; // divide results of sliderItems into 2 rows // this ensures that first item from EACH ROW disappears for (var i=0; i &lt; $scope.sliderItems.length; i++){ if ((i+2)%2==0) { $scope.topItems.push( $scope.sliderItems[i]); } else { $scope.bottomItems.push( $scope.sliderItems[i]); } } }) .error(function (error) { $scope.status = 'Unable to load ' + error.message; }); } }angular .module('bellApp') .controller('BaseController', BaseController); // Directive: function singleSlider() { return { // default is A, no need to asign templateUrl: 'views/single-slider.html', scope: { slideritems :'=' }, link: function (scope) { scope.displayInfo = function (item) { scope.itemDetail = item; scope.box = true; }; scope.close = function () { scope.box = false; }; scope.sSlide = function () { //set the appropriate direction scope.direction = 1; var slider = scope.slideritems; //remove first item from slider var shift = slider.shift(); //send removed item to end of slider array slider = slider.push(shift); }; scope.sSlideBack = function () { //set the appropriate direction scope.directi…
has comment: http://stackoverflow.com/comment/44524228
accepted answer: http://stackoverflow.com/a/28075543
tagged with: angularjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44526986
tagged with: directive
has answer: http://stackoverflow.com/a/28075543
has comment: http://stackoverflow.com/comment/44527827
type: Question
has comment: http://stackoverflow.com/comment/44524849
answer count: 1
has title: Passing factory data from parent controller to isolate scope directive
tagged with: javascript

http://stackoverflow.com/comment/44471526
comment on: http://stackoverflow.com/a/28044089
type: AnswerComment
has text: Thanks chipChocolate.py Your codes sounds good. But if i selected second statement first selected content again changes to default one.
score: 0
type: Comment

http://stackoverflow.com/a/28101246
has comment: http://stackoverflow.com/comment/123272689
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28100979
has comment: http://stackoverflow.com/comment/44578218
has comment: http://stackoverflow.com/comment/123320431
score: 9
has comment: http://stackoverflow.com/comment/123291165
has comment: http://stackoverflow.com/comment/44578885
type: AcceptedAnswer
upvote count: 9
has body: What I think is happening is that your click handler is being called on the first click, but your if test isn't working the way you expect. This line: if(node_list[i].style.display == 'none') ...is testing whether the element has an inline style set. Which it doesn't: it's hidden via a CSS rule that applies to all such inputs. So then your else case executes and the .display is set to 'none'. Then on the next click, the if works as expected and changes .display to 'block'. You can see this for yourself if you actually debug your function a little to see if it is getting called and test the value of that .display property - as you can see here: http://jsfiddle.net/uLjxp3ha/ (note: I don't recommend alert()s for debugging). Checking the current visibility as set by stylesheet rules is a bit trickier because it doesn't work consistently across browsers. You may need to test for existence of .currentStyle and .getComputedStyle() to allow for whichever one the current browser might support. Have a look at this answer to another question for more information about that. But in your case given that you know the checkboxes are hidden to begin with you can simply invert your if/else: if(node_list[i].style.display == 'block') { node_list[i].style.display = 'none'; } else { node_list[i].style.display = 'block'; } The .display will not be 'block' to start with, so the else will be executed and the elements will be displayed. Demo: http://jsfiddle.net/uLjxp3ha/1/
has comment: http://stackoverflow.com/comment/44579009
type: Answer
answers question: http://stackoverflow.com/q/28100979

http://stackoverflow.com/comment/44339105
comment on: http://stackoverflow.com/a/27972655
type: AnswerComment
score: 0
type: Comment
has text: You are right, typing manually is more effective for remembering. Good luck!

http://stackoverflow.com/comment/44448024
comment on: http://stackoverflow.com/q/28031703
type: QuestionComment
has text: are you in strict mode?
score: 1
type: Comment

http://stackoverflow.com/a/62468941
score: 2
answers question: http://stackoverflow.com/q/27982752
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27982752
upvote count: 2
type: AcceptedAnswer
type: Answer
has body: If you can live with scaling and smaller text / thin lines. Solution is using this JS + JQuery Scaling method in HTML head section, this written by yazzz here, kudos to her/him in that link, not in here. Responsive and Dynamic Iframe Scaling of Published Chart from Google Spreadsheet Courtesy of yazzz from Javascript StackOverflow You can view his/her implementation of my sample here in JS Fiddle

http://stackoverflow.com/comment/44375636
has text: Your question is very unclear. Do you have a demo to showcase the issue., if not please let me know i am going to remove my answer.
type: AnswerComment
comment on: http://stackoverflow.com/a/27976291
score: 0
type: Comment

http://stackoverflow.com/comment/44554052
comment on: http://stackoverflow.com/a/28068772
has text: This worked, thanks for your help! If anyone else wonders: What @furrypet suggested makes JSON-objects of the response from server. So if you would like to use these, just make a loop to iterate them and print the result as you wish!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28077605
favorite count: 0
tagged with: angularjs
tagged with: javascript-objects
type: AnsweredQuestion
has body: Background I'm working on an Angular app which uses ng-repeat to make a table. One of the users found that the table sometimes contains duplicate entries, which I confirmed visually, then promptly wrote a Protractor test for. The Test Variable Scoping Issues While writing the test, I noticed that the scope wasn't behaving in a way that I understood. Naturally, the for-loop on line 61 has access to linkStorage (line 38), since it is in a higher scope. It logs that all of the objects have been successfully added to the object via the for-loop in the promise on line 47. However, when I move the confirmation loop outside of the promise, say, before the expect block... ...linkStorage is an empty object. Looping over the object finds no nested key-value pairs; it is truely empty. Question (tl;dr) Why is the linkStorage object populated inside the then statement, but not before the expectation?
has answer: http://stackoverflow.com/a/28077606
upvote count: 3
type: Question
score: 3
tagged with: protractor
tagged with: javascript
has title: Protractor variable scope with promises
accepted answer: http://stackoverflow.com/a/28077606
answer count: 1
downvote count: 0

http://stackoverflow.com/q/27993124
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46802592
has body: Some sites use the following JavaScript line to build the site: document.write(' MEGA for Android Do you want to install the latest version of the MEGA app for Android? '); HTML tags are generated through vanilla JavaScript without using any library. Is this code generated or written by a programmer? And what kind of methods use this style of generating HTML? I also don't know if determining these is possible by the way.
answer count: 2
has comment: http://stackoverflow.com/comment/44377020
has answer: http://stackoverflow.com/a/27994065
has answer: http://stackoverflow.com/a/27993677
tagged with: web
favorite count: 0
has comment: http://stackoverflow.com/comment/44377220
has comment: http://stackoverflow.com/comment/117842013
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 2
upvote count: 1
type: Question
has title: Generating HTML tags through vanilla javascript

http://stackoverflow.com/a/28076680
has comment: http://stackoverflow.com/comment/44533609
has comment: http://stackoverflow.com/comment/44532575
type: AcceptedAnswer
downvote count: 0
has body: Inserting a new row into your table can be achieved with something like this: var $row = $("&lt;tr&gt;&lt;td&gt;" + firstName + "&lt;/td&gt;&lt;/tr&gt;"); $("#myPeeps").append($row); I've just added the first table cell. Here is a more complete example jsfiddle. Also, you can put your values into an object simply by: var myobj = {"firstName": "John", "lastName": "Smith", "age": 22}; As I see, you already got the field values from the form, so you just put those in.
accepted answer of: http://stackoverflow.com/q/28076297
type: Answer
answers question: http://stackoverflow.com/q/28076297
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44532978

http://stackoverflow.com/q/28003232
type: Question
tagged with: firefox
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28003233
score: 0
has body: The truth is that I've already got the answer, but apparently the only other questions asking about this specific symptom are here and here. For anyone else, i thought it might be helpful to see this more explicit: an upgrade to Firefox broke Selenium. The symptom is: Selenium::WebDriver::Error::JavascriptError: arguments[0] is undefined [remote server] http://127.0.0.1:39449/users/login?id=1 line 68 &gt; Function:1:in `anonymous' [remote server] http://127.0.0.1:39449/users/login?id=1:68:in `handleEvaluateEvent' Only my javascript-enabled tests fail. The relevant bit of Cucumber-driven Capybara/RSpec is (failing line is the call to fill_in: def login(email, password) link = login_path(email: email) visit link fill_in 'Password', with: password click_button('Login') end And my stacktrace is: /home/rev-dr-d3/.rvm/gems/ruby-2.0.0-p594/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/response.rb:52:in `assert_ok' /home/rev-dr-d3/.rvm/gems/ruby-2.0.0-p594/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize' /home/rev-dr-d3/.rvm/gems/ruby-2.0.0-p594/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:59:in `new' /home/rev-dr-d3/.rvm/gems/ruby-2.0.0-p594/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:59:in `create_response' /home/rev-dr-d3/.rvm/gems/ruby-2.0.0-p594/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:66:in `request' /home/rev-dr-d3/.rvm/gems/ruby-2.0.0-p594/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call' /home/rev-dr-d3/.rvm/gems/ruby-2.0.0-p594/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:640:in `raw_execute' /home/rev-dr-d3/.rvm/gems/ruby-2.0.0-p594/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:618:in `execute' /home/rev-dr-d3/.rvm/gems/ruby-2.0.0-p594/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:339:in `execute…
linked to: http://stackoverflow.com/q/27956071
answer count: 1
has title: Why has my selenium stopped recognizing valid javascript?
favorite count: 0
has answer: http://stackoverflow.com/a/28003233
tagged with: selenium-webdriver
type: AnsweredQuestion
upvote count: 1
linked to: http://stackoverflow.com/q/27334933
downvote count: 1

http://stackoverflow.com/q/27989048
has answer: http://stackoverflow.com/a/27989741
tagged with: jinja2
type: Question
has body: I am saving text in markdown in ndb datastore in app engine. While retrieving I am converting markdown into html using markdown2 library and passing it into template as parameter to render. the code is as follows: article_content = model.Article.query(model.Article.tittle == article_tittle).fetch() if article_content: for article in article_content: content = markdown.markdown(article.content) tittle = article.tittle date = article.date params = { 'page' : 'article', 'tittle' : tittle, 'content' : content } self.render_response('article.html',**params) but when I am rendering the template, html tags are being converted as html entities as: &lt;article class="article"&gt;&amp;lt;p&amp;gt;A minimalist writing zone, where you can block out all distractions and get to what's important. The writing!bvbvbvjbvbknvbvbnvbvbn jvnbnvbgnb n vgnvbn n n bn inovblv &amp;amp;nbsp;o &amp;amp;nbsp;bgv vomhg bmvm vmbvl lm &amp;amp;nbsp; mvjpbg&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Use &amp;lt;strong&amp;gt;bold&amp;lt;/strong&amp;gt;, &amp;lt;em&amp;gt;italics&amp;lt;/em&amp;gt;, &amp;lt;strong&amp;gt;&amp;lt;em&amp;gt;both&amp;lt;/em&amp;gt;&amp;lt;/strong&amp;gt; &amp;lt;strong&amp;gt;and&amp;lt;/strong&amp;gt; &amp;lt;a href="http://zenpen.io"&amp;gt; urls &amp;lt;/a&amp;gt;_ just_ by highlighting the text and selecting them from the tiny options box that appears above it.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;fdbgbfbvbvbbghh&amp;lt;/p&amp;gt;&amp;lt;blockquote&amp;gt; &amp;lt;p&amp;gt;Quotes are easy to add too! &amp;amp;nbsp;fjbgbknvkbvnm i m vm vi mfbm b bo gb gbgb gjkcdfkvc bnbv n oibio nbiffhi nfjkgfkjv &amp;amp;nbsp;gdrf&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;p&amp;gt;gdfbcdjifjgfgethfb&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;gfbfgbf&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;hhgbvgfgh&amp;lt;/p&amp;gt;&lt;/article&gt; if i am passing the variable as json dump or by simply self.response.write() it is passing correctly. Is there any way to pass html elements in variable to…
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44371281
type: UnansweredQuestion
tagged with: google-app-engine
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44369305
tagged with: python
has title: passing html element in variable in app engine?

http://stackoverflow.com/q/28034998
has answer: http://stackoverflow.com/a/28035661
has answer: http://stackoverflow.com/a/28035374
accepted answer: http://stackoverflow.com/a/28035374
type: Question
has comment: http://stackoverflow.com/comment/44474003
possible better answer: http://stackoverflow.com/a/28035661
tagged with: javascript
upvote count: 2
answer count: 2
downvote count: 1
has body: So, what I am going to do with the input tag is to insert as many as email address inside it. &lt;input type="text" name="email-tags"/&gt; To make it more user-friendly, I want to highlight each-email which is typed inside it with blue color, it looks similar like a tag in SO question which also has x button to delete the tag. Can anybody please help me how to do this with javascript? Thanks in advance.
favorite count: 0
has title: highlighting each email in input tag
has comment: http://stackoverflow.com/comment/44456028
has comment: http://stackoverflow.com/comment/44455969
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44454915
score: 1
has comment: http://stackoverflow.com/comment/44454981

asynchronous
tags question: http://stackoverflow.com/q/28055158
tags question: http://stackoverflow.com/q/28076913
tags question: http://stackoverflow.com/q/27991709
tags question: http://stackoverflow.com/q/27995835
tags question: http://stackoverflow.com/q/28064433
tags question: http://stackoverflow.com/q/28036778
tags question: http://stackoverflow.com/q/27995187
type: Tag
tag name: asynchronous
tags question: http://stackoverflow.com/q/28107460
tags question: http://stackoverflow.com/q/27985332
tags question: http://stackoverflow.com/q/28033318
tags question: http://stackoverflow.com/q/28035272
tags question: http://stackoverflow.com/q/27991928
tags question: http://stackoverflow.com/q/28060096
tags question: http://stackoverflow.com/q/28020150
tags question: http://stackoverflow.com/q/28031289
tags question: http://stackoverflow.com/q/28012550
tags question: http://stackoverflow.com/q/28086991
tags question: http://stackoverflow.com/q/28006085
tags question: http://stackoverflow.com/q/28084443
tags question: http://stackoverflow.com/q/27973528
tags question: http://stackoverflow.com/q/28079758
tags question: http://stackoverflow.com/q/28023712
tags question: http://stackoverflow.com/q/28027119
tags question: http://stackoverflow.com/q/28006716
tags question: http://stackoverflow.com/q/28068595
tags question: http://stackoverflow.com/q/28043447
tags question: http://stackoverflow.com/q/28052824

http://stackoverflow.com/comment/44419565
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28016102
score: 1
has text: Because PHP is only executed on the page load once. All you are doing in JavaScript for PHP isn't executing the function `.click`. But giving in the value of the `<?php $test->method1(); ?>` when the page loaded, afterwards nothing would happen because PHP isn't running anymore. So for running it many times you AJAX, although you will need to store the counter (`$contador`) in a session.

http://stackoverflow.com/comment/44438068
type: AnswerComment
score: 0
type: Comment
has text: I see, well, you can remove the height CSS and set it via some javascript after the editor is used. You may also want to uncomment out the resize call that you had at the end.
comment on: http://stackoverflow.com/a/28022500

http://stackoverflow.com/comment/44518765
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/28068961
has text: Sure, you can put an `attr` on the directive and concat a relating css class with the specified image. I am simply doing background colors, but the idea is the same- just change the images. `ng-click` should also be no issue for you - See fiddle - http://jsfiddle.net/c97pmdnj/1/
type: Comment

http://stackoverflow.com/q/28001000
tagged with: http-redirect
tagged with: ruby-on-rails
has body: I am trying to implement a affiliate link on my website. I used to do it with JavaScript, but I would like to keep the link in the controller and not hand it over to JavaScript or html in the future. With JavaScript I waited until the target page was loaded (or at least 1 sec) and redirected the user to that page afterwards. If I use "redirect_to" in my rails controller it redirects directly, which hides the view completely. Is there any way to use redirect_to after a certain amount of time so at least my view shows up or after the target page has fully loaded? Code example below: def index redirect_to www.google.com end
has answer: http://stackoverflow.com/a/28001139
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28001285
has comment: http://stackoverflow.com/comment/44391663
has comment: http://stackoverflow.com/comment/44391752
has comment: http://stackoverflow.com/comment/44391216
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/28001285
has title: Redirect when target page is fully loaded
has comment: http://stackoverflow.com/comment/44391514
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28001139
score: 0

http://stackoverflow.com/q/27972252
has comment: http://stackoverflow.com/comment/44369376
tagged with: ruby-on-rails
has title: Adding AJAX to Rails 4 Like/Unlike Button with Counter
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27972800
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44342063
accepted answer: http://stackoverflow.com/a/27972800
tagged with: ajax
has comment: http://stackoverflow.com/comment/44337215
answer count: 1
downvote count: 0
has body: Wondering if I could get some help with trying to add ajax to my like/unlike feature. Everything works fine right now (without ajax), but I would like to add in ajax and hence avoid page reloading whenever the like/unlike is clicked. I've been racking my brain for many hours, read up on all the related questions regarding this on stackoverflow and anywhere else in general, to no avail. So any help would be greatly appreciated. I have a Project, User, Likes models (among others) and the user has ability to click like/ unlike (I used link_to helper with a partial) the particular project and the counter shows overall likes. views/projects/_like_button.html.erb &lt;div id="like_or_unlike"&gt; &lt;% if @project.liked?(current_user) %&gt; &lt;% like = @project.likes.where(:user_id =&gt; current_user.id).first %&gt; &lt;div class="unlike_button"&gt; &lt;%= link_to "UnLike", like_path(id: like.id, project_id: @project.id), :method =&gt; :delete %&gt; &lt;/div&gt; &lt;% else %&gt; &lt;%= link_to "Like", project_likes_path(@project), :remote =&gt; true, :method =&gt; :post %&gt; &lt;% end %&gt; &lt;/div&gt; controllers/likes_controller.rb class LikesController &lt; ApplicationController def index @user = current_user @projects = Project.all end def create @project = Project.find(params[:project_id]) Like.create(:project =&gt; @project, :user =&gt; current_user) respond_to do |format| format.html { redirect_to project_path(@project), :notice =&gt; "Liked!" } format.js { render '/projects/show.js.erb' } end end def destroy @project = Project.find(params[:project_id]) like = Like.find(params[:id]) like.destroy respond_to do |format| format.html { redirect_to project_path(@project), :notice =&gt; "Unliked!" } format.js { render '/projects/show.js.erb' } end end end views/projects/show.js.erb $('#like_or_unlike').html('&lt;%= j(render partial: '/projects/like_button') %&gt;'); $('.likeit').html('&lt;%= @project.likes.count %&gt;'); I know the above show.js.erb is incorrect and as …
has comment: http://stackoverflow.com/comment/44378810
favorite count: 0

http://stackoverflow.com/q/27980420
has title: jQuery show a div when something added to cart, and not before
tagged with: javascript
has answer: http://stackoverflow.com/a/27980722
accepted answer: http://stackoverflow.com/a/27980722
has comment: http://stackoverflow.com/comment/44354067
upvote count: 1
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/44354044
tagged with: webshop
favorite count: 0
has comment: http://stackoverflow.com/comment/44352495
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44352485
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44352435
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44354087
has comment: http://stackoverflow.com/comment/44352918
has body: i need to view a div that show how much you need to buy more to get free shipping on a webshop. The html looks like this: Køb for yderligere DKK 1000.00 og få fragtfri levering. and at the bottom of the shop there is: 1000 0 The 0 in "priceInCart" is actually a snippet of code that checks if there is something in cart and displays id here. In this case the cart is empty. The css: .l-shopgetmore { font-size: 21px; text-align: center; min-height: 60px; padding: 15px 0px; } .panel-success { background-color: #CAEEF7; border-color: #08BFED; color: #08BFED; } So my jQuery code looks like this. jQuery(document).ready(function(j) { var start = 999, getFirstNum = jQuery('.frifragt').text(), getSecNum = jQuery('.priceInCart').text(), diff = Number(getFirstNum) - Number(getSecNum), getDiscont = jQuery('.priceInCart').text() var getAmount = jQuery('.priceInCart').text(); if(getAmount != '0') { if(start > getDiscont) { jQuery('.l-shopgetmore').html('Køb for yderligere DKK ' + diff.toFixed(2) + ' og få fragtfri levering.'); } else { jQuery('.l-shopgetmore').hide(); } } }); The last line jQuery('.l-shopgetmore').hide(); is not working. I need the jQuery to display div with the class ".l-shopgetmore" only when somone puts something in the cart.
tagged with: cart
type: Question

http://stackoverflow.com/a/28440482
has body: I have seen this issue on IE9 (did not reproduce in IE10+, and didn't test below 9). The problem occurred when the form was within an element being translated with -ms-transform. Removing the transform fixed the issue.
downvote count: 0
answers question: http://stackoverflow.com/q/27980743
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/47252976
type: Answer

http://stackoverflow.com/q/27976999
score: 1
has title: node.js AMQP not returning callback
type: Question
answer count: 2
tagged with: amqp
upvote count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/41018135
favorite count: 0
tagged with: node-amqp
has comment: http://stackoverflow.com/comment/44346274
has comment: http://stackoverflow.com/comment/44346323
has answer: http://stackoverflow.com/a/28434828
type: UnansweredQuestion
tagged with: rabbitmq
has body: I am using node AMQP module to connect to RabbitMQ. I am able to connect, create an exchange, queue and able to send/publish the message to the exchange. I can confirm the messages are published on the management console. Problem is I am not receiving the callback for exchange publish call. This is my code. Initialization: (app is the express.js instance) app.rabbitMQConnection = amqp.createConnection({ host: 'myurl.com', login: 'login', password: 'pwd' }); app.rabbitMQConnection.on('ready', function(){ console.log("RabbitMQ server connected"); app.rabbitMQConnection_e = app.rabbitMQConnection.exchange('my-exchange', { confirm: true, durable: true, autoDelete: false }, function (q) { app.rabbitMQConnection_q_lisorders = app.rabbitMQConnection.queue('shoe-orders', {autoDelete: false, durable: true}, function (q) { app.rabbitMQConnection_q_lisorders.bind(app.rabbitMQConnection_e, '#'); }); }); }); Then when I need to send a message I use: app.rabbitMQConnection_e.publish('routingKey', { message: myMessage }, { deliveryMode: 2 }, function(transmissionFailed){ if (transmissionFailed == true){ console.log("message failed"); }else{ console.log("message sent"); } }); Callback function(transmissionFailed) is never called. Please help!
tagged with: node.js

http://stackoverflow.com/q/28010155
type: Question
has comment: http://stackoverflow.com/comment/44408508
has comment: http://stackoverflow.com/comment/44408005
has comment: http://stackoverflow.com/comment/44408196
has comment: http://stackoverflow.com/comment/44408059
has body: I have the following: &lt;div ng-repeat="m in model"&gt; {{m.prop1}}{{m.prop2}} &lt;/div&gt; inside controller is a deffered promise that fetches an object from the server. promise.then(function(e){ $scope.model.push(e); // e is an object, which is pushed into the array. $scope.$apply(); // causes digest already in progress error so put inside $timeout }); I've tried $timeout and $scope.$apply() and the view still wont update: var promise = ModelService.create(model,data); promise.then(function(e){ $timeout(function(){ $scope.$apply(function(){ $scope.model.push(e); }); }) }); Update: ModelService.js create: function(model, data){ var defer = $q.defer(); $http.post('/api/'+model+"/create", data).success(function(e){ defer.resolve(e); }).error(function(e){ defer.reject(e); }); return defer.promise; } any ideas to get the view to render the model update?
tagged with: javascript
has comment: http://stackoverflow.com/comment/44408135
score: 0
has comment: http://stackoverflow.com/comment/44408419
has answer: http://stackoverflow.com/a/28010559
has comment: http://stackoverflow.com/comment/44408619
has comment: http://stackoverflow.com/comment/44408170
answer count: 1
has comment: http://stackoverflow.com/comment/44408029
has comment: http://stackoverflow.com/comment/44408068
has comment: http://stackoverflow.com/comment/44408108
tagged with: angularjs
type: UnansweredQuestion
has title: AngularJS View not updating using UI-Router

http://stackoverflow.com/comment/44571740
type: Comment
comment on: http://stackoverflow.com/a/28084022
has text: Firefox. Hmm. Thought I said that earlier, but it didn't show in what got posted. Sorry.
score: 0
type: AnswerComment

http://stackoverflow.com/a/28083386
downvote count: 0
answers question: http://stackoverflow.com/q/28065222
type: Answer
has body: On page load retrieve the json object from the service The Controller for your page can call the Service to retrieve the complex object as soon as the controller loads. Bind each property or nested object to the correct controller There's many ways to do this. Once you have your object, you can reference its properties directly and pass pieces of it around. If you're using parent-child controllers, the child can modify the complex object that is stored in the parent's scope. If you use directives, you can pass specific pieces of the complex object as needed via isolated scopes. You can also have the complex object stored in the Service (which is a singleton) and shared between controllers. User modify the values through UI Collect all the modified data and rebuild the complex object Angular's 2-way data-binding will handle this part. Use the ngModel directive to save whatever input you need. Any changes you make should be reflected back in the 'master' object. Send the modified object back to service for update and calcultation This would be a matter of calling your Service again, which should make a PUT request with the object as its body. Your PageController and Service might look something like this: PageController function PageController($scope, ComplexObjectService) { loadComplexObject(); function loadComplexObject() { ComplexObjectService.get().then(function(complexObject) { $scope.complexObject = complexObject; }); } $scope.onSave = function(complexObject) { ComplexObjectService.save(complexObject).then(function(result) { //Do something. }); } } angular .module('ModuleName') .controller('PageController', ['$scope', 'ComplexObjectService', PageController]); ComplexService function ComplexObjectService($http) { this.get = function() { return $http.get('/api/to/get/complex/object').then(function(response) { return response.data; }); }; this.save = function(complexObject) { return $http.put('/api/to/save/complex/object', complexObject).then(function(response) { r…
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/28065222
type: AcceptedAnswer

http://stackoverflow.com/comment/44582881
score: 0
comment on: http://stackoverflow.com/q/28103961
type: Comment
type: QuestionComment
has text: This is an example of an [XY problem](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem). Your problem is that the DOM hasn't loaded (as explained above). This is basically a duplicate of questions like http://stackoverflow.com/questions/15463003/how-to-wait-until-a-web-page-is-loaded-with-javascript

http://stackoverflow.com/q/28059820
has answer: http://stackoverflow.com/a/28059864
tagged with: javascript
tagged with: jquery
score: 0
has title: JavaScript loop through nested objects and display in a separate row
accepted answer: http://stackoverflow.com/a/28059864
has answer: http://stackoverflow.com/a/28060058
has body: I have JS objects as below. var round=[ { "round":"1", "score":"8", "players":[ { "id":"28259", "name":"Player 1" } ] }, { "round":"2", "score":"0", "players":[ { "id":"", "name":"Player 2" }, { "id":"1887", "name":"Player 3" } ] }, { "round":"3", "score":"0", "players":[ { "id":"26300", "name":"Player 4" } ] }, { "round":"4", "score":"5", "players":[ { "id":"22792", "name":"Player 5" }, { "id":"23135", "name":"Player 8" }, { "id":"28259", "name":"Player 9" } ] } ] I want to create a row per a player with round and score data. However, I can only create one row per a round. Players are displayed in the same cell. How can I make a separate row per a player? What I want to display: 1 Player 1 8 2 Player 2 0 2 Player 3 0 3 Player 4 0 4 Player 5 5 4 Player 6 5 4 Player 7 5 What I am getting now: 1 Player 1 8 2 Player 2 Player 3 0 3 Player 4 0 4 Player 5 Player 6 Player 7 5 Here is JS Fiddle - http://jsfiddle.net/sunflowersh/8gm96vts/2/ JavaScript: function write_round_players(){ $('#tableData').html(''); $.each(round, function(index,value){ var round_row = ''; round_row+=' '; round_row+=' '+this.round+' '; round_row+=' '; var round_players = this.players; $.each(round_players, function(index,value){ if(this.id != ""){ round_row+=''+this.name+''; } else { round_row+=this.name; } }); round_row+=' '; round_row+=' '+this.score+' '; round_row+=' '; $('#tableData').append(round_row); }); }
possible better answer: http://stackoverflow.com/a/28060058
type: AnsweredQuestion
type: Question
answer count: 2

http://stackoverflow.com/q/28048971
type: Question
has body: I have the following code: $(".q68").click(function(){ if($('#q68a2').is(':checked')) { $('.q51').prop('disabled',false); $('.q52').prop('disabled',false); $('.q53').prop('disabled',false); $('.q54').prop('disabled',false); } if($('#q68a1').is(':checked')) { $('.q51').prop('checked',false); $('.q52').prop('checked',false); $('.q53').prop('checked',false); $('.q54').prop('checked',false); $('.q51').prop('disabled',true); $('.q52').prop('disabled',true); $('.q53').prop('disabled',true); $('.q54').prop('disabled',true); } }); As you can see, very simply, depending on what radio button id is selected, other radio buttons are disabled or enabled. We've tested under IE7 and above in a XP, Vista, 7 and 8 environment but one of our clients has IE11 running within a Citrix environment and this code is not working. I just wondered if anyone had an insight into why this might be - something obvious with the code I am missing?
has comment: http://stackoverflow.com/comment/44480358
has comment: http://stackoverflow.com/comment/44480052
tagged with: radio-button
tagged with: javascript
tagged with: jquery
score: 0
has title: jQuery not running under Citrix/ Enterprise
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44480143

http://stackoverflow.com/q/28059311
accepted answer: http://stackoverflow.com/a/28062909
has body: I need to call the service variable in controller. I tried to call $scope.userData1.data.name outside the Service function , it is undefined. If I put {{userData1}} in template Messages Ctrl , it shows up all the data array including names. I need to load the i-frame using the user_name variable. angular.module('starter.controllers', []) .factory('UserService', function($http) { var data; return{ getData: function($http) { return $http.get("http://www.website.com/index.php/id/user/call12"). success(function(response) { /// console.log(JSON.stringify(response)); userData=response.data; return userData; }).error(function(data, status, headers, config) { // log error }); } } }) .controller('MessagesCtrl',function ($scope, Messages,$http,$ionicPopup,$timeout,$window,UserService,Outbox,$sce) { $scope.userData1 = {}; // updated $scope.myCtrl2= function(UserService,$http) { UserService.getData($http).then(function(data) { $scope.userData1 = data; console.log($scope.userData1.data.name); // USERNAME exist var name= $scope.userData1.data.name; }); } $scope.myCtrl2(UserService,$http); var name= $scope.userData1.data.name; //undefined $scope.formData4.upload_url = $sce.trustAsResourceUrl("http://www.website.com/index.php/id/user/view_form/"+ name); }) template : &lt;form ng-controller="MessagesCtrl" ng-disabled="isRequesting"&gt; &lt;span class="item item-input" &gt; &lt;span class="input-label"&gt;&amp;nbsp;&lt;/span&gt; &lt;iframe id="iframe-123" src="{{formData4.upload_url}}" style="border: 0px none; height: 80px; margin: auto; width: 100%; overflow: hidden;" frameborder=0&gt;&lt;/iframe&gt;&lt;/span&gt; &lt;/form&gt;
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44502310
linked to: http://stackoverflow.com/q/14220321
favorite count: 0
tagged with: angularjs
upvote count: 1
has comment: http://stackoverflow.com/comment/44506396
has comment: http://stackoverflow.com/comment/44505778
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44506545
score: 1
tagged with: iframe
has comment: http://stackoverflow.com/comment/44505108
type: Question
has comment: http://stackoverflow.com/comment/44502561
has comment: http://stackoverflow.com/comment/44506300
has comment: http://stackoverflow.com/comment/44506148
has title: angularJS using service variable
has answer: http://stackoverflow.com/a/28062909
tagged with: javascript
has comment: http://stackoverflow.com/comment/44506318
has comment: http://stackoverflow.com/comment/44505808

http://stackoverflow.com/comment/44588752
score: 2
comment on: http://stackoverflow.com/q/28107177
has text: JSON is a string, not an object, and also `.data` will not create `data-options` for you. Take a look at the jQuery spec of what [it actually does](http://api.jquery.com/data/).
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44530830
score: 0
comment on: http://stackoverflow.com/q/28075764
type: Comment
type: QuestionComment
has text: when user signin store some value in the localStorage and remove that value on logout. Next time when the user came for that variable if present then load feed.html else index.html

http://stackoverflow.com/a/28000206
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/28000169
score: 3
answers question: http://stackoverflow.com/q/28000169
upvote count: 3
has body: From the docs: To re-enable a warning that has been disabled with the above snippet you can use: /* jshint +W034 */ http://jshint.com/docs/ So it's just to make sure it isn't ignored for the rest of file.
has comment: http://stackoverflow.com/comment/44389672
type: AcceptedAnswer

http://stackoverflow.com/a/28068521
has comment: http://stackoverflow.com/comment/44544269
type: AcceptedAnswer
upvote count: 3
type: Answer
has body: You don't need to use any watchers or $apply here, angular is capable of taking care of this and updating the view when the data changes. Moreover, $watchers are expensive performance-wise, and $scope.$apply is something that is recommended to avoid unless absolutely necessary, which is not here. $angular.extend is not a deep copy. You can read about it here. I suggest you change your code to this: load($stateParams.Id).then(function(result) { $scope.container = result; }); And removing angular.extend(this, data); from the success callback. Also remove the entire $watch section, it's redundant.
downvote count: 0
answers question: http://stackoverflow.com/q/28068337
score: 3
accepted answer of: http://stackoverflow.com/q/28068337
has comment: http://stackoverflow.com/comment/44543450
has comment: http://stackoverflow.com/comment/44543430
has comment: http://stackoverflow.com/comment/44563192

http://stackoverflow.com/q/27978357
accepted answer: http://stackoverflow.com/a/27979428
has answer: http://stackoverflow.com/a/27979428
type: AnsweredQuestion
has title: Knockout async validation IE9
tagged with: knockout.js
type: Question
tagged with: validation
answer count: 1
tagged with: javascript
has body: everything perfectly works in chrome but doesn't work in IE. This async call happens and callback(false) fired, but constCentreNumber still valid and no errors shown. self.costCentreNumber = ko.observable().extend({ required: { params: true, message: utils.message.required("Cost Centre number") }, pattern: { message: utils.message.format("Cost Centre number"), params: '^[0-9a-zA-Z]{1,10}$' }, validation: { async: true, message: utils.message.invalid("Cost Centre number"), validator: function (val, otherval, callback) { dataSource.validate.costCode(val, self.shiftStart()) .always(function(result) { callback(result); }); } } });
score: 0

http://stackoverflow.com/q/28088058
has comment: http://stackoverflow.com/comment/44552887
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28088123
has comment: http://stackoverflow.com/comment/44553997
has comment: http://stackoverflow.com/comment/44552860
has body: I'm learning Angular and in all the resources I've used so far I saw this in the app.js file: (function () { \\\myAngularModules })(); The most commonl explainantion is an unhelpful "it's just good practice". Questions: Is wrapping our Angular JS code in a function really good practice? Why? What sort of function is it and what does it do? Please give examples where possible.
has title: Why do we wrap Angular app inside a function?
type: Question
has answer: http://stackoverflow.com/a/28088123
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28088095
has comment: http://stackoverflow.com/comment/44553975
answer count: 2
downvote count: 2
favorite count: 0
tagged with: angularjs
upvote count: 4
has answer: http://stackoverflow.com/a/28088095

http://stackoverflow.com/q/27992098
type: UnansweredQuestion
type: Question
tagged with: xslt
has comment: http://stackoverflow.com/comment/44374898
tagged with: javascript
score: 4
answer count: 1
has body: OK, I have an XML/XSLT pairing (inserted into my HTML via Javascript from 2 external files) that creates a button on the page with the nodeValue taken from a tag called 'JobID' (a generated GUID). Finished Thus returning the id of the button to a function... function markFinished(clicked_id) { cid = clicked_id; document.write(cid) } The XML look like this... <?xml version="1.0" encoding="utf-8"?> 25657287-cc52-415b-8781-be37d5098656 a-current 5f8294ca-fe5a-4da9-847b-da99df999000 a-current 05a84779-5801-4645-a7f9-74529ea5298b a-current 07df3deb-4935-4504-8822-a73ccea038ae b-complete 078c496d-ac60-48e7-b9fe-a0e1f78ff2c5 c-upcoming 07ec868e-d294-4bb3-807d-00df66f5bab2 c-upcoming 8bdeee5f-2bf6-4e44-8af8-69f600048dfe a-current I need a way for my function to match the clicked_id to the JobID and replace the nextSibling (Status) with 'b-finished'. Any help here would be greatly appreciated.
favorite count: 0
has comment: http://stackoverflow.com/comment/44452205
has answer: http://stackoverflow.com/a/27992309
upvote count: 4
has title: Replace XML nodeValue via Javascript
has comment: http://stackoverflow.com/comment/44452177
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/44474806
downvote count: 0

http://stackoverflow.com/comment/44496677
comment on: http://stackoverflow.com/q/28057446
has text: i have put the php code to show the variables
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44445671
has text: @rwacarter - Agreed. Annoying isn't it? Ideally you'd test for support then use a JS fallback.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28030285

http://stackoverflow.com/a/28102865
has comment: http://stackoverflow.com/comment/44580928
has comment: http://stackoverflow.com/comment/44581041
has comment: http://stackoverflow.com/comment/44580987
answers question: http://stackoverflow.com/q/28102812
score: 0
has comment: http://stackoverflow.com/comment/44581175
has comment: http://stackoverflow.com/comment/44581198
has body: If you are going to make other objects using foo, using something like Object.create() then probably a bad idea. Object.create() if (typeof Object.create !== 'function') { Object.create = function (o) { function F() {} F.prototype = o; return new F(); }; } newObject = oldObject.beget(); Read more: Prototypal Inheritance in JavaScript
type: Answer
has comment: http://stackoverflow.com/comment/44581257

http://stackoverflow.com/q/28032086
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28032257
tagged with: node.js
downvote count: 1
type: Question
has body: I have this following schema: var MySchema = new Schema ({ event: { full: String, date: String, name: String, } }); Examples of the values: event.date = '16/02/2015' (DD/MM/YY) event.name = 'Classic' event.full = Concatenation of event.date and event.name = '16/02/2015 Classic' This three are strings, and i need use object date in the event.date, in order to sort by date in my views. My question is: How can i use object date in the event.date, with this format? (DD/MM/YY).. and still achieve concatenate the event.date(object date) + event.name(string) in the event.full?? Thanks very much!!
tagged with: javascript
score: -1
tagged with: mongodb
upvote count: 0
answer count: 1
tagged with: mongoose
has title: How to use date objects instead of date 'strings' and still achieve same result

http://stackoverflow.com/q/27980108
type: Question
has comment: http://stackoverflow.com/comment/44351827
has comment: http://stackoverflow.com/comment/44351979
tagged with: javascript
has comment: http://stackoverflow.com/comment/44351925
score: 0
has answer: http://stackoverflow.com/a/27984245
answer count: 1
tagged with: minify
has title: Minify and Unminify js based on working enviroment
tagged with: jquery
has comment: http://stackoverflow.com/comment/44352522
type: UnansweredQuestion
has body: I have large js file approx 800kB (un-minified) and 100KB (Minified).In production environment i minify it online every time and unminify it again in development environment manually.Is there any way to automated this task. Any help would be appreciated.
has comment: http://stackoverflow.com/comment/44351832

http://stackoverflow.com/q/28039797
tagged with: javascript
has body: Need the output of the time script to change the input of a input field but can't figure it out. &lt;script&gt; function addZero(i) { if (i &lt; 10) { i = "0" + i; } return i; } function checkouttimeFunction() { var d = new Date(); var x = document.getElementById("demo"); var h = addZero(d.getHours()); var m = addZero(d.getMinutes()); var s = addZero(d.getSeconds()); x.innerHTML = h + ":" + m + ":" + s; var elem = document.getElementById("cout"); elem.value = document.getElementById("demo"); } &lt;/script&gt;
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44463473
tagged with: input
has answer: http://stackoverflow.com/a/28039855
has title: JS output to a html input
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28039908
score: 0
has answer: http://stackoverflow.com/a/28039943
type: Question
possible better answer: http://stackoverflow.com/a/28039908
accepted answer: http://stackoverflow.com/a/28039855

http://stackoverflow.com/q/28031309
has title: Parse deploy of cloud code failing with message "Update failed with internal error"
answer count: 1
has body: I've been running Parse cloud code for a few months using CLI version 1.4.1 with no problems. I just updated using the CLI to the latest version, 1.4.2, but now when I deploy I get this output: Uploading source files Finished uploading files Update failed with internal error I've checked for the one problem I see documented elsewhere, which is erroneous quotes around some parse classes like Parse.User and Parse.Installation. It doesn't look like these are my problem. Is there any way to find out more about the error, besides trial and error with my several thousand lines of code? :)
favorite count: 0
tagged with: parse-platform
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29455342
type: Question
upvote count: 4
downvote count: 0
tagged with: javascript
score: 4
tagged with: parse-cloud-code

http://stackoverflow.com/comment/44518629
has text: The reason there is no image suddenly is because there is no control to ensure that the same number is not picked twice, so for example if 2 is picked twice in a row, you are IMMEDIATELY removing the background image, hence the blank "no image". Background images would also not be instantly visible necessarily as they are still being pulled form the server on initial load.
type: AnswerComment
comment on: http://stackoverflow.com/a/28069111
type: Comment
score: 0

http://stackoverflow.com/q/28000926
type: AnsweredQuestion
score: 1
type: Question
downvote count: 0
tagged with: javascript
has title: Making an image slider but the background image won't respond to other properties?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/28001020
accepted answer: http://stackoverflow.com/a/28001020
has body: i recently just got some help with this code but and it works as a slider of background images, the only issue is that the background image isn't responding to the background image size property in the css and now the images are zoomed in fully when i want them to cover the div. Here is what it looks like: So here is my HTML THE ALL NEW 14 RANGE FIND OUT MORE Here is my css #headbar { height: 50vh; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; margin-top: 60px; display: flex; -webkit-flex-flow: column wrap; justify-content: center; align-items: center; color: #eee; } Any help will be massively appreciated! Thanks, Ollie
favorite count: 0
upvote count: 1
tagged with: css

http://stackoverflow.com/a/27974934
has body: try notes.replace(/&lt;br\/&gt;/g,"\r")
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27974893
downvote count: 0
score: 1

http://stackoverflow.com/comment/44396989
type: Comment
type: QuestionComment
score: 0
has text: Hi, yes I can edit the json file, I've just improved file as you told
comment on: http://stackoverflow.com/q/28003994

http://stackoverflow.com/comment/73847688
type: QuestionComment
comment on: http://stackoverflow.com/q/28098997
has text: Note from the future: cdn.mathjax.org is nearing its end-of-life, check https://mathjax.org/cdn-shutting-down for migration tips.
score: 0
type: Comment

http://stackoverflow.com/q/28055858
tagged with: dom
type: Question
linked to: http://stackoverflow.com/q/24632983
tagged with: javascript
tagged with: dom-events
has comment: http://stackoverflow.com/comment/44505944
score: 0
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/28056318
has comment: http://stackoverflow.com/comment/44493520
type: UnansweredQuestion
has title: Chrome Rich Notifications - How to use it
upvote count: 1
downvote count: 1
has body: For 2-3 days I'm trying to use Chrome rich notification. I've read some reviews regarding this but nobody tells how to use implement it. I want to try it in a html test page. How can I do this? because I couldn't manage to show at least a basic notification... :( I want to implement this in an extension that I'm building. How can I do this? There are special instructions? I don't need this simple notification: function notifyMe() { if (!("Notification" in window)) { alert("This browser does not support desktop notification"); } else if (Notification.permission === "granted") { var notification = new Notification("Message"); } else if (Notification.permission !== 'denied') { Notification.requestPermission(function (permission) { if(!('permission' in Notification)) { Notification.permission = permission; } if (permission === "granted") { var notification = new Notification("Message"); } }); } }//--Notification code-- I need rich notification because I need a bunch of options which this is offering. Can someone help me with a tutorial or a html test page to understand how to implement it?
linked to: http://stackoverflow.com/q/26621042
has comment: http://stackoverflow.com/comment/44505969

http://stackoverflow.com/comment/44385152
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27997697
has text: I don't get what you mean by "displaying the score to" something.
score: 0

http://stackoverflow.com/comment/90798100
has text: How will you add the pagination with fetch? Any such example?
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/35224925

php
tags question: http://stackoverflow.com/q/27999469
tags question: http://stackoverflow.com/q/28110633
tags question: http://stackoverflow.com/q/28116659
tags question: http://stackoverflow.com/q/28121423
tags question: http://stackoverflow.com/q/28060696
tags question: http://stackoverflow.com/q/28049256
tags question: http://stackoverflow.com/q/28018741
tags question: http://stackoverflow.com/q/28103491
tags question: http://stackoverflow.com/q/27973409
tags question: http://stackoverflow.com/q/28005025
tags question: http://stackoverflow.com/q/28095851
tags question: http://stackoverflow.com/q/28035868
tags question: http://stackoverflow.com/q/28107345
tags question: http://stackoverflow.com/q/28107915
tags question: http://stackoverflow.com/q/28120391
tags question: http://stackoverflow.com/q/28031717
tags question: http://stackoverflow.com/q/27976572
tags question: http://stackoverflow.com/q/28025815
tags question: http://stackoverflow.com/q/28082308
tags question: http://stackoverflow.com/q/28037482
tags question: http://stackoverflow.com/q/28040938
tags question: http://stackoverflow.com/q/28002627
tags question: http://stackoverflow.com/q/28049949
tags question: http://stackoverflow.com/q/28086643
tags question: http://stackoverflow.com/q/28005799
tags question: http://stackoverflow.com/q/28103479
tags question: http://stackoverflow.com/q/27986221
tags question: http://stackoverflow.com/q/28120137
tags question: http://stackoverflow.com/q/28064567
tags question: http://stackoverflow.com/q/28067364
tags question: http://stackoverflow.com/q/28079824
tags question: http://stackoverflow.com/q/28059469
tags question: http://stackoverflow.com/q/28026303
tags question: http://stackoverflow.com/q/28086784
tags question: http://stackoverflow.com/q/28061331
tags question: http://stackoverflow.com/q/28037586
tags question: http://stackoverflow.com/q/28109169
tags question: http://stackoverflow.com/q/28015711
tags question: http://stackoverflow.com/q/28106008
tags question: http://stackoverflow.com/q/28011666
tags question: http://stackoverflow.com/q/28080806
tags question: http://stackoverflow.com/q/28013323
tags question: http://stackoverflow.com/q/28034671
tags question: http://stackoverflow.com/q/28004757
tags question: http://stackoverflow.com/q/27968195
tags question: http://stackoverflow.com/q/27973358
tags question: http://stackoverflow.com/q/28041366
tags question: http://stackoverflow.com/q/28111314
tags question: http://stackoverflow.com/q/28051504
tags question: http://stackoverflow.com/q/28100920
tags question: http://stackoverflow.com/q/28081592
tags question: http://stackoverflow.com/q/27995952
tags question: http://stackoverflow.com/q/28085848
tags question: http://stackoverflow.com/q/28012232
tags question: http://stackoverflow.com/q/28027248
tags question: http://stackoverflow.com/q/28095985
tags question: http://stackoverflow.com/q/28018844
tags question: http://stackoverflow.com/q/28077283
tags question: http://stackoverflow.com/q/28014319
tags question: http://stackoverflow.com/q/27989576
tags question: http://stackoverflow.com/q/28001938
tags question: http://stackoverflow.com/q/28036870
tags question: http://stackoverflow.com/q/28102106
tags question: http://stackoverflow.com/q/28012839
tags question: http://stackoverflow.com/q/28062818
tags question: http://stackoverflow.com/q/28057446
tags question: http://stackoverflow.com/q/28008960
tags question: http://stackoverflow.com/q/28118644
tags question: http://stackoverflow.com/q/28061622
tags question: http://stackoverflow.com/q/28018786
tags question: http://stackoverflow.com/q/27990920
tags question: http://stackoverflow.com/q/28088841
tags question: http://stackoverflow.com/q/27973660
tags question: http://stackoverflow.com/q/28112223
tags question: http://stackoverflow.com/q/28009115
tags question: http://stackoverflow.com/q/28076253
tags question: http://stackoverflow.com/q/28111943
tags question: http://stackoverflow.com/q/28024379
tags question: http://stackoverflow.com/q/27995226
tags question: http://stackoverflow.com/q/28023081

http://stackoverflow.com/comment/44610245
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28117686
has text: And he/she was missing a comma between latitude and longitude ;)
score: 0

http://stackoverflow.com/comment/44573570
type: Comment
comment on: http://stackoverflow.com/a/28090902
score: 1
type: AnswerComment
has text: If the user is logged in on your website, you should hide all of them, that should solve your problem

http://stackoverflow.com/q/28022921
score: 1
tagged with: ubuntu
type: Question
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/28022970
tagged with: javascript
favorite count: 0
has body: I want to run meteor application in ubuntu. I run following command to install curl. sudo apt-get install curl But it gives me following errors: $sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done Package curl is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'curl' has no installation candidate please help me to install curl and meteor.
tagged with: php
has title: how to install meteor on Ubuntu?
tagged with: curl
accepted answer: http://stackoverflow.com/a/28022970
upvote count: 1
has comment: http://stackoverflow.com/comment/44431642
type: AnsweredQuestion

http://stackoverflow.com/q/28043242
has answer: http://stackoverflow.com/a/29028112
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29028112
score: 0
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
has title: Save a pdf file with TideSDK
tagged with: utf-8
has body: I have a decodification problem. I have an offline desktop application, where I have to generate a pdf file and save at his open. To generate the PDF file I use BytescoutPDF library createpdf.js. This returns a document variable that I have to save. I tried with: //this calls the createPDF to BytescoutPDF library //and returns the variable into 'doc' var doc = generaStaticPartBolla_2(); //take the stream var bolla = Ti.Filesystem.getFileStream(billPath); //open in write mode bolla.open(Ti.Filesystem.MODE_WRITE); //write the doc file decodified in Base 64 bolla.write(doc.getBase64Text()); //close the stream bolla.close(); Now, the file generated is currupted. I'm not able to open this. How can I do this? The file must be converted in Base 64 or other?
type: AnsweredQuestion
tagged with: save
tagged with: tidesdk
type: Question

http://stackoverflow.com/a/28015334
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/28014507
has body: Here is the code: Color Blue Red You can add the selected attribute to the first option which will now be color Hope this helps.
score: -1
has comment: http://stackoverflow.com/comment/44417938
downvote count: 1

http://stackoverflow.com/comment/44740590
type: QuestionComment
has text: @AnthonyGalli the latter approach sets the order on the server side, i.e. the server renders the HTML; there's no AJAX/JavaScript. Are you still interested in either approach?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28033986

http://stackoverflow.com/a/28016676
answers question: http://stackoverflow.com/q/28016664
type: Answer
has body: this inside a function call gets set according to how a function is called. There are six main ways that this gets set. Normal Function Call: In a normal function call such as foo(), this is set to either the global object (which is window in a browser or global in nodejs) or to undefined (in JavaScript's strict mode). Method Call: If a method is called such as obj.foo() where the method foo is a normal method declaration using the function keyword or using the regular method declaration syntax for a class, then this is set to obj inside the function. .apply() or .call(): If .apply() or .call() is used, then this is set according to what is passed to .apply() or .call(). For example, you could do foo.call(myObj) and cause this to be set to myObj inside of foo() for that particular function call. Using new: If you call a function with new such as new foo(), then a new object is created and the constructor function foo is called with this set to the newly created object. Using .bind(): When using .bind() a new stub function is returned from that call that internally uses .apply() to set the this pointer as was passed to .bind(). FYI, this isn't really a different case because .bind() can be implemented with .apply(). Using ES6 Fat Arrow Function Defining a function via the arrow syntax in ES6+ will bind the current lexical value of this to it. So, no matter how the function is called elsewhere (with any of the previous ways to call it), the this value will be set by the interpreter to the value that this has when the function was defined. This is completely different than all other function calls. There's sort of a seventh method, via a callback function, but it isn't really its own scheme, but rather the function calling the callback uses one of the above schemes and that determines what the value of this will be when the callback is called. You have to consult either the documentation or the code for the calling function or test it yourself to determine what this wi…
has comment: http://stackoverflow.com/comment/44423914
downvote count: 0
score: 30
has comment: http://stackoverflow.com/comment/61196918
upvote count: 30

http://stackoverflow.com/a/28089179
answers question: http://stackoverflow.com/q/28089097
has comment: http://stackoverflow.com/comment/44555179
type: Answer
has comment: http://stackoverflow.com/comment/44555070
has body: Think about storing the value of the input after each keyup and if the wordcount is greater than your limit just setVal back to the "previously" saved amount. So it would start off as var previousVal = ''; and then increment accordingly until the comparison returns true, set the val and return. Demo: http://jsfiddle.net/robschmuecker/wznervgz/1/ $(document).ready(function(){ var previousValue = ''; $("input").keydown(function(){ if($(this).val().split(' ').length &gt;= 10){ alert(); $(this).val(previousVal); return; } previousVal = $(this).val(); }); });
has comment: http://stackoverflow.com/comment/44555304
score: 0

http://stackoverflow.com/comment/44386729
type: QuestionComment
has text: Thank you for your response, yes all included and all working fine .. no errors even for the drop down .. actually the new divs are comming by an ajax call and shown as a popup .. I don't know if this changes any thing.
comment on: http://stackoverflow.com/q/27998522
score: 0
type: Comment

http://stackoverflow.com/comment/44535399
score: 0
type: AnswerComment
has text: I honestly have no idea what any of that means.
comment on: http://stackoverflow.com/a/28075875
type: Comment

http://stackoverflow.com/q/28117991
has body: I am relatively new to JavaScript and trying to get the following achievement. Lets say we have the following data records. Example data records: A_ID_R1_V1 A_ID_R1_V2 A_ID_R2_V1 Basically I am looking for two results: 1.Create a string based on record A_ID_R1_V2. Input = A_ID_R1_V2 Output = A_ID_R1_V3 My thoughts about this is so locate the MAX V&lt;#> for A_ID_R1_ and then add 1. 2.Create a string based on record A_ID_R2_V1. Input = A_ID_R2_V1 Output = A_ID_R3_V1 My thoughts about this is so locate the MAX R&lt;#> for all records and then add 1. Thanks a lot in advance!!!!!!!!
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28118255
has comment: http://stackoverflow.com/comment/44611127
has comment: http://stackoverflow.com/comment/44610483
has comment: http://stackoverflow.com/comment/44611386
has answer: http://stackoverflow.com/a/28118348
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/44610608
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/44610840
score: 0
has comment: http://stackoverflow.com/comment/44610373
has comment: http://stackoverflow.com/comment/44612392
has title: Locating MAX Number in a string for a list of records

http://stackoverflow.com/comment/44610310
has text: I could, but it's currently only simple javascript.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28118110
score: 0

http://stackoverflow.com/a/27994083
answers question: http://stackoverflow.com/q/27993853
downvote count: 0
has body: As commented, you don't appear to have any (many) Id's in your HTML. Body is not an Id, its a tag name. As there should only be one body element in your document its possible to access it using document.getElementsByTagName('body')[0] (the function returns a collection/array of objects, and the [0] returns the first element) You could also add an Id to the element &lt;body id="myBody"&gt; which would allow you to use document.getElementById('myBody')
score: 1
has comment: http://stackoverflow.com/comment/44384681
upvote count: 1
type: Answer

http://stackoverflow.com/comment/44422846
comment on: http://stackoverflow.com/q/28015711
type: QuestionComment
type: Comment
has text: You can't, everything has to be in *one* FormData object
score: 0

http://stackoverflow.com/q/28086937
downvote count: 1
answer count: 1
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28087088
tagged with: methods
has comment: http://stackoverflow.com/comment/44551113
type: Question
has answer: http://stackoverflow.com/a/28087088
has comment: http://stackoverflow.com/comment/44551111
has title: javascript, prototype can't make own method
tagged with: javascript
has comment: http://stackoverflow.com/comment/44551156
tagged with: prototype
score: 0
has comment: http://stackoverflow.com/comment/44551080
has body: I need to get this working, but I dont know why dosent working? Any idea? Thanks for help! (function( window ) { function select( selector ) { return document.querySelectorAll(selector); }; select.prototype.attr = function(atitr) { return this.getAttribute(atitr); }; window.j = select; })( window ); console.log(j('.lol:last-child').attr('href'));
upvote count: 1

http://stackoverflow.com/comment/44448903
type: Comment
has text: @rgs Glad I was able to help you. If this answered your question, you can consider to accept this answer so the question will be marked as closed / solved. In case you don't know how this works and why, just check http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work#answer-5235
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28014240

http://stackoverflow.com/q/28018844
tagged with: javascript
score: -1
has body: This are the rules: Every month have 30 days (including February). Years have 360 days. Here is one example: Initial Date: 2/2/10 End Date: 8/21/12 The calculation of days would be: 2/2/10 to 2/1/11 = 360 days 2/2/11 to 2/1/12 = 360 days 2/2/12 to 8/21/12 = 200 days The last 200 days are calculated the following way: 2/2/12 to 8/1/12 = 180 days (6 months) 8/2/12 to 8/21/12 = 20 days Total would be 920 days Any help would be appreciated and thanks in advance.
has comment: http://stackoverflow.com/comment/44424397
answer count: 2
has answer: http://stackoverflow.com/a/28019309
has comment: http://stackoverflow.com/comment/44426044
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/44425849
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44424280
has answer: http://stackoverflow.com/a/28019820
tagged with: php
tagged with: laravel
upvote count: 0
has comment: http://stackoverflow.com/comment/44424377
type: Question
has title: Calculate number of days between 2 dates with custom rules
has comment: http://stackoverflow.com/comment/44424651
has comment: http://stackoverflow.com/comment/44424318
has comment: http://stackoverflow.com/comment/44424338

http://stackoverflow.com/a/28120019
has body: Why not let jQuery do all of the work for you - this way you can add/remove selections without updating your code: $("#item-upload-form input").on("change", function (ele) { $("#item-upload-form input").each(function( ) { if ($(this).prop('checked')){ $(this).addClass("selected") } else{ $(this).removeClass("selected") ; } }); });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28119361

http://stackoverflow.com/comment/44358401
comment on: http://stackoverflow.com/a/27983447
has text: Might be useful to explain that the result is a `NodeList.prototype` (rather than an `Array.prototype`, and without the array prototype methods) which is why you're using the `forEach` from array.
score: 3
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/114632399
has text: @Ivan what would happen when someone using Chrome on laptop with touchscreen support?
comment on: http://stackoverflow.com/a/28084346
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28022565
has comment: http://stackoverflow.com/comment/44477162
has body: You can do one of the following: 1) Poll the getdata function using a $interval in the service at regular intervals. Then write a watch on the $scope.messages in your controller and the UI will be updated everytime the value changes. 2) Use a websocket to always keep the data real-time. I am not sure this will be the easiest option out there. And might not even be scalable depending on the traffic you are expecting. I would personally go with the first option if you are not fluent at websockets.
has comment: http://stackoverflow.com/comment/44482600
has comment: http://stackoverflow.com/comment/44500396
answers question: http://stackoverflow.com/q/28022380
score: 0
type: Answer

http://stackoverflow.com/a/27993464
score: 0
has body: I'm sure there is a better way to accomplish this goal however this code below does the desired output so I am going with it for now! Might help someone else out as my searches found nothing like this online! &lt;script&gt; $(function () { $('#30daycontainer').highcharts({ chart: { type: 'areaspline' }, title: { text: '30 Day Traffic Stats' }, subtitle: { text: '' }, xAxis: { type: 'datetime' }, yAxis: { allowDecimals: false, title: { text: 'Page Traffic Stats' }, labels: { formatter: function () { return this.value + ' Visitors'; } } }, tooltip: { shared: true, crosshairs: true, }, plotOptions: { area: { stacking: 'percent', lineColor: '#888888', lineWidth: 1, marker: { enabled: false, symbol: 'circle', lineWidth: 2, radius: 4, states: { hover: { enabled: true } } } }, areaspline: { fillOpacity: 0.5 } }, credits: { enabled: false }, series: [{ name: 'Unique Visitors', data: &lt;?php echo $chartData['uniquepageviews']; ?&gt;, pointStart: Date.UTC(&lt;?php echo $chartData['startdate']; ?&gt;), pointInterval: 24 * 3600 * 1000 // one day },{ name: 'Page Views', data: &lt;?php echo $chartData['pageViews']; ?&gt;, pointStart: Date.UTC(&lt;?php echo $chartData['startdate']; ?&gt;), pointInterval: 24 * 3600 * 1000 // one day }, ] }); }); &lt;/script&gt; There is lots of small changes but the biggest change is the xAxis to this... xAxis: { type: 'datetime' }, Also in my Series I have added a pointStart and pointInterval series: [{ name: 'Unique Visitors', data: &lt;?php echo $chartData['uniquepageviews']; ?&gt;, pointStart: Date.UTC(&lt;?php echo $chartData['startdate']; ?&gt;), pointInterval: 24 * 3600 * 1000 // one day },{ name: 'Page Views', data: &lt;?php echo $chartData['pageViews']; ?&gt;, pointStart: Date.UTC(&lt;?php echo $chartData['startdate']; ?&gt;), pointInterval: 24 * 3600 * 1000 // one day }, ]
type: Answer
answers question: http://stackoverflow.com/q/27975480
has comment: http://stackoverflow.com/comment/47652378

http://stackoverflow.com/q/27973132
has title: how to load external file through php
tagged with: curl
tagged with: angularjs
type: UnansweredQuestion
tagged with: php
has body: I am trying to load JS file through curl request and load it in my app. I have something like loadJS.php $c = curl_init('http://partnerSite.com/test.js'); curl_setopt($c, CURLOPT_VERBOSE, 1); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); $jsFile = curl_exec($c); //I have tried this, give me error echo $jsFile; //I have tried this and give me error too. header('Content-Type: application/json'); echo json_encode($jsFile); curl_close($c); In my JS var url = '/loadoutSideJS'; redirect to loadJS.php $http({ url:url, method:'GET', dataType:'json' }).success(function(data) { $.getScript(data); }) I am getting 414 request-url too large error in the console For some reason, the response is treated as plain texts instead of js file. Is there anyway I can make the response treated as JS to load the external JS file? Thanks a lot! Updated loadJS.php $c = curl_init('http://partnerSite.com/test.js'); curl_setopt($c, CURLOPT_VERBOSE, 1); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); $jsFile = curl_exec($c); //I have tried this and give me error too. header('Content-Type: application/javascript'); echo $jsFile; curl_close($c); In my JS var url = '/loadoutSideJS'; redirect to loadJS.php $http({ url:url, method:'GET' }).success(function(data) { $.getScript(data); })
has comment: http://stackoverflow.com/comment/44339039
type: Question
has answer: http://stackoverflow.com/a/27973842
has comment: http://stackoverflow.com/comment/44339206
tagged with: javascript
has comment: http://stackoverflow.com/comment/44340383
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44339269

http://stackoverflow.com/comment/44494015
type: QuestionComment
has text: Any reason why you are doing this via JS instead of CSS `@media` declarations? Is it so that you don't have to scale down your images?
comment on: http://stackoverflow.com/q/28055966
score: 0
type: Comment

http://stackoverflow.com/comment/44590400
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28107624
has text: schema is a JSON object but even if I am assigning JSON.stringify(schema) result is the same. In the console.log results seems to be ok.
score: 0

http://stackoverflow.com/comment/44413083
type: Comment
comment on: http://stackoverflow.com/a/27973446
type: AnswerComment
score: 0
has text: Yes because for some reason if I add two forms for the header (search form) and the body form (login form) it doesn't pass through two tokens so I have one form for one token key but different submit buttons. I would like it to detect which text input type I am using for that specific input text area. Not sure if thats possible...

http://stackoverflow.com/q/28051857
tagged with: cookies
has body: I'm trying to build a flyout cart menu that stays open after a page refresh on a button click and form submit. After a few seconds and after the page refresh the flyout menu needs to be closed automatically. I'm using a jquery cookie and a toggleClass for this. I'm facing two problems: 1) How to remove the class after x seconds 2) When I click the button twice then the menu goes back to it's normal state which is hidden. What I have is this: &lt;li class="cart-top"&gt; &lt;ul&gt;....&lt;/ul&gt; &lt;/li&gt; $(document).ready(function() { var cart_class = $.cookie('cart_class'); if(cart_class) { $('.cart-top').attr('class', cart_class); } }); $(".pp .addToCart").on("click", function(e){ e.preventDefault(); var $form = $(this).closest('form'); var qty = $('.qty_input input').val(); var variant = $('#product_configure_variants').val(); $.ajax({ type: $form.attr('method'), url: $form.attr('action')+variant+'/?quantity='+qty, data: $form.serialize(), success: function(data, status){ if(status == 'success'){ // refresh the page setTimeout(function(){ location.reload(); },200); // add class back to the menu $(".cart-top").toggleClass("hover"); $.cookie('cart_class', $('.cart-top').attr('class')); // remove the class after 2 seconds setTimeout(function(){ $('.cart-top').removeClass('hover'); },2000); } } }); return false; }); I really can't see what I'm doing wrong except for using setTimeout twice. I've read numerous post on this but none is really dealing with some sort of same problem. Any help greatly appreciated!
type: Question
has comment: http://stackoverflow.com/comment/44490894
has comment: http://stackoverflow.com/comment/44486407
tagged with: javascript
tagged with: jquery
has title: Toggle class after timeout with cookie
score: 0
has comment: http://stackoverflow.com/comment/44486284
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44485966
answer count: 0

http://stackoverflow.com/comment/44474033
comment on: http://stackoverflow.com/q/28045760
type: Comment
type: QuestionComment
score: 0
has text: jQuery does not have a collapse by it's self. What libraries are you using? Can we have some more context?

http://stackoverflow.com/a/27965828
type: Answer
answers question: http://stackoverflow.com/q/27965262
accepted answer of: http://stackoverflow.com/q/27965262
downvote count: 0
score: 3
has body: You must defined a new dataFilter by extending summColumn like this: webix.ui.datafilter.countColumn = webix.extend({ refresh: function (master, node, value) { var result = 0; master.mapCells(null, value.columnId, null, 1, function (value) { result++; return value; }); node.firstChild.innerHTML = result; } }, webix.ui.datafilter.summColumn);
type: AcceptedAnswer
upvote count: 3

http://stackoverflow.com/q/28037647
downvote count: 0
answer count: 1
tagged with: child-process
favorite count: 0
has body: Let's say I have a parent.js containing a method named parent var childProcess = require('child_process'); var options = { someData: {a:1, b:2, c:3}, asyncFn: function (data, callback) { /*do other async stuff here*/ } }; function Parent(options, callback) { var child = childProcess.fork('./child'); child.send({ method: method, options: options }); child.on('message', function(data){ callback(data,err, data,result); child.kill(); }); } Meanwhile in child.js process.on('message', function(data){ var method = data.method; var options = data.options; var someData = options.someData; var asyncFn = options.asyncFn; // asyncFn is undefined at here asyncFn(someData, function(err, result){ process.send({ err: err, result: result }); }); }); I was wondering if passing functions to child process is not allowed in Node.js. Why would asyncFn become undefined after it is sent to the child? Is it related to JSON.stringify?
accepted answer: http://stackoverflow.com/a/28037891
tagged with: node.js
type: AnsweredQuestion
type: Question
upvote count: 12
tagged with: javascript
score: 12
has title: How to pass function/callback to child process in Node.js?
has answer: http://stackoverflow.com/a/28037891

http://stackoverflow.com/q/28045953
has comment: http://stackoverflow.com/comment/44474510
type: UnansweredQuestion
has title: Save an image on my server with javascript, jsp, html, java
linked to: http://stackoverflow.com/q/5882005
answer count: 0
score: 0
tagged with: java
type: Question
tagged with: google-visualization
tagged with: jsp
tagged with: javascript
has body: I really need your help for saving a simple image generate with google charts on my server for using it on a PDF export. My PDF export already works but I cant put my image in it. For the creation of my image I use it : function drawChart() { var dataAge = google.visualization.arrayToDataTable([ //Table data ['Tranche âge', 'Population'], //Column name ['Moins de 15 ans', &lt;fmt:formatNumber value="${p_0015}" maxFractionDigits="0" groupingUsed="false" /&gt;], ['De 15 à 19 ans', &lt;fmt:formatNumber value="${p_1519}" maxFractionDigits="0" groupingUsed="false" /&gt;], ]); var optionsAge = { //Table options title: 'Répartition de la population selon son âge', width:600, height:300, }; google.visualization.events.addListener(chart, 'ready', function () { chart_div.innerHTML = '&lt;img src="' + chart.getImageURI() + '"&gt;'; console.log(chart_div.innerHTML); }); chart.draw(dataAge, optionsAge); } And for show it, I just have to use this : &lt;div id='chart_div'&gt;&lt;/div&gt; I just want to save the image who's created by that div on my server (in a temporary folder who is deleted ) for using it. I can use javascript, java, or html. Thanks for your help :)
has comment: http://stackoverflow.com/comment/44474361
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/27964848
downvote count: 0
has comment: http://stackoverflow.com/comment/44324416
has comment: http://stackoverflow.com/comment/44324208
score: 2
has comment: http://stackoverflow.com/comment/44324259
has comment: http://stackoverflow.com/comment/44324106
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44324338
accepted answer of: http://stackoverflow.com/q/27964617
answers question: http://stackoverflow.com/q/27964617
has body: Here you go: http://jsfiddle.net/andunai/0ardb3u0/41/ (I've commented out all your code as a reference, the new code is at the bottom of fiddle.) You are right: the approach here is to actually create 2 absolute divs and to move them according to hovered cell. For the animation we can use CSS transition property here: transition: all 0.1s linear ...so that when we do $(...).css(...) changing its width, height, top and bottom, properties are transitioned smoothly from old value to new one. You can still use jQuery's $.animate() method for the animation, but CSS transitions are basically much more faster and smoother. Also, note that I've used $(...).outerWidth(...) instead of width(...) to properly resize cells. One more thing: note this CSS line - pointer-events: none; It is very important because it makes the crosshair divs 'transparent' for mouse events, meaning actual clicks will go "through" them and will be captured by appropriate td element. Enjoy!
type: Answer
has comment: http://stackoverflow.com/comment/44323903

http://stackoverflow.com/a/28088801
type: Answer
answers question: http://stackoverflow.com/q/28088541
accepted answer of: http://stackoverflow.com/q/28088541
score: 0
has comment: http://stackoverflow.com/comment/44554981
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44555000
has body: This error is almost always related to the fact, that your controller is in some module which is not part of the root module named in ng-app, or the .js containing it (controller) is not loaded. Here I've taken your snippets - and they are working as they are: http://plnkr.co/edit/WUeFelbaMrrRebQZjpWg?p=info The only extend with ng-app like this: &lt;!DOCTYPE html&gt; &lt;html ng-app="store"&gt; &lt;head&gt;...&lt;/head&gt; &lt;body ng-controller="StoreController as store"&gt; ...
has comment: http://stackoverflow.com/comment/44555066

http://stackoverflow.com/comment/44405838
comment on: http://stackoverflow.com/a/28008937
has text: Returning item alone gives me [object Object] (as expected); returning item.url or item.Location gives me undefined. In Postman the location in the header comes back as http://localhost/api/user?id=24
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28072196
tagged with: javascript
answer count: 6
tagged with: jquery
has comment: http://stackoverflow.com/comment/67884728
score: 22
has comment: http://stackoverflow.com/comment/44526021
has answer: http://stackoverflow.com/a/28073460
has answer: http://stackoverflow.com/a/28073494
downvote count: 0
has body: i would like to ask how to make a button but when the mouse is on the button (hover),the new button is displayed above the previous button... and it's in react.js.. thx this is the way of my code.. var Category = React.createClass({displayName: 'Category', render: function () { return ( React.createElement("div", {className: "row"}, React.createElement("button", null, "Search", {OnMouseEnter://I have no idea until here}) ) ); } }); React.render(React.createElement(Category), contain);
has comment: http://stackoverflow.com/comment/44525966
favorite count: 0
has title: a hover button in react.js
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/44523936
has answer: http://stackoverflow.com/a/37904335
has answer: http://stackoverflow.com/a/69840808
type: Question
upvote count: 22
tagged with: reactjs
has answer: http://stackoverflow.com/a/73489328
has answer: http://stackoverflow.com/a/70671586

http://stackoverflow.com/q/28026521
tagged with: javascript
has body: I m actually trying to use ReactJs that I find really fun and giving me a new way to approach my View problems. But I m facing a problem when trying to delete an item in a child component : I have a parent component in which I initialize a list I pass this list to my child component which has to list it between '' tag I want to delete an item in this child with a button but I cant access the parent.state and so, I cant delete it (unidirectional binding with props) How can I do to make it work properly ? This is my code : MyDirective = React.createClass({ getInitialState: function () { toReturn = {} toReturn.text = 'Hi'; toReturn.stringList = [ {id: 1, value: 'value 1'}, {id: 2, value: 'value 2'}, {id: 3, value: 'value 3'} ]; return toReturn; }, handleChange: function (event) { this.setState({text: event.target.value}); }, handleKeypress: function (e) { var code = (e.keyCode ? e.keyCode : e.which); if (code === 13) { this.setState({stringList: this.state.stringList.concat([ {id: this.state.stringList.length + 1, value: this.state.text} ])}) } }, render: function () { return ( {this.state.text} <Listing stringList={this.state.stringList} /> ); } }); Listing = React.createClass({ handleClick: function (item) { // I cant modify my state there :-/ }, render: function () { return( { this.props.stringList.map(function (item) { return( {item.value} -> Delete ); }.bind(this)) } ); } }); React.render( <MyDirective text=""/>, document.getElementById('container') );
score: 0
accepted answer: http://stackoverflow.com/a/28026603
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28026603
type: Question
has title: ReactJS, deleting an item in parent.state in a child
tagged with: reactjs
answer count: 1

http://stackoverflow.com/q/28035898
has comment: http://stackoverflow.com/comment/44457970
tagged with: canvas
has comment: http://stackoverflow.com/comment/44457606
tagged with: project
tagged with: javascript
type: UnansweredQuestion
has title: Paperscope and paperjs
has answer: http://stackoverflow.com/a/28055574
linked to: http://stackoverflow.com/q/24439046
has comment: http://stackoverflow.com/comment/44457843
has comment: http://stackoverflow.com/comment/44457825
score: 1
tagged with: paperjs
favorite count: 0
has body: So I am trying to create a project with two canvas elements, each with its own paperscript, and with buttons on the outside of each that control certain functions within both. Under the documentation under Paperscript, it says: Please note: When including more than one PaperScript in a page, each script will run >in its own scope and will not see the objects and functions declared in >the others. For PaperScript to communicate with other PaperScript or >JavaScript code, see the tutorial about PaperScript Interoperability. ... which is unfortunate because that tutorial reads as follows: Coming very soon! I've gotten stuck very quickly in this process. I've tried putting functions in global scope, calling them from outside their canvas, and seeing them print on the wrong canvas. I've tried exporting functions via a module and it seems to run the function (?!?!). And worst, the 'paper.projects' object is an array with one(!) project in it, the first canvas. So I'm stumped. Anyone know how to do this? EDIT: So apparently there is this answer but I don't see how that gets me being able to call functions in the PaperScript scope from global scope scripts. That just seems like a script to call global functions in the PaperScope, which doesn't work for me if I'm trying to make outside buttons do things. Clearly I'm missing something. SECOND EDIT: I have played around with various global functions, either in window.global or just sitting by themselves with no var declaration... but what seems to happen is that when I try to call a function which I have defined, say as: globals.makecircle = function () { var o = new Path.Circle({ radius: 50, center: new Point (200,200) }) } in the main scope, it will just as soon run in the wrong window as the correct window. Also there is an incredible delay before it runs which I can't figure out. THIRD EDIT: For clarity. I have firstcanvas.js attached to canvas1 in my HTML, I have secondcanvas.js attached to canvas2. Both are referenced as…
type: Question
upvote count: 2
answer count: 1
downvote count: 1

http://stackoverflow.com/q/27979606
upvote count: 3
has comment: http://stackoverflow.com/comment/44350918
type: Question
tagged with: internet-explorer
tagged with: javascript
linked to: http://stackoverflow.com/q/5684303
has comment: http://stackoverflow.com/comment/44350852
has answer: http://stackoverflow.com/a/27979744
has title: IE : window.open url which is more than 2,083 characters
has body: I am getting a url from server with lot of data as query string (E.g. http://www.test.com/?n=1,2,3,4,5,6,7,8.....100000) and I want to open it using window.open(). But the moment I pass the URL to window.open the url which gets gets truncated. After searching for sometime I could figure out that the maximum limit for URL is 2,083 characters(IE) so it passes PART of query string and truncates the rest.. How can I overcome this? Please let me know if I need to provide more details.
answer count: 3
has comment: http://stackoverflow.com/comment/44350887
tagged with: url
downvote count: 0
linked to: http://stackoverflow.com/q/3721034
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28297121
has answer: http://stackoverflow.com/a/27979755
score: 3

http://stackoverflow.com/q/28012211
tagged with: objective-c
tagged with: uiwebview
favorite count: 0
type: UnansweredQuestion
has title: How to enable JavaScript in UIWebview
downvote count: 0
score: 1
type: Question
has body: I am using the UIWebview (IOS) to load my webview. A page of my site has a link like that: このサービスを利用する When I clicked this link it showed log: NSURLErrorDomain error -999 and let me open the link with Safari browser. When I view web with Webview (Android). It's OK. Is it the reason that I don't enable JavaScript on IOS UIWebview like Android. If yes, how can I enable it?
tagged with: ios
tagged with: javascript
has answer: http://stackoverflow.com/a/28012442
upvote count: 1
answer count: 1

http://stackoverflow.com/a/28017147
has comment: http://stackoverflow.com/comment/44421884
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/44421739
has body: In order to give a better structure, and bind a this reference, you can start defining a constructor function: function PointTextContent(name) { this.position = function () { return this.previousSibling.position; }.bind(this); this.content = function () { return this.previousSibling.length.toString(); }.bind(this); this.name = name; PointText.call(this, this); } PointTextContent.prototype = PointText; Then change your code to instantiate your new object. edge = new Group({ children: [ new Path.Line({ from: gn.position, to: event.point, strokeColor: 'maroon', name: 'line' }), new PointTextContent('weight') ] }); NOTE: I changed position and content to become functions, I see they were immediately invoked in your original code.
answers question: http://stackoverflow.com/q/28016966
has comment: http://stackoverflow.com/comment/44421766
has comment: http://stackoverflow.com/comment/44421576
downvote count: 0
has comment: http://stackoverflow.com/comment/44421781
has comment: http://stackoverflow.com/comment/44422899
has comment: http://stackoverflow.com/comment/44421539
has comment: http://stackoverflow.com/comment/44421847
score: 2

http://stackoverflow.com/a/28085890
downvote count: 1
score: -1
has body: try this $(document).on("dblclick",".available-option", function (){ //code here }); or you can do this : $(document).on("dblclick",".available-option", myfunction); function myfunction(){ //code here }
upvote count: 0
answers question: http://stackoverflow.com/q/28085662
has comment: http://stackoverflow.com/comment/44549518
type: Answer

http://stackoverflow.com/q/28025392
score: 1
has comment: http://stackoverflow.com/comment/44437647
has title: AngularJS bootstrap-ui tabs pulling in local html content
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/28026236
downvote count: 0
tagged with: javascript
tagged with: angular-ui-bootstrap
possible better answer: http://stackoverflow.com/a/28025665
has body: I have set up a simple application and I want to pull in, for now, a local html file as the content of each tab. I also only want the 'apple' content to be displayed under the 'Apple' tab and the same for pear keeping my html as simple as possible as in the future more fruits could be added. Please see the plunker for my current configuration: http://plnkr.co/edit/Y6Ey8vbvrq3xzvBhJS7o?p=preview {{tab.title}} {{item[tab.title]}} Loading... My question is, can you help me identify how to only pull in the specific content for each tab that is part of one html file?
has comment: http://stackoverflow.com/comment/44436780
has answer: http://stackoverflow.com/a/28025665
has comment: http://stackoverflow.com/comment/44437434
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/28026236
upvote count: 1
has comment: http://stackoverflow.com/comment/44436549
type: AnsweredQuestion

http://stackoverflow.com/comment/44455503
type: Comment
has text: @PSL thanks for the link, I understand this will actually force the form to be in invalid state as well.
type: AnswerComment
comment on: http://stackoverflow.com/a/28034306
score: 0

http://stackoverflow.com/q/28047351
accepted answer: http://stackoverflow.com/a/28047538
has comment: http://stackoverflow.com/comment/44476989
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44478836
score: 1
possible better answer: http://stackoverflow.com/a/28047468
answer count: 3
has answer: http://stackoverflow.com/a/28047538
has answer: http://stackoverflow.com/a/28047468
downvote count: 0
tagged with: javascript
has title: assignning constructor function to a variable. - why doesn't this code work, using firefox console
favorite count: 0
has answer: http://stackoverflow.com/a/28047448
has body: By assigning the constructor function to a variable, I can't instantiate the object using the function itself. Whynot ? This works : function Car() { this.j = 'j' } var car = new Car(); This doesn't work : var io = function Car() { this.j = 'j' } var car = new Car();
type: AnsweredQuestion

http://stackoverflow.com/q/28073059
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44525508
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Javascript working on second button click instead of first
accepted answer: http://stackoverflow.com/a/28073191
tagged with: css
has comment: http://stackoverflow.com/comment/44526301
type: AnsweredQuestion
has body: I have a table that I am trying to display and activate form information in on a button click. The table is set to "display: none" and the button is connected to the javascript. The javascript works but only after the button has been clicked a second time. I would like for it to work the first time it is clicked. Button & Table HTML: Add Patient First Name Last Name Delete This is the table CSS: #newPatientForm { display: none; } This is the javascript that the button calls. self.addPatient = function () { var divElement = document.getElementById('newPatientForm'); var patient = new PatientViewModel({ SiteId: 0, FirstName: "", LastName: "", ObjectState: ObjectState.Added }); if (divElement.style.display == 'none') { divElement.style.display = 'block'; self.Patients.push(patient); } else { divElement.style.display = 'none'; self.Patients.pop(patient); } },
has answer: http://stackoverflow.com/a/28073191

http://stackoverflow.com/a/28016369
has body: I made a JSFiddle with a basic example of what you are asking. HTML &lt;div id="myDiagram"&gt;&lt;/div&gt; CSS #myDiagram{ width:200px; height:200px; } You must assign a width and height to the Diagram or it will not show up. JavaScript var $ = go.GraphObject.make; var myDiagram = $(go.Diagram, "myDiagram", { initialContentAlignment: go.Spot.Center, "undoManager.isEnabled": true }); myDiagram.addDiagramListener("ObjectDoubleClicked", function (ev) { console.log(ev.subject); //Successfully logs the node you clicked. console.log(ev.subject.ie); //Successfully logs the node's name. }); //(...) I've skipped the key adding, because it's not necessary to understand this code. Most of the code is taken from the go.js Diagram class and go.js DiagramEvent class documentation. Hope it's what you wanted!
type: Answer
accepted answer of: http://stackoverflow.com/q/28016257
answers question: http://stackoverflow.com/q/28016257
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/28070525
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44526102
has comment: http://stackoverflow.com/comment/44523811
answers question: http://stackoverflow.com/q/28070391
has comment: http://stackoverflow.com/comment/44523154
has comment: http://stackoverflow.com/comment/44521081
has comment: http://stackoverflow.com/comment/44521160
accepted answer of: http://stackoverflow.com/q/28070391
upvote count: 1
type: AcceptedAnswer
has body: Something like this should do the trick: $(function(){ function credit (selector) { $(selector).each(function () { var total = 0, formattedTotal, numCredit, strCredit column = $(this).siblings(selector).andSelf().index(this); $(this).parents().prevUntil(':has(' + selector + ')').each(function () { strCredit = $('td.credit:eq(' + column + ')', this).html() || ""; console.log(strCredit); numCredit = Number(strCredit.replace(/[^0-9\.]+/g,"")); console.log(numCredit); total += parseFloat(numCredit) || 0; }) formattedTotal = total.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&amp;,'); $(this).html('$'+formattedTotal); }); } credit('td.creditsubtotal'); credit('td.credittotal'); }); JSFiddle
has comment: http://stackoverflow.com/comment/44524295
type: Answer

http://stackoverflow.com/comment/50402086
comment on: http://stackoverflow.com/a/28184050
type: Comment
has text: @kernel, arrows shipping implies that their implementation has been completed, so the issue no longer exists.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/44454045
type: Comment
has text: that's not working I don't want to remove every li under action list ul
comment on: http://stackoverflow.com/a/28022683
score: 0
type: AnswerComment

http://stackoverflow.com/q/27993968
has title: jQuery selectors not working with added class
type: Question
has comment: http://stackoverflow.com/comment/44378812
answer count: 2
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27993996
accepted answer: http://stackoverflow.com/a/27994049
has answer: http://stackoverflow.com/a/27993996
score: 0
tagged with: jquery-selectors
tagged with: http://stackoverflow.com/tag/html
has body: I'm working on a php/jQuery store and have run into the following problem: I have a few div boxes as articles and as soon as a box is clicked, it is moved into the shopping cart and therefore has to become inactive. That's my code so far: $( ".artbox" ).not( ".inactive" ).on('click', function(){ $(this).addClass("inactive"); $(this).find("#artbox").addClass("inactive") }) It adds the class .inactive to two div objects, which are positioned inside each other. The rest of this function is left out here to keep it short. The problem is that while the according styles for .inactive are applied, I can still click on the box again and again and the function will be called again and again (although I have added the .not() selector) which results in having this specific article in the shopping cart multiple times - and this is what I would like to prevent. If I reload the page manually everything is fine and this $( ".artbox.inactive" ).on('click', function(){ $(this).effect( "shake", {distance:1}); }) works, too (it doesn't for the items added without reloading). But I am looking for a solution that works without reloading because I am displaying a popup window with a sucess message after the item was added to the cart. JSFiddle I've tried this here https://stackoverflow.com/a/12202186/2842292 but unfortunatly can't get it to work in my example. Thanks in advance!
linked to: http://stackoverflow.com/q/12202114
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27994049

asp.net-mvc
tags question: http://stackoverflow.com/q/28092910
tags question: http://stackoverflow.com/q/28080957
tags question: http://stackoverflow.com/q/28072344
tags question: http://stackoverflow.com/q/28030091
tags question: http://stackoverflow.com/q/28010216
tags question: http://stackoverflow.com/q/28058616
tags question: http://stackoverflow.com/q/28036939
tags question: http://stackoverflow.com/q/27971546
tags question: http://stackoverflow.com/q/28066979
tags question: http://stackoverflow.com/q/28118877
tags question: http://stackoverflow.com/q/27991361
tags question: http://stackoverflow.com/q/28008397
tags question: http://stackoverflow.com/q/27971428
tags question: http://stackoverflow.com/q/28045826
tags question: http://stackoverflow.com/q/28051494
tags question: http://stackoverflow.com/q/27977434
tags question: http://stackoverflow.com/q/28076184
tags question: http://stackoverflow.com/q/28094418
tags question: http://stackoverflow.com/q/27990917
tags question: http://stackoverflow.com/q/28029677
tags question: http://stackoverflow.com/q/28117094
tags question: http://stackoverflow.com/q/27996517
tags question: http://stackoverflow.com/q/28062828
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/28023849
tags question: http://stackoverflow.com/q/28005371
tags question: http://stackoverflow.com/q/28101693
tags question: http://stackoverflow.com/q/27997837
tags question: http://stackoverflow.com/q/27992615
tags question: http://stackoverflow.com/q/28059860
tags question: http://stackoverflow.com/q/28096442
tags question: http://stackoverflow.com/q/28005503
tags question: http://stackoverflow.com/q/28089022
tags question: http://stackoverflow.com/q/28116234
tags question: http://stackoverflow.com/q/28026426
type: Tag
tags question: http://stackoverflow.com/q/28055914
tags question: http://stackoverflow.com/q/28054126
tags question: http://stackoverflow.com/q/28101479
tags question: http://stackoverflow.com/q/27985387
tags question: http://stackoverflow.com/q/28009357
tags question: http://stackoverflow.com/q/27989347
tags question: http://stackoverflow.com/q/28067475

http://stackoverflow.com/a/28070540
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28069242
type: Answer
has comment: http://stackoverflow.com/comment/44522107
has comment: http://stackoverflow.com/comment/44521688
upvote count: 1
has body: According to Google Maps API doc calling setMap only remove the marker from the map but not delete it. If you want to delete multiple markers, you could do as in Google Maps API example given : 1/ When adding a marker, pushing it in an array 2/ To remove all markers : create a function that takes this array as an argument, and apply setMap() on each of the array's element through a for loop. 3/ To delete all markers (i.e from memory) after remove : create a function to call setMap(null) on each marker in your array (which according to Google delete the marker) and delete all the markers from your array (e.g. markersArray = []) You can find corresponding google example code in my second reference.
score: 1
answers question: http://stackoverflow.com/q/28069242

http://stackoverflow.com/q/27992617
accepted answer: http://stackoverflow.com/a/28706058
tagged with: percentage
has title: How to calculate pixels into percentage?
tagged with: javascript
has body: var helperPos_x = $('.helper').offset().left; $('.box').css('left', helperPos_x + helper_width + 'px'); I got this code above but it sets the value in pixels so .helper width should also be in pixels to accomplish this. How can I turn helperPos_x value into percentage? Is it possible at all? Any ideas about this?
score: 2
type: AnsweredQuestion
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: Question
tagged with: offset
has answer: http://stackoverflow.com/a/28706058
upvote count: 2

angular-strap
tag name: angular-strap
tags question: http://stackoverflow.com/q/27989904
type: Tag

http://stackoverflow.com/q/28026272
answer count: 2
has comment: http://stackoverflow.com/comment/44437896
has body: I'm need some help figuring out how to get back data from the second ajax call, not the first. I have this method that calls my ajax calls var projectWithIssues = getProjects().done(function(result) { .... } When I look at the results from this, I get back the results on my first ajax call(getEnt_PodType().done()). I want to get the results from the second ajax call within getProjects(). I understand the reason I'm getting the first results back is because I have the return on the first ajax call. However, If I don't have a return there. I get a undefined on the line above. How can I return the data from the second call? function getEnt_PodType() { var ent_PodType; var oDataUrl = //URL to my data; return $.ajax({ url: oDataUrl, type: "GET", async: true, beforeSend: function (xhr) { xhr.setRequestHeader("ACCEPT", accept); }, success: function (xhr, textStatus) { } }); } function getProjects() { return getEnt_PodType().done(function (res) { var ent_PodType; if (res.d.results != undefined) { ent_PodType = res.d.results[0].Ent_PodType; } console.log("The ent pod type value is " + ent_PodType); var QUERY_FILTER = "$filter=Ent_PodType eq '" + ent_PodType + "'"; var url = restUrl + QUERY_FILTER; // I want to return the results from this ajax call $.ajax({ url: url, type: "GET", async: true, beforeSend: function (xhr) { xhr.setRequestHeader("ACCEPT", accept); }, success: function (xhr, textStatus) { //projects = parseODataResultTest(xhr); //return projects; } }); }); } Thanks in advance!
upvote count: 1
has title: Get data back from ajax call within ajax call
has answer: http://stackoverflow.com/a/28027367
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/28027367
possible better answer: http://stackoverflow.com/a/28027167
type: Question
has answer: http://stackoverflow.com/a/28027167

http://stackoverflow.com/comment/44420994
type: Comment
has text: Curious - just did some research into cron, which I admit I know nothing about. I'm not sure at this point if my client's server allows the use of cron but I did read that wordpress has a psuedo-cron system. The client's site is built with wordpress- does that add any options to my challenge?
type: AnswerComment
comment on: http://stackoverflow.com/a/28014481
score: 0

http://stackoverflow.com/a/28088860
has body: you are creating cloneNode only once thats why this is happening. use this code : var myDiv = document.getElementById("test"); var divClone; for(var i=0;i&lt;10;i++) { divClone = myDiv.cloneNode(true); // the true is for deep cloning document.body.appendChild(divClone); }
score: 1
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28088724

http://stackoverflow.com/q/28017763
accepted answer: http://stackoverflow.com/a/28126952
answer count: 1
tagged with: cordova
tagged with: pull-to-refresh
type: AnsweredQuestion
has title: Pull to refresh :Touch when scroll is in progress sets scrollbar to bottom of page
has answer: http://stackoverflow.com/a/28126952
type: Question
tagged with: iscroll
has body: I am building a cordova app which has pull to refresh functionality. Pull to refresh and other things are working fine. However, when scrolling is in progress and user touches the screen, scroll bar reaches to bottom of page. I tried debugging it but could not reach to the cause. Surprising fact is, this issue is there on the demo of iscroll as well and I wonder no one has noticed it till now. iscoll demo link : http://cubiq.org/dropbox/iscroll4/examples/pull-to-refresh/ if you tap/touch the screen when scrolling is in progress, it goes to bottom of page. Ideally it should stop scrolling. Please help.
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/44589949
score: 0
type: AnswerComment
type: Comment
has text: Are you sure that the OP is allowed or able to use Jquery?
comment on: http://stackoverflow.com/a/28107789

http://stackoverflow.com/comment/44353019
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27978847
has text: @VeldMuijz thanks for your reply I did that but still doesn't works same error within chrome console. Can u plz tell me the order of jquery is appropriate or not. Thanks

http://stackoverflow.com/a/28002145
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27990454
answers question: http://stackoverflow.com/q/27990454
type: AcceptedAnswer
has body: it happens because you are creating the dialog on every click and after it you are making the .append You can make the append before create the dialog: $(function() { //Button function $("#button").click(function(){ $(' Imageselected ').append(' ').append($(this).html()).dialog({ resizable:false, buttons: {"Enrol": function(){ $(this).dialog('close'); }, "CancelEnrol": function() { $(this).dialog('close'); } } }); }); }); the fiddle: http://jsfiddle.net/nfhLjkv7/ If you does not need create the dialog on every click , just open the dialog on the click function

http://stackoverflow.com/q/28015013
score: -1
has comment: http://stackoverflow.com/comment/44417360
type: UnansweredQuestion
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/44417334
has body: I have a code which creates table with php (10x10) and each cell has a number from 1-100. I am trying to create ajax call which shows number of a cell in textarea. But in textarea there is full html code instead of number. This is my ajax call: $('td').click(function () { var name_val = parseInt($(this).text()); $.ajax({ type: "GET", url: "find.php", data: { name: name_val }, success: function (response){ $("textarea#tekst").val(response); } }); $(this).css("background-color", "red"); $(this).addClass("ajaxTest"); });
has comment: http://stackoverflow.com/comment/44417249
has title: AJAX call returns html code in textarea
has comment: http://stackoverflow.com/comment/44417271
type: Question
has comment: http://stackoverflow.com/comment/44417675
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/44417267
has comment: http://stackoverflow.com/comment/44417812
has answer: http://stackoverflow.com/a/28015288
has comment: http://stackoverflow.com/comment/44417719
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44417531

gmail
type: Tag
tags question: http://stackoverflow.com/q/28030870
tags question: http://stackoverflow.com/q/28064846
tag name: gmail
tags question: http://stackoverflow.com/q/28046111
tags question: http://stackoverflow.com/q/27984954

http://stackoverflow.com/a/28072316
answers question: http://stackoverflow.com/q/28072095
accepted answer of: http://stackoverflow.com/q/28072095
has body: In your Controller: $scope.columns = new Array(10); $scope.rows = new Array(10); The you could also do this in a function like : $scope.setSizeOf(column, rows){ $scope.columns = new Array(column); $scope.rows = new Array(rows); }
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/65373542
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28048696
has text: How to install the `notify`?
score: 0

http://stackoverflow.com/comment/44596928
type: Comment
type: QuestionComment
has text: ok! I will get files by $_FILES["media"] in upload.php but I don't Know how to send by $(ajax)
score: 0
comment on: http://stackoverflow.com/q/28111570

http://stackoverflow.com/comment/44370542
type: QuestionComment
comment on: http://stackoverflow.com/q/27989504
score: 0
has text: Is there any reason you are using inline JS and `.attr()` to bind event handler? Using jQuery's `.click()` would be a good place to start.
type: Comment

command
tags question: http://stackoverflow.com/q/28094965
tag name: command
type: Tag

http://stackoverflow.com/a/28006557
has body: Double Check this: if( document.body &amp;&amp; ( document.body.scrollTop ) ) It doesn't make any sense to me. document.body won't return a true/false value, and neither will document.body.scrollTop. Try changing it to a comparison of two like values. If you set it to: var get_scroll = function(){ y = 0; if( 1==1 ) { y = document.body.scrollTop; } return y; }; It should work.
score: 0
answers question: http://stackoverflow.com/q/28006499
type: Answer

http://stackoverflow.com/comment/44559080
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28091052
type: Comment
has text: But, it print out the whole thing ` 410 Walker Street Lowell MA 01851 ` I don't want that.

http://stackoverflow.com/q/27980115
tagged with: canvas
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44352031
accepted answer: http://stackoverflow.com/a/27980378
has body: i Have Canvas A and Canvas B and want to move star object from Canvas A and place it on Canvas B. Is it possible? if yes how can i do it ? for more understanding look picture below
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has title: Move object from one canvas to another
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27980378
has comment: http://stackoverflow.com/comment/44352270
score: 1
tagged with: fabricjs
type: Question
has comment: http://stackoverflow.com/comment/44351836

http://stackoverflow.com/comment/44434457
type: Comment
has text: That's right yes. If you want, you can extract this function into its own named function somewhere, and then just call it on click for each button with your new image path as an argument.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28011145

http://stackoverflow.com/q/28045445
tagged with: quicktime
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/28568546
downvote count: 0
tagged with: javascript
tagged with: lossless-compression
favorite count: 0
has title: QuickTime Plugin not playing M4A (Apple Lossless Audio) Files
tagged with: plugins
has body: I'm using the Quicktime via the QT_GenerateOBJECTText_XHTML JavaScript call to a QT player which is controlled via the JS API. For some reason, MP3 files are beeing played just fine, but Apple Lossless (16 and 24 bit) files seem to be playing correctly (player is initalised and JS calls renturen correct values, e.g. GetDuration() returns the curret song lenght), but no sound is playing. Every other file type works just fine. This is true for Windows 8.1 with QT 7.7.6 and OS X 10.10 with QT 10.4 Dose anyone have an idea what is going on here and how to fix this? Here is the test code I'm woring with. Test files can be downloaded at http://www.linnrecords.com/linn-downloads-testfiles.aspx for example. TODO supply a title

http://stackoverflow.com/comment/44451492
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27998852
has text: locate your problem by using one upload method each time (html5, flash etc.)

http://stackoverflow.com/q/28115050
has title: Salvattore plugin ignores divs with display: none;
upvote count: 1
has body: I am using http://salvattore.com to create a tiled grid layout. Everything works fine until I use the plugin inside a div that is displayed: none; The plugin will completely ignore it, it will also cause problems on Safari and break the website as it shows an error related to :before and :after not found "which what the plugin uses". Is there a workaround? to make the plugin work on div's that are not displayed yet? I have put together testing site here: http://loai.directory/beta As you will see there are two .grid div's one is shown by default and the other one is hidden. The reason I need that div hidden is because I want to use it as a popup, so it will only show when triggered.
favorite count: 0
has comment: http://stackoverflow.com/comment/44605738
answer count: 0
type: UnansweredQuestion
tagged with: css
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44605614
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/28096753
has comment: http://stackoverflow.com/comment/44577974
type: Answer
has comment: http://stackoverflow.com/comment/44577675
has comment: http://stackoverflow.com/comment/44576061
has comment: http://stackoverflow.com/comment/44576131
has comment: http://stackoverflow.com/comment/44577948
accepted answer of: http://stackoverflow.com/q/28096653
upvote count: 15
has comment: http://stackoverflow.com/comment/44577979
answers question: http://stackoverflow.com/q/28096653
downvote count: 0
score: 15
has comment: http://stackoverflow.com/comment/44577899
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44576029
has comment: http://stackoverflow.com/comment/44577715
has comment: http://stackoverflow.com/comment/44577807
has body: It becomes an invalid expression with the usage of interpolation with ng-model expression. You need to provide a property name there. Instead you can use an object and use bracket notation. i.e in your controller: $scope.interpretation = {}; and in your view use it as: ng-model="interpretation[$index + 1]" Demo angular.module('app', []).controller('ctrl', function($scope) { $scope.interpretation = {}; $scope.actions = {}; }); {{interpretation}} {{actions}} Imagine that you are in a health care facility. Exactly what do you think this symbol means? What action you would take in response to this symbol?

http://stackoverflow.com/a/28091709
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44560129
has comment: http://stackoverflow.com/comment/44561034
has body: Try this format: data: { inst_id: inst_id, custid: custid, invid: invid }, You can post a JSON object to the server so long as you serialize it and then let the server know the data type. First you need to define your JSON object: var postData = { inst_id: inst_id, custid: custid, invid: invid }; Then update your ajax to use the serialized version of that object and let the server know the data type: $.ajax({ type: "POST", url: "fetch_inst.php", data: JSON.stringify(postData), contentType: "application/json", ..continue the rest of your ajax....
type: Answer
has comment: http://stackoverflow.com/comment/44561301
has comment: http://stackoverflow.com/comment/44563035
has comment: http://stackoverflow.com/comment/44561866
accepted answer of: http://stackoverflow.com/q/28091557
answers question: http://stackoverflow.com/q/28091557
has comment: http://stackoverflow.com/comment/44563131
has comment: http://stackoverflow.com/comment/44560378

http://stackoverflow.com/q/27991543
has comment: http://stackoverflow.com/comment/44374426
favorite count: 0
has comment: http://stackoverflow.com/comment/44374136
has answer: http://stackoverflow.com/a/27991892
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44374057
upvote count: 3
score: 1
downvote count: 2
has comment: http://stackoverflow.com/comment/44374107
has comment: http://stackoverflow.com/comment/44374597
has body: I am building an app that will have maps showing nearby eateries. Map shows up, but takes a very long time to load, and never actually fully loads. I am on a deadline with this, and I've tried a variety of solutions with no luck. Someone please help!!! See code below: Food & Drink
type: Question
has title: Google maps v3 api Map doesnt fully load
tagged with: google-maps
tagged with: javascript
tagged with: jquery
tagged with: google-maps-api-3
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44373950
has comment: http://stackoverflow.com/comment/44374029
has answer: http://stackoverflow.com/a/27991792

http://stackoverflow.com/q/28106194
has body: Having done next to none JavaScript before, I've tried several ways to position the caret (to end) in a JavaFX HTMLEditor without success. For example, I've tried this: contenteditable, set caret at the end of the text (cross-browser) by adding the function placeCaretAtEnd(el) in the -section, something like this (I omitted the section here): (I set this via HTMLEditor.setHtmlText) But the caret stays at the beginning.. has anyone successfully positioned the caret in a JavaFX HTMLEditor?
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/44586988
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44590144
has comment: http://stackoverflow.com/comment/44586935
has title: Positioning caret in JavaFX HTMLEditor
has answer: http://stackoverflow.com/a/28112629
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4233265
downvote count: 0
score: 1
tagged with: javafx

http://stackoverflow.com/comment/44615668
score: 0
comment on: http://stackoverflow.com/a/28118973
type: AnswerComment
type: Comment
has text: that doesnt seem to be the case, since routerView is a parent element for 'my-element', and he is never actually removed from the dom. I've tried your approach, and I think even though you're right on the whole not cleaning up the view properly, that's exactly what im trying to find... how to properly clean them up. Calling locally this.remove() doesnt do it, and they dont have any event listeners on their scope. I wil try it again in case I missed something and let you know *thumbs up* and thanks

http://stackoverflow.com/comment/98417485
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28083789
has text: For me this is not a good solution. This disables not only click event, but also scroll and others ...

http://stackoverflow.com/comment/44476962
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28047358
has text: What browser are you using?

http://stackoverflow.com/comment/44484212
comment on: http://stackoverflow.com/q/28050811
has text: Sorry about that; added the directive that calls stepForward(). Basically, it is a wrapper around moveForward()
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28074456
downvote count: 0
answers question: http://stackoverflow.com/q/28073848
accepted answer of: http://stackoverflow.com/q/28073848
type: Answer
has body: Try changing the line ... $.trim($inputValue); ... to ... $inputValue = $.trim($inputValue); The first does not change the $inputValue, it simply returns the new string which in the second set of code I am assigning to a value that can then be used later in the code.
upvote count: 1
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/28077543
has comment: http://stackoverflow.com/comment/44534093
type: Question
has body: I'm trying to program a playlist for a site I'm presently working on, and I'm having some issues presently. I've written the script so far and it replaces the default song with a second song, but does not revert back on click.. any suggestions? The HTML... Switch to second song Change it back!! $('.change-song').click(function(){ var song = $('.change-song').data('track'); $('#player').attr('src', song).attr('autoload', 'auto').attr('autoplay'); }); The script only ever returns the first song as the value, and never the second.. how do I fix this?
possible better answer: http://stackoverflow.com/a/28077657
has comment: http://stackoverflow.com/comment/44534123
accepted answer: http://stackoverflow.com/a/28077649
has answer: http://stackoverflow.com/a/28077657
tagged with: javascript
has title: Attempting to replace an audio src value on click?
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/28077743
tagged with: html5-audio
has answer: http://stackoverflow.com/a/28077649
type: AnsweredQuestion

http://stackoverflow.com/a/28107198
answers question: http://stackoverflow.com/q/28106985
upvote count: 2
type: AcceptedAnswer
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/44591503
score: 2
has comment: http://stackoverflow.com/comment/44591418
accepted answer of: http://stackoverflow.com/q/28106985
has comment: http://stackoverflow.com/comment/44590216
has body: Use sort method: db._adminCommand( {listDatabases: 1}).databases.sort(function(item1, item2){return item1.name &gt; item2.name})

http://stackoverflow.com/comment/44551700
score: 0
comment on: http://stackoverflow.com/a/28086172
type: Comment
type: AnswerComment
has text: its worked but i want to get 'JSI.var' in MainActivity. Because i equal 'JSI.var' to String variable in MainActivity.

http://stackoverflow.com/comment/44386633
comment on: http://stackoverflow.com/q/27998164
score: 0
type: QuestionComment
type: Comment
has text: @Jonathan are you saying that `jQuery.attr()` is deprecated?

http://stackoverflow.com/comment/44431565
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28022875
has text: `http:/www.isoivit.in/json/Details.json` it's only with a slash `/` .. should be `http://www.isoivit.in/json/Details.json`

http://stackoverflow.com/a/28054383
has comment: http://stackoverflow.com/comment/44491095
has comment: http://stackoverflow.com/comment/44491361
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28054220
answers question: http://stackoverflow.com/q/28054220
score: 1
has body: If I understood your problem correctly, the red square does not appear if you refresh the page when you had already scrolled to the right? This is because the position you have scrolled will be lost when you refresh the page, so you'll have to store that position and scroll from that amount of pixels in the document onLoad event. Regarding window.innerwidth, it refers to the width of the entire document, while $(document).scrollLeft() refers to the amount of pixels scrolled on the left.

http://stackoverflow.com/comment/44361113
type: Comment
has text: added it and nothing came up in the console so it doesn't look like it is getting called.
comment on: http://stackoverflow.com/a/27984907
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44474977
type: QuestionComment
has text: Maybe this helps you out: http://stackoverflow.com/questions/27586694/pipe-to-subprocess-stdin-for-jxa
score: 0
comment on: http://stackoverflow.com/q/28044758
type: Comment

http://stackoverflow.com/comment/44446726
has text: I'd love to but for some reason when i transfer the code into jsfiddle it doesn't work.
type: QuestionComment
comment on: http://stackoverflow.com/q/28030528
score: 0
type: Comment

http://stackoverflow.com/q/28033213
tagged with: fragment-identifier
type: Question
upvote count: 1
tagged with: arrays
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/28033302
accepted answer: http://stackoverflow.com/a/28033302
linked to: http://stackoverflow.com/q/824349
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: function updateView(category) { console.log( window.location.hash ); if (location.hash !== ""){ //convert #3 to 3. //load video based on id //myArray[sanitizedHash]; } else { updateCategoryLabel(category); currentList = updateVideosList(category); chooseRandomVideoFromList(); } } This function is loaded on page load How can I parse inside this function so that the the location.hash's '#' will be taken out of the URL? In short I am trying to achieve www.mysite.com/3 versus www.mysite.com/#3 Thanks in advance! Edit: I should add that the 'else' is basically randomizing on page load versus going to the direct url. This if statement will run on page load to check if the hash exists otherwise it will randomize as usual.
downvote count: 0
has title: taking the # out of url on location.hash
possible better answer: http://stackoverflow.com/a/28033290
has answer: http://stackoverflow.com/a/28033602
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28033290
score: 1

http://stackoverflow.com/comment/44574571
comment on: http://stackoverflow.com/q/28099309
has text: thanks @Aleksandr M. Will look into those.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44462630
comment on: http://stackoverflow.com/a/28039037
score: 0
type: Comment
has text: @Lindsey - I've documented three separate issues in my answer now.
type: AnswerComment

http://stackoverflow.com/comment/44383946
comment on: http://stackoverflow.com/q/27996850
score: 0
has text: their is an echo statement in function.php that must be displayed in div id="rssOutput" in search.php @adeneo
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44591837
type: Comment
comment on: http://stackoverflow.com/a/28108876
type: AnswerComment
has text: @BhojendraNepal The way, OP made the question is confusing. But this is what he is trying to do. :)
score: 0

http://stackoverflow.com/q/27970207
has title: Best way to find smallest value from array containing objects
accepted answer: http://stackoverflow.com/a/27970485
has comment: http://stackoverflow.com/comment/44334672
type: AnsweredQuestion
has body: I wants to find out the object which holds the smallest value of a key in an array. var tempArr = [{name: 'john', age: 23}, {name: 'jonny', age: 27}, {name: 'roony', age: 13}, {name: 'david', age: 33}]; I want the result to be {name: 'roony', age: 13} without using for loop is there any direct way to find out the result, like we can do for plain array for example: if array is - var arr = [11,4,22,3,5,55]; we can achieve the same by: Math.min.apply(null, arr)
has answer: http://stackoverflow.com/a/27970446
upvote count: 2
has comment: http://stackoverflow.com/comment/44333130
type: Question
possible better answer: http://stackoverflow.com/a/27970446
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/44334486
has comment: http://stackoverflow.com/comment/44333294
has answer: http://stackoverflow.com/a/27970311
answer count: 3
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/27970485
has comment: http://stackoverflow.com/comment/44333113
favorite count: 0
linked to: http://stackoverflow.com/q/1129216
has comment: http://stackoverflow.com/comment/44333081

http://stackoverflow.com/a/28053663
downvote count: 0
score: 4
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/28053636
has comment: http://stackoverflow.com/comment/44489425
has comment: http://stackoverflow.com/comment/44489186
has body: Try this var myFunction = function(variable) { variable = variable || 0; // this variant works for all falsy values "", false, null, undefined... // if you need check only undefiend, use this variant // variable = typeof(variable) == 'undefined' ? 0 : variable }; Default function parameters will be in ES6; ES5 does not allow it.

http://stackoverflow.com/comment/44469945
has text: Hi Roland, I am getting this error TypeError: data[key].hotel_geo_node is undefined .
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28030892

http://stackoverflow.com/comment/44565958
type: AnswerComment
has text: you have to use the code in my previous solution then, and make it on click of the button in the modal `$('.submit').on('click', function (e) { e.preventDefault(); setTimeout(function() { $('#myModal').modal('hide'); }, 10000); });` and then do the code that submits the form, cause the code works for closing the modal with the "x". you'll have to interrupt your submission code to place the delay in it
type: Comment
comment on: http://stackoverflow.com/a/28092020
score: 0

monospace
tag name: monospace
type: Tag
tags question: http://stackoverflow.com/q/28052244

http://stackoverflow.com/comment/44560372
score: 1
type: Comment
type: QuestionComment
has text: @Shiladittya I am not sure I understand the question. Is [this](http://ar3f.in/goochShading.html) the shading you want to achieve?
comment on: http://stackoverflow.com/q/28084906

http://stackoverflow.com/q/28108230
has title: how to do a switch or else/if statement in angular js?
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44591567
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44591325
has comment: http://stackoverflow.com/comment/44590736
has comment: http://stackoverflow.com/comment/44591392
has comment: http://stackoverflow.com/comment/44591937
has body: I am new to angular js and was playing around with it to try and get my code to return the flag of the country when the user types it in. So far my list filters down when they start typing a country but it wont display the flag. code: Section Two {{ x.country }} Items in list: {{filtered.length}} what do i need to add to make it give me the results i want? I also only want the flag to appear when there is one country in the list. so for example if i type in 'u' usa, uk, turkey and south africa are all returned. but then if i type 'us' only the usa is returned. that is the only point i want a flag returned.
has answer: http://stackoverflow.com/a/28109319
accepted answer: http://stackoverflow.com/a/28109319
type: AnsweredQuestion
type: Question
score: 0

http://stackoverflow.com/comment/44573788
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28098734
has text: you can't do that (easily). I recall seeing someone develop a complex framework that somehow managed to get that kind of chaining working, but it involved hooking deep into jQuery's internal methods. Far more overhead than it is worth in my opinion.

http://stackoverflow.com/q/28093005
type: AnsweredQuestion
tagged with: varnish
score: 0
has answer: http://stackoverflow.com/a/29276710
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44599424
accepted answer: http://stackoverflow.com/a/29276710
has comment: http://stackoverflow.com/comment/44591101
tagged with: ratchet
tagged with: apache
has body: I've been trying to get this connection to the websocket to work for days now, but I still end up getting an error when trying to connect to it via Javascript. The error the javascript throws is below: WebSocket connection to 'ws://lmc-staging.mydomain.org:8081/' failed: Connection closed before receiving a handshake response brainsocket.min.js:1 Event {clipboardData: undefined, path: NodeList[0], cancelBubble: false, returnValue: true, srcElement: WebSocket…}bubbles: false cancelBubble: false cancelable: false clipboardData: undefined currentTarget: WebSocket defaultPrevented: false eventPhase: 0path: NodeList[0] returnValue: true srcElement: WebSockettarget: WebSockettimeStamp: 1421938720697 type: "error"__proto__: Event brainsocket.min.js:1 WebSocket is already in CLOSING or CLOSED state. The request is piped using Varnish to an Apache webserver (xxx.xxx.xxx.203). The varnish config is posted below: # This is a basic VCL configuration file for varnish. See the vcl(7) # man page for details on VCL syntax and semantics. # # Default backend definition. Set this to point to your content # server. # # Internal hosts; same as purge, but separated for clarity. acl internal { "localhost"; "127.0.0.1"; "xxx.xxx.xxx.0"/24; "xxx.xxx.xxx.203"; "xxx.xxx.xxx.204"; } # Hosts allowed to purge cache acl purge { "localhost"; "127.0.0.1"; "xxx.xxx.xxx.0"/24; "xxx.xxx.xxx.203"; "xxx.xxx.xxx.204"; } # DEV webserver backend vsrv1474 { .host = "xxx.xxx.xxx.203"; .port = "80"; .connect_timeout = 300s; .first_byte_timeout = 300s; .between_bytes_timeout = 300s; } # DEV brainsocket backend brainsocket { .host = "xxx.xxx.xxx.203"; .port = "8081"; .connect_timeout = 300s; .first_byte_timeout = 300s; .between_bytes_timeout = 300s; } # PROD webserver backend vsrv1475 { .host = "xxx.xxx.xxx.204"; .port = "80"; #.connect_timeout = 5s; #.first_byte_timeout = 60s;a #.between_bytes_timeout = 60s; .connect_timeout = 300s; .first_byte_timeout = 300s; .between_bytes_timeout = 300s; } sub vcl_recv { # …
answer count: 1
has comment: http://stackoverflow.com/comment/44585445
tagged with: websocket
has comment: http://stackoverflow.com/comment/46025252
has title: Websocket via Apache/Varnish failed

http://stackoverflow.com/a/28028710
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27990010
accepted answer of: http://stackoverflow.com/q/27990010
has body: I solved my issue so I want to give the answer to everybody else is in the same situation. 1) The problem was to enable OPTIONS http request from server-side. In fact, there is a first call to the same url but with verb 'OPTIONS' and then a second call to the real url with POST|GET method. If the server doesn't properly answer to the first 'OPTIONS' call, e.g. specifying the correct Allowed Headers etc., the second call doesn't work. 2) The notation settings.headers = { 'Authorization': 'Bearer &lt;my access token&gt;' }; is not working. The only way to setup an header is: settings.beforeSend = function (request) { request.setRequestHeader('Authorization', 'Bearer &lt;my access token&gt;'); }; Hope this can help other people in the future. cghersi
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/28019243
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/28019258
tagged with: jquery
has body: I have multiple textboxes with same class and different different id's. I want to apply two search criteria in for each loop. For example, I have these text fields:- &lt;input type="text" id="grid_5_collect_businame" class="search_ ui-autocomplete-input" style="width:100%;" value="" autocomplete="off"&gt; &lt;input type="text" id="grid_5_client_businame" class="search_" style="width:100%;" value=""&gt; &lt;input type="text" id="grid_5_collnurs" class="search_" style="width:100%;" value=""&gt; &lt;input type="text" id="grid_6_collect_businame" class="search_ ui-autocomplete-input" style="width:100%;" value="" autocomplete="off"&gt; &lt;input type="text" id="grid_6_client_businame" class="search_" style="width:100%;" value=""&gt; &lt;input type="text" id="grid_6_collnurs" class="search_" style="width:100%;" value=""&gt; Now i want to retrieve all those text boxes value which has class 'search_' and those id starts with 'grid_5', How i ca
has title: Get all text boxes value with two conditions
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28019258
possible better answer: http://stackoverflow.com/a/28019473
has answer: http://stackoverflow.com/a/28019473
type: Question
tagged with: javascript

http://stackoverflow.com/q/27976439
has title: Best way to present multiple confirmation messages to user
upvote count: 1
downvote count: 0
tagged with: javascript
tagged with: webforms
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/28054099
has comment: http://stackoverflow.com/comment/44422342
has answer: http://stackoverflow.com/a/27977115
has body: I've been asked to convert a VB6 application to a WebForms environment (C# .NET v4.5). The existing application presents multiple confirmation messages when the Save button is clicked. EG. "You have entered X, which is less than Y. Are you sure?" They want to preserve this functionality but I'm uncomfortable with this approach of spamming the user with (potentially) 10+ questions that they have to click through in order to save. Not to mention that modern browsers allow users to disable multiple popups. So does anyone have a more 'best practice' approach to this scenario?
tagged with: c#
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28054099
score: 1
type: Question
has comment: http://stackoverflow.com/comment/44422409
answer count: 2
possible better answer: http://stackoverflow.com/a/27977115

http://stackoverflow.com/comment/44453527
type: QuestionComment
comment on: http://stackoverflow.com/q/28034260
type: Comment
has text: Multiple ?, don't you mean &?
score: 0

http://stackoverflow.com/a/27999832
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27999654
has body: It's called scoping and hoisting.There are two types of scope in javascript, they are Global scope and Function scope.In javascript functions create their own scope. So your code is equivalent to the following : var skill; // hoisted at the top of global scope and undefined skill = "JavaScript"; // value assigned to it function printSkill() { var skill; //--&gt; Hoisted at the top of function's scope and it is undefined console.log(skill); // &lt;-- So this prints undefined skill = "Java"; // &lt;-- here it is assigned a value "java" console.log(skill); // &lt;-- This prints "Java" } printSkill(); Now come to the second skill variable inside printSkill(). It has it's own scope.It's called function scope.And all the variables which is defined inside this function is hoisted at the top of it's wrapper function's scope ,not on global scope. So when you console.log() variable skill inside pritSkill() first it looks in functions scope.If it doesn't find it there then it will look up in the scope chain.In your case it finds skill hoisted at the top of the function but it is not assigned any value.So first console.log() prints undefined. In second console.log() it finds skill assigned a value.So it prints the value which is assigned to skill In your code, if you want to initialize your global skill variable, you can not declare any other variable having same name as the global one.Declaration order doesn't count due to hoisting as I've mentioned above.Here is how the code should be written. Note : declaring global variables here and there in your code is considered bad coding practice var skill = "JavaScript"; function printSkill() { console.log(skill); // &lt;-- This prints "javascript" skill = "Java"; // &lt;-- assign value "Java" to global "skill" variable console.log(skill); // &lt;-- This prints "Java" } printSkill();
downvote count: 0
has comment: http://stackoverflow.com/comment/44397333
type: Answer

http://stackoverflow.com/q/28060105
tagged with: javascript
score: -1
answer count: 3
has answer: http://stackoverflow.com/a/28060166
favorite count: 0
has body: Is it possible to change my page's title with html/javascript after a certain amount of seconds. I know it's possible to change the title but I want to do it automatically after a certain amount of seconds, specifically about 6 seconds.
type: UnansweredQuestion
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28060177
has answer: http://stackoverflow.com/a/28060161
upvote count: 1
type: Question
has title: Change HTML title after certain seconds?

http://stackoverflow.com/comment/44321987
type: QuestionComment
has text: are you getting any errors in the browser console when this doesn't work?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27964533

http://stackoverflow.com/comment/44462556
score: 0
type: AnswerComment
type: Comment
has text: @Lindsey - You don't appear to have any code to save the entered values as cookies when the user hits "Save Information". Right now, you have that button labeled as a submit button so it is trying to submit a form. That is not what you want. You want that button to trigger a function that gets all the form values and saves each one as the appropriate cookie value.
comment on: http://stackoverflow.com/a/28039037

http://stackoverflow.com/q/28116680
upvote count: 28
has answer: http://stackoverflow.com/a/33591133
has comment: http://stackoverflow.com/comment/44608413
tagged with: events
has answer: http://stackoverflow.com/a/28117369
has answer: http://stackoverflow.com/a/33390444
has comment: http://stackoverflow.com/comment/44608508
has comment: http://stackoverflow.com/comment/44607517
favorite count: 0
has answer: http://stackoverflow.com/a/39436041
tagged with: angularjs
answer count: 5
has answer: http://stackoverflow.com/a/28116836
downvote count: 1
type: AnsweredQuestion
has title: Calling directive's methods from parent controller in AngularJS
tagged with: angularjs-controller
accepted answer: http://stackoverflow.com/a/28117369
score: 27
type: Question
tagged with: angularjs-directive
has body: I am using AngularJS with the alias controllers pattern. I can't access (or I don't know how to) directive methods from a parent controller. I have a function inside my controller that should call a directive method but this directive method is not available inside the this controller value. This is what I have. What I am doing wrong? JS angular.module('myApp', []). controller('MyCtrl', function(){ this.text = 'Controller text'; this.dirText = 'Directive text'; this.click = function(){ this.changeText(); } }) .directive('myDir', function(){ return { restrict: 'E', scope: { text: '=' }, link: function(scope, element, attrs){ scope.changeText = function(){ scope.text = 'New directive text'; }; }, template: ' {{text}} ' }; }); HTML {{ctrl.text}} Change Directive Text Here a codepen with the code.
tagged with: javascript
possible better answer: http://stackoverflow.com/a/33591133

http://stackoverflow.com/comment/44357937
type: QuestionComment
comment on: http://stackoverflow.com/q/27983388
has text: `querySelectorAll` returns a collection of elements. `getElementById` returns just one.
score: 1
type: Comment

http://stackoverflow.com/q/28011400
tagged with: javascript
has title: DRY code for sending email with SendGrid
tagged with: express
score: 0
answer count: 1
tagged with: node.js
has answer: http://stackoverflow.com/a/28011612
has body: I have this code inside a post route: The first one is to alert my when a user register in my site: sendgrid.send({ to: "my@email.com", from: "myother@email.com", subject: "[ALERT] " + req.body.eventDate, html: "SOME HTML", }, function(err, json) { if (err) { return console.error(err); } else { next(); } }); The next one is a confirmation email send to the new register member: sendgrid.send({ to: req.body.email, from: "my@email.com", subject: "[CONFIRM] register" + req.body.eventDate, html: "SOME HTML", }, function(err, json) { if (err) { return console.error(err); } else { next(); } }); Is working 100%, but this is not a good practice, there is so much duplicate. Can i DRY this? If so, howww?? Thanks!!!
has comment: http://stackoverflow.com/comment/44410180
type: AnsweredQuestion
tagged with: sendgrid
type: Question
accepted answer: http://stackoverflow.com/a/28011612

http://stackoverflow.com/q/27987848
has comment: http://stackoverflow.com/comment/44376470
score: 2
has comment: http://stackoverflow.com/comment/44524585
has comment: http://stackoverflow.com/comment/44375616
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/44374519
tagged with: jqgrid
has comment: http://stackoverflow.com/comment/44524911
has comment: http://stackoverflow.com/comment/44386935
has comment: http://stackoverflow.com/comment/44367042
has comment: http://stackoverflow.com/comment/44367299
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/44367137
has comment: http://stackoverflow.com/comment/44524872
tagged with: javascript
tagged with: jquery
has title: JQGrid Search Button not working
has comment: http://stackoverflow.com/comment/44375670
has comment: http://stackoverflow.com/comment/44367192
favorite count: 0
has body: I have a JQgrid where i am trying to put the datepicker in one of my colmodels as colModel: [{ name: 'Business Date', index: 'Business Date', width: 90, sorttype: 'string', align: 'center', datefmt: 'Y-m-d', editable: true, search: true, stype: 'text', searchoptions: { dataInit: function(elem) { /*jQuery*/ $(elem).datepicker({ showButtonPanel: true, changeMonth: true, changeYear: true }); } } }] and here is my navgrid navGrid('#pager', { edit: false, add: false, del: false, search: true, refresh: true }); also, here are my jQgrid configurations &lt;script src="./scripts/common.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript" language="javascript" src="./scripts/jquery-1.6.3.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" language="javascript" src="./scripts/grid.locale-en.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" language="javascript" src="./scripts/jquery.jqGrid.min.js"&gt;&lt;/script&gt; &lt;link href="./css/redmond/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css"/&gt; &lt;link href="./css/ui.jqgrid.css" rel="stylesheet" type="text/css" /&gt; Now, when i click on the search button, nothing happens. Is there a way to find out what the search button is trying to do by placing an alert somewhere ? how can i access the actual function definition of the search button? I also have some other screen which do not have the datepicker in the searchoptions colmodel anywhere but the search seems to work fine. Is there something wrong with my syntax ? EDIT here is the entire grid code /*Grid Code*/ jQuery(document).ready(function(){ jQuery("#list").jqGrid({ datatype: 'json', url:'feeder.jsp?deskName=&lt;%= request.getParameter("deskName")%&gt;&amp;ctlSelectedDate=&lt;%= request.getParameter("businessdate")%&gt;', colNames: ['Business Date','T','T Date','S Date','S Name', 'C','R/D','CTP Amt','R Par','Extrnl T', 'GC Acct','GC Name','C Acct','Ct Acct','Ct Name'], colModel: [ { name: 'Business Date', index: 'Busin…
type: UnansweredQuestion

http://stackoverflow.com/q/28089597
tagged with: google-maps
has comment: http://stackoverflow.com/comment/44555822
answer count: 1
downvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/28089833
accepted answer: http://stackoverflow.com/a/28089833
favorite count: 0
has comment: http://stackoverflow.com/comment/44555987
type: AnsweredQuestion
upvote count: 0
type: Question
has title: How to delete/remove polyline from Google Map?
score: -1
has body: I'm trying to remove/delete the line. But flightPath.setMap(null) is not working. I'm sending the JSFiddle link which will give you complete details. of my code. jsfiddle.net/rb9w8o5c/5/ function initialize() { google.maps.event.addListener(map, 'click', addLatLng); } function addLatLng(event) { var path = poly.getPath(); path.push(event.latLng); marker = new google.maps.Marker({ position: event.latLng, title: '#' + path.getLength(), map: map }) markers.push(marker); for (var key in markers) { flightPlanCoordinates.push(markers[key].position); positions.push(markers[key].position); } flightPath = new google.maps.Polyline({ path: flightPlanCoordinates, strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2 }); } function removePolyline(){ flightPath.setMap(null); }

http://stackoverflow.com/q/28077188
tagged with: jquery
has answer: http://stackoverflow.com/a/65934931
favorite count: 0
has comment: http://stackoverflow.com/comment/44533970
has comment: http://stackoverflow.com/comment/44534753
has body: I'm using $postMessage to communicate cross browser with the parent window. Everything works fine in all browsers except Safari. The issue is using document.location.hash The hash comes back as empty in Safari. Anyway around this happening in Safari. function postMessage( msg ){ var parent_url = decodeURIComponent( document.location.hash.replace( /^#/, '' ) ); $.postMessage({ method:'resize', message:msg}, parent_url, parent ); } Update: So the parent window is creating an Iframe which appends '#url to the end of it. I'm using document.location.hash.replace( /^#/, '' ) to grab that url to use as the url for postMessage. When testing all this in Safari V8.0.2 Safari was removing the # and anything after the #. So my parent_url was coming back blank. The solution to this was to use a &amp;param=url at the end of the url instead of the #. I'm not sure why Safari would be removing the # or if it's a well documented issue. I have been searching online to find out more info.
has comment: http://stackoverflow.com/comment/44533420
upvote count: 3
has comment: http://stackoverflow.com/comment/44533415
type: UnansweredQuestion
tagged with: postmessage
type: Question
tagged with: safari
has comment: http://stackoverflow.com/comment/44533765
score: 3
has comment: http://stackoverflow.com/comment/44537780
has answer: http://stackoverflow.com/a/28077282
answer count: 2
has comment: http://stackoverflow.com/comment/44533290
has title: document.location.hash not working in Safari
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/44441382
comment on: http://stackoverflow.com/q/28027726
score: 0
type: Comment
type: QuestionComment
has text: in console i have this : Uncaught TypeError: undefined is not a function load_selection.js:2(anonymous function) and it is pointing to this line : $("#filter").on("change", function() {

http://stackoverflow.com/a/27970110
has body: A little while ago someone asked (on SO) for a command-line utility that would compute volume of points in an STL file. It looks like this utility will do it: https://sites.google.com/a/varlog.com/www/admesh-htm
answers question: http://stackoverflow.com/q/27968897
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44335005
has comment: http://stackoverflow.com/comment/44335657
has comment: http://stackoverflow.com/comment/44337902
upvote count: 1

http://stackoverflow.com/comment/44348822
comment on: http://stackoverflow.com/q/27977853
has text: `objects[objects.indexOf(item)]` looks like a long way to write `item`. You should call the `whoami_sync` method, not just refer to it. Ordinary methods should be created with `->`, not `=>`.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28068606
has answer: http://stackoverflow.com/a/28069111
has comment: http://stackoverflow.com/comment/44516810
type: AnsweredQuestion
tagged with: settimeout
score: 1
linked to: http://stackoverflow.com/q/19451425
has comment: http://stackoverflow.com/comment/44517254
type: Question
tagged with: addclass
has comment: http://stackoverflow.com/comment/44516662
tagged with: removeclass
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28069111
has comment: http://stackoverflow.com/comment/44516936
favorite count: 0
has body: I have the following HTML structure: Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 And CSS: body { font-family: Helvetica, Arial, sans-serif; font-size:20px; } div { background-color: #fff; display: block; border-bottom: 1px solid #ccc; background-image: url(http://cdn.sstatic.net/Img/mini-hero-bg.png?v=7f269bbbdb22); } .change { background-image: none; } Now I would like to pic a random div with Javascript / jQuery and "remove" the class "change" so that the default background image of the specific div will be visible. My code looks like that atm: var divs = $(".me").toArray(); var divlength = divs.length; setInterval(function(){ var randomnum = Math.floor(Math.random()*divlength); var randomdiv = divs[randomnum]; $(randomdiv).addTemporaryClass("change", 1000); }, 1000); $.fn.extend({ addTemporaryClass: function(className, duration) { var elements = this; setTimeout(function() { elements.addClass(className); }, duration); return this.each(function() { $(this).removeClass(className); }); } }); I need to improve this to achieve the following: I would like to have a smoother change from no-background-image to the visibility of the default background-image. Some fading effect or something like that. Already tried to add some transition to the div CSS but with no success. Sometimes there is no "change"-class removing and for some time no background-image of any div visible but I need at least one image being visible everytime I need to start the "remove"-class-thing immediately on page load so that there is already one background-image of a random div visible Here is the current fiddle: http://jsfiddle.net/uRd6N/500/ Thx for your help, I am a noobie and not really familiar with JS / jQuery. If you know a better way to do this whole thing you could tell me too. Regards
has comment: http://stackoverflow.com/comment/44517363
has comment: http://stackoverflow.com/comment/44517161
has title: Choose a random div and apply css class with timeout and loop this?
upvote count: 1

http://stackoverflow.com/a/28110174
score: 0
has body: i used this code and it is working now :) var win = ifrm.contentWindow; // reference to iframe 2 window // reference to iframe 2 document var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document; // reference to form element in iframe 2 document var fld = doc.forms['formName'].elements[tur]; var counter = win.counter; // global variable in iframe 2 win.clearGreeting(); // call function in iframe 2 the iframe in parent page. thanks everybody
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/28090773
answers question: http://stackoverflow.com/q/28090773

http://stackoverflow.com/q/27972877
tagged with: javascript
tagged with: jquery-1.8
upvote count: 1
has answer: http://stackoverflow.com/a/27972937
answer count: 1
tagged with: jquery
favorite count: 0
has title: Jquery range slider with manual input
type: AnsweredQuestion
downvote count: 0
score: 1
has body: Hi I have been using jQuery range slider which does not support touch devices. I have tried the touch punch but it didnt really made any difference I want to give the user the option to enter the value of the slider manually along with the scroll functionality. I'm using jquery 1.8 and when I try to update it to the latest jquery there are some performance issues.
type: Question
tagged with: jquery-ui-slider
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/27972937

http://stackoverflow.com/q/28000460
has comment: http://stackoverflow.com/comment/44390145
has answer: http://stackoverflow.com/a/28001508
tagged with: google-chrome-devtools
tagged with: firefox-developer-tools
accepted answer: http://stackoverflow.com/a/28000650
type: Question
has comment: http://stackoverflow.com/comment/44390107
has answer: http://stackoverflow.com/a/28615778
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/44390085
upvote count: 4
has comment: http://stackoverflow.com/comment/44392410
answer count: 3
tagged with: ie-developer-tools
has body: I would like to know the best way to detect when a method or function is directly called through the console. As far as I currently understand, it's not possible to directly detect it on identical function calls, but using the .call() and .apply() methods of a function I can pass additional data through the this object. Given the following code structure: (function(){ var Player = {money: 0}; window.giveMoney = function(amount){ if (this.legit !== true) throw new Error("Don't try to cheat!"); Player.money += amount; } })(); I could call the function using window.giveMoney.call({legit: true}, 300); in my actual code to tell a direct call from the console and my own code apart, but this is obviously not fool-proof, since the same code can also be executed from the console to achieve the desired effect. I would want a way to be able to call the function from both places and then tell the locations of the call apart. If there's no way to do that, what's the best way to try and prevent the execution anyway? Is it best to just not expose any methods at all, and keep everything inside a single closed-off anonymous function?
downvote count: 0
has title: Best way to detect when a function is called from the console
has comment: http://stackoverflow.com/comment/44390159
favorite count: 0
has answer: http://stackoverflow.com/a/28000650
tagged with: function-calls
has comment: http://stackoverflow.com/comment/44390626
has comment: http://stackoverflow.com/comment/44390116
linked to: http://stackoverflow.com/q/17776940
has comment: http://stackoverflow.com/comment/44390100
possible better answer: http://stackoverflow.com/a/28001508
type: AnsweredQuestion

http://stackoverflow.com/comment/44499967
score: 0
type: AnswerComment
has text: Thanks so much @EricTaylor!! Really appreciate the help, especially coming from an experienced Durandal user like yourself! Will try making those changes now and let you know how it goes.
type: Comment
comment on: http://stackoverflow.com/a/28055789

http://stackoverflow.com/comment/44491051
score: 0
comment on: http://stackoverflow.com/q/28054318
type: Comment
type: QuestionComment
has text: I would suggest you to read upon how to work with asyncronous operation, also the answer marked as duplicate has a very good explanation. Did you read the linked answer. when you say `console.log(usuario); // print undefined` yes because it will run before you even set it.

http://stackoverflow.com/comment/44615136
type: Comment
has text: I mean what triggers it within the context of the jQuery Validate plugin? The OP is looking for integration.
score: 0
comment on: http://stackoverflow.com/a/28120194
type: AnswerComment

http://stackoverflow.com/q/28036870
has comment: http://stackoverflow.com/comment/44458436
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44458568
score: 0
has title: PHP not working when in Subfolder
has comment: http://stackoverflow.com/comment/44458752
has comment: http://stackoverflow.com/comment/44458419
type: UnansweredQuestion
has body: I am using a File Manager jquery script, here's the first portion: $(function(){ var filemanager = $('.filemanager'), Here is the script.js: $(function(){ var filemanager = $('.filemanager'), breadcrumbs = $('.breadcrumbs'), fileList = filemanager.find('.data'); // Start by fetching the file data from scan.php with an AJAX request $.get("phpfiles/scan.php", function(data) { var response = [data], currentPath = '', breadcrumbsUrls = []; var folders = [], files = []; // This event listener monitors changes on the URL. We use it to // capture back/forward navigation in the browser. $(window).on('hashchange', function(){ goto(window.location.hash); // We are triggering the event. This will execute // this function on page load, so that we show the correct folder: }).trigger('hashchange'); // Hiding and showing the search box filemanager.find('.search').click(function(){ var search = $(this); search.find('span').hide(); search.find('input[type=search]').show().focus(); }); // Listening for keyboard input on the search field. // We are using the "input" event which detects cut and paste // in addition to keyboard input. filemanager.find('input').on('input', function(e){ folders = []; files = []; var value = this.value.trim(); if(value.length) { filemanager.addClass('searching'); // Update the hash on every key stroke window.location.hash = 'search=' + value.trim(); } else { filemanager.removeClass('searching'); window.location.hash = encodeURIComponent(currentPath); } }).on('keyup', function(e){ // Clicking 'ESC' button triggers focusout and cancels the search var search = $(this); if(e.keyCode == 27) { search.trigger('focusout'); } }).focusout(function(e){ // Cancel the search var search = $(this); if(!search.val().trim().length) { window.location.hash = encodeURIComponent(currentPath); search.hide(); search.parent().find('span').show(); } }); // Clicking on folders fileList.on('click', 'li.folders', function(e){ e.preventDefault(); var nextDir = $(this).find('a.folders'…
has comment: http://stackoverflow.com/comment/44458508
has comment: http://stackoverflow.com/comment/44458393
tagged with: php
has comment: http://stackoverflow.com/comment/44458492
answer count: 0
type: Question

http://stackoverflow.com/a/27997182
answers question: http://stackoverflow.com/q/27997104
has comment: http://stackoverflow.com/comment/44384345
has comment: http://stackoverflow.com/comment/44399843
has comment: http://stackoverflow.com/comment/44385001
score: 0
has body: To test for some objects in an array: .expectJSON('array.?', '1') .expectJSON('array.?', '2') .expectJSON('array.?', '3') According to the docs.
type: Answer

http://stackoverflow.com/a/28007965
has comment: http://stackoverflow.com/comment/57071645
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/91523645
answers question: http://stackoverflow.com/q/28007949
type: Answer
has body: When you call join without any argument being passed, ,(comma) is taken as default and toString internally calls join without any argument being passed. So, pass your own separator. var str = array.join(' '); //'apple tree' // separator ---------^ MDN on Array.join
accepted answer of: http://stackoverflow.com/q/28007949
score: 89
upvote count: 89

http://stackoverflow.com/q/28025259
has comment: http://stackoverflow.com/comment/44437218
tagged with: javascript
has comment: http://stackoverflow.com/comment/44435952
has comment: http://stackoverflow.com/comment/44437947
score: 0
has comment: http://stackoverflow.com/comment/44436278
tagged with: jquery-selectors
answer count: 1
has title: IE7 jquery selector returns "Failed"
tagged with: jquery
has answer: http://stackoverflow.com/a/28026463
accepted answer: http://stackoverflow.com/a/28026463
has comment: http://stackoverflow.com/comment/44436398
has body: I've encountered a peculiar bug in IE7, all other browsers seem to execute this code just fine. What i'm trying to do is select the very first input/textarea on my page using this: $('textarea.classname, input.classname[type=text]').first().focus(); This line returns the text "Failed". In IE7 my entire application fails after executing this line and I don't quite understand why. When I execute either one of the following lines it returns an empty jquery object which is what I'm expecting on the page I'm currently working on: $('textarea.classname').first().focus(); $('input.classname[type=text]').first().focus();
has comment: http://stackoverflow.com/comment/44436022
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44437073
has comment: http://stackoverflow.com/comment/44436690
has comment: http://stackoverflow.com/comment/44436790
has comment: http://stackoverflow.com/comment/44436041
type: Question
has comment: http://stackoverflow.com/comment/44436515
has comment: http://stackoverflow.com/comment/44436196
has comment: http://stackoverflow.com/comment/44435858
tagged with: internet-explorer-7

http://stackoverflow.com/a/27970870
has body: You need to pass the instance of the model into the view, here: var myView = new RectangleView({model: 'myRectangle'}); should become: var myView = new RectangleView({model: myRectangle}); Simply passing the name as a string is not enough, Backbone doesn't know what variable you assigned the new Rectangle to or what it should look for. You may also want to revise your render method; I believe the conventional Backbone way is to have the view take an element (el or $el) when it is constructed, then render into that element when render is called (rather than producing a new element and returning that).
answers question: http://stackoverflow.com/q/27970823
score: 3
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/44334914
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27970823

http://stackoverflow.com/comment/44502481
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28060393
has text: error is not of regex as I have used this and its working in that but in javascript it always show "Please match the requested format"

http://stackoverflow.com/comment/44352420
score: 1
type: Comment
has text: Well, it was IE8...if you know what i mean.
type: QuestionComment
comment on: http://stackoverflow.com/q/27980221

http://stackoverflow.com/a/32859025
type: Answer
answers question: http://stackoverflow.com/q/28038733
has body: Another option added to the mix for animations, which imports Animate.css can be found here https://github.com/webtempest/meteor-animate.
score: 0

http://stackoverflow.com/comment/44344990
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27976155
has text: I DO NOOOOOOOOT NEED TO SEND IT TO THE SERVER

http://stackoverflow.com/q/28022528
accepted answer: http://stackoverflow.com/a/28071247
tagged with: grunt-contrib-qunit
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/44440714
has title: grunt not running Qunit tests correctly
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44439620
has comment: http://stackoverflow.com/comment/44439572
has comment: http://stackoverflow.com/comment/44440555
tagged with: travis-ci
score: 0
has answer: http://stackoverflow.com/a/28071247
type: AnsweredQuestion
has body: Situation : I am currently using QUnit to test a project in TypeScript/Javascript and everything works fine when I'm running them in a browser. Problem : I'm trying to use grunt to run the QUnit tests in a headless mode (I need it for continuous integration testing) and the tests don't run properly. Configuration Here's how I have things currently set up : Gruntfile.js package.json src/ - Ts source files test/ - config.js - Test.ts - Test.js - test.html Gruntfile.js /*global module:false*/ module.exports = function(grunt) { grunt.initConfig({ connect: { server: { options: { port: 8000, base: '.' } } }, qunit: { all: { options: { urls: [ 'http://localhost:8000/test/test.html' ] } } } }); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.registerTask('test', ['connect', 'qunit']); }; package.json { // Name, version, description, repo and author fields... "engines": { "node": "&gt;= 0.10.0" }, "devDependencies": { "grunt": "~0.4.5", "grunt-contrib-watch": "~0.6.1", "grunt-contrib-connect": "~0.9.0", "grunt-contrib-qunit": "~0.5.2" } } And then I have a .travis.yml file to run all of this. I don't know if it's really important because the tests don't run either in travis or in my local environment, but here is it anyways : language: node_js node_js: - "0.11" - "0.10" before_install: - "npm install grunt --save-dev" - "npm install -g grunt-cli" install: - "npm install" - "npm install -g typescript" script: - "tsc --module amd --target ES5 ./src/*.ts" - "grunt test --verbose --force" And here's the part that errors in the travis build : http://puu.sh/eKpWj/35614680e1.png (I currently have ~20 assertions that pass when I'm running them in a browser. Also, the typescript compilation runs ok.) Edit : And as someone asked fot it, here's the content of the Test.html file : http://pastebin.com/LN3igmjc Edit 2 : Here's also the content of config.js : var require = { baseUrl: "../src/" };
has comment: http://stackoverflow.com/comment/44440587
has comment: http://stackoverflow.com/comment/44439807
has comment: http://stackoverflow.com/comment/44439565
has comment: http://stackoverflow.com/comment/44439555
has comment: http://stackoverflow.com/comment/44451105
type: Question

http://stackoverflow.com/comment/44505331
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28061025
has text: obj = JSON.parse(req.responseText); so is there any error with JSON.parse also let me for debug the same issue
score: 0

http://stackoverflow.com/comment/44605165
comment on: http://stackoverflow.com/q/28115172
score: 0
type: Comment
type: QuestionComment
has text: and you have already extracted the correct values in `var title` and `var href`? you just want a workin link with that href?

http://stackoverflow.com/a/28002204
has comment: http://stackoverflow.com/comment/44393416
type: Answer
has body: You need to create a new scope for i before you call the database function; try this: function updateColorData (colorArray) { for (var i=0; i&lt;colorArray.length; i++) { (function(i){ var sql = 'INSERT INTO SPColorData (color) VALUES (\''+colorArray[i]+'\')'; if (i &lt; colorArray.length-1) { db.transaction(function (tx) {tx.executeSql(sql, [], gameOptionSuccess, errorCB)}, errorCB); } else { db.transaction(function (tx) {tx.executeSql(sql, [], colorDataQuery, errorCB)}, errorCB); } })(i); } } That creates an individual function scope for each value of i, using an anonymous function. You need to do this because the for loop in your original example keeps updating i without waiting for your database function to return. So you need to create "safe" contexts for your database functions to run without the for loop changing the value of i, and that's exactly what the anonymous functions provide.
upvote count: 4
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/28002040
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44393519
accepted answer of: http://stackoverflow.com/q/28002040

http://stackoverflow.com/q/28076797
downvote count: 0
possible better answer: http://stackoverflow.com/a/28077149
tagged with: jquery
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/28082683
tagged with: php
has comment: http://stackoverflow.com/comment/44543395
has answer: http://stackoverflow.com/a/28082683
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44536593
score: 1
has answer: http://stackoverflow.com/a/28077149
upvote count: 1
has comment: http://stackoverflow.com/comment/44533014
type: Question
has title: Ordering array from PHP called by AJAX not working
tagged with: javascript
has comment: http://stackoverflow.com/comment/44532609
has comment: http://stackoverflow.com/comment/44533265
has comment: http://stackoverflow.com/comment/44532698
answer count: 2
has body: I'm doing this now: $.ajax({ url: 'full_db.php', type: 'GET', dataType: 'JSON', data: {col_name: firstSel}, success: function(data) { var full_options = []; $.each(data, function (i, data) { full_options.push(data.age); full_options.sort(function(a, b){ return a.age - b.age; }); $('#second_select').append("&lt;option&gt;" + data.age + "&lt;/option&gt;"); }); } }); This appends all of the distinct ages to my select (second_select) and if I console log full_options I get this: ["55", "98", "34", "30", "45", "29", "26", "22", "37", "42", "32", "33", "36", "35", "56", "46", "25", "54", "86"] I'm looking to get this in ascending order (e.g.: 22, 25, 26, 29,...). What am I doing wrong here that I'm getting an unordered array?

http://stackoverflow.com/a/28034801
has comment: http://stackoverflow.com/comment/44454567
type: Answer
has comment: http://stackoverflow.com/comment/44454645
has body: 2-dimensional array is ok for PHP. You should clarify what's your problem. Is it about PHP's data from MySQL or JS from HTML. View your html resource to check if the data is there first. <?php error_reporting(E_ALL); $a = array( array(1,2,3), array(1,2,4) ); echo " ";
answers question: http://stackoverflow.com/q/28034539
score: 0

http://stackoverflow.com/comment/44595783
score: 1
has text: JavaScript has no concept of pre-emption in the browser.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28110882

http://stackoverflow.com/q/28102909
tagged with: dom
type: Question
has body: Currently I have a script that programmatically creates a number of panels (yeah, Twitter Bootstrap panels) on a page using jQuery. They're all basically the same, except there's some dynamic text inside each one and below the text there is a button. Kinda like this: There's some dynamically-generated text here. Click Here So I'm trying to write an onclick method for the button that will grab that panel-body up above it and then replace the text inside it. The replacing-text function is no problem, but I'm having a devil of a time writing the proper jQuery to grab the right element. What I've Tried First I tried to use "this" as a context but, as expected, that didn't work. $(".panel-body", this).text(updateContent()) I know this will work: $("#panel1 .panel-body").text(updateContent()) So I tried dynamically building that selector in the same loop I build the ids, but with all the single quotes and double quotes and plus signs I just could not get the javascript to parse the line correctly. I'm sure the solution is simple, but my eyes are crossing and I can't quite see it.
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28102971
has answer: http://stackoverflow.com/a/28102936
score: 0
answer count: 3
tagged with: frontend
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28102980
has title: How can I make a button change text in a nearby element?

http://stackoverflow.com/q/28058780
score: 0
accepted answer: http://stackoverflow.com/a/28059024
tagged with: http://stackoverflow.com/tag/html
has body: From what I have read here on AJAX, it is for updating a page without having to refresh it. I have read further, and notice that (at least) the JavaScript part of it has you sending data to another page. From my knowledge and experience on jQuery, it is basically a powerful library for JavaScript. What I am trying to do I am trying to have buttons that allow users to add and delete from the table. I already know that I am most likely going to be using AJAX for loading the table contents (as it is not just that I am trying to have loaded, and a dropdown menu is going to determine the table that gets displayed). My question is, when the user clicks the buttons to insert/delete table rows themselves, should I have jQuery handle that in-place, or should I send the table to a document via AJAX to be manipulated and sent back? (I am trying to get that nice no-reload feature on my page.)
has comment: http://stackoverflow.com/comment/44499331
has title: Using AJAX or jQuery to update an HTML table
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44499193
has answer: http://stackoverflow.com/a/28059024
linked to: http://stackoverflow.com/q/16653786
type: Question
has comment: http://stackoverflow.com/comment/44499412
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/44416254
type: Comment
comment on: http://stackoverflow.com/q/28014316
has text: i see the console on chrome and there is no error but i try different console and give me the error in the previous comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/27977762
answer count: 3
linked to: http://stackoverflow.com/q/2680548
has title: Can someone explain why this does not work?
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44373464
has answer: http://stackoverflow.com/a/27984345
score: 2
tagged with: algorithm
has answer: http://stackoverflow.com/a/27977859
type: Question
has answer: http://stackoverflow.com/a/61239267
downvote count: 0
has comment: http://stackoverflow.com/comment/44416939
tagged with: javascript
favorite count: 0
has body: I'm going through the interview cake algorithms. This is basically self-assigned homework. I've given it a few goes, and my solution is fairly ugly, but I don't understand why it's not giving me the correct output. Only one loop executes in the algorithm, and I've tried switching the order, as well as other versions along this line. I'm a little stuck here, and have two questions relating to this algorithm, which I'm trying to complete in straight-up Javascript. Here's the problem: You have an array of integers, and for each index you want to find the product of every integer except the integer at that index. Write a function get_products_of_all_ints_except_at_index() that takes an array of integers and returns an array of the products. Do not use division. The array [1, 7, 3, 4] Would return: [84, 12, 28, 21] By calculating: [7*3*4, 1*3*4, 1*7*4, 1*7*3] My overwrought attempt is below: var l = [84, 12, 28, 21], products_before_curr_index = 1, products_after_curr_index = 1, backwards_index=1, forwards_index, product_array = []; for(var factor=0; factor&lt;l.length; factor++){ forwards_index=factor+1; while(forwards_index&lt;l.length){ products_after_curr_index*=l[forwards_index]; forwards_index+=1; } if(factor&gt;0){ products_before_curr_index *= l[factor-backwards_index]; backwards_index+=1; } product_array.push(products_after_curr_index*products_before_curr_index); backwards_index=1; products_after_curr_index = 1; products_before_curr_index=1; } This returns [84, 12, 28, 3] My questions: Why doesn't this work? Where am I going wrong? There must be a more elegant way to do this using slice or map. I'm stumped. Can someone give me a hint here?

http://stackoverflow.com/a/28063172
has comment: http://stackoverflow.com/comment/44556425
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/44562707
has body: It may be possible to supply a query string param specifying the callback (or none), but if there are any API docs they're in Mandarin (I think), which rules out reading them for me. However, even failing that you can just manipulate the returned data: var regex = /^_ntes_quote_callback\((.*)\);$/, rawContent = HTTP.get(url).content, json = regex.exec(rawContent.content) &amp;&amp; JSON.parse(regex.exec(rawContent.content)[1]); The variable json should then be an object containing your data (apologies, I don't do CoffeeScript).
type: Answer
accepted answer of: http://stackoverflow.com/q/28062206
answers question: http://stackoverflow.com/q/28062206
has comment: http://stackoverflow.com/comment/44538371

http://stackoverflow.com/q/28069885
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28070039
tagged with: android
tagged with: cryptojs
has body: I have to emulate and JavaScript code in Android to do an AES encrytion and decrytion, but my Android code isn't working as JavaScrip code. I have to do the same as this code in JavaScript: I have to do it with bouncycastle lib because the IV has 32 bytes length as you can see, I do it but my code doesn't return the same as this JavaScript code. Anyone know what I am doing wrong, in the android code? This is the android code: private static final String ZERO_PADDING_KEY = "a5240ba5b7cbde89e8075db30138ce64"; private static final String IV = "1ec9b4a4767e582b8a1e3dcad1782f80"; public String encryptURL(String url) { try { Hex hex = new Hex(); byte[] key = ZERO_PADDING_KEY.getBytes("UTF-8"); byte[] iv = IV.getBytes("UTF-8"); PaddedBufferedBlockCipher c = new PaddedBufferedBlockCipher(new CBCBlockCipher(new RijndaelEngine(256)), new ZeroBytePadding()); c.init(true, new ParametersWithIV(new KeyParameter(key), iv)); byte[] res = cipherData(c, url.getBytes("UTF-8")); String resul = bytesToHex(res); return resul; } catch (Exception e) { Log.e("ENCRYPT ERROR", e.getMessage()); e.printStackTrace(); } return ""; } public String decryptUrl(String encrypted) { try { Hex hex = new Hex(); byte[] key = ZERO_PADDING_KEY.getBytes("UTF-8"); byte[] iv = IV.getBytes("UTF-8"); PaddedBufferedBlockCipher c = new PaddedBufferedBlockCipher(new CBCBlockCipher(new RijndaelEngine(256)), new ZeroBytePadding()); c.init(false, new ParametersWithIV(new KeyParameter(key), iv)); byte[] decryptedText = cipherData(c, (byte[]) hex.decode(encrypted)); String decrypted = new String(decryptedText, "UTF-8"); Log.d("DECRYPTED", decrypted); return decrypted; } catch (Exception e) { try { throw new CryptoException("Unable to decrypt", e); } catch (CryptoException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } return ""; } private static byte[] cipherData(PaddedBufferedBlockCipher cipher, byte[] data) throws Exception { int minSize = cipher.getOutputSize(data.length); byte[] outBuf = new byte…
tagged with: encryption
has title: AES encrypt with android from JavaScript code
accepted answer: http://stackoverflow.com/a/28070039

http://stackoverflow.com/q/28026379
accepted answer: http://stackoverflow.com/a/28026407
type: AnsweredQuestion
tagged with: classiejs
score: 0
type: Question
answer count: 2
tagged with: javascript
has title: having trouble understanding classie.js API
has body: Hello all I'm working through an example of a slide and push menu on another site and am struggling to understand an if statement in the classie.js file that is included with the source download. if ( 'classList' in document.documentElement ) { hasClass = function( elem, c ) { return elem.classList.contains( c ); }; addClass = function( elem, c ) { elem.classList.add( c ); }; removeClass = function( elem, c ) { elem.classList.remove( c ); }; } else { hasClass = function( elem, c ) { return classReg( c ).test( elem.className ); }; addClass = function( elem, c ) { if ( !hasClass( elem, c ) ) { elem.className = elem.className + ' ' + c; } }; removeClass = function( elem, c ) { elem.className = elem.className.replace( classReg( c ), ' ' ); }; } I can't seem to wrap my head around the first IF statement. My understanding is that document.documentElement returns the &lt;html&gt; tag, but what is that 'classList' business? The only thing I can find on it was on mdn, but I don't understand at all what that IF statement is testing for. Any help would be appreciated. Thanks
has answer: http://stackoverflow.com/a/28026407
possible better answer: http://stackoverflow.com/a/28026430
has answer: http://stackoverflow.com/a/28026430

http://stackoverflow.com/comment/44544484
has text: You want to search replace the variables with different values as per environment?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28083130
score: 0

http://stackoverflow.com/a/28046931
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28046767
type: Answer
downvote count: 0
has body: I think you want this http://jsfiddle.net/naeemshaikh27/cy84t4pz/ function fun(){ $('body').append('&lt;input type="text"/&gt;'); } $('.addButton').on('click', fun); $('body').on('keypress','input', function(e){ if (e.keyCode == 13) { fun(); } });

http://stackoverflow.com/comment/44327489
type: Comment
has text: Hmm... Well, I can't seem get your fiddle to work... 2 console errors: `moment is not defined` and `$(...).datetimepicker() is not a function`.
score: 0
comment on: http://stackoverflow.com/q/27966645
type: QuestionComment

http://stackoverflow.com/q/28075370
type: Question
has answer: http://stackoverflow.com/a/28075609
has body: I have a CMS in php that will have internal messages. I can get notification if there is a new message when I refresh the page, but I want to get a notification when message is received (same as on facebook). What is best way to do that? I don't want to set a function to check for new messages every 5 min or so because database is big, and it would be best to keep processes at minimum.
tagged with: http://stackoverflow.com/tag/html
score: -1
has comment: http://stackoverflow.com/comment/44530629
tagged with: php
answer count: 1
downvote count: 1
type: UnansweredQuestion
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44529892
favorite count: 0
has title: Best way to set up notification system?
tagged with: notifications

video
tags question: http://stackoverflow.com/q/28102361
type: Tag
tags question: http://stackoverflow.com/q/28033247
tags question: http://stackoverflow.com/q/28044600
tags question: http://stackoverflow.com/q/28022497
tags question: http://stackoverflow.com/q/27987336
tags question: http://stackoverflow.com/q/28051775
tags question: http://stackoverflow.com/q/28082159
tags question: http://stackoverflow.com/q/28092642
tags question: http://stackoverflow.com/q/28001676
tags question: http://stackoverflow.com/q/27989522
tag name: video
tags question: http://stackoverflow.com/q/28070934

http://stackoverflow.com/q/28083990
answer count: 1
linked to: http://stackoverflow.com/q/6103770
accepted answer: http://stackoverflow.com/a/28084021
has comment: http://stackoverflow.com/comment/44545920
has title: PHP code inside script tag for redirecting to another page
tagged with: php
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/28084021
has body: I have a list of users besides that are the delete button. Where in when you click the delete button a confirm() script will appear. I used this code but the one being deleted is always the last id. button onclick="myFunction()"&gt;Delete&lt;/button&gt;&lt;/td&gt; &lt;script&gt; function myFunction() { if(confirm("Are you sure you want to delete this?") == true) { window.location.href = "delete.php?id=&lt;?php echo $r-&gt;id); ?&gt;"; } else { // } } &lt;/script&gt;
tagged with: javascript
score: 0

http://stackoverflow.com/q/28061657
type: UnansweredQuestion
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/44509831
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44504390
has title: Issue with truncating html content in jQuery
has comment: http://stackoverflow.com/comment/44504908
has comment: http://stackoverflow.com/comment/44507221
has body: Here is my truncate function: function truncate_updates(txt, cnt, opt) { if(updates_topic=='') { return truncateText(txt, cnt, opt); } else { return txt; } } function truncateText(text, len, show_readmore) { if(text==''|| text==null) return; if(text.length > len) { if(show_readmore == 'truncate') text = text.substring(0, len)+'...'; else if(show_readmore=='link') text = text.substring(0, len)+' more'; else if(show_readmore != false) text = ''+text.substring(0, len)+' read more'+text+''; } return text; } The HTML content breaks when i try to truncate using this function. HTML Content: dsdsdsad sdasdasd dsdasd asdasdsa sdasdasdasd sdasdasdasd sdsadasdasd sdasdasdasd sdasdasdasd sdasdsd dssds sdsds sdsds sdsd sdsdsd sdsdsd sdsd #fourthambit #socialmedia #development #cakephp #php

http://stackoverflow.com/q/27980428
has title: Javascript file.type is not working on IE 11
tagged with: javascript
tagged with: jquery
tagged with: file-upload
favorite count: 0
has comment: http://stackoverflow.com/comment/44426011
has comment: http://stackoverflow.com/comment/44353513
has comment: http://stackoverflow.com/comment/68432217
type: UnansweredQuestion
tagged with: mime-types
has comment: http://stackoverflow.com/comment/44474848
has comment: http://stackoverflow.com/comment/44475661
answer count: 0
linked to: http://stackoverflow.com/q/32849014
upvote count: 3
has comment: http://stackoverflow.com/comment/44353649
type: Question
has comment: http://stackoverflow.com/comment/44650456
score: 3
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/44352393
has body: I am trying to check the file type in javascript and my code is: file.type.match('application/pdf') function checkPropertyFileValidity(){ var property_file_input = document.getElementById('property_file'); if(!jQuery('.property_doc_div .property_doc_icon').hasClass("hidden")) { jQuery('.property_doc_div .property_doc_icon').addClass("hidden"); } if (property_file_input.files &amp;&amp; property_file_input.files[0]) { var property_file = property_file_input.files[0]; jQuery('.property_doc_div .remove_selected_file').removeClass('hidden'); if(property_file.type.match('application/pdf') &amp;&amp; property_file.size &lt;= 5242880) { console.log(property_file.type.match('application/pdf')); jQuery('.help-inline.property_file_error').html(''); jQuery('.property_doc_div #property_doc_icon').attr("title",property_file.name); jQuery('.property_doc_div .property_doc_icon').removeClass("hidden"); return true; } else if(!property_file.type.match('application/pdf')) { console.log(property_file.type.match('application/pdf')); jQuery('.help-inline.property_file_error').html('You can select only pdf files'); return false; } else if(property_file.size &gt; 5242880) { jQuery('.help-inline.property_file_error').html('File can not be greater than 5 MB'); return false; } } return true; } Following is the version of my IE 11 and doing file.type gives empty string. Now this thing works good for chrome , Firefox and on IE 10 but not on IE 11. Kindly help me !!!
has comment: http://stackoverflow.com/comment/44475814
downvote count: 0

http://stackoverflow.com/q/27968580
tagged with: javascript
has answer: http://stackoverflow.com/a/27968581
tagged with: firefox-addon
downvote count: 0
answer count: 1
favorite count: 0
has title: Context menu JavaScript can not get the selected text if the text is a input tag / textbox
type: UnansweredQuestion
tagged with: contextmenu
tagged with: clipboard
score: 1
has body: I had a very big problem, to get somehow the selected text from the webpage then process it using a contextmenu... when I solved for Chrome, Firefox, and IE11, I found I can't get the selected text in Firefox and Internet Explorer when the selected text is in a Input box.... I have searched for days to solve somehow, and finally I had success... This was the original script for Internet Explorer var parentwin = external.menuArguments var selectedText = getSel(); function getSel(){ var w=window,d=parentwin.document,gS='getSelection'; return (''+(w[gS]?w[gS]():d[gS]?d[gS]():d.selection.createRange().text)).replace(/(^\s+|\s+$)/g,''); } And this for FireFox var contextMenu = require("sdk/context-menu"); var tabs = require("sdk/tabs"); var clipboard = require("sdk/clipboard"); var {Cc,Ci} = require('chrome'); var simpleGetLibrary = null; var menuItem = contextMenu.Item({ label: "Get selected text", context: contextMenu.SelectionContext(), contentScript: 'self.on("click", function () {' + ' var text = window.getSelection().toString();' + ' self.postMessage(text);' + '});', onMessage: function (selectionText) { console.log(selectionText); clipboard.set(selectionText); //this line copy the selected text to Clipboard } But I had no idea, how I can solve to get somehow the text when it is in a input box... &lt;INPUT&gt; ...&lt;/INPUT&gt; The solution is the following...
upvote count: 1
type: Question
tagged with: internet-explorer

http://stackoverflow.com/comment/44596432
score: 0
type: Comment
has text: ?? XSS attacks usually exploit simple things like failure to HTML-escape user-supplied data when it's echoed back out in HTML responses. Of course, XSS and SQL Injection are two flavors of the same basic attack strategy; log poisoning is another.
comment on: http://stackoverflow.com/a/28111335
type: AnswerComment

http://stackoverflow.com/comment/44418036
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28015207
type: Comment
has text: No thanks, you're always welcome. This is pretty much your code, i've changed some variable names so it reads more easily and i've left out your popup and clickhandler, for the rest it's the same. Good luck with your project. PS. You might want to take a look at this tutorial on layerGroups with the corresponding controls, i think it's what you're trying to accomplish: [http://leafletjs.com/examples/layers-control.html](http://leafletjs.com/examples/layers-control.html)

http://stackoverflow.com/comment/44524051
has text: im gonna check it tommorow as soon as i go to work and i will keep you informed on my findings
type: QuestionComment
comment on: http://stackoverflow.com/q/28069426
score: 0
type: Comment

http://stackoverflow.com/q/28091851
has body: Just like the title says...I need help building a better accordian menu with jquery animation. However, the menu is built using tables and I don't have access to the HTML. Here is what I have so far, but I'm not happy with the result (it's too jerky). jq16 = jQuery.noConflict(true); jq16(document).ready(function(){ jq16("td.categorySidebar table tr").each(function() { //IE fix - get all tr and rebuild to end of table jq16(this).appendTo("td.categorySidebar table tbody"); //get all level1 td if(jq16(this).children().hasClass('categorySidebarLabelLevel1')) { //add same td class to parent tr and apply show function jq16(this).addClass(jq16(this).children().attr('class')); //add hover to level1 tr jq16(this).hover( function(){ if(jq16(this).hasClass('categorySidebarLabelSelected') || jq16('&gt; td table tr td',this) .hasClass('categorySidebarLabelSelected')) { return false; } else { jq16('&gt; td table',this).stop(true, true).toggle(); } } ); } }); //on document load build table of sub-levels and check to see // what is selected to show/hide jq16("td.categorySidebar table tr[class^='categorySidebarLabelLevel1']") .each(function(k,v) { //wrap the sub-levels in table and hide var subCat = jq16(this).nextUntil("[class^='categorySidebarLabelLevel1']") .wrapAll('&lt;table style="display: none;" &gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;'); //Append table of sub-levels to level1 td so we can apply hover function jq16(subCat).parent().parent().appendTo(jq16(this).children('td')); //Check level1 to see if it is selected if(jq16(this).hasClass('categorySidebarLabelSelected')) { jq16(this).children().children().show(); } //check each sub-level to see if it is selected jq16(subCat).each(function() { if(jq16(this).children().hasClass('categorySidebarLabelSelected')) { jq16(this).parent().parent().show(); } }); }); }); http://jsfiddle.net/u1unzpzs/2/
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28092358
answer count: 2
upvote count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28092264
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Jquery accordion menu built using tables

http://stackoverflow.com/q/28103121
score: 0
has body: When you export your model from Blender to Three.js you end up with a file with JSON data inside. I know two ways of loading this model from that file: var loader = new THREE.JSONLoader() var material = new THREE.MeshPhongMaterial({color: '#8080a0'}) 1. loader.load('tower.json', function (geometry) { var mesh = new THREE.Mesh(geometry, material) }) 2. Edit tower.js file and add var tower = in first line. Then you can load it with: var towerModel = loader.parse(tower) var mesh = new THREE.Mesh(towerModel.geometry, material) I like second solution more because using loader.load() function every time you want to create a mesh when you have thousands of meshes based on the same model is very slow and can easly kill your browser. So my question is - can I get JSON data from tower.json file into a variable without editing the file manually? The best solution would be to get JSON data into a variable without making changes to the file.
has comment: http://stackoverflow.com/comment/44583680
type: UnansweredQuestion
tagged with: three.js
has comment: http://stackoverflow.com/comment/44581914
has comment: http://stackoverflow.com/comment/44582504
has answer: http://stackoverflow.com/a/28106167
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 1
tagged with: javascript
has title: How to assign to variable content of Three.js model file
has comment: http://stackoverflow.com/comment/44583835
has comment: http://stackoverflow.com/comment/44583796

http://stackoverflow.com/comment/44590087
has text: you should build a simple example which represents your problem. this will help us help you ;)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28107126

http://stackoverflow.com/comment/44399153
type: QuestionComment
comment on: http://stackoverflow.com/q/28005368
has text: Please write a function and pass the div into it. Duplicate logic...
score: 0
type: Comment

http://stackoverflow.com/comment/44546450
has text: @Iv0gun uploadedPhoto is enhoed with php
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28081985
type: QuestionComment

http://stackoverflow.com/comment/45006191
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28059155
has text: Hi Raanan, I finally figured it out. I had an older Babylon.js version, once I got the latest it just worked. Thank you for reaching out!

http://stackoverflow.com/comment/44723829
has text: Fair enough. I'm not a coder. and was tired of google searching. But I ended up finding a solution.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28119840

http://stackoverflow.com/a/28013889
answers question: http://stackoverflow.com/q/28012917
has body: If by load website you meant to load web page that is not part of your application, I know that most people use . Just a short example how you can you do it: iframe is not supported. But, if you meant to load a web page from your application, then you need to render partial views. [HttpGet] [ChildActionOnly] public PartialViewResult PartialName() { return PartialView(); } and call it in your layout like this: @Html.Action("PartialName", "ControllerName") Hope this helps. :)
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/28012917
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/44600884
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28113399
has text: So to be clear: the click event takes precedence prior to the dragstart event ? And is there an online demo of that jQuery plugin ? I only see the code on github.
type: Comment

dopostback
tags question: http://stackoverflow.com/q/28100970
tag name: dopostback
type: Tag

http://stackoverflow.com/comment/44617974
has text: Thanks Eleanor. But the thing is, the only way I could successfuly print a PDF was to load it directly in the iframe, and then call iframe's print() fucnction. You are right. I don't have any HTML in the iframe, pure PDF content. SO there's no way to add an event listener in the iframe to capture the message sent from the main window... :(
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28120732

http://stackoverflow.com/comment/44458123
type: AnswerComment
type: Comment
has text: What do you mean with "when the jstree-icon" is called? Can you show us the surrounding code? If you are looking for elements whose id does **not** contain the word `unit` you can use the [:not jQuery selector](http://api.jquery.com/not-selector/). I changed the answer accordingly.
comment on: http://stackoverflow.com/a/27988914
score: 0

http://stackoverflow.com/a/54164872
score: 0
type: Answer
has body: The state is the origin of truth, where your data lives. You can say the state manifests itself via props. Providing props to components is what keeps your UI in sync with your data. A component is really just a function that returns markup. Given the same props (data for it to display) it will always produce the same markup. So the props are like the pipelines that carry the data from the origin to the functional components.
answers question: http://stackoverflow.com/q/27991366

http://stackoverflow.com/q/28055070
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/28055101
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has title: Cannot set property 'helloMessage' of undefined
has body: I get the error following error Cannot set property 'helloMessage' of undefined when I run the following code: HTML: Hello World {{helloMessage}} Javascript (helloWorld.js): (function (angular) { function HelloWorldCtrl ($scope) { $scope.helloMessage = "Hello World"; } angular.module("app", []).controller("HelloWorldCtrl", ["$scope", HelloWorldCtrl()]); })(angular); Any ideas? I am using angular version 1.2.28
accepted answer: http://stackoverflow.com/a/28055101
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/44447143
comment on: http://stackoverflow.com/q/27994684
type: Comment
type: QuestionComment
has text: Auctions But it won't help unless you look at the links I've provided.
score: 0

http://stackoverflow.com/comment/44485616
comment on: http://stackoverflow.com/a/28051236
type: AnswerComment
score: 0
type: Comment
has text: Thanks - this is the simplest explanation of exports I've found. I thought it was something to do with giving the module an ID of some kind.

http://stackoverflow.com/comment/44365566
type: QuestionComment
score: 1
has text: Check if the object has the property. http://stackoverflow.com/questions/135448/how-do-i-check-if-an-object-has-a-property-in-javascript
comment on: http://stackoverflow.com/q/27987218
type: Comment

http://stackoverflow.com/q/27994080
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/44379000
accepted answer: http://stackoverflow.com/a/27994248
possible better answer: http://stackoverflow.com/a/27994295
has answer: http://stackoverflow.com/a/27994295
has title: Alignment of JS Script and HTML form
tagged with: javascript
tagged with: alignment
tagged with: forms
has comment: http://stackoverflow.com/comment/44379289
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44378925
has answer: http://stackoverflow.com/a/27994248
type: Question
has comment: http://stackoverflow.com/comment/44378847
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44379184
has comment: http://stackoverflow.com/comment/44379065
has body: I have a JS &lt;script&gt; function and then a HTML&lt;form&gt; script and I am trying to implement them into my webpage side by side. However, When I implement them into the page they automatically put themselves one above the other as if there was a &lt;br&gt; in my script. &lt;!DOCTYPE html&gt; &lt;HTML&gt; &lt;HEAD&gt; &lt;TITLE&gt;test&lt;/TITLE&gt; &lt;BODY&gt; &lt;script type="text/javascript" src="http://se-flair.appspot.com/4146548.js"&gt;&lt;/script&gt;&lt;form action="http://www.qrz.com/lookup" method="post" style="display:inline"&gt;&lt;b&gt;QRZ callsign lookup:&lt;/b&gt; &lt;input name="callsign" size="8" type="text" /&gt; &lt;input type="submit" value="Search" /&gt;&amp;nbsp;&lt;/form&gt; &lt;/HTML&gt; All of the information I have found says that I would need to download the .js from the server and modify some of its code and remove the &lt;br&gt;that may be inside it but I am not sure if there is any other way to do it.
has answer: http://stackoverflow.com/a/27994382

http://stackoverflow.com/comment/44560307
type: AnswerComment
comment on: http://stackoverflow.com/a/28076790
has text: The only thing that needs to be a secret is the .pem file, so as long as that's securely stored on the server, it shouldn't be a problem. Access tokens are often exposed on the client, which is why they expire after an hour.
type: Comment
score: 0

http://stackoverflow.com/a/28096074
has comment: http://stackoverflow.com/comment/44568043
has body: If you only want to create an object based on the array, do like this. var objectExample = { piecesArray:pieces, takenArray:taken, topArray:top, leftArray:left } console.log(objectExample);
type: Answer
answers question: http://stackoverflow.com/q/28095931
downvote count: 2
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28095931
has comment: http://stackoverflow.com/comment/44567960
score: -1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44567996

onsen-ui
tags question: http://stackoverflow.com/q/28017925
tag name: onsen-ui
tags question: http://stackoverflow.com/q/27981722
type: Tag
tags question: http://stackoverflow.com/q/28088990

http://stackoverflow.com/a/34312904
score: 1
upvote count: 1
has body: Really ,i am wondered why there are a complicated answers here ,while , Javascript is a functional programming language : Just one line : array3= array1.map(function(e,i){return {value : (e.value * array2[i].value)}; }) ; Fiddle
answers question: http://stackoverflow.com/q/28013676
downvote count: 0
type: Answer

partial-application
type: Tag
tag name: partial-application
tags question: http://stackoverflow.com/q/27996544

http://stackoverflow.com/comment/44392082
score: 1
comment on: http://stackoverflow.com/q/28001490
has text: Where is third level image? Elaborate your problem, as of now is its very unclear
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44459519
type: Comment
comment on: http://stackoverflow.com/a/28024034
type: AnswerComment
has text: Hi Swapnil thanks. Time I am trying to get a value from localstorage asynchronously (using multiple tab) I am facing this problem but if i fetch(localStorage.getItem()) using a loop i get same value every time. even if I am not changing value in between is it some where related to synchronization?
score: 0

http://stackoverflow.com/comment/44481847
type: Comment
comment on: http://stackoverflow.com/a/28048238
score: 1
type: AnswerComment
has text: Another happy ending ;-)

http://stackoverflow.com/comment/44508653
comment on: http://stackoverflow.com/q/28061937
has text: Alright, they have same fields.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28086129
upvote count: 2
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/28086064
has body: Instead of using getElementById, you can use getElementsByClassName. document.getElementsByClassName('className')
score: 2

http://stackoverflow.com/comment/83035322
score: 3
has text: As of today (December 2017), `gulp-util` has been deprecated: https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
type: AnswerComment
comment on: http://stackoverflow.com/a/27975742
type: Comment

http://stackoverflow.com/q/28016337
favorite count: 0
tagged with: cordova
has body: I am just getting started developing an app with Ionic in the new Visual Studio Apache Cordova Tools. I have created a home page using one of the Ionic tutorials (almost copy and paste) and tested it in the Ripple Emulator as well as on a real device, both run with the same result. They both run fine as apps but Ionic fails to render anything. In Visual Studio I get the following JavaScript error: "Uncaught TypeError: Cannot set property 'content' of undefined" File: ionic.js, Line 3898, Column: 23 This is where the ionic.js file tries to set the property of viewportTag.content but the viewport variable is undefined. function viewportTagUpdate() { var key, props = []; for (key in viewportProperties) { if (viewportProperties[key]) { props.push(key + (viewportProperties[key] == '_' ? '' : '=' + viewportProperties[key])); } } viewportTag.content = props.join(', '); } The viewportTag.content = props.join(', '); is where the error is. This is my HTML: Test Tabs App Home Tab About Tab Has anyone ran into this problem with Ionic before and knows how to solve it? -Kyle
tagged with: visual-studio
type: AnsweredQuestion
score: 3
has title: Ionic & Visual Studio/Cordova - Ionic not working
upvote count: 3
tagged with: ionic-framework
type: Question
has comment: http://stackoverflow.com/comment/44562589
downvote count: 0
tagged with: javascript
tagged with: visual-studio-cordova
has answer: http://stackoverflow.com/a/28461093
accepted answer: http://stackoverflow.com/a/28461093
answer count: 1

http://stackoverflow.com/q/27986075
has title: DOM manipulation using PhantomJS
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27999645
accepted answer: http://stackoverflow.com/a/27999645
type: Question
has comment: http://stackoverflow.com/comment/44363269
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44364128
has comment: http://stackoverflow.com/comment/44363245
has body: I'm web scraping a web page Using Phantomjs and replacing canvas element with image as follows. but when I try to modify some element's inner HTML to image its not working. Can any one tell me what's wrong? var page = require('webpage').create(); var fs = require('fs'); var URL = 'some web url'; page.open(URL, function(status) { if (status !== 'success') { console.log('Unable to access network'); } else { var clipRect = page.evaluate(function() { return document.getElementById("some-id").getBoundingClientRect(); }); page.clipRect = { top : clipRect.top, left : clipRect.left, width : clipRect.width, height : clipRect.height }; page.render('canvas.png'); // modify one element's inner html before writing into file // document.getElementById("some-id").innerHTML = '&lt;img src="capture.png"&gt;'; fs.write('email.html', page.content, 'w'); phantom.exit(); } }); PS: New to nodejs and phantomjs
has comment: http://stackoverflow.com/comment/44363757
tagged with: phantomjs
type: AnsweredQuestion

http://stackoverflow.com/comment/44465843
comment on: http://stackoverflow.com/q/28040938
has text: Depends on how position is determined. Overall question is pretty vague
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44567982
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/28096012
type: Comment
has text: you should remove quotes: `className={classes}`

http://stackoverflow.com/comment/44477508
has text: Just one idea: Maybe you can use the split fields step. Then you have the values in a row and can sum them up back to str1 (you mentioned sum up so maybe you don't need the values, but the result)
comment on: http://stackoverflow.com/a/28042731
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44604139
type: QuestionComment
comment on: http://stackoverflow.com/q/28076875
has text: Maybeyou could try asking me to, rather than telling me to.
score: 0
type: Comment

http://stackoverflow.com/q/28026795
answer count: 0
has title: return value from phonegap confirm callback function to calling function
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/44439224
has body: how to get return value from phonegap confirm callback function to calling function.I want to return sureDelete set by callback function. var DeleteGroup= function(){ var sureDelete; var render = function() { promptfun(); return sureDelete; }; var promptfun = function(){ navigator.notification.confirm( 'Are you sure you want to delete group?', confirmHandler, 'Delete Group', ['Cancel','Delete'] ); }; var confirmHandler = function(buttonIndex){ if(buttonIndex == 2){ sureDelete = true; }else{ sureDelete = false; } }; return { render:render }; };
has comment: http://stackoverflow.com/comment/44478673
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44459524
favorite count: 0
has comment: http://stackoverflow.com/comment/44477935
has comment: http://stackoverflow.com/comment/44477179
tagged with: cordova

http://stackoverflow.com/q/28069445
tagged with: javascript
has answer: http://stackoverflow.com/a/28070311
score: 0
answer count: 1
tagged with: meteor
has body: I want to store the handle giving by Meteor.setTimeout() into my own Timers Collection. The problem is i get a Maximum call stack size exceeded error doing this... Client side I get an int ID but server side I get a object like this that my update function doesn't want to store... { _idleTimeout: 10000, _idlePrev: { _idleNext: [Circular], _idlePrev: [Circular], msecs: 10000, ontimeout: [Function: listOnTimeout] }, _idleNext: { _idleNext: [Circular], _idlePrev: [Circular], msecs: 10000, ontimeout: [Function: listOnTimeout] }, _idleStart: 1421848999217, _monotonicStartTime: 4341630336, _onTimeout: [Function], _repeat: false } Look at my code (only server side), here is timer creation: triStartTimer: function (timerId, timerDuration) { var meteorTimer = Meteor.setTimeout(function() {timerCallbackTimeout(timerId);}, timerDuration); console.log(meteorTimer); var start = new Date().getTime(); var data = { duration : timerDuration, timerID : meteorTimer, start : start, state : timerStateEnum.RUNNING }; var ret = updateTimerInfos(timerId, data); return ret; }, The update function that get the Maximum call stack size exceeded : var updateTimerInfos = function (id, data) { var ret = Timers.update(id, { $set : { duration : data.duration, timerID : data.timerID, // Without this, the function works fine start : data.start, state : data.state } }, function (error, result) { if (error) { console.log("updateTimer FAILED !!!"); console.log("reason : " + error.message); } } ); return ret; } Anyway, the Timeout work fine. The callback is called with the right value. But I need the ID to disarmed the Timeout in certain conditions... If you have an idea or the solution, feel free =)
accepted answer: http://stackoverflow.com/a/28070311
type: AnsweredQuestion
has title: Store Meteor.setTimeout return value in Collection
type: Question
tagged with: timeout

http://stackoverflow.com/a/28025268
upvote count: 2
accepted answer of: http://stackoverflow.com/q/28025194
has comment: http://stackoverflow.com/comment/44441789
score: 2
type: AcceptedAnswer
downvote count: 0
has body: I think you are getting problem because in compareFunction you are saying a-b; remember "str1"-"str2" will return a NaN. So you are not going to get expected results. Say like bellow if you want to get it sorted in ascending order a&gt;b; OR a.localeCompare(b); Full Code var numbers = ['Hammer',"Hamburger"]; numbers.sort(function(a, b) { return a.localeCompare(b); }); console.log(numbers); //["Hamburger", "Hammer"]
type: Answer
has comment: http://stackoverflow.com/comment/44436254
has comment: http://stackoverflow.com/comment/44435911
answers question: http://stackoverflow.com/q/28025194

http://stackoverflow.com/comment/44613207
type: Comment
type: QuestionComment
has text: I want to replace them by inserting apostrophe (') instead of question marks. Thanks
score: 0
comment on: http://stackoverflow.com/q/28119461

http://stackoverflow.com/a/29692702
answers question: http://stackoverflow.com/q/27983939
type: Answer
upvote count: 1
score: 1
has body: Do one thing paste below function in your function file :- function redirect($url=NULL) { if(is_null($url)) $url=curPageURL(); if(headers_sent()) { echo " "; } else { header("Location:".$url); } exit; } And the call this function like : redirect($url); so when you will get the data from facebook so after apply the check on $user_profile you can redirect user via above function, this function will check if header already sent then it will use javascript else it will user Header().
downvote count: 0

http://stackoverflow.com/q/28005281
has body: I am sending data to a Class at parse.com, I would like to run this function and update the $scope without having to reload the view. To create a Programme running the function below works fine, however it sometimes does not update the view following creating a new programme and it requires a page refresh (when the whole function is called as seen at the bottom - getProgrammes(); getProgrammes = function() { $ionicLoading.show(); var programmesArray = []; var QueryProgramme = Parse.Object.extend("Programme"); var query = new Parse.Query(QueryProgramme); query.equalTo("userId", userId); query.find({ success: function(results) { for(var i=0; i &lt; results.length; i++) { var object = results[i]; var programmeData = { title : object.get('programmeTitle'), id : object.id, exercises : object.get('exerciseData') }; programmesArray.push(programmeData); } $scope.programmes = programmesArray; $scope.$apply(); $ionicLoading.hide(); }, error: function(error) { alert('You do not have any Programmes - please create one'); } }) }; getProgrammes(); I think I may be hacking this by using $scope.apply() - therefore making it unreliable. Assistance on the correct function to use in order to automatically update $scope would be great.
tagged with: ionic-framework
accepted answer: http://stackoverflow.com/a/28007376
tagged with: function
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: angularjs
favorite count: 0
score: 2
tagged with: parse-platform
upvote count: 2
has comment: http://stackoverflow.com/comment/44400012
has answer: http://stackoverflow.com/a/28007376
has title: Sending data to parse.com and update angular $scope
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/84735522
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28055203
has text: No matter how you try there will be gaps in your lib. Better to use just the onerror without the stack and don't care much about old browsers. Is this an open source project btw? I am working on a js error lib for logging errors and parsing the stack. Originally I wanted a V8 polyfill, but it is not possible to do that. At least I don't want to wrap everything like you do, because using try-catch blocks slows down the code afaik.

http://stackoverflow.com/a/28080460
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/44539738
has body: Change &lt;td class="td_icon" ng-switch="{{trans.type}}"&gt; To &lt;td class="td_icon" ng-switch="trans.type"&gt; The term expression can sometimes be confusing in angular docs Working Plunker
upvote count: 5
accepted answer of: http://stackoverflow.com/q/28080422
answers question: http://stackoverflow.com/q/28080422
score: 5

http://stackoverflow.com/comment/98827316
has text: it is not possible but i like the idea so voting up :-). It will help us to further reduce the code.
comment on: http://stackoverflow.com/q/28104765
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/28018925
tagged with: javascript
tagged with: console
accepted answer: http://stackoverflow.com/a/28018963
has comment: http://stackoverflow.com/comment/44424544
tagged with: this
linked to: http://stackoverflow.com/q/30894798
favorite count: 0
has body: From the node REPL: $ node &gt; var x = 50 &gt; console.log(x) 50 &gt; console.log(this.x) 50 &gt; console.log(this === global) true Everything makes sense. However, when I have a script: $ cat test_this.js var x = 50; console.log(x); console.log(this.x); console.log(this === global); $ node test_this.js 50 undefined false Not what I expected. I don't really have a problem with the REPL behaving differently from a script, but where exactly in the Node documentation does it say something like "NOTE: when you run a script, the value of this is not set to global, but rather to ___________." Does anyone know, what this refers to in the global context when run as a script? Googling "nodejs this global context script" takes me to this page which looks very promising, as it describes contexts for running scripts, but it doesn't seem to mention the use of the this expression anywhere. What am I missing?
linked to: http://stackoverflow.com/q/20861049
upvote count: 2
has title: What is the context for `this` in Node.js when run as a script?
duplicate of: http://stackoverflow.com/q/20861049
has comment: http://stackoverflow.com/comment/44424591
tagged with: node.js
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28018963
has comment: http://stackoverflow.com/comment/44424579
type: Question
linked to: http://stackoverflow.com/q/6396467
downvote count: 0
answer count: 1

http://stackoverflow.com/a/27973284
type: Answer
answers question: http://stackoverflow.com/q/27972694
score: 0
has body: Instead of declaring resultValue as : var resultValue = someMethod(value); You can do global.resultValue = someMethod(value); This will make resultValue as a global variable. You can access it anywhere using global.resultValue. Similarly,instead of using global you can also use process. global and process are global objects for nodejs just like window is for javascript.

http://stackoverflow.com/a/28058088
answers question: http://stackoverflow.com/q/28058037
upvote count: 2
downvote count: 0
type: Answer
score: 2
has body: The syntax is: $('.inner').wrap('); So it would be something like: $('img').wrap('')

http://stackoverflow.com/comment/44373046
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27991097
has text: @MoosMas check the selectors `document.getElementById("#val1")`
type: AnswerComment

http://stackoverflow.com/q/28007126
tagged with: php
type: AnsweredQuestion
score: 1
has body: I am using wordpress and I have some custom js in an external file in the root of my child theme. I want the reference to this js file written to the very end of the html document just before the closing body tag. I first tried hardcode the reference into footer.php. I verified that the reference to the external js file was correct in the html source but the javascript did nothing, and also did not throw any errors in firebug. The external file contained only: jQuery(document).ready(function(){ alert('hello') }); So after googling this problem for a while I found that I will need to use wp_register_script and wp_enqueue_script I found documentation here and here but I am not very familiar with php... Currently, I have added: add_action('wp_enqueue_scripts', 'load_javascript_files'); function load_javascript_files() { wp_register_script('scripts', get_template_directory_uri() . 'wp-content/themes/maya_child/scripts.js', array('jquery'), true ); wp_enqueue_script('scripts'); } to my child theme's functions.php file. The result is that the reference to my custom scripts file does not print out in the source at all Am I maybe missing a step, or have I screwed up the php? Do I need to add something to header.php? or footer.php?
type: Question
has answer: http://stackoverflow.com/a/28007242
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/28007242
tagged with: wordpress-theming
has title: How can I run external js file from child theme in wordpress
tagged with: wordpress
upvote count: 1

http://stackoverflow.com/comment/44547995
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28084405
has text: @Xotic750 yea I thought the same for the image just right click and open in image in new tab
score: 0

ruby
tags question: http://stackoverflow.com/q/28014526
tags question: http://stackoverflow.com/q/28115916
tags question: http://stackoverflow.com/q/28071251
tag name: ruby
tags question: http://stackoverflow.com/q/28100354
tags question: http://stackoverflow.com/q/28102146
tags question: http://stackoverflow.com/q/28068404
tags question: http://stackoverflow.com/q/28096253
tags question: http://stackoverflow.com/q/28059405
tags question: http://stackoverflow.com/q/28098124
tags question: http://stackoverflow.com/q/28068088
tags question: http://stackoverflow.com/q/27996176
tags question: http://stackoverflow.com/q/28055888
tags question: http://stackoverflow.com/q/28059390
tags question: http://stackoverflow.com/q/28026692
tags question: http://stackoverflow.com/q/27976245
tags question: http://stackoverflow.com/q/28033759
tags question: http://stackoverflow.com/q/28070388
tags question: http://stackoverflow.com/q/28033986
tags question: http://stackoverflow.com/q/28114873
type: Tag

http://stackoverflow.com/q/28001835
has answer: http://stackoverflow.com/a/28004178
tagged with: conditional-statements
has comment: http://stackoverflow.com/comment/44393616
has body: I'm only a 5th semester IT student which is just starting to learn web programming, and I have to validate an address textarea in condition like this: Address: must be filled. should be more than 14 characters. must start with word ‘Street’. is alphanumeric only. &lt;html&gt; &lt;head&gt; &lt;title&gt;Baggy Bag Shop Membership Registration&lt;/title&gt; &lt;link href="mystyle.css" rel="stylesheet" type="text/css"&gt; &lt;script type="text/javascript" lang="javascript"&gt; function validasi() { var nama = document.getElementById("nama"); var password = document.getElementById("password"); var konfirmasi = document.getElementById("konfirmasi"); var email = document.getElementById("email"); var phone = document.getElementById("phone"); var radio1 = document.getElementById("male").checked; var radio2 = document.getElementById("female").checked; var address = document.getElementById("address"); var agreement = document.getElementById("agreement"); if (nama.value == "") { alert("Please fill in your name!"); return false; } if ((nama.value).length &lt; 7) { alert("Username must be more than 6 characters."); return false; } if (password.value == "") { alert("Please fill your password"); return false; } if ((password.value).length &lt; 8) { alert("Password length must be more than 7 characters."); return false; } if (konfirmasi.value == "") { alert("Enter the password confirmation!"); return false; } if (konfirmasi.value != password.value) { alert("Password confirmation does not match!"); return false; } if (email.value == "") { alert("Please enter your E-Mail address!"); return false; } var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if (reg.test(email.value) == false) { alert('Invalid email address'); return false; } if (phone.value == "") { alert("Please fill out your phone number"); return false; } if (isNaN(phone.value)) { alert("Invalid Phone number!"); return false; } if ((radio1 == "") &amp;&amp; (radio2 == "")) { alert("Please state your gen…
tagged with: forms
has comment: http://stackoverflow.com/comment/44393121
type: Question
tagged with: if-statement
has comment: http://stackoverflow.com/comment/44393332
tagged with: javascript
has title: Validating Javascript Form in this conditions statements?
has comment: http://stackoverflow.com/comment/44396969
score: 0
tagged with: validation
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44393017
has comment: http://stackoverflow.com/comment/44393092

http://stackoverflow.com/q/27975485
has title: Back again, need help fixing JS game
type: Question
tagged with: javascript
downvote count: 4
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/27975512
favorite count: 0
type: UnansweredQuestion
score: -4
has body: To be clear, this is a standalone javascript game to help me get more involved with the syntax. At this moment I am trying to figure out a way to add a list function to list all of the things added in an array from that session(I am still learning how to implement this to be used with cookies and HTML). //We name the functions. function Person(name, personAge) { this.name = name; this.personAge = personAge; } function Animal(animalName, species, breed) { this.animalName = animalName; this.species = species; this.breed = breed; } function CreateYourOwn(creativeName, species2, power, customAge) { this.creativeName = creativeName; this.species2 = name; this.power = power; this.customAge = customAge; } //We list the arrays. var Persons = [ ]; var Animals = [ ]; var Customs = [ ]; function creator() { //I start the prompt to ask the user which one. var personPrompt = prompt("Welcome to virtual reality! Put in 'person' for person creator, 'animal' for animal creator, and 'custom' for custom creator! Or, if you want to list your creations, type in 'list'! NOTE: All creations will be deleted upon reload.").toLowerCase(); //And this is where I am right now. switch (personPrompt) { case 'person': var name = prompt("Name:").replace(/['"]/g, ''); var age = prompt("Age:").replace(/['"]/g, ''); var person = new Person(name, age); Persons.push(person); break; case 'animal': var animalName = prompt("What is the name of your animal?"); var species = prompt("What species is it?"); var breed = prompt("What breed is it?"); var animal = new Animal(animalName, species, breed); Animals.push(animal); break; case 'custom': var creativeName = prompt("What do you call this thing?"); var species2 = prompt("What do you describe as the species as a whole?"); var power = prompt("What can this thing do?(ex. shoot lasers, change eye color, etc)"); var customAge = prompt("How old is this thing?"); var custom = new CreateYourOwn(creativeName, species2, power, customAge); break; case 'list': var list_…

http://stackoverflow.com/q/28019245
has comment: http://stackoverflow.com/comment/44428413
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44428236
tagged with: node.js
answer count: 0
has body: I am working on a nodejs application in which main js file controlling states is angular.module('dreamflow', ['ui.router']) .config(['$urlRouterProvider', '$stateProvider', function($urlRouterProvider, $stateProvider) { $urlRouterProvider.otherwise('/'); $stateProvider .state('dashboard', { url: '', name: 'dashboard', templateUrl: '/browser/views/dashboard.html' }) .state('dashboard.processCreation', { url: '/processCreation', name: 'processCreation', parent: 'dashboard', templateUrl: '/browser/views/processCreation.html' }) .state('dashboard.formCreation', { url: '/formCreation', name: 'formCreation', parent: 'dashboard', //mandatory templateUrl: '/browser/views/formCreation.html' }); } ]); I am working on page processCreation. where i am creating a process and then i have to redirect to formCreation page for this i am using $location.url = ('/formCreation'); but it is not able to redirect it?
has comment: http://stackoverflow.com/comment/44426804
type: Question
has title: Trouble in redirecting page in nodejs
tagged with: javascript
has comment: http://stackoverflow.com/comment/69758290
score: 0

http://stackoverflow.com/q/28032921
has answer: http://stackoverflow.com/a/28041855
tagged with: javascript
tagged with: jquery
has body: I'm currently using CKEDITOR inline editing and I have a somewhat of big issue with it. CKEDITOR for some reason is replacing some tags automatically. So far I have noticed that my "B" tags are changed to "STRONG" and "I" with "EM". How can I disable tag replacing in CKEDITOR? This is how I'm initiating and using CKEDITOR function ckEditorInit() { $("#canvas.ckeditor-on").find("[edit='true']").each(function() { CKEDITOR.dtd.$editable.span = 1; CKEDITOR.dtd.$editable.a = 1; CKEDITOR.dtd.$editable.li = 1; CKEDITOR.dtd.$editable.b = 1; CKEDITOR.dtd.$editable.i = 1; $(this).ckeditor(); }); }
tagged with: plugins
has comment: http://stackoverflow.com/comment/44450816
type: UnansweredQuestion
type: Question
has title: CKEDITOR Replaces with And Other Tags
has comment: http://stackoverflow.com/comment/44450733
tagged with: ckeditor
score: 0
answer count: 1

http://stackoverflow.com/comment/44408139
has text: I am writing my solution. You also need to take some data from your server?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28010022
score: 0

http://stackoverflow.com/q/28089158
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28089658
has title: Handling rows + cols (html) with hidden elements in JS
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has body: Regarding to my last question: automatically add row after n Elements (Jquery) It is working like expected, but I have one last thing which has to be fixed or to be managed in the repaint-procedure. Opening the site will result in displaying all elements, so something like: You guys helped me there to figure out how to wrap 3 divs in 1 row, which i realized like this: function handleRows() { var divs = $(".galrows.w-row > .w-col"). for (var i = 0; i < divs.length; i += 3) { divs.slice(i, i + 3).wrapAll(" "); } } The point I havn't mentioned before: After clicking on a filter (which is pure JS and not ajax) some of the elements are hidden </diV You may have figured out what the problem is: The Item, with the elementstyle "display: none" shouldn't be in this row, sinc it looks a bit like this now: | x | x | | | x | | | (where x = image shown) I call my function handleRows() in the document.ready part and after applying a filter: $(document).ready(function() { handleRows(); }); // later in the code $('.entry').each(function() { if (!$(this).hasClass(filtername)) { $(this).fadeOut(); } else { handleRows(); $(this).fadeIn(); } }); Hope you have an idea. Thanks in advance
score: 0
type: Question
linked to: http://stackoverflow.com/q/28087458
has comment: http://stackoverflow.com/comment/44555706
tagged with: javascript
has comment: http://stackoverflow.com/comment/44555364
has comment: http://stackoverflow.com/comment/44555596
has comment: http://stackoverflow.com/comment/44555298
has answer: http://stackoverflow.com/a/28089658
answer count: 1

http://stackoverflow.com/a/28084060
upvote count: 3
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/28083733
downvote count: 0
has body: The placeholder attribute The placeholder attribute on &lt;input&gt; and &lt;textarea&gt; elements provides a hint to the user of what can be entered in the field. The placeholder text must not contain carriage returns or line-feeds. Source: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms_in_HTML So unfortunately I think this can not be done natively. You could however put the placeholder text in the value of the textarea. You can remove the text on focus, so it acts like a placeholder. Example: http://jsfiddle.net/pdXRx/535/
answers question: http://stackoverflow.com/q/28083733
has comment: http://stackoverflow.com/comment/44546496
has comment: http://stackoverflow.com/comment/44546139
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44546037

http://stackoverflow.com/comment/44496605
has text: @gilly3 I agree it would be very tricky.. I was just curious to see. if we can get format by reverse engineering :)
type: QuestionComment
comment on: http://stackoverflow.com/q/27971988
score: 0
type: Comment

http://stackoverflow.com/q/28035116
has title: How do you set and retrieve an instance of BookshelfJS using Express?
tagged with: node.js
has answer: http://stackoverflow.com/a/28036566
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: bookshelf.js
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28036566
tagged with: express
downvote count: 0
answer count: 1
favorite count: 0
has body: I'm trying to use Bookshelf along with Express 4.0 and can't seem to get them working together or rather, I can't seem to follow "best practices". The Bookshelf docs mention that one should always reuse the same instance of it throughout the app. It even lists an example: // When the app starts var app = express(); var knex = require('knex')(dbConfig); var bookshelf = require('bookshelf')(knex); app.set('bookshelf', bookshelf); // elsewhere, to use the bookshelf client: var bookshelf = app.get('bookshelf'); var Post = bookshelf.Model.extend({ // ... }); However, I can't seem to get it working when I have to use app.get() in a separate file. For example, here's my app.js file (the root of my entire app): var express = require('express'); var app = express(); var db = require('./server/db/db'); app.set('bookshelf', db); var api = require('./server'); app.use(api); Here's my db.js file that gets required above: var express = require('express'); var app = express(); var knex = require('knex')({ //my db settings go here }); var bookshelf = require('bookshelf')(knex); module.exports = bookshelf; The above code works if I require it directly. Here's where the issue turns up. Whenever I want to actually use the bookshelf connection, no matter what file I'm in, I follow the same process but it fails and "bookshelf" is always undefined. Here's an example of an index.js file that's required and called "api" in the app.js: var express = require('express'); var app = express(); var db = app.get('bookshelf'); console.log(db); DB always comes up as undefined. Whenever I try to make a new Model, I use the same process except I do an db.Model.extend({}) and trying to access the Model property throws an error (because it's undefined). From what I can use both Bookshelf and Express docs agree that this should work and it doesn't. Any ideas?

http://stackoverflow.com/comment/44482616
type: Comment
has text: what data you want from json ?
comment on: http://stackoverflow.com/q/28050198
score: 0
type: QuestionComment

http://stackoverflow.com/q/28119912
type: Question
has title: Adding CodeSnippet Plugin to CKEditor in Rails App
tagged with: javascript
tagged with: ckeditor
has answer: http://stackoverflow.com/a/28207871
has body: I am trying to add the CodeSnippet plugin to CKEditor (installed in my Rails app using ckeditor-rails). To do this, I first added the CodeSnippet plugin folder and all of its dependencies to the directory app > assets > javascripts > ckeditor > plugins (so my plugins folder contains folders for codesnippet, dialog, dialogui, lineutils, and widget). I then updated my app/assets/javascripts/ckeditor/config.js.coffee to include the following: CKEDITOR.editorConfig = (config) -&gt; config.startupShowBorders = true config.resize_enabled = false config.scayt_autoStartup = true config.language = 'en' config.width = '445px' config.extraPlugins = 'widget,dialog,dialogui,lineutils,codesnippet' config.toolbar_Default = [ { name: 'basicstyles', items: [ 'Bold','Italic','Underline', '-', 'NumberedList','BulletedList', 'Link','Unlink', 'CodeSnippet','RemoveFormat' ] } ] config.toolbar = 'Default' true When I try to load a webpage with the CKEditor, I get the following errors in my javascript console: Uncaught TypeError: undefined is not a function referring to this line of widgets/plugin.js: CKEDITOR.style.addCustomHandler( { and the same error Uncaught TypeError: undefined is not a function referring to this line of codesnippets/plugin.js: editor.addContentsCss( path + 'lib/highlight/styles/' + editor.config.codeSnippet_theme + '.css' ); Anyone able to configure this CKEditor to use the CodeSnippet plugin in a Rails app?
downvote count: 0
answer count: 1
favorite count: 0
upvote count: 1
tagged with: ruby-on-rails
accepted answer: http://stackoverflow.com/a/28207871
type: AnsweredQuestion
score: 1
tagged with: code-snippets

http://stackoverflow.com/a/27982255
score: 1
accepted answer of: http://stackoverflow.com/q/27982070
answers question: http://stackoverflow.com/q/27982070
has comment: http://stackoverflow.com/comment/44355867
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44356022
type: Answer
has body: The two selectors are not able to identify the respective elements was the reason it didn't worked earlier. Fiddle I removed the for loop and fetched values using if($(this).val() Just for reference, $( "select#materialName option:selected") will also work as it identifies the element uniquely. And to avoid the loop we can directly get the element value using $(this).val().
downvote count: 0
has comment: http://stackoverflow.com/comment/44355892

http://stackoverflow.com/comment/44610373
type: QuestionComment
comment on: http://stackoverflow.com/q/28117991
score: 0
has text: What have you tried so far? Also, I don't quite understand the difference between 1. and 2. as both have `A_ID_R1_V#` as input but different output... What would be the result of `magic_function("A_ID_R1_V1")`?
type: Comment

http://stackoverflow.com/q/27991423
type: Question
tagged with: javascript
score: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/44379142
type: UnansweredQuestion
has title: use jQuery Tabs to dynamically load component generated by another view in Django
has comment: http://stackoverflow.com/comment/44375131
answer count: 0
tagged with: django
has body: I'm developing this app and I'm struggling with a problem. Basically I have Tabs and each Tab contains a Chart that can be dynamically generated by user input (e.g. user type something in the input field and it plots the requested data). The user input is submitted via a Form like test The chart is generated by a file called chart.html with passed-in data input. So i've included a line in the main.html like {% include 'chart.html' with datainput=datainput %} I've created a view getdata to generate the datainput def view1(request): # do something return data_object Also in a view called main i have def main(request): data = view1(request) return render(request,'main.html',data) The problem is the page always gets reloaded and the chart always goes into the first tab instead of the current one. I know that I might should use things like ajax but I'm having a hard time to put these techniques in one piece since I'm still a newbie. I appreciate any help!

http://stackoverflow.com/comment/44551908
type: QuestionComment
comment on: http://stackoverflow.com/q/28087109
score: 1
has text: This is happening because you return the value and the loop terminated.
type: Comment

http://stackoverflow.com/comment/44494406
comment on: http://stackoverflow.com/a/28035661
type: Comment
has text: true i really just added that more as a show of concept not as realy functionality, that is what I meant with my comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/28109507
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28114506
tagged with: javascript
tagged with: jquery
type: Question
tagged with: email
accepted answer: http://stackoverflow.com/a/28114506
score: 0
tagged with: codeigniter
has body: I am not getting the response after including the send email function to the controller but code sends email perfectly only issue is not getting response. If I remove the code that sends email then in that case response is fine from the controller but when I include the email function I am not getting the response on jquery view code. I am posting my controller code with the email function code also post my jQuery so that you can review it. Controller code: /*******Create new customer*******/ public function createcustomer() { $this-&gt;form_validation-&gt;set_rules("firstname", "First Name", "required"); $this-&gt;form_validation-&gt;set_rules("lastname", "Last Name", "required"); $this-&gt;form_validation-&gt;set_rules("email", "Email", "required|is_unique[gab_users.email]|trim|xss_clean"); $this-&gt;form_validation-&gt;set_rules('password', 'Password', 'required|min_length[5]|matches[confirmpassword]|md5'); $this-&gt;form_validation-&gt;set_rules('confirmpassword', 'Password Confirmation', 'required|min_length[5]'); if($this-&gt;form_validation-&gt;run() === FALSE) { die("fail"); } else { $activation_code = sha1(uniqid($this-&gt;input-&gt;post('email'),'true')); $data = array("firstname"=&gt;$this-&gt;input-&gt;post('firstname'), "lastname"=&gt;$this-&gt;input-&gt;post('lastname'), "email"=&gt;$this-&gt;input-&gt;post('email'), "password"=&gt;$this-&gt;input-&gt;post('password'), "ip"=&gt;$this-&gt;input-&gt;post('ip'), "activation_code"=&gt;$activation_code, "created_on"=&gt;now(), "active"=&gt;1, "group"=&gt;2); $verifyCreate = $this-&gt;index_model-&gt;set_user($data); if($verifyCreate === "success") { if($this-&gt;sendEmail() === 'done')//If I remove this line and write only die('done'); its work perfectly. model is working fine data is saved in the database in both conditions. The big issue is response? {die('done');} } else { die("invalid"); } } } **/******Send Email********/** public function sendEmail() { $this-&gt;load-&gt;library('email'); $this-&gt;ema…
tagged with: php
answer count: 1
has title: Unable to get the response in jquery after sending email from codeigniter controller

http://stackoverflow.com/q/28064957
has body: I'm trying to add line mousehover action to my d3 bar-line chart. But at bottom of the code, d3.mouse(this) throwing type error. Any idea? Here is my code svg.append("rect") .attr("class", "overlay") .attr("width", width) .attr("height", height) .on("mouseover", function() { focus.style("display", null); }) .on("mouseout", function(d) { div.transition() .duration(50) .style("opacity", 1e-6); }) .on("mousemove", function(){ //move focus around console.log(d3.mouse(this)); var x0 = x.invert(d3.mouse(this)[0]); var i = bisectDate(data, x0, 1); var d0 = data[i - 1]; var d1 = data[i]; var d = x0 - d0.date > d1.date - x0 ? d1 : d0; return; focus.attr("transform", "translate(" + x(d.date) + "," + y(d.accidents) + ")"); div.transition() .duration(50) .style("opacity", .9); div.html(" Company Name : "+ company_name +" Date : "+ formatTime(d.date) +" "+ bar_text +" : " + d.deaths + " "+ line_text +" : "+ d.accidents +" ") .style("left","39%") .style("top", "160px"); });
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
has title: d3.mouse(this) throws TypeError: t is null
upvote count: 3
has answer: http://stackoverflow.com/a/34198236
type: Question
score: 3
tagged with: javascript
downvote count: 0
answer count: 1

http://stackoverflow.com/q/28090630
has body: i found solution here : http://www.smartmenus.org/ I am using bootstrap fixed nav, I customized it a bit so that instead of clicking menu when someone hover over the menu sub it will be displayed. This is the code I added: ul.nav li.dropdown:hover > ul.dropdown-menu { display: block; } and this is the structure of the HTML: Top Menu submenu submenu submenu When hovered over parent menu it displays bottom menu but when I go to sub menu parent menu hover state is gone, it should be selected in that situation. Can someone please help me how to implement it in bootstrap 3.0
has answer: http://stackoverflow.com/a/28091004
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44558274
has title: Bootstrap: on hover in Dropdown menu parent menu highlighted
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/44558229
upvote count: 0
answer count: 1
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/8878033
tagged with: css
has comment: http://stackoverflow.com/comment/44558686

http://stackoverflow.com/comment/44606149
has text: Are all the ` ` elements siblings of each other?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/28115890
type: QuestionComment

http://stackoverflow.com/comment/44508067
score: 0
comment on: http://stackoverflow.com/q/28063766
type: QuestionComment
type: Comment
has text: i tried doing it but not getting the expected result.

http://stackoverflow.com/comment/44393291
has text: @Juhana, The following: if (jqXHR.responseJSON('ok')) {
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28002094

http://stackoverflow.com/a/27994513
type: Answer
score: 0
type: AcceptedAnswer
has body: Yeah, there's a few issues with your code, but you're close. Submit buttons shouldn't be inside of &lt;a&gt; tags. You're also missing the closing carrot here. You're using type, but I'm guessing you meant method. In your JavaScript, you're getting an array of elements with getElementsByName and never getting the value. Put that all together, and: &lt;form name="myform" onsubmit="submitform()" method="POST"&gt; Username: &lt;input type="text" name="username" /&gt; &lt;input type="submit" value="Submit" /&gt; &lt;/form&gt; &lt;script&gt; function submitform() { username = document.getElementsByName("username")[0].value window.alert("hi:" username) return false; } &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/27994088
answers question: http://stackoverflow.com/q/27994088

http://stackoverflow.com/q/28106735
has body: I'm developing using jQuery-Mobile, and I want to develop a square button. For that, what I did was modify it's height with css, and since I cannot modify it's width, I just wrote some random text in it so it became square. This button is going to be changing it's background color depending on user interaction, so I tried changing at the same time the color text and background color so the text would "disappear". But this is what happens: As you can see, the text (mmmmmm) is visible, so: How can I make the text to be transparent? EDIT: This is the code: mmmmm And this is the css preventing me from modifying the width: And the only code in personal.css .ui-btn { color: rgba(0, 0, 0, 0); height: 100px; width: 100px; }
type: Question
answer count: 2
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/44587950
tagged with: jquery
has comment: http://stackoverflow.com/comment/44587879
has comment: http://stackoverflow.com/comment/44587908
has comment: http://stackoverflow.com/comment/44588257
has title: HTML - How to do a square plain button while using jQuery Mobile css
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28107385
favorite count: 0
has comment: http://stackoverflow.com/comment/44588990
accepted answer: http://stackoverflow.com/a/28107385
upvote count: 1
tagged with: css
possible better answer: http://stackoverflow.com/a/28106773
downvote count: 1
has comment: http://stackoverflow.com/comment/44588696
has answer: http://stackoverflow.com/a/28106773
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/44588646

http://stackoverflow.com/a/28067368
downvote count: 0
answers question: http://stackoverflow.com/q/28067302
accepted answer of: http://stackoverflow.com/q/28067302
type: Answer
has body: This might help u mate .. :) Note:Jquery version >=1.7 $('body').on('click', 'button', function(event) { var rowindex = $(this).closest('tr').index(); console.debug('Index', rowindex); }); FYI index()
has comment: http://stackoverflow.com/comment/44514428
upvote count: 5
score: 5
type: AcceptedAnswer

http://stackoverflow.com/q/27987667
score: 0
answer count: 1
tagged with: jquery-select2
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27987936
has body: Currently I have Select2 in my application, and have previously implemented ajax calls to the database to get a smaller subset based on search query entered by a user. However, users want to be able to click the back arrow on the browser, and have the query automatically run again (something that currently does not happen with Select2). I was able to implement this by pulling the entire dataset (over 18,000 elements) in and calling select2 on that. The problem with this is that Select2 basically does a foreach in a foreach when doing a search (foreach element in the dataset, go through each string and get the index of the query - which I understand is basically breaking the string into a char array and checking each char individually to see if the combination is found). So every time someone types a character, we're looking at over 18,000 operations, even though the majority of elements are eliminated as options. Is there a way to make Select2 actually eliminate the options that don't match (create and bind to a temp array or something like that) or perform a binary search instead of a linear search? If not, are there any alternatives to Select2 that DO implement binary search instead of linear search, or would I need to create my own jQuery plugin to do this?
has title: Select list search on very large dataset
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/28021386
has comment: http://stackoverflow.com/comment/44429055
answer count: 1
tagged with: vb.net
tagged with: c#
has body: Codebehind: SessionData("UserRole") = "Manager" SessionData is Public Property SessionData(sessionVariableName As String) As String Is it possible to set the SessionData("UserRole") value as "Supervisor" from Javascript?
tagged with: javascript
has comment: http://stackoverflow.com/comment/44428904
type: UnansweredQuestion
tagged with: .net
has answer: http://stackoverflow.com/a/28563948
tagged with: jquery
has title: How to set the .net Public Property value from Javascript?
type: Question
has comment: http://stackoverflow.com/comment/44429086
score: 0

http://stackoverflow.com/a/27973625
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/27973549
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27973549
has body: You would need to make dropdown div statically positioned (not absolutely) and also remove float from it: .container .dropdown-menu { position: static; float: none; } Demo: http://jsfiddle.net/o0xutq34/1/

http://stackoverflow.com/a/28060301
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28013769
answers question: http://stackoverflow.com/q/28013769
type: Answer
downvote count: 0
score: 1
has body: Found the answer. Just changed the version of jackson to 1.9.12 'org.codehaus.jackson:jackson-mapper-asl:1.9.12'
upvote count: 1

http://stackoverflow.com/q/28110568
has comment: http://stackoverflow.com/comment/44595001
type: Question
answer count: 2
tagged with: bootstrap-modal
downvote count: 0
tagged with: jsp
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/28111084
has answer: http://stackoverflow.com/a/28110723
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I've digged a lot but still didn't found answer for my case. I have some model window, inside of it I have some textarea: &lt;div class="form-group"&gt; &lt;label for="groupDescription" class="col-sm-2 control-label"&gt; Description: &lt;/label&gt; &lt;div class="col-sm-10"&gt; &lt;form:textarea path="groupDescription" cssClass="form-control" /&gt; &lt;form:errors path="groupDescription" /&gt; &lt;/div&gt; &lt;/div&gt; It automatically have the same width as input forms in this window, this is good. But! I can resize it, so it can be outside of modal window borders. How can I disable this width resizing? For length I would like to set some option like "length is 2 rows, but no more than 10 rows". Can you help? Also, can I do it without JavaScript? Thanks in advance! :) P.S. Sorry, I've needed to edit title.
has comment: http://stackoverflow.com/comment/44595420
has answer: http://stackoverflow.com/a/28111084
has title: How to set fixed width and "custom-resizeable" length to Spring <form:textarea />?
upvote count: 1
linked to: http://stackoverflow.com/q/5235142
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28110723
score: 1

http://stackoverflow.com/a/27989107
score: 0
answers question: http://stackoverflow.com/q/27988114
has comment: http://stackoverflow.com/comment/44379316
type: Answer
has body: http://demos.telerik.com/kendo-ui/grid/editing-inline This should get you where you need to go.
has comment: http://stackoverflow.com/comment/70187639
has comment: http://stackoverflow.com/comment/44384001

http://stackoverflow.com/comment/44486723
has text: To load the image asynchronously on the fly. Is there a better way to do it ?
type: Comment
comment on: http://stackoverflow.com/q/28052073
type: QuestionComment
score: 0

xmlhttprequest
tags question: http://stackoverflow.com/q/28099211
tags question: http://stackoverflow.com/q/28112334
tags question: http://stackoverflow.com/q/28025803
tags question: http://stackoverflow.com/q/28093619
tags question: http://stackoverflow.com/q/28089478
tags question: http://stackoverflow.com/q/28073617
tags question: http://stackoverflow.com/q/28007574
tag name: xmlhttprequest
tags question: http://stackoverflow.com/q/28028644
type: Tag
tags question: http://stackoverflow.com/q/28067266
tags question: http://stackoverflow.com/q/28107460
tags question: http://stackoverflow.com/q/28000198
tags question: http://stackoverflow.com/q/27989337

http://stackoverflow.com/a/28097214
has body: You could do it without eval, you just have to iterate over each letter until aimSign is reached. In each iteration you put a new object within last nested object: function callObjTail(obj){ var lastObj; var lastSign; for(var i='a'.charCodeAt(); true; i++){ console.log(i); if(obj[String.fromCharCode(i)]){ lastObj = obj; lastSign = i; obj = obj[String.fromCharCode(i)]; } else{ break; } } if(lastObj){ lastObj[String.fromCharCode(lastSign)](); } else{ obj[Object.keys(obj)[0]](); } } function buildObj(aimSign){ var obj = {}; var head = obj; var nests = ''; for(var i='a'.charCodeAt(); i &lt; aimSign.charCodeAt(); i++){ obj[String.fromCharCode(i)] = {}; obj = obj[String.fromCharCode(i)]; } return { head : head, tail: obj }; } var obj = buildObj('e'); console.log(obj.head); // { a: { b: { c: { d: {}}}} console.log(obj); obj.tail.e = function(){ console.log('tail called');}; console.log(obj.head.a.b.c.d.e()); console.log(obj.tail.e()); // call tail at the end callObjTail(obj.head); callObjTail(obj.tail);
has comment: http://stackoverflow.com/comment/44571581
has comment: http://stackoverflow.com/comment/44571207
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/44571148
answers question: http://stackoverflow.com/q/28096922
has comment: http://stackoverflow.com/comment/44570450

http://stackoverflow.com/comment/44500624
type: QuestionComment
comment on: http://stackoverflow.com/q/28059552
has text: @ArunPJohny: http://stackoverflow.com/q/14028959/218196 (I guess)
score: 0
type: Comment

http://stackoverflow.com/comment/44440044
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28027017
has text: To make it more clear row(index) is returning an unexpected row.
score: 0

http://stackoverflow.com/comment/44478220
score: 1
has text: Please see the snippet that I added to your question. Seems to work just fine there, so this problem is not reproducible. Can you provide us a code sample that actually demonstrates the problem? And it doesn't seem that duplicate IDs are the problem because I tried it with duplicate IDs too.
comment on: http://stackoverflow.com/q/28047865
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28497462
has comment: http://stackoverflow.com/comment/45320224
type: Answer
score: -1
downvote count: 1
answers question: http://stackoverflow.com/q/28105097
upvote count: 0
has body: You can do so with Javascript and/or an HTML attribute (which is really a Javascript event handler anyway) as described here: Live Demo and ...
has comment: http://stackoverflow.com/comment/45318266

http://stackoverflow.com/comment/44379931
comment on: http://stackoverflow.com/q/27994512
score: 0
type: Comment
type: QuestionComment
has text: Sorry to be more clear it's the bottom portion of the JS the toggleOverlay function. I need the form on the first overlay once submitted to move on to the second form I have in the html in the very same overlay.

http://stackoverflow.com/comment/44616236
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28080343
has text: OK, I guess I'll need to experiment and see which works better. I may need to learn more about measuring memory usage of the JS loading of the audio via remote chrome debugging.....

http://stackoverflow.com/comment/44325779
type: AnswerComment
type: Comment
has text: how were you originally calling the resize function ?
comment on: http://stackoverflow.com/a/27966167
score: 0

http://stackoverflow.com/a/27973923
type: Answer
score: 3
upvote count: 3
has body: Use wrap - you can't add partial HTML like that, it's invalid: var iframe = $(this).find('iframe'); iframe.wrap("&lt;div class='video-wrapper' /&gt;");
answers question: http://stackoverflow.com/q/27973879
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27973879
has comment: http://stackoverflow.com/comment/44340645
type: AcceptedAnswer

http://stackoverflow.com/q/27972734
has comment: http://stackoverflow.com/comment/44338158
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44338214
upvote count: 1
has comment: http://stackoverflow.com/comment/44340232
has body: On a .js page in a Visual Studio express ASP.NET solution why does window.onload() { document.getElementById('ambience').play(); } work(and it does!), but why does window.onload() { document.getElementById('ambience').play(); document.getElementById('ambience').stop(); } NOT stop the music? .pause(); doesn't pause the music either I also tried: It does play the music. And I have tried: window.onload = function() { var snd = document.getElementById('ambience').play(); var clickmeButton = document.getElementById('playJackpot'); clickmeButton.onclick = playSound; } function playSound() { document.getElementById('ambience').stop(); } what is the equivalent of .stop() or .pause() if those are not applicable? what set of commands should I be working with in visual studio in order to get sound to play based on a conditional and then definitively shut off or stop after it has played once, and only once ? The background to this is that I have the play button in a timer control, so that it can operate other features, but each timer tick (and that needs to be set at a fraction of a second) kicks off the play again, so that the sound comes out staccato, because it is starting with every 'tick' of the timer. So, I need to play it, then immediately shut off the sound's ability to play, that is until somebody hits the play button again.
tagged with: asp.net
has title: .stop(), and .pause() don't work where .play() does work
tagged with: html5-audio
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44338588
answer count: 0
downvote count: 0
score: 1
favorite count: 0

http://stackoverflow.com/a/28056999
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/28056911
score: 0
type: Answer
has body: To reliably convert a UTC string like "2014-12-22 09:36:54" to local, manually parse it, e.g.: function parseISOAsLocal(s) { var b = s.split(/\D/); return new Date(Date.UTC(b[0], b[1]-1, b[2], b[3], b[4], b[5])); } An ISO 8601 compliant string without a timezone must be treated as UTC according to the current ECMA-262 standard (ed5). However, the draft version 6 changes that to treat them as local (per ISO 8601). Most browsers treat it as UTC, however Chrome treats it as local (and IE 8 as NaN). Much better to manually parse date strings and avoid browser vagaries.
has comment: http://stackoverflow.com/comment/44535676

http://stackoverflow.com/comment/44589946
score: 0
comment on: http://stackoverflow.com/q/28093817
type: Comment
has text: I've added jquery.mousewheel.min.js to the head and changed $current.index !==0, but I',m not getting it to work... I've created a JSFiddle: http://jsfiddle.net/LennartB/cztL7h49/ If anyone can help me, please!
type: QuestionComment

http://stackoverflow.com/comment/44359825
comment on: http://stackoverflow.com/a/27983419
has text: don't can send with javaservlet?
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/44369329
type: Comment
comment on: http://stackoverflow.com/a/27981289
score: 0
type: AnswerComment
has text: It's on local and I dont know how to put stuff together.

http://stackoverflow.com/a/45859370
type: Answer
answers question: http://stackoverflow.com/q/28083708
downvote count: 0
score: 1
has body: How to disable clicking another div click until first one popup div close One Test Popup Box One X Two Test Popup Box Two X
upvote count: 1

http://stackoverflow.com/a/28101529
has comment: http://stackoverflow.com/comment/46268349
has comment: http://stackoverflow.com/comment/51449127
answers question: http://stackoverflow.com/q/28012356
has body: In your application's top-level component, use the comoponentWillMount method (docs) to trigger an action that fetches the data. This method will get called when the component is initially rendered. For example: // Create an async action, that will request data using a promise // Using the recently released (v0.2.2) helpers for async actions var actions = Reflux.createActions({ init: {asyncResult: true} }); actions.init.listenAndPromise(promiseToGetData); // Update the store when the init action's promise is completed var store = Reflux.createStore({ listenables: actions, onInitCompleted: function (data) { // do stuff this.trigger(data) } }); var App = React.createClass({ mixins: [Reflux.connect(store)], componentWillMount: function () { // When this component is loaded, fetch initial data actions.init() } });
accepted answer of: http://stackoverflow.com/q/28012356
score: 10
has comment: http://stackoverflow.com/comment/46255682
upvote count: 10
has comment: http://stackoverflow.com/comment/44587256
has comment: http://stackoverflow.com/comment/51486139
has comment: http://stackoverflow.com/comment/44596242
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44596099
downvote count: 0
has comment: http://stackoverflow.com/comment/44582978
type: Answer

http://stackoverflow.com/comment/44423114
type: QuestionComment
comment on: http://stackoverflow.com/q/28017195
has text: Sorry for the poor formatting. I will pay closer attention next time.
score: 0
type: Comment

http://stackoverflow.com/comment/44450053
score: 0
has text: Too much javascript lately too little PHP :-). Made a booboo. Corrected it in the PHP code. Please try again :-)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28032000

http://stackoverflow.com/q/27974244
has answer: http://stackoverflow.com/a/27974369
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27974368
has body: I'm working on a simple password validator and wondering if its possible in Regex or... anything besides individually checking for each character. Basically if the user types in something like "aaaaaaaaa1aaaaa", I want to let the user know that the character "1" is not allowed (This is a super simple example). I'm trying to avoid something like if(value.indexOf('@') {} if(value.indexOf('#') {} if(value.indexOf('\') {} Maybe something like: if(/[^A-Za-z0-9]/.exec(value) {} Any help?
tagged with: regex
has answer: http://stackoverflow.com/a/27974558
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44341325
possible better answer: http://stackoverflow.com/a/27974558
accepted answer: http://stackoverflow.com/a/27974368
has comment: http://stackoverflow.com/comment/44341422
type: Question
has comment: http://stackoverflow.com/comment/44342665
has title: Determine if string has any characters that aren't in a list of characters and if so, which characters don't match?
tagged with: javascript
has comment: http://stackoverflow.com/comment/44341367
has answer: http://stackoverflow.com/a/27974610
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/44341323

http://stackoverflow.com/comment/44446547
comment on: http://stackoverflow.com/q/28030910
type: Comment
score: 0
type: QuestionComment
has text: It's impossible to implement the following code if the content of the iframe comes from other website/protocol/port. You can only try to do this by trying to access the iframe `contentWindow` or `contentDocument` (I don't remember which one) **if and only if** the domain, port and protocol are the same. It's the only way.

http://stackoverflow.com/a/27985852
type: Answer
answers question: http://stackoverflow.com/q/27973501
upvote count: 2
score: 2
type: AcceptedAnswer
downvote count: 0
has body: Use the bind-attr helper and make the validationState a computed property. This would look like this {{input value=inputValue class=validationState}} App.IndexController = Em.ArrayController.extend({ inputValue: 'test', validationState: function() { if(this.get('inputValue')) { return 'valid'; } return 'empty'; }.property('inputValue') }); Here is a working example.
accepted answer of: http://stackoverflow.com/q/27973501

http://stackoverflow.com/a/28074411
has comment: http://stackoverflow.com/comment/44528274
answers question: http://stackoverflow.com/q/28073124
has body: These days, VB is a server-side language. If you want to execute a Visual Basic function (presumably VB.NET), you're going to have to either: Postback or Use AJAX to invoke a Web service written in Visual Basic and return the results. Mind you, VBScript used to be quite popular, but that required IE, and relying upon it is frowned upon (if not altogether impossible anymore).
has comment: http://stackoverflow.com/comment/44528388
score: 0
type: Answer

http://stackoverflow.com/q/28080087
has comment: http://stackoverflow.com/comment/44538986
tagged with: security
score: 0
has body: I have a list of URL parameters that I obtained using JavaScript: var urlParams = location.search.slice(1); It was suggested to me that I store the URL parameters in a JSON object in a cookie instead of just storing the urlParams string in a cookie. Is there any advantage (security or other) to storing the URL parameters in a JSON object vice a string if all I'm going to do is concatenate the url params with a different base url?
answer count: 1
has title: Why would storing a JSON object in a cookie be safer or better than a string?
has comment: http://stackoverflow.com/comment/44538911
has comment: http://stackoverflow.com/comment/44538886
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28080196
has comment: http://stackoverflow.com/comment/44538884
accepted answer: http://stackoverflow.com/a/28080196
tagged with: cookies
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/44538990
tagged with: javascript

http://stackoverflow.com/comment/102564426
has text: Worked perfectly for me! I just changed a little by calling the `stopPropagation()` method inside the directive tag. `ng-click="onChildClick($event); $event.stopPropagation()"`
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/48287877

http://stackoverflow.com/a/27983019
has body: You wish to pre-select an option when the page first loads? This bit of jQuery will find the option with the value of 5 and select it. By wrapping it in the jQuery(document).ready function it will run once the page has loaded. jQuery(document).ready(function($){ $('select').find('option[value=5]').attr('selected','selected'); }); 0 1 2 3 4 5
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/129675041
answers question: http://stackoverflow.com/q/27982937
upvote count: 7
type: Answer

http://stackoverflow.com/comment/44345932
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27976778
type: Comment
has text: Haha..Happened a lot with me too.. :)..Although you can accept it as an answer.. ;)

http://stackoverflow.com/a/28053470
has comment: http://stackoverflow.com/comment/44491973
has comment: http://stackoverflow.com/comment/44592125
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44491689
type: Answer
has comment: http://stackoverflow.com/comment/44489080
has comment: http://stackoverflow.com/comment/44494205
has comment: http://stackoverflow.com/comment/44489717
accepted answer of: http://stackoverflow.com/q/28051557
has comment: http://stackoverflow.com/comment/44491724
has comment: http://stackoverflow.com/comment/44489455
answers question: http://stackoverflow.com/q/28051557
has comment: http://stackoverflow.com/comment/44489642
has body: You can define your function in it's own class using Ext.define and then use it throughout your application like this: Ext.define("Calculator", { addition: function(num1, num2) { return num1 + num2; }, subtract: function(num1, num2) { return num1 - num2; } ... }); You could create this in its own file, for example App.util.Calculator. You could also use it as a mixin (guide here), so that you can add this functionality to any other class. To update the results of a card, use something like this: items: [{ title: 'Home', iconCls: 'home', html: 'Home Screen', listeners: { activate: function() { var calc = new Calculator(); this.setHtml('2 + 3 = ' + calc.addition(2,3)); } } }] EDIT: This is out of scope in the code you posted, try something like this. onActivate: function(me, container) { var that = this; var geo = Ext.create('Ext.util.Geolocation', { autoUpdate: false, listeners: { locationupdate: function(geo) { var currentLat = geo.getLatitude(); var currentLng = geo.getLongitude(); var PT = new Ext.util.Calc.myCal('METHOD1'); var c = PT.setC([currentLat, currentLng]); that.setHtml(c); // not working console.log(c); } } }); geo.updateLocation(); }
score: 0

http://stackoverflow.com/comment/44476182
score: 1
comment on: http://stackoverflow.com/q/28046893
type: Comment
type: QuestionComment
has text: can u make a jsfiddle or a working code snippet for the same

http://stackoverflow.com/a/28108893
score: 1
downvote count: 1
has body: Edited The right syntax is: $("#myId").attr("id", "mySecondId")
has comment: http://stackoverflow.com/comment/44591708
answers question: http://stackoverflow.com/q/28108845
has comment: http://stackoverflow.com/comment/44591637
has comment: http://stackoverflow.com/comment/44591700
type: Answer
upvote count: 2

http://stackoverflow.com/q/28041528
has body: I know source map files use to debug TypeScript files I am trying to find a way to debug and use breakpoints on Bundled and Minified (grunt-contrib-uglify) javascript files through Source Map in Visual Studio 2015 Chrome and IE11 allow me to show source map file to debug but I want to do this with Visual Studio to change/add Code in my Javascript file do you know any technique allow me to use breakpoints on original files while minified versions are loaded in the browser or should I write a HtmlHelper to load original Javascript files on Debugging like ScriptBundle does on VS 2013
tagged with: visual-studio
score: 3
answer count: 0
upvote count: 3
type: Question
tagged with: javascript
tagged with: visual-studio-2015
has title: Using Breakpoint on Visual Studio for minified JavaScript files with Source Map
tagged with: bundling-and-minification
downvote count: 0
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/44480205
comment on: http://stackoverflow.com/a/28049117
has text: JS is not good here because it may fail to execute, CSS solution is way better.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44596111
comment on: http://stackoverflow.com/q/28110966
score: 0
type: Comment
type: QuestionComment
has text: @Chaitanya: Did *you* try on that website? Because when I try I get a *very specific* error message. `"$ is not a function"` You need to load the jQuery library before you can use it.

http://stackoverflow.com/comment/44471508
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28044339
has text: Don't you mean to use index.php?poslovni_korisnici&update_poslovni=34 ?

http://stackoverflow.com/comment/44443970
has text: @Halcyon GET requests have no content body so contentType will probably be ignored
comment on: http://stackoverflow.com/q/28029294
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28043830
score: -2
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/28041097
downvote count: 2
has body: I think your problem can be answerable using CSS with the help of: pointer-events:none Setting to none will prevents all click, state and cursor options on the specified HTML element. I tried to make a simple prototype from where you can take up as per your requirement. Here is the fiddle link: http://jsfiddle.net/gr51yvaj/ $('a').click(function() { if($(this)[0].textContent=='somelink1.com') $(this).addClass('ex'); }); For once, all link click will work. But after that based on requirement of which link to be disable afterwards, we can add some class on that dynamically and provide required CSS which will prevent click thereafter. I find it a interesting problem. No clue why others had downvoted for the question.

http://stackoverflow.com/comment/44339781
score: 0
type: AnswerComment
has text: For a moment I thought it was good, but it is not the JS `null`... Thanks though.
type: Comment
comment on: http://stackoverflow.com/a/27973387

http://stackoverflow.com/q/28031289
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/28032438
has title: JavaScript asynchronous programming: promises vs generators
downvote count: 0
tagged with: asynchronous
accepted answer: http://stackoverflow.com/a/28032438
favorite count: 0
tagged with: promise
score: 52
upvote count: 52
possible better answer: http://stackoverflow.com/a/28032746
tagged with: node.js
has answer: http://stackoverflow.com/a/28032746
type: AnsweredQuestion
has body: Promises and generators allow you to write asynchronous code. I do not understand why both of these mechanisms are introduced in ECMA script 6. When is it best to use the promises, and when the generators?
type: Question
tagged with: ecmascript-6

http://stackoverflow.com/comment/44407069
comment on: http://stackoverflow.com/a/28009622
has text: Thanks @almas shaikh . it really worked. Also, cant we merge both and use like this: `SELECT COUNT(substring_index(substring_index(category,'/',-2),'/',1) ) FROM mytable;`
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44610109
type: Comment
has text: I don't see anything like "validate form" on that page.
comment on: http://stackoverflow.com/q/28113036
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44411291
comment on: http://stackoverflow.com/q/28011936
type: Comment
type: QuestionComment
has text: Well make sure in the console that `$` and `$.fn.wordsrotator` are defined. The code [seems to work in this CodePen.](http://codepen.io/Pointy/pen/ByRojm)
score: 0

http://stackoverflow.com/a/27991792
score: 1
has comment: http://stackoverflow.com/comment/44374715
has comment: http://stackoverflow.com/comment/44374748
upvote count: 1
has comment: http://stackoverflow.com/comment/44375423
answers question: http://stackoverflow.com/q/27991543
has comment: http://stackoverflow.com/comment/44376212
has comment: http://stackoverflow.com/comment/44375385
has comment: http://stackoverflow.com/comment/44376452
has comment: http://stackoverflow.com/comment/44374527
has comment: http://stackoverflow.com/comment/44374544
has comment: http://stackoverflow.com/comment/44374680
downvote count: 0
has comment: http://stackoverflow.com/comment/44375031
type: Answer
has comment: http://stackoverflow.com/comment/44375084
has comment: http://stackoverflow.com/comment/44375140
has body: I cannot confirm the behavior you described. Everything seems to be working fine and your code looks like it should work. Check out this working example of your code. I played around with the inital zoom level and adjusted the center. The center you had specified wasn't really near the markers and the zoom level was so high at first I thought the map wasn't loading. var center = new google.maps.LatLng(39.833691, -84.892375); google.maps.Map(document.getElementById('map'), { zoom: 15, center: center, mapTypeId: google.maps.MapTypeId.ROADMAP });
has comment: http://stackoverflow.com/comment/44375220
has comment: http://stackoverflow.com/comment/44376296

http://stackoverflow.com/q/28043783
has title: Replace the value with "X" with same number of length
answer count: 4
has body: I have one input field with value : &lt;input id="newfield" value="12345" /&gt; Value of input can be vary and may contain the different length. I want to replace the whole value if i click on button &lt;a href="#"&gt;button&lt;a&gt; Value of id="newfield" is dynamic and input come from client side. It may be 10 , 5 anything. For example : use type value - 123123456789 I want it like - xxxxxxxx6789 If user type value - 12345, I want it like - x2345 Note : open for jquery and js both
has answer: http://stackoverflow.com/a/28043913
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/28043890
possible better answer: http://stackoverflow.com/a/28043913
type: Question
has comment: http://stackoverflow.com/comment/44471349
score: -2
tagged with: javascript
downvote count: 4
accepted answer: http://stackoverflow.com/a/28043890
has answer: http://stackoverflow.com/a/28043888
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44470430
has answer: http://stackoverflow.com/a/28043903

http://stackoverflow.com/q/28035651
has comment: http://stackoverflow.com/comment/44456237
has answer: http://stackoverflow.com/a/28036106
tagged with: jquery-mobile
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44456119
accepted answer: http://stackoverflow.com/a/28036106
has body: My goal is to prevent the js from loading on an element when the browser width is less than 500px. Basically, I don't want it to load on most mobile devices. var mq = window.matchMedia( "(max-width: 500px)" ); if (mq.matches) { // Don't load function // } else { // Load function // } It seems straightforward, and when I try it on my laptop, it works perfectly. At over 500px and the js loads. At under or equal to 500px, it doesn't load. On my phone, however, my js media query doesn't work because the function loads. Someone suggested that it might have to do with my meta tag. &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/&gt; I'm not sure what I'm doing wrong, but I can't seem to successfully relay the mobile browser width to javascript. Any help is greatly appreciated.
score: 0
has title: Javascript and mobile browser width issues
has comment: http://stackoverflow.com/comment/44456309
has comment: http://stackoverflow.com/comment/44456223
type: Question
has comment: http://stackoverflow.com/comment/44456352
type: AnsweredQuestion
tagged with: media-queries
has comment: http://stackoverflow.com/comment/44456750

http://stackoverflow.com/comment/44671553
score: 2
has text: My question applies to all charts. They all have the same structure. They have space for the title and toolbar and if you don't need them, the charts don't fill out that space. In my case I have my own title and toolbar outside the chart's div.
comment on: http://stackoverflow.com/q/28065844
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28060583
has body: Assuming you are opening two popup windows: /* * In window A's scripts, with A being on &lt;http://example.com:8080&gt;: */ var popup1 = window.open(...popup details...), popup2 = window.open(...popup details...); popup1.postMessage('some message to popup 1', 'http://example.org'); popup2.postMessage('some message to popup 2', 'http://example.org'); Inside the popup window you need to add a listener code: function receiveMessage(event) { // Do we trust the sender of this message? (might be // different from what we originally opened, for example). if (event.origin !== "http://example.org") return; // event.source is popup // event.data is "some message to popup 1" } window.addEventListener("message", receiveMessage, false); The catch here is that both popups need to be part of the same domain as the parent window.
upvote count: 2
answers question: http://stackoverflow.com/q/28060163
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44551014

http://stackoverflow.com/comment/44499498
score: 1
has text: Is your actual canvas size scaled in css?
type: QuestionComment
comment on: http://stackoverflow.com/q/28057881
type: Comment

http://stackoverflow.com/a/27991923
has comment: http://stackoverflow.com/comment/44375295
answers question: http://stackoverflow.com/q/27991756
has comment: http://stackoverflow.com/comment/44375100
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/44375437
has body: First solution: You can do it this way: var emptyOption = $("#select1 option").filter(function() { return $.trim( $(this).val() ) == ''; }); var $options = emptyOption.prevAll().addBack().clone(); $('#select2').append($options); JSFiddle: http://jsfiddle.net/inanda/uosvokdr/2/ Second solution: If you can add a class to the options you want to copy, you can do it the following way. HTML option A option B ============= option AA option BB Javascript: var $options = $("#select1 > option.copy").clone(); $('#select2').append($options); Working JsFiddle: http://jsfiddle.net/inanda/m2qd177u/1/

http://stackoverflow.com/a/28563948
type: Answer
has body: It is not possible to directly set the value of variables on the server side using client side code. However, as some of the commenters suggested, you can use an Ajax request to send data to the server and handle the incoming data with something like a generic handler page. This can be done using the XMLHttpRequest classes packaged with most modern browsers. Alternatively, you could use a library like jQuery which includes an .ajax() method that allows you to send Ajax requests without worrying about the particular browser you are using. On the server side, you would create a generic handler page (.ashx) that serves as the target url for your Ajax requests. Each of the properties you include in the data object passed using the jQuery.ajax method will be available in the handler page through the HttpContext.Request.Params collection by supplying a key to the Params collection, like context.Request.Params["someAjaxDataPropertyName"]. If you do use this approach, you will obviously want to include authentication and authorization code for each incoming Ajax request on the server side, otherwise any of your users could easily craft their own Ajax request to upgrade their permissions whether you want them to or not.
score: 0
answers question: http://stackoverflow.com/q/28021386

date
tags question: http://stackoverflow.com/q/27966479
tags question: http://stackoverflow.com/q/28033986
tags question: http://stackoverflow.com/q/28038634
tags question: http://stackoverflow.com/q/28120012
tags question: http://stackoverflow.com/q/27981339
tags question: http://stackoverflow.com/q/28085481
tag name: date
tags question: http://stackoverflow.com/q/28113161
tags question: http://stackoverflow.com/q/27986628
tags question: http://stackoverflow.com/q/28091036
tags question: http://stackoverflow.com/q/27986289
tags question: http://stackoverflow.com/q/27973718
tags question: http://stackoverflow.com/q/28073560
tags question: http://stackoverflow.com/q/28005066
tags question: http://stackoverflow.com/q/28093902
type: Tag
tags question: http://stackoverflow.com/q/27989676
tags question: http://stackoverflow.com/q/27990311
tags question: http://stackoverflow.com/q/27993607
tags question: http://stackoverflow.com/q/28114138
tags question: http://stackoverflow.com/q/27971988
tags question: http://stackoverflow.com/q/28019693
tags question: http://stackoverflow.com/q/28102554

http://stackoverflow.com/comment/44447849
type: AnswerComment
comment on: http://stackoverflow.com/a/28023419
type: Comment
has text: The thing is though - given that flow with flux, how do you power the message that the user got their password wrong?
score: 0

http://stackoverflow.com/a/28085480
score: 2
has body: You should call you jQuery condition when the DOM is ready or activate it with anonymous function like this: (function() { if ($('div#booklist div.cover').hasClass('hide')) { alert("Yay ! Its working now."); } })();
downvote count: 0
answers question: http://stackoverflow.com/q/28085259
type: Answer
upvote count: 2

http://stackoverflow.com/comment/44489491
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28053599
type: Comment
has text: Thank you for the advice. I updated the location of the onsubmit and tested and it still is allowing me to enter errant data, but it is now taking more clicks and updates to finally accept it so we are moving in the right direction at least :-)

http://stackoverflow.com/comment/44608509
score: 1
has text: It looks like your test environment uses an ancient version of jQuery. Your JSFiddle doesn't work because you are trying to use `live` with a recent version of the library. `live` was removed years ago.
comment on: http://stackoverflow.com/q/28117141
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44614739
has text: @Sparky Messier, you've missed the fact that functions in `then()` and `error()` are asynchronous. `available = response;` will be executed *after* your `checkAvailable()` completion.
type: AnswerComment
comment on: http://stackoverflow.com/a/28120076
score: 0
type: Comment

http://stackoverflow.com/q/28111010
has comment: http://stackoverflow.com/comment/44697970
tagged with: javascript
tagged with: browser
has comment: http://stackoverflow.com/comment/44595722
score: 0
has comment: http://stackoverflow.com/comment/44701672
has comment: http://stackoverflow.com/comment/44595791
favorite count: 0
has comment: http://stackoverflow.com/comment/44787311
has body: My HTML code is as below, it works fine in all browsers but not in safari. &lt;input type="file" name="file" style="display:none" id="file"/&gt; &lt;div class="prfile_photo_popup"&gt; &lt;input type="button" value="Select A Photo From Computer" id="profile_upload_button"/&gt; &lt;/div&gt; My script is as below &lt;script&gt; $(document).ready(function(e){ $('#profile_upload_button').click(function(){ $('#file').click(); }); }); &lt;/script&gt;
tagged with: safari
answer count: 0
type: UnansweredQuestion
upvote count: 1
has title: Java script not works in safari but works in all other browsers
downvote count: 1
type: Question

http://stackoverflow.com/comment/44605725
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28076790
has text: You have to install that module. You can run `npm install google-oauth-jwt`.

http://stackoverflow.com/comment/65689224
comment on: http://stackoverflow.com/a/28044355
type: Comment
type: AnswerComment
has text: When I use the above mentioned property on the legend it does not work. I used it like legen.valueText = "state". The value of state comes from the web service. Any suggestions on how I could use it.
score: 0

http://stackoverflow.com/comment/44523413
has text: A bit off topic may be, but you are just asking to be hacked. You should filter user input and use prepared statements. Additionally, mysql is deprecated, so use PDO instead.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28071858

http://stackoverflow.com/comment/44336310
type: Comment
has text: @elclanrs thanks, that does make sense! So I just need to do `window.White` instead of `this.White` correct?
comment on: http://stackoverflow.com/q/27971758
score: 0
type: QuestionComment

http://stackoverflow.com/q/27988590
score: 2
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/44483451
favorite count: 0
tagged with: expand
has comment: http://stackoverflow.com/comment/44373849
type: Question
has body: This is my initial page I want to expand all rows and columns programmatically. So, I made a button "TEST" wich simulate the trigger click for each image (+) using this code $("img").each(function () { $(this).trigger("click"); }); And this is the result : only the first column was expanded Then I added an alert instruction in my ode like this : $("img").each(function () { alert('HI'); $(this).trigger("click"); }); And it worked. I mean after each time i clicked on the popup to lose it, it expand a row/column. I think it needs time between each trigger instruction. Finally I made a setTimeOut Instruction like that $("img").each(function () { setTimeout(function () { $(this).trigger("click"); }, 2000); }); But I got the same problem : only the first column was expanded and that's it.
tagged with: reportviewer
upvote count: 2
tagged with: triggers
has comment: http://stackoverflow.com/comment/44369353
has comment: http://stackoverflow.com/comment/44509357
has comment: http://stackoverflow.com/comment/44512667
has comment: http://stackoverflow.com/comment/44368646
has comment: http://stackoverflow.com/comment/44368648
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44376472
tagged with: click
has title: Trigger("click") fires only once

http://stackoverflow.com/comment/44597798
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28111290
type: AnswerComment
has text: great no-js solution. @arber please include a brief explanation of what you did

http://stackoverflow.com/comment/44393379
has text: @Nadoedalo No, that's not what it does. Are you misunderstanding what the alternation token `|` do?
score: 0
comment on: http://stackoverflow.com/q/28001009
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44548023
type: Comment
has text: sorry, comes up empty as well... ;(
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28084827

http://stackoverflow.com/comment/44431438
type: Comment
has text: @Aditya Usually I don't test firefox til chrome is working right, I should have just posted this: https://github.com/MinJSLib/gh-template/commit/98ac494c5a6a2b43e6797671fbcacca370faf1e5
score: 0
comment on: http://stackoverflow.com/q/27997206
type: QuestionComment

http://stackoverflow.com/a/28171586
type: Answer
answers question: http://stackoverflow.com/q/27987937
upvote count: 5
downvote count: 0
has body: You could use v-partial in your template. And when you've loaded the partial, you can register it via Vue.partial(). The {{ partial }} value is then replaced, thus rendering the new partial. BoardFeed = Vue.extend template: ' This should be replaced ' partials: {"beforeLoad": " This should be replaced "} data: -> return {items: null, partial: "beforeLoad"} created: -> Vue.partial("afterLoad", " Template returned from server, what I really want ") @partial = "afterLoad" (and excuse any coffee-script errors, I'm not very familiar with it)
score: 5

http://stackoverflow.com/q/28048704
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: AJAX: combining upload file and text input code?
tagged with: file-upload
favorite count: 0
has answer: http://stackoverflow.com/a/28049870
upvote count: 2
has comment: http://stackoverflow.com/comment/44479670
has comment: http://stackoverflow.com/comment/44479517
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/44479720
has body: I'm using jQuery and Ajax for my forms to submit data and files but I'm not sure how to send both data and files in one form? I have code like this: $("#save-sm").bind("click", function(event) { var url = "sm.input.php"; var v_name_sm = $('input:text[name=name_sm]').val(); // sending for process $.post(url, {name_sm: v_name_sm, id: id_sm} ,function() { // show data &lt;div id="data-sm"&gt;&lt;/div&gt; $("#data-sm").load(main); // hide modal dialog $('#dialog-sm').modal('hide'); }); }); and I want add file upload script, like this one: $("form#data").submit(function(){ var formData = new FormData($(this)[0]); $.ajax({ url: window.location.pathname, type: 'POST', data: formData, async: false, success: function (data) { alert(data) }, cache: false, contentType: false, processData: false }); return false; }); how combining all code together so I can send both in once?? thanks :D OK so, this is my final code: $("#save-sm").bind("click", function(event) { var v_name_sm = $('input:text[name=name_sm]').val(); var id_sm = "your variable"; var formData = new FormData(document.getElementById("form-sm")); formData.append("name_sn",v_name_sm); formData.append("id",id_sm); $.ajax({ url: 'sm.input.php', type: 'POST', data: formData, async: false, enctype: 'multipart/form-data', success: function () { // show data &lt;div id="data-sm"&gt;&lt;/div&gt; $("#data-sm").load(main); // hide modal dialog $('#dialog-sm').modal('hide'); }, cache: false, contentType: false, processData: false }); return false; });
type: Question
accepted answer: http://stackoverflow.com/a/28049870
answer count: 1

http://stackoverflow.com/comment/44422595
type: Comment
has text: Yes, it´s on a isolate scope @pankajparkar and I´m working for a plunker to show what I´m talking thanks for the quik answers!
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28017713

http://stackoverflow.com/comment/44386173
comment on: http://stackoverflow.com/a/27998257
type: AnswerComment
has text: @AnuragPeshne I believe that `obj.Type` is a custom property name .
score: 0
type: Comment

http://stackoverflow.com/a/28107514
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28107406
has body: The string literal is not closed, since its multiple rows...why don't you just hide it? Kaarten bestellen
downvote count: 0
type: Answer

http://stackoverflow.com/q/28079257
has comment: http://stackoverflow.com/comment/44935415
downvote count: 0
tagged with: angular-ui
favorite count: 0
tagged with: angularjs
has title: UI Bootstrap for Angular with 'collapse' directive not calling expandDone()
has comment: http://stackoverflow.com/comment/44907909
has answer: http://stackoverflow.com/a/33290072
has comment: http://stackoverflow.com/comment/44776670
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44935378
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/44694072
has comment: http://stackoverflow.com/comment/44721854
tagged with: javascript
tagged with: angular-ui-bootstrap
has body: I am using UI Bootstrap for Angular (http://angular-ui.github.io/bootstrap/) in a project, and I've created a directive that wraps the collapse directive from UI Bootstrap as follows: app.directive( 'arSection', ['$timeout', function($timeout) { return { template: ' ' + ' ' + ' {{title}}' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ', restrict: 'E', scope: true, transclude: true, replace: true, link: function( scope, elem, attrs ){ scope.title = attrs.title; // Toggle the open/closed state and save it away scope.toggleCollapsed = function() { scope.collapsed = !scope.collapsed; }; scope.collapsed = true; } } }; } ] ); This mostly works, in that clicking the h4 element causes the div below it to expand and collapse, however, when expanding the div, the expandDone() method in UI Bootstrap (see below) is not called when the animation is complete. function expandDone() { element.removeClass('collapsing'); element.addClass('collapse in'); element.css({height: 'auto'}); } This means that height: auto is never set on my div, so when my content grows, the div does not grow and some of the content is cut off. The collapseDone() method also never gets called when collapsing. Now, if I click onto another element in the app (outside the arSection), the collapseDone() and expandDone() methods get called! It seems that they were queued up to run, but from my understanding, these methods are only called when an apply/digest occurs for the collapse directive. Clicking on another component seems to indirectly trigger an apply/digest that reaches the collapse directive, so the queued callbacks are finally made, but much too late. What I don't understand is how to trigger the apply/digest immediately after the animation is done so that collapseDone() and expandDone() get called at the right time. I'm guessing it has something to do with Angular scopes or watches, but can't quite see the link I'm missing. UPDATE: I've put together a Plunker with this arSection directive, but it works as expected…
answer count: 2
score: 2
has answer: http://stackoverflow.com/a/28277023

http://stackoverflow.com/q/28005076
tagged with: js-amd
type: UnansweredQuestion
tagged with: requirejs
has comment: http://stackoverflow.com/comment/44398617
has comment: http://stackoverflow.com/comment/44398602
tagged with: node.js
has comment: http://stackoverflow.com/comment/44398607
has comment: http://stackoverflow.com/comment/44398652
has comment: http://stackoverflow.com/comment/44398638
type: Question
has comment: http://stackoverflow.com/comment/44398667
has answer: http://stackoverflow.com/a/28120835
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44398681
has comment: http://stackoverflow.com/comment/44398595
has body: I have been searching around various repositories and blogs around the web and can't seem to find what I am looking for. The Problem When building code via AMD using something like RequireJS you can expect to set up your modules like so: Module one: define(['a'], function () { return { methodOne: function () { return 'something'; } } }); Module two: define(['b'], function () { return { methodTwo: function () { return 'something'; } } }); This helps a lot with building a project. It helps separates concerns out into multiple files rather than having one large one. But how do you optimize this into one file? I would assume that you would use some sort of build tool and come out with something like: define(function () { return { /* other dependency functions */ methodOne: function () { return 'something'; }, methodTwo: function () { return 'something'; } } }); For AMD environments. This essentially would just combine all of the modules together into one file. So I have a few questions: How would I optimize my AMD code correctly in a build like I've mentioned above? Is this even the best approach? How do I make my code portable for AMD, Node and the browser?? What I've Tried/Found It looks like RequireJS has it's own build tool (http://requirejs.org/docs/optimization.html) to do something like this. After going through the documentation and trying out the build tool for myself, I've found that it just combines all of the defines into one file. Am I missing something here? This isn't very useful. The UMD pattern seems to be what normalizes your code to work with AMD, Node and the browser (http://know.cujojs.com/tutorials/modules/authoring-umd-modules, https://github.com/umdjs/umd). Does this mean that every AMD file I am using I have to convert to UMD? This seems like a headache. I have stumbled upon uRequire (http://urequire.org/) which seems like it's the answer I am looking for. Being able to build code into UMD from AMD or CommonJS pattern. This is an issue that has …
has comment: http://stackoverflow.com/comment/44398623
answer count: 1
has title: Building AMD code for Node and browser
has comment: http://stackoverflow.com/comment/44398646

http://stackoverflow.com/comment/44336634
type: QuestionComment
has text: And what is your question?
score: 4
comment on: http://stackoverflow.com/q/27972031
type: Comment

http://stackoverflow.com/a/28090684
has body: The problem is that this file is too big. NetBeans by default won't parse JS files bigger than 1MB. You can change this behavior by using special parameters e.g. in [netbeans folder]/etc/netbeans.conf, open this file in text editor and look for netbeans_default_options= and append there (the whole value after = must be in double quotes): -J-Dnb.js.big.file.size=5145728 and restart IDE. The result would be e.g. something like netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-Dnetbeans.logger.console=true -J-ea -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes -J-Dnb.js.big.file.size=5145728" This option forces IDE to parse files up to 5.14MB of size. See this comment for more options
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/28074783
downvote count: 0
answers question: http://stackoverflow.com/q/28074783
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/a/28117453
has comment: http://stackoverflow.com/comment/44612158
type: Answer
upvote count: 1
has body: Problem with z-index: An element can not appear behind its parent. Since the submenu exists as a child element of the menu, it will not be able to appear behind the menu, z-index is really only applicable to two elements which share the same parent. Problem with setTimeout: The issue is most likely being caused because the this variable is out of scope by the time that the timeout occurs. This has an easy fix: create a global variable (say subMenu) and set subMenu = this before the timeout occurs and replace this with subMenu in your timeout function. You may use additional variables or a dictionary/array if you have multiple submenus to prevent the variable from being overwritten if two submenus get opened one right after the other
answers question: http://stackoverflow.com/q/28117141
has comment: http://stackoverflow.com/comment/44610263
score: 1
accepted answer of: http://stackoverflow.com/q/28117141
has comment: http://stackoverflow.com/comment/44609147
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44609967
has comment: http://stackoverflow.com/comment/44609018
has comment: http://stackoverflow.com/comment/44609872

http://stackoverflow.com/comment/44583583
score: 0
type: Comment
type: QuestionComment
has text: d.get("http://www.formget.com/tutorial/register_demo/registration.html"); Just opened the site from script.
comment on: http://stackoverflow.com/q/28104277

http://stackoverflow.com/q/28098525
accepted answer: http://stackoverflow.com/a/28098606
has comment: http://stackoverflow.com/comment/44572983
has comment: http://stackoverflow.com/comment/44574113
has comment: http://stackoverflow.com/comment/119996775
answer count: 1
tagged with: node.js
has comment: http://stackoverflow.com/comment/44574079
tagged with: mysql
has comment: http://stackoverflow.com/comment/44573108
upvote count: 1
has title: Remove Backtick From String
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/28098606
has comment: http://stackoverflow.com/comment/44573796
type: AnsweredQuestion
score: 1
favorite count: 0
has body: I am using the npm 'mysql' for a Node app I am working on. At one point that app saves a link to a table. In order to add the link to the table I have to use the npm's escapeId() function. My issue is that when I got to retrieve that link from the database I get something like this: '`http://bit`.`ly/2yy0foe`' I am not having an issue splitting the string at the period. I am having an issue getting rid of the backticks. Any suggestions? Using the npm or any other method. Thanks,
type: Question

http://stackoverflow.com/q/28101774
tagged with: force-layout
upvote count: 2
has title: D3 force layout: Moving arrows along links depending on node radius
accepted answer: http://stackoverflow.com/a/46601561
type: Question
tagged with: javascript
has body: In this D3 example: nodes have variable radius. I managed to move node labels so that they are always just next to their circles. However, how to move arrows? (You can see that for Microsoft, Apple etc, they are almost covered by the circle) Related questions: here here here here
score: 2
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/44580730
linked to: http://stackoverflow.com/q/16660193
linked to: http://stackoverflow.com/q/15495762
favorite count: 0
has answer: http://stackoverflow.com/a/46601561
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
linked to: http://stackoverflow.com/q/13165913
linked to: http://stackoverflow.com/q/18070495
type: AnsweredQuestion

http://stackoverflow.com/q/27977206
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27977551
type: Question
has comment: http://stackoverflow.com/comment/44346745
tagged with: http://stackoverflow.com/tag/html
has title: How to place dom element in HTML without rendering it?
has comment: http://stackoverflow.com/comment/44346871
has comment: http://stackoverflow.com/comment/44346982
upvote count: 3
has comment: http://stackoverflow.com/comment/44346739
answer count: 3
has answer: http://stackoverflow.com/a/27979341
has comment: http://stackoverflow.com/comment/44346709
has body: I need to place html/javascript code in html page that I don't want to render/run at page load. I want to get this content later with `innerHTML' and use it dynamical. How can code be saved in html page so that browsers ignore it but it can be manipulated with Javascript dom interaction. html Above code is not working, because closing tag of inner tag closes the parent "text/xml" type script. Need corss-platform method to keep JS/HTML inside dormant and intact.
has answer: http://stackoverflow.com/a/27980009
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44346796
tagged with: dom
score: 3

http://stackoverflow.com/comment/44502910
type: QuestionComment
has text: Well I'm looking for something more general so i can implement it in future situations as well, but in this case I am working on a project that was just handed to me that was in 3 different developers hands before, is a total mess and the company didnt charge the client enough to budget a full re-dev. With that said the plugin used positions elements relative to other elements and is a javascript alternative to css responsive development from my understanding, the issue I run into now is the plugin fires before a video element loads which causes it to be positioned too high in the document.
comment on: http://stackoverflow.com/q/28060648
score: 0
type: Comment

http://stackoverflow.com/comment/44371600
comment on: http://stackoverflow.com/a/27990000
has text: Thats another issue, server related I believe. See this post for potential fixes http://stackoverflow.com/questions/12409600/error-request-header-field-content-type-is-not-allowed-by-access-control-allow
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28035585
upvote count: 1
has body: Yes, you can associate any type of value with any property of another object, and you can add any type of value into an array. For example, this is perfectly valid JSON: { "key1": 1, "key2": "Two", "key3": ["Three", 4, {"five": "six"}, ["seven"]] } ... which can be used to define a value, as you see here:
has comment: http://stackoverflow.com/comment/44455987
score: 1
accepted answer of: http://stackoverflow.com/q/28035534
answers question: http://stackoverflow.com/q/28035534
has comment: http://stackoverflow.com/comment/44456365
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44456497
type: Answer
has comment: http://stackoverflow.com/comment/44456093

http://stackoverflow.com/comment/44701139
score: 1
type: AnswerComment
type: Comment
has text: Thank you for your answer, I think I have a much better understanding of the concept now.
comment on: http://stackoverflow.com/a/28112470

http://stackoverflow.com/a/28115955
has body: Try the following script &lt;script language="javascript"&gt; function randomString(length, chars) { var result = ''; var i; var sequencecheck = 1; var finalresult = ''; for (i = 0; i &lt;= 100; i++) { result += chars[Math.round(Math.random() * (chars.length - 1))]; finalresult+=result if(result.length == sequencecheck) { finalresult += "&lt;br/&gt;" sequencecheck++; } } return finalresult; } var rString = randomString(100, '0'); document.write(rString); &lt;/script&gt; Hope it helps!
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28115669

http://stackoverflow.com/comment/44479575
has text: @HowardRenollet yes, that's the sort of "helpful" behavior I was talking about :)
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28048547

http://stackoverflow.com/a/27980431
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/44352668
has body: Looks like you're running the file with wrong interpreter. You're using JScript, which is a Microsoft language. Bender is a JavaScript application and is designed to be ran by NodeJS interpreter. Make sure that you have NodeJS installed as mentioned in Setting up Bender.js, then use command line to run Bender.
score: 3
accepted answer of: http://stackoverflow.com/q/27980276
upvote count: 3
answers question: http://stackoverflow.com/q/27980276
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44352488

http://stackoverflow.com/comment/44419905
has text: "Isnt working" is not a valid question.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/28016196

http://stackoverflow.com/q/28107475
upvote count: 6
tagged with: javascript
has comment: http://stackoverflow.com/comment/49617247
answer count: 1
favorite count: 0
has body: i am running the query below in robomongo. bot it is giving an error as shown below? I am really trying to remove the duplcate enties in url field using this query. Is there any problem with my query? db.dummy_data.createIndex({"url":1},{unique:true},{dropDups:true}) My error is E11000 duplicate key error index: mydb.dummy_data.$url_1 dup key: {"some url"}
has comment: http://stackoverflow.com/comment/44590618
has title: E11000 duplicate key error index: While Creating Unique index
has comment: http://stackoverflow.com/comment/44590642
has comment: http://stackoverflow.com/comment/44590390
has comment: http://stackoverflow.com/comment/44591059
downvote count: 0
has comment: http://stackoverflow.com/comment/44590748
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44591600
tagged with: robo3t
score: 6
has comment: http://stackoverflow.com/comment/44591468
has comment: http://stackoverflow.com/comment/44590593
has answer: http://stackoverflow.com/a/28109085
type: Question
tagged with: indexing
tagged with: mongodb
has comment: http://stackoverflow.com/comment/44590665
has comment: http://stackoverflow.com/comment/44590806

http://stackoverflow.com/comment/44422379
has text: add your directive code.is you directive using isolated scope?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28017713

http://stackoverflow.com/q/27991071
favorite count: 0
accepted answer: http://stackoverflow.com/a/27991392
tagged with: css
has comment: http://stackoverflow.com/comment/44373215
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44373275
score: 0
has comment: http://stackoverflow.com/comment/44373306
upvote count: 1
has title: Radio button with custom image
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/5112995
tagged with: javascript
has body: I've used this example for checkboxes but then later I realized I need one for the radio buttons. Can someone please customize this example for radio buttons? Change checkbox check image to custom image html &lt;input type="radio" class="input_class_checkbox" name="role"&gt; Coach &lt;input type="radio" class="input_class_checkbox" name="role"&gt; Athlete jquery $('.input_class_checkbox').each(function(){ $(this).hide().after('&lt;div class="class_checkbox" /&gt;'); }); $('.class_checkbox').on('click',function(){ $(this).toggleClass('checked').prev().prop('checked',$(this).is('.checked')) }); Fiddle: http://jsfiddle.net/cn6kn/ or is there a one stop solution to use custom images both for radio button and checkboxes. I searched a few but all of them are offering their own skins. From the example I customized to included background-images as follows but it's not working for the radio buttons, all radio buttons remain checked irrespective I click the other one. .class_checkbox { width: 36px; height: 36px; background: url("../images/checkbox.png"); } .class_checkbox.checked { background: url("../images/checkbox-checked.png"); }
has answer: http://stackoverflow.com/a/27991392
possible better answer: http://stackoverflow.com/a/27991349
answer count: 2
has answer: http://stackoverflow.com/a/27991349
linked to: http://stackoverflow.com/q/10270987
linked to: http://stackoverflow.com/q/27991668

three.js
tags question: http://stackoverflow.com/q/28009786
tags question: http://stackoverflow.com/q/28034642
tags question: http://stackoverflow.com/q/28063312
tag name: three.js
tags question: http://stackoverflow.com/q/28035093
tags question: http://stackoverflow.com/q/27992147
tags question: http://stackoverflow.com/q/28068038
tags question: http://stackoverflow.com/q/28012352
tags question: http://stackoverflow.com/q/28110867
tags question: http://stackoverflow.com/q/28109706
tags question: http://stackoverflow.com/q/28013546
tags question: http://stackoverflow.com/q/28028617
tags question: http://stackoverflow.com/q/28121820
tags question: http://stackoverflow.com/q/27975041
tags question: http://stackoverflow.com/q/28008608
tags question: http://stackoverflow.com/q/27964635
tags question: http://stackoverflow.com/q/28038728
tags question: http://stackoverflow.com/q/28103121
tags question: http://stackoverflow.com/q/28029856
tags question: http://stackoverflow.com/q/28011525
tags question: http://stackoverflow.com/q/28023237
tags question: http://stackoverflow.com/q/28115792
tags question: http://stackoverflow.com/q/28036410
type: Tag
tags question: http://stackoverflow.com/q/28011397
tags question: http://stackoverflow.com/q/28032519
tags question: http://stackoverflow.com/q/28008423
tags question: http://stackoverflow.com/q/28085994
tags question: http://stackoverflow.com/q/28078556
tags question: http://stackoverflow.com/q/27965517
tags question: http://stackoverflow.com/q/28036991
tags question: http://stackoverflow.com/q/28011827
tags question: http://stackoverflow.com/q/28084906
tags question: http://stackoverflow.com/q/28013799
tags question: http://stackoverflow.com/q/28090671

http://stackoverflow.com/comment/44328257
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27967415
has text: I'm having a hard time understanding what is connecting to what and which part this code is in. Maybe a diagram?
score: 0

http://stackoverflow.com/q/28088245
type: UnansweredQuestion
has body: I am using an angular form which edits data. The data is fetched by $http and assigned to a controller object. I see that the form is set to modified due to this data assignment. I would like to have form state as not modified. This is being done on a button click, i would rather do it $http.success. this does not seem to be working though. Can you please advice? Thanks
has title: angular-input-modified - setting form prestine
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29992921
score: 0
answer count: 1
tagged with: angularjs

http://stackoverflow.com/a/28009937
has body: As nnnnnn explained but to further clarify your doubt i want to explain working of object array var ob = [{a:1,b:2},{a:3,b:4}]; if i want to access the value of second object's b than i should write ob[1].b;
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28009669

http://stackoverflow.com/q/28031290
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/28032157
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a sticky table header that I am working on. Right now, the user scrolls passed the header, and the header sticks correctly. The problem I am having is that tableHeaderRow is not the same width as tableHeader. Current steps for sticky header: Ajax call to fill table with data Save column widths Make tableHeader position:absolute Set column widths back into tableHeader (this is where it gets close but about 100 pixels short) Tried Set tableHeaderRow to the expected width. Set tableHeaderRow to 100% width. Remove padding and margin HTML Column1 Column2 Column3 Column4 Column5 Column6 Column7 Save off widths col1Width = $('#col1').width(); col2Width = $('#col2').width(); col3Width = $('#col3').width(); col4Width = $('#col4').width(); col5Width = $('#col5').width(); col6Width = $('#col6').width(); col7Width = $('#col7').width(); Stick Scroll Event Listener var tableHeaderTop = $("#tableHeader").offset().top; var above = true; //Window scroll event listener to fix table headers $( window ).scroll(function() { if(tableHeaderTop - $(window).scrollTop() <= 0){ if(above){ $('#tableHeader').css({ position:'absolute', top: $(window).scrollTop() - $("#top").height() -15, width:$('table#table').width(), }); $('.column1Value').width(col1Width); $('#col1').width(col1Width); $('.column2Value').width(col2Width); $('#col2').width(col2Width); $('.column3Value').width(col3Width); $('#col3').width(col3Width); $('.column4Value').width(col4Width); $('#col4').width(col4Width); $('.column5Value').width(col5Width); $('#col5').width(col5Width); $('.column6Value').width(col6Width); $('#col6').width(col6Width); $('.column7Value').width(col7Width); $('#col7').width(col7Width); above = false; }else{ $('#tableHeader').css({ top: $(window).scrollTop() - $("#top").height() -15, }); } }else{ $('#tableHeader').css({ position:'static', }); above = true; } }); Please ask for any clarification. Working on a bootply to show issue. Note: I made a bootply for the issue, but it works as I would want it…
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Make tr width match thead width on sticky table header
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/44528274
has text: VBScript is deprecated in IE11, and won't work in Edge mode: https://msdn.microsoft.com/en-us/library/ie/dn384057(v=vs.85).aspx
comment on: http://stackoverflow.com/a/28074411
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44439665
score: 0
type: AnswerComment
has text: The new navbar didn't make a difference, the image slider still disappears underneath the navbar when resizing and the margin corrections didn't work either. When changing the 'margin: auto;' to 'margin: 0;' it works on one side but not the other? :(
comment on: http://stackoverflow.com/a/28026212
type: Comment

http://stackoverflow.com/q/27977434
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27977680
tagged with: asp.net-mvc-4
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44347833
has body: Following is the code details, when I debugged its showing currentView is undefined when I initialize defaultView: 'resourceDay' @ViewBag.Title - My ASP.NET MVC Application @Styles.Render("~/Content/themes/base/css") @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryval") @Scripts.Render("~/bundles/jqueryui") @Scripts.Render("~/bundles/fullcal") @RenderSection("featured", required: false) @RenderBody() Following is the details on bundle bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( //"~/Scripts/jquery-ui-{version}.js", "~/Scripts/jquery-ui-1.8.23.custom.min.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( "~/Scripts/jquery.unobtrusive*", "~/Scripts/jquery.validate*")); bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( "~/Scripts/modernizr-*")); bundles.Add(new ScriptBundle("~/bundles/fullcal").Include( "~/Scripts/fullcalendar.js")); bundles.Add(new StyleBundle("~/Content/themes/base/css").Include( "~/Content/themes/base/jquery.ui.core.css", "~/Content/themes/base/jquery.ui.resizable.css", "~/Content/themes/base/jquery.ui.selectable.css", "~/Content/themes/base/jquery.ui.accordion.css", "~/Content/themes/base/jquery.ui.autocomplete.css", "~/Content/themes/base/jquery.ui.button.css", "~/Content/themes/base/jquery.ui.dialog.css", "~/Content/themes/base/jquery.ui.slider.css", "~/Content/themes/base/jquery.ui.tabs.css", "~/Content/themes/base/jquery.ui.datepicker.css", "~/Content/themes/base/jquery.ui.progressbar.css", "~/Content/themes/base/jquery.ui.theme.css", "~/Content/fullcalendar.css", "~/Content/fullcalendar.print.css")); This resource works fine when its not using ASP.NET MVC http://www.ikelin.com/jquery-fullcalendar-resource-day-view/ Can anyone please help me...
type: Question
has answer: http://stackoverflow.com/a/42782471
tagged with: asp.net-mvc
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/44347478
downvote count: 0
has title: Fullcalendar with resource view not working in ASP.NET MVC, on loading - 0x800a01bd - javaScript runtime error: Object doesn't support this action
tagged with: jquery

http://stackoverflow.com/q/28040444
tagged with: regex
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/28040552
has comment: http://stackoverflow.com/comment/44464713
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28041233
tagged with: css
has comment: http://stackoverflow.com/comment/44464737
type: Question
upvote count: 2
downvote count: 4
has answer: http://stackoverflow.com/a/28040916
score: -2
has title: How to replace a text with coloured text using javascript
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44464811
has body: I am having this text in text area. {color:#c91d1d}Hello{color} when it is submitted, i want the text between {} tags to be shown in color specified inside {} tag with color: how can i do so in javascript
has answer: http://stackoverflow.com/a/28040587
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/28078973
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28079146
has body: Hi I am having a lot of trouble attempting to figure out how to dynamically know where to rewrite data into a table after the user has made an edit. First I will show you the table code and then where I would like to see my data entered. Thank you for your time! Table ID PM Approval Junk Number Project Title Project Contact Junk Verified By Date Verified Comments Notes <?php foreach($table_data as $row) { $open = false; if(isset($row['Status']) == "Open") { $open = true; } if($open) { ?> <?php } else { ?> <?php } ?> <button onClick="openPopup(<?php echo $row['ID'];?>);"><?php echo $row['ID'];?> <?php $idt = $row['ID']?> <?php echo $row['SiteID'];?> <?php echo $row['SiteName'];?> <?php $db = get_db_connection('swcrc'); $db->connect(); $getID = $row['SiteTypeID']; $query = "SELECT [Descr] FROM dbo.tblLkpSiteType WHERE dbo.tblLkpSiteType.ID = '$getID'"; $db->query($query); $r = $db->fetch(); ?> <?php echo $r['Descr']; ?> <?php echo date('m/d/y', strtotime($row['UpdatedDate']) );?> <?php $db = get_db_connection('swcrc'); $db->connect(); $getID = $row['LTESID']; $query = "SELECT [Descr] FROM dbo.tblLkpLTESType WHERE dbo.tblLkpLTESType.ID = '$getID'"; $db->query($query); $r = $db->fetch(); echo $r['Descr']; ?> <?php if($row['OperationalAreaID'] != ''){ $db = get_db_connection('swcrc'); $db->connect(); $getID = $row['OperationalAreaID']; $query = "SELECT [Descr] FROM dbo.tblLkpOperationalAreas WHERE dbo.tblLkpOperationalAreas.ID = '$getID'"; $db->query($query); $r = $db->fetch(); echo $r['Descr']; }else {echo $row['OperationalAreaID'];} ?> Data Verified Comments C <?php } ?> So at this point if the user clicks on an ID number button then how would I use javascript to determine the x and y coordinates of a cell and then update those cells with the respective data? javascript function function updateTable() { document.getElementById("testLand").innerHTML = "Post Json"; //echo new table values in row where ID = button click } openPopup script function openPopup(id) { document…
type: Question
tagged with: javascript
tagged with: html-table
score: 0
tagged with: cell
answer count: 1
has title: Dynamically Finding and Editing a Table Cell using Javascript

http://stackoverflow.com/comment/44536880
has text: @BillyMoon: I'm not sure, OP said he used in Angular; I'm not sure about its anchoring rules. Might be…
comment on: http://stackoverflow.com/a/28077779
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/28089356
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28087624
has body: It blew up because you are not waiting for an asynchronous call to complete before moving on to the next iteration. What this means is that you are building a "stack" of unresolved operations until this causes a problem. What is the name of this site again? Get the picture? So this is not the best way to proceed with "Bulk" insertions. Fortunately the underlying MongoDB driver has already thought about this, aside from the callback issue mentioned earlier. There is in fact a "Bulk API" available to make this a whole lot better. And assuming you already pulled the native driver as the db object. But I prefer just using the .collection accessor from the model, and the "async" module to make everything clear: var bulk = Model.collection.initializeOrderedBulkOp(); var counter = 0; async.whilst( // Iterator condition function() { return count &lt; 1000000 }, // Do this in the iterator function(callback) { counter++; var model = buildModel(counter); bulk.insert(model); if ( counter % 1000 == 0 ) { bulk.execute(function(err,result) { bulk = Model.collection.initializeOrderedBulkOp(); callback(err); }); } else { callback(); } }, // When all is done function(err) { if ( counter % 1000 != 0 ) bulk.execute(function(err,result) { console.log( "inserted some more" ); }); console.log( "I'm finished now" ; } ); The difference there is using both "asynchronous" callback methods on completion rather that just building up a stack, but also employing the "Bulk Operations API" in order to mitigate the asynchronous write calls by submitting everything in batch update statements of 1000 entries. This does not not only not "build up a stack" of function execution like your own example code, but also performs efficient "wire" transactions by not sending everything all in individual statements, but rather breaking up into manageable "batches" for server commitment.
upvote count: 5
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28087624
score: 5

http://stackoverflow.com/comment/44548822
has text: The fancybox overlay uses a semi-transparent PNG file whose location is set in CSS. Have you checked that the path to that image is correct?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28085556
score: 0

http://stackoverflow.com/a/28021961
type: Answer
has body: You should store the result of your setTimeout calls in a variable within your plugin. When the mouse is over your element you can use clearTimeout to stop the timer running, and when the mouse moves out you can start the timer again. $.fn.cycle = function (timeout, cls) { var l = this.length, current = 0, prev = 0, elements = this, timerId; if (this.filter('.active').length &gt; 0) { current = this.index(this.filter('.active')[0]) + 1; prev = current - 1; } this.parent().hover(function(){ clearTimeout(timerId); }, function(){ timerId = setTimeout(next, timeout); }) function next() { elements.eq(prev).removeClass('active'); elements.eq(current).addClass('active'); prev = current; current = (current + 1) % l; timerId = setTimeout(next, timeout); } timerId = setTimeout(next, timeout); return this; }; Updated fiddle: http://jsfiddle.net/bd53ewoh/24/
upvote count: 1
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28021474
downvote count: 0
answers question: http://stackoverflow.com/q/28021474

http://stackoverflow.com/comment/44499932
type: Comment
type: QuestionComment
has text: You r right...i just realize that bulkDiv.append(' '); and bulkDiv.append(' '); is wrong. Anyone can help? I am weak in javascript....
comment on: http://stackoverflow.com/q/28052656
score: 0

http://stackoverflow.com/q/28025497
linked to: http://stackoverflow.com/q/26722715
has comment: http://stackoverflow.com/comment/44436627
type: Question
upvote count: 5
downvote count: 5
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44436417
score: 0
has title: Is there any difference between (this) and (_this) in jquery?
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/28025623
has body: What is the difference between these 2 statements $(this) and $(_this) in jquery.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44436554
accepted answer: http://stackoverflow.com/a/28025623
has comment: http://stackoverflow.com/comment/44436374

this
tags question: http://stackoverflow.com/q/28079213
tags question: http://stackoverflow.com/q/28099820
type: Tag
tags question: http://stackoverflow.com/q/28036293
tags question: http://stackoverflow.com/q/28047033
tags question: http://stackoverflow.com/q/28113948
tags question: http://stackoverflow.com/q/28117957
tags question: http://stackoverflow.com/q/28016966
tags question: http://stackoverflow.com/q/28018925
tags question: http://stackoverflow.com/q/27990294
tags question: http://stackoverflow.com/q/28029523
tag name: this
tags question: http://stackoverflow.com/q/28016664

http://stackoverflow.com/comment/44377778
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27993457
has text: Yeah, although it is probably somewhere in this dup http://stackoverflow.com/questions/10865025/merge-flatten-an-array-of-arrays-in-javascript

http://stackoverflow.com/comment/44566495
comment on: http://stackoverflow.com/a/28077533
type: AnswerComment
has text: i am not sure of the term but Django lets me pass variables/data sets to the webpage/template. the 'for each in mechanic_list' loop populates the select values (at least the first one). i should be able to figure out how to pass the values i need if i can figure out how to it would populate a static list of options. the Jsfiddle in my first comment has a more traditional looking version (i'm doing the same thing just with a loop to add the select options). thanks for all of your help.
score: 0
type: Comment

http://stackoverflow.com/q/28038329
has comment: http://stackoverflow.com/comment/44460777
has comment: http://stackoverflow.com/comment/44460776
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28038618
score: 0
has body: function showHyd() { window.location = "venueTravelHotel.html"; $(".tab2").addClass("displayNone"); $(".tab1").removeClass("displayNone"); } HTML &lt;div class=" tab2"&gt; Tab2 &lt;/div&gt; &lt;div class="tab1 displayNone"&gt; tab1 &lt;/div&gt; By default "tab1" div is displayNone and "tab2" is visible. When click on navigation link, I want go to that page and "tab1" div visible and "tab2" div hidden. But here after go to that page its loaded as default settings. How to fix this issue. Thanks in advance.
has comment: http://stackoverflow.com/comment/44460839
has comment: http://stackoverflow.com/comment/44460948
answer count: 1
has comment: http://stackoverflow.com/comment/44462505
linked to: http://stackoverflow.com/q/13186344
tagged with: javascript
tagged with: jquery
has title: How to show a particular div after click on a navigation link.?
has comment: http://stackoverflow.com/comment/44460788
has answer: http://stackoverflow.com/a/28038618

http://stackoverflow.com/q/28113365
score: 1
has body: I have the following problem: I create a Raphael canvas in a div. This happens as soon as the page is loaded and the initRadar() function is called: var r; var paper; var c; function initRadar(){ r = $( "#circ" ); paper = Raphael("circ", r.width(), r.height()); c = paper.circle(r.width()/2, r.height()/2, r.height()/2-2); $(window).on("orientationchange",function(){ //redraw(); // &lt;--- the way I wanted it setTimeout(function(){ redraw(); }, 300); // &lt;--- *yuck* }); } This functions perfectly so far. My problem starts when the orientation of the viewport changes. I thought I could add an event handle to the window, which fires, when the orientation changes and redraw the content. And it works... kind of. I wanted to call the second function: function redraw(){ c.remove(); c = paper.circle(r.width()/2, r.height()/2, r.height()/2-2); } Whenever the orientation changes, this function redraws the content. And this also works... almost. The problem is, I have a race condition. Even though the orientation change event fired, the #circ div still has the old size and position. This leads to the strange effect, that when the viewport is in portrait mode, the landscape circle is drawn and vice versa. My current solution is to use the timeout function (yuck), to wait a few ms so that the layout is done before I draw the circle. It works, but it is ugly and I don't want to have such a hack in my code. Can someone point me in the direction how to solve this problem correctly?
tagged with: raphael
type: Question
tagged with: canvas
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Resizing of a Raphael canvas on orientation changes
favorite count: 0
type: UnansweredQuestion
upvote count: 1
answer count: 0

http://stackoverflow.com/comment/44329800
has text: Yes, I took a closer look at the DOM and discovered this. Looks like it creates a wrapper element with the `ui-dialog` class and the actual element the dialog is attached to is a child and tagged with `.ui-dialog-content`.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27968405
score: 0

http://stackoverflow.com/comment/44392173
comment on: http://stackoverflow.com/q/28001573
score: 1
type: Comment
type: QuestionComment
has text: `animal[noises];` means you are trying to access an attribute of `animal` with the name given by `noises`. You are not creating any attribute there.

http://stackoverflow.com/comment/44385795
score: 1
comment on: http://stackoverflow.com/a/27997993
type: AnswerComment
type: Comment
has text: @sgouman - I'm not sure if I get your comment correctly, but the problem is with the other button with id bodyresize ? Do you want this button to call both functions or just the one from your init.js ? Also note, that if you want this anonymous function being called from two places, you should name it.

html-framework-7
tag name: html-framework-7
tags question: http://stackoverflow.com/q/28075764
type: Tag

http://stackoverflow.com/q/28011075
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/36079102
upvote count: 1
has title: Exporting Google Charts with jsPDF working on Chrome, but not on Firefox (blank image in document)
has answer: http://stackoverflow.com/a/33945562
tagged with: canvg
type: Question
answer count: 2
tagged with: google-visualization
tagged with: firefox
downvote count: 0
tagged with: javascript
score: 1
has body: var doc = new jsPDF(); doc.setFontSize(30); doc.setTextColor(244, 070, 017); doc.setFont("courier"); doc.setFontType("normal"); doc.text(35, 25, '<?php echo "Accessi ".$months[$_POST['month']]." ".$_POST['year']; ?>'); function getImgData(chartContainer) { var chartArea = chartContainer.getElementsByTagName('svg')[0].parentNode; var svg = chartArea.innerHTML; var chartDoc = chartContainer.ownerDocument; var canvas = chartDoc.createElement('canvas'); canvas.setAttribute('width', chartArea.offsetWidth); canvas.setAttribute('height', chartArea.offsetHeight); canvas.setAttribute( 'style', 'position: absolute; ' + 'top: ' + (-chartArea.offsetHeight * 2) + 'px;' + 'left: ' + (-chartArea.offsetWidth * 2) + 'px;'); chartDoc.body.appendChild(canvas); canvg(canvas, svg); var imgData = canvas.toDataURL('image/JPEG'); doc.addImage(imgData, "JPEG", 0,30); canvas.parentNode.removeChild(canvas); return imgData; } $( document ).ready(function() { $('#pdfBtn').click(function () { var chartContainer = document.getElementById('line_div'); var chartDoc = chartContainer.ownerDocument; var img = chartDoc.createElement('img'); img.src = getImgData(chartContainer); doc.save('grafico.pdf'); }); }); google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Giorni'); data.addColumn('number', 'Numero accessi'); data.addRows([ <?php for ($i = 1; $i < $days; $i++) { echo "['".$i."', ".$dati[$i]."], "; } echo "['".$i."', ".$dati[$i]."]"; ?> ]); var chart_div = document.getElementById('line_div'); var chart = new google.visualization.LineChart(line_div); chart.draw(data, { width: 780, height: 340, legend: 'right', title: '' }); } Salva PDF This is my Google Chart which takes data from PHP and populate the chart with the for cycle in addRows. I added a button (pdfBtn) which let me export my document created with jsPDF. Everything works with all browsers, but with…
tagged with: jspdf

http://stackoverflow.com/q/28069574
tagged with: sorting
has comment: http://stackoverflow.com/comment/44519008
type: Question
score: 0
answer count: 3
tagged with: arrays
tagged with: jquery
has answer: http://stackoverflow.com/a/28069809
has answer: http://stackoverflow.com/a/28069826
has comment: http://stackoverflow.com/comment/44518885
has comment: http://stackoverflow.com/comment/44518825
type: UnansweredQuestion
has title: Jquery compare function doesn't work on integers
has comment: http://stackoverflow.com/comment/44518656
has answer: http://stackoverflow.com/a/28069958
has comment: http://stackoverflow.com/comment/44519037
has body: I am trying to arrange my array by the last 4 substrings, which are numbers and it's not working correctly. the code is function sortArray(){ top10.sort(function(a, b){ var ax = a.substr(6, 4); var bx = b.substr(6, 4); return bx&gt;ax; console.log(top10); }); } top10 = []; $.get('user_db_hm.txt', function(myContentFile) { top10 = myContentFile.split("\n"); sortArray(); }, 'text'); the console.log is ["dupes - 9 ", "zombi - 8 ", "rofls - 7 ", "kombi - 6 ", "abcdf - 5", "johny - 4 ", "kolio - 22 ", "gosho - 2 ", "rapis - 14 ", "pesho - 1 "]
tagged with: javascript

http://stackoverflow.com/q/27969015
tagged with: jquery
tagged with: blueimp
answer count: 1
downvote count: 0
tagged with: file-upload
has answer: http://stackoverflow.com/a/29205729
favorite count: 0
tagged with: jquery-file-upload
type: UnansweredQuestion
score: 1
has title: Basic plugin does not show chosen file path / Submit on existing button click
upvote count: 1
type: Question
has body: I'm trying to add progress bar to an existing form using blueimp jquery-file-upload based on the code on https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin. Everything seems working fine, but after selecting a file, "No file choosen" is shown as file path. If I reload the page, the previous file path is then shown. jQuery File Upload Example a) How can I get the proper file path shown after selecting one? b) Currently, the code dynamically generates an upload button as described on the documentation. How can I use an existing one instead?
tagged with: javascript

http://stackoverflow.com/comment/50650315
type: Comment
score: 1
comment on: http://stackoverflow.com/a/31307350
has text: Btw, I think you are confusing "named function" with "(instance) method" and "scope" with "`this` context"
type: AnswerComment

http://stackoverflow.com/comment/44548800
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28084838
has text: use a regex to strip out the html?
score: 0

http://stackoverflow.com/a/27989453
has comment: http://stackoverflow.com/comment/44370975
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/27989337
score: -1
has body: Ouch man. Is it possible to use jQuery instead? The other thing I know is that if the return xml is a little off (poorly formatted xml, case sensitive, non-legal characters) the javascript will trash the return value. With jQuery you have better debugging options to see the error.
downvote count: 1

http://stackoverflow.com/comment/44429235
type: Comment
has text: i wantt help you but in this way you give too few informations. First of all what library do you use for the view? ng-view? and second can you write the code of the link?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28021371

http://stackoverflow.com/comment/44536514
has text: When you use `new Image()` and set the src attribute, javascript immediately starts loading the set src. That always happens, regardless if the element is placed in the DOM or not. The onload event gets fired automaticly once the src is fully loaded. So what this code does is place the loading image directly into the DOM and in the background load the original image, once that's loaded the onload fires at which point it assigns the src of the original to the src of the image that's already placed in the DOM. At that point the image is already fully loaded so it will be directly visible.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/28031941
type: AnswerComment

http://stackoverflow.com/comment/44554246
score: 0
type: Comment
type: QuestionComment
has text: @GabyakaG.Petrioli As I said in the update, I read about that this could happen, so I made sure I am staying at static page and no its still doesn't work. By the way, from specs its more about if you totally change origin, eg. change domain or close the window, rather than just changing route. And still, angular http works... :(
comment on: http://stackoverflow.com/q/28088087

http://stackoverflow.com/a/28329474
score: 1
has body: I updated my Bablylon.js file to the latest and it just worked. I should have tried that sooner. Thanks everybody!
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/28059155
downvote count: 0

http://stackoverflow.com/comment/44437305
has text: yes and another important thing is that its not good to disabled the checkboxes by default @OlegDubas
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28025775

http://stackoverflow.com/q/28092471
score: 0
tagged with: google-api
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28289484
has body: Hello i just started learning gplus-api signin using javascript but i came across a error that says this Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null'). This is my code i have referred to this site but didn;t help me! https://developers.google.com/+/web/signin/javascript-flow My code Sign in with Google my js origin is http://localhost:8080, also when i try to load this url it gives me 404 error please help to solve me this error!
type: Question
has title: Gives me this error in gplus-api using JS
answer count: 1
tagged with: google-plus
tagged with: javascript
tagged with: google-api-js-client

http://stackoverflow.com/q/28106089
has comment: http://stackoverflow.com/comment/44588515
type: Question
has answer: http://stackoverflow.com/a/28106477
accepted answer: http://stackoverflow.com/a/28106477
tagged with: javascript
has comment: http://stackoverflow.com/comment/44587700
possible better answer: http://stackoverflow.com/a/28106335
score: 0
has answer: http://stackoverflow.com/a/28106335
answer count: 2
has body: I have a modal window which has 3 tabs. One one tab i tried to align the button and table on line with other controls, but it dint work. HTML: Data source Elastic search Enter the URL: Select the index: Get data {{header}} {{cell}} Current: Desired:
has title: Bootstrap modal alignment of table
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/44587178

http://stackoverflow.com/comment/44647520
type: Comment
score: 0
type: AnswerComment
has text: Thank you, this works great on PC, but for some reason neither yours or what pawel suggested work on iOS. (thats kind of what i was needing it for)
comment on: http://stackoverflow.com/a/28121591

http://stackoverflow.com/a/28042142
accepted answer of: http://stackoverflow.com/q/28042092
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 4
answers question: http://stackoverflow.com/q/28042092
upvote count: 4
has body: I would just place a span inside the label then set/empty this: this is a test $('#chkbox1').click(function () { if ($('#chkbox1').is(':checked')) { var vcard = "\n Jürgen \n Marketing und Vertrieb \n e-mail:juergen@mail.de \n anschrift In test 18 \n 40599 Düsseldorf \n Deutschland \n website www.test.de \n telefon +49 211 123456789 \n mobil +49 177 123456789 \n fax +49 211 123456789 \n "; $('#lbl1DynamicText').text(vcard); } else { $('#lbl1DynamicText').text(''); } });

http://stackoverflow.com/comment/44500584
score: 0
comment on: http://stackoverflow.com/q/28059569
has text: Do you have a question?
type: QuestionComment
type: Comment

http://stackoverflow.com/q/28096450
has title: Dynamic Footer Size With Min Size
accepted answer: http://stackoverflow.com/a/28096645
tagged with: css
has body: I have a webpage with a footer (not fixed). The page's contents currently do not require scrolling and the footer currently takes up about 25% of the browser window at full screen on a 1920 x 1080 display. The footer's contents are aligned to the top of the footer and the rest of the footer is empty space but with the footer's color It is very similar to this (my page is not wix though): http://www.wix.com/website-template/view/html/796?originUrl=http%3A%2F%2Fwww.wix.com%2Fwebsite%2Ftemplates%2Fhtml%2Fpersonal%2Fresume-cv%2F1&amp;bookName=create-master-new&amp;galleryDocIndex=2&amp;category=personal&amp;metaSiteId=&amp;viewMode=desktop Ideally, I would want that empty space in the footer to shrink as the page contents grows (instead of increasing the scrolling distance) but stop shrinking as it reaches a minimum height (and then the scrolling distance starts to increase) My question is: is this possible with standard CSS? if not, is it possible with an existing JS library (e.g. jQuery)? if not, what is the best approach to writing the manual JS? Thanks.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28096645
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/28009469
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44410942
accepted answer of: http://stackoverflow.com/q/28009368
upvote count: 2
has body: It may not be as pretty, but using the arrow function notation will preserve the this value correctly, so I would try changing your validateToken() function to the following: private validateToken( results : IAuthResults ) : void { if( results &amp;&amp; results.access_token ) { var validateTokenURL : string = "https://www.googleapis.com/oauth2/v1/tokeninfo"; validateTokenURL += "?access_token=" + results.access_token; this.http.get&lt;ITokenValidationResult&gt;( validateTokenURL ); this._validationPromise.then( () =&gt; { this.handleTokenVerificationResult.apply(this, arguments); }, () =&gt; { this.handleTokenVerificationError.apply(this, arguments); }); } } Alternatively, just use Function.bind() to preserve the value of the this variable: private validateToken( results : IAuthResults ) : void { if( results &amp;&amp; results.access_token ) { var validateTokenURL : string = "https://www.googleapis.com/oauth2/v1/tokeninfo"; validateTokenURL += "?access_token=" + results.access_token; this.http.get&lt;ITokenValidationResult&gt;( validateTokenURL ); this._validationPromise.then(this.handleTokenVerificationResult.bind(this), this.handleTokenVerificationError.bind(this)); } } However, you should note that using .bind() destroys type information in TypeScript, currently, so I mostly stick with using arrow functions to preserve the type information correctly.
answers question: http://stackoverflow.com/q/28009368
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/28093217
has comment: http://stackoverflow.com/comment/44574850
type: Answer
answers question: http://stackoverflow.com/q/28092850
score: 1
upvote count: 1
has body: As you can see here, echoing a json_encoded url string will escape the forward slashes in that url. The solution then is either to do: var url = '&lt;?php echo $anio; ?&gt;'; Making sure that the value of $anio does not contain any single quotes, or (if you're running PHP 5.4 or up), to use this: var url = &lt;?php echo json_encode($anio, JSON_UNESCAPED_SLASHES); ?&gt;; Note the lack of quotes (json_encode will add quotes for you), and the use of the JSON_UNESCAPED_SLASHES constant. check the manual for more constants demo/PoC here
has comment: http://stackoverflow.com/comment/44569329
downvote count: 0

http://stackoverflow.com/comment/44503288
type: Comment
comment on: http://stackoverflow.com/a/28058575
score: 1
has text: This would be better as a comment, not an answer.
type: AnswerComment

http://stackoverflow.com/comment/44552433
type: AnswerComment
type: Comment
has text: Also, does this mean to use dataList you must access it either in getData().then(function (data) { } or outside of the init() function?
comment on: http://stackoverflow.com/a/28087123
score: 0

http://stackoverflow.com/comment/44338508
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27971104
type: AnswerComment
has text: Thanks, initially didn't work because I was using old version of angular, after updating solutions above work. Appreciate the answer!

http://stackoverflow.com/q/27989349
score: 0
has body: I am beginning to use javascript along with Kendo ui and I am attempting to format the data in a textbox to allow 3 decimal places. I am receiving a runtime error of "Invalid character". The line of code is: $(“#StartWeight”).data(“kendoNumericTextBox”).format(“#.####”); StartWeight is the ID of the textbox on the page with data-role of "numerictextbox". Is this not a valid method of formatting? Can someone please point out my mistake? Many thanks
has answer: http://stackoverflow.com/a/27989478
type: AnsweredQuestion
type: Question
answer count: 1
has title: Kendo format error
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27989478
tagged with: kendo-ui

http://stackoverflow.com/a/28039457
answers question: http://stackoverflow.com/q/28039290
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44464745
type: Answer
score: 1
has body: Try this $('.view').click(function (event){ $(this).css("background", "url(assets/images/sample.png) no-repeat"); }); EDIT In your case if you wish to set the background according to id of the element, simply modify the code like this: $('.view').click(function (event){ var id = $(this).attr('id'); $(this).css("background", "url(assets/images/" + id + ".png) no-repeat"); });
accepted answer of: http://stackoverflow.com/q/28039290

http://stackoverflow.com/q/28112223
type: Question
tagged with: php
has comment: http://stackoverflow.com/comment/44598281
has title: get Player Name from SteamID
has comment: http://stackoverflow.com/comment/44598177
has comment: http://stackoverflow.com/comment/44598179
has answer: http://stackoverflow.com/a/28112321
answer count: 1
has comment: http://stackoverflow.com/comment/44598151
downvote count: 4
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/28112321
tagged with: steam-web-api
tagged with: javascript
has comment: http://stackoverflow.com/comment/44598202
score: -4
favorite count: 0
has body: I'm Creating a Loading Screen for a game server for Garry's Mod. I need a way to convert the users SteamID or CommunityID to their name. AKA STEAM_0:1:48093934 -&gt; NightmareInfinity or 76561198056453597 -&gt; NightmareInfinity Im currently using PHP and JavaScript to convert. If you need the function names i have SteamID2Communityid($steamid) and CommunityID2SteamID($communityid) Both functions are in PHP I have also looked at other questions, None of them helped me. I looked at the SteamAPI and couldn't find anything.

http://stackoverflow.com/q/28077353
has answer: http://stackoverflow.com/a/28077519
has answer: http://stackoverflow.com/a/28077576
upvote count: 1
downvote count: 1
type: Question
tagged with: indexof
tagged with: arrays
accepted answer: http://stackoverflow.com/a/28077512
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44533599
has comment: http://stackoverflow.com/comment/44533918
favorite count: 0
has answer: http://stackoverflow.com/a/28077597
possible better answer: http://stackoverflow.com/a/28077678
answer count: 5
has body: I have an array containing the individual letters of a word and i want to search the array to return the index values of certain letters. However, if the word contains more a letter more than once (such as 'tree') the programme only returns one index value. This is a sample of the code: var chosenWord = "tree"; var individualLetters = chosenWord.split(''); var isLetterThere = individualLetters.indexOf(e); console.log(isLetterThere); this code will return the number '2', as that is the first instance of the letter 'e'. How would i get it to return 2 and 3 in the integer format, so that i could use them to replace items in another array using the .splice function.
has answer: http://stackoverflow.com/a/28077678
has answer: http://stackoverflow.com/a/28077512
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44533659
has title: Returning multiple index values from an array using Javascript

http://stackoverflow.com/comment/44598789
type: QuestionComment
has text: Exactly. This is what the question is about. One needs to loop through the array and the row together and check the row where the array has a '1'. How to do this using Jquery?
comment on: http://stackoverflow.com/q/28112249
score: 0
type: Comment

http://stackoverflow.com/q/27987967
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/44373190
tagged with: google-maps-api-3
has title: Multiple Google Map Markers
has body: The following code properly renders a Google map in an HTML region of a Oracle APEX application. But all of the map locations have the same marker icon. How can I make the Marker for 'Flat Rock' different from the other 3 markers? jQuery(function($) { // Asynchronously Load the map API var script = document.createElement('script'); script.src = "http://maps.googleapis.com/maps/api/js?sensor=false&callback=initialize"; document.body.appendChild(script); }); function initialize() { var map; var bounds = new google.maps.LatLngBounds(); var mapOptions = { mapTypeId: 'roadmap' }; // Display a map on the page map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); map.setTilt(45); // Multiple Markers var markers = [ ['Flat Rock', 43.649099,-71.327217,'#APP_IMAGES#darkgreen_MarkerF.png'], ['19-Mile Bay', 43.647613, -71.278181], ['Little Bear Island', 43.641296, -71.323596], ['Trexlers Marina', 43.667654, -71.349013] ]; // Info Window Content var infoWindowContent = [ [' ' + ' Flat Rock ' + ' Flat Rock of Wellswood is located on East Point of Long Island, Lake Winnipesaukee. ' + ' '], [' ' + ' 19-Mile Bay ' + ' 19-Mile Bay docks and store. A great place to fill up your boat gas tank and cool off with some fresh ice cream! ' + ' '], [' ' + ' Little Bear Island ' + ' Off its western and southern shores are great fishing spots for salmon in the early spring. ' + ' '] [' ' + ' Trexlers Marina ' + ' Boat rentals and gas. ' + ' '] ]; // Display multiple markers on a map var infoWindow = new google.maps.InfoWindow(), marker, i; // Loop through our array of markers & place each one on the map for( i = 0; i < markers.length; i++ ) { var position = new google.maps.LatLng(markers[i][1], markers[i][2]); bounds.extend(position); marker = new google.maps.Marker({ position: position, map: map, title: markers[i][0], icon: markers[i][3] }); // Allow each marker to have an info window google.maps.event.addListener(marker, 'click', (function(marker, i) { return function(…
upvote count: 0
has answer: http://stackoverflow.com/a/27988071
answer count: 1
favorite count: 0
type: UnansweredQuestion
downvote count: 1
type: Question

http://stackoverflow.com/a/28048768
answers question: http://stackoverflow.com/q/28048571
has body: You can't change the format of just a part of the text, but you can change the innerHTML of your DIV to include the formatting, as you can see in the script part below. test message
type: Answer
score: 0

http://stackoverflow.com/a/28119233
has body: Check this out: /******************************************************** ⇒ create the master objects. /********************************************************/ function MasterObject(dis){ Object.defineProperty( this,'this_object', {get:function(){return dis}} ) } /******************************/ function MasterArray(dis){ Object.defineProperty( this,'this_array', {get:function(){return dis}} ) } /******************************************************** ⇒ define the master properties. /********************************************************/ Object.defineProperty( Object.prototype,'_', {get:function(){return new MasterObject(this)}} ) /******************************/ Object.defineProperty( Array.prototype,'_', {get:function(){return new MasterArray(this)}} ) /******************************************************** ⇒ example to expand in the console. /********************************************************/ x={a:1,b:2,c:3,d:4,e:5} y=[] y['a']=1 y['b']=2 y['c']=3 y['d']=4 y['e']=5 z=[x,y] /******************************************************** ⇒ open the console, type [z], hit [enter] and expand... /********************************************************/ Rundown: Let's say for example we define a property on Object.prototype called len &amp; set its value to 5. Now if we call {}.len, we get a result of 5 &amp; if we call [].len or "".len or #.len etc, we get the same result due to inheritance from Object.prototype on instantiation. But let's say we then define a property on Array.prototype with the same name:- len &amp; set its value to 50. Now if we call {}.len etc, we get the same result of 5, but if we call [].len we get 50, as the Array.prototype was created most recently and its definition of len overwrites Object.prototype's version. Solution: So if we define only 1 property to Object.prototype called for simplicity's sake _, &amp; set its value to a substructure object that contains the handlers specific to objects only. Then if we do the same for Array…
type: Answer
answers question: http://stackoverflow.com/q/28084034
score: 0

http://stackoverflow.com/q/28112070
favorite count: 0
has answer: http://stackoverflow.com/a/28112187
has body: Here is an example of a function that is followed by the jQuery function: &lt;script&gt; (function ($) { $('a').mouseenter( function () { alert(this.id); }); })(jQuery); &lt;/script&gt; I have done tons of searches and been reading through jQuery Succinctly, but I'm really struggling to understand what passing in the $ sign or following the function with (jQuery) does. Could anyone clarify this for me? Bonus question: does this have anything to do with extending a jQuery method? I am looking into trying to extend the .html() method.
has comment: http://stackoverflow.com/comment/44598037
score: 0
duplicate of: http://stackoverflow.com/q/2937227
linked to: http://stackoverflow.com/q/5007279
tagged with: extension-methods
linked to: http://stackoverflow.com/q/592396
answer count: 4
has answer: http://stackoverflow.com/a/28112548
has title: Following a function with (jQuery)
possible better answer: http://stackoverflow.com/a/28112178
has answer: http://stackoverflow.com/a/28112178
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/28112329
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/28112329
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44598235
linked to: http://stackoverflow.com/q/2937227

datetime
tags question: http://stackoverflow.com/q/28066053
tags question: http://stackoverflow.com/q/27978819
tags question: http://stackoverflow.com/q/28092927
tags question: http://stackoverflow.com/q/28082164
tags question: http://stackoverflow.com/q/27990311
tags question: http://stackoverflow.com/q/27994941
tags question: http://stackoverflow.com/q/27993607
tags question: http://stackoverflow.com/q/27973941
tag name: datetime
tags question: http://stackoverflow.com/q/28024625
type: Tag
tags question: http://stackoverflow.com/q/27971988
tags question: http://stackoverflow.com/q/28056911
tags question: http://stackoverflow.com/q/28029182
tags question: http://stackoverflow.com/q/28102554
tags question: http://stackoverflow.com/q/28056721

http://stackoverflow.com/comment/48020328
score: 0
has text: Next, you may want to look into Routing, so something like `http://yourserver/home` routes to `http://yourserver/GetWeb.ashx?page=home` @ https://msdn.microsoft.com/en-us/library/cc668202(v=vs.90).aspx
type: AnswerComment
comment on: http://stackoverflow.com/a/27970295
type: Comment

http://stackoverflow.com/q/28054805
tagged with: image
score: 0
answer count: 1
has body: I am looking for Javascript libraries that can help me do the following: 1.Given an image. Crop it using 4 coordinates points. (this may result in a non regular quadrilateral) 2.Transform the new image into a regular rectangle. There is an example here. I've looking at libraries like JCrop (and many others), but as far as I can see it only crops using regular rectangles. The libraries could either be for client or node.js. Bonus points for a computer vision library that can do corner detection. Many thanks,
has title: Image cropping and transformation in Javascript - Scanning app
tagged with: computer-vision
type: UnansweredQuestion
tagged with: image-processing
has answer: http://stackoverflow.com/a/28055335
type: Question
tagged with: javascript

http://stackoverflow.com/q/28040805
accepted answer: http://stackoverflow.com/a/28074258
has comment: http://stackoverflow.com/comment/44502498
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/28074258
has comment: http://stackoverflow.com/comment/44477627
has title: Google map path doesn't cross International Dateline using epoly.js
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/44503356
type: Question
tagged with: google-maps
score: -2
tagged with: javascript
tagged with: jquery
has body: I'm making a marker move from point A to point B by using the .GetPointDistance from epoly.js in a loop. It works fine as long as the shortest distance does not cross the Intl Dateline. If it does, like going from San Francisco, to Tokyo, it travels eastbound the long way around instead of crossing the pacific (Google polyline will draw it correctly) Here's my code function myLoop () { setTimeout(function () { var point = flightPath.GetPointAtDistance(newDistance); marker.setPosition(point); if (newDistance < legDistance) { myLoop(); } else { if (testArray.length > 0) { flightPathShadow.setMap(map); flightPath.setMap(map); x = testArray.shift(); newDistance = 0; loopWrapper(); } } oldDistance = newDistance; newDistance = newDistance + travelDistance; totalDistance = (totalDistance + travelDistance); var milesDistance = totalDistance*0.000621371; milesDistance = Math.round(milesDistance); milesDistance = addCommas(milesDistance); $("#dashboard").html(" " + milesDistance + " miles traveled "); }, travelTime) } Here's the function in epoly.js google.maps.Polygon.prototype.GetPointAtDistance = function(metres) { if (metres == 0) return this.getPath().getAt(0); if (metres < 0) return null; if (this.getPath().getLength() < 2) return null; var dist=0; var olddist=0; for (var i=1; (i < this.getPath().getLength() && dist < metres); i++) { olddist = dist; dist += this.getPath().getAt(i).distanceFrom(this.getPath().getAt(i-1)); } if (dist < metres) { return null; } var p1= this.getPath().getAt(i-2); var p2= this.getPath().getAt(i-1); var m = (metres-olddist)/(dist-olddist); return new google.maps.LatLng( p1.lat() + (p2.lat()-p1.lat())*m, p1.lng() + (p2.lng()-p1.lng())*m); }
tagged with: google-polyline
downvote count: 2

http://stackoverflow.com/a/28029604
score: 0
has body: Try the method bellow and order as needed. .plate { display: flex; flex-direction: row; } .one, .two, .three, .four, .five { width: 100px; height: 100px; display: inline-block; text-align: center; line-height: 100px; font-weight: bold; color: white; font-size: 24px; } .one { background-color: red; order: 2; } .two { background-color: green; order: 3; } .three { background-color: orange; order: 1; } .four { background-color: darkorange; order: 5; } .five { background-color: orange; order: 4; } One Two Three Four Five See CSS Flexible Box Layout Module
type: Answer
answers question: http://stackoverflow.com/q/28029310

http://stackoverflow.com/comment/44587633
type: AnswerComment
comment on: http://stackoverflow.com/a/28104333
type: Comment
has text: So your PHP might look something like this: ` <?php echo $myDataFetchedFromDatabase; ?> ` for the HTML data part. See what I mean?
score: 0

http://stackoverflow.com/comment/44435058
has text: I mean when I run it on live server
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28024835
score: 0

http://stackoverflow.com/comment/44364003
type: AnswerComment
has text: I can change both, just learning Style sheets so wasn't familiar with wild-carding type thing. I will investigate further into the above suggestion, and do understand should be unique, but I was thinking of it like xml, where you have a parent, and you could use the same child name on different parents.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27986128

http://stackoverflow.com/comment/44544499
comment on: http://stackoverflow.com/q/28079347
has text: http://jsfiddle.net/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28050304
favorite count: 0
has comment: http://stackoverflow.com/comment/44483425
type: UnansweredQuestion
tagged with: facebook
score: 6
has comment: http://stackoverflow.com/comment/44483200
upvote count: 6
has body: I'm new to Meteor development, and I'm having a lot of trouble with this. I found the following guide, which is the closest thing I've found to a solution: http://www.andrehonsberg.com/article/facebook-graph-api-meteor-js The .getFriends() function here looks promising as well, but I have no experience with this: https://github.com/maxkferg/meteor-facebook-collections/ I implemented the following code in client/config/config.js: Accounts.ui.config({ requestPermissions: { facebook: ['email', 'user_friends', 'user_location', 'user_events', 'friends_events', 'friends_location', 'friends_about_me', 'user_status', 'friends_status', 'read_friendlists'], } }); This properly generated the request for permissions upon log-in. (I do have an issue, though. I'm getting the following error: "Uncaught Error: Accounts.ui.config: Can't set requestPermissions more than once for facebook," which is odd, since it points to the hidden accounts_ui.js file, which I have no access to. Shouldn't I be able to override this just fine? The guide above has no mention of this error.) I implemented the rest of the guide's code as well, but nothing seems to be working. Furthermore, the guide seems to implement a button on the screen that causes some aspect of the user's data to be displayed (friends, posts, etc.) in a list. I don't want any sort of display, though; I just want to be able to access the data (an array of Facebook-specific ids for the a given user's friends would be ideal) so that I can use it for various functions in my web app. Any and all help would be really appreciated!
type: Question
linked to: http://stackoverflow.com/q/23417356
tagged with: javascript
has title: How do I access a user's Facebook friends list in Meteor?
has answer: http://stackoverflow.com/a/31265452
answer count: 1
downvote count: 0
tagged with: meteor
tagged with: facebook-graph-api

http://stackoverflow.com/a/30013132
score: 1
accepted answer of: http://stackoverflow.com/q/27999050
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27999050
has body: As far as I know there is not such functionality to search locations by wildcards, you can only search by beginning of the word
type: Answer
upvote count: 1

http://stackoverflow.com/comment/45094051
type: Comment
score: 0
has text: Just so others are aware, this solution works (at least today) if your map specifies one of google.maps.MapTypeControlStyle.HORIZONTAL_BAR or google.maps.MapTypeControlStyle.DROPDOWN_MENU, but not if you use the default (or don't specify anything). That is because the default switches between the two layouts, and any DOM elements that are added get removed when switching between them.
type: AnswerComment
comment on: http://stackoverflow.com/a/28376677

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/28109717
tag name: google-oauth
tags question: http://stackoverflow.com/q/28019403

http://stackoverflow.com/q/28064005
has answer: http://stackoverflow.com/a/28064152
possible better answer: http://stackoverflow.com/a/28064100
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28064100
score: 1
favorite count: 0
has title: Checkbox fire a function if checked and a different function if not checked
type: Question
upvote count: 2
tagged with: javascript
tagged with: jquery
has body: Hi i have got a checkbox and when i click it and check the box a function runs, which works just how i want it to.. now i want to run a DIFFERENT function if it is checked off but it is just running the same function everytime. &lt;input type="checkbox" class="no-custom" onclick="CheckBox()"&gt; function CheckBox() { $("#emailMain").css({"display": "none"}); $("#emailSame").css({"display": "inline"}); var Mainemail = Customer().email['#text'](); Contact().email = Mainemail; EmailHolder(Mainemail); } Any ideas in the best way to sort this?
answer count: 3
has answer: http://stackoverflow.com/a/28064084
downvote count: 1
accepted answer: http://stackoverflow.com/a/28064084

http://stackoverflow.com/comment/44514778
type: QuestionComment
comment on: http://stackoverflow.com/q/28066373
score: 0
has text: ok, thank you. But how do i let the user upload the image?
type: Comment

http://stackoverflow.com/q/28114180
tagged with: v8
answer count: 1
has comment: http://stackoverflow.com/comment/44630414
has comment: http://stackoverflow.com/comment/44630454
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44632753
tagged with: javascript
has answer: http://stackoverflow.com/a/28128264
tagged with: optimization
has title: if some function is not optimized does it mean that all functions where it is declared are not optimized either?
type: AnsweredQuestion
favorite count: 0
has body: Recently I encountered this article optimization killers about the V8 engine's optimization of JavaScript programs. But the article is not completely clear to me, so I would like to ask a couple of question about this stuff. The article states: Code compiled by the optimizing compiler can easily be, say, 100x faster than the code generated by the generic compiler... It is important to note that patterns that cause optimization bailouts affect the entire containing function. Does this mean that if, for instance, some large piece of code, let's say a JavaScript library, which is in a form of the IIFE (Immediately-Invoked Function Expression) contains a try {} catch(e) {} statement inside it wrapped by another function declaration, then the entire library is not optimized? It seems so, because I tried to run this command $ node --trace_opt --trace_deopt --allow-natives-syntax try_catch.js, and try_catch.js is below: //Function that contains the pattern to be inspected (using with statement) function optimizeWhack() { foo(); function foo() { try {} catch(e) {} } return 12 } function printStatus(fn) { switch(%GetOptimizationStatus(fn)) { case 1: console.log("Function is optimized"); break; case 2: console.log("Function is not optimized"); break; case 3: console.log("Function is always optimized"); break; case 4: console.log("Function is never optimized"); break; case 6: console.log("Function is maybe deoptimized"); break; } } //Fill type-info optimizeWhack(); %OptimizeFunctionOnNextCall(optimizeWhack); //The next call optimizeWhack(); //Check printStatus(optimizeWhack); And the response I've got was this one, with function is not optimized: $ node --trace_opt --trace_deopt --allow-natives-syntax try_catch.js [deoptimize context: ea2f6f14679] [optimizing: optimizeWhack / ea2f6fc9c29 - took 0.033, 0.064, 0.000 ms] **** DEOPT: optimizeWhack at bailout #1, address 0x0, frame size 8 [deoptimizing: begin 0xea2f6fc9c29 optimizeWhack @1] translating optimizeWhack =&gt; node=3, h…
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/44630433
accepted answer: http://stackoverflow.com/a/28128264

http://stackoverflow.com/q/28108148
has body: I'm using ngStorage to deal with local storage and Protractor to e2e specs in an AngularJS app. describe('Test', function() { beforeEach(function () { browser.driver.manage().window().setSize(1280, 1024) browser.get('http://localhost:9000/#/test/first-test') }) it("keeps the alternative marked", function () { element(by.id('element')).click() browser.refresh() expect(element(by.id('element')).isSelected()).toBe(true) }) }) Result: 1) Test keeps the alternative marked Message: Expected false to be true. Stacktrace: Error: Failed expectation at [object Object].<anonymous> (path/spec/test_spec.js:12:52) I think that browser.refresh() clears the local storage. Is there a way to keep it or another way to test the same thing?
tagged with: testing
tagged with: protractor
tagged with: javascript
score: 5
has answer: http://stackoverflow.com/a/38083164
downvote count: 0
answer count: 1
favorite count: 0
upvote count: 5
tagged with: angularjs
type: UnansweredQuestion
tagged with: ng-storage
has title: Protractor testing with ngStorage
type: Question

http://stackoverflow.com/q/28049132
type: Question
accepted answer: http://stackoverflow.com/a/28049162
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/28049207
has answer: http://stackoverflow.com/a/28049207
answer count: 2
downvote count: 0
has title: Combining 2 jQuery functions
linked to: http://stackoverflow.com/q/4576867
favorite count: 0
has answer: http://stackoverflow.com/a/28049162
has body: My jQuery is starting to get unnecessarily long. Is there a way to easily combine these 2 functions. My first thought is to create a custom event out of the key down function. Any solutions or suggestions on what to read up on would be appreciated. $('th:nth-child(3):first').click(function () { $('#dtSelect').val(2).change(); }); $('th:nth-child(3):first').keydown(function(event){ if(event.keyCode==13){ $('#dtSelect').val(2).change(); } });
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/comment/44401505
has text: I relocated the reference to the static file directory in the server.js and it made no difference
comment on: http://stackoverflow.com/q/28005556
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44565215
type: QuestionComment
comment on: http://stackoverflow.com/q/28088984
score: 1
has text: moment-timezone uses IANA standard time zones. If you found a specific time zone that doesn't map correctly using the `WindowsToIana` function in the linked answer, please let me know which one. All `TimeZoneInfo` id's should be mappable.
type: Comment

http://stackoverflow.com/a/28028612
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/28028574
type: Answer
downvote count: 1
has body: try this: $('#hire_button').html(data.code == 500 ? "" : ("" + data.info + ""));

http://stackoverflow.com/comment/44507641
comment on: http://stackoverflow.com/a/28062910
has text: @howDisWorks it's normal to see ng-repeat until angular initializes. But if you are not seeing the data you are expecting, make sure you are getting the data with no error. Also in your ng-repeat you don't need to write userCtrl.users, it needs to be just "users"
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/28136354
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28094474
downvote count: 0
has body: If function is local, then Google Closure Compiler renames it. I've moved my code into (function(){ function myLongFunctionName(response) { // do something here } myLongFunctionName(text); })() In result, it is compressed also.
type: Answer
has comment: http://stackoverflow.com/comment/44644910
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/28094474

http://stackoverflow.com/q/28090008
has comment: http://stackoverflow.com/comment/44560342
answer count: 1
has title: Firebase .constant Not Working Correctly
has comment: http://stackoverflow.com/comment/44560294
accepted answer: http://stackoverflow.com/a/28092220
has comment: http://stackoverflow.com/comment/44560458
tagged with: angularjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44560517
has comment: http://stackoverflow.com/comment/44560358
score: 0
has body: I've got a constant set up in my app.js file, and I've injected it into my controller (main.js), but it doesn't seem to want to work: app.js angular.module('fireApp', [ 'ngAnimate', 'ngCookies', 'ngResource', 'ngRoute', 'ngSanitize', 'ngTouch', 'firebase' ]) .constant('FBURL', 'https://outcomes.firebaseio.com/') ... main.js var app = angular.module('fireApp', [ 'ngAnimate', 'ngCookies', 'ngResource', 'ngRoute', 'ngSanitize', 'ngTouch', 'firebase' ]); app.controller('MainCtrl', function ($scope, $filter, $timeout, $firebase, FBURL) { ... } Now I do question why I've got two modules set up. Is there a way around this? I'd like to keep my module, config and constant in my (app.js) file. How can I inject that .constant('FBURL') from my (app.js) file to my (main.js) file? Any help is appreciated. Thanks in advance
type: Question
has answer: http://stackoverflow.com/a/28092220
tagged with: javascript

http://stackoverflow.com/a/28037219
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/28037164
type: Answer
has body: This is what you need: var dateTime = function(){ var dateSrv = {}; dateSrv.getDate = function(){ return new Date().toDateString(); }; dateSrv.getTime = function(){ return new Date().toTimeString(); }; return dateSrv; }; console.log(dateTime().getDate()); In this case you don't need to define methods inside the object prototype, just add the functions to the object. Also note that dateTime is a function so it must be called with () to get what it returns.
upvote count: 4

http://stackoverflow.com/comment/44609654
score: 0
has text: It works. But , I need to bind another Enter key event to column-1 cells. On clicking column-2 cells, they will create new row. Moreover, here the number of rows created are doubles up.
comment on: http://stackoverflow.com/a/28117744
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/55394224
score: 0
type: AnswerComment
type: Comment
has text: Should be `app.config(['$httpProvider'], ($httpProvider: ng.IHttpProvider) => { ...`
comment on: http://stackoverflow.com/a/28013396

http://stackoverflow.com/a/27966909
score: 1
has body: You can use hover() function: $('div').hover(function() { alert('hoverd'); }, function() { alert('out of div'); }); div { padding: 30px; border: 1px solid #333; } hover
downvote count: 0
answers question: http://stackoverflow.com/q/27966825
type: Answer
upvote count: 1

http://stackoverflow.com/comment/44457262
type: Comment
comment on: http://stackoverflow.com/q/28036275
has text: You will have to explain to us what you mean by "else- else if- else" statement. Do you mean "if ... else if ... else"?
score: 3
type: QuestionComment

http://stackoverflow.com/comment/44485605
has text: @Isuckatprogramming Ach, before we could walk, we all fell a few times ;)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28036265

http://stackoverflow.com/comment/44552827
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/28087973
has text: I do not know how, but you can do it the other way round: have Gulp generate the Angular constant based on a value it already knows. E.g. with [gulp-ng-constant](https://www.npmjs.com/package/gulp-ng-constant) or [gulp-ng-config](https://www.npmjs.com/package/gulp-ng-config).
type: Comment

http://stackoverflow.com/a/28097759
type: AcceptedAnswer
has body: You are returning a single element. You can return the array. If you want to be able to act on all elements at once, jQuery style, you can pass a callback into your function; window.qsa = function(query, callback) { var els = document.querySelectorAll(query); if (typeof callback == 'function') { for (var i = 0; i < els.length; ++i) { callback.call(els[i], els[i], i); } } return els; }; qsa('button.change-all', function(btn) { // You can reference the element using the first parameter btn.addEventListener('click', function(){ qsa('p', function(p, index){ // Or you can reference the element using `this` this.innerHTML = 'Changed ' + index; }); }); }); qsa('button.change-second', function(btn) { btn.addEventListener('click', function(){ var second = qsa('p')[1]; second.innerHTML = 'Changed just the second one'; }); }); One Two Three Change Paragraphs Change Second Paragraph Then you can call either use the callback qsa('P', function(){ this.innerHTML = 'test'; }); Or you can use the array that is returned var pList = qsa('p'); var p1 = pList[0];
has comment: http://stackoverflow.com/comment/44571462
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28097522
answers question: http://stackoverflow.com/q/28097522
score: 3
upvote count: 3

http://stackoverflow.com/q/27972284
tagged with: client-side
has title: Can a Chrome extension utilize client storage
has answer: http://stackoverflow.com/a/27972897
accepted answer: http://stackoverflow.com/a/27972897
type: AnsweredQuestion
tagged with: google-chrome
type: Question
has body: I have a Google Chrome extension that needs to check to see what url the client is viewing to determine some behavior, but the behavior varies significantly depending on the url. It varies in such a way that the most useful type of data-structure to use would be analogous to a database with urls as the primary key. Is it possible to utilize client storage for this? I would like to just have the database loaded when the browser itself loads, so the extension can just get its information from there, rather than having to load a huge DS in an event page. I would think this would be possible, but the stuff I am reading about client storage says it is allocated based on url. So, is it possible for my Google Chrome extension to utilize client storage, if so, how?
tagged with: database
tagged with: javascript
score: 0
tagged with: google-chrome-extension
answer count: 1

http://stackoverflow.com/a/27995370
accepted answer of: http://stackoverflow.com/q/27992204
answers question: http://stackoverflow.com/q/27992204
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44451126
upvote count: 7
has comment: http://stackoverflow.com/comment/44449721
type: Answer
has comment: http://stackoverflow.com/comment/48953835
has comment: http://stackoverflow.com/comment/48958714
score: 7
has body: One option would be generating capitalization permutations via binary logic. As a simple example of the snippet below, consider the following table where the left column is the binary representation of the current permutation and the right column is the resulting capitalization: 0000 | word 1000 | Word 0100 | wOrd 1100 | WOrd ... 1111 | WORD // Used to display the results const write = (msg) =&gt; { document.body.appendChild(document.createElement('div')).innerHTML = msg; }; const input = "word"; const letters = input.split(""); const permCount = 1 &lt;&lt; input.length; for (let perm = 0; perm &lt; permCount; perm++) { // Update the capitalization depending on the current permutation letters.reduce((perm, letter, i) =&gt; { letters[i] = (perm &amp; 1) ? letter.toUpperCase() : letter.toLowerCase(); return perm &gt;&gt; 1; }, perm); const result = letters.join(""); write(result); } Note that theoretically this approach would work all the way up to Number.MAX_SAFE_INTEGER, up to inputs of length 52, but realistically you'll run into performance issues.

http://stackoverflow.com/comment/44471944
has text: @RajavelD - What do you intend to do with it?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/28044089
type: AnswerComment

http://stackoverflow.com/a/28036345
upvote count: 2
answers question: http://stackoverflow.com/q/28036275
type: Answer
has body: You can extend a ternary condition if you're good. It gets to be messy though. var number = 5; var power = 2; var ans = Math.pow(number,power); var suggest = ( ans == 5 ? 5 : ans == 10 ? 10 : ans == 15 ? 15 : ans == 25 ? "works" : null); console.log(suggest); I may have added to many because I'm on my phone haha but try it in your developer panel.
score: 2
downvote count: 0

http://stackoverflow.com/a/27978485
type: Answer
has comment: http://stackoverflow.com/comment/44349169
score: 2
answers question: http://stackoverflow.com/q/27978448
has body: Once you have appended the element you need to rebind the handlers to it or use jQuery's on() function. You need to delegate the event to the closest static ancestor element within the page (see also "Understanding Event Delegation"). This simply means, the element where you bind your event handler must already exist at the time the handler is bound, so for dynamically generated elements you must allow the event to bubble up and handle it further up. use this // instead of document you can use any parent element selector which is static(does not appended) $(document).on("click","label",(function(e) { var item = e.target.id; item = item.replace("_", ""); $("#" + item).remove(); e.target.remove(); });
upvote count: 3
has comment: http://stackoverflow.com/comment/44349211
downvote count: 1
has comment: http://stackoverflow.com/comment/44348884

http://stackoverflow.com/comment/67537481
has text: @Bhaveshkumar I'm seeing [`res.status()`](http://expressjs.com/en/api.html#res.status) as valid and in the documentation.
score: 1
comment on: http://stackoverflow.com/a/28094490
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44374849
comment on: http://stackoverflow.com/q/27992064
score: 6
type: QuestionComment
has text: Click on the gray arrow at left of `0: Object` or `1: Object`
type: Comment

http://stackoverflow.com/a/28111866
answers question: http://stackoverflow.com/q/28111395
downvote count: 0
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/44599669
accepted answer of: http://stackoverflow.com/q/28111395
has body: You could use something like this if you are coming from another page with a hash: $('.accordion').accordion({ defaultOpen: window.location.hash != '' ? window.location.hash.substring(1) : 'section1' }); //some_id section1 in demo One problem with this approach though is that because you are using the hash, it will jump to that point in the page
type: AcceptedAnswer

http://stackoverflow.com/a/28058167
has body: You are over optimizing and likely to lead to maintenance issues. You would end up playing the, 'where does this style come from' game. As there could be a style be the same name loaded by a different template, eclipsing the previously loaded style. CSS preprocessor such as LESS and SASS, which make creating CSS much better, generally spit out one big file. However once that file is minified / uglified the size should be manageable. Is there a specific need to have a set of styles that only applies to a specific template opposed to building the CSS that gives you the loom you want?
type: AcceptedAnswer
score: 1
accepted answer of: http://stackoverflow.com/q/28056691
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28056691
downvote count: 0

http://stackoverflow.com/comment/44404917
comment on: http://stackoverflow.com/q/28008474
score: 0
type: QuestionComment
has text: Don't try doing that in a single input. Use two inputs with adjacent spans or labels containing the "day" and "night" text.
type: Comment

http://stackoverflow.com/a/28107920
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28107749
type: Answer
upvote count: 1
has body: If you want to make ajax calls, you need to use $http or $resource: (function() { var app = angular.module('songSelector', []); app.controller('playedTracksCtrl', ['songService', playedTraksCtrl]); app.service('songService', ['$http', songService]) function playedTraksCtrl(songService) { var vm = this; vm.songs = {}; songService.getPlays().then(function (data) { vm.songs = data; }); } function songService($http){ var service = { getPlays: getPlays }; return service; function getPlays(){ return $http.get('http://api.q-music.be/1.2/tracks/plays?limit=20') .then(function (data) { return data.data; }).catch(function (message) { console.log(message) }); } } })(); Angular sorts out the JSON for you. I'll break it down: function songService($http){ var service = { getPlays: getPlays }; return service; } This returns you an object: { getPlays: function () {} } The function up there is the one we created after the return service;: function getPlays(){ return $http.get('http://api.q-music.be/1.2/tracks/plays?limit=20') .then(function (data) { return data.data; }).catch(function (message) { console.log(message) }); } As you can see this function immediately returns the result of another function: $http.get(). The result is a Promise. A Promise says, when the result comes back fire a function off. We need to tell that Promise what we want to do both in the service AND the controller. So in the service: .then(function (data) { return data.data; }).catch(function (message) { console.log(message) }); the .then() basically says, when the Promise resolves then fire this function. The function has a parameter (or many actually but I only care about data most of the time). Data has lots of properties on it, and the one we're interested, the result of your API is data. So what we do is just return that out. This Promise chains so then in the controller, we can call another .then(). This is fired when the one in service has finished calling. songService.getPlays().then(function (data) {…
score: 1
answers question: http://stackoverflow.com/q/28107749
type: AcceptedAnswer

http://stackoverflow.com/a/27976291
has comment: http://stackoverflow.com/comment/44376878
has comment: http://stackoverflow.com/comment/44346314
has comment: http://stackoverflow.com/comment/44379479
score: 2
has comment: http://stackoverflow.com/comment/44377007
has comment: http://stackoverflow.com/comment/44394197
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27976268
has comment: http://stackoverflow.com/comment/44375350
answers question: http://stackoverflow.com/q/27976268
has comment: http://stackoverflow.com/comment/44375636
upvote count: 2
has comment: http://stackoverflow.com/comment/44362462
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44378671
has comment: http://stackoverflow.com/comment/44378616
has body: Looks like you are trying to set the other dropdown on selection of 1. You should use ng-change instead of ng-click. Try:- Primary Business Category Secondary Business Category Since your ng-model is already bound to offer.primary , you can avoid doing $scope.offer.primary = category; since the ng-model would have been set already.
has comment: http://stackoverflow.com/comment/44379225
type: Answer

http://stackoverflow.com/comment/44607485
has text: I am an idiot. There is a scriptblocker on this computer (not MY computer). No matter how many times I click on the link, javascript doesn't work. So, fistChild, childNodes[0], writing a completely separate function to get the first child... nothing worked.
score: 0
comment on: http://stackoverflow.com/q/28116580
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28103358
upvote count: 1
has comment: http://stackoverflow.com/comment/44581791
score: 1
has answer: http://stackoverflow.com/a/28103615
tagged with: angularjs-scope
type: Question
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/28103568
tagged with: javascript
has body: In agularjs controller I am creating variable var search = []; search.area = 'xyz'; $scope.search = search; And in html page &lt;input type="text" name="area" class="form-control" data-ng-model="search.area" placeholder="Area"&gt; So, after loading the page default value doesn't being display as 'xyz' in textbox. Please guide !!
favorite count: 0
has comment: http://stackoverflow.com/comment/44584853
has title: Angularjs : Texbox value not showing
tagged with: angularjs
tagged with: angularjs-module
type: UnansweredQuestion

http://stackoverflow.com/q/28113552
answer count: 2
has comment: http://stackoverflow.com/comment/44601351
downvote count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44601709
has comment: http://stackoverflow.com/comment/44601039
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44601550
upvote count: 0
has answer: http://stackoverflow.com/a/28114182
has comment: http://stackoverflow.com/comment/44603211
accepted answer: http://stackoverflow.com/a/28114182
has body: I need to position header and footer accordingly to content height. So the header and footer are adjacent to content, even when the content size change. I would like to know if a CSS solution exists (even CSS 3), if no a JS solution. Notes: I cannot change the order of DIV in the HTML. Below pictures of the desired layout. In more details: I need the top side of the content positioned just after the end bottom side of header. I need the top side of the footer positioned just after the end bottom side of content. If header change height, content should move up/down. If content change height, footer should move up/down. Live code: http://jsfiddle.net/wkfcnj6c/ Example is welcome :) content a content a header footer
type: Question
has title: How to position two divs "header" and "footer" around a div "content"
has comment: http://stackoverflow.com/comment/44601815
has answer: http://stackoverflow.com/a/28113796
has comment: http://stackoverflow.com/comment/44601702
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/44601050
possible better answer: http://stackoverflow.com/a/28113796

http://stackoverflow.com/comment/44527807
comment on: http://stackoverflow.com/a/28008443
type: Comment
has text: unirest.get(url) will get the text data at a URL. When you inspect the page, you're looking at the page after JavaScript has run over it - so you're not seeing the raw HTML - you're seeing the DOM after JavaScript mods.
score: 2
type: AnswerComment

http://stackoverflow.com/comment/62901720
type: Comment
comment on: http://stackoverflow.com/a/27973784
type: AnswerComment
score: 0
has text: Also if the attribute is something like this 'data-mo-fu-six' where it has more than one prefix, it doesn't work.

http://stackoverflow.com/q/28055790
type: Question
has answer: http://stackoverflow.com/a/28055994
has title: Div inside divs, mess up
has body: I got a "site", in this site I got three buttons which switch between 3 ...windows(?). This is done with a function which hides 2 while keeping one visible. the three "windows" are divs. The function which hides and makes the divs visible targets children of "id="wrapper" ", It shouldn't target Wrappers grand children and hence the problem shouldn't be in there, but the function is the only thing that could intefer, as far as I know. One of the three divs, has divs inside of it with no issue, but the other divs can't contain divs and I had to use 's to contain stuff, but that doesn't work as well when I want to use images as buttons and such. I've gone over the html several times the past day but I can't find any issue in it, I would keep trying on my own but I may lose my internet in 1-3 days and I don't want to be "stranded". My three "wrapper" children are, class "WindowTwo", "WindowThree" and "container". If you put a div inside WindowTwo and WindowThree you'll notice the first button window goes blank. Container is the one that can contain divs inside divs with no problem http://codepen.io/anon/pen/WbjzWL I know my code is messy and my blabbering messier, sorry for that and thanks in advance for any inputs :) function toggleDiv(target) { var div = document.getElementById('wrapper').getElementsByTagName("div"); if (target == 1) { div[0].style.display = 'block'; div[1].style.display = 'none'; div[2].style.display = 'none'; } else if (target == 2) { div[0].style.display = 'none'; div[1].style.display = 'block'; div[2].style.display = 'none'; } else { div[0].style.display = 'none'; div[1].style.display = 'none'; div[2].style.display = 'block'; } }; .ButtonOveral { position: absolute; background-color: yellow; width: 90px; height: 45px; left: 4px; top: -15px; } .ButtonOveral2 { position: absolute; background-color: red; width: 90px; height: 45px; left: 4px; top: 40px; } .ButtonOveral3 { position: absolute; background-color: yellow; width: 90px; height: 45px; left: 4…
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28055994
favorite count: 0
possible better answer: http://stackoverflow.com/a/28056090
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/28056090
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/q/28035714
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
score: 0
has title: JQuery UI Sortable and Laravel, Saving list to Database
answer count: 1
has answer: http://stackoverflow.com/a/28040098
type: UnansweredQuestion
has body: I am ultimately trying to save the order of my list to my database, the problem I am having currently is that the Jquery is not receiving the id passed in when an item is moved. This is my html: @foreach (Playlist::find(1)->songs as $song) position }}">{{$song->songname}}. @endforeach This is my JavaScript $(function() { $('#playlist').sortable().bind('sortupdate', function(e, ui) { var id = $('ul.sortable li').map(function(){ return $(this).data("id"); }).get(); $.ajax({ type: "POST", url: "api-ch-order", dataType: "json", data: {id: id}, success: function(order){ console.log(id) } }); }); }); This is my controller I had to test it: if(Request::ajax()){ $id = Input::get('id'); printf($id + "HEYYY"); } The thing is at the moment looking at the consoles on both chrome and firefox the console.log(id) is returning an empty array i.e no info is being passed, why is this?
tagged with: php
tagged with: laravel
linked to: http://stackoverflow.com/q/15633341

http://stackoverflow.com/q/28014323
upvote count: 1
answer count: 1
has body: I have a simple ajax call but doesen't work perfectly! index.php (situated in / ) <?php require 'files/config.php'; require 'files/functions.php'; include 'files/variabili.php'; ?> <?php include "inc/testpage.php"; ?> testpage.php (situated in /inc/) <? $q="SELECT * FROM amico WHERE (user1='$_SESSION[valid_user]' OR user2='$_SESSION[valid_user]') AND accetta='s'"; $q_r=mysql_query($q); $num=mysql_num_rows($q_r); if($num<1) echo "Non hai amici."; else{ ?> <? } ?> chat and friends.php (situated in /inc/) <? require 'files/config.php'; require 'files/functions.php'; include 'files/variabili.php'; $nome=urldecode($_POST['cerca-amico']); echo $nome; ?> When I write " hello " on the input " look - friend " I should receive as output in the div # ShowFriends . But I never get results , I noticed that viewing the source code I get all the content of the page friends.php between comments . Specifically : Any solutions? I have no idea...
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/28014466
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
type: UnansweredQuestion
tagged with: php
has title: Ajax output html comment
type: Question
has comment: http://stackoverflow.com/comment/44415928

http://stackoverflow.com/comment/44411093
comment on: http://stackoverflow.com/q/28011927
score: 0
type: Comment
type: QuestionComment
has text: You have to make sure `document.ready` is called before adding the event listener for `deviceready`, it can't happen the other way

jquery-ui-datepicker
tags question: http://stackoverflow.com/q/28000490
tags question: http://stackoverflow.com/q/28031929
tag name: jquery-ui-datepicker
tags question: http://stackoverflow.com/q/28061236
tags question: http://stackoverflow.com/q/28029181
type: Tag
tags question: http://stackoverflow.com/q/28088439
tags question: http://stackoverflow.com/q/28017978

http://stackoverflow.com/comment/82210871
type: AnswerComment
score: 1
type: Comment
comment on: http://stackoverflow.com/a/32294894
has text: That's a fair point, however, the chances of every client visiting your website having a webserver setup to provide specific files is unlikely. Just checking, you realise LogTail appears to be setup to tail files from the server? Not from the client? Hence why it uses XHR requests and not HTML5 File API as suggested in the question.

http://stackoverflow.com/comment/65281090
comment on: http://stackoverflow.com/q/28074766
score: 0
type: QuestionComment
type: Comment
has text: A recent Sygic update caused my deep links to stop working; I figured out that the pipe now needs to be escaped, e.g. `com.sygic.aura://coordinate%7C16.6784149%7C48.8759607%7Cdrive`

http://stackoverflow.com/comment/44331001
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27968310
has text: @charliebrownie In the case of `variable.prototype`, the `variable` will normally refer to a "constructor" `function`. The `prototype` is the object that each `new` instances of that constructor will inherit properties from. [How does JavaScript .prototype work?](http://stackoverflow.com/a/4778408)

http://stackoverflow.com/a/28039422
has comment: http://stackoverflow.com/comment/44464173
has body: You may replace the url based on current page. if (document.URL = 'Index.aspx') { var url = "CheckSeat.aspx?noSeat=" + encodeURIComponent(lObjSeat[0].Name) + "&amp;endtime=" + encodeURIComponent(time); window.location.replace(url); } else if (document.URL = 'AdminHome.aspx') { var url = "AdminCheckSeat.aspx" window.location.replace(url); }
type: Answer
answers question: http://stackoverflow.com/q/28039260
has comment: http://stackoverflow.com/comment/44463029
has comment: http://stackoverflow.com/comment/44463127
score: 0

http://stackoverflow.com/comment/44616214
comment on: http://stackoverflow.com/q/28120779
type: Comment
score: 0
has text: What's wrong with the html way?
type: QuestionComment

ios
tags question: http://stackoverflow.com/q/28107872
tags question: http://stackoverflow.com/q/28074766
tags question: http://stackoverflow.com/q/27985066
tags question: http://stackoverflow.com/q/28107359
tags question: http://stackoverflow.com/q/28110407
tags question: http://stackoverflow.com/q/28072344
type: Tag
tags question: http://stackoverflow.com/q/28012211
tags question: http://stackoverflow.com/q/28106002
tags question: http://stackoverflow.com/q/28071944
tags question: http://stackoverflow.com/q/28016312
tags question: http://stackoverflow.com/q/28020294
tags question: http://stackoverflow.com/q/28085929
tags question: http://stackoverflow.com/q/28023053
tags question: http://stackoverflow.com/q/28040553
tags question: http://stackoverflow.com/q/28085108
tags question: http://stackoverflow.com/q/27979204
tags question: http://stackoverflow.com/q/28021414
tags question: http://stackoverflow.com/q/28085795
tags question: http://stackoverflow.com/q/28070934
tags question: http://stackoverflow.com/q/27995593
tag name: ios
tags question: http://stackoverflow.com/q/27983463
tags question: http://stackoverflow.com/q/28057199
tags question: http://stackoverflow.com/q/28055432
tags question: http://stackoverflow.com/q/28047858
tags question: http://stackoverflow.com/q/27975462
tags question: http://stackoverflow.com/q/28041127
tags question: http://stackoverflow.com/q/28081826
tags question: http://stackoverflow.com/q/28091535
tags question: http://stackoverflow.com/q/28045346
tags question: http://stackoverflow.com/q/28071002
tags question: http://stackoverflow.com/q/28082624
tags question: http://stackoverflow.com/q/28058127
tags question: http://stackoverflow.com/q/28105156
tags question: http://stackoverflow.com/q/28034785
tags question: http://stackoverflow.com/q/27980612

http://stackoverflow.com/comment/44463434
has text: Sure, once you have the whole background image, you can use the clipping version of context.drawImage to clip your desired sprite from the whole image. If you haven't working with that version of drawImage before, here is a link: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage. Good luck with your project!
score: 1
comment on: http://stackoverflow.com/a/28033541
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28116030
has body: If you want a simple output to the console just use this: function randomString(length, chars) { var result = ''; for (i = 1; i &lt;= length; i++) { result += chars; console.log(result); } }
answers question: http://stackoverflow.com/q/28115669
type: Answer
score: 0

http://stackoverflow.com/comment/44367064
type: Comment
score: 1
type: AnswerComment
has text: That location should be relative to the root of your file, where (normally) the `index.html` is.
comment on: http://stackoverflow.com/a/27987076

http://stackoverflow.com/comment/44449563
type: Comment
comment on: http://stackoverflow.com/a/28031428
score: 1
has text: http://stackoverflow.com/questions/1248081/get-the-browser-viewport-dimensions-with-javascript
type: AnswerComment

http://stackoverflow.com/q/27974543
score: 0
answer count: 1
type: UnansweredQuestion
has body: i'm trying to nest two bootstrap tabs, but the first tab that should show a nested tab, shows the content of the two tabs one below the other. This is the code, i'm using jquery 1.11.1 and bootstrap, anyone has any idea on how to solve this mess? General Shipping Options Special prices Quantity discounts English Italiano Name & Description Name Specify a name for your product Description Integer et diam ut est vestibulum ullamcorper ac mattis quam. Integer felis felis, gravida vitae sapien vitae, semper fringilla enim. Quisque commodo nisl in ligula ultrices aliquam. Vestibulum non sem elementum, fringilla augue commodo, porttitor ipsum. Pellentesque ac pretium lacus, sed molestie nisl. Nulla fringilla eu nulla at varius. Nulla semper imperdiet orci, vel sodales arcu fringilla sed. Sed non urna justo. Etiam gravida, nunc in tincidunt tincidunt, nisl eros aliquet libero, sed molestie elit nulla scelerisque magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Morbi convallis posuere aliquam. Describe your product Tags Specify tags for your product. Name & Description Name Specify a name for your product Description Integer et diam ut est vestibulum ullamcorper ac mattis quam. Integer felis felis, gravida vitae sapien vitae, semper fringilla enim. Quisque commodo nisl in ligula ultrices aliquam. Vestibulum non sem elementum, fringilla augue commodo, porttitor ipsum. Pellentesque ac pretium lacus, sed molestie nisl. Nulla fringilla eu nulla at varius. Nulla semper imperdiet orci, vel sodales arcu fringilla sed. Sed non urna justo. Etiam gravida, nunc in tincidunt tincidunt, nisl eros aliquet libero, sed molestie elit nulla scelerisque magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Morbi convallis posuere aliquam. Describe your product Tags Specify tags for your product. Price & Attributes Price $ Choose a price for your product Category Chairs No Specify whether your product requires s…
has answer: http://stackoverflow.com/a/27974871
tagged with: javascript
tagged with: jquery
type: Question
has title: Nested tabs in tabs (bootstrap)
tagged with: css
tagged with: tabs
tagged with: twitter-bootstrap

http://stackoverflow.com/q/28011453
tagged with: stackexchange
has body: I am new to JS and I am trying to figure out the most efficient way to perform this task. Stack Exchange keeps a list of its member-sites at https://stackexchange.com/sites What is the most efficient way to extract this data into a data-structure, like an array or dictionary in JavaScript?
has comment: http://stackoverflow.com/comment/44410250
has title: Efficiently extracting webpage data into a data structure with JavaScript
answer count: 2
upvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28011652
has comment: http://stackoverflow.com/comment/44410380
favorite count: 0
has answer: http://stackoverflow.com/a/28011652
has comment: http://stackoverflow.com/comment/44410435
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44410549
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44410499
has answer: http://stackoverflow.com/a/28011599
has comment: http://stackoverflow.com/comment/44410515
has comment: http://stackoverflow.com/comment/44410252
downvote count: 3
score: -3
type: Question
accepted answer: http://stackoverflow.com/a/28011599

http://stackoverflow.com/comment/44486712
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28050874
has text: refer this link http://dotnetbyexample.blogspot.in/2014/07/angularjs-typescript-how-to-setup-watch.html

http://stackoverflow.com/comment/44478726
comment on: http://stackoverflow.com/a/28048238
score: 1
has text: Plus, always add `exit;` after header to avoid further code execution.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44326614
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27966809
type: Comment
has text: @RobH, He's using `async: false`, so I'm not sure that linked page is relevant.

http://stackoverflow.com/q/28048861
tagged with: file
has comment: http://stackoverflow.com/comment/44479838
type: Question
linked to: http://stackoverflow.com/q/8390855
answer count: 2
has comment: http://stackoverflow.com/comment/44485628
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/28049143
has comment: http://stackoverflow.com/comment/44480097
favorite count: 0
possible better answer: http://stackoverflow.com/a/28050794
has answer: http://stackoverflow.com/a/28050794
has title: Set audio src using local file dynamically
upvote count: 1
accepted answer: http://stackoverflow.com/a/28049143
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44479864
has body: In Firefox, I'm trying to load an audio file from the user's file system. I've read that I can create a File object based on a path here The code will be run inside a firefox addon, so have access to privilaged code. Any ideas why this is causing an error in console and for the document.getElementById('player') element to vanish? http://jsfiddle.net/bobbyrne01/sp5qr7hh/ ^ fiddle is just for demonstration purposes, it will ultimately be run inside a firefox addon. html .. &lt;audio id="player" preload="auto" controls&gt;&lt;/audio&gt; js .. var reader = new FileReader(); reader.onload = function(d) { console.log(d.target.result); document.getElementById('player').src = d.target.result; }; reader.readAsDataURL(new File([""], "file:///home/rob/audio.mp3")); console output .. "data:application/octet-stream;base64," _display:24 HTTP "Content-Type" of "application/octet-stream" is not supported. Load of media resource data:application/octet-stream;base64, failed. filesystem .. rob@work:~$ pwd /home/rob rob@work:~$ ls audio.mp3 audio.mp3
score: 1

http://stackoverflow.com/q/28103861
type: Question
has answer: http://stackoverflow.com/a/28223457
tagged with: javascript
has body: Im in the Middle of Developing WebApplication Using Vaadin and Spring. I Used AbstractJavaScriptComponent and Using setInterval() im getting data from the backend and display the data Real Time. My Question is The Requests are act as User Request Request and Session is not timeout because Vaadin Received it as User Interaction. Is there anyway to ignore the javascript Connection and activate session timeout according to Users UI Interactions.
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: vaadin7
upvote count: 1
score: 1
tagged with: java
has title: Session is not Expired in Vaadin

http://stackoverflow.com/q/27991293
favorite count: 0
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27992647
has comment: http://stackoverflow.com/comment/44373463
has comment: http://stackoverflow.com/comment/44373581
score: 1
has comment: http://stackoverflow.com/comment/44373953
type: Question
has comment: http://stackoverflow.com/comment/44373374
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Flicker in nav bar styling when scrolling
has comment: http://stackoverflow.com/comment/44373992
has body: I'm having a flickering issue with my bottom-border (nav link) when I scroll within a certain section. I suppose it's not really a flicker, but a transition that's being resetted every time I scroll within that section. For example (refer to source below), if my window is currently in a section and I scroll little by little, the border-bottom of my active nav link will flicker. In addition, if I hold onto the scroll bar and scroll down, the border-bottom disappears. I'd like for it to: 1) Not flicker when scrolling. 2) When scrolling on the page with the scroll bar, keep the border-bottom present. http://jsfiddle.net/binhxn89/zzmbex55/16/ HTML: Home Link1 link2 link3 link4 CSS: body, html { height: 100%; color: #f3f3f3; font-family: Arial, sans-serif; } body { margin: 0; overflow-x: hidden; } .container { width: 90%; margin: 0 auto; } .navbar { background: rgba(0,0,0, 0.9); width: 100%; position: fixed; z-index: 20; } .navbar ul li { list-style: none; float: left; } .navbar ul li a { color: #fff; display: block; font-size: 14px; margin: 0 10px; padding: 20px 5px; text-decoration: none; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } .navbar ul li a:hover, .navbar ul li a.active { margin-top: -3px; font-weight: bold; padding-bottom: 8px; border-bottom: 2px solid #fff; } section { height:100%; z-index: 10; position: relative; } .welcome { background: #ebebeb; } .link1 { background: #aaa; } .link2 { background: #bbb; } .link3 { background: #ccc; } .link4 { background: #ddd; } JS: $(document).ready(function() { $(window).scroll(function () { var y = $(this).scrollTop(); $('.link').each(function (event) { if (y >= $($(this).attr('href')).offset().top - 10) { $('.link').not(this).removeClass('active'); $(this).addClass('active'); } }); }); $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { va…
has answer: http://stackoverflow.com/a/27992647
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css

http://stackoverflow.com/comment/55799149
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/32224104
has text: Invalidation is needed sometimes. It's nice when you can get away with "just refresh" but our system is a collaborative SPA on mobile where many users share large amounts of data, and a deep view hierarchy. If there's no way to invalidate stale data on another view, we can't cache it at all, which is not acceptable on mobile. There's no way we can assume a URL+params will remain static throughout a session.
score: 0

http://stackoverflow.com/a/28054454
type: Answer
has comment: http://stackoverflow.com/comment/44492701
answers question: http://stackoverflow.com/q/28053338
upvote count: 1
has comment: http://stackoverflow.com/comment/44491771
score: 1
has body: You're missing two packages: meteor add meteor underscore The meteor package is the one that exposes Meteor.isServer.
has comment: http://stackoverflow.com/comment/44493764
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44500368
accepted answer of: http://stackoverflow.com/q/28053338
has comment: http://stackoverflow.com/comment/44493739

http://stackoverflow.com/comment/44385872
type: Comment
comment on: http://stackoverflow.com/q/27997839
score: 0
has text: You need to decode your json data, when you send them to php.
type: QuestionComment

http://stackoverflow.com/comment/120193677
has text: @DavidSpector that's unfortunate - open a bug?
comment on: http://stackoverflow.com/a/28004999
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28078867
downvote count: 0
has comment: http://stackoverflow.com/comment/44539113
type: Answer
has comment: http://stackoverflow.com/comment/44537910
upvote count: 3
has comment: http://stackoverflow.com/comment/44536970
has comment: http://stackoverflow.com/comment/44536591
score: 3
has body: As Iván mentoined, the method is getDate(), not GetDate(). Case matters. Second mistake is - each second you calculate a difference between Date objects holding exactly the same time today = new Date(); dueDate = new Date(today); // those two are exactly the same You should explicitly define dueDate to make your code work. for example, dueDate = new Date(2015,1,24,0,0,0,0); Note, your browser does a great job showing you what's wrong with your javascript code, press Ctrl+Shift+I and open "console" tab. Another suggestion is to use a website providing countdown code for you. Your code have a lot of issues (global variables, creating a date object every time, etc) another update: another mistake was <input type="txt" which will break document.getElementById("client").value This is your code: Jitter caused by nature of setInterval var dueDate = (new Date()).getTime() + 10*1000; var interval; function updateWCTime() { var today = new Date(); var diff = dueDate - today.getTime(); if (diff < 0) { // clearInterval(interval); document.getElementById("countdown").innerHTML = document.getElementById("client").value; return; } var days = Math.floor(diff / (1000 * 60 * 60 * 24)); var hours = Math.floor(diff / (1000 * 60 * 60)); var mins = Math.floor(diff / (1000 * 60)); var secs = Math.floor(diff / 1000); var dd = days; var hh = hours - days * 24; var mm = mins - hours * 60; var ss = secs - mins * 60; document.getElementById("countdown") .innerHTML = dd + ' days ' + hh + ' hours ' + mm + ' minutes ' + ss + ' seconds' + " " + document.getElementById("client").value; } interval = setInterval(updateWCTime, 1000); body { background-color: #80d4ea; } #countdown { height: 100px; width: 800px; margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; padding-top: 70px; font-family: courier, monospace; text-align: center; color: white; font-size: 45px; } Client: submit
answers question: http://stackoverflow.com/q/28078750
accepted answer of: http://stackoverflow.com/q/28078750
type: AcceptedAnswer

http://stackoverflow.com/q/28117140
tagged with: coffeescript
has answer: http://stackoverflow.com/a/28118251
has body: In my Rails site, I have an element that I want to act as a link when clicked by a mouse (e.g. on a desktop), but not when touched on a touch-screen device (because there is also a hover behavior). My understanding is that the JQuery .click event should not get triggered on a touch. My coffeescript for setting the click handler is simply ... $(this).click -&gt; location.href = url ... (where "this" is the element in question) I know this code works, because the click action works with the mouse. To ensure that it doesn't get triggered on a touch device, I use the device emulation in Chrome's Developer Tools to emulate a touch. However, when I do this, the method still fires and follows the link. Is this a problem with the Chrome emulation or with my code? I want to know whether it will behave this way on real touch devices. edit: Same thing happens with Firefox, so I'm thinking it's my code...
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: click
tagged with: touch
score: 0
accepted answer: http://stackoverflow.com/a/28118251
has title: JQuery click event triggered on Chrome and FF device touch emulation?
type: AnsweredQuestion

http://stackoverflow.com/q/27985171
has answer: http://stackoverflow.com/a/29050921
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
has body: I am using d3.js to dynamically set up a nested svg, i.e. an inner svg nested inside an enclosing svg. A d3.behavior.zoom() listens for zoom events on the outer svg and does the transformations needed. All works fine except for the Internet Explorer (IE 11) which seems to have an issue with transformations involving inner svgs. Both Firefox and Chrome behave as expected clipping the inner svg to the viewport of the outer svg. In Internet Explorer, however, zooming in correctly applies transformations but seems to ignore the dimensions of the enclosing svg. The contents of the inner svg will eventually be displayed outside of the outer svg and above other body elements. The viewport of the outer svg seems to have no clipping effect on the inner svg. I have set up a JSFiddle demonstrating the behaviour. var zoom = d3.behavior.zoom() .on("zoom", function () { container.attr("transform", "translate(" + d3.event.translate + ") " + "scale(" + d3.event.scale + ")"); }); var container = d3.select("body") .append("svg") .attr("id", "svgcontainer") .attr("width", 300) .attr("height", 300) .style("background-color", "#aaaaee") .call(zoom) .append("g"); var svg = container.append("svg") .attr("width", 200) .attr("height", 200) .attr("x", 50) .attr("y", 50); svg.append("svg:circle") .style("fill", "none") .style("stroke", "red") .style("stroke-width", "2px") .attr("cx", 100) .attr("cy", 100) .attr("r", 50); Am I missing something? Is there any cross-browser workaround?
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/29050921
has title: D3.js zoom with nested svg breaks viewport in Internet Explorer
downvote count: 2
type: Question
tagged with: internet-explorer
upvote count: 5
tagged with: javascript

http://stackoverflow.com/q/28092500
has comment: http://stackoverflow.com/comment/44562310
type: UnansweredQuestion
type: Question
has body: I am trying to hide (or edit inline attribute) a frame from an other framset by clicking a button. I used : $(".HiddenFrame").hide(); But seems that I can not find the item. JSFiddle
linked to: http://stackoverflow.com/q/1791700
has title: Hide frame from other frameset
has comment: http://stackoverflow.com/comment/44562662
upvote count: 2
has answer: http://stackoverflow.com/a/28095670
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/24030228
tagged with: frame
tagged with: css
score: 2
downvote count: 0

http://stackoverflow.com/comment/44398112
comment on: http://stackoverflow.com/q/28003877
type: QuestionComment
has text: @undroid what are you talking about? If string length `<=` means also if it's `0` than you do an `&& str !=` .... Again what are you trying to build? Are you strings complicated JSON literals? Simple code string with non-deep nested brackets or what?
type: Comment
score: 0

ember.js
tags question: http://stackoverflow.com/q/28008733
tags question: http://stackoverflow.com/q/27972615
tags question: http://stackoverflow.com/q/28109598
tags question: http://stackoverflow.com/q/28049574
tags question: http://stackoverflow.com/q/28008934
tags question: http://stackoverflow.com/q/28006500
tags question: http://stackoverflow.com/q/28031175
tags question: http://stackoverflow.com/q/28096421
tags question: http://stackoverflow.com/q/28104484
tags question: http://stackoverflow.com/q/28120066
tags question: http://stackoverflow.com/q/28085141
tags question: http://stackoverflow.com/q/27971548
tags question: http://stackoverflow.com/q/27997675
tags question: http://stackoverflow.com/q/28117500
type: Tag
tags question: http://stackoverflow.com/q/28116138
tag name: ember.js
tags question: http://stackoverflow.com/q/27967520
tags question: http://stackoverflow.com/q/28088384
tags question: http://stackoverflow.com/q/27992598
tags question: http://stackoverflow.com/q/28024422
tags question: http://stackoverflow.com/q/28006163
tags question: http://stackoverflow.com/q/27997811
tags question: http://stackoverflow.com/q/28076689
tags question: http://stackoverflow.com/q/28060108
tags question: http://stackoverflow.com/q/28002710
tags question: http://stackoverflow.com/q/27971933
tags question: http://stackoverflow.com/q/27965948
tags question: http://stackoverflow.com/q/28116625
tags question: http://stackoverflow.com/q/28056433
tags question: http://stackoverflow.com/q/28039442
tags question: http://stackoverflow.com/q/27973501
tags question: http://stackoverflow.com/q/28070943
tags question: http://stackoverflow.com/q/27966035
tags question: http://stackoverflow.com/q/28086844
tags question: http://stackoverflow.com/q/28026627
tags question: http://stackoverflow.com/q/28035300
tags question: http://stackoverflow.com/q/28029193
tags question: http://stackoverflow.com/q/28030356
tags question: http://stackoverflow.com/q/28055039
tags question: http://stackoverflow.com/q/28094306
tags question: http://stackoverflow.com/q/27971242
tags question: http://stackoverflow.com/q/28071300
tags question: http://stackoverflow.com/q/27973406
tags question: http://stackoverflow.com/q/28029746
tags question: http://stackoverflow.com/q/27973617
tags question: http://stackoverflow.com/q/28027900
tags question: http://stackoverflow.com/q/28031540
tags question: http://stackoverflow.com/q/28068300
tags question: http://stackoverflow.com/q/28012514
tags question: http://stackoverflow.com/q/27993234

http://stackoverflow.com/a/28023253
score: 0
type: Answer
has body: Try using PHPMailer. You can find it here. It's much more safer and much more reliable than simple mail function.
answers question: http://stackoverflow.com/q/28023081

cordova
tags question: http://stackoverflow.com/q/28054649
tags question: http://stackoverflow.com/q/27980612
tags question: http://stackoverflow.com/q/27981836
tags question: http://stackoverflow.com/q/27990068
tags question: http://stackoverflow.com/q/28085929
tags question: http://stackoverflow.com/q/27971189
tags question: http://stackoverflow.com/q/28002040
tags question: http://stackoverflow.com/q/28056863
tags question: http://stackoverflow.com/q/27985295
tags question: http://stackoverflow.com/q/28045048
tags question: http://stackoverflow.com/q/28103584
tags question: http://stackoverflow.com/q/27977712
tags question: http://stackoverflow.com/q/28017925
tags question: http://stackoverflow.com/q/28116181
tags question: http://stackoverflow.com/q/27969285
tags question: http://stackoverflow.com/q/28021519
tags question: http://stackoverflow.com/q/27967792
tags question: http://stackoverflow.com/q/28043227
tags question: http://stackoverflow.com/q/27971811
tags question: http://stackoverflow.com/q/28072379
tags question: http://stackoverflow.com/q/28080242
tags question: http://stackoverflow.com/q/28100874
tags question: http://stackoverflow.com/q/28085108
tags question: http://stackoverflow.com/q/28088990
tags question: http://stackoverflow.com/q/27974312
tags question: http://stackoverflow.com/q/27985729
tags question: http://stackoverflow.com/q/28011927
tags question: http://stackoverflow.com/q/28085795
tags question: http://stackoverflow.com/q/28108594
tags question: http://stackoverflow.com/q/28026795
tag name: cordova
tags question: http://stackoverflow.com/q/28052168
tags question: http://stackoverflow.com/q/28041396
tags question: http://stackoverflow.com/q/28107338
tags question: http://stackoverflow.com/q/28008395
tags question: http://stackoverflow.com/q/28016337
tags question: http://stackoverflow.com/q/28095791
tags question: http://stackoverflow.com/q/28085730
tags question: http://stackoverflow.com/q/28041127
tags question: http://stackoverflow.com/q/28017763
tags question: http://stackoverflow.com/q/28078959
tags question: http://stackoverflow.com/q/28041677
tags question: http://stackoverflow.com/q/27998304
tags question: http://stackoverflow.com/q/28091535
tags question: http://stackoverflow.com/q/28108769
tags question: http://stackoverflow.com/q/28111625
tags question: http://stackoverflow.com/q/28040581
tags question: http://stackoverflow.com/q/28017540
tags question: http://stackoverflow.com/q/27974066
tags question: http://stackoverflow.com/q/28011050
type: Tag
tags question: http://stackoverflow.com/q/28065882
tags question: http://stackoverflow.com/q/28116801
tags question: http://stackoverflow.com/q/28065508

http://stackoverflow.com/a/28071393
has body: You mean getting a string from a boolean? You can do that by creating a new function: function boolToString(bool boolToTransf) { if (boolToTransf == true) { return "true"; } else { return "false"; } } Now just type in: boolToString(test()); And you'll get "true" or "false" as string.
score: -1
has comment: http://stackoverflow.com/comment/44522162
downvote count: 1
answers question: http://stackoverflow.com/q/28071273
type: Answer
upvote count: 0

knockout-sortable
tag name: knockout-sortable
type: Tag
tags question: http://stackoverflow.com/q/27966923

http://stackoverflow.com/comment/44487538
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28052733
type: Comment
has text: **The `click` event is only fired when the left mouse button is clicked.** As stated by @tymeJV use `mousedown` which applies to all three buttons, then distinguish with `e.which` as he explains.

http://stackoverflow.com/a/28071388
has body: Take a look at the following post Velocity.js Velocity.js reimplements jQuery.animate(). A sample from the link posted above [jQuery Syntax] $div /* Fade an element in while sliding it into view. */ .animate({ opacity: 1, top: "50%" }) /* The values below are what we originally set the element to in our stylesheet. Animate back to them. */ .animate({ opacity: 0, top: "-25%" }); [Velocity.js] $div .velocity({ opacity: 1, top: "50%" }) .velocity("reverse"); More info can be found at the following link pointing to the main page of Velocity.js Velocity.js Main page You can download Velocity.js from here
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28071002

http://stackoverflow.com/q/28013144
upvote count: 1
has answer: http://stackoverflow.com/a/28013233
type: Question
score: -1
answer count: 1
has body: I try to run the code in CMD and it just stuck, I do not know what I should do to run the code in CMD. I put the following code and it gets stuck: node test.js. var http = require('http'); http.createServer(function (req, res) { res.writeHead(200); console.log("run"); setTimeout(function(){ console.log("done"); res.end(); }, 1000); }).listen(process.env.PORT);
tagged with: javascript
has title: Run node js on cmd
favorite count: 0
has comment: http://stackoverflow.com/comment/44413555
type: UnansweredQuestion
tagged with: node.js
downvote count: 2

http://stackoverflow.com/comment/44587178
type: QuestionComment
has text: You should use `col-md-offset-*` to align
score: 1
comment on: http://stackoverflow.com/q/28106089
type: Comment

http://stackoverflow.com/a/27990825
type: Answer
accepted answer of: http://stackoverflow.com/q/27990693
answers question: http://stackoverflow.com/q/27990693
has comment: http://stackoverflow.com/comment/44376796
has body: You had some invalid JS in an earlier function which was causing a parse error. Two of your if statements were using single '=' operator instead of '=='. Single '=' is for assignemnt and double '==' is for comparison operations. ... if (ss.cssRules[j].type == window.CSSRule.KEYFRAMES_RULE &amp;&amp; ss.cssRules[j].name == rule){ //you only had a single '=' sign here alert(ss.cssRules[j]); webkitKeyframe = ss.cssRules[j]; } if (ss.cssRules[j].type == window.CSSRule.STYLE_RULE &amp;&amp; ss.cssRules[j].name == ".arrow") { //you only had a single '=' sign here alert(ss.cssRules[j]); pointer = ss.cssRules[j]; } ... JSFiddle DEMO
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/27997437
answers question: http://stackoverflow.com/q/27989464
upvote count: 1
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27989464
downvote count: 0
type: Answer
has body: You can get the type of your specific series like this: Highcharts.charts[i].series[j].type You can check the type of your series on a specific chart (i), and use foreach on Highcharts.charts[i].series and check if the type is line then add your drawGraph function.

http://stackoverflow.com/comment/44391178
comment on: http://stackoverflow.com/a/27988254
type: Comment
score: 1
has text: Same can be done in resources plugin. You can have jQuery module defined and tailor a new module which `dependsOn` jQuery module. I dont see a reason why not to use the way shown in the answer. @confile
type: AnswerComment

http://stackoverflow.com/q/27983454
possible better answer: http://stackoverflow.com/a/27983930
has answer: http://stackoverflow.com/a/27983610
tagged with: jquery
has title: How to wrap link around image properly?
has body: I have been trying to wrap a link around an image. I have searched and found that wrap() in jQuery would help me. When I tried it, nothing seems to work. Is there something that I am doing wrong?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27983930
type: Question
accepted answer: http://stackoverflow.com/a/27983610
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/q/28037092
type: Question
answer count: 2
has title: How to get exact media query value in javascript?
accepted answer: http://stackoverflow.com/a/28038632
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/28037185
favorite count: 0
possible better answer: http://stackoverflow.com/a/28037185
upvote count: 2
type: AnsweredQuestion
score: 2
has body: I have used $(window).width() and $(window).outerWidth() but both will ignore the scroll bar. So if the scroll bar is 15px width, then $(window).width() and $(window).outerWidth() will be 755px when media query is 770px.
tagged with: media-queries
has answer: http://stackoverflow.com/a/28038632
tagged with: scrollbar

http://stackoverflow.com/q/28085795
tagged with: ios
tagged with: phonegap-plugins
tagged with: android
has title: Cordova/PhoneGap 4 Notification not working on Android
tagged with: cordova
has body: I am currently working on a PhoneGap/Cordova project. I am using Cordova v4. My problem is that the notification dialogs are not working. I already added the plugin via CLI based on its documentation here. And on my index.js file, under the onDeviceReady function, I added this code: navigator.notification.alert( 'You are the winner!', // message alertDismissed, // callback 'Game Over', // title 'Done' // buttonName ); And here's my alertDismissed function: function alertDismissed(){ console.log('alert dismissed'); } Do you have any idea what's the problem? Please help! Thanks!
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44551026
has answer: http://stackoverflow.com/a/28356954
tagged with: javascript
has comment: http://stackoverflow.com/comment/44549744
type: Question
score: 0
answer count: 1

http://stackoverflow.com/comment/44374519
has text: are you using local data?
comment on: http://stackoverflow.com/q/27987848
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/28085379
downvote count: 0
has comment: http://stackoverflow.com/comment/110170256
has body: The problem is that you get select element and not selected option element as function argument. And it does not have the data attribute. You have to get the option attribute like so: function check_status(obj) { var uid = obj.options[obj.selectedIndex].getAttribute('data-uid'); alert(uid); } open pending finished canceled Notice that I changed the attribute name to data-uid for it to be valid according to HTML5 specificaion.
answers question: http://stackoverflow.com/q/28085201
score: 53
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28085201
type: Answer
upvote count: 53

http://stackoverflow.com/q/28002261
has answer: http://stackoverflow.com/a/70245938
downvote count: 0
answer count: 7
tagged with: javascript
tagged with: jquery
has title: Parse 'Date & Time' string in Javascript which are of custom format
has answer: http://stackoverflow.com/a/28002368
favorite count: 0
has answer: http://stackoverflow.com/a/28002624
tagged with: datejs
has answer: http://stackoverflow.com/a/79544992
tagged with: datetime-parsing
tagged with: momentjs
has answer: http://stackoverflow.com/a/45202393
possible better answer: http://stackoverflow.com/a/28007475
has answer: http://stackoverflow.com/a/28007475
accepted answer: http://stackoverflow.com/a/28002368
upvote count: 23
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44393584
has answer: http://stackoverflow.com/a/28002309
linked to: http://stackoverflow.com/q/1056728
score: 23
type: Question
has body: I have to parse a date and time string of format "2015-01-16 22:15:00". I want to parse this into JavaScript Date Object. Any help on this? I tried some jquery plugins, moment.js, date.js, xdate.js. Still no luck.
has comment: http://stackoverflow.com/comment/44393527

http://stackoverflow.com/comment/44590145
comment on: http://stackoverflow.com/a/28107663
type: AnswerComment
score: 0
type: Comment
has text: In Firefox, these function behave quite differently: log only prints out a toString representation, whereas dir prints out a navigable tree. In Chrome, log already prints out a tree -- most of the time. However, Chrome's log still stringifies certain classes of objects, even if they have properties.

http://stackoverflow.com/comment/44398817
type: QuestionComment
comment on: http://stackoverflow.com/q/28005182
type: Comment
score: 2
has text: `setTimeout` code runs **in the future**. So of course the second alert shows an empty object, because the cache has not been modified **yet**.

http://stackoverflow.com/a/27982120
answers question: http://stackoverflow.com/q/27982102
has comment: http://stackoverflow.com/comment/44355755
score: 0
has body: You can use detach method for this: $("#menusx li").detach().appendTo("#menu ul"); This will remove your li elements from DOM before appending it again.
has comment: http://stackoverflow.com/comment/44356019
has comment: http://stackoverflow.com/comment/44355685
type: Answer

http://stackoverflow.com/a/28038139
score: 1
accepted answer of: http://stackoverflow.com/q/28038053
type: Answer
answers question: http://stackoverflow.com/q/28038053
has body: Your issue is, checkboxes = $("#bind_id").on is not doing what you think it is doing. It is not storing all the matched nodes. Try this instead: In the callback, change checkboxes.not(..) to $('input[name^=iso_01]').not(this).prop("checked", false); Working fiddle Or if they are loaded dynamically, you can use $('#bind_id').find('input[name^=iso_01]')
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/28106427
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: Below is JSP page <form:form id="deviceForm" name="" modelAttribute="" enctype="multipart/form-data"> Sample Input <jsp:include page='xyz.jsp' /> <jsp:include page='abc.jsp' /> </form:form> In JS file I am hiding div based on user's selection. Both page have some functionality which changes page's default look, Like row can be added or deleted, Now if user select other radio button and came back to page, default look should be displayed. I don't want to get into undo what user has done, util there is cleaner way to do it. Currently I am reloading parent page. Is there any way using ajax call I can request for xyz.jsp page again, so that I don't have to refresh parent page. Or any better solution.
has answer: http://stackoverflow.com/a/28107276
type: Question
has title: Clear child JSP page into default look
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: jsp

http://stackoverflow.com/comment/44493788
type: AnswerComment
comment on: http://stackoverflow.com/a/28036710
type: Comment
score: 0
has text: I just tried this with #Main height at 2000px and the side bar does not scroll up when I scroll up and am past 1000 length on #Main. How would I go about fixing that?

http://stackoverflow.com/q/28109169
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28109454
favorite count: 0
possible better answer: http://stackoverflow.com/a/28109225
tagged with: get
has answer: http://stackoverflow.com/a/28109225
answer count: 4
type: AnsweredQuestion
tagged with: php
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28109454
has title: get textbox vlaue in php on same page using get method
score: -1
has body: Hi am tryimg to get the texbox value on same page in php when i submit form using selectbox onchange event but i am not able toa chieve this. Here is my code <?php if(($_GET)) { $users1 = $_GET['category3']; echo $users1; echo "shakti"; } ?> --Select-- --hi-- --hello-- <input type="text" id="friendName1" name="category3" value="<?php echo $mysub;?> "> How can i acieve my output Thanks
upvote count: 0
has answer: http://stackoverflow.com/a/28109278
has answer: http://stackoverflow.com/a/28109230
tagged with: javascript

http://stackoverflow.com/q/27989175
has body: In jQuery var myblock = $("#mycaret"); //then myblock slighly modified by jQuery with modified myblock, I'd like to do this: to exclude this css style table th:first-child {display:none;} by jQuery for all tables inside of myblock? This is almost the same as $("#mycaret table th:first-child").show(); however I need it for myblock variable. Thank you.
possible better answer: http://stackoverflow.com/a/27989227
has title: jQuery: show some nodes of the parent with show()
tagged with: css
accepted answer: http://stackoverflow.com/a/27989359
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27989359
type: Question
has answer: http://stackoverflow.com/a/27989227
tagged with: children
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery

http://stackoverflow.com/a/28081634
has comment: http://stackoverflow.com/comment/44542203
score: 0
has body: Its because your angular module 'webApp' does not know of the controller 'HeaderCtrl'. You will need to add this webApp.controller('HeaderCtrl', HeaderCtrl); Example: http://jsfiddle.net/h2mku6L2/1/ Note: I commented out some parts since i dont have header.html file. It should be safe to uncomment the JS &amp; HTML
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/28081600
accepted answer of: http://stackoverflow.com/q/28081600
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/28100958
has comment: http://stackoverflow.com/comment/44577557
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44577598
tagged with: javascript
has answer: http://stackoverflow.com/a/28101398
score: 0
tagged with: mongodb
has comment: http://stackoverflow.com/comment/44577462
has comment: http://stackoverflow.com/comment/44577639
answer count: 1
tagged with: mongoose
has body: I discover that i don't need this: var body = req.body; var event = new EventModel({ dateO: dateObject, date: body.date, name: body.name, type: body.type, meetingPoint: body.meetingPoint, info: body.info, men: body.men, women: body.women, description: body.description }); event.save....... I can use just: var event = new EventModel(req.body); event.save....... If all the inputs 'name' have the same name of my attr's in my database, mongoose can save just passing the req.body. My question is: I have in my HTML form the following inputs with the names: date; name; type; meetingPoint; info; men; women; description; If i do just the var event = new EventModel(req.body), will save this values, but there is a problem: I have this dateO, and I need to deal with it in my backend. I tried to do the following: req.body.dateO = what i want. But i cant use the req.body in the controller. How can i use just the: var event = new EventModel(req.body); and still pass the dateO?? UPDATE: I have the following schema: var EventSchema = new mongoose.Schema({ dateO: { type: Date }, date: String, name: String, meetingPoint: String, info: String, men: String, women: String, description: String, }); And i have this html inputs: &lt;input name="date"/&gt; &lt;input name="name"/&gt; &lt;input name="type"/&gt; &lt;input name="meetingpoint"/&gt; &lt;input name="info"/&gt; &lt;input name="men"/&gt; &lt;input name="women"/&gt; &lt;input name="description"/&gt; It would be perfect if it were not for one problem: I want use the input date field in the 'DD/MM/YYYY' format, and i cant, cause mongoose just except 'MM/DD/YYYY', so i am dealing with this problems like this: var body = req.body; var dateObject = new Date(body['date'].replace( /(\d{2})\/(\d{2})\/(\d{4})/, "$2/$1/$3")); Them i can send like the way that i want to my database. My question is: How can i send the dataO using the new event model in just one line: var event = new EventModel(req.body);
has comment: http://stackoverflow.com/comment/44577985
accepted answer: http://stackoverflow.com/a/28101398
tagged with: node.js
has title: How save data in mongodb without specific req.bodys
has comment: http://stackoverflow.com/comment/44577480
has comment: http://stackoverflow.com/comment/44577909
has comment: http://stackoverflow.com/comment/44577559
has comment: http://stackoverflow.com/comment/44577849
type: Question

osx-mavericks
type: Tag
tags question: http://stackoverflow.com/q/28079374
tag name: osx-mavericks

http://stackoverflow.com/q/28120864
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/44623015
has title: Mongoose .save call is very slow
has comment: http://stackoverflow.com/comment/44623622
tagged with: mongodb
has comment: http://stackoverflow.com/comment/44615953
answer count: 1
downvote count: 0
tagged with: mongoose
tagged with: javascript
favorite count: 0
tagged with: node.js
has comment: http://stackoverflow.com/comment/44623078
has answer: http://stackoverflow.com/a/28125181
has body: Mongoose Model.save is taking over ~1.5+ seconds to complete, and if I user Model.collection.insert method instead its only ~50ms The second solution unless I'm mistaken is only quicker because its using the native mongoDb driver. I have tried using console.time to isolate where the delay is and its happening just before the Model.prototype.save function is called which is really strange. The auth.username is indexed so that shouldn't cause the slowness. Below is an example of the model schema and how i am invoking a new model. I am using 3.20.0 of mongoose, and 2.6.4 of mongoDB. var userSchema = new Schema({ active: { type: Boolean, default: true }, player_id: ObjectId, player: mongoose.Schema.Types.Mixed, auth: { token: { type: String, required: true, default: 'temp' }, username: { type: String, required: true, trim: true, lowercase: true, index: { unique: true } }, password: { type: String, required: true }, login_attempts: { type: Number, required: true, default: 0 }, locked_until: { type: Number } , }, contact: { first_name: String, last_name: String, nick_name: String, email: { type: String, required: true, trim: true, lowercase: true, index: { unique: true } }, phone: { type: String, required: false, trim: true, index: { unique: true, sparse: true } } }, },{collection: 'user' }); -v-v-v-v-v-v-v-v-v-v-v-v- var mongoose = require('mongoose'), User = mongoose.model('User'); var newUser = new User(data); newUser.save(function (err) { if(err) { return cb(err); } // Call takes ~1.5+ seconds }); User.collection.insert(data, function(err, user){ if(err) { return cb(err); } // Call takes ~50ms });

http://stackoverflow.com/comment/44595801
has text: Updated my answer have a look at
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28110723
type: Comment

http://stackoverflow.com/comment/44354403
comment on: http://stackoverflow.com/a/27981450
score: 0
type: Comment
has text: Hello, that's really working for me. But you just show me one input. How about two inputs including HP? I have tried to put `` for both email and HP, but when I clicked the button, the placeholder appears two of them. What I want is each of them in each input. Not two. Any ideas? Thanks
type: AnswerComment

http://stackoverflow.com/q/28101860
possible better answer: http://stackoverflow.com/a/28101963
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/27049342
tagged with: javascript
tagged with: angularfire
has body: I'm trying to log my service.title to the console, but it keeps passing it back as a weird object. .factory('service', function($firebase, FBURL, $routeParams) { var ref = new Firebase(FBURL + "services/" + $routeParams.serviceId); var title = $firebase(ref.child('title')).$asObject(); return { id: $routeParams.serviceId, title: title } }) .controller('ServiceController', function ($scope, $firebase, service, $routeParams, FBURL) { $scope.service = service; console.log($scope.service.title); }) Here's what I get back from the console: I'm trying to retrieve that $value in the console log. Can anyone help explain what I might be doing wrong? Thanks in advance!
score: 0
has answer: http://stackoverflow.com/a/28101963
tagged with: angularjs
has title: AngularFire: Return $value
accepted answer: http://stackoverflow.com/a/28109634
tagged with: firebase
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28109634

http://stackoverflow.com/comment/44505390
type: Comment
has text: I am also using this code for other javascript functions but only __dopostback() method is not firing
type: AnswerComment
comment on: http://stackoverflow.com/a/28042019
score: 0

http://stackoverflow.com/q/28003596
has answer: http://stackoverflow.com/a/28959010
has comment: http://stackoverflow.com/comment/44396073
has comment: http://stackoverflow.com/comment/44396685
downvote count: 0
has comment: http://stackoverflow.com/comment/44395933
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/35645183
has comment: http://stackoverflow.com/comment/44396029
favorite count: 0
tagged with: jquery-select2
answer count: 3
has body: I want to use multiple select2 by using a class, like I am doing in autocomplete, but I am failing to do same in select2. here is my code: $('.select2-autocomplete').select2({ placeholder: "Search", minimumInputLength: 1, multiple: true, ajax: { url: "http://example.com/autocomplete-results", dataType: 'json', data: function(term, page) { return { q: term, type: $(this.element).data('type') }; }, results: function(data, page) { return { results: data }; } }, }); Everything is working fine except this : type : $(this.element).data('type') Here I need the select2 element data-type value, but it is always undefined any idea how I can get that? Thanks Edit: &lt;input type="hidden" data-type="products" name="products" class="select2-autocomplete"&gt; &lt;input type="hidden" data-type="customers" name="customers" class="select2-autocomplete"&gt; I want to show different results from ajax that is the reason I want to send data-type via ajax
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44395994
upvote count: 2
has answer: http://stackoverflow.com/a/77597829
has answer: http://stackoverflow.com/a/35645183
type: Question
has title: get current element in select2
possible better answer: http://stackoverflow.com/a/28959010

http://stackoverflow.com/a/28022206
type: Answer
answers question: http://stackoverflow.com/q/28021828
has body: By default, AngularJS sanitises your data and strips all HTML. To achieve what you desire, use the $sce service to mark the data as trusted and the ngBindHtml directive to bind it to the view, like this: Add a new filter app.filter('unsafe', ['$sce', function($sce) { return function(text) { return $sce.trustAsHtml(text); }; }]) Use it in HTML &lt;ANY ng-bind-html="data | unsafe"&gt;&lt;/ANY&gt;
score: 0

http://stackoverflow.com/q/28030457
has body: I'm using AngularFire. I have some code which is supposed to add a new record to an array of records and using the promise then function, it is supposed to re-evaluate the array to find out which one has the most recent datestamp in the collection. this.addRecord = function() { // Add a new record with the value the user has typed in $scope.records.$add({ "date": (new Date()).toString(), "value": $scope.newValue }).then(function( ref ) { // Use underscore.last to determine which is the var _newestValue = _.max( $scope.records, function(record) { return record.date; })[0].value; sync.$update({ 'newestValue': _newestValue }); }); // Have angular clear the field $scope.newValue = ''; } The problem is that when the promise.then() calls, my local copy of $scope.records is not yet updated with the newest record. So while firebase out on the server now has the new record, when I iterate on $scope.records I get all the records except for the one I just added. After the .then() completes, I can see that the record has been added. Maybe I'm using the promise wrong? I was under the impression that when AngularFire finally calls the .then() that it would be after angular had added the new record on the server and synced up the local collection. What's the right way to do this? I just need to reliably know when the record has been added locally. Thanks in advance!
tagged with: promise
has comment: http://stackoverflow.com/comment/44716877
tagged with: angularjs
has answer: http://stackoverflow.com/a/28329251
has comment: http://stackoverflow.com/comment/44481708
has comment: http://stackoverflow.com/comment/44487215
has comment: http://stackoverflow.com/comment/44763704
has comment: http://stackoverflow.com/comment/44458284
score: 0
type: UnansweredQuestion
type: Question
tagged with: firebase
has title: Firebase promise returns before collection is updated
has comment: http://stackoverflow.com/comment/44491860
answer count: 1
tagged with: javascript
tagged with: angularfire

http://stackoverflow.com/a/28049156
answers question: http://stackoverflow.com/q/28049138
upvote count: 3
has comment: http://stackoverflow.com/comment/44480739
score: 3
has comment: http://stackoverflow.com/comment/44480293
has body: You could try this one: var results = []; objArray.filter(function(item){ if(simpleArray.indexOf(item.id)&gt;-1) results.push(item); }) Please try the following snippet: function Customer(id, name){ this.id=id; this.name=name; }; this.Customer.prototype.toString = function(){ return "[id: "+this.id+" name: "+this.name+"]"; } var objArray = [ new Customer(1,'fred'), new Customer(2,'john'), new Customer(3,'jane'), new Customer(4,'pete')]; var simpleArray = [1,3]; var results = []; objArray.filter(function(item){ if(simpleArray.indexOf(item.id)&gt;-1) results.push(item); }); document.write(results)
has comment: http://stackoverflow.com/comment/44480303
accepted answer of: http://stackoverflow.com/q/28049138
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/89123920
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28004999
type: AnswerComment
has text: > in most browsers: [According to MDN](https://developer.mozilla.org/en-US/docs/Web/Events/unhandledrejection), the only browser that supports this as of June 2018 is Chrome.

http://stackoverflow.com/comment/44579554
type: Comment
has text: @yzarubin seems like it still overwriting the current data, I wonder what would be the issue.
type: AnswerComment
comment on: http://stackoverflow.com/a/28101641
score: 0

http://stackoverflow.com/comment/44432116
has text: you're missing the closing ` )`
score: 0
comment on: http://stackoverflow.com/q/28023170
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28008204
downvote count: 0
score: 1
has title: JQuery .sort() JavaScript Object by property value not working
type: Question
has answer: http://stackoverflow.com/a/28008269
accepted answer: http://stackoverflow.com/a/28008269
has comment: http://stackoverflow.com/comment/44404364
tagged with: arrays
tagged with: javascript
tagged with: jquery
tagged with: sorting
has comment: http://stackoverflow.com/comment/44404779
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/44404915
has body: I'm building a game which has a number of NPCs. these NPCs are contained within an array of objects like below: "[ { "name": "Stella", "gender": "Female", "trait": "Strategic", "traitid": 3, "relationship": [ 78, 86, 17, 64, 22, 65, 22, 15, 94, 16, 90, 34, 19, 90, 74, 33, 53, 46, 12, 93, 18, 97, 72, 57 ], "power": 100, "startingnum": 10 }, { "name": "Sue", "gender": "Female", "trait": "Strategic", "traitid": 3, "relationship": [ 72, 39, 89, 48, 74, 26, 93, 37, 48, 17, 79, 39, 82, 56, 15, 14, 10, 52, 67, 100, 19, 21, 76, 29 ], "power": 88.599348534202, "startingnum": 12 }, { "name": "Adam", "gender": "Male", "trait": "Logistical", "traitid": 0, "relationship": [ 60, 71, 33, 72, 31, 90, 20, 71, 28, 93, 45, 57, 98, 46, 85, 92, 33, 18, 19, 66, 77, 31, 14, 26 ], "power": 80.94462540716614, "startingnum": 1 }, { "name": "Lela", "gender": "Female", "trait": "Diplomatic", "traitid": 2, "relationship": [ 75, 61, 54, 74, 81, 47, 55, 83, 30, 39, 73, 21, 58, 67, 93, 79, 46, 12, 100, 72, 66, 18, 73, 47 ], "power": 80.13029315960914, "startingnum": 8 }, { "name": "Fanny", "gender": "Female", "trait": "Diplomatic", "traitid": 2, "relationship": [ 38, 61, 61, 29, 45, 77, 17, 56, 88, 44, 48, 65, 82, 49, 64, 79, 95, 61, 98, 41, 53, 73, 87, 39 ], "power": 76.38436482084691, "startingnum": 18 }, { "name": "Bernice", "gender": "Female", "trait": "Diplomatic", "traitid": 2, "relationship": [ 99, 82, 60, 35, 59, 22, 80, 41, 26, 64, 76, 75, 47, 86, 19, 12, 38, 81, 88, 78, 23, 34, 12, 38 ], "power": 67.75244299674269, "startingnum": 5 }, { "name": "Charlotte", "gender": "Female", "trait": "Logistical", "traitid": 0, "relationship": [ 99, 30, 90, 34, 24, 71, 15, 86, 61, 40, 79, 55, 86, 19, 90, 41, 91, 98, 22, 13, 14, 92, 91, 39 ], "power": 64.33224755700327, "startingnum": 19 }, { "name": "Myrtie", "gender": "Female", "trait": "Tactical", "traitid": 1, "relationship": [ 24, 32, 26, 93, 46, 93, 70, 78, 92, 69, 46, 18, 83, 42, 67, 46, 86, 73, 83, 20, 43, 66, 66, 54 ], "power": 61.5635179153094…
has comment: http://stackoverflow.com/comment/44404691
has comment: http://stackoverflow.com/comment/44413256
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1069666

http://stackoverflow.com/q/28051557
possible better answer: http://stackoverflow.com/a/28053437
type: Question
has answer: http://stackoverflow.com/a/28053470
tagged with: javascript
tagged with: extjs
score: 0
answer count: 2
tagged with: sencha-touch-2
tagged with: sencha-touch-2.1
has title: custom calculation function Sencha Touch
has answer: http://stackoverflow.com/a/28053437
tagged with: model-view-controller
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28053470
has body: I'm working in Sencha Touch 2.4 and I want to perform calculation on specific view card. However, is it possible to define the calculation function outside the view (may be in model or controller) so that when the view is loaded, it just calls the function. I'm currently calling myCalc function in onActivate event and the result is currently displaying by console.log() on console. My First question is, is it possible to define my calculation function (a couple of methods are using in calculation) outside the view so that to optimise the performance and calling in the view with argument of method to calculate by the argument method? function myCalc(method) {} My Second question is, how to display my calculated results on view, I set up an id named as myID how can I display the results by the help of id? My Code: xtype: 'mycard', config: { listeners: { activate: 'onActivate' }, id: 'myID', styleHtmlContent: true ], } onActivate: function(me, container) { var results = new myCalc('METHOD1'); console.log(results); function myCalc(method) {...} } EDIT1: I'm using GPS coordinates in my calculation. I want to set them or the result to my screen. how can I setHtml or get the coordinates outside the locationupdate ? onActivate: function(me, container) { var geo = Ext.create('Ext.util.Geolocation', { autoUpdate: false, listeners: { locationupdate: function(geo) { var currentLat = geo.getLatitude(); var currentLng = geo.getLongitude(); var PT = new Ext.util.Calc.myCal('METHOD1'); var c = PT.setC([currentLat, currentLng]); //this.setHtml(c); // not working console.log(c); } } }); geo.updateLocation(); }

http://stackoverflow.com/comment/85059026
type: Comment
comment on: http://stackoverflow.com/q/27982781
has text: u can set its contect type mentioned but the type of data could be base64(string format).
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44395358
has text: I included the full alteon1.js and the full HTML here: http://jsfiddle.net/8a8co28k/ Just be advised that I'm not looking for a strict comparison (=== operator) but I actually want to search response contains a string. For instance, if the following response: { "status":"ok" } Contains the string "ok".
type: Comment
comment on: http://stackoverflow.com/a/28002220
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44375713
type: AnswerComment
type: Comment
has text: @randy yes, i noticed but it's just the clear:both on css. Remove that and you have it working ;)
comment on: http://stackoverflow.com/a/27982308
score: 0

http://stackoverflow.com/q/28056490
tagged with: javascript
tagged with: jquery
answer count: 1
downvote count: 0
has title: Combining jQuery event listeners for multiple elements
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/28056790
accepted answer: http://stackoverflow.com/a/28056790
type: AnsweredQuestion
score: 1
tagged with: coffeescript
type: Question
has body: How can I combine the following into two event listeners? $(document).on "focus", "input", (e) -&gt; $element.addClass "class-name" $(document).on "blur", "input", (e) -&gt; $element.removeClass "class-name" $(document).on "focus", "textarea", (e) -&gt; $element.addClass "class-name" $(document).on "blur", "textarea", (e) -&gt; $element.removeClass "class-name"

http://stackoverflow.com/q/28027413
tagged with: couchbase
type: Question
has comment: http://stackoverflow.com/comment/44440028
has comment: http://stackoverflow.com/comment/44457617
tagged with: javascript
has comment: http://stackoverflow.com/comment/44440645
score: 0
answer count: 1
has title: I get "Incorrect argument" error when i try to run a simple test on couchbase nodejs server
has body: var couchbase = require("couchbase"); var cluster = new couchbase.Cluster('127.0.0.1:8091'); var bucket = cluster.openBucket('beer-sample', function(err) { if (err) { throw err; } bucket.get('aass_brewery-juleol', function(err, result) { if (err) { throw err; } var doc = result.value; console.log(doc.name + ', ABV: ' + doc.abv); doc.comment = "Random beer from Norway"; bucket.replace('aass_brewery-juleol', doc, function(err, result) { if (err) { throw err; } console.log(result); process.exit(0); }); }); }); Here is my file. It's the example from here : http://docs.couchbase.com/developer/node-2.0/hello-couchbase.html So when i try to run the server with "nodejs test1.js" i get "Incorrect argument" error. At bucket.js, module.js and in cluster.js into node_modules/couchbase/lib/ I have installed couchbase and i have full nodejs installed. I'm new in this and i cant understand where is my mistake. Maybe something with the versions of the couchbase or the node version i dunno. Here is my full error which i get into the terminal: Error: Incorrect argument at New Bucket (home/anton/node_modules/couchbase/lib/bucket.js:213:16) at Object&lt;anonymus&gt; (home/anton/PhpstormProjects/couchbase/test1.js:6:22) at Cluster.openBucket (home/anton/node_modules/couchbase/lib/cluster.js:37:10) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28199560
tagged with: node.js

http://stackoverflow.com/comment/44372547
type: QuestionComment
has text: well spotted Josiah, didn't even notice it was in a form. You could also add event.preventDefault(); in the script. might add it to my answer in case it's put in the form
comment on: http://stackoverflow.com/q/27990588
score: 0
type: Comment

http://stackoverflow.com/comment/44507482
has text: I don't know why my original question was voted down. This is actually my last resort. I have been looking for the answer everywhere. Fortunatelly, I had some other code in which I used jquery dialog boxes, which made it possible for me to compare what could be so wrong.
type: Comment
comment on: http://stackoverflow.com/a/28063468
score: 0
type: AnswerComment

http://stackoverflow.com/a/28087926
type: Answer
answers question: http://stackoverflow.com/q/28087293
has comment: http://stackoverflow.com/comment/44552773
has body: Have you tried this.. var fileOpenDialog= $("#fileOpenDialog").val(); and in ajax data: {OldGraphicName: fileOpenDialog} sorry if i was wrong....
score: 0

http://stackoverflow.com/comment/44372719
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27990920
has text: Just a codebase took over, but I will look into prepared statements and PDO, thanks.
score: 0

http://stackoverflow.com/q/28070237
has comment: http://stackoverflow.com/comment/44550191
type: Question
tagged with: polymer
has comment: http://stackoverflow.com/comment/44607937
tagged with: javascript
has body: Well, i've tested importing by injecting all the imports inside the head with innerhtml; Importing by injecting each individual import inside the head with innerhtml once clicked; Using polymer.import method for an array with all imports once polymer-ready (others too) fires; Using polymer.import method for an array with each import once user clicked the menu item; Nothing worked. feels like FF only takes in account the imports made on the first time it parses the head. can anyone help me with some sort of workaround? Not to be arrogant but yes, my codes are fine. Its just scattered enough to discourage me to copy paste everything here. anyone PLEASE?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44550272
has title: Firefox html dynamic imports just won't work. (using firefox 37.0a2 and polymer 0.5.1)
answer count: 0
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/44538209

http://stackoverflow.com/a/28023176
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28011837
answers question: http://stackoverflow.com/q/28011837
type: Answer
has comment: http://stackoverflow.com/comment/44440610
has body: I beleive I have found your issue, it was as I expected: XFFView = Backbone.View.extend({ itemTpl: _.template($("#xff-item").html()), events: { "click span.delete" : "remove", "click span.abort" : "abort" }, initialize: function() { this.listenTo(this.model, "change", this.render); this.listenTo(this.model, "destroy", this.remove); }, render: function() { this.$el.html(this.itemTpl(this.model.toJSON())); return this; }, remove: function() { app.delXFFFromList(this.$el.children('li').children('span.delete.badge').data('target')); this.$el.remove(); } From what I can tell, this line: this.listenTo(this.model, "destroy", this.remove); is listening for the model to be removed, which it is in this line: this.collection.get(id).destroy(); Which will then call this code again: remove: function() { app.delXFFFromList(this.$el.children('li').children('span.delete.badge').data('target')); this.$el.remove(); } Basically throwing your code into an infinite loop, or until your collection empties. Either change this line this.listenTo(this.model, "destroy", this.remove); to call this.destroy, OR rename your remove method to something like removeEntry so that it does not get confused with removal of the view.

http://stackoverflow.com/a/28050965
has comment: http://stackoverflow.com/comment/44489633
has comment: http://stackoverflow.com/comment/44488154
score: 0
answers question: http://stackoverflow.com/q/28050399
has body: Tabs in JQueryUI are just &lt;div&gt;'s on the same page but rendered horizontally. So all you have to do, is poke whatever information you have into your own &lt;div&gt; or &lt;span&gt; somewhere on the same page, even if it's on another tab. So, in one tab you determine what the new text is (possibly via an onclick handler or whatever): &lt;div id="sourcediv"&gt; Here's whatever was rendered &lt;/div&gt; ... var newtext = $('#sourcediv').html() Then you poke it into say targetdiv even when that's on a different tab and clear the contents of your source: &lt;div id="targetdiv"&gt; This will be overwritten from sourcediv &lt;/div&gt; $('#targetdiv').html(newtext); $('#sourcediv').html('');
type: Answer

http://stackoverflow.com/a/28000801
accepted answer of: http://stackoverflow.com/q/28000463
has comment: http://stackoverflow.com/comment/44390922
has body: That is because when server responds with an error, jquery.ajax runs the error function, which means your success function does not run. See error on api.jquery.com/jquery.ajax/#jQuery-ajax-settings $(document).ready(function () { $("button").click(function () { $.ajax({ type: 'POST', url: 'time.php', success: function (data) { $("span").text(data); }, error: function(jqxhr){ //redirect to 404 page on 404 error if(jqxhr.status == 404){ window.location.href="HTTP/1.0 404 Not Found"; } } }); document.getElementById("jsTime").innerHTML += Date(); }); });
has comment: http://stackoverflow.com/comment/44391253
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/44391571
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28000463
has comment: http://stackoverflow.com/comment/44391159

misuse
type: Tag
tag name: misuse
tags question: http://stackoverflow.com/q/28032604

http://stackoverflow.com/a/28033920
type: AcceptedAnswer
downvote count: 0
has body: Change the link_to code to this: &lt;%= link_to 'Message me', new_message_path(recipient_id: @user.id) %&gt; In messages#new action, add this code: def new @users = User.all end And, in message form, replace the select_tag with this: &lt;%= select_tag 'recipients', options_from_collection_for_select(@users, :id, :first_name, params[:recipient_id]), multiple: true, class: 'new_message_recipients_field' %&gt; I made some changes in recipients select. You can use options_from_collection_for_select method to generate that options instead implement your own helper. Reference: http://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/options_from_collection_for_select
has comment: http://stackoverflow.com/comment/44456805
type: Answer
has comment: http://stackoverflow.com/comment/44462201
has comment: http://stackoverflow.com/comment/44456726
has comment: http://stackoverflow.com/comment/44456548
answers question: http://stackoverflow.com/q/28033759
upvote count: 3
has comment: http://stackoverflow.com/comment/44461045
has comment: http://stackoverflow.com/comment/44453920
score: 3
has comment: http://stackoverflow.com/comment/44458306
has comment: http://stackoverflow.com/comment/44456420
has comment: http://stackoverflow.com/comment/44455504
has comment: http://stackoverflow.com/comment/44457312
has comment: http://stackoverflow.com/comment/44456269
accepted answer of: http://stackoverflow.com/q/28033759

http://stackoverflow.com/comment/44459137
comment on: http://stackoverflow.com/q/28036778
type: QuestionComment
type: Comment
has text: Yep, you're totally right. Thanks so much for taking the time to answer this.
score: 0

http://stackoverflow.com/a/35126047
answers question: http://stackoverflow.com/q/28104723
has comment: http://stackoverflow.com/comment/105391656
downvote count: 0
type: Answer
score: 7
has body: The issue with bootstrap is that you set a checked radio button by adding the active class to the corresponding label of the input. It looks like this: &lt;label class="btn btn-default active"&gt; &lt;!-- Note the class 'active' here --&gt; &lt;input type="radio" name="myRadio" value="value1" checked="checked"/&gt;Value 1 &lt;/label&gt; &lt;!-- ... --&gt; To check a radio button using jQuery you could first select the input field with a jQuery Selector and then add the class to the parent: var $myRadioInput = $(...); $myRadioInput.parent('.btn').addClass('active'); Don't forget to remove the class active on the formerly selected label with jQuery removeClass('active') to first unselect them. I also like it to set the checked property on the input itself to have the proper state on it: $myRadioInput.prop('checked', true); Note that the checked="checked" attribute is only the inital state for the input to be the checked input when loading the page. It does NOT change with the jQuery .prop() method, as it is an attribute and is different to the actual checked property. This is well described in jQuery Docs.
upvote count: 7

http://stackoverflow.com/a/28115676
answers question: http://stackoverflow.com/q/28115653
score: 4
accepted answer of: http://stackoverflow.com/q/28115653
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44605527
type: Answer
has body: onload expects a function reference to call fr.onload=doSomething; When you assign doSomething() to the onload event handler, its return is called (which is undefined) and that is the error you see. This is also the reason why doSomething appears to run immediately (because it executes during the assignment).

http://stackoverflow.com/q/28012781
type: AnsweredQuestion
has body: I am trying to set and get the value of a global variables. Here is the jsfiddle HTML JS //setting global variable var theValues = ''; function setValue() { theValues = "test"; alert(theValues); } function getValue() { alert(theValues); } But it is not throwing an error and not working
type: Question
accepted answer: http://stackoverflow.com/a/28012830
tagged with: javascript
score: 0
answer count: 2
duplicate of: http://stackoverflow.com/q/14499783
has title: How to set and get the value of a global variable ?
possible better answer: http://stackoverflow.com/a/28013209
linked to: http://stackoverflow.com/q/14499783
has comment: http://stackoverflow.com/comment/44412760
has answer: http://stackoverflow.com/a/28013209
has answer: http://stackoverflow.com/a/28012830

http://stackoverflow.com/a/28020236
has comment: http://stackoverflow.com/comment/44427063
answers question: http://stackoverflow.com/q/28020150
has comment: http://stackoverflow.com/comment/44426990
has body: elclanrs comment correctly addresses the problem, you could try to make a promises array and execute them all at once and then get a list of all the results at once: var promisesArray=[]; for(var i = 0; i &lt; scope.posts.length; i++) { post=scope.posts[i]; console.log(i); //prints 1 to i as expected promisesArray.push(http.get("/api/postreply/"+post.id)); } And then: $q.all(promisesArray).then(function(aggregateData){ console.log(aggregateData); })
upvote count: 2
has comment: http://stackoverflow.com/comment/44426953
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/44426905
has comment: http://stackoverflow.com/comment/44427358
downvote count: 0

http://stackoverflow.com/q/28104012
type: Question
has body: I'm writing a simple image uploader in node.js and express 4. When the file is posted, the enclosed image will run through a series of filters: is this an acceptable MIME type? (jpg, gif, png, tiff) does this have a correspondingly acceptable extension? is this image less than 2 megabytes? has the file been truncated in the upload? I'm used to doing this sort of thing in synchronous languages, where I would run the object through a series of if's, and return false if something catches. In javascript, however, the same approach will result in sending multiple headers. I have gotten around this by nesting the filters in else clauses, but this is quickly becoming very unwieldy. This seems like a common design pattern, so what is the best way to handle something like this? app.js: var express = require('express') , fs = require('fs') , bodyParser = require('body-parser') , serveStatic = require('serve-static') , multer = require('multer') , port = 80 ; var app = express(); app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(multer({ dest: "./images/tmp" })) app.use(serveStatic(__dirname + '/public')); app.listen(port); app.get('/', function(req, res, next) { console.log(req); res.render("uploader"); }); var uploadConfig = { acceptedMimeTypes : [ "image/jpeg", "image/png", "image/gif", "image/tiff" ], acceptedExtensions : [ "jpg", "jpeg", "png", "gif", "tiff" ], maxFileSize : 2000000 }; app.post('/upload', function(req, res, next) { var image = req.files.image; var removeTempImage = function() { fs.unlink('images/tmp/' + image.name) }; // Here is where things become a mess if (uploadConfig.acceptedMimeTypes.indexOf(image.mimetype) == -1) { removeTempImage(); res.send({success: false, message: "Incorrect MIME type"}); } else { if (uploadConfig.acceptedExtensions.indexOf(image.extension) == -1) { removeTempImage(); res.send({success: false, message: "Incorrect file e…
tagged with: javascript
tagged with: express
possible better answer: http://stackoverflow.com/a/28105274
answer count: 3
has answer: http://stackoverflow.com/a/28105274
downvote count: 0
tagged with: file-upload
has answer: http://stackoverflow.com/a/28104532
has answer: http://stackoverflow.com/a/28104469
favorite count: 0
accepted answer: http://stackoverflow.com/a/28104469
tagged with: design-patterns
tagged with: node.js
type: AnsweredQuestion
has title: Design pattern for writing a list of filters for image uploading using node.js
score: 1
upvote count: 1

http://stackoverflow.com/a/28052274
has body: Use a custom filter var orders = { unsafe:0, elevated:1, trace:2 } $scope.someKeyOrder = function(item){ return orders[item.some_key]; } and use it ng-repeat="item in items | orderBy: someKeyOrder" Demo at http://plnkr.co/edit/4Tjsc8?p=preview
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/28051986
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44521210
has text: `$j(this).addClass('active');` => `$j(this).parent("li").addClass('active');`
comment on: http://stackoverflow.com/q/28070942
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/q/28032206
type: UnansweredQuestion
has title: Javascript difference in behavior between chrome and firefox (event onmouseover)
tagged with: google-chrome
has answer: http://stackoverflow.com/a/28032572
tagged with: onmouseover
type: Question
tagged with: firefox
answer count: 1
tagged with: javascript
score: 0
has body: My intention is to make it so that the img will be visible only when I enter the mouse inside the boundaries of the input. The problem I have seen is that the code works differently in chrome (ver 39) than in firefox (ver 35). In firefox and IE, it works as intended, but in chrome it only triggers the functions when I click inside or outside the boundaries. I tried using other events like onmouseenter, onmousemove or onmouseleave, but they seem to have the same results. Is there some problem with my code? I have the following code:
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/28033247
upvote count: 1
tagged with: video
has comment: http://stackoverflow.com/comment/44776218
score: 1
type: Question
has body: Firefox seems to add it’s own ‘click anywhere to play’ behavior, it dims the poster and adds a play button. It works great, but the problem is that no other browsers seem to add that behavior automatically. So, I’ve had to implement a javascript workaround to allow ‘click anywhere to play’ in other browsers. They work great, but now it’s broken in firefox. The way it behaves, it seems like the javascript I put in there is getting a click and making it play, but then ff’s own ‘click anywhere to play’ catches the click too, and pauses it immediately. I can inch along the entire video, 1 or 2 seconds at a time, if keep clicking. As for the specific js workarounds that I've tried, many of the examples from these two threads: How can I add click-to-play to my HTML5 videos without interfering with native controls? and Click the poster image the HTML5 video plays? I was really hoping for a &lt;video&gt; attribute like click-anywhere="yes", but I think I'm out of luck there. Or, as a solution to my problem, something like the css: moz-click-anywhere:false; to allow the js to handle clicks exclusively. The only solution I can think of is the browser detection route, but I’m hoping there’s a more elegant solution. If not, so be it, but it was worth asking.
has title: html5 tag; click anywhere js works everywhere but firefox
linked to: http://stackoverflow.com/q/11880917
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/5278262

http://stackoverflow.com/a/28019829
has body: I have made some changes in your Fiddle I have removed the #toggle_id div outside the table and gave a data-value attribute. Check this DEMO $(document).on('click', '#action_btn', function (event) { if ($("#toggle_id").attr("data-value") == "OFF") { console.log($("#toggle_id").data("value")); // Setup - add a text input to each footer cell $('#example thead th').each(function () { var title = $(this).text().replace('Search ', ''); $(this).html('&lt;input type="text" placeholder="Search ' + title + '" /&gt;'); $("#toggle_id").attr("data-value", "ON"); }); // DataTable var table = $('#example').DataTable(); // Apply the search table.columns().eq(0).each(function (colIdx) { $('input', table.column(colIdx).header()).on('keyup change', function () { table.column(colIdx) .search(this.value) .draw(); }); }); } else { // Setup - remove a text input to each footer cell $('#example thead th').each(function () { var title = $(this).find('input').attr('placeholder'); $(this).removeAttr('class tabindex aria-controls rowspan colspan aria-sort aria-label style').html(title); $("#toggle_id").attr("data-value", "OFF"); }); } });
score: 2
accepted answer of: http://stackoverflow.com/q/28019360
has comment: http://stackoverflow.com/comment/44426291
downvote count: 0
answers question: http://stackoverflow.com/q/28019360
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44426144
type: Answer
has comment: http://stackoverflow.com/comment/44426239

http://stackoverflow.com/a/32394559
upvote count: 10
downvote count: 1
answers question: http://stackoverflow.com/q/28044084
type: Answer
has body: use the following function to check which platform you are on: $ionicPlatform.is(platform) where 'platform' could be 'ios' or 'android'. See this ionic-commit here: github ionic commit
score: 9

http://stackoverflow.com/a/28048641
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28048276
has body: If you call serializeArray on a jQuery form element you'll get an array of objects, similar to the one you are creating, and will avoid duplicates: $('form').serializeArray(); will return: [ { name: "firstfield", value: "1" }, { name: "secondfield", value: "2" } ]

http://stackoverflow.com/comment/44598059
comment on: http://stackoverflow.com/q/28112000
type: QuestionComment
type: Comment
score: 1
has text: I'm just saying it has nothing to do with React. It could have something to do with JSX (which is independent of React), and it has definitely something to do with your module loader. And we still don't really know which one you are using.

http://stackoverflow.com/q/28024995
tagged with: angularjs
upvote count: 3
has answer: http://stackoverflow.com/a/28025244
accepted answer: http://stackoverflow.com/a/28025244
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/28025248
has body: I need to get selected row data(id, name) with radio button. To be specific; {{list.TaskId}} {{list.Comments}} {{list.RecordDate}} {{list.StartDate}} {{list.DueDate}} {{list.AssignTo}} {{list.AssignBy}} When selected radio button, I should get the datas(taskId, comments), which is selected row. Which function should I use it? (specially I need JS part) Thanks for any help.
has title: How to get selected radio button data in AngularJS (ng-repeat)
type: Question
answer count: 3
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/53822211
favorite count: 0
possible better answer: http://stackoverflow.com/a/28025248

http://stackoverflow.com/q/28002505
has answer: http://stackoverflow.com/a/28002883
answer count: 1
accepted answer: http://stackoverflow.com/a/28002883
has body: if(keyEvent.keyCode == 8){ $scope.erase(); } else if(keyEvent.keyCode === 107){ console.log("+"); $scope.inputToCal('+') } else if(keyEvent.keyCode === 109){ console.log("-"); $scope.inputToCal('-') } else if(keyEvent.keyCode === 16){ console.log("*"); $scope.inputToCal('*') } } else if(keyEvent.keyCode === 111){ console.log("/"); $scope.inputToCal('/') } I was trying to make a calculator that catch the "keydown". I can catch these keys, "+","-","/". These keys code are "107","109","111" However, there is one problem. I can't catch the key "*". Are there any solution to solve this problem? Or, do I have to define new array to catch the key "Shift"(keyCode:16) , and "8"(keyCode:56) ? Sorry , I'm a newbie about keyEvent. I'm waiting a solution ... Please help me!!
tagged with: javascript
tagged with: key
has comment: http://stackoverflow.com/comment/44393970
type: AnsweredQuestion
tagged with: angularjs
type: Question
score: 0
has title: In keyEvent, How can I catch the key " * "?

http://stackoverflow.com/comment/44576141
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28100228
has text: Have you looked at Ajax :)

http://stackoverflow.com/q/28020451
has comment: http://stackoverflow.com/comment/44427545
has answer: http://stackoverflow.com/a/28020911
type: UnansweredQuestion
tagged with: css
has title: Responsive Equal height div without specifying the height
has comment: http://stackoverflow.com/comment/44427340
has answer: http://stackoverflow.com/a/28020774
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has body: I am looking for some responsive equal height div by just using CSS. I don't want to specify the height. Looking somewhat similar to the image below but both the divs should adjust based on the other div height. If the left side div is long then the right side div should adjust to the left side div and vice versa. Also the right side div has 2 small divs which should also be of same height. Can this be achieved using only CSS? Or should I make use of JS/jQuery? Example here on the jsFiddle img { width: 100%; border: 1px solid green; } .row { display: table; } .column { display: table-cell; vertical-align: top; } .w100 { width: 100%; } .w75 { width: 75%; } .w50 { width: 50%; } .w25 { width: 25%; }
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44427245

http://stackoverflow.com/q/27994115
has title: Detecting 3G network connection with Meteor
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29903627
tagged with: javascript
tagged with: meteorite
score: 0
answer count: 1
tagged with: meteor
has body: I try to detect network connection on meteor. I use Meteor.status(), It's detect the connection if I turn off /on wifi But with 3G H+ network it's do not detect that the device is connected to internet ( meteor.status().connection return false) I wonder if there is a way to make it work for 3G connection, or maybe I need to detect it with pure js? I saw that The Verso App (made with meteor) detect it, anyone have clue about how to do it?
has answer: http://stackoverflow.com/a/29903627

http://stackoverflow.com/comment/44572471
comment on: http://stackoverflow.com/q/28098233
type: QuestionComment
type: Comment
score: 1
has text: search for pushState.

http://stackoverflow.com/q/27967911
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44328593
has comment: http://stackoverflow.com/comment/44328577
has body: var row = document.getElementById("table").tBodies[0].rows; $(function() { $('table td').click(function(e) { if (e.target.id === "Sellbtn") { var sell = prompt("Input the amount you wish to sell"); for (var i = 0; i &lt; row.length; i += 1) {}; //where the problem lies i guess row.cells[4].innerHTML = parseInt(row.cells[4].innerHTML) - sell; row.cells[6].innerHTML = +sell + +row.cells[6].innerHTML; } else if (e.target.id === "Deletebtn") { return false; } else { var ask = prompt("ادخل"); $(this).html(ask); } }); }); I have rows in a table that are loaded from the local storage since they've been previously saved. Each row has a sell button, which when clicked gives a prompt and asks the amount to sell. When the user enters a value, it should subtract the number in cell[4] from that number that the user entered, but what happens is that it only subtracts from cell[4] of the last added row, it doesn't detect which row of the button I'm clicking on. Putting this inside the for loop gives me nothing, not even an error.
has comment: http://stackoverflow.com/comment/44328737
tagged with: jquery
has answer: http://stackoverflow.com/a/27968090
type: Question
has title: HTML button in row not working
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44328622
tagged with: javascript

iframe
tags question: http://stackoverflow.com/q/28027549
tags question: http://stackoverflow.com/q/28121720
tags question: http://stackoverflow.com/q/27973341
tags question: http://stackoverflow.com/q/28088510
tags question: http://stackoverflow.com/q/28120547
tags question: http://stackoverflow.com/q/28098798
tags question: http://stackoverflow.com/q/28020310
tags question: http://stackoverflow.com/q/27973879
tags question: http://stackoverflow.com/q/28079064
tag name: iframe
tags question: http://stackoverflow.com/q/28096661
tags question: http://stackoverflow.com/q/28113937
tags question: http://stackoverflow.com/q/28018196
tags question: http://stackoverflow.com/q/28040234
tags question: http://stackoverflow.com/q/28098299
tags question: http://stackoverflow.com/q/28096880
tags question: http://stackoverflow.com/q/28085161
tags question: http://stackoverflow.com/q/28079248
tags question: http://stackoverflow.com/q/28097235
tags question: http://stackoverflow.com/q/28059311
tags question: http://stackoverflow.com/q/28005845
tags question: http://stackoverflow.com/q/28077047
tags question: http://stackoverflow.com/q/28060696
tags question: http://stackoverflow.com/q/28070782
tags question: http://stackoverflow.com/q/28115653
tags question: http://stackoverflow.com/q/28022915
tags question: http://stackoverflow.com/q/28083385
tags question: http://stackoverflow.com/q/28034785
tags question: http://stackoverflow.com/q/28086232
tags question: http://stackoverflow.com/q/27985066
tags question: http://stackoverflow.com/q/28103844
tags question: http://stackoverflow.com/q/28095676
tags question: http://stackoverflow.com/q/28038873
tags question: http://stackoverflow.com/q/28020688
tags question: http://stackoverflow.com/q/28047358
tags question: http://stackoverflow.com/q/28074950
tags question: http://stackoverflow.com/q/28073394
type: Tag
tags question: http://stackoverflow.com/q/28078298
tags question: http://stackoverflow.com/q/28010546
tags question: http://stackoverflow.com/q/28051061
tags question: http://stackoverflow.com/q/28044727
tags question: http://stackoverflow.com/q/27980823
tags question: http://stackoverflow.com/q/28119594
tags question: http://stackoverflow.com/q/28034604
tags question: http://stackoverflow.com/q/28025289
tags question: http://stackoverflow.com/q/28110011
tags question: http://stackoverflow.com/q/28070574
tags question: http://stackoverflow.com/q/27987006
tags question: http://stackoverflow.com/q/28018786
tags question: http://stackoverflow.com/q/28020517
tags question: http://stackoverflow.com/q/28004771
tags question: http://stackoverflow.com/q/28008595
tags question: http://stackoverflow.com/q/28049188
tags question: http://stackoverflow.com/q/28104814
tags question: http://stackoverflow.com/q/28004857
tags question: http://stackoverflow.com/q/28016647

http://stackoverflow.com/q/27966596
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44325977
accepted answer: http://stackoverflow.com/a/27966646
has comment: http://stackoverflow.com/comment/44326382
upvote count: 1
has comment: http://stackoverflow.com/comment/44326247
has title: Chaining methods to a newly inserted element via append
has comment: http://stackoverflow.com/comment/44327806
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/12923970
score: 1
has body: While trying to find a solution to this problem I came across this post which suggests using the appendTo method like so: $('<input[type="text"]').appendTo('div').addClass('foo'); There are times where I'm using append more than the former. Is there a way I can chain methods to a newly inserted element using append? HTML JS Add new element $('body').on('click', 'a', function(e) { e.preventDefault(); $('div').append(' ').addClass('bar'); });
type: Question
has answer: http://stackoverflow.com/a/27966646
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/44458976
has text: im sure this is the right anwser but having troubles getting it to make the submenu into an actual array, seems to be the only way i can get angular to read it
comment on: http://stackoverflow.com/a/28020077
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28111404
has answer: http://stackoverflow.com/a/28111419
accepted answer: http://stackoverflow.com/a/28111419
has title: How do I select elements in jQuery by using a variable for the ID in "Attribute Starts With Selector"
type: AnsweredQuestion
type: Question
duplicate of: http://stackoverflow.com/q/5891840
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: Instead of using : $('input[id^="appName"]').each(function () { } }); I would like to use a varibale for Attribute Starts With Selector var attrName = "appName"; $('input[id^=attrName]').each(function () { } }); The above syntax doesn't work. I checked the jQuery documentation and answers here without success.
linked to: http://stackoverflow.com/q/5891840
upvote count: 0
downvote count: 3
score: -3

http://stackoverflow.com/a/28005877
type: Answer
has comment: http://stackoverflow.com/comment/44402715
has comment: http://stackoverflow.com/comment/44401303
answers question: http://stackoverflow.com/q/28005771
has body: After the code to add attributes, try this: $('#parent').find('#someChild').attr('name', 'value');
score: 0

http://stackoverflow.com/a/28023466
has comment: http://stackoverflow.com/comment/44433808
has comment: http://stackoverflow.com/comment/44433470
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: AJAX is asynchronous. Anything that depends on the result must be done in the callback function. I also recommend always passing the parameters as an object, to allow jQuery to encode it properly. function getProjects() { getEnt_PodType().done(function (result) { var QUERY_FILTER = { "$filter": "Ent_PodType eq '" + result + "'"}; console.log("The url form getProjects is " + QUERY_FILTER); return $.ajax({ url: restUrl, data: QUERY_FILTER, type: "GET", async: true, beforeSend: function (xhr) { xhr.setRequestHeader("ACCEPT", accept); }, success: function (xhr, textStatus) { projects = parseODataResultTest(xhr); return projects; } }); }); }
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28023337
answers question: http://stackoverflow.com/q/28023337

http://stackoverflow.com/a/28087088
has comment: http://stackoverflow.com/comment/44551983
accepted answer of: http://stackoverflow.com/q/28086937
upvote count: 1
has body: In the function you have: function select( selector ) { return document.querySelectorAll(selector); }; so select returns a NodeList, which doesn't inherit from select. Then there is: window.j = select; and j(...).attr(...) So select is called without new, so it doesn't create an instance of itself and assign it to this. Since that object isn't returned anyway, the returned object won't inherit from select even if you do call it with new. Edit You can return an object that has the DOM elements as a property, e.g.: sadas11DA sadas222DA Note the modified markup. Also passing of this rather than window since this can't be modified, window can.
has comment: http://stackoverflow.com/comment/44551651
answers question: http://stackoverflow.com/q/28086937
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/44552199

http://stackoverflow.com/a/28016096
type: Answer
upvote count: 2
score: 2
has body: Try this: function FirstFactorial($num) { $factorial = "$num"; for ($i = $num - 1; $i &gt; 0; $i--) { $factorial .= "*" . $i ; } return $factorial; } echo FirstFactorial(6);
answers question: http://stackoverflow.com/q/28016084
downvote count: 0

http://stackoverflow.com/comment/44538721
comment on: http://stackoverflow.com/q/28079971
has text: I'd imagine you'd need to use a `try` with an `eval()` call and then `catch` the error from there, but thats really less than ideal.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28079993
has body: Okay, based on my comments above I ran the code below and things to stop as I think you want them to. Again, as I said in the comments, I would really investigate whether this is a good idea. Generally you want your tests to be idempotent such that any one failure does not affect any other test. Note that we have to set the reorder config option to false here, otherwise QUnit will attempt to run the previously failed test first to "short circuit" things, but you don't want that I'm guessing. I also added a "test0" just to see the fill effect. QUnit.config.reorder = false; // This is how we detect the failure and cancel the rest of the tests... QUnit.testDone(function(details) { console.log(details); if (details.name === 'test1' &amp;&amp; details.failed) { throw new Error('Cannot proceed because of failure in test1!'); } }); QUnit.test('test0', function(assert) { assert.equal(1,1); assert.equal(2,2); assert.equal(3,3); }); QUnit.test('test1', function(assert) { assert.equal(1,1); assert.equal(1,2); assert.equal(3,3); }); QUnit.test('test2', function(assert) { assert.equal(4,4); assert.equal(5,5); assert.equal(6,6); }); You won't get any visual feedback that the tests were canceled because this isn't really interacting with the QUnit UI. However, because we threw an Error object you can open the developer console and see the output there:
answers question: http://stackoverflow.com/q/28070469
score: 0
type: Answer

http://stackoverflow.com/a/28022911
score: 0
has comment: http://stackoverflow.com/comment/44461693
has body: Your XSL stylesheet has to be a well-formed XML document and a valid XSLT document. The &lt;xsl:text&gt; element cannot contain other elements(*) - and from the perspective of the XSL processor, &lt;iframe /&gt; is an element, it doesn't care that it sits in a JavaScript string, because the XSL processor simply doesn't know anything about JS. (*)The spec: http://www.w3.org/TR/xslt#element-text states that &lt;xsl:text&gt; may only contain #PCDATA. So your document might be well-formed XML, but it isn't valid XSLT. What you probably wanted to use is a CDATA section: &lt;xsl:template match="foo"&gt; &lt;script type="text/javascript"&gt;&lt;![CDATA[ function embeddedPreview(source) { if($("#embed").length &gt; 0) { //set the source to the location asked for $("#embed").attr("src", source); } else { //Create the embed iframe $("#preview-embed").append("&lt;iframe id='embed' src='"+source+"' width='100%' height='342px' style='border:none;'/&gt;"); } } ]]&gt;&lt;/script&gt; &lt;/xsl:template&gt; But what you actually should to do is move all JavaScript code to an external JS file. &lt;xsl:template match="foo"&gt; &lt;script type="text/javascript" src="preview.js"&gt;&lt;/script&gt; &lt;/xsl:template&gt;
type: Answer
has comment: http://stackoverflow.com/comment/44461556
has comment: http://stackoverflow.com/comment/44461731
has comment: http://stackoverflow.com/comment/44457876
answers question: http://stackoverflow.com/q/28020688

http://stackoverflow.com/q/28057640
has comment: http://stackoverflow.com/comment/44497321
has comment: http://stackoverflow.com/comment/44497487
answer count: 0
has comment: http://stackoverflow.com/comment/44497517
type: UnansweredQuestion
tagged with: authentication
type: Question
has comment: http://stackoverflow.com/comment/44497123
tagged with: c#
has comment: http://stackoverflow.com/comment/44497483
has title: JavaScript does not validate textbox
tagged with: javascript
score: 0
has body: As in the title , I made a login page in asp.net and want to check login and password checkbox . If textbox's will be empty , alert should popup , but nothing happens. Code of JS : And asp login page code : <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:Label ID="Label2" runat="server" Text="Login"></asp:Label> ;<asp:TextBox ID="tb_login" runat="server" CssClass="auto-style1" Width="180px"></asp:TextBox> <asp:Label ID="Label1" runat="server" Text="Password"></asp:Label> <asp:TextBox ID="tb_pwd" runat="server" TextMode="Password" Width="180px"></asp:TextBox> <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Overline="True" ForeColor="Red"></asp:Label> <asp:Button ID="btn_login" runat="server" OnClick="btn_login_Click" Text="Log In" OnClientClick="return log();" /> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Register.aspx">Register new account !</asp:HyperLink> </asp:Content>
has comment: http://stackoverflow.com/comment/44497280
has comment: http://stackoverflow.com/comment/44497303
has comment: http://stackoverflow.com/comment/44497992

http://stackoverflow.com/a/28027389
has comment: http://stackoverflow.com/comment/44442400
type: Answer
has body: If you declare myWalker inside if scope, it won't be visible for outer/global scope. Move declaration over this scope like here: var myWalker; if (document.createTreeWalker) { function myFilter(n) { return NodeFilter.FILTER_ACCEPT; } myWalker = document.createTreeWalker(document.documentElement,NodeFilter.SHOW_ALL,myFilter, false); } else alert("Error: Browser does not support DOM Traversal"); function update(currentElement) { window.document.testform.nodeName.value = currentElement.nodeName; window.document.testform.nodeType.value = currentElement.nodeType; window.document.testform.nodeValue.value = currentElement.nodeValue; }
answers question: http://stackoverflow.com/q/28027252
has comment: http://stackoverflow.com/comment/44440232
score: 0

http://stackoverflow.com/comment/44429387
has text: else you can create responsive class to adjust the height according to mobile size
comment on: http://stackoverflow.com/a/28021405
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28061742
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28061199
type: Answer
score: 3
upvote count: 3
has body: You can simply do this. ^\d+(?:[.,]\d+)*$ Try this.See demo. https://regex101.com/r/tX2bH4/61 var re = /^\d+(?:[.,]\d+)*$/gm; var str = '1234\n1,234\n1.234\n1,23,334\n1.23.334\n1,23,334.00\n1.23.334,00\n1,23...233\n1,23.'; var m; while ((m = re.exec(str)) != null) { if (m.index === re.lastIndex) { re.lastIndex++; } // View your result using the m-variable. // eg m[0] etc. }
has comment: http://stackoverflow.com/comment/78928273
answers question: http://stackoverflow.com/q/28061199

http://stackoverflow.com/q/28119444
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44613267
has title: Cookie value undefine in javascript
has comment: http://stackoverflow.com/comment/44613178
type: UnansweredQuestion
answer count: 0
tagged with: cookies
has body: I have created text input field where the user whatever types in is set as the cookie value. I created two functions Readcookie() and Writecookie();As the user clicks on the button, the consequent functions are triggered. While the Writecookie works fine but Readcookie() show the name as well as value of cookie as undefined. My code is as follows: &lt;script&gt; function WriteCookie() { if( document.myform.customer.value == "" ){ alert("Enter some value!"); return; } cookievalue= escape(document.myform.customer.value) + ";"; document.cookie="name=" + cookievalue; alert("Setting Cookies : " + "name=" + cookievalue ); } function ReadCookie(){ var allcookies=document.cookie; var cookiearray=allcookies.split(';'); for(i=0;i&lt;cookiearray.length;i++){ var name = cookiearray[i].split('=')[0]; var value = cookiearray[i].split('=')[1]; alert("Key is : " + name + " and Value is : " + value); } } &lt;/script&gt; &lt;form name="myform" action=""&gt; Enter name: &lt;input type="text" name="customer"/&gt; &lt;input type="button" value="write Cookie" onclick="WriteCookie()"/&gt; &lt;input type="button" value="read Cookie" onclick="ReadCookie()"/&gt; &lt;/form&gt;
type: Question
has comment: http://stackoverflow.com/comment/44702295

http://stackoverflow.com/comment/44433558
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28023121
type: Comment
has text: Hi..can we discuss it more on chat?sent you invite.

marker
tag name: marker
tags question: http://stackoverflow.com/q/28118460
type: Tag

http://stackoverflow.com/comment/44561831
comment on: http://stackoverflow.com/a/28092367
type: AnswerComment
type: Comment
score: 0
has text: when i click "Add" the drop down menu doesn't show up in the next listing...why's that?

http://stackoverflow.com/q/28093240
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/28093328
tagged with: php
type: AnsweredQuestion
has title: Twitter typeahead hidden field
score: 1
downvote count: 1
type: Question
has body: I am using twitter typeahead to suggest a list of books to users on a search page. It all works as expected however I would now like to add another value to a hidden field. Most of the tutorials I am looking at seem out dated. My html form is as follows; <form id="search" action="<?php echo URL; ?>books/itemView?id=" method="post"> I am able to retrieve a list of suggestions from my json file. I am also able to click one of these and select it. This places the id in my input field. I would also like to place the isbn in the hidden field, how is this possible. My JS is below; $(document).ready(function() { var url = 'http://localhost/logintest/'; var books = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('title'), queryTokenizer: Bloodhound.tokenizers.whitespace, limit: 3, prefetch: { url: url+'books.json', ttl: 0, filter: function(list) { return $.map(list, function(book) { return { id: book.id, title: book.title, author: book.author, isbn: book.isbn }; }); } } }); books.initialize(); $('.demo .typeahead').typeahead(null, { displayKey: 'id', // displays the id in search bar once selection made engine: Handlebars, templates: { header: ' Name ', empty: [ ' ', 'no results found', ' ' ].join('\n'), suggestion: Handlebars.compile( {{title}} }, engine: Handlebars, source: books.ttAdapter() }); });
tagged with: javascript
tagged with: jquery
upvote count: 2
tagged with: typeahead.js
accepted answer: http://stackoverflow.com/a/28093328

http://stackoverflow.com/comment/62473719
comment on: http://stackoverflow.com/a/31307350
type: AnswerComment
type: Comment
has text: @tdecs: Yes, you can; Jörg is mistaken. `let a = () => {};` defines a **named** arrow function called `a`. [Details](http://stackoverflow.com/a/37488652/157247).
score: 1

http://stackoverflow.com/comment/44336331
comment on: http://stackoverflow.com/q/27970971
score: 0
type: Comment
type: QuestionComment
has text: I think this is a bug. one difference i can see is ngModel priority was changed from 0 to 1 (1.2.x -> 1.3.x) and ng-options remains at a lower priority of 0. With the priority change, processing order of the directive will also get rearranged. Debugging into the core can probably tell us whats causing this issue.

http://stackoverflow.com/comment/44506997
comment on: http://stackoverflow.com/q/28062805
score: 0
type: Comment
type: QuestionComment
has text: ok, but what u have told has nothing to do with the problem above right?

http://stackoverflow.com/comment/44492169
has text: Sounds like the problem is all in backend
score: 0
comment on: http://stackoverflow.com/q/27971489
type: Comment
type: QuestionComment

jsf-2
tags question: http://stackoverflow.com/q/28066958
type: Tag
tags question: http://stackoverflow.com/q/27998432
tag name: jsf-2
tags question: http://stackoverflow.com/q/28078801
tags question: http://stackoverflow.com/q/28109265

http://stackoverflow.com/a/28122724
downvote count: 0
answers question: http://stackoverflow.com/q/28118901
has comment: http://stackoverflow.com/comment/44654609
has comment: http://stackoverflow.com/comment/44637467
has comment: http://stackoverflow.com/comment/44654945
type: Answer
has body: Generating the textareas in a foreach is not a problem and they don't need unique identifiers. I am not sure what: var wrappedProjects = proj.map(function (p) { return new Project(p); }); does but assuming it generates an array of Projects, the foreach is fine. I did notice not all of your textareas have value bindings which would cause them not to be populated with values. I did see this binding:$parent.saved_value. In this case $parent would be ViewModel and that is not defined. I was getting errors with the foreach until I changed the: &lt;textarea/&gt; to: &lt;textarea&gt;&lt;/textarea&gt; knockout was throwing an error stating the foreach was not closed. I suspect you are approaching this from a "jQuery mindset", because you do things like this: &lt;textarea class="form-control newSessionAnalyst" data-bind="textInput: doneProjectComment, attr: { id: guid, name: guid + 'doneProjectComment' }"/&gt; It looks to me like you're try to set unique IDs and names, in the hope of reading the val() of the input with jQuery when it's time to submit. While I don't know what your textInput binding is, it seems that doneProjectComment is not an observable on your Project data model, and thus the data entered in that &lt;textarea&gt; doesn't really end up anywhere. The Knockout way is to add a doneProjectComment observable on your Project, and bind to it with the value binding: &lt;textarea class="form-control newSessionAnalyst" data-bind="value: doneProjectComment"/&gt; function Project(proj) { self.doneProjectComment = ko.observable(); } Knockout gives you two-way bindings. In case of the value: doneProjectComment binding, this means that if the user types into the textarea, the value is saved into doneProjectComment. If doneProjectComment is changed, the new value is shown in the textarea. So if you want to gather all the data when the user clicks 'ok', you can do it easily from inside the Project - just read all the observables you care about, and create a hash that jQuery…
has comment: http://stackoverflow.com/comment/44653675
has comment: http://stackoverflow.com/comment/44654718
score: 1
has comment: http://stackoverflow.com/comment/44661760
upvote count: 1
has comment: http://stackoverflow.com/comment/44653480
has comment: http://stackoverflow.com/comment/44654839
has comment: http://stackoverflow.com/comment/44643475

http://stackoverflow.com/comment/44685101
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28139586
has text: IE9 not chunking the file... `chunk_size: '1mb' ` in php error log `PHP Warning: POST Content-Length of 23827605 bytes exceeds the limit of 5242880` in php.ini set `upload_max_filesize=5M` `post_max_size=5M`
score: 0

http://stackoverflow.com/comment/44564478
has text: I appreciate that. if I could give you both the answer point, I would. So here's an up vote!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28072173
type: AnswerComment

http://stackoverflow.com/a/28045925
has comment: http://stackoverflow.com/comment/44477798
has comment: http://stackoverflow.com/comment/44493232
answers question: http://stackoverflow.com/q/28045309
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/44480373
has comment: http://stackoverflow.com/comment/44503423
has body: Try using this code &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#member_registered, #per_member').on('input change',function(){ var mem = parseInt($('#member_registered').val()) || 0; var permem = parseInt($('#per_member').val()) || 0; $('#member_total_charges').val(mem * permem); }); $('#monthly_sessions, #per_session').on('input change',function(){ var month = parseInt($('#monthly_sessions').val()) || 0; var perses= parseInt($('#per_session').val()) || 0; $('#session_total_charges').val(month * perses); }); $('#member_total_charges, #session_total_charges').on('change',function(){ var memtc = parseInt($('#member_total_charges').val()) || 0; var sestc = parseInt($('#session_total_charges').val()) || 0; $('#total_dues').val(memtc + sestc); }); }); &lt;/script&gt; using the on() method will work better and you can use multiple arguments input, change, mouseover etc... So basicly if you want to change a dynamically added values select theri id'and call .on() method with the string of parameters that you need and then your statement, like you did for your previous elements. And if you have any troubles you can check this. I hope this was helpfull

http://stackoverflow.com/a/27991806
downvote count: 0
answers question: http://stackoverflow.com/q/27991766
accepted answer of: http://stackoverflow.com/q/27991766
has body: Length gives you the number of items, but the collection is zero based. So for example while the length may be three, you only loop to two (0, 1, 2). So change: x &lt;= qtyelements.length to: x &lt; qtyelements.length In your case it looks like you only have two elements, so the indices would be 0 and 1, but you check to see if 2 exists with the &lt;=, hence the undefined.
type: Answer
score: 2
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/28089150
has body: I am getting dusty html from back-end. (back-end converts the .doc to html)i would like to clear the tags. i used a each iterator, but i am not get the out put as like the expectation. 1) I am not able to put space between words (span has space in between) 2) I don't know to wrap the content in single strong element in case if this required here is my html : OUT D OOR COOLING OF AL GH A RAFFA SP ORTS CL U B FOR AS P IRE ZONE My try : $('p').children('strong').find('span').each(function () { $(this).contents().unwrap(); }); Note: I have no.of paragraphs in each pages. Live Demo UPDATE: Nearly i am expecting this output: OUTDOOR COOLING OF AL GHARAFFA SPORTS CLUB FOR ASPIRE ZONE
upvote count: 0
has comment: http://stackoverflow.com/comment/44555400
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/28089504
answer count: 3
has answer: http://stackoverflow.com/a/28089504
tagged with: http://stackoverflow.com/tag/html
has title: Facing `html` cleaning challenge using jQuery
tagged with: css
has answer: http://stackoverflow.com/a/28089535
has comment: http://stackoverflow.com/comment/44554946
has comment: http://stackoverflow.com/comment/44555382
has comment: http://stackoverflow.com/comment/44555308
has comment: http://stackoverflow.com/comment/44555415
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44555609
score: -1
has answer: http://stackoverflow.com/a/28089903
type: Question
accepted answer: http://stackoverflow.com/a/28089535

http://stackoverflow.com/a/28083795
has body: This seems to be a known bug: https://code.google.com/p/chromium/issues/detail?id=439832
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27986868
type: Answer
accepted answer of: http://stackoverflow.com/q/27986868
has comment: http://stackoverflow.com/comment/44571419
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/58429269

http://stackoverflow.com/q/28093480
has answer: http://stackoverflow.com/a/28094818
has answer: http://stackoverflow.com/a/28094576
favorite count: 0
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/11947094
score: 2
type: AnsweredQuestion
has body: I have a html table with a row that looks like: 265 NO MATCH http://stackoverflow.com/ No 0 f79a8316891 I am trying to build a jquery function that will open up a bootstrap 2.32 popover if I pass it over a URL in table cell. So far I have: $("[data-bind='popover']").popover({ trigger: 'hover', html: true, content: function(){ return $(this).data('content'); } }); $('td').on('mouseover', function(e) { var contents = $( this ).html() ; if (contents.match("^http")) { console.log(contents); this.innerHTML = ' link '; console.log(this.innerHTML); } }); The popover portion of this is based on http://jsfiddle.net/8DP4T/1/ When I mouseover a url in the table it forms a popover link as expected. However as I hold the mouse over it no popup occurs as far as I can see. The code does work , but it is not triggering the popover. Interestingly , I have also placed Brick below my table and this is working with a popover created. I'm wondering if this behavior has something to do with the order of operations because the popover link is created dynamically after the DOM is already set. Can someone advise me here?
accepted answer: http://stackoverflow.com/a/28094818
upvote count: 3
has title: How to trigger a bootstrap popover on mouseover event
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44682100
tagged with: jquery
has comment: http://stackoverflow.com/comment/44565123
answer count: 2
has comment: http://stackoverflow.com/comment/44564054
possible better answer: http://stackoverflow.com/a/28094576

http://stackoverflow.com/a/28099030
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/61026405
upvote count: 2
has comment: http://stackoverflow.com/comment/60978718
has body: Imagine you want in wide mode: 3 offsets + 6 units + new line Then in medium: 2 offsets + 8 units + new line And in small: 12 units: You will write:
type: Answer
answers question: http://stackoverflow.com/q/28095719
has comment: http://stackoverflow.com/comment/61026022
accepted answer of: http://stackoverflow.com/q/28095719
type: AcceptedAnswer

http://stackoverflow.com/q/27973380
has answer: http://stackoverflow.com/a/27973613
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44339514
answer count: 4
accepted answer: http://stackoverflow.com/a/27973784
favorite count: 0
possible better answer: http://stackoverflow.com/a/27973613
has comment: http://stackoverflow.com/comment/44339822
tagged with: twitter-bootstrap
downvote count: 2
has comment: http://stackoverflow.com/comment/44340891
has comment: http://stackoverflow.com/comment/44339846
has title: How to get all data-* attributes by Prefix
type: AnsweredQuestion
upvote count: 7
has body: I have a tag like this: Link When I click this link, I have a function like this $('#ssd').click(function (event) { var customData; // Code to get all the custom data in format like data-info* }); Note, the data-info* like attributes could be any number, that means you could see 1 one of them, named data-info1, or there of them, named data-info1, data-info2, data-info3. How would I do that, I looked up the JQuery selectors, something like Attribute Starts With Selector [name^="value"] won't work because the variation here is on name... If I console.log($('#ssd').data()); I will get an object with extra attributes that I don't need, toggle: "popover", bs.popover: Popover Any suggestions? This is what I did: dataFullList = $(this).data(); $.each(dataFullList, function (index, value) { if (index !== "toggle" && index !== "bs.popover") { item.name = value.split(":")[0]; item.number = value.split(":")[1]; dataIWant.push(item); } }); So I will get a dataIWant array without stuff I don't need.
has answer: http://stackoverflow.com/a/56443041
type: Question
has answer: http://stackoverflow.com/a/27973784
score: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/27973737
tagged with: jquery

http://stackoverflow.com/a/28018986
downvote count: 0
has body: in js 1.6 you can use the filter function like so: var result = arr.filter(function(o){return o.type == 1}) ...instead of creating and pushing to a new array inside a for loop technically both of them do the same thing, but filter is elegant as it abstracts the ugliness
answers question: http://stackoverflow.com/q/28018958
score: 1
upvote count: 1
type: Answer

http://stackoverflow.com/a/28079149
type: Answer
has body: I got it to work. Following is the code. $(document).ready(function() { $(window).resize(); $( "#filterOpen" ).click(function() { $( "#mobileFilter" ).dialog( "open" ); }); }); $(window).resize(function() { if ($(window).width() &gt; 480) { $( ".ui-dialog" ).dialog().remove(); }else if ($(window).width() &lt; 480) { $("#mobileFilter").dialog({ autoOpen: false, dialogClass: "test", modal: false, responsive: true }); } });
score: 0
answers question: http://stackoverflow.com/q/28078923

http://stackoverflow.com/a/28031965
type: Answer
has comment: http://stackoverflow.com/comment/44448770
score: 0
has comment: http://stackoverflow.com/comment/44449794
has comment: http://stackoverflow.com/comment/44448992
has body: You could take the approach of defining an method in the controller to get you the range corresponding to the currently selected brand. This may be an approximation to get you going in the right direction: $scope.getCurrentBrandRanges = function() { for (var i=0;i &lt; $scope.formData.brandData.length;i++) { if ($scope.formData.brandData[i].brandName == $scope.formData.currentBrand) return $scope.formData.brandData[i].ranges; } return []; // In case nothing matches for some reason. } And for the ng-repeat directive you can specify something like: ng-repeat="range in getCurrentBrandRanges()"
answers question: http://stackoverflow.com/q/28031706

http://stackoverflow.com/comment/44533480
comment on: http://stackoverflow.com/a/28077282
score: 0
has text: MDN link is to a different API see https://developer.mozilla.org/en-US/docs/Web/API/Location Main issue is most likely trying to use `documetn` instead of `window`
type: Comment
type: AnswerComment

http://stackoverflow.com/q/28117261
score: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28117293
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/28117293
has title: Getting a value from a AngularJS Promise in MeanJS
favorite count: 0
tagged with: meanjs
tagged with: angularjs
tagged with: angular-promise
type: AnsweredQuestion
has body: I'm playing around with MeanJS recently and I ran into an issue that I'm not well versed in so I'm hoping someone can help here. I have a angular controller that sets it scope like this: // Find existing Topic $scope.findOne = function() { $scope.topic = Topics.get({ topicId: $stateParams.topicId }); }; I this sets the topic in the $scope. However, I also need to get a value off of the topic as well. Lets assume it is a date such as createdAt. I need to get this value and then perform another operation on it in order to set another scope value. The problem is, the $scope.topic object is an Angular promise. How can I get the value createdAt (which is a Date) off of that promise?
downvote count: 0

http://stackoverflow.com/a/28069496
has body: Based on my own further investigations, I have found that upgrading to CKEditor 4.4.6 resolves the issue. I must assume that a bug in the earlier version has been fixed at some point between 4.1.2 and 4.4.6. Note - This may be the preferred solution for many. However, the answer from @Nenotlep works for this version of CKEditor, so I'm accepting that and also creating this answer for additional information.
type: Answer
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/28067007

http://stackoverflow.com/comment/44384001
has text: Then better sending directly the link to the document, don't think so?
type: Comment
comment on: http://stackoverflow.com/a/27989107
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44494087
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28055188
has text: Eh, I'd have written something similar to Alexis's answer below (I'd probably add a `previewImage` parameter to `readURL()` and pass that in...) Just go vote for that. :-)
score: 0

http://stackoverflow.com/comment/44414712
comment on: http://stackoverflow.com/a/28013514
has text: I am on io.js and V8 and ES6 classes are not implemented yet. So the bottom line is that with `method2` define via prototype I need `bind` to access proper `this`
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/28018116
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/57602358
favorite count: 0
has title: How to create a javascript slider with divs instead of images
type: UnansweredQuestion
downvote count: 1
has body: So as the title suggests i need my slider to slide divs instead of images, how can i do that? I tried googling but all i could find was a bunch of jQuery tutorials. This is my html &lt;div id="slider"&gt; &lt;img src="1.jpg" name="slide"&gt; &lt;input type="button" value="previous" onClick="prev();"&gt; &lt;input type="button" value="next" onClick="next();"&gt; &lt;/div&gt; And Javascript var show = new Array(3); show[0] = new Image; show[0].src = "0.jpg"; show[1] = new Image; show[1].src = "1.jpg"; show[2] = new Image; show[2].src = "2.jpg"; show[3] = new Image; show[3].src = "3.jpg"; var n=0; function next(){ n++; if(n &gt; 2){ n=0; } document.slide.src = show[n].src; } function prev(){ n--; if(n &lt; 0){ n=2; } document.slide.src = show[n].src; }
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/28018200
upvote count: 0
tagged with: javascript
score: -1
tagged with: slider

http://stackoverflow.com/q/28118946
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44612458
has comment: http://stackoverflow.com/comment/44613226
has body: I use the below code t.executeSql('SELECT buildingcode, flatname, flatdescription FROM buildingflats WHERE buildingcode = ? ORDER BY flatname ASC',[buildingcode], function(t, resultflatcomment) { var j, lenflatcomments = resultflatcomment.rows.length, rowflatcomments, row; if (lenflatcomments &gt; 0 ) { for (j = 0; j &lt; lenflatcomments; j += 1) { rowflatcomments = resultflatcomment.rows.item(j); alert(rowflatcomments.flatname); t.executeSql('SELECT DISTINCT flatdescription, flatname, buildingcode FROM bill WHERE buildingcode = ? AND flatdescription = ?',[buildingcode, rowflatcomments.flatname], function(t, resultflat) { var len = resultflat.rows.length; if (len &gt; 0) { row = resultflat.rows.item(0); alert(row.flatdescription); } else { alert(rowflatcomments.flatname); } $("#opt2").selectmenu('refresh'); }); } } }); but the alert(rowflatcomments.flatname); is executed before SQLite selection inside the loop. The rowflatcomments.flatname is always the last selection of buildingflats. How can I fix it??
has comment: http://stackoverflow.com/comment/44612955
has comment: http://stackoverflow.com/comment/44613273
has title: Javascript loop with sqlite code
tagged with: loops
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44620320
has comment: http://stackoverflow.com/comment/44612919
tagged with: sqlite
has comment: http://stackoverflow.com/comment/44613472
answer count: 0
has comment: http://stackoverflow.com/comment/44612568

http://stackoverflow.com/q/28086414
type: Question
tagged with: dynamics-crm-2011
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/28097833
accepted answer: http://stackoverflow.com/a/28097833
tagged with: javascript
tagged with: bing-maps
favorite count: 0
has title: How to surpass Bing Map 25 waypoint limit?
has body: I am using Bing Map API with Dynamic CRM 2013 Online. My custom javascript gets all the records from the entity (currently 50 for testing) and create a route from them and show pushpins on the Bing Map (being rendered in an HTML web resource). The issue is that Bing Map can show only 25 waypoints at a time. Is there a way to bypass this limit of 25 waypoints in Bing Map?
upvote count: 1
tagged with: dynamics-crm
type: AnsweredQuestion
score: 1

dayofweek
type: Tag
tags question: http://stackoverflow.com/q/28091718
tag name: dayofweek

http://stackoverflow.com/a/27984851
has body: Since you are using window.location.pathname i assume that you are in a browser and want to use that code to "navigate" to files on the server based on the URL path. I think your whole approach is wrong, and it would be a security issue to have something like that possible. The File API can be used strictly on files selected by the user, and not on any file. The MDN description is self-explanatory: Using the File API, which was added to the DOM in HTML5, it's now possible for web content to ask the user to select local files, then read the contents of those files. This selection can be done by either using an HTML element, or by drag and drop. Yes, you can specify a path to any file in the File constructor method, but that doesn't mean you can access any file. Another excerpt from MDN: This only works from privileged code, so web content can't do it. This protects users from the inherent security risks associated with allowing web content free access to the contents of their disks. If you pass a path to the File constructor from unprivileged code (such as web content), an exception will be thrown.
has comment: http://stackoverflow.com/comment/44658963
type: Answer
answers question: http://stackoverflow.com/q/27982199
has comment: http://stackoverflow.com/comment/44661980
has comment: http://stackoverflow.com/comment/44683424
score: 0

http://stackoverflow.com/comment/44545707
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28082787
has text: press f12 you get console and theis is a network tab in it open it refresh the page and send your call you see the response of your call in that panal.
type: AnswerComment

http://stackoverflow.com/a/28014267
answers question: http://stackoverflow.com/q/28014230
has body: Change: $('#tabs ' + attrValue).show().siblings().hide(); to $(attrValue).show().siblings().hide(); You already capture the ID in attrValue, so no need to append anything to #tabs. jsFiddle
type: Answer
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/comment/44512177
comment on: http://stackoverflow.com/q/28065882
score: 0
type: Comment
type: QuestionComment
has text: It might not directly related with your problem but the varibale j is always: j+1 == images when the callback is called. Try an IIFE around window.resolveLocalFileSystemURI to pass image and j. example: (function(img, index){ window.resolveLocalFileSystemURI ..... })(image, j);

http://stackoverflow.com/a/28012676
answers question: http://stackoverflow.com/q/28012614
score: 0
has body: Using jQuery: The .html() method gives you the HTML contents (see doc page). Use it as follows: console.log("ID: " + $("div.elementa").html()) If you just want the text contents, use the .text() method (see doc page): console.log("ID: " + $("div.elementa").text())
type: Answer

http://stackoverflow.com/comment/44360305
comment on: http://stackoverflow.com/a/27983563
score: 0
type: AnswerComment
has text: Added a line: "imgArray[$i].index = $i;" and modified the buggy line
type: Comment

http://stackoverflow.com/a/27978167
type: AcceptedAnswer
has body: setInterval returns an id that can then be passed to clearInterval which will stop the execution. So you can have a function to start the execution, and another to stop it. Something like this: var intervalId; function startExecution() { intervalId = setInterval(function(){ //do stuff },1000); } function stopExecution() { clearInterval(intervalId); intervalId = 0; } Then you can bind an event listener to your button to toggle: $('.button').click(function() { if (!!intervalId) { // If there is a truthy (non-zero) intervalId, start execution startExecution(); } else { stopExecution(); } })
type: Answer
answers question: http://stackoverflow.com/q/27978093
accepted answer of: http://stackoverflow.com/q/27978093
score: 0

http://stackoverflow.com/comment/44448770
score: 0
type: AnswerComment
type: Comment
has text: `getCurrectBrandRanges()` would execute on each digest - which could be costly. It'd be better to assign the result to a scope property and then ng-repeat over that instead.
comment on: http://stackoverflow.com/a/28031965

http://stackoverflow.com/comment/44374895
type: Comment
score: 0
has text: simple: you cannot. there is no event, changed property, or call to make that would yield this information. you need to use the backend to watch for failed downloads, and push a warning out to the client if that occurs. that's likely more trouble than it's worth for a small UX improvement.
type: QuestionComment
comment on: http://stackoverflow.com/q/27991634

netsuite
tags question: http://stackoverflow.com/q/27993607
tag name: netsuite
type: Tag
tags question: http://stackoverflow.com/q/28099639

http://stackoverflow.com/comment/44556430
type: AnswerComment
type: Comment
has text: I'm getting `XMLHttpRequest cannot load http://MYURL/test.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://asite.local:8080' is therefore not allowed access.` now. But I've set `access-control-allow-origin` in `htaccess` and in the `php` file..
score: 0
comment on: http://stackoverflow.com/a/28089897

http://stackoverflow.com/a/27999962
score: 0
has body: I found an answer to my problem: Using one of the possible date strings on the momentJS site will still create the date as 3rd march 2015 but internally due to _i "2015 2 31" the isValid returns false just what I needed!
type: Answer
answers question: http://stackoverflow.com/q/27993134

http://stackoverflow.com/comment/44509567
type: Comment
comment on: http://stackoverflow.com/q/28064397
type: QuestionComment
has text: `document.getElementById()` take a string as an argument. Try to change `document.getElementById(count)` to `document.getElementById(count.toString())` Or create new variable `var countString = count.toString()`
score: 0

http://stackoverflow.com/q/27981490
has answer: http://stackoverflow.com/a/27981755
answer count: 4
has answer: http://stackoverflow.com/a/27981514
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27981594
has comment: http://stackoverflow.com/comment/44354548
has answer: http://stackoverflow.com/a/27981594
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/44355622
has title: Javascript array iteration
has comment: http://stackoverflow.com/comment/44356623
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44354514
has answer: http://stackoverflow.com/a/27981601
accepted answer: http://stackoverflow.com/a/27981514
score: 0
has body: I have a JavaScript array in sessionStorage and when I do a sessionStorage.getitem('states'), I am getting like this: "{ "TamilNadu": [ "Chennai", "Trichy", "Madurai" ], "Andhra": [ "Hyderabad", "Vizhag" ], "Karnataka": [ "Bangalore", "Mysore", "Darwad" ], "Maharashtra": [ "Mumbai", "Pune" ] }" Now my requirement is to get the state name from the city name. For example if I pass "Mumbai" to a function as a parameter, that function should read this sessionstorage value and return me "Maharashtra". Could you please help me how to achieve this?
tagged with: sessionstorage

http://stackoverflow.com/q/28029625
has title: How do I sort the values in a single table row? (i.e. sort horizontally)
favorite count: 0
has body: The question is simple but for some reason, wasn't so simple for me finding an answer. All I want to do is sort the cells of a table row - for lack of a better description - 'horizontally', not 'vertically'. Everything I've found so far deals with sorting individual columns or sorting based on column headers etc. There are no headers, just a simple table such as this. Sample-N Sample-W Sample-A Sample-K Sample-S Sample-U Sample-J Sample-M Sample-O Sample-E Sample-L Sample-B Then after sorting, it should appear like this: Sample-A Sample-K Sample-N Sample-W Sample-J Sample-M Sample-S Sample-U Sample-B Sample-E Sample-L Sample-O If an answer already exists (preferably using jQuery), can someone please point me in the right direction? Because I can't find it. Even the tablesorter plug-in only seems to sort individual columns.
has comment: http://stackoverflow.com/comment/44444481
has comment: http://stackoverflow.com/comment/44444266
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44444649
score: 1
type: Question
has answer: http://stackoverflow.com/a/28029785
accepted answer: http://stackoverflow.com/a/28029785
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/28039741
score: 0
linked to: http://stackoverflow.com/q/721304
answer count: 1
has title: Chrome told 'Invaild Group' using Regex to format number
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44463612
type: Question
has body: I tried to turn number like "123456" into "123,456". My original code is number.replace(/(?=(?:\d{3})+(?!\d))/g,',') It works fine when the size of number isn't a multiple of three. So I tried to add (?&lt;=\d) to make sure the comma wouldn't be added at the begin.But chrome said it's a invalid regular expression number.replace(/(?=(?&lt;=\d)(?:\d{3})+(?!\d))/g,',') So what is the correct expression to format the number? UPDATE ： Solved the comma's issue. But still I don't understand why the expression would throw error.Those brackets are paired. var number = "123456"; number = number.replace(/(?=(?&lt;=\d)(?:\d{3})+(?!\d))/g,',') `
duplicate of: http://stackoverflow.com/q/721304
tagged with: javascript
linked to: http://stackoverflow.com/q/149055
has answer: http://stackoverflow.com/a/28039858
accepted answer: http://stackoverflow.com/a/28039858

http://stackoverflow.com/q/27983248
accepted answer: http://stackoverflow.com/a/28026926
tagged with: momentjs
score: -1
type: AnsweredQuestion
has body: I have some data which is coming from elasticsearch which has task's start &amp; end time for a particular agent's task which needs to be plotted on chart horizontally indicating start and endtime of that particular task. I tried with columnrange chart type but in that I was not able to get to and from range selector, see here an example. Then again I tried this and I was able to get it working, but need help in plotting the Elasticsearch data in highcharts. One other problem is that the date which I get from server is in a human readable dateformat (check start_time and end_time), EST timezone and needs to be converted to a format which can be consumed by highcharts. Please help. My highcharts directive angular.module('myApp').directive('operationalhighstackstock', function() { return { restrict : 'E', scope : true, link : function postLink(scope, element, attrs) { scope.$watch('operationHighChartsData', function(values){ new Highcharts.StockChart(values); }); } }; }); My template &lt;div style="width: 100%;"&gt; &lt;operationalhighstackstock&gt;&lt;/operationalhighstackstock&gt; &lt;div id="container" style="width: 100%; height: 500px;"&gt;&lt;/div&gt; &lt;/div&gt; My controller angular.module('myApp').controller('OperationReportChartController', function($scope, $filter, $location, $transition, MyService, $timeout) { $scope.init = function() { $scope.isOperationalReport = true; $scope.initOperationalReport(); } $scope.initOperationalReport = function() { $scope.loading = true; $scope.isChartDataAvailable = true; $scope.operationReportDefaultQuery = operationReportDefaultQuery; $scope.operationHighChartsData = { chart : { renderTo : 'container', alignTicks : false } }; $scope.operationalReportDefaultServiceRequests(); } $scope.serviceRequests = function() { //Common service requests if any } $scope.operationalReportDefaultServiceRequests = function() { $scope.isOperationalReport = true; MyService.getOperationalReportChartData($scope.operationReportDefaultQuery).th…
has title: Need help in plotting a chart using highcharts in angularjs
downvote count: 1
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28020820
has answer: http://stackoverflow.com/a/28020820
answer count: 2
upvote count: 0
tagged with: highcharts
favorite count: 0
has answer: http://stackoverflow.com/a/28026926
tagged with: angularjs

http://stackoverflow.com/q/28013769
upvote count: 1
possible better answer: http://stackoverflow.com/a/28014318
has answer: http://stackoverflow.com/a/28014318
favorite count: 0
tagged with: ajax
has title: How do I send a object using JavaScript to Spring Controller using json
accepted answer: http://stackoverflow.com/a/28060301
tagged with: spring-mvc
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I am making simple Spring MVC web application. In my application I want to send a object from front end to Spring controller method. But when I do this I am getting js error 500 (Internal Server Error) I tried to find a good answer in internet but still could not find a good one. My controller method is @RequestMapping(value = "/add", method = RequestMethod.GET, consumes = { MediaType.APPLICATION_JSON_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE }) public @ResponseBody String addInventory(@RequestBody InventoryAddParam inventoryAddParam) { log.info("addInventory"); ServiceRequest&lt;InventoryAddParam&gt; serviceRequest = convertAddParamtoServiceRequest(inventoryAddParam); validate(inventoryAddParam); inventoryService.addInventory(serviceRequest); return "Inventory Added Succesfully"; } inventoryAddParam is a Serializable object that contain only String parameters. My JavaScript function to send object is function sendDataTest() { $.ajax({ url : "/GradleSpringMVC/inventory/add", type : 'GET', dataType : 'json', data : JSON.stringify(populateTestObject()), contentType : 'application/json', mimeType : 'application/json' }).done(function(data) { // temGrid.addJSONData(data); }).fail(function(error) { // parseToPageAlerts(error.responseText); }).always(function() { // hideLoading() });} I am creating the addParam object to send as ajax call. It create in function function populateTestObject(){ var addParam = new InventoryAddParam(); addParam.inventoryId = "INV001"; addParam.name = "ECG MACHINE"; addParam.price = "1000"; addParam.hospital = "Colombo"; addParam.userNote = "User Note"; return addParam;} Do I have done any wrong thing here ? Other details about the error Remote Address:127.0.0.1:8080 Request URL:http://localhost:8080/GradleSpringMVC/inventory/add Request Method:POST Status Code:500 Internal Server Error Header Connection:close Content-Language:en Content-Length:4939 Content-Type:text/html;charset=utf-8 Date:Wed, 21 Jan 2015 03:55:19 GMT Server:Apac…
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/28060301
type: Question
has comment: http://stackoverflow.com/comment/44471980
tagged with: javascript
tagged with: jquery
answer count: 2

http://stackoverflow.com/a/28046617
type: Answer
has comment: http://stackoverflow.com/comment/44476356
score: 3
has comment: http://stackoverflow.com/comment/44475623
upvote count: 3
has comment: http://stackoverflow.com/comment/44475652
has body: Check if the number of total groups match the number of groups that contain a checked radio button, if so, all groups have been selected $('.radioGroup').length === $('.radioGroup:has(input:checked)').length
has comment: http://stackoverflow.com/comment/44476103
accepted answer of: http://stackoverflow.com/q/28046572
has comment: http://stackoverflow.com/comment/44475590
answers question: http://stackoverflow.com/q/28046572
has comment: http://stackoverflow.com/comment/44475584
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44475649
has comment: http://stackoverflow.com/comment/44475601
has comment: http://stackoverflow.com/comment/44475550

http://stackoverflow.com/q/28097684
answer count: 1
has title: Grab FindUploader object from UI element
has body: I initialize a UI element with FineUploader, however I dont have a good way to keep a reference. I want to update say something like the URL being used by it, but how can I do this from grabbing the element again like below? It should just update the option and not the entire uploader again. $(element).fineUploader({ url: 'oldUrl']); $(element).fineUploader({ url: 'newurl']); // &lt;--- Possible?
has comment: http://stackoverflow.com/comment/44571915
type: AnsweredQuestion
tagged with: fine-uploader
has answer: http://stackoverflow.com/a/28098359
type: Question
has comment: http://stackoverflow.com/comment/44572139
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28098359
score: 0

http://stackoverflow.com/comment/44426481
comment on: http://stackoverflow.com/a/28019147
type: Comment
has text: hey.thanks for the answer.The model is showing..but its not loading the content of the relevent link. Its just showing a blank modal..I want the modal to load the content from the remote url that is provided in the a tags within the html..how do i do that ?
type: AnswerComment
score: 0

http://stackoverflow.com/a/28119400
type: Answer
upvote count: 1
has body: .data is a jQuery method, wrap this in jQuery console.log($(this).data('style')); //this.getAttribute("data-style")
answers question: http://stackoverflow.com/q/28119389
downvote count: 0
score: 1

http://stackoverflow.com/q/28080546
accepted answer: http://stackoverflow.com/a/28080892
type: AnsweredQuestion
tagged with: javascript
type: Question
score: 0
tagged with: mongodb
linked to: http://stackoverflow.com/q/28049610
answer count: 1
has title: Merge collections to get average rating, but still get all of original collection before a rating has been given. Mongoose / nodejs
tagged with: mongoose
has comment: http://stackoverflow.com/comment/44540028
has comment: http://stackoverflow.com/comment/44539790
has comment: http://stackoverflow.com/comment/44573938
has comment: http://stackoverflow.com/comment/44539915
has body: I have an admin that creates an item (a bourbon), that users can give a comment on and rating within that comment. I was able to aggregate the comments, but was not able to display newly-created bourbons, only those already seeded that already had ratings. i've tried to implement something similar to this thread: referenced thread, but i'm am not doing something correct. I'm a noob, and mainly play in the frontend, and am very confused about how I should change this sample code into actual production code. I see what each function is doing, but still fuzzy on it. Should I do an async.each and set the aggregate function as the iterator..? I know this is busted. I've tried a few things now. Keep getting a 500 error, nothing on the console.log. Any help for this noob, much appreciated. Here are my schemas: bourbon: 'use strict'; var mongoose = require('mongoose'), BourbonSchema = null; module.exports = mongoose.model('Bourbon', { name: {type: String, required: true}, blog: {type: String, required: true}, photo: {type: String, required: true, default:'http://aries-wineny.com/wp-content/uploads/2014/09/woodford-reserve.jpg'}, location: {type: String, required: true}, distillery: {type: String, required: true}, avgRating: {type: Number} }); var Bourbon = mongoose.model('Bourbon', BourbonSchema); module.exports = Bourbon; comments: 'use strict'; var mongoose = require('mongoose'); module.exports = mongoose.model('Comment', { bourbonId: {type: mongoose.Schema.ObjectId, ref: 'Bourbon'}, userId: {type: mongoose.Schema.ObjectId, ref: 'User'}, text: {type: String, required: true}, createdAt: {type: Date, required: true, default: Date.now}, rating : {type: Number, required: true}, votes: {type: Number, default: 0} }); this is my find / get in the controller, which I tried piecing together from the referenced link, but is slopp now: 'use strict'; var Bourbon = require('../../../models/bourbon'), Comment = require('../../../models/comment'), DataStore = require('nedb'), db = new D…
linked to: http://stackoverflow.com/q/28116054
tagged with: node.js
has answer: http://stackoverflow.com/a/28080892

http://stackoverflow.com/a/28107408
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28105393
has body: Did you try aws-sdk? It is node library for working with AWS. It is well documanted, have a lot of code snippets and helps to work with Amazon S3.

http://stackoverflow.com/comment/44534461
comment on: http://stackoverflow.com/q/28077378
score: 1
type: Comment
type: QuestionComment
has text: if `$scope.sports` is array, `$scope.sports.leagues` should be undefined

http://stackoverflow.com/a/29021764
downvote count: 0
has body: I also had this same error and similar to the comment from @ChanX I had an error in an ng-controller attribute. In my case, I had accidentally added a name of a css class that I had intended to put in the class attribute to the ng-controller attribute by mistake. My hypothesis is that you might see this error any time there is a problem parsing an ng-controller attribute. Anyway, I sure am glad I found this on SO as it was a real head-scratcher. Would be nice if the error message was more informative.
type: Answer
upvote count: 9
answers question: http://stackoverflow.com/q/28040176
score: 9

http://stackoverflow.com/comment/44355776
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27982140
has text: @DavidThomas edit doesn't match the original code...
type: Comment

http://stackoverflow.com/comment/44552362
comment on: http://stackoverflow.com/q/28087293
type: Comment
score: 0
has text: @Pete ?? I forgot to reference you while adding my comment
type: QuestionComment

http://stackoverflow.com/comment/44407928
type: AnswerComment
score: 1
type: Comment
has text: That's kind of a fix… Object.create(…) copies all properties from the Animals prototype to FastAnimals one and that includes the constructor, so you one need to fix it.
comment on: http://stackoverflow.com/a/28009975

http://stackoverflow.com/comment/44374708
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27991754
score: 0
has text: The body of `loadPersons` function in javascript is very confusing.

http://stackoverflow.com/a/28099490
downvote count: 0
answers question: http://stackoverflow.com/q/28099051
has comment: http://stackoverflow.com/comment/48511612
has body: What you basically have to do to generate two dates: date at 0:0:0 time date+1day at 0:0:0 time Then search for: query.greaterThanOrEqualTo('createdAt', date); query.lessThan('createdAt', datePlusOne); This effectively gives you the range of dateT0:0:0 - dateT23:59:59.99999 inclusive, but in a safe way If you want to use pure JavaScript: // assuming date is the date/time to start from date.setHours(0, 0, 0, 0); // hours/min/sec/ms cleared var datePlusOne = new Date(date); datePlusOne.setDate(datePlusOne.getDate() + 1); You can also use the moment library to make your code easier to read/maintain. This library is also used server-side in parse.com, though it is an older version. m1 = new moment(date); m1.startOf('day'); m2 = new moment(m1); m2.add(1, 'day'); // convert moment back to JavaScript dates date = m1.toDate(); var datePlusOne = m2.toDate(); Full solution using moments: var d = new Date(); var query = new Parse.Query("TableName"); var start = new moment(d); start.startOf('day'); // from the start of the date (inclusive) query.greaterThanOrEqualTo('createdAt', start.toDate()); var finish = new moment(start); finish.add(1, 'day'); // till the start of tomorrow (non-inclusive) query.lessThan('createdAt', finish.toDate()); query.find.then(function(results) { // use results });
has comment: http://stackoverflow.com/comment/44751564
has comment: http://stackoverflow.com/comment/46013293
type: Answer
score: 29
upvote count: 29
accepted answer of: http://stackoverflow.com/q/28099051
type: AcceptedAnswer

http://stackoverflow.com/q/27987468
tagged with: grails
tagged with: groovy
favorite count: 0
upvote count: 5
has answer: http://stackoverflow.com/a/33782636
has answer: http://stackoverflow.com/a/27988254
has answer: http://stackoverflow.com/a/35850765
accepted answer: http://stackoverflow.com/a/27988254
answer count: 4
tagged with: asset-pipeline
has title: Put JavaScript at the Bottom with Grails Asset-Pipeline
type: AnsweredQuestion
downvote count: 1
has body: With the Grails Resource plugin you can use a gsp layout like this: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;g:layoutHead/&gt; &lt;r:layoutResources /&gt; &lt;/head&gt; &lt;body&gt; &lt;g:layoutBody/&gt; &lt;g:javascript library="jquery" plugin="jquery" /&gt; &lt;r:layoutResources /&gt; &lt;/body&gt; Using the r:layoutResources tag you can specify that resources should be included at the bottom of the page after the JQuery, which is at the bottom of the layout gsp. Is there a way to do the same with the asset-pipeline plugin? How can I put resources at the bottom of the document event after the JQuery include?
type: Question
has answer: http://stackoverflow.com/a/45332090
tagged with: grails-2.0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/35850765
score: 4

http://stackoverflow.com/comment/44446737
has text: thanks for the answer. This is one way to do it (and pretty much what I asked for), but after discussing with my buddy, I realize that my approach to the problem was all wrong. Consider the answer below which hopefully illustrates the 'Thinking in React' way to do it.
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/28000238

http://stackoverflow.com/a/28118923
type: Answer
has comment: http://stackoverflow.com/comment/44631919
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44623545
has body: It is processed just fine, however most likely your code inside the catch handler had a bug and threw an error. I suggest you read the printed unhandled error more carefully to see what it is. The equivalent synchronous code would behave same way: try { throw new Error("test"); } catch (e) { causesUnhandledReferenceError; } If you wanted to catch that error (You certainly don't, just for exercise) you would need another try catch: try { throw new Error("test"); } catch (e) { try { doesntCauseUnhandledReferenceError; } catch (e) { // logs reference error console.log(e) } } Similarly with promises: getData().then(function() { }).catch(function(e) { doesntCauseUnhandledReferenceError; }).catch(function(e) { // logs reference error console.log(e) });
accepted answer of: http://stackoverflow.com/q/28117851
has comment: http://stackoverflow.com/comment/44612992
answers question: http://stackoverflow.com/q/28117851
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44626334

http://stackoverflow.com/comment/44479025
type: Comment
has text: I updated the example with a popup. the point of the pseudoelement is to apply some style not to the body, but instead on a layer that overlaps the body itself. From a visual point of view the basic effect is the same, but what if your body has already a background applied? Another difference is when your body has a scrollbar. If you apply that class on body the scrollbar disappears and the page "jumps" on top
comment on: http://stackoverflow.com/a/27965059
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44371135
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27972593
type: Comment
has text: Thanks for the jsfiddle... I wouldn't have believed you otherwise. It looks like the behavior changed somewhere between Ember 1.7.1 (which is what I'm running) and the latest version. Ember 1.7.1 insists that `this.constructor.superclass` is the same as `this.constructor`! http://jsfiddle.net/99gvpqzx/2/

http://stackoverflow.com/q/28019105
type: AnsweredQuestion
has body: I am trying to utilize grunt-wiredep to automatically inject any bower components into my html. Pretty straight forward but I am not sure how to set the correct path to the bower directory when running local host. At the moment I get the following error: http://localhost:9000/bower_components/jquery/dist/jquery.js Failed to load resource: the server responded with a status of 404 (Not Found) This is my structure project app (contains sass, js, html etc...) bower_components node_modules bower.json package.json Gruntfile.js HTML File &lt;!-- bower:js --&gt; &lt;script src="../bower_components/modernizr/modernizr.js"&gt;&lt;/script&gt; &lt;script src="../bower_components/jquery/dist/jquery.js"&gt;&lt;/script&gt; &lt;!-- endbower --&gt; Grunt File connect: { server: { options: { port: 9000, open: true, livereload: 35729, hostname: 'localhost', base:config.app }, livereload: { options: { middleware: function(connect) { return [ connect.static(config.app), connect().use('/bower_components', connect.static('./bower_components')) ]; } } } } }, wiredep: { task: { // Point to the files that should be updated when you run `grunt wiredep` src: [ '&lt;%= config.app %&gt;/**/*.html', // .html support... '&lt;%= config.app %&gt;/views/**/*.html', // .html support... '&lt;%= config.app %&gt;/views/**/*.jade', // .jade support... '&lt;%= config.app %&gt;/styles/app.scss', // .scss &amp; .sass support... '&lt;%= config.app %&gt;/config.yml' // and .yml &amp; .yaml support out of the box! ], options: { // See wiredep's configuration documentation for the options https://github.com/taptapship/wiredep#configuration } } }
possible better answer: http://stackoverflow.com/a/28019412
score: 1
tagged with: grunt-wiredep
has answer: http://stackoverflow.com/a/28019412
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28019305
linked to: http://stackoverflow.com/q/14079833
tagged with: javascript
has comment: http://stackoverflow.com/comment/44424716
tagged with: gruntjs
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/28019305
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44424856
has title: Missing Bower Compoents
tagged with: bower

http://stackoverflow.com/comment/44344365
comment on: http://stackoverflow.com/a/27975903
type: Comment
score: 1
has text: "or simply this:" --- unless it's syntactically incorrect.
type: AnswerComment

ruby-on-rails
tags question: http://stackoverflow.com/q/28005732
tags question: http://stackoverflow.com/q/28114873
tags question: http://stackoverflow.com/q/28079621
type: Tag
tags question: http://stackoverflow.com/q/27973980
tags question: http://stackoverflow.com/q/28055888
tags question: http://stackoverflow.com/q/28115916
tags question: http://stackoverflow.com/q/28120528
tags question: http://stackoverflow.com/q/28056397
tags question: http://stackoverflow.com/q/27992242
tags question: http://stackoverflow.com/q/28071251
tags question: http://stackoverflow.com/q/28034771
tags question: http://stackoverflow.com/q/27987985
tags question: http://stackoverflow.com/q/27978529
tags question: http://stackoverflow.com/q/28100354
tags question: http://stackoverflow.com/q/28100801
tags question: http://stackoverflow.com/q/28032147
tags question: http://stackoverflow.com/q/28102146
tags question: http://stackoverflow.com/q/27975768
tags question: http://stackoverflow.com/q/28014526
tags question: http://stackoverflow.com/q/27964085
tags question: http://stackoverflow.com/q/28013351
tags question: http://stackoverflow.com/q/28078064
tags question: http://stackoverflow.com/q/28024997
tags question: http://stackoverflow.com/q/27990004
tags question: http://stackoverflow.com/q/28078480
tags question: http://stackoverflow.com/q/28008733
tags question: http://stackoverflow.com/q/28059405
tags question: http://stackoverflow.com/q/28080797
tags question: http://stackoverflow.com/q/27968469
tags question: http://stackoverflow.com/q/28109768
tags question: http://stackoverflow.com/q/28098124
tags question: http://stackoverflow.com/q/28020524
tags question: http://stackoverflow.com/q/27967520
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/28026565
tags question: http://stackoverflow.com/q/28083967
tags question: http://stackoverflow.com/q/28001000
tags question: http://stackoverflow.com/q/28038698
tags question: http://stackoverflow.com/q/27996963
tags question: http://stackoverflow.com/q/28084174
tags question: http://stackoverflow.com/q/28119912
tags question: http://stackoverflow.com/q/27970913
tags question: http://stackoverflow.com/q/27996176
tags question: http://stackoverflow.com/q/27974898
tags question: http://stackoverflow.com/q/28079271
tags question: http://stackoverflow.com/q/28049845
tags question: http://stackoverflow.com/q/28061557
tags question: http://stackoverflow.com/q/28072584
tags question: http://stackoverflow.com/q/28103323
tags question: http://stackoverflow.com/q/27972252
tags question: http://stackoverflow.com/q/28096786
tags question: http://stackoverflow.com/q/28059390
tags question: http://stackoverflow.com/q/28094342
tags question: http://stackoverflow.com/q/28039290
tags question: http://stackoverflow.com/q/27982276
tags question: http://stackoverflow.com/q/28033759
tags question: http://stackoverflow.com/q/28070388
tags question: http://stackoverflow.com/q/28033986

iron-router
tags question: http://stackoverflow.com/q/28015319
tags question: http://stackoverflow.com/q/28050237
tags question: http://stackoverflow.com/q/28028944
tags question: http://stackoverflow.com/q/27977993
tags question: http://stackoverflow.com/q/27977244
tags question: http://stackoverflow.com/q/27977073
tag name: iron-router
tags question: http://stackoverflow.com/q/28105957
type: Tag

http://stackoverflow.com/a/29686215
has comment: http://stackoverflow.com/comment/54827926
has comment: http://stackoverflow.com/comment/114735009
has comment: http://stackoverflow.com/comment/75325210
upvote count: 26
has comment: http://stackoverflow.com/comment/63028298
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27988502
type: Answer
has comment: http://stackoverflow.com/comment/62930763
score: 26
accepted answer of: http://stackoverflow.com/q/27988502
has comment: http://stackoverflow.com/comment/63240370
has body: Was able to modify a directive from DTing on another post to get it working with multiple carousels on the same page. Here is a working plnkr -- Edit -- Have another plnkr to give an example on how to add an item. Doing a reinit() did not work cause any time the owl carousel is destroyed it loses the data- elements and can never initialize again. var app = angular.module('plunker', []); app.controller('MainCtrl', function($scope) { $scope.items1 = [1,2,3,4,5]; $scope.items2 = [1,2,3,4,5,6,7,8,9,10]; }).directive("owlCarousel", function() { return { restrict: 'E', transclude: false, link: function (scope) { scope.initCarousel = function(element) { // provide any default options you want var defaultOptions = { }; var customOptions = scope.$eval($(element).attr('data-options')); // combine the two options objects for(var key in customOptions) { defaultOptions[key] = customOptions[key]; } // init carousel $(element).owlCarousel(defaultOptions); }; } }; }) .directive('owlCarouselItem', [function() { return { restrict: 'A', transclude: false, link: function(scope, element) { // wait for the last item in the ng-repeat then call init if(scope.$last) { scope.initCarousel(element.parent()); } } }; }]); Here is the HTML AngularJS Plunker
has comment: http://stackoverflow.com/comment/62965035
has comment: http://stackoverflow.com/comment/63271627
has comment: http://stackoverflow.com/comment/62295141

http://stackoverflow.com/q/28104061
answer count: 6
has comment: http://stackoverflow.com/comment/44583306
has answer: http://stackoverflow.com/a/28104158
has answer: http://stackoverflow.com/a/28104120
tagged with: getelementbyid
possible better answer: http://stackoverflow.com/a/28104111
downvote count: 0
has comment: http://stackoverflow.com/comment/44583080
has answer: http://stackoverflow.com/a/28104111
has body: I am trying to write a simple form on HTML/Javascript where I type in a number, adds one and then displays it. I got it working but it was concatenating the one instead of adding it. I used the parseInt(), but it is showing "Nan". Any suggestions? The HTML is: &lt;head&gt; &lt;link src="script.js" type="text/javascript"&gt;&lt;/script&gt;&lt;/head&gt; &lt;body&gt; &lt;input type="text" id="grossSalary"&gt; &lt;button type="button" onclick="calculateTax()"&gt; Generate Tax &lt;/button&gt; &lt;/body&gt; The Javascript is: function calculateTax(){ var salaryString = document.getElementById("grossSalary"); var salaryInteger = parseInt(salaryString); alert(salaryInteger + 1); } The "error" message I get is: "Nan"
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28104108
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28104108
score: 1
has title: getElementById or parseInt not working?
has answer: http://stackoverflow.com/a/28104217
upvote count: 1
has answer: http://stackoverflow.com/a/28104123
type: Question
tagged with: javascript

http://stackoverflow.com/a/28030456
has body: Lots of different ways to skin this cat... However, as far as the frame-by-frame animation, you want requestAnimationFrame. This function calls whatever you pass to it, and passes a timestamp. Then it's just a matter of changing properties of these "lines" to move them across the screen. If you were animating an &lt;hr&gt; element you could make it absolutely positioned and then just change the top amount each frame: html: &lt;hr id="myLine"/&gt; css: #myLine { position:absolute; width:100% } js: function easeOutQuad(t) { return t*(2-t) }; var startTime = null, percent, elapsed, duration = 3000, end = 400, hr = document.getElementById('myLine'); function step(timestamp) { if (startTime === null) startTime = timestamp; elapsed = timestamp - startTime; percent = elapsed/duration; if (elapsed &lt; duration) { // apply easing fn percent = easeOutQuad(percent); var frameDist = end * percent; hr.style.top = frameDist + 'px'; // next frame requestAnimationFrame(step); } else { // on complete... } } // begin requestAnimationFrame(step); Here is a fiddle: http://jsfiddle.net/oytwdk9s/ If you want to support IE9 and older, you'll need a polyfill for requestAnimationFrame.
answers question: http://stackoverflow.com/q/28029654
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44527358
type: Answer
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/44522111
accepted answer of: http://stackoverflow.com/q/28029654

http://stackoverflow.com/comment/44398101
comment on: http://stackoverflow.com/q/28004820
score: 0
type: QuestionComment
has text: Put the URL in the `href`? You are breaking the web doing stuff like this anyway, so why worry about it?
type: Comment

http://stackoverflow.com/comment/44595449
comment on: http://stackoverflow.com/a/28109634
type: AnswerComment
score: 0
has text: Two main reasons: 1) since the value is retrieved from a server, it can take some time to be retrieved and the browser cannot simply wait for that. 2) the value might not even exist yet, or be updated during some point. Firebase is all about real-time data **synchronization** and that implies that data changes over time. This topic is covered in quite a few answers already, I recently linked the most interesting ones in this answer: http://stackoverflow.com/questions/27049342/asynchronous-access-to-an-array-in-firebase/27050749#27050749
type: Comment

http://stackoverflow.com/comment/44549022
type: AnswerComment
score: 0
type: Comment
has text: It is working fine with a windows xp machine. No problem with the code chunk.
comment on: http://stackoverflow.com/a/28066613

knockout-components
type: Tag
tags question: http://stackoverflow.com/q/28036773
tag name: knockout-components

http://stackoverflow.com/comment/44382601
has text: you mean it ajax my type should be GET? let me try it
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27995990
type: AnswerComment

http://stackoverflow.com/a/34297352
answers question: http://stackoverflow.com/q/28004856
downvote count: 0
has body: Since no answer was provided, here is an example of how to open and (hard) close a server in node.js: Create the server: var net = require('net'); var clients = []; var server = net.createServer(); server.on('connection', function (socket) { clients.push(socket); console.log('client connect, count: ', clients.length); socket.on('close', function () { clients.splice(clients.indexOf(socket), 1); }); }); server.listen(8194); Close the server: // destroy all clients (this will emit the 'close' event above) for (var i in clients) { clients[i].destroy(); } server.close(function () { console.log('server closed.'); server.unref(); }); Update: Since using the above code, I've ran into an issue that close will leave the port open (TIME_WAIT in Windows). Since I'm intentionally closing the connection, I'm using unref as it appears to fully close the tcp server, though I'm not 100% if this is the correct way of closing the connection.
has comment: http://stackoverflow.com/comment/124079508
type: Answer
score: 14
upvote count: 14

http://stackoverflow.com/comment/44576464
has text: It used to be called `throttle`, but a while ago it was pointed out that the operation performed by Rx `Throttle` is really what is commonly known as [debounce](http://en.wikipedia.org/wiki/Switch#Contact_bounce), and so it was changed to be less confusing to developers coming from other frameworks. `empty` is an observable that completes immediately without producing any values. I am using it in conjunction with `delay` (which delays the completion of empty) to insert a pause after the service completes and before it starts up again
comment on: http://stackoverflow.com/a/28078031
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/28111780
score: 1
upvote count: 1
type: Question
has body: i'm building a fairly simple API with Symfony2 and now i'm trying to make some simple pages with AngularJS within my bundle to eventually display the results of my API calls. How do i make AngularJS work properly? I generated a bundle through app/console bundle:generate so i'm working under src/Portfolio/Bundle/APIBundle, and that's where i'm basically putting all my resources etc. everything really. Javascripts are under src/Portfolio/Bundle/APIBundle/Resources/public/js js/KitchenSink.js angular.module('KitchenSink', [], function($interpolateProvider){ $interpolateProvider.startSymbol(''); $interpolateProvider.endSymbol (''); }); js/index.ctrl.js var module = angular.module('KitchenSink') module.controller('IndexController', function(){ var vm = this; vm.Title = 'Portfolio API KitchenSink'; }); base template: {% block title %}{% endblock %} {% block head %}{% endblock %} {% block stylesheets %}{% endblock %} {% block head_javascripts %}{% endblock %} {% block body %}{% endblock %} {% block javascripts %}{% endblock %} index partial: {% extends 'PortfolioAPIBundle::base.html.twig' %} {% block title %}Portfolio API KitchenSink{% endblock %} {% block head_javascripts %} {% endblock %} {% block body %} index.Title {% endblock %}
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/28329081
tagged with: angularjs
type: UnansweredQuestion
tagged with: symfony
tagged with: php
has title: AngularJS not working in my SF2 app
has answer: http://stackoverflow.com/a/31787896

http://stackoverflow.com/a/28039037
has comment: http://stackoverflow.com/comment/44462630
has comment: http://stackoverflow.com/comment/44462913
downvote count: 0
has body: I see three main issues: 1) - You don't have any code to save the currently entered values as new cookie values. You need to change the "Save Information" button to not be a submit button (you don't want it submitting a form to the server) and instead hook up a new function to it that you write that will save each form value to the appropriate cookie. 2) Upon page initialization, you are setting every cookie so any previously saved values can never be used because you always overwrite them every time the page is loaded. You should only save initial cookie values if there are no values already saved. 3) In the getCookie() function, you declare the argument as cookieFirstName, but then appear to be using cookieName in the function: function getCookie(cookieFirstName) { var cookieValue = document.cookie; var cookieStartsAt = cookieValue.indexOf(" " + cookieName + "="); if (cookieStartsAt == -1) { cookieStartsAt = cookieValue.indexOf(cookieName + "="); } if (cookieStartsAt == -1) { cookieValue = null; } else { cookieStartsAt = cookieValue.indexOf("=", cookieStartsAt) + 1; var cookieEndsAt = cookieValue.indexOf(";", cookieStartsAt); if (cookieEndsAt == -1) { cookieEndsAt = cookieValue.length; } cookieValue = unescape(cookieValue.substring(cookieStartsAt, cookieEndsAt)); } return cookieValue; } Presumably, it should be this: function getCookie(cookieName) { var cookieValue = document.cookie; var cookieStartsAt = cookieValue.indexOf(" " + cookieName + "="); if (cookieStartsAt == -1) { cookieStartsAt = cookieValue.indexOf(cookieName + "="); } if (cookieStartsAt == -1) { cookieValue = null; } else { cookieStartsAt = cookieValue.indexOf("=", cookieStartsAt) + 1; var cookieEndsAt = cookieValue.indexOf(";", cookieStartsAt); if (cookieEndsAt == -1) { cookieEndsAt = cookieValue.length; } cookieValue = unescape(cookieValue.substring(cookieStartsAt, cookieEndsAt)); } return cookieValue; } FYI, I was able to see this error by pasting your code into http://jshint.com/ and looking at …
has comment: http://stackoverflow.com/comment/44462556
answers question: http://stackoverflow.com/q/28038929
has comment: http://stackoverflow.com/comment/44462949
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/44462819
has comment: http://stackoverflow.com/comment/44463302
has comment: http://stackoverflow.com/comment/44462215
score: 1

http://stackoverflow.com/q/28001499
has comment: http://stackoverflow.com/comment/44396642
answer count: 3
accepted answer: http://stackoverflow.com/a/28001529
tagged with: http://stackoverflow.com/tag/html
has title: How to change the font size with an input type number?
has comment: http://stackoverflow.com/comment/44392049
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28001559
has answer: http://stackoverflow.com/a/28001611
has answer: http://stackoverflow.com/a/28001529
possible better answer: http://stackoverflow.com/a/28001559
type: Question
has body: The image above shows a function for a user to select his or her preferenced font size (it's a website for all ages). However, transferring this to code is easier said than done for me. All I found was that I had to use the following method: &lt;input type="number"&gt; Is there anyone who knows how to make such a function work with Javascript or jQuery that adjusts the font size to the selected number? Thanks so much in advance!
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/28079884
has body: This seems to work fine, but like lan said above, maybe his method it's better for doing animations var carte = Snap.load("./src/carte.svg", function (f) { g = f.select("g"); //var t = Snap.matrix().scale(0.35); s.append(g); //Load the map var firstScene = new Snap.Matrix(); firstScene.translate(295, 160); firstScene.scale(0.04); //Set scene 1 var secondScene = new Snap.Matrix(); secondScene.scale(0.4); secondScene.translate(-300, -10); //Set scene 2 var threeScene = new Snap.Matrix(); //threeScene.scale(0.5); threeScene.translate(-825, -380); //Set scene 3 var fourScene = new Snap.Matrix(); fourScene.scale(21.0); fourScene.translate(-1164, -526); var anim1 = function() { g.animate({ transform: firstScene}, 0, anim2); } var anim2 = function() { g.animate({ transform: secondScene}, 1500, mina.easing, anim3); } var anim3 = function() { g.animate({ transform: threeScene}, 1000, mina.linear, anim4); } var anim4 = function() { g.animate({ transform: fourScene}, 2000, mina.easing); } anim1(); }); Is the fact of adding several matrix a performance killer ? Or this is the way it should be done ?
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44578180
answers question: http://stackoverflow.com/q/28038451
has comment: http://stackoverflow.com/comment/44554412
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44470794
score: 1
comment on: http://stackoverflow.com/q/27969017
type: QuestionComment
type: Comment
has text: @Malachi Hi, the function is here above and the href of the li button is this: `<a href="<?php echo base_url(); ?>main/logout" id="navLogin"> <?php echo ___("label_logout"); ?>`

http://stackoverflow.com/a/28048847
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/28048437
score: 2
accepted answer of: http://stackoverflow.com/q/28048437
has body: $('.phone').on('input', function() { this.value.length < 5 || this.value.charAt(5) == '-' || $(this).val( [this.value.slice(0,5), '-', this.value.slice(5)].join('') ); });

http://stackoverflow.com/q/28023706
tagged with: jquery
linked to: http://stackoverflow.com/q/359494
possible better answer: http://stackoverflow.com/a/28023752
has body: I'm trying to do a simple validate on my page with jquery. The top 'var a to e' values work fine but I have an issue with check boxes (var fa to ff) which must have at least one checked before the page submits. I've tried is checked, prop and bog-standard val (with true/false, 0, isnull etc) but all allow the page to be submitted rather than throwing up the #edialog message. Can anyone see where I've gone wrong? Thanks in advance! &lt;script&gt; function validateForm() { var a = $('#Name').val(); var b = $('#Ward').val(); var c = $('#Job').val(); var d = $('#LDate').val(); var e = $('#Reason').val(); var fa = $('#MCHFT').prop('checked'); var fb = $('#ONHS').prop('checked'); var fc = $('#PSEC').prop('checked'); var fd = $('#PUBSEC').prop('checked'); var fe = $('#EDU').prop('checked'); var ff = $('#NEMP').prop('checked'); if (a == null || a == "") { $('#EC1').show(); $('#edialog').dialog('open'); return false; } if (b == null || b == "") { $('#EC2').show(); $('#edialog').dialog('open'); return false; } if (c == null || c == "") { $('#EC3').show(); $('#edialog').dialog('open'); return false; } if (d == null || d == "") { $('#EC4').show(); $('#edialog').dialog('open'); return false; } if (e == null || e == "") { $('#EC5').show(); $('#edialog').dialog('open'); return false; } if (fa === "false" &amp; fb === "false" || fb === "false" || fc === "false" || fd === "false" || fe === "false" || ff == "false") { $('#EC8').show(); $('#edialog').dialog('open'); return false; } } &lt;/script&gt; Edit: I just noticed a an error and thanks to the pointers i've updated my code so that the f vars look like this (as it should be &amp;&amp; rather than || i think) but it still does not work - any more ideas?: if (fa === false &amp;&amp; fb === false &amp;&amp; fb === false &amp;&amp; fc === false &amp;&amp; fd === false &amp;&amp; fe === false &amp;&amp; ff == false) { $('#EC8').show(); $('#edialog').dialog('open'); return false; } I've created a JSFiddle (no working at all - i'm new to…
linked to: http://stackoverflow.com/q/7310109
accepted answer: http://stackoverflow.com/a/28023733
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44435149
has answer: http://stackoverflow.com/a/28023752
tagged with: javascript
has comment: http://stackoverflow.com/comment/44432910
has answer: http://stackoverflow.com/a/28023733
type: Question
score: 0
has title: JQuery Validating Check box Not Working
answer count: 2
tagged with: validation

http://stackoverflow.com/comment/44378076
type: AnswerComment
has text: Yes I would do that, when you use jQuery to make your ajax call you are no longer in the Angular digest cycle which will not keep $scope up to date. Try using straight d.categories instead of setting it equal to a variable. Let me know if that works
comment on: http://stackoverflow.com/a/27992182
type: Comment
score: 0

http://stackoverflow.com/a/28037713
type: Answer
has body: You can check if your truck's margin-left is below zero or beyond your container's width. function moveRight() { var left = $('#truck').css("marginLeft").match(/\d+/g); if (left &lt; 320) { $('#truck').animate({ 'marginLeft': "+=80px" }); } } function moveLeft() { var left = $('#truck').css("marginLeft").match(/\d+/g); if (left &gt;= 80) { $('#truck').animate({ 'marginLeft': "-=80px" }); } } //later code&lt;br&gt; window.addEventListener('keydown', function(evt) { var key = evt.keyCode; if (key == 39) { moveRight() = true; moveLeft() = false; } if (key == 37) { moveLeft() = true; moveRight() = false; } }, false); #container { width: 400px; height: 40px; border: 1px solid black; } #truck { margin-left: 0px; width: 80px; height: 40px; background-color: #AAA; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="container"&gt; &lt;div id="truck"&gt;&lt;/div&gt; &lt;/div&gt;
answers question: http://stackoverflow.com/q/28003405
score: 0
has comment: http://stackoverflow.com/comment/51523257

http://stackoverflow.com/comment/44447379
type: Comment
score: 1
has text: Very thorough post. I prefer your answer to mine.
type: AnswerComment
comment on: http://stackoverflow.com/a/28031213

http://stackoverflow.com/comment/44559893
score: 1
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/69398/discussion-between-ji-in-coding-and-user15662).
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28090803

http://stackoverflow.com/comment/44586968
has text: $("#munna").html(html);
type: Comment
comment on: http://stackoverflow.com/q/28106256
type: QuestionComment
score: 2

http://stackoverflow.com/a/28010972
has body: there is an extra } at the end and you should remove it.above code solves the issue function Showtxt() { if ($("#LinkButton1").text() == 'show') { alert('up'); $("#LinkButton1").text("hide") } else { alert('down'); $("#LinkButton1").text("show") } } but there is another problem,and that is PostBack,and it force the page to refresh and "hide" replace by "show" after PostBack.
answers question: http://stackoverflow.com/q/28010783
score: 0
type: Answer

youtube-javascript-api
type: Tag
tags question: http://stackoverflow.com/q/28018792
tag name: youtube-javascript-api

http://stackoverflow.com/q/28045610
tagged with: jstree
type: AnsweredQuestion
tagged with: internet-explorer-11
has comment: http://stackoverflow.com/comment/44477564
accepted answer: http://stackoverflow.com/a/28069604
has body: I'm using the jstree plugin in the latest version. I have a tree to which I add, rename and remove nodes by buttons. On Firefox and Chrome there is no problem, but on IE there are two problems when the buttons are clicked fast one by one. When the Add group button is clicked, then nodes are visible in the tree, but not for all nodes their text is displayed. With the Rename node button is clicked on node few times one by one, then node loses the selected to edit text. Simple code to reproduction: . http://jsfiddle.net/q0rfrbcx/4/ That'a how it looks like on my IE11:
has comment: http://stackoverflow.com/comment/44475141
type: Question
answer count: 2
has title: Adding nodes by button and IE doesn't display node text
has answer: http://stackoverflow.com/a/28069604
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28046921
score: 0
possible better answer: http://stackoverflow.com/a/28046921

http://stackoverflow.com/a/28021280
has comment: http://stackoverflow.com/comment/44429120
score: 0
answers question: http://stackoverflow.com/q/28020496
has comment: http://stackoverflow.com/comment/122618951
has body: Try position the list by using .list{ width: 99.9%; /* overflow: hidden; */ /* overflow-y: scroll; */ /* top: 65%; */ overflow-x: hidden; /*overflow-y: scroll;*/ height: 75%; display: none; -webkit-overflow-scrolling: touch; position: fixed; z-index:99999; }
type: Answer

http://stackoverflow.com/q/28055960
has comment: http://stackoverflow.com/comment/44493819
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44494604
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28057197
answer count: 1
has title: Getting JSON in nested ajax calls
tagged with: jquery
tagged with: ajax
has body: The http request sent to some 'request_url' returns json response in format {'succes': 1, 'html': 'thestuff'} so when jQuery.ajax({ url: 'request_url', success: function(response){ alert(response.html); //'thestuff' is here as expected } }); 'thestuff' can be found in response.html as expected. But if this ajax is called inside the 'success' callback of another one ajax request then the response.html is coming empty and 'thestuff' is going to 'response'. jQuery.ajax({ url: 'some_other_url', success: function(some_other_response){ jQuery.ajax({ url: 'request_url', success: function(respose){ alert(response.html); //there is nothing alert(response); //I see 'thestuff' which is expected in 'html' } }) } }); Why does it happen? Update: 'thestuff' contains some js code with {} I can suppose something can get confused but why it works well with single (not nested) ajax request.
has comment: http://stackoverflow.com/comment/44495032
accepted answer: http://stackoverflow.com/a/28057197

http://stackoverflow.com/comment/44634047
score: 0
has text: @georgestocker - just because someone asks if this is "good" or "bad" does NOT mean that the only possible good answers are primarily opinion-based. Many times (such as in this case), it is possible to explain a good or bad conclusion with facts (not opinions). This site is way too sensitive to a question that "could" be answered via an opinion when answers are certainly possible that are not primarily opinion. And if all opinion was banned on this site such as what constitutes a good design practice or a preferred idiom, then 2/3 of the answers here would need to be banished.
type: QuestionComment
comment on: http://stackoverflow.com/q/28102812
type: Comment

http://stackoverflow.com/a/27967354
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27966783
score: 1
answers question: http://stackoverflow.com/q/27966783
type: Answer
has body: I updated your code. Please check it here: JSFiddle $('body').on('click','.click2',function(e){ e.preventDefault(); if($('.changeable').is(':hidden')){ $('.changeable div').css('display','none'); $('.changeable').css('display','table-row').find('div').slideDown(1000); } else{ $('.changeable div').slideUp(1000, function(){$('.changeable').hide()}); }
upvote count: 1

http://stackoverflow.com/comment/44562479
has text: You could exclude them from the results `a` using `if (o[p] != 1)` before the `a[a.length] = ...`
comment on: http://stackoverflow.com/a/28077352
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/28004863
type: UnansweredQuestion
type: Question
answer count: 2
tagged with: javascript
tagged with: event-handling
tagged with: jquery
score: 0
tagged with: jquery-events
has answer: http://stackoverflow.com/a/28005013
has body: I'm using Bootstrap tabs on one of my webpages, for a job application portal. The tab content for each &lt;li&gt; consists of a) a job title, b) a job description, and c) an "Apply Now" button. I need to hide the "Apply Now" button for one of my positions when it's clicked on, but have it show for the rest. I've tried accomplishing this using an event handler in two different ways, but have been unsuccessful: Accounting for the hash populated in the address bar for that tab: $('.careers-positions li').on('click', 'a', function() { if (window.location.hash === '#it-consultant') { ('.tab-content .apply-button').addClass('hidden'); } else { ('.tab-content .apply-button').removeClass('hidden'); } }); The "Apply Now" button also has a data-jobid attribute, tied to a click event, that changes value based on the position that's clicked on in my list. But for some reason approaching it from this way has also been unsuccessful: $('.careers-positions li').on('click', 'a', function() { if ($('.tab-content .apply-button').attr('data-jobid') === 'fd39f67d-8e99-476b-8421-080d8dca42e0') { $('.tab-content .apply-button').addClass('hidden'); } }); How can I configure this so that the "Apply Now" button will dynamically show/hide based on whether this particular job title is clicked on?
has title: How do I hide HTML for a specific Bootstrap tab?
has comment: http://stackoverflow.com/comment/44398224
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/28005390

http://stackoverflow.com/a/28018200
score: 1
upvote count: 1
has body: You can use bxSlider: jQuery Content Slider | Responsive jQuery Slider
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/44423797
answers question: http://stackoverflow.com/q/28018116

http://stackoverflow.com/q/27970971
type: UnansweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/44335906
tagged with: angularjs-ng-options
type: Question
tagged with: angularjs-directive
tagged with: javascript
has title: Bug when value and label of ng-options are equivalent?
has comment: http://stackoverflow.com/comment/44334657
has answer: http://stackoverflow.com/a/27971321
has comment: http://stackoverflow.com/comment/44335129
upvote count: 3
has comment: http://stackoverflow.com/comment/44335016
answer count: 1
has comment: http://stackoverflow.com/comment/44336331
favorite count: 0
has body: I'm experiencing an issue if I set ng-options from within a $scope.$watch statement. The following works: But this doesn't: Plunker showing my issue -- click 'update options' It seems if the model's value is set before the options are, and the label and value are equivalent, the model will not match any available option. Is this a bug, or am I doing something wrong? sample controller code: $scope.myModel = 'Two'; $scope.$watch('loadTrigger', function(newValue, oldValue) { if (newValue == oldValue) { return; } $scope.options = [{id: 1, text: 'One'}, {id: 2, text: 'Two'}...]; }) sample view: ... When the watch triggers and the options get updated, the select will display a blank or default option, rather than the expected "Two". If the label and value differ (even slightly), however, everything works as expected
tagged with: angularjs-watch
has comment: http://stackoverflow.com/comment/44335611
tagged with: angularjs

http://stackoverflow.com/comment/44517859
has text: Sorry for my confusing english, I just mean that, **sometimes** you can have a issue with HTML inside JSON or any other parser, cuz HTML use `'` and `"` for attributes: `class="foo"`. That can make conflicts if you want to modify the data before you decode it somewhere else. for example: http://stackoverflow.com/questions/16653786/php-receive-json-but-cant-decode-it -- And it's good practice to send just data, not the HTML. it's simple and smaller.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28059024

http://stackoverflow.com/q/28083385
has body: I'm actually trying to find a way to load an iframe content trought proxy in order to bypass the same origin piracy, but in JavaScript. I want to make a UserScript in fact and i'm kinda new in this usercripting. It basicly uses Javascript. Right now i'm adding an iframe of a forum from a different domain and thing is that i don't want to display everything from this forum just the table part (like get rid of menus, footers, headers, etc). So in order to do this i need to change the content of my iframe, but due to same origin policy it isn't possible as it's not the same domain. I've search for some solutions and getting trough a proxy seems to be the best bypass way to achieve what i'm trying to do. But now, this bypassing with proxy works with php. And useScripts are codded in JavaScript. how can i load my iframe through a proxy using JavaSCipt then? From what i get i need to serve the iframe from the same domain as the webpage where my userscript is executed. The website where the userscript is executed isn't mine, but i can modify DOM content in everypossible way thans to this userScripting. But i don't know if this is even possible with UserScripts and how to achieve this :( Will it allow me to change my iframe content? I only want to change the CSS and be able to read (not write) some of the content. Any Jquery solution is welcome Pls help, thank you! PS: Sorry for any mistakes, trying my best to explain clearly my problem
score: 2
has comment: http://stackoverflow.com/comment/44545065
has comment: http://stackoverflow.com/comment/44545288
linked to: http://stackoverflow.com/q/11638595
has comment: http://stackoverflow.com/comment/44545245
has comment: http://stackoverflow.com/comment/44661384
type: Question
has comment: http://stackoverflow.com/comment/44545205
has title: Javascript: Load iframe through proxy?
has comment: http://stackoverflow.com/comment/44545429
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44545130
has comment: http://stackoverflow.com/comment/44545333
has comment: http://stackoverflow.com/comment/44545184
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/44663766
has comment: http://stackoverflow.com/comment/44544767
favorite count: 0
has comment: http://stackoverflow.com/comment/44544835
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/44544821
type: UnansweredQuestion
tagged with: iframe
tagged with: css
has comment: http://stackoverflow.com/comment/44545111

http://stackoverflow.com/comment/44577931
type: Comment
comment on: http://stackoverflow.com/a/28100448
has text: forgive my newbishness...I didn't properly commit and push the project to github. I've got the correct version up now. I want to upload the tsv file in the project. Thing is, it's not reactive yet...Any ideas?
score: 0
type: AnswerComment

http://stackoverflow.com/q/28020834
type: Question
has comment: http://stackoverflow.com/comment/44428814
tagged with: onedrive
has body: I'm using Skydrive file picker javascript api to upload files to Skydrive. But as soon as I click on upload button...it opens the login window and closes instantly. Error log shows that WL.login : The pop up is closed without receiving any consent. I've hosted my web-app on local domain: apidomain and published my files to IIS @ Default Web Site/onedriveapi folder. Following is the code: [HTML] Save file [Javascript] Redirect_URL in app settings is also same as mentioned above. I've also created callback.html as mentioned in few places, and replaced my redirect_url with redirect_uri: "http://apidomain.com/onedriveapi/callback.html", in page as well as appsettings of https://account.live.com/developers/applications/apisettings. I also want to save the token received and location of the file uploaded into my db.Please anybody help to fix this issue as I'm struggling with this from last few days. Thanks
linked to: http://stackoverflow.com/q/18715813
has comment: http://stackoverflow.com/comment/44428429
has comment: http://stackoverflow.com/comment/44427993
tagged with: api
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44431031
has comment: http://stackoverflow.com/comment/44429408
has comment: http://stackoverflow.com/comment/44430841
has title: File not uploading using Skydrive file picker javascript api
has comment: http://stackoverflow.com/comment/44432097
has answer: http://stackoverflow.com/a/28023121
tagged with: filepicker
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44428462

http://stackoverflow.com/q/28055377
linked to: http://stackoverflow.com/q/21861903
favorite count: 0
has comment: http://stackoverflow.com/comment/44643706
type: UnansweredQuestion
tagged with: web-testing
has comment: http://stackoverflow.com/comment/44643570
tagged with: casperjs
answer count: 0
downvote count: 0
type: Question
score: 3
tagged with: test-suite
has body: How would I create a test suite where I have a test case that is dependent on a previous test case to start? Example: Test 1 Login with user X Test 2 My account page (Comes after user logged in) Test 3 "Follow up with other tests with the same user, but on other pages" I've been through documentation of CasperJS writing_modules & other examples but I cannot find or understand how to set it up for my specific requirements. Or if it's even possible to do so. Currently I have it setup as follows: File 1 Suite // Suite.js var Suite; Suite = require("./Login_User.js"); Suite.login_User("randomname","randompassword"); casper.then(function() { ; this.test.pass("Hit the first then"); Suite = require("./MyAccount.js"); Suite.Enterprise();; }); casper.run(function() { return this.test.done(); }); File 2 Login Functionality // Login_User.js (Test 2) casper.test.begin("login page", function(test) { casper.options.waitTimeout = 5000; casper.on('remote.message', function(msg) { this.echo('rem msg: ' + msg); }); casper.on("page.error", function(msg) { this.echo("Page Error: " + msg, "ERROR"); }); var url = "https://website.com"; casper.start(url, function() { console.log("page loaded"); }); exports.login_User = function(username, password) { casper.test.comment(username + "\n" + password); casper.then(function() { this.evaluate(function(username, password) { $("cmpLogin_UserName").val(username); $("cmpLogin_Password").val(password); $("cmpLogin_LoginButton").click(); }, { "username": username, "password": password }) casper.waitForUrl("https://website.com/myAccount.aspx", function() { console.log("Logged in"); casper.capture("Loggedin.png"); }); }); casper.then(function(){ this.test.assertTitle("My Account", "Title is Login"); }); casper.run(function() { test.done(); }); } }); File 3 My Account Content // MyAccount (Test 3) casper.test.begin("Account page", function(test) { casper.options.waitTimeout = 5000; casper.on('remote.message', function(msg) { this.echo('rem msg: ' + msg);…
has title: CasperjsJS How to setup test suite with dependent test cases
tagged with: javascript
upvote count: 3

http://stackoverflow.com/a/28116559
upvote count: 1
answers question: http://stackoverflow.com/q/28061988
score: 1
accepted answer of: http://stackoverflow.com/q/28061988
has body: Seems like it should work, unless you're on a Windows system using backslashes as the path separator. In which case /^app[\\\/](?!(tests|store-test|views[\\\/]mapdata.coffee))/ ought to work. In a node REPL: &gt; /^app(\/|\\)(?!(tests|store-test|views\/mapdata.coffee))/.test('app/views/mapdata.coffee') false &gt; /^app(\/|\\)(?!(tests|store-test|views\/mapdata.coffee))/.test('app\\views\\mapdata.coffee') true &gt; /^app[\\\/](?!(tests|store-test|views[\\\/]mapdata.coffee))/.test('app\\views\\mapdata.coffee') false &gt; /^app[\\\/](?!(tests|store-test|views[\\\/]mapdata.coffee))/.test('app\\views\\foo.coffee') true You can also define your joinTos with things other than regexes. Take a look at the anymatch documentation.
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44466708
has text: @DmitryB.: As far as I can tell, no one ever tried this since it feels like a bad idea to begin with. Also: You don't have hundreds of *different* components. 20 text fields are still just the same component repeated 20 times.
type: Comment
comment on: http://stackoverflow.com/a/28041115
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44516308
comment on: http://stackoverflow.com/q/28068387
score: 0
type: Comment
type: QuestionComment
has text: Using a array as associative is not possible, try an JSON-Object {}.

http://stackoverflow.com/comment/44417710
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27985729
has text: Seems that firebase is not making a connection... When I login it says a lot of things, including; connection ready. But when I close the app and re-open it, it's not making any connection, only telling me; "p:0: Listen called for /Users/sam/currentGames default". Do I need to make the connection everytime I open my application? This seems weird because of the Session length option I've in Firebase.
score: 0

http://stackoverflow.com/comment/44431794
type: Comment
has text: so at initial state you have some values in group variable?
type: QuestionComment
comment on: http://stackoverflow.com/q/28022115
score: 0

http://stackoverflow.com/comment/44414210
type: QuestionComment
has text: The only thing that can be wrong here is that your path is wrong. We can't help with that give the information we have.
score: 0
comment on: http://stackoverflow.com/q/28013513
type: Comment

http://stackoverflow.com/comment/44387267
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27998667
score: 0
has text: could try by changing `$(function () {.. }` to `$(document.ready(function () {..})`..

http://stackoverflow.com/comment/44572565
type: Comment
has text: Leading from your answer, I checked my images (view in browser) and the main folder was missing in the link **scs**: public_html `..scs ..>index.aspx ..>images ..>css ..>inc` In the end I ended up moving the code from masterpage to index for linking and `images/image.jpg` and `src="inc/slick/slick.min.js"` However, it still goes funny when I do the same from masterpage. Thanks for your time buddy.
comment on: http://stackoverflow.com/a/28072919
type: AnswerComment
score: 0

wordpress
tags question: http://stackoverflow.com/q/27992764
tags question: http://stackoverflow.com/q/28111618
tags question: http://stackoverflow.com/q/27983546
tags question: http://stackoverflow.com/q/28107915
tags question: http://stackoverflow.com/q/28086643
tags question: http://stackoverflow.com/q/28100257
tags question: http://stackoverflow.com/q/27973317
tags question: http://stackoverflow.com/q/28011666
tags question: http://stackoverflow.com/q/28005823
tags question: http://stackoverflow.com/q/27971189
tags question: http://stackoverflow.com/q/28076253
tags question: http://stackoverflow.com/q/28014560
tags question: http://stackoverflow.com/q/28076472
tags question: http://stackoverflow.com/q/28033460
tags question: http://stackoverflow.com/q/28071570
tags question: http://stackoverflow.com/q/27972209
tags question: http://stackoverflow.com/q/28098704
tags question: http://stackoverflow.com/q/28085826
tags question: http://stackoverflow.com/q/27969563
tags question: http://stackoverflow.com/q/28055312
tags question: http://stackoverflow.com/q/27994792
tags question: http://stackoverflow.com/q/27993753
tag name: wordpress
tags question: http://stackoverflow.com/q/28055342
tags question: http://stackoverflow.com/q/28088376
tags question: http://stackoverflow.com/q/27969806
tags question: http://stackoverflow.com/q/28113169
tags question: http://stackoverflow.com/q/28003538
tags question: http://stackoverflow.com/q/27972845
tags question: http://stackoverflow.com/q/28119840
tags question: http://stackoverflow.com/q/28062345
tags question: http://stackoverflow.com/q/27993633
tags question: http://stackoverflow.com/q/28007126
tags question: http://stackoverflow.com/q/28007390
tags question: http://stackoverflow.com/q/28101121
tags question: http://stackoverflow.com/q/28095676
type: Tag
tags question: http://stackoverflow.com/q/28118188

http://stackoverflow.com/a/28061815
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/28061474
downvote count: 0
has body: check this out $("#container .like a img").on("click", function(){ $("#container .balloons a img").addClass("anima").one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend' , function(event){ $(this).removeClass("anima"); }); }); here the working solution http://jsfiddle.net/muhaimincs/n3no4759/14/

http://stackoverflow.com/comment/44476999
comment on: http://stackoverflow.com/q/28047255
score: 0
type: Comment
type: QuestionComment
has text: yeah it's a PHP method, that's why i'm asking also how to call it in jquery?

http://stackoverflow.com/q/28022743
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/44433667
has comment: http://stackoverflow.com/comment/44432035
has comment: http://stackoverflow.com/comment/44431849
has comment: http://stackoverflow.com/comment/44431396
type: Question
has title: Issues with enabling and disabling div visibility
has comment: http://stackoverflow.com/comment/44453474
has body: I'm looking to create a similar window containing a form such as the one shown in the image below. In my case when the log in link on the top navigation bar is clicked the screen containing the form is called. My approach is to use a hidden div containing the form and its elements whilst calling functions to enable and disable the visibility of the div. Currently I'm styling the div to be hidden as seen in the class log_in_form_div in public.css. Below is my HTML code: Swim-mates - Sign Up or Log In ABCD corp LOG IN HOW IT WORKS FEATURES abcd.com Welcome message ... Welcome message ... Welcome message ... Welcome message ... Welcome message ... Caption A Caption B Caption C Log in with: Log in with Facebook Log in with Google Log in with Our details Sign up: Sign Up By signing up, I agree to the ABCD Terms of Service and Privacy Policy. Username Password Sign up for Beginner Pro Cancel Send ABOUT TERMS OF SERVICE FEATURES HELP Below is my CSS code: enter code here padding: 0; margin: 0; } /* Insert a gap after every element */ .footer_div ul:after { content:" "; display: block; font-size: 0; height: 0; clear: both; visibility: hidden; } /* ul li a */ .footer_div ul li a { font-family:'Trebuchet MS', Tahoma, Sans-serif; color: #F5F5F5; text-decoration: none; display: block; padding: 15px 15px; font-weight: bold; text-transform: uppercase; font-size: 19px; position: relative; -webkit-transition: color .25s; -moz-transition: color .25s; -ms-transition: color .25s; -o-transition: color .25s; transition: color .25s; } /* ul li a:hover */ .footer_div ul li a:hover { color: #000000; } /* Bullet point after the menu name .footer_div ul li a:after { content:""; display: block; position: absolute; right: -3px; top: 19px; height: 6px; width: 6px; background: #F5F5F5; opacity: .5; } */ /* Insert content before every element's content */ .footer_div ul li a:before { content:""; display: block; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: #00FF00; -w…
has comment: http://stackoverflow.com/comment/44433786
tagged with: javascript
has comment: http://stackoverflow.com/comment/44434137
has comment: http://stackoverflow.com/comment/44453501
has answer: http://stackoverflow.com/a/28023063
score: 0
has answer: http://stackoverflow.com/a/28022968
has comment: http://stackoverflow.com/comment/44431363
has answer: http://stackoverflow.com/a/28023104
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28023000

http://stackoverflow.com/comment/44466439
comment on: http://stackoverflow.com/q/28035300
has text: Just checked the JSbin link in FF and Chrome and it seems fine. I haven't tried **{{link-to}}** because the second list I want to populate is on the same page..
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27964603
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44358551
accepted answer: http://stackoverflow.com/a/27985324
answer count: 2
tagged with: algorithm
tagged with: javascript
tagged with: sorting
has comment: http://stackoverflow.com/comment/44356343
score: 0
possible better answer: http://stackoverflow.com/a/27965069
has answer: http://stackoverflow.com/a/27965069
favorite count: 0
has answer: http://stackoverflow.com/a/27985324
has title: No output in quicksort
tagged with: quicksort
has body: I'm trying to implement a quicksort function in JavaScript: function partition(l, low, high) { l[0] = l[low]; var pivotkey = l[low]; while (low &lt; high) { while (low &lt; high &amp;&amp; pivotkey &lt;= l[high]) { --high; } l[low] = l[high]; while (low &lt; high &amp;&amp; l[low] &lt;= pivotkey) { ++low; } l[high] = l[low]; } l[low] = l[0]; return low; } function qsort(l, low, high) { var pivotloc; if (low &lt; high) { pivotloc = partition(l, low, high); qsort(l, low, pivotloc - 1); qsort(l, pivotloc + 1, high); } return; } function quickSort(l) { qsort(l, 1, l.length - 1); return l; } console.log(quickSort([0, 1, 4, 3])); But this program output nothing in the terminal (with node qsort.js). Perhaps I'm missing something. Can anyone point me in the right direction? How to debug this kind of problems?

http://stackoverflow.com/q/27987099
has comment: http://stackoverflow.com/comment/44365374
has answer: http://stackoverflow.com/a/27987586
duplicate of: http://stackoverflow.com/q/6545964
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44365693
type: Question
has title: Prepend error message in correct area
tagged with: javascript
tagged with: jquery-validate
has body: I am using Jquery Validation for the error messages and cannot get them to show in the correct place. At present they are defaulted to show after the input field element. I would like the element to show in between the label and the input field. Current Outside Comms: This is the error message Ideal Outside Comms: This is the error message In the errorPlacement I have the below but it's not working. Everything I try either puts it before the label or after the input field but not in between. How can I tell it to put it in after the firstchild of the parent? error.prependTo( element.before ); Any help would be much appreciated. Thanks
linked to: http://stackoverflow.com/q/6545964
score: 0
has comment: http://stackoverflow.com/comment/44365461
answer count: 2
has answer: http://stackoverflow.com/a/27987945
tagged with: jquery

http://stackoverflow.com/a/27973271
has comment: http://stackoverflow.com/comment/44369795
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27973137
has body: The problem is this line: var process = Process.get({},{'Id': 2551}); you need something like this: $scope.process = Process.get({},{'Id': 2551}); You cannot reach Controller's variables from View. You can only access those defined in $scope. Also don't forget to inject $scope into your controller.
answers question: http://stackoverflow.com/q/27973137
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44340392
has comment: http://stackoverflow.com/comment/44348975

http://stackoverflow.com/comment/44332470
has text: Thank you for your answer; i checked, whenever onclick triggers i see " Uncaught TypeError: Cannot read property 'value' of null" in the relevant javascript function, Allthough the GetElementById function seems pretty fine... any insights?
comment on: http://stackoverflow.com/q/27968798
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28081578
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1
has body: Change <%= link_to "How It Works", about_path,"data-transition"=>"slide", "data-icon" => "info" %> <%= link_to "Contact", contact_path,"data-transition"=>"slide", "data-icon" => "mail" %> <%= link_to "News", news_path,"data-transition"=>"slide", "data-icon" => "bars" %> to this One Two Three You need to use data-role footer. see jsfiddle http://jsfiddle.net/5Lz3zd9y/2/ Alternatively, if you run into this issue anywhere else in jqm with horizontal buttons, here is an easy fix method using the jqm grid. http://jsfiddle.net/Ltx2md34/
type: Answer
accepted answer of: http://stackoverflow.com/q/28079970
answers question: http://stackoverflow.com/q/28079970

http://stackoverflow.com/q/28089416
tagged with: image
has title: How to change id of image using kineticjs
score: 0
has comment: http://stackoverflow.com/comment/44555662
answer count: 1
has comment: http://stackoverflow.com/comment/44557793
tagged with: kineticjs
has body: First i create an image with id:image1.then i want to change the id image1 into image2 and create new image with the id:image1...I tried but it is not working.can anyone help me? var image = new Kinetic.Image({ name: data, id: "image1", x: stage.getWidth()*0.5-20, y: stage.getHeight()*0.5-125, width:20, height:250, image: theImage, draggable: false }); image.setId("image2"); var image = new Kinetic.Image({ name: data, id: "image1", x: stage.getWidth()*0.5-200, y: stage.getHeight()*0.5-125, width:20, height:250, image: theImage, draggable: false });
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28112110
accepted answer: http://stackoverflow.com/a/28112110
type: Question
has comment: http://stackoverflow.com/comment/44559766
tagged with: javascript

http://stackoverflow.com/a/27980113
type: Answer
answers question: http://stackoverflow.com/q/27979964
has body: This is the updated code in relation to your JS code: function comprobar() { PageMethods.F1 ( $("input[type=text][id*=txt_nombre_nu]").val(), $("input[type=text][id*=txt_numero_empleado]").val(), $("input[type=text][id*=combo_empresa_nu]").val(), $("input[type=text][id*=txt_ceco]").val(), $("input[type=text][id*=combo_gestor_nu]").val(), $("input[type=text][id*=combo_crear_datos]").val(), function (msg) { if (msg == "") { alert("Datos correctos"); return true; } else { alert(msg); return false; } }, function (msg) { } ); return true; //now comprobar() always returns true; } Then this update in your HTML should do it: &lt;obout:OboutButton runat="server" ID="btn_mdu_confirmar" Text="Confirmar" CausesValidation="true" OnClientClick="return comprobar();" OnClick="btn_mdu_confirmar_Click"/&gt; You can check the outcome of the method PageMethods.F1 and check if this is true or false and return the outcome at the end of comprobar(). I can't update my code with this since I don't know how PageMethods.F1 works. (It isn't in your post).
score: 0

http://stackoverflow.com/comment/44432540
has text: may be this will help you.. http://buildinternet.com/2011/09/cycle-through-images-on-hover-with-jquery/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28023210

http://stackoverflow.com/comment/44424064
has text: What kind of programming background do you have? This would help someone explain
type: QuestionComment
type: Comment
score: 3
comment on: http://stackoverflow.com/q/28018652

http://stackoverflow.com/q/28054914
favorite count: 0
has body: This is more of a question regarding what to do in the scenario where you want to trigger a socket event for one user, that might be logged into another browser. I've got a couple of functions that update a users' workstack real-time (in a queue of other workstacks that are assignable by other users); however, if the user is logged into another browser at the same time, and do an update in one browser, it doesn't update in the other (as they have a different socket.id). I'm not sure what to do with this... I could do it based on the user ID of the person logged in, but at present my socket code does not have scope of any session variables and although there are modules such as session-socket - I'm not sure if that's the right path to go down. Can anyone advise a way I might approach this please?
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28105396
upvote count: 1
has comment: http://stackoverflow.com/comment/44585375
tagged with: socket.io
type: Question
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28105396
has title: SOCKET.IO - Usage of socket.id in two different browsers for same logged in user
answer count: 1
score: 1

http://stackoverflow.com/a/28057872
has body: I got it working by experimenting with putting the Braintree setup code in the angular controller and writing the post url call in node. I wanted to use Angular for as much as possible but writing the urls in Angular .Config routes didn't seem to be possible. Both answers I received helped me get it working. Thank you both. In controller $scope.$watch('cToken', function (newVal, oldVal) { //Watch for client token to be loaded then place in braintree.setup api call. if (!newVal) return; if (newVal){ console.log('set braintree'); braintree.setup($scope.cToken, 'custom', { id: "checkout", paymentMethodNonceReceived: function (event, nonce) { // Do something with the nonce here event.preventDefault(); } }); } }); In node.js app.js app.post('/api/generateNonce', routes.generateNonce); exports.generateNonce = function(req, res){ var nonce = req.body.payment_method_nonce; console.log('nonce '+nonce); gateway.customer.create({ id: 'clientId2222', paymentMethodNonce: nonce }, function (err, result) { var result = JSON.stringify(result); console.log('result '+ result); console.log(result.success); console.log(result.message); // e.g f28wm }); res.send(nonce); } And front end. &lt;form name="creatClientForm" class="css-form" id="checkout" action="/api/generateNonce" method="POST" enctype="multipart/form-data"&gt; &lt;input data-braintree-name="number" value="4111111111111111"&gt; &lt;input data-braintree-name="expiration_date" value="10/20"&gt; &lt;input type="submit" id="submit" value="submitform"&gt; &lt;/form&gt;
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/28037645
upvote count: 2
type: Answer

autocomplete
tags question: http://stackoverflow.com/q/28113393
tags question: http://stackoverflow.com/q/27999050
tags question: http://stackoverflow.com/q/28077795
tags question: http://stackoverflow.com/q/27978374
type: Tag
tags question: http://stackoverflow.com/q/28081905
tag name: autocomplete
tags question: http://stackoverflow.com/q/28003771
tags question: http://stackoverflow.com/q/28004500
tags question: http://stackoverflow.com/q/28038584
tags question: http://stackoverflow.com/q/28003176

http://stackoverflow.com/q/27978382
tagged with: email
has answer: http://stackoverflow.com/a/27978399
favorite count: 0
has comment: http://stackoverflow.com/comment/44349128
answer count: 5
has title: Do all valid emails contain at least one @ symbol?
has comment: http://stackoverflow.com/comment/44349143
has answer: http://stackoverflow.com/a/27978438
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44348873
accepted answer: http://stackoverflow.com/a/27978444
type: Question
has answer: http://stackoverflow.com/a/66250132
score: 12
has comment: http://stackoverflow.com/comment/44348791
has answer: http://stackoverflow.com/a/27978444
has body: I'm not trying to come up with full email validation. I'm trying to prevent a specific problem: I've had users use the contact form on my website, which asks for "Name", "Email" and "Message", and just by hilarious mistake, I get the info, "First Name", "Last Name", "Message", and I think to myself, 'Shit where did I leave my Yellow Pages?' So, I don't want to validate email, I just want to remind people that it's not last name we're asking for it's email. I'm thinking I check for an @ symbol, and I want to make sure I'm not neglecting valid emails. Are there valid emails with no @ symbols in them?
tagged with: javascript
has answer: http://stackoverflow.com/a/63696122
upvote count: 14
possible better answer: http://stackoverflow.com/a/27978438
has comment: http://stackoverflow.com/comment/44348757
downvote count: 2
tagged with: validation

http://stackoverflow.com/comment/44596690
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28109903
has text: Well it doesn't work. I don't know what other comment this needs.
type: AnswerComment

http://stackoverflow.com/comment/44499846
score: 0
type: Comment
has text: @KenrickLay Take a look at your `defines`. I updated my code to show you where they would go, and this makes them globally available for injection throughout your application. As to the specifics of the API you're using, I can't really help you there. You may need to use the `goog!` prefix for the API you're using. Also, you may need to return a global window reference, as we do with Google Maps. The forum for those plugins might be the best place to post a question. Just so you know, this is messy business. But it does work reliably...
comment on: http://stackoverflow.com/a/28055789
type: AnswerComment

http://stackoverflow.com/a/27978566
score: 0
answers question: http://stackoverflow.com/q/27978528
has body: In your edit function call add function like this $scope.add() If you need to pass any parameters $scope.add(params)
type: Answer

http://stackoverflow.com/comment/44483356
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28049597
score: 0
has text: sure, ng-click or onclick will both work - and ng-click is what I used in my final solution. I wanted to use onclick in the example to better isolate the problem

http://stackoverflow.com/comment/44499906
score: 0
comment on: http://stackoverflow.com/q/28058519
type: Comment
type: QuestionComment
has text: It may not be a duplicate but the concepts are so closely related that it might as well be.

http://stackoverflow.com/a/28066724
has comment: http://stackoverflow.com/comment/44513299
has body: Try this updated code, I have never used flot before but if there is AJAX involved then it could be a case of Javascript being unable to bind to elements that have been created after DOM load, i.e. after each element has been loaded initially with the page. $(document).on("change", "input[type=checkbox]", function () { console.log("Changed!"); $.plot($(id), data2, options); }); By looking at the example demos in the link you provided its possible that elements are being created on the fly using AJAX. I could be wrong, worth a shot.
type: AcceptedAnswer
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28066509
score: 1
accepted answer of: http://stackoverflow.com/q/28066509
downvote count: 0

http://stackoverflow.com/comment/44488871
type: QuestionComment
type: Comment
has text: It is a variable that is stored in server cache at the beginning of the day when the program initializes. All the customers have a distinct URL that is used to query and then load the LOGIN_FACILITY_ID. We have to do this because if that ID ever was passed in a URL a savy user could change it and possibly access data of another customer. We store a lot in server cache because our web server has incredible amounts of processing power and ram and we utilize it to reduce the number of DB calls.
comment on: http://stackoverflow.com/q/28052509
score: 0

http://stackoverflow.com/a/28008260
has body: You are misunderstanding usage of data types. Array is an anonymous type, you don't name it's elements. If you want to know name of an array, then you must change this structure to a dictionary (map). var arrayMapping = { 'arr1': [...], 'arr2': [...] }; But by doing so remember that every array will have unique name. You will then could access your arrays like so: arrayMapping['array1'] But if for some reason you can't change this data structure then you need to create a help object, where you are mapping names to arrayIndex. But that will increase code complexity, and will need to be wrapped in some sort of util class with getters. If your array contains 5 arrays and you want to get to them by name, then you need this sort of a structure: var arrayMapping = { 'arr1': { 'arr1_1': [], 'arr1_2': [], 'arr1_3': [], 'arr1_4': [], 'arr1_5': [], }, ... }; Not if you want to list all anmes of arrays that are inside arr1 map, then you should do something like this: Object.keys(arrayMapping['arr1'])// it will list arr1_1,...,arr1_5
answers question: http://stackoverflow.com/q/28008215
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/28008215
has comment: http://stackoverflow.com/comment/44416037
has comment: http://stackoverflow.com/comment/44408739

http://stackoverflow.com/a/28005416
has comment: http://stackoverflow.com/comment/44399383
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/28005359
has body: This error happens because chrome.tabs.executeScript without the tab ID argument tries to inject the code in the current active tab. Your error indicates that you had an (undocked) Dev Tools window open and focused when that code executed. It counts as the active tab. You need to be focused on the tab you want to inject the code to for it to work. Docking your Dev Tools will help with that.
score: 2
has comment: http://stackoverflow.com/comment/44399346
has comment: http://stackoverflow.com/comment/44399424
has comment: http://stackoverflow.com/comment/44399262
answers question: http://stackoverflow.com/q/28005359

http://stackoverflow.com/q/28118825
has comment: http://stackoverflow.com/comment/44613056
accepted answer: http://stackoverflow.com/a/28119295
has body: I have a login script that should return 'success' or 'failure' respectively, but it adds many spaces before the result, in the console it shows tha value as "<tons of space> success". This is the PHP for the login script: public function login() { global $dbc, $layout; if(!isset($_SESSION['uid'])){ if(isset($_POST['submit'])){ $username = mysqli_real_escape_string($dbc, trim($_POST['email'])); $password = mysqli_real_escape_string($dbc, trim($_POST['password'])); if(!empty($username) && !empty($password)){ $query = "SELECT uid, email, username, password, hash FROM users WHERE email = '$username' AND password = SHA('$password') AND activated = '1'"; $data = mysqli_query($dbc, $query); if((mysqli_num_rows($data) === 1)){ $row = mysqli_fetch_array($data); $_SESSION['uid'] = $row['uid']; $_SESSION['username'] = $row['username']; $_SERVER['REMOTE_ADDR'] = isset($_SERVER["HTTP_CF_CONNECTING_IP"]) ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER["REMOTE_ADDR"]; $ip = $_SERVER['REMOTE_ADDR']; $user = $row['uid']; $query = "UPDATE users SET ip = '$ip' WHERE uid = '$user' "; mysqli_query($dbc, $query); setcookie("ID", $row['uid'], time()+3600*24); setcookie("IP", $ip, time()+3600*24); setcookie("HASH", $row['hash'], time()+3600*24); echo 'success'; exit(); } else { //$error = ' It seems we have run into a problem... Either your username or password are incorrect or you haven\'t activated your account yet. ' ; //return $error; $err = 'failure'; echo($err); exit(); } } else { //$error = ' You must enter both your username AND password. '; //return $error; $err = "{\"result\":\"failure\"}"; echo json_encode($err); exit(); } } } else { echo '{"result":"success"}'; exit(); } return $error; } and the form and JS Log In E-Mail Password $(function login() { $("#login").validate({ // initialize the plugin // any other options, onkeyup: false, rules: { email: { required: true, email: true }, password: { required: true } } }); $('form').ajaxForm({ beforeSend: function() { return $("#logi…
has answer: http://stackoverflow.com/a/28119132
favorite count: 0
upvote count: 1
tagged with: php
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/44612021
has answer: http://stackoverflow.com/a/28119295
type: Question
has title: Many spaces before javascript result
has comment: http://stackoverflow.com/comment/44612283
has comment: http://stackoverflow.com/comment/44611914
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28118976
has answer: http://stackoverflow.com/a/28118976
has comment: http://stackoverflow.com/comment/44611838
answer count: 3

http://stackoverflow.com/a/28045707
answers question: http://stackoverflow.com/q/27987564
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: Solution: $(document).ready(function() { var report1table = $('#report1-datatable').dataTable(); function reporttable(minval,maxval,sap_retour,sap_hubew,nolkscan){ $.ajax({ type: 'POST', url: 'sources/report_table_scans.php', data: { miDate: minval, maDate: maxval, retour: sap_retour, hubew: sap_hubew, nolkscan: nolkscan }, success: function(result){ obj = JSON.parse(result); loadDatatable(obj['data']); }, error: function (result) { alert('Fehler beim Laden der Daten. ' + result.responseText); } }); }; function loadDatatable(aaData){ report1table.dataTable({ "dom": 'Tti', "deferRender": true, "serverSide": false, "paging": false, "data": aaData, "columns": [ { "data": "LSAP" }, { "data": "DatumSAP" }, { "data": "Warenempfaenger" }, { "data": "LSLK" }, { "data": "DatumLK" } ], "createdRow": function (row, data, index) { if (data['LSLK'] == null){ $(row).css('background-color', 'lightcoral'); } }, tableTools: { "aButtons": [ "copy", "print", { "sExtends": "collection", "sButtonText": "Save", "aButtons": [ "csv", "xls", "pdf" ] } ] }, "destroy": true }); };
accepted answer of: http://stackoverflow.com/q/27987564

http://stackoverflow.com/comment/44336487
has text: You'll probably have to simulate that with some javascript and divs. Or use a toolkit that supports this, I think the jQuery UI had something like that
comment on: http://stackoverflow.com/q/27971934
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44407548
type: Comment
comment on: http://stackoverflow.com/a/28009622
type: AnswerComment
has text: The error is `Recoverable fatal error: Object of class DatabaseStatementBase could not be converted to string in getCount()`
score: 0

http://stackoverflow.com/q/28072351
type: Question
linked to: http://stackoverflow.com/q/34049956
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: meanjs
has answer: http://stackoverflow.com/a/41290657
upvote count: 8
has answer: http://stackoverflow.com/a/28072652
accepted answer: http://stackoverflow.com/a/28072652
has answer: http://stackoverflow.com/a/30765875
tagged with: http://stackoverflow.com/tag/pdf
has comment: http://stackoverflow.com/comment/49851357
has answer: http://stackoverflow.com/a/28148409
answer count: 4
score: 8
tagged with: angularjs
has comment: http://stackoverflow.com/comment/63472281
has body: As title says, is there any PDF creator / generator for Angular? I have seen https://github.com/MrRio/jsPDF, but can't find any for Angular. I want to make an html page to a pdf file for download.
has title: Angular JS generating PDF - any creator - maker modules?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/30765875

http://stackoverflow.com/q/28078494
has answer: http://stackoverflow.com/a/28078535
upvote count: 0
answer count: 1
has body: In this program, the first input (textfield) represent the length and after I put a input and after I click the button I would that are creaed a number of text field equal to the input length. My problem is that the first input I capture but I don't know how create dynamically the text field. Here is my code: Inserisci Valore Ordina
tagged with: javascript
favorite count: 0
has title: How do Idynamically create an input tag in JavaScript
has comment: http://stackoverflow.com/comment/44535801
has comment: http://stackoverflow.com/comment/44535864
type: UnansweredQuestion
downvote count: 3
score: -3
type: Question

http://stackoverflow.com/q/28078550
has comment: http://stackoverflow.com/comment/44535939
has title: How to change label text via JavaScript/jQuery after click on HTML form
upvote count: 1
accepted answer: http://stackoverflow.com/a/28079019
tagged with: css
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28078722
type: Question
has comment: http://stackoverflow.com/comment/44536043
answer count: 2
has comment: http://stackoverflow.com/comment/44535998
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28079019
has body: I am looking for a way to change the text under a name form element on a squarespace.com site. This is a website that helps you build websites, but you cannot change the source code yourself. You can, however, inject JavaScript. I know the id of the two elements I want to change. Looking from the developer tools I see the elements are labels and have an input field with a string underneath as follows: &lt;label id="theLabel1"&gt; &lt;input type="text"&gt;&lt;/input&gt; "First Name" &lt;/label&gt; The HTML above only appears after having clicked an element with class name "theClickedClass". While injecting the following code (with jQuery available): &lt;script type="text/javascript"&gt; $(function() { $('.theClickedClass').click(function() { $('#theLabel1').text("THE NEW TEXT"); }); }); &lt;/script&gt; The HTML stays exactly the same as above. I know that the clicked function works since I put a console.log there. Adding a wait period (to wait for the label to actually exist) does not make a difference. I don't know why it does not work. Does anyone else have an idea how the text in the label can be changed? Thanks.
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/44536050
has answer: http://stackoverflow.com/a/28078722

http://stackoverflow.com/comment/44376327
comment on: http://stackoverflow.com/q/27992502
has text: reloadUserData only creates a new instance of a complex OOP data tree object used by all the application. The getUserData is just an accessor to the current instance.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27997352
has title: Jquery dialog box not close after ajax success
has body: function sendMsg(){ $.ajax({ beforeSend: function(){ $("#loading").dialog('open').html(" Please Wait... "); }, url: "${pageContext.request.contextPath}/WhoopieeMerchantAppConversationList", //(dynamically generated by product item), //(dynamically generated by product item) type: "get", data:"to_userid="+document.getElementById('to_userid').value+"&store_id="+document.getElementById('store_id').value+"&merchant_id="+document.getElementById('merchant_id').value+"&msg="+document.getElementById('msg').value, success: ajaxSuccessHandler }); } function ajaxSuccessHandler(obj) { if(obj=="error") { $('#loading').html(" Msg Already Sent "); } else { $("#loading").dialog("close"); alert("Message Sent Successfully"); var redirect_link = document.getElementById('redirect').value; setTimeout(function(){window.location.href=redirect_link},0); } } i want to close dialog box after the ajax call, but it still show at the back of alert box, please help
has comment: http://stackoverflow.com/comment/44384541
upvote count: 1
answer count: 1
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
score: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27997509
favorite count: 0
has comment: http://stackoverflow.com/comment/44384587
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/44384713

http://stackoverflow.com/a/55567095
has comment: http://stackoverflow.com/comment/110374406
has comment: http://stackoverflow.com/comment/112647668
upvote count: 11
type: Answer
score: 11
has body: I have a similar issue where the parent of the element where the overflow happens has overflow: hidden;. It's not a CSS attribute I can just remove. My solution to this is, instead of getting window.pageYOffset or document.documentElement.scrollTop, I get the Event object when the scroll is happening. From the Event object, we can get scrollTop property, like e.srcElement.scrollTop My event handler looks something like: onScroll(e) { if (e.srcElement.scrollTop &gt; 8) { // do something } } Then, bind this event to the element where the scroll is happening.
answers question: http://stackoverflow.com/q/28050548
downvote count: 0

http://stackoverflow.com/comment/44510663
score: 2
has text: "create separate thread" not really, javascript (in the browser) is single treaded
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28065173

http://stackoverflow.com/comment/44563933
comment on: http://stackoverflow.com/a/28093584
has text: I said *inside* the function.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44578259
type: Comment
has text: @LiangzeLu Demo? if at all using ng-repeat. look for quote wrapping href value, escape it `\'` and i dont know what version of angular you are using, other than very very old version you would need to include `angular-sanitize` script after the angular and in your app add dependency `angular,module('app', ['ngSanitize'])` and use ng-bind-html in `p` i.e ` `
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28101336

http://stackoverflow.com/comment/116263825
comment on: http://stackoverflow.com/q/28007779
type: Comment
type: QuestionComment
has text: Hey, has anyone found a solution to this?
score: 1

http://stackoverflow.com/comment/44588454
comment on: http://stackoverflow.com/q/28106592
has text: Which jQuery version are you using?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28009167
tagged with: onload
type: AnsweredQuestion
score: 2
tagged with: onmouseover
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
favorite count: 0
downvote count: 0
has title: Automatically load an image using javascript
has body: I'm using this code to build a gallery: window.onload=function(){ var image = document.getElementsByClassName('thumbnails')[0].getElementsByTagName('img'); var mainImage = document.getElementById('rr_lrg_img'); [].forEach.call(image,function(x){ x.onmouseover = function(){ mainImage.src = x.src; }; }); } The code loads different thumbnails on the big image when "onmouseover". Now I would like to "preload" the first image from that gallery of thumbnails. I tried using onload with rr_lrg_img.src=document.getElementsByClassName('thumbnails')[0].getElementsByTagName('img')[0].src but then it conflicts with the onmouseover. Any ideas? I can only use javascript, no jquery.
has answer: http://stackoverflow.com/a/28009283
accepted answer: http://stackoverflow.com/a/28009283

http://stackoverflow.com/a/27988991
score: 1
accepted answer of: http://stackoverflow.com/q/27988878
has body: you can use this code $(document).ready(function(){ $("#submitEventButton").click(function(){ //here is the line you want $("#treeFormContainer").css("min-height","50px"); var indexSelectedStatus = $("#selectStatus").val(); var selectedProjectStatusText = $("#selectStatus").text(); if($('#kmProjectInfo_name').val() == "" ) { alert( "Please provide a valid project name" ); //document.myForm.Name.focus(); $('#kmProjectInfo_name').focus(); return false; } //............................................................ //............................................................ //............................................................ return false; }); });
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27988878

http://stackoverflow.com/q/27974920
has body: I'm on an Angular project and I'm using the default ngRoute for routing. angular.module('myApp', ['ngRoute']) .config(function ($routeProvider, $httpProvider) { $routeProvider .when('/', { templateUrl: 'main', controller: 'mainController' }) .when('/login', { templateUrl: 'account/login', controller: "loginController" }) .otherwise({ redirectTo: '/' }); }); When I redirect to the login page, the login page appears as a partial view within my index.html page. However, I want the login form to appear within its own html page (without the headers and footers that exist on the other pages). Is it possible to achieve this using ngRoute, or do I need to switch to using ui-router?
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: ngroute
score: 2
answer count: 0
upvote count: 2
has title: Redirecting outside of ng-view in Angular using ngRoute
has comment: http://stackoverflow.com/comment/58007581
type: Question
tagged with: angular-ui-router
tagged with: javascript
downvote count: 0

http://stackoverflow.com/comment/44528323
score: 0
type: Comment
has text: Instead of tr i want to use the title
comment on: http://stackoverflow.com/a/28073909
type: AnswerComment

http://stackoverflow.com/comment/44383233
type: QuestionComment
comment on: http://stackoverflow.com/q/27995187
has text: About the last issue that you gave in chat: the issue is that you are passing totalBusLoc in moveNext function due to that the totalBusLoc inside that function is its local variable
score: 0
type: Comment

http://stackoverflow.com/comment/44997486
score: 0
type: Comment
has text: Thanks for that note, I'll link that from that section.
comment on: http://stackoverflow.com/a/28030718
type: AnswerComment

http://stackoverflow.com/comment/44465739
has text: not working @Arun. I am getting the result like this {color:#c91d1d}Hello
comment on: http://stackoverflow.com/a/28040587
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28113757
favorite count: 0
has title: Jump to track in BarUI playlist SoundManager2
has answer: http://stackoverflow.com/a/32299509
tagged with: soundmanager2
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28754274
possible better answer: http://stackoverflow.com/a/32299509
has body: So I've been searching all over the web for this, but didn't manage to find some propper documentation or enlightning answer. I'm trying to build a little online music player for fun and have gotten stuck on this simple task of jumping to a specific track in the BarUI playlist. For reference, here is the BarUI reference on the SoundManager2 page. To add a little bit of detail on my particular question: I'm adding a bunch of tracks to the playlist (by appending corresponding li HTML elements) and they get added alright After adding these elements (tracks) in my BarUI playlist, I want to jump down to the first one and begin playing them, however I have no ideea on how to control the BarUI (by interacting directly with SoundManager API, I am able to do this but the BarUI player is not aware of what track is playing, so basically I am playing the songs in background which is not what I want) Can anybody enlighten me on how can I jump to track or play track from the playlist of the BarUI ? (I imagine it should be just a matter of knowing which functions to call, as I am able to do this manually by scrolling down to the track and clicking the play btn) I hope it's not a very stupid question. I'll keep trying and post up the answer if I manage to come up with something useful. Thanks.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28194995
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/30216745
tagged with: javascript
has answer: http://stackoverflow.com/a/28949785
accepted answer: http://stackoverflow.com/a/28194995
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/44372213
comment on: http://stackoverflow.com/q/27989938
has text: This question isn't off-topic, it is a little too "do this for me", but the question is how to replicate the hover effect on that website. It isn't asking for any recommendations. Answer posted below with CSS only, hope it helps.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28060672
has answer: http://stackoverflow.com/a/28060712
has body: As you all know there is a toString() method for object which is called whenever the casting is required. I was wondering if there is such a method for casting to number (like the Date object in which +new Date() returns the getTime() method's value). For example (let's say there is toNumber method): function MyObj(){} MyObj.prototype.toNumber = function(){ return 1362; }
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28060712
type: Question
score: 2
answer count: 1
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/6401721
has comment: http://stackoverflow.com/comment/44502614
has title: Handling my object's casting to number
duplicate of: http://stackoverflow.com/q/6401721
linked to: http://stackoverflow.com/q/27989285
favorite count: 0
upvote count: 2

http://stackoverflow.com/q/27974477
has comment: http://stackoverflow.com/comment/44341779
type: Question
tagged with: java
tagged with: closures
score: 0
tagged with: functional-programming
upvote count: 1
has answer: http://stackoverflow.com/a/27975121
accepted answer: http://stackoverflow.com/a/27975121
answer count: 1
downvote count: 1
has title: What is a closure's real value proposition besides information hiding in multi-paradigm / functional languages like JavaScript?
tagged with: javascript
has comment: http://stackoverflow.com/comment/44341950
favorite count: 0
has comment: http://stackoverflow.com/comment/44341668
has comment: http://stackoverflow.com/comment/44341752
type: AnsweredQuestion
has body: When I first tried to understand closures, I was met by an impenetrable wall of paper of incomprehensibly presented computer science I had to understand before I could touch a closure. Then I learned, on more of a monkey see, monkey do basis, that while JavaScript keywords did not allow Java's idiom, of (excuse my hazy memory here): JAVA: class ObjectWithPrivateMember() { private int counter; public void ObjectWithPrivateMember() { counter = 0; } public void increment() { counter += 1; } public void decrement() { counter -= 1; } public void get_count() { return counter; } } JavaScript (ECMAScript as of some years back) had no real "private" / "protected" keyword, but a free translation of the Java idiom might be something like: JAVASCRIPT: var object_with_private_member = function() { var counter = 0; return { increment: function() { counter += 1; }, decrement: function() { counter -= 1; }, get_count: function() { return counter; } }; }(); And besides my immediate reaction of "Ewwwww, duct tape to try to dress up JavaScript as something it's not," I had mentally filed that as, "Ok, that is how to shoehorn the Java idiom with obscure details of JavaScript. This probably affords little direct insight into what is great about JavaScript." Now that I came back to address the question "What are closures really good for?", the Wikipedia entry gives a few details and suggests that information hiding may be a primary use case, not just in multi-paradigm languages with a heavy functional bent, but the usual suspects for first-class functional languages. Of course it is more detailed and offers more nuance, but it suggests that the textbook "JavaScript object with private fields" use case is not nearly as tangential as I assumed it was. What is (are) the real use case(s) a good functional programmer would see for closures in pure functional languages or multi-paradigm languages with a functional bent? Are they primarily used for information hiding (the Wikipedia article offer…

http://stackoverflow.com/q/28099389
score: 1
has body: I have a form that basically has a handful of properties that are shared between a few items. When you select the radio button for the item the text boxes enable for data entry, only one item can be selected at a time. I have everything setup and working except I do not want the bound values to display in the textbox if the control is disabled. I have been trying to work with the handlers but I am having a hell of a time trying to understand how to make things work the way I need. I have looked at many articles by Ryan and the custom handlers he has provided but I need an epiphany, but until then I am seeking your help. Also, is there a more appropriate way to handle the IsEnabled function I have created or is that the best way? Here is the JSFiddle Updated JSFiddle, instead of doing the value I am attempting to create a custom handler that disabled and deletes the value. It kinda works but it stops after a few updates and the value doesn't get updated. Here is some sample HTML: Item 1 Item 2 Item 3 Item 4 Here is the sample JS: var vm = { Selected: ko.observable('1'), Price: ko.observable(12), IsEnabled: function(item){ var selected = this.Selected(); return (selected == item) } } ko.applyBindings(vm); (function (ko, handlers, unwrap, extend) { "use strict"; extend(handlers, { enabledValue: { init: function (element, valueAccessor, allBindings) { var bindings = allBindings(); var enabled = ko.unwrap(bindings.enable); var value = unwrap(valueAccessor()); if (enabled) handlers.value.init(); }, update: function (element, valueAccessor, allBindings) { var bindings = allBindings(); var enabled = ko.unwrap(bindings.enable); var value = unwrap(valueAccessor()); handlers.value.update(element,function() { if(enabled) return valueAccessor(value); }); } } }); }(ko, ko.bindingHandlers, ko.utils.unwrapObservable, ko.utils.extend));
tagged with: knockout.js
has answer: http://stackoverflow.com/a/28105961
type: Question
tagged with: javascript
has title: Knockout custom handler to hide textbox value if it is disabled
possible better answer: http://stackoverflow.com/a/28115929
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/44595075
has answer: http://stackoverflow.com/a/28115929
has comment: http://stackoverflow.com/comment/44593815
favorite count: 0
accepted answer: http://stackoverflow.com/a/28105961
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/44601672

http://stackoverflow.com/q/28056962
has title: JQuery $.get() failing - readyState 0
has comment: http://stackoverflow.com/comment/44496211
has comment: http://stackoverflow.com/comment/44498289
tagged with: javascript
tagged with: jquery
has body: I'm trying to track the progress of an archive compression through requesting a txt file made, and updated by PHP via JQuery $.get(). The process works except for 1 or 2 requests that fail at random intervals and return the following: readyState: 0 responseText: status: 0 statusText: error In Chrome and Opera, there is also this next to the failed requests: "net::ERR_CONTENT_LENGTH_MISMATCH" Here is the code in question: function check_compression(archive_name, progress_file, unique_compression_id) { $.ajaxSetup ({ cache: false }); var request = $.get($.trim(progress_file)); request.success(function(data) { var percent = parseInt(data); if(percent != 100) { setTimeout(function() { check_compression(archive_name, progress_file, unique_compression_id); }, 100); } else { // Not finished } }); request.error(function(jqXHR, textStatus, errorThrown) { // Just some error reporting setTimeout(function() { check_compression(archive_name, progress_file, unique_compression_id); }, 500); }); } I have done a bit of research and ruled out possible situations: Same Origin Policy issue: All requests are done to a file on the same server. The progress_file var will be in a format such as: tmp_file.txt AdBlock is not enabled.
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/44498270
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44496088
has comment: http://stackoverflow.com/comment/44495629
answer count: 0
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/q/28116234
has comment: http://stackoverflow.com/comment/44618223
type: Question
tagged with: c#
tagged with: asp.net-mvc
has body: I added the code below to my MVC application and although google places autocomplete in my text field works, some JavaScript file throws an error now when one of the javascript files gets used or rendered. here is the error in visual studio. It errors occurs when I hit the submit button on my main page. Unhandled exception at line 626, column 256 in eval code 0x800a138f - JavaScript runtime error: Unable to get property 'value' of undefined or null reference here is the code I added to the head tag in _Layout.cshtml then I added the code below at the end of the body section in _Layout.cshtml and finally here is the form with the text field in index.cshtml that uses the places autocomplete. @using (Html.BeginForm("Results", "Home", FormMethod.Get)) { } the error gets thrown when the line below gets hit in the debugger. @RenderSection("scripts", required: false) I read other posts with the same error message and I tried var input = document.getElementById('<%=location.ClientID%>'); but it still errors. Updated! - I tried adding a hard coded value to input like below and now I get this error message both when the page first loads and also when I press submit. 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'getAttribute'
has comment: http://stackoverflow.com/comment/44616187
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28117265
has title: Javascript throwing a error after adding and running google places autocomplete code
tagged with: asp.net-mvc-4
type: UnansweredQuestion

http://stackoverflow.com/comment/44465858
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28041056
has text: Also, what jquery version?
type: Comment

http://stackoverflow.com/a/28102950
answers question: http://stackoverflow.com/q/28102711
accepted answer of: http://stackoverflow.com/q/28102711
downvote count: 0
has body: You can wait for the corresponding keyup event before taking in account a new keydown event for the enter key. pressed = {}; $(document).keydown(function(e){ if(pressed[e.which] == null &amp;&amp; e.which == '13'){ if($('#msform :input:visible').valid()) { page++; showPage(page); } } pressed[e.which] = true; }); $(document).keyup(function(e) { pressed[e.which] = null; });
type: AcceptedAnswer
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/a/28028531
downvote count: 0
has body: i wonder why you want to do that with jquery. i would do that in css. like that Your Inputs here then this in css .container { margin: 0 auto; width: 960px; } .col-12{ width: 100%; } .clear {clear: both;} .column {padding: 0 .8em; float:left;} col-6 would be width:50% col-3 would be width:25%
answers question: http://stackoverflow.com/q/28028332
has comment: http://stackoverflow.com/comment/44442115
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44475794
has comment: http://stackoverflow.com/comment/44469454

http://stackoverflow.com/q/28079662
has answer: http://stackoverflow.com/a/28079887
has title: Dynamic Div Width affecting other Div width
type: Question
has answer: http://stackoverflow.com/a/28079901
tagged with: javascript
score: 0
answer count: 2
type: UnansweredQuestion
tagged with: css
has body: How can the active change of an in-line div width affect the width of another in-line div? &lt;div&gt; &lt;div&gt;&lt;/div&gt; &lt;div&gt;&lt;/div&gt; &lt;/div&gt; Would javascript need to be used to resize both simultaneously? or is there a more elegant way with css? I don't believe the css calc method can be used in this case? width: calc(X-Y); Example: A similar concept would be the apple.com menu, where the expansion of the search box causes the change in div width of the menu tab item area. (apple uses a different method which I can't work out)

http://stackoverflow.com/comment/44437495
score: 0
has text: My fault, I hadn't saved it.
type: Comment
comment on: http://stackoverflow.com/a/28024780
type: AnswerComment

http://stackoverflow.com/q/28022380
score: 0
has comment: http://stackoverflow.com/comment/44430808
tagged with: angularjs
type: UnansweredQuestion
has title: AngularJS load service everytime the page is opened
has body: I am loading a message list in an inbox , the most recent 5 messages in the list. I have trouble refreshing the page so that the page always shows the latest 5 messages in the list. Message page just called the service the first time its opened. How do I recall the service ? For other services like user , I have been using $interval to update the $scope.data Is it possible to recall service everytime it is opened? Template {{message.user}} {{message.title}} x Service angular .module('starter.controllers', []) .factory("Messages", function() { var Messages = {}; return { getData: function($http) { return $http.get("http://website.com/index.php/id/user/get_message/i"). success(function(response) { /// console.log(JSON.stringify(response)); Messages.data = response.data; return Messages; }).error(function(data, status, headers, config) { // log error }); } } }); Controller angular .module('starter.controllers', []) .controller('MessagesCtrl', function($scope, Messages, $http) { Messages .getData($http) .then(function(data) { $scope.messages = data; }); });
has comment: http://stackoverflow.com/comment/44430981
has answer: http://stackoverflow.com/a/28022565
type: Question
linked to: http://stackoverflow.com/q/28059311
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/44390293
has text: Why do you think the program would need to exit "*when the for loop completes*"? There are still lots of open callbacks, each of them triggering another asynchronous action (`insert`) with its own callback.
comment on: http://stackoverflow.com/q/28000060
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/28110373
has body: Just add a check to see if the textbox has focus: $('#search-button, #search-text').hover(function searchbox () { $('#search-text').addClass("fixed-textbox"); },function () { if(!$("#search-text").is(":focus")){ $('#search-text').removeClass("fixed-textbox"); } }); //hide if focus out $("#search-text").on("focusout", function(){ //Only if textbox does not have a value if($("#search-text").val() == null || $("#search-text").val() == ""){ $('#search-text').removeClass("fixed-textbox"); } });
upvote count: 4
answers question: http://stackoverflow.com/q/28110309
downvote count: 0
type: Answer
score: 4

http://stackoverflow.com/comment/44447721
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28030697
score: 0
has text: Why not? I don't think there are other ways that provide the same level of security.

http://stackoverflow.com/a/28051943
has body: I decided to use switch(parseInt(boolB.toString()+boolA,2)){ case 0://neither [do something]; case 1://boolA [do something else]; case 2://boolB [do another thing]; case 3://both [do the other thing]; } which parses the booleans as bits in a binary number.
type: Answer
score: 3
answers question: http://stackoverflow.com/q/28051537
upvote count: 3
downvote count: 0

select
tags question: http://stackoverflow.com/q/28059029
tags question: http://stackoverflow.com/q/28073204
type: Tag
tags question: http://stackoverflow.com/q/28068795
tags question: http://stackoverflow.com/q/27965638
tags question: http://stackoverflow.com/q/28109715
tags question: http://stackoverflow.com/q/28116479
tags question: http://stackoverflow.com/q/28086378
tags question: http://stackoverflow.com/q/28035329
tag name: select
tags question: http://stackoverflow.com/q/28087929

http://stackoverflow.com/q/28072819
downvote count: 0
score: 1
tagged with: angularfire
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/28073296
has answer: http://stackoverflow.com/a/28073174
tagged with: firebase
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44529469
accepted answer: http://stackoverflow.com/a/28073296
possible better answer: http://stackoverflow.com/a/28073174
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44525837
has comment: http://stackoverflow.com/comment/44526804
tagged with: javascript
has body: we have an object that contains the users' notification data. how do we ignore all the firebase keys starting with $? because when calculating the size of the object with .filter('keylength', function() { return function(input) { if (!angular.isObject(input)) { throw Error("input was not an object!") } return Object.keys(input).length; } }) it returns the "wrong" number (I know it's correct, but in our case...) The object looks like this: $$conf: Object $id: "notifications" $priority: null $value: null __proto__: Object the filter returns "1", it should return 0 since the object has no child nodes
answer count: 2
has comment: http://stackoverflow.com/comment/44525921
has title: firebase object size: how to ignore properties with $?
tagged with: angularjs-filter

http://stackoverflow.com/comment/44539632
score: 0
type: AnswerComment
has text: Thanks for your answer. Actually I want to check an item is not select when the form is submitting.
type: Comment
comment on: http://stackoverflow.com/a/28080471

http://stackoverflow.com/q/27978302
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27978647
score: 1
has body: I am having trouble defining the proper terminology and if my understanding of the following code is correct. I create a constructor function function BoardGame () { this.count = 10; this.random = Math.floor((Math.random() * 100) + 1); } BoardGame.prototype.getNumber = function(){ // this is a button that is clicked $('.inputField').on('click', function (event) { this.guess= parseInt($('#inputField').val(), 10); $("'#inputField'").val(""); this.validChecker(); }.bind(this)); } BoardGame.prototype.validChecker = function() { if (this.guess &lt; 1 || this.guess &gt; 100) { $('#warning').append($('&lt;p&gt;&lt;/p&gt;')); } }; BoardGame.prototype.newGame = function () { game = new BoardGame(); } $(document).ready(function(){ game = new BoardGame(); game.getNumber(); }); In the document.ready function a new instance of a BoardGame is created and the reference is set to the game variable in the global scope. Then, the event listener is created. When the event listener inside of getNumber is clicked, it passes the "this" context (game) and it uses that as the this reference. It calls this.validChecker(). At some point, the game.newGame() is invoked. Now, a new instance of boardGame is re-assigned to the game variable. If I look into my "this" references, it references the old BoardGame object (before the re-assignment) not the new BoardGame instance recently created. If I change my newGame code to this: BoardGame.prototype.newGame = function () { BoardGame.call(this); } And run the newGame function, the "this" references, updates and changes the current object properties to the properties in the BoardGame constructor. It goes to the actual object instead of re-assigning. I'm not sure why this makes such a big difference, shouldn't the context of this change to the new assigned object? When I call new BoardGame() in the newGame function, why doesn't the "this" references change to the new object? It seems like there is a difference between changing the current object vs re-…
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27978647
has comment: http://stackoverflow.com/comment/44348759
possible better answer: http://stackoverflow.com/a/27978598
favorite count: 0
has answer: http://stackoverflow.com/a/27978598
has title: Variables "this" context not updating after re-assigning variable

http://stackoverflow.com/comment/44615034
has text: Hm, that's clever...check if the address is available first, then trigger the validation rather than the other way around. That might be crazy enough to work ;-) I'll check it out...
type: Comment
comment on: http://stackoverflow.com/a/28120194
type: AnswerComment
score: 0

http://stackoverflow.com/q/28076060
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/44535733
has body: I have an XML document like this: &lt;section&gt; &lt;description&gt;&lt;/description&gt; &lt;question&gt; &lt;description&gt;&lt;/description&gt; &lt;/question&gt; &lt;/section&gt; I have got the sectionXML stored in a variable called SectionXML. I use: section.description = SectionXML.getElementsByTagName("description")[0].childNodes[0]; section.description = section.description ? section.description.nodeValue : ""; However, SectionXML.getElementsByTagName("description") returns a list of many descriptions, as if we look many children deeper (great grand children etc) we can see they all have a description, but I just want to get the immediate child of SectionXML with the tag name of "description". How do I do that?
has comment: http://stackoverflow.com/comment/44531425
has comment: http://stackoverflow.com/comment/44531398
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
downvote count: 0
has title: Get xml dom child element in javascript
score: 1
accepted answer: http://stackoverflow.com/a/28076158
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28076158

http://stackoverflow.com/comment/44535950
comment on: http://stackoverflow.com/q/28078529
has text: Please "do you homework" - provide some code you're trying to use - then someone can explain you how to fix errors. Now there not enough information to help you
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/a/28086429
score: 14
has body: 1. Saving the base64 encoded image &lt;?php //save your data into a variable - last part is the base64 encoded image $encoded = "data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhE"; //decode the url, because we want to use decoded characters to use explode $decoded = urldecode($encoded); //explode at ',' - the last part should be the encoded image now $exp = explode(',', $decoded); //we just get the last element with array_pop $base64 = array_pop($exp); //decode the image and finally save it $data = base64_decode($base64); $file = 'data.png'; //make sure you are the owner and have the rights to write content file_put_contents($file, $data); 2. Getting the filename of base64 encoded image $encoded = "data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhE"; $decoded = urldecode($encoded); $exp = explode(';', $decoded); $exp = explode(':', $exp[0]); $image = array_pop($exp); echo ($image);
answers question: http://stackoverflow.com/q/28085848
has comment: http://stackoverflow.com/comment/68008145
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44551034
has comment: http://stackoverflow.com/comment/68007262
has comment: http://stackoverflow.com/comment/71328786
accepted answer of: http://stackoverflow.com/q/28085848
type: Answer
has comment: http://stackoverflow.com/comment/71340188
upvote count: 14
has comment: http://stackoverflow.com/comment/44551115

http://stackoverflow.com/a/28078411
type: Answer
accepted answer of: http://stackoverflow.com/q/28059469
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28059469
has body: Found it! it was the $year variable in both my taskqueue.php AND processing.php that was the issue. Changed it to $yearend and seems to work. Hopefully thats the end of it!
score: 0

http://stackoverflow.com/a/28118255
score: 0
has body: try this with regex: http://jsfiddle.net/mig1098/wh6n2oqL/ newEntry = function(entry){ var str2 = entry.replace(/\d+$/,''); var num = parseInt(entry.replace(/A_ID_R(\d+)_V/,'')); num = num+1; return str2+num; }
type: Answer
answers question: http://stackoverflow.com/q/28117991

http://stackoverflow.com/q/28029654
has comment: http://stackoverflow.com/comment/44484556
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/44444814
has comment: http://stackoverflow.com/comment/44445288
favorite count: 0
has answer: http://stackoverflow.com/a/28030456
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/44444974
has comment: http://stackoverflow.com/comment/44445190
accepted answer: http://stackoverflow.com/a/28030456
upvote count: 1
has comment: http://stackoverflow.com/comment/44500393
has comment: http://stackoverflow.com/comment/44445492
has title: Animating a simple 2D line in vanilla JS
downvote count: 0
tagged with: javascript
has body: I've been reading through guides on the internet, but I haven't been able to find a way to animate a line from one position to a new position. Apparently this requires "tweening", to create a smooth animation, and isn't built in? And all I ever find is "Check out THIS JavaScript framework that handles that for you!" Does something exist in vanilla JavaScript (or jQuery) akin to: animateLine(current, target, duration, easingFunction) { move(line.x1, target.x1, duration, easingFunction); move(line.y1, target.y1, duration, easingFunction); move(line.x2, target.x2, duration, easingFunction); move(line.y2, target.y2, duration, easingFunction); } I want to just iterate through an array of lines, calling animateLine(lines[i], targets[i], duration, easingFunction) inside of setInterval().
has comment: http://stackoverflow.com/comment/44445426
has comment: http://stackoverflow.com/comment/44444160
has comment: http://stackoverflow.com/comment/44445494

http://stackoverflow.com/comment/44495894
type: Comment
has text: i had a version of execCommand that i wrote for textareas, something like that might polyfill/facade your interaction enough to work
score: 0
comment on: http://stackoverflow.com/q/28055887
type: QuestionComment

http://stackoverflow.com/q/27968195
has title: Display saved data in dropdown list - html select tag
possible better answer: http://stackoverflow.com/a/27968251
tagged with: php
has answer: http://stackoverflow.com/a/27968251
score: 2
has answer: http://stackoverflow.com/a/27968309
downvote count: 0
tagged with: mysql
type: AnsweredQuestion
tagged with: javascript
type: Question
upvote count: 2
tagged with: jquery
has body: I have a static dropdown list in a form as below: Please select a Brand Apple Samsung Sony When User choose a brand, let say: Apple and Submit the form. The value "Apple" will be saved in mysql database. I have option for user to edit their form after submitting it. When user edits the form, I know how to retrieve data from mysql and echo it out but how to make this option which contains value "Apple" as selected so that this value "Apple" will be shown up as default in stead of "Please select a brand"? Thanks,
favorite count: 0
has answer: http://stackoverflow.com/a/27968263
accepted answer: http://stackoverflow.com/a/27968263
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44550057
comment on: http://stackoverflow.com/q/28085914
score: 0
has text: @SergeS the problem is due the browser crashes, I can't see the output.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27991754
score: 0
has title: How is the data passed from JSON to AJAX?
has body: I'm facing difficulties understanding the logic here. Ok, so let's say I have a class @RequestMapping(value="/GetPersons", method = RequestMethod.GET) public void loadPersons(HttpSession session, HttpServletRequest request, HttpServletResponse response) throws IOException { OutputStream out = response.getOutputStream(); List<Person> persons = personDAO.loadPersons(); Iterator iterator = persons.iterator(); JSONObject jsonObject = new JSONObject(); JSONArray jsonArray = new JSONArray(); while (iterator.hasNext()) { JSONObject object = new JSONObject(); object.put("name", person.GetName()); jsonArray.add(object); } jsonObject.put("data", jsonArray); OutputStreamWriter writer = new OutputStreamWriter(out); try { writer.write(jsonObject.toString()); }finally { writer.close(); } } And then I have a simple script in my index.jsp function loadPersons(json) { var obj = JSON.parse(json); var Person = obj.data; for (i = 0; i < myArr.length; i++) { $('#myId).append(' Test '); } } $.ajax({ url: "http://localhost:8080/Persons/getPersons", success: function (data) { loadPersons(data); }, error: function (xhr, ajaxOptions, thrownError) { } }); So my question is the following... What is the logic that goes on here? How is the JSONObject data passed to the $.ajax success and the function. The function takes an argument "data" but what is going to be passed? The whole getPersons method from the java or? The point here is to dynamically populate a simple dropdown by calling json object with ajax.
type: UnansweredQuestion
type: Question
tagged with: java
has comment: http://stackoverflow.com/comment/44374708
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27992030
has answer: http://stackoverflow.com/a/27992054
answer count: 3
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27991930
tagged with: ajax

http://stackoverflow.com/q/28112792
has comment: http://stackoverflow.com/comment/44599776
has title: ng-click does not fired inside compiled template
has comment: http://stackoverflow.com/comment/44600218
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44604186
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44600769
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44599601
has comment: http://stackoverflow.com/comment/44599608
has answer: http://stackoverflow.com/a/28112989
has comment: http://stackoverflow.com/comment/44599718
linked to: http://stackoverflow.com/q/21205250
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/44599711
has comment: http://stackoverflow.com/comment/44604680
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44599910
upvote count: 1
has body: I'm trying to create a popover with custom html with angularjs and twitter bootstrap. Since this function has not been implemented in angular-ui, I'm trying to use bootstrap methods inside angular directive. So I've created directive which contains such code: link: function(scope, element, attrs) { var templateData = " Cancel "; var compliedData = $compile(templateData)(scope); angular.element(element).find('a') .popover({html: true, content: compliedData}) .on('click', function(e) { e.preventDefault(); return true; }); } The problem I've got is that template is correctly added to the page, and popover works perfect. But ng-click method inside of compiled template does not fired at all. What I'm doing wrong and how can I do it right?
has answer: http://stackoverflow.com/a/28112983
tagged with: angular-ui
favorite count: 0

http://stackoverflow.com/comment/44444155
comment on: http://stackoverflow.com/q/28029294
has text: Well, your response looks incorrect so I have no idea how Chrome is able to give the correct answer.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27982752
has title: Publishing a chart from Google Sheets produces fixed-width result
has answer: http://stackoverflow.com/a/73858121
favorite count: 0
has answer: http://stackoverflow.com/a/62468941
has comment: http://stackoverflow.com/comment/65254952
accepted answer: http://stackoverflow.com/a/62468941
linked to: http://stackoverflow.com/q/35814138
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46794003
score: 7
possible better answer: http://stackoverflow.com/a/73858121
downvote count: 1
upvote count: 8
type: Question
has body: A client has many Google spreadsheets containing data from which they have generated charts on new sheets within the workbook. I have provided code which enables them to publish the chart (which previously generated a &lt;script&gt; element containing JSON), copypaste the published JSON into their CMS, and have the end result be a generated responsive &lt;iframe&gt;. The chart's width option is changed on the fly to match the container, and the usual trick of reloading the chart when the browser is resized handles keeping it that way. However, Google Sheets has been updated and the client's new charts only have an option to publish as "Link" or "Embed", where the latter is just an &lt;iframe&gt; wrapped around the former. As the &lt;iframe&gt; is published with a fixed width, I have updated my code to handle this alternative, changing the width attribute of the iframe on the fly. The problem is that the internal contents of this iframe are now completely generated by Google with a fixed width, rather than a width which matches the containing iframe (whose width I am setting). I can't reach into the iframe to modify the document from script, as it's from a different domain. The original chart embedded in the spreadsheet is responsive (resizing the browser window containing the spreadsheet resizes the chart very nicely) but I cannot see any way to maintain that effect during publishing. I could move everything out into script that directly uses the visualization API, but then it's not using the client's pre-generated charts (and it seems like every chart they produce is a different style/layout, which would be a maintenance nightmare). So: how can I publish a pre-existing chart from a Google Sheets document, with the published result being responsive in the same way as the original chart?
tagged with: google-visualization
tagged with: javascript
answer count: 2

http://stackoverflow.com/comment/44551651
has text: ok I got it, but how now I can return only dom element like this: j('.lol'), or this dom element attr like j('.lol').attr('href'); ?
type: Comment
comment on: http://stackoverflow.com/a/28087088
score: 0
type: AnswerComment

http://stackoverflow.com/q/28028602
answer count: 1
has answer: http://stackoverflow.com/a/28028656
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/28028656
has title: Setting display:none to cell on first row messes up table layout
tagged with: http://stackoverflow.com/tag/html
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
has body: I have the following example table-based grid layout that I'm having trouble with: http://jsfiddle.net/ccfa6kvb/1/ Basically my problem is that if I hide the gap cell on the first row, the rest of my gap column expands and messes up the layout. You can try this via the Toggle button I provided. The cell is being initially generated with display:none, but has both width and min-width set to it, just as the other ones in my column. What I see in the debugger is that somehow the third cell takes its place and calls out the shots on what width to set on the second column. Can someone please explain why this happens? Is there any way to avoid this?

http://stackoverflow.com/comment/44576865
score: 0
type: AnswerComment
type: Comment
has text: Well if this was the case, loadDataWithBaseUrl() is not the solution for my query. I could have just used loadData() with the html content having script tags inside it( ).
comment on: http://stackoverflow.com/a/28099589

http://stackoverflow.com/a/28071870
has body: Use gulp-notify. Note also you should use the browserify module instead of the deprecated gulp-browerify module. var browserify = require('browserify'), brfs = require('brfs'), watchify = require('watchify'), notify = require("gulp-notify"); var bundler = watchify(browserify({ basedir: "./public/js/src" })); // Browserify our code gulp.task('js', ['clean'], function() { // Browserify/bundle the JS. return bundler.bundle() // log errors if they happen .on('error', function(err) { return notify().write(err); }) .pipe(source('index.js')) .pipe(gulp.dest('public/js/dist')); }); Here example how to use browserify util in gulp task. Here another example how to use browserify and show notification, when js has syntax errors.
score: 6
answers question: http://stackoverflow.com/q/28051743
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28051743
type: Answer
upvote count: 6

http://stackoverflow.com/a/28090442
answers question: http://stackoverflow.com/q/28090293
type: Answer
has comment: http://stackoverflow.com/comment/44557441
score: 0
has body: if you want to select and hide all cells of one column you can try: $('td:nth-child(number_of_column)').hide();
has comment: http://stackoverflow.com/comment/44557658

http://stackoverflow.com/q/27989116
has answer: http://stackoverflow.com/a/27989169
score: -1
type: Question
has answer: http://stackoverflow.com/a/27989298
tagged with: http://stackoverflow.com/tag/xhtml
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27989265
has body: I am absolutly new in JavaScript and JQuery. I have a JQuery script that is performed each time the user click on a node of a JSTree: $("#treeId2").bind("select_node.jstree", function (event, data) { // DO SOMETHING }) In this script I have to retrieve the height of the div having id=treeId2 How can I do this thing in JQuery? Tnx
has comment: http://stackoverflow.com/comment/44369244
tagged with: http://stackoverflow.com/tag/html
answer count: 7
has title: How can I retrieve the height of a div in JQuery?
favorite count: 0
has answer: http://stackoverflow.com/a/27989146
has answer: http://stackoverflow.com/a/27989151
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27989272
downvote count: 2
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/27989229

http://stackoverflow.com/q/28111273
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28111305
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/28111305
answer count: 1
has title: can not disable a .btn-default when submitting a modal popup
tagged with: twitter-bootstrap
has body: I am working on an asp.net vmc5 and i am using bootstrap 3.0 &amp; jQuery 1.10.2, now i wrote the following script: function bindForm(dialog) { $('form', dialog).submit(function () { $('.btn btn-default').prop("disabled", "disabled"); $('#progress').show(); if ($(this).valid()) { $.ajax({ url: this.action, type: this.method, data: $(this).serialize(), and my modal popup that got submitted looks as follow:- &lt;div class="form-group"&gt; &lt;div class="col-md-offset-2 col-md-10"&gt; &lt;input type="submit" value="Save" class="btn btn-default" /&gt; | @Html.ActionLink("Back to List", "Index") &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; } &lt;span id="progress" class="text-center" style="display: none;"&gt; &lt;img src="~/img/ajax-loaders/ajax-loader-5.gif" alt="wait" /&gt; Wait.. &lt;/span&gt; but now when i submit the form the progress image will be shown (as mentioned inside the script) , but the submit button will not get disabled ? can anyone adivce on this please? Thanks

http://stackoverflow.com/comment/44470575
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28043903
has text: +1: for the unnecessary downvote. the question is tagged jQuery. And you really dont need jQuery for anything. Its a JavaScript library only
score: 2

http://stackoverflow.com/comment/104993260
type: Comment
has text: Also (at least for AngularJS 1.3.2) it threw this error for me when I mistakenly left off a quote on one of the attribute values, e.g., template: '<rect a="b" c="d /> ... That last quote is missing and threw the error.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/34284646

http://stackoverflow.com/q/28015662
linked to: http://stackoverflow.com/q/3522090
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44418896
downvote count: 0
has comment: http://stackoverflow.com/comment/44418532
type: Question
has title: Can I trigger an event with javascript redirect?
tagged with: javascript
has comment: http://stackoverflow.com/comment/44419446
has comment: http://stackoverflow.com/comment/44418965
upvote count: 2
has comment: http://stackoverflow.com/comment/44418680
has comment: http://stackoverflow.com/comment/44418810
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/44418777
favorite count: 0
has comment: http://stackoverflow.com/comment/44418557
has answer: http://stackoverflow.com/a/28015877
accepted answer: http://stackoverflow.com/a/28015877
has body: I have a redirect: That works perfectly, but I'd like to "trigger the event": $('#languagepopup').modal('show') at the same time. In html I would use a button with something like: onclick="$('#languagepopup').modal('show')" How can I do that with the redirect? Any help highly appreciated!
has comment: http://stackoverflow.com/comment/44418787
tagged with: http-redirect

http://stackoverflow.com/a/27964835
type: Answer
downvote count: 0
score: 7
has body: An Objekt has no defined order, so you cannot make sure this works well in every browser. You have to grab the keys, Object.keys(), sort them and loop through it by key. e.g.: var obj = { "01/15/2015_1": [ "example1" ], "01/15/2015_3": [ "example3" ], "01/15/2015_2": [ "example2" ] } var keys = Object.keys( obj ).sort(); var klen = keys.length; for( var idx = 0; idx &lt; klen; idx++ ){ console.log( obj[ keys[ idx ] ] ) }
upvote count: 7
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27964697
answers question: http://stackoverflow.com/q/27964697

http://stackoverflow.com/a/37344944
has body: Although the question was posted more than one year ago, I still find it useful to tell that there is a plugin for WordPress which adds the double tap functionality to drop-down navigation menus with only one click. The plugin is called Black Studio Touch Dropdown Menu, and can be found here: https://wordpress.org/plugins/black-studio-touch-dropdown-menu/ Had the problem with DoubleTapToGo for a while, and now I've just found this useful plugin which just works without any configuration.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28071570

http://stackoverflow.com/comment/44363431
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27986128
has text: there is no element with id like `kc_start_`

http://stackoverflow.com/q/28028514
has comment: http://stackoverflow.com/comment/44443300
has comment: http://stackoverflow.com/comment/44442896
has title: bxSlider not properly reloading after changing src attribute
has comment: http://stackoverflow.com/comment/44443353
type: Question
has comment: http://stackoverflow.com/comment/44454466
has comment: http://stackoverflow.com/comment/44464834
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/44442949
has comment: http://stackoverflow.com/comment/44443047
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44442802
tagged with: bxslider
has body: I'm working on a website with a lot of images that are rendered in the default viewport, and therefore we cannot use lazyload. We have a slider with multiple images, where our idea is to only show 1 image, and when the page is fully loaded, change the src attribute and reload the bxSlider. However after we changed our src attributes and reloading the slider, we do not see the images appear on screen. We've moved around the scripts, tried to include some configuration inside the reload function, but we are unable to get our code to working. The console does not show any errors, and after checking our source code, we can see the src attribute is properly changed. We're using the following code: $(document).ready(function () { $('img.hidden').each(function () { $(this).attr('src', $(this).data('src')); $(this).show(); // The images are on display: none at first }); $('img.hidden').removeAttr('data-src'); slider.reloadSlider(); }); What is the best way to reload bxSlider after changing the src attributes? Using the above code works for normal images, but I do not know why it isn't working for images in the slider.
answer count: 0

http://stackoverflow.com/q/27968092
tagged with: javascript
score: 0
has body: I'd like to share a URL on Facebook without creating a Facebook app and can also be able to detect if the "share" button is pressed. Here is my code: With my code the share pop-up shows "The parameter app_id is required" How can I do this? Is it possible? Thanks in advance :D
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: facebook-javascript-sdk
has comment: http://stackoverflow.com/comment/44367973
type: UnansweredQuestion
tagged with: facebook
has comment: http://stackoverflow.com/comment/44344780
has comment: http://stackoverflow.com/comment/44344977
has comment: http://stackoverflow.com/comment/44340425
has title: Share URL on Facebook without using appId?
type: Question
has answer: http://stackoverflow.com/a/27969796

http://stackoverflow.com/comment/44493707
score: 0
has text: By the way, an example to test those nuances would be YouTube comment entry box: it's a ` ` inside an iframe.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28055887

http://stackoverflow.com/q/28079471
linked to: http://stackoverflow.com/q/17392857
upvote count: 1
duplicate of: http://stackoverflow.com/q/17392857
type: AnsweredQuestion
tagged with: javascript
tagged with: inheritance
tagged with: prototype
type: Question
answer count: 1
downvote count: 0
favorite count: 0
has title: Using Object.create for inheritance?
has answer: http://stackoverflow.com/a/28079650
has body: This code is from the MDN article on Object.create(): // Shape - superclass function Shape() { this.x = 0; this.y = 0; } // superclass method Shape.prototype.move = function(x, y) { this.x += x; this.y += y; console.info('Shape moved.'); }; // Rectangle - subclass function Rectangle() { Shape.call(this); // call super constructor. } // subclass extends superclass Rectangle.prototype = Object.create(Shape.prototype); Rectangle.prototype.constructor = Rectangle; var rect = new Rectangle(); The third to last line is the one that I'm confused about. What would be the difference between: A. how it is now. B. Rectangle.prototype = Object.create(Shape); C. Rectangle.prototype = new Shape(); Wouldn't all 3 ultimately yield the same result? The same attributes defined on rect and the same use of memory to define them? Yes, I have read the other StackOverflow questions addressing Object.create(). No, they did not fully address my confusion.
accepted answer: http://stackoverflow.com/a/28079650
tagged with: prototypal-inheritance
score: 1

http://stackoverflow.com/comment/44425115
comment on: http://stackoverflow.com/q/28019257
has text: Also see Mike West's article [Scope in JavaScript](http://www.digital-web.com/articles/scope_in_javascript/).
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44588385
type: Comment
has text: @briosheje: I have only this script. The difference like: add [1, 2, 3, 4, 5, 6..] elements. Time: JS [0.2s, 0.2s, 0.2s, 0.2s....] - JQuery [0.3s, 0.4s, 0.6s, 0.8s, 1.2s, 1.6s...]
comment on: http://stackoverflow.com/q/28106761
score: 0
type: QuestionComment

http://stackoverflow.com/a/27991936
type: Answer
has comment: http://stackoverflow.com/comment/44374985
has comment: http://stackoverflow.com/comment/44374827
has body: Try this if result is an array len = result[0].origin; alert(len);
upvote count: 1
has comment: http://stackoverflow.com/comment/44375170
score: 1
has comment: http://stackoverflow.com/comment/44374655
accepted answer of: http://stackoverflow.com/q/27991776
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44375039
answers question: http://stackoverflow.com/q/27991776
has comment: http://stackoverflow.com/comment/44375080
has comment: http://stackoverflow.com/comment/44374754

http://stackoverflow.com/a/28000650
has body: To prevent global access make sure your code is in a closure. If you want to expose an API you can do so using the module pattern. Closure (function() { var Game = {}; Game.giveMoney = function(money) { console.log('Gave money (' + money + ')'); }; })(); Wrap all your private code in an IIFE (Immediately Invoked Function Expression) which will lock it up into a closure. Module Then expose only custom functions back out of the closure so you can use them on the console (with supervision of course). window.Game = (function() { var player = { money: 500; }; player.giveMoney = function(money) { console.log('Gave money (' + money + ')'); player.money += money; }; player.takeMoney = function(money) { console.log('Took money (' + money + ')'); player.money -= money; }; return { giveMoney: function(money) { console.error('Don\'t Cheat! A fine was charged.'); player.takeMoney(Math.floor(player.money / 0.05)); } }; })(); window.Game.giveMoney(200);
answers question: http://stackoverflow.com/q/28000460
has comment: http://stackoverflow.com/comment/54254551
has comment: http://stackoverflow.com/comment/44390658
type: Answer
has comment: http://stackoverflow.com/comment/44432172
score: 4
has comment: http://stackoverflow.com/comment/44392308
upvote count: 4
has comment: http://stackoverflow.com/comment/44394324
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28000460

http://stackoverflow.com/comment/44544816
type: QuestionComment
has text: the json that php encoded is `Object {failData: " Write Your 1st Note !! "} controller.js:19`
score: 0
comment on: http://stackoverflow.com/q/28083156
type: Comment

http://stackoverflow.com/a/28031215
score: 0
answers question: http://stackoverflow.com/q/28031167
type: Answer
has body: It isn't elegant, but you could do something like: $x=array(); foreach($date as $k =&gt; $v){ $x[$k]=array($v,$pi[$k],$name[$k]) }

http://stackoverflow.com/comment/44457152
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28033302
has text: hmm, okay yeah, I guess I can see how it could be more difficult. I dont know, I was really trying to figure out how to have the url change when a new image/video is randomized but the rest of the page would stay static. What would you recommend as the best approach for doing this server sided?

http://stackoverflow.com/a/28097928
downvote count: 0
has comment: http://stackoverflow.com/comment/44571833
type: Answer
answers question: http://stackoverflow.com/q/28097666
has body: this solution uses pure javascript. Stuff should be placed here. Apple Orange Candy
accepted answer of: http://stackoverflow.com/q/28097666
upvote count: 5
score: 5
type: AcceptedAnswer

http://stackoverflow.com/q/28115714
has body: I'm trying to ensure that upon loading the frame state, that my $rootScope has all the necessary properties defined from previous states. The ionic.utils module is properly injected into my angular app. This module comes from my services.js file. angular.module('ionic.utils', []) .factory('dataService', ['$rootScope','$q','$timeout', function($rootScope, $q, $timeout) { return { get: function() { var deferred = $q.defer(); $timeout(function() { deferred.resolve($rootScope); }, 2000); return deferred.promise; } } }]); Inside my controllers.js file, this is the corresponding controller for my frame state: .controller('FrameCtrl', ['$scope','$state','$rootScope','dataService', function($scope, $state, $rootScope, dataService) { // get active address and delivery time. dataService.get().success(function() { console.log("derp"); }); }]) However, this controller returns the following console error upon state transition: ionic.bundle.js:17696 TypeError: Cannot read property 'get' of undefined at new &lt;anonymous&gt; (controllers.js:201) at invoke (ionic.bundle.js:11591) at Object.instantiate (ionic.bundle.js:11602) at $get (ionic.bundle.js:14906) at updateView (ionic.bundle.js:42986) at IonicModule.directive.directive.compile.eventHook (ionic.bundle.js:42933) at Scope.$get.Scope.$broadcast (ionic.bundle.js:20605) at $state.transitionTo.$state.transition.resolved.then.$state.transition (ionic.bundle.js:34122) at deferred.promise.then.wrappedCallback (ionic.bundle.js:19197) at ionic.bundle.js:19283 I'm having trouble finding the error in the service I've written. Some help would be greatly appreciated! EDIT After adding the dependency injections into my controller, now the error has changed. Here it is: TypeError: object is not a function at new &lt;anonymous&gt; (controllers.js:202) at invoke (ionic.bundle.js:11591) at Object.instantiate (ionic.bundle.js:11602) at $get (ionic.bundle.js:14906) at updateView (ionic.bundle.js:42986) at IonicModule.directive.directive.compile.…
answer count: 2
accepted answer: http://stackoverflow.com/a/28118919
has comment: http://stackoverflow.com/comment/44611882
has title: making an angular service for a rootscope promise
downvote count: 0
possible better answer: http://stackoverflow.com/a/28115922
favorite count: 0
tagged with: angularjs
tagged with: angular-services
tagged with: angularjs-http
tagged with: angular-promise
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/44611055
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28118919
has answer: http://stackoverflow.com/a/28115922

http://stackoverflow.com/a/28068482
type: Answer
has comment: http://stackoverflow.com/comment/44516999
score: 3
answers question: http://stackoverflow.com/q/28068387
has comment: http://stackoverflow.com/comment/44516396
upvote count: 5
has comment: http://stackoverflow.com/comment/44516427
has comment: http://stackoverflow.com/comment/44516632
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28068387
has body: Array's are number indexed and can't be accessed like that var array = []; array[0] = 'something'; In your case you need a object var obj = {}; obj['name'] = 'dave'; Be aware though that your code will now give NaN for length, as objects don't have a length property (so array.length wont work, giving you NaN when you try to increment/decrement it) You need to do Object.keys(obj).length to get the length i.e Object.keys({name:'bob'}).length will give a length of 1
has comment: http://stackoverflow.com/comment/44516460
downvote count: 2

http://stackoverflow.com/q/27976401
has comment: http://stackoverflow.com/comment/44345197
has comment: http://stackoverflow.com/comment/44345274
has comment: http://stackoverflow.com/comment/44345988
type: Question
answer count: 2
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44345242
tagged with: image
has body: I need to be able to change a small part of the img src. When an img is uploaded via a free CMS service the path to save the imgs is in a file called www.domain.com so the code then shows the image as &lt;img src="http://www.domain.com/images/image1.jpg but the images are actually saved on a cookie free subdomain named 'static'. So I need something to change the www to static onload. Please help I have tried several PHP and jQuery scripts, none have worked and I can't figure out why.
has answer: http://stackoverflow.com/a/27976480
has answer: http://stackoverflow.com/a/27976483
has title: Replace part of img src
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/44345278
tagged with: php

http://stackoverflow.com/q/28015952
tagged with: javascript
answer count: 2
has title: Meteor template iterate through array
downvote count: 0
tagged with: meteor
tagged with: meteor-helper
favorite count: 0
has answer: http://stackoverflow.com/a/28018453
has answer: http://stackoverflow.com/a/28019126
type: UnansweredQuestion
upvote count: 3
has body: js if (Meteor.isClient) { Template.body.helpers({ fixtures: function () { Meteor.call("checkTwitter", function(error, results) { return results.data.fixtures; }); } }); } if (Meteor.isServer) { Meteor.startup(function () { // code to run on server at startup }); Meteor.methods({ checkTwitter: function () { this.unblock(); var url = "http://api.football-data.org/alpha/teams/73/fixtures"; return Meteor.http.call("GET", url); } }); } html Tottenham Hotspur Click Me Date Home Result Away {{#each fixtures}} {{> fixture}} {{/each}} {{date}} {{home}} {{result}} {{away}} I am getting a list of fixtures of a football team and returning it as an array 'fixtures'. I could not get my template to list the fixtures. In the console 'resuls.data.fixtures' returns [obj,obj,obj, obj etc...]. Any idea what I am doing wrong?
type: Question
score: 3

http://stackoverflow.com/a/50440448
type: Answer
answers question: http://stackoverflow.com/q/27965262
has body: You can also try: webix.ui.datafilter.countColumn = webix.extend({ refresh: function (master, node, value) { node.firstChild.innerHTML = master.count(); } }, webix.ui.datafilter.summColumn);
upvote count: 2
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/87895336

http://stackoverflow.com/comment/44428679
comment on: http://stackoverflow.com/a/28018099
has text: `svgleft` is calculated as the RHS of the "left" box `(el1pos.left + el1W)`. `svgwidth` is calculated as the (X-pos-of-the-right-box - svgleft). Obviously this is wrong because you can't have elements in HTML that have negative widths. So you could start by working out how to change the code so that svgleft is set to the actual leftmost X of those two points (RHS of "left", or LHS of "right"). Then you can calculate a non-negative width. That's trivial. Making the needed changes to the `<path>` is also very simple. There are many intros to SVG available. Or you can read the SVG spec.
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/28014889
has body: I'm tying to make a basic AngularJS app that pulls values I have from a .json file. My code doesn't error when I run it, however it's not pulling the JSON values. I'm sure it's something simple and stupid that I'm missing, but I unfortunately can't figure it out. Also, the {{1+2}} function I have inside the controller was there so I could test to make sure the application wasn't erroring out on me. index.html Untitled Document {{contact.name}} {{1+2}} js/phonebook.js (function() { var app = angular.module('phonebook', [ ]); app.controller("getPhonebook", function($scope, $http) { $http.get('js/phonebook.json'). success(function(data, status, headers, config) { $scope.phonebook = data; }). error(function(data, status, headers, config) { alert('error'); }); }); })(); js/phonebook.json { "entries" : [ { "Name" : "Entry One", "Department" : "Department A", "Number" : [ { "Name" : "Front Line", "Phone" : "1234567890", "Tieline" : "84543982" }, { "Name" : "Back Line", "Phone" : "1243568790", "Tieline" : "58472989" } ], "Hours" : { "Sunday" : false, "Monday" : "9AM – 6PM", "Tuesday" : "9AM – 6PM", "Wednesday" : "9AM – 6PM", "Thursday" : "9AM – 6PM", "Friday" : "9AM – 6PM", "Saturday" : "9AM – 6PM" }, "Description" : "…" } ] }
accepted answer: http://stackoverflow.com/a/28015084
tagged with: angularjs
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/28015084
downvote count: 0
has title: AngularJS HTTP.get Request not Working
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/44424671
score: 0
type: AnswerComment
type: Comment
has text: [See this answer](http://stackoverflow.com/questions/5721724/jquery-how-to-get-which-button-was-clicked-upon-form-submission). On submit of form you can get value of the button which submitted the form.
comment on: http://stackoverflow.com/a/28018770

http://stackoverflow.com/comment/44358551
comment on: http://stackoverflow.com/q/27964603
type: Comment
type: QuestionComment
has text: @Meninx It isn't a part of the array to be sorted. Please see my comments in the C-like version (URI is commented under your answer).
score: 0

http://stackoverflow.com/q/27974365
tagged with: owl-carousel
tagged with: magento
tagged with: javascript
tagged with: magento-1.8
has comment: http://stackoverflow.com/comment/45385851
has comment: http://stackoverflow.com/comment/44367960
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/39410687
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44365632
has comment: http://stackoverflow.com/comment/44368229
has body: I'm using the Owl Carousel on a Magento site and I can get the slides showing properly, but cannot control the slider using any of it's functions... here's my html code: {{block type="cms/block" block_id="block_slide1"}} {{block type="cms/block" block_id="block_slide2"}} {{block type="cms/block" block_id="block_slide3"}} {{block type="cms/block" block_id="block_slide4"}} {{block type="cms/block" block_id="block_slide5"}} And here's my controls that I placed directly after the above html: jQuery(document).ready(function(){ jQuery('#main-slider').owlCarousel({ singleItem: true, slideSpeed: 200, stopOnHover: true, navigation: true }); }); And here's the error in console that I'm returning: In my header I have: And here is the output of the carousel, 'singleItem: true' doesn't seem to work as it's showing 2 slides at once:
has comment: http://stackoverflow.com/comment/44368031
type: UnansweredQuestion
score: 1
has title: Uncaught TypeError: undefined is not a function - Using Owl Carousel
upvote count: 1
has comment: http://stackoverflow.com/comment/44366337
has comment: http://stackoverflow.com/comment/44367328
has comment: http://stackoverflow.com/comment/44366838
type: Question

http://stackoverflow.com/q/28119086
has answer: http://stackoverflow.com/a/28120181
score: 0
tagged with: datagrid
answer count: 1
tagged with: javascript
tagged with: angularjs
type: UnansweredQuestion
has title: Working with ux-datagrid, angularJS and nested interations
has body: I got it working excellent with one template but ran into an issue trying to replace my inner ng-repeat with another template. Kind of like grouped data or more like nested data. so let me simplify my html here: and the index.items look like this: [{ "obj": { "name": "someName" } "focus": [ {"id": "something here"}, {"id": "Another etc"} ] }] // which template is basically copy and pasted from examples angular.module('ux').factory('whichTemplate', function () { return function (inst) { // now we override it with our method so we decide what template gets displayed for each row. inst.templateModel.getTemplate = function (item) { var name = item.focus ? 'innerFocus' : 'default'; // now we get the template from the name. return inst.templateModel.getTemplateByName(name); }; }; }); Trying to iterate a list with the focus array. Any ideas? I think it would make for a great example in the docs. Adding a fiddle. http://jsfiddle.net/uftsG/88/ Instead of putting all focus array in one li i'm trying to get them spread out while also having the item.obj.name above the list.
type: Question

http://stackoverflow.com/comment/44495340
has text: CSS filters might work for you...
comment on: http://stackoverflow.com/q/28056812
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28108371
has body: I did fix the issue after some playing around. It turned out that, in the newer versions of IE userAgent is not same in every versions. The user agent in my IE10 does not contain "MSIE", and I was trying to split the userAgent by "MSIE", and it was resulting a null pointer situation. So the IE version detection script changed from : if (browser == "ie") { var arr = navigator.userAgent.split("MSIE "); arr = arr[1].split("."); version = arr[0]; } To : if (browser == "ie") { var v1 = navigator.userAgent.indexOf("MISE"); var v2 = navigator.userAgent.indexOf("rv:"); if(v1 &gt; 0) { var arr = navigator.userAgent.split("MSIE "); arr = arr[1].split("."); version = arr[0]; } else if(v2 &gt; 0) { var arr = navigator.userAgent.split("rv:"); arr = arr[1].split("."); version = arr[0]; } Thanks :)
type: Answer
answers question: http://stackoverflow.com/q/28105287
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/28105287

http://stackoverflow.com/comment/44596362
score: 0
type: QuestionComment
type: Comment
has text: Thank you, I will look into this today and let you know my outcome!
comment on: http://stackoverflow.com/q/28098430

http://stackoverflow.com/a/28088115
accepted answer of: http://stackoverflow.com/q/28086944
score: 0
answers question: http://stackoverflow.com/q/28086944
type: AcceptedAnswer
has body: Thanks for the answers and comments. I am now able to download the file, however by violating the prerequisite of the question(i.e. anchor tag usage) I followed this. The methods below in the link does the job function SaveToDisk(fileUrl, fileName) { var hyperlink = document.createElement('a'); hyperlink.href = fileUrl; hyperlink.target = '_blank'; hyperlink.download = fileName || fileUrl; var mouseEvent = new MouseEvent('click', { view: window, bubbles: true, cancelable: true }); hyperlink.dispatchEvent(mouseEvent); (window.URL || window.webkitURL).revokeObjectURL(hyperlink.href); } However I now need to destroy the anchor tag created after downloading the link.
type: Answer

http://stackoverflow.com/q/27974079
favorite count: 0
has title: Get ID of Firebase Pushed Object Is Undefined
downvote count: 0
has comment: http://stackoverflow.com/comment/44341914
has comment: http://stackoverflow.com/comment/44341260
tagged with: firebase
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27974629
accepted answer: http://stackoverflow.com/a/27974629
type: Question
answer count: 1
tagged with: javascript
upvote count: 3
has body: Something very strange is happening whenever I try to get the ID of an item I pushed to my Firebase database... I used the code directly from one of their examples: var fireBaseRef = new Firebase(FIREBASE_ROOT); var id = fireBaseRef.child("flintstones").push(); id.set({ first: 'Fred', last: 'Flintstone' }, function (err) { if (!err) { //var name = id.key(); console.log("Set with ID: " + id); } }); When this code is run everything works as expected, the Forge portal shows the data was written properly to the database and I get the appropriate javascript console message: "Set with ID: https://myfirebaseurl.com/flintstones/-JfjdUW4BT32DMgeuAdt" The problem arises when I uncomment the line var name = id.key(); As soon as I do that I get a javascript error indicating that no such method exists ("Uncaught TypeError: undefined is not a function."), I don't know what this is happening and I need to use the key value (in this case "-JfjdUW4BT32DMgeuAdt") elsewhere. Can anyone tell me where I went wrong?

http://stackoverflow.com/q/28103961
has comment: http://stackoverflow.com/comment/44582891
downvote count: 3
has comment: http://stackoverflow.com/comment/44582894
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/15463003
has comment: http://stackoverflow.com/comment/44582863
type: UnansweredQuestion
score: -3
has answer: http://stackoverflow.com/a/28104915
has title: Javascript strangeness
upvote count: 0
has body: I have been toying around with a piece of code I can't get right. And have had some strange stuff with. The idea is to get a webserver run on a WiFi capable PIC to display a page. On the page is measurements and time/date (all values will be from the PIC) but for now i have these values in the HTML/javascript code as I design the page with Notepad++ I have the page roughly how I want it to look. The functionality works 9 out of 10. As you will see the button 'Refresh All (Measurements Time Date)' when pressed should cycle through values. When the PIC will run this button will call to the PIC to get new values and the page will be updated by the getElementById (as is already in the cycle function) The other two buttons make sure the reset values have all been filled out before clicking the 'Reset Values' button. These two buttons do what they should for now. Again when the PIC is running this the 'Reset Values' button will send a string to the PIC to reset those values (I have yet to code that here) The question I have is why the 'Refresh All' cycle code will not work. In other projects/code I can get this to work, but not here. So any help in what's stopping it would be great. And the other questions I have is to do with the functions in javascript. I would like to move them all up into the header section. But if i do none of the buttons will do anything, so i leave the code close to where it's doing things. What's up with that? Cheers Chris Here's the code as it is now: &lt;HTML&gt; &lt;HEAD&gt; &lt;TITLE&gt; Build 2 WD Rebuild &lt;/TITLE&gt; &lt;STYLE&gt; BODY {background-color:Orange; color:Black; text-indent:26px;} H1 {text-align:center;} #THmesRes {background-color:yellow;} #TDTldrw {background-color:#ccccff;} #dLDRW {background-color:white;} #TDTldrb {background-color:#666666;} #dLDRB {background-color:white;} #TDTbatt {background-color:#33cc00;} #dBATT {background-color:white;} #TDTlm35 {background-color:#ff0000;} #dLM35 {background-color:white;} #THtdtRes {b…
has comment: http://stackoverflow.com/comment/44582824
has comment: http://stackoverflow.com/comment/44582895
type: Question
has comment: http://stackoverflow.com/comment/44582881
duplicate of: http://stackoverflow.com/q/15463003
tagged with: javascript

http://stackoverflow.com/comment/44326366
type: QuestionComment
comment on: http://stackoverflow.com/q/27966493
has text: Your loop looks fine to me... did you write getRandomN()? can we see the code for that? Also, if you know that getRandomN()will only return values that match up to the indices of your tuple, you could replace the whole interior of the loop with one line: `tuple[getRandomN(pdf)] += 1;`
score: 1
type: Comment

http://stackoverflow.com/a/28077932
downvote count: 3
has body: As a follow-up. With primitives we have to draw them to the stencil buffer each frame, then render that to the render buffer. With a sprite it is a single draw call to show the texture. If you have many sprites with the same texture we can batch them all together in a single draw call (we can't do that with Graphics). Summary: For performance, use sprites (not WebGL primitive graphics!).
has comment: http://stackoverflow.com/comment/44542719
upvote count: 0
has comment: http://stackoverflow.com/comment/44639875
answers question: http://stackoverflow.com/q/28075197
type: Answer
score: -3
has comment: http://stackoverflow.com/comment/44606264

http://stackoverflow.com/q/28064565
has comment: http://stackoverflow.com/comment/44509966
has comment: http://stackoverflow.com/comment/44509417
answer count: 0
score: 0
has body: How do i retrive exact tick count from d3.scale.linear()? As you can seed from docs: Returns approximately count representative values from the scale's input domain. If i run code like this: d3.scale.linear().domain([ymin - offset, ymax + offset]).range([100, 900]).ticks(6) I may receive from 3 to 7 ticks regarding input domain. So, what should i do if i need exact 6 evently spaced ticks from domain regarding they wouldn't be nice numbers such as multiples of powers of 10?
has title: d3.js scales exact ticks count
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44509676
type: Question
tagged with: d3.js

http://stackoverflow.com/comment/44429866
has text: @Guffa thanks for giving information. Learned new thing today
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28021752
type: AnswerComment

http://stackoverflow.com/comment/44585954
score: 0
has text: Try this $.each data, (i, object) -> var opt = new Option(object[key_method]).text, (object[value_method]) observer.append(opt)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28034771

http://stackoverflow.com/a/28091237
answers question: http://stackoverflow.com/q/28091018
has comment: http://stackoverflow.com/comment/44559222
type: Answer
has body: Instead of a px value use: span.dropdown ul.list { top:100%; } JSfiddle Demo
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/28091018
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/44383377
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27996437
has text: @revvy It does not send up JSON!!!.

http://stackoverflow.com/q/28061036
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/28061140
favorite count: 0
has comment: http://stackoverflow.com/comment/44503435
has comment: http://stackoverflow.com/comment/44503240
type: Question
has answer: http://stackoverflow.com/a/28061176
answer count: 2
upvote count: 16
tagged with: node.js
has title: Date conversion from dd/mm/yyyy to yyyy/mm/dd using javascript
linked to: http://stackoverflow.com/q/1056728
has comment: http://stackoverflow.com/comment/44503327
accepted answer: http://stackoverflow.com/a/28061176
has comment: http://stackoverflow.com/comment/44503249
duplicate of: http://stackoverflow.com/q/1056728
has body: I need to convert a date from dd/mm/yyyy to yyyy/mm/dd. I am getting the input from a text box in dd/mm/yyyy format.When i try to convert it to yyyy/mm/dd i got the error invalid date.How can i convert it properly.
has comment: http://stackoverflow.com/comment/44503307
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 16
has answer: http://stackoverflow.com/a/28061140
has comment: http://stackoverflow.com/comment/44503375
has comment: http://stackoverflow.com/comment/44503281
type: AnsweredQuestion

http://stackoverflow.com/a/28084227
score: 2
downvote count: 0
upvote count: 2
type: Answer
has body: It seem to be that you need to save the value of object when the last functions are executed. Try this : for(var i = 0; i &lt; objects.length; i++) { var object = objects[i]; queryForSubscription.count().then( (function(myObject){ return function(subscriptions) { var userEmail = myObject.get('email'); ... }; })(object) ); }
has comment: http://stackoverflow.com/comment/44547222
answers question: http://stackoverflow.com/q/28082786
has comment: http://stackoverflow.com/comment/44546543

time
tags question: http://stackoverflow.com/q/27978819
tags question: http://stackoverflow.com/q/28046767
tags question: http://stackoverflow.com/q/28098539
tag name: time
tags question: http://stackoverflow.com/q/27991718
type: Tag
tags question: http://stackoverflow.com/q/28019916
tags question: http://stackoverflow.com/q/28018754
tags question: http://stackoverflow.com/q/27966479

http://stackoverflow.com/comment/44334478
type: Comment
has text: Does it also give null in the console.log? It works for me. I know it sounds silly... But it's just about trying
comment on: http://stackoverflow.com/a/27968501
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44598606
type: Comment
comment on: http://stackoverflow.com/q/28096880
type: QuestionComment
has text: Well, I haven't tested that, but [the documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window.screenX#Browser_compatibility) says it is supported in Chrome too. It might be wrong ofcourse.
score: 0

http://stackoverflow.com/q/28086378
score: 0
has answer: http://stackoverflow.com/a/28087867
has title: angular-xeditable select is not saving
answer count: 1
accepted answer: http://stackoverflow.com/a/28087867
tagged with: angularjs
type: AnsweredQuestion
tagged with: select
has body: I have created an application in angularjs with xeditable plugin, The application is working fine but the issue is that when i click the edit button and change the select option to some other, and when click save, it is not saving, I am having a nested json for status field like as shown below http://jsfiddle.net/yspbcfuL/ Can anyone tell me some solution for this $scope.users = [ {id: 1, name: 'awesome user1', status: {uid: 2, text: 'status2'}, group: 4, groupName: 'admin'}, {id: 2, name: 'awesome user2', status: undefined, group: 3, groupName: 'vip'}, {id: 3, name: 'awesome user3', status: {uid: 2, text: 'status2'}, group: null} ];
type: Question
tagged with: x-editable
tagged with: javascript

http://stackoverflow.com/comment/61026022
type: Comment
has text: I guess it means end-of-line, like in a regular expression.
comment on: http://stackoverflow.com/a/28099030
score: 0
type: AnswerComment

http://stackoverflow.com/q/28099598
has comment: http://stackoverflow.com/comment/44575800
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/28099732
tagged with: css
has answer: http://stackoverflow.com/a/28099732
has answer: http://stackoverflow.com/a/28100022
accepted answer: http://stackoverflow.com/a/28100022
has title: How to fit a list of images in an HTML div to form a 2D grid?
type: AnsweredQuestion
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/44575014
score: 0
answer count: 2
has body: EDIT: Problem fixed. See my own answer for details. Will mark it as the answer in 2 days when SO lets me. I am populating a div with a list of square images using Knockout. The div is currently of fixed width and height, though will eventually be resizeable. I would like the images to fill up the div row by row. So when image n reaches the boundaries of the div's width, image n+1 is wrapped around to the next row. Currently, the images flow over the boundaries of the div to fill the entire window. The current markup is as follows: &lt;div data-bind="foreach: images" width="500" height="500"&gt; &lt;img data-bind="attr: { src: fileName }"&gt; &lt;/div&gt; I've played around with float and overflow with no success so far. I've also tried putting the images in their own divs. The images exhibit the wrapping behaviour I want in the whole window to form a grid, just not in the div I've put them in. How do I make the images stay inside the div while getting the grid that I want? Is this possible with HTML/CSS alone or does it require some Javascript?

http://stackoverflow.com/a/28049063
type: Answer
answers question: http://stackoverflow.com/q/28047686
score: 3
upvote count: 3
downvote count: 0
type: AcceptedAnswer
has body: so it looks like ionic has it's own click handler that removes the 300ms delay in mobile. I have to remove that tap system for the input so that I can trigger the click event http://ionicframework.com/docs/api/page/tap/ &lt;input data-tap-disabled="true" /&gt;
accepted answer of: http://stackoverflow.com/q/28047686

http://stackoverflow.com/comment/46554312
score: 0
has text: Have you found a way to tackle the problem yet? I'm faced with a similar situation at the moment.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28077917

http://stackoverflow.com/q/28101693
downvote count: 0
has answer: http://stackoverflow.com/a/28102500
has comment: http://stackoverflow.com/comment/44579249
tagged with: asp.net
favorite count: 0
type: Question
tagged with: twitter-bootstrap
has body: I'm obviously missing something in being able to display a modal dialog with a url action link. I know how to display a bootstrap dialog from a jQuery click event, but what I was hoping to do was the following: I have an Index page with a url.action link on it. When the user clicks on the link, I link to the appropriate controller action method (Edit) with no problems (seen during debugging) in the hope of displaying the bootstrap modal popup dialog. However, no modal dialog pops up. If I include a data-target on the action link, the link doesn't even work. If I remove it, it gets to the View, but no modal dialog pops up because there is nothing on the link that says what the data target is. I'm hoping I have the syntax incorrect on the link for the target of the modal popup. I'm hoping that if I include the proper bootstrap attributes for the dialog, it will pop up. I really could use some help here and would be much appreciated. Here is the link on my Index page (with the data target included). Note again that if I exclude the "data-toggle" and "data-target" from the below code snippet, I get to the View, but no dialog pops up. data-toggle="modal", data-target="#categoryEditModal" &lt;a href="@Url.Action("Edit", "Category", new { area = "Categories", id = item.CategoryID }) data-toggle="modal", data-target="#categoryEditModal"&gt;&lt;span class="glyphicon glyphicon-edit" aria-hidden="true"&gt;&lt;/span&gt;Edit&lt;/a&gt; Here is my destination View. I can verify that while debugging, the Model.CategoryID and Model.CategoryDescription are populated in the Model. &lt;div class="modal" id="categoryEditModal" tabindex="-1" role="dialog" aria-labelledby="categoryModal-label" 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-hidden="true"&gt;&amp;times;&lt;/button&gt; &lt;h4 class="modal-title" id="categoryModal-label"&gt;Category Desc…
upvote count: 2
answer count: 1
tagged with: asp.net-mvc
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
score: 2
has title: Cannot display bootstrap dialog with an asp.net mvc url.action link

http://stackoverflow.com/a/28076533
downvote count: 3
upvote count: 0
answers question: http://stackoverflow.com/q/28076425
has body: If you just remove the broadcast, you should sent to everyone, even the sender. The broadcast namespace makes so the message is sent to everyone except the sender. Just check the docs. So for example io.sockets.in(socket.room) .emit('new message', { 'username' : socket.nickname, 'message' : data, 'color' : socket.color });
score: -3
type: Answer
has comment: http://stackoverflow.com/comment/44532083

http://stackoverflow.com/comment/44367192
score: 0
type: QuestionComment
type: Comment
has text: Any errors in the console?
comment on: http://stackoverflow.com/q/27987848

http://stackoverflow.com/q/28028857
tagged with: jquery
has answer: http://stackoverflow.com/a/28040706
upvote count: 2
has answer: http://stackoverflow.com/a/70354745
favorite count: 0
has answer: http://stackoverflow.com/a/28043008
has comment: http://stackoverflow.com/comment/44443031
has answer: http://stackoverflow.com/a/45651882
tagged with: twitter-bootstrap
type: UnansweredQuestion
answer count: 4
score: 1
tagged with: bootstrap-table
has comment: http://stackoverflow.com/comment/44443255
downvote count: 1
has title: with the Bootstrap Table plugin, how to set a search string on first load?
type: Question
has body: With the Bootstrap Table plugin (http://bootstrap-table.wenzhixin.net.cn/documentation/) how to set a search string when the table is loaded for the first time? Exists only a "data-search" attribute to enable the search input, but this doesn't valorize it. I looked for a "data-search-text" attribute but I've not found it.
tagged with: javascript

http://stackoverflow.com/comment/44462401
type: Comment
comment on: http://stackoverflow.com/q/28038612
has text: Okay. I get it. You did not include jquery 2.1.0
score: 0
type: QuestionComment

http://stackoverflow.com/q/28000409
score: 0
has answer: http://stackoverflow.com/a/28000435
answer count: 1
has body: This is my html file. The outputs I get are undefined for first alert and 20 for the second alert. Why is this so? What is happening here?
has title: Scope of variable i in Javascript
duplicate of: http://stackoverflow.com/q/500431
linked to: http://stackoverflow.com/q/500431
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/44390028
accepted answer: http://stackoverflow.com/a/28000435
tagged with: javascript

http://stackoverflow.com/comment/44477562
score: 1
type: AnswerComment
has text: @johnG `$('form', dialog)` is exactly does what you said, select the form within the dialog/modalContent. This wont select the form from the index view as you said. Also, you need to prevent the default action, check my edit.
type: Comment
comment on: http://stackoverflow.com/a/28044814

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/28070388
tags question: http://stackoverflow.com/q/28102146
tags question: http://stackoverflow.com/q/28080797
tags question: http://stackoverflow.com/q/28057806
tags question: http://stackoverflow.com/q/27970913
tags question: http://stackoverflow.com/q/27989402
tags question: http://stackoverflow.com/q/27997140
tags question: http://stackoverflow.com/q/28085078
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/27976245

http://stackoverflow.com/q/27994252
tagged with: firefox-developer-tools
tagged with: mozilla
has title: SourceMap or X-SourceMap handling
tagged with: firefox
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/41323854
has body: I can't get firefox (or any browser for that matter) to recognize the X-SourceMap header. For my code. The //# SourceMappingURL comment works on the browser side for me, but I can't use it for reasons specific to my system. I am curious under what conditions the X-SourceMap header is used to set sourcemaps, as I don't seem to be having success. I am thinking this related to how my code is fetched -- that the devtools somehow don't 'realize' that I'm fetching a javascript file for which a sourcemap should be fetched as well. https://hg.mozilla.org/mozilla-central/rev/5a0161f8a11e seems to show how this is implemented, but it's unclear to an eye unfamiliar with this codebase how it is determined that an X-SourceMap header is acted upon.
favorite count: 0
upvote count: 3
type: UnansweredQuestion
type: Question
score: 3
tagged with: source-maps

http://stackoverflow.com/a/28289713
has body: Are you calling the events correctly? What you are asking could most likely be a part of the API but there is no documentation or reference as to implement the "blurred effect". Although, if you call all the events correctly, it should give you the default behavior. Here's the sample code for the different events: var cafe = new google.maps.LatLng(37.869085, -122.254775); function initialize() { var panoramaOptions = { position: cafe, pov: { heading: 270, pitch: 0 }, visible: true }; var panorama = new google.maps.StreetViewPanorama(document.getElementById('pano'), panoramaOptions); google.maps.event.addListener(panorama, 'pano_changed', function() { var panoCell = document.getElementById('pano_cell'); panoCell.innerHTML = panorama.getPano(); }); google.maps.event.addListener(panorama, 'links_changed', function() { var linksTable = document.getElementById('links_table'); while (linksTable.hasChildNodes()) { linksTable.removeChild(linksTable.lastChild); } var links = panorama.getLinks(); for (var i in links) { var row = document.createElement('tr'); linksTable.appendChild(row); var labelCell = document.createElement('td'); labelCell.innerHTML = 'Link: ' + i + ''; var valueCell = document.createElement('td'); valueCell.innerHTML = links[i].description; linksTable.appendChild(labelCell); linksTable.appendChild(valueCell); } }); google.maps.event.addListener(panorama, 'position_changed', function() { var positionCell = document.getElementById('position_cell'); positionCell.firstChild.nodeValue = panorama.getPosition() + ''; }); google.maps.event.addListener(panorama, 'pov_changed', function() { var headingCell = document.getElementById('heading_cell'); var pitchCell = document.getElementById('pitch_cell'); headingCell.firstChild.nodeValue = panorama.getPov().heading + ''; pitchCell.firstChild.nodeValue = panorama.getPov().pitch + ''; }); } google.maps.event.addDomListener(window, 'load', initialize); :
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27984594

http://stackoverflow.com/comment/44397703
has text: Ok that's all I meant. So once you update the src attribute, I think you need to call .play() on the audio element
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28004404

http://stackoverflow.com/q/28110685
has comment: http://stackoverflow.com/comment/44595847
has body: I have a request from my client to add a unique form validation rule to a text input that excepts only 4 digits, no characters. The input only should take year format like 2015. The issue is that the client doesn't want the user to enter a year less than the current year and it cannot be more than 10 years past the current year. So I created a function like this: $scope.startYearPattern = function() { var date = new Date(); var year = date.getFullYear(); var regex = /^[0-9]{2}$/; if(EditProgCtrl.programDetails.academicYear > year && EditProgCtrl.programDetails.academicYear < year + 10 && regex); }; Then on the html I have: Start Year required field Wrong Year Format It doesn't work though so I am missing something, just do not know what is wrong.
tagged with: javascript
has title: AngularJS ng-pattern function with regEx and date on year input field
score: 0
has comment: http://stackoverflow.com/comment/44595092
answer count: 1
has answer: http://stackoverflow.com/a/28111524
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44595544
tagged with: regex
has comment: http://stackoverflow.com/comment/44595861
type: Question

http://stackoverflow.com/comment/129248508
type: QuestionComment
has text: All the answers so far (2) are about events on the server side. But you also need each client to know. I believe you would need to use web sockets or similar to get this happening. Or simpler (but nowhere near as good) would be for each client to poll the server for changes.
comment on: http://stackoverflow.com/q/28080704
score: 0
type: Comment

http://stackoverflow.com/a/28031266
answers question: http://stackoverflow.com/q/27974777
type: AcceptedAnswer
downvote count: 0
has body: I believe I've found a workable solution, though it may be a bit fragile. In debugging, it seems jQuery Mobile uses a state object attached to the history that contains a url property, which, when using a popstate compatible browser, is how they determine what URL to go back to. So simply calling history.replaceState with the url parameter is not sufficient. One must also provide a state object containing at least a url property. It seems there's an internal jQuery Mobile helper function that will take a URL, map it correctly relative to the root, create the state object, and then call history.replaceState. This API is $.mobile.navigate.navigator.squash(newUrl);. While I generally don't like using internal APIs, in this case, it seems to work very well! It'd probably also be trivial to write your own version of this method to do the equivalent behavior. Hopefully this helps others in the same situation.
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27974777

http://stackoverflow.com/q/28037933
type: AnsweredQuestion
downvote count: 0
has title: Titanium Back Button - Always closes my App
has body: I have a new problem with my App, i'm using Appcelerator Titanium for development. I want to lock the Backbutton from my Device, so the App wont close everytime when i use him. I want to close the App only if i'm at the primarymenu. So this is my code: Ti.UI.currentWindow.addEventListener('android:back',function(){ alert(Ti.App.PositionNow); if(Ti.App.PositionNow=='0') { alert('do quit'); } else if(Ti.App.PositionNow=='1') { Ti.App.multi_tableView.addEventListener('click',myfunction); var duration = 300; var setOldOpacity = Titanium.UI.createAnimation(); setOldOpacity.opacity = 1; setOldOpacity.zIndex = 1; setOldOpacity.duration = duration; var setOldBottom = Titanium.UI.createAnimation(); setOldBottom.bottom = 0; setOldBottom.duration = duration; var setOldTop = Titanium.UI.createAnimation(); setOldTop.top = 0; setOldTop.duration = duration; var animationHandler2 = function() { setOldTop.removeEventListener('complete',animationHandler2); Ti.App.multi_view_first.animate(setOldTop); Ti.App.multi_view_second.animate(setOldBottom); Ti.App.multi_tableView.animate(setOldOpacity); }; setOldTop.addEventListener('complete',animationHandler2); Ti.App.multi_view_first.animate(setOldTop); Ti.App.multi_view_second.animate(setOldBottom); Ti.App.multi_tableView.animate(setOldOpacity); alert('hallo1'); Ti.App.PositionNow = 0; } return false; }); I have an variable where i track the position from the user at the hierachy from the menu. So the App should only close when the position is "0". If the position is "1", there should be an animation, so this works, but during the animation, the app closes instantly. The code of the window is this: Ti.App.hs_win = Ti.UI.createWindow({ url: '/sites/homescreen/index.js', navBarHidden: true, fullscreen: true, modal:true, theme: "Theme.Titanium", orientationModes: [Ti.UI.PORTRAIT] });
type: Question
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/44486822
tagged with: android
answer count: 1
upvote count: 4
favorite count: 0
tagged with: appcelerator
has answer: http://stackoverflow.com/a/28042476
accepted answer: http://stackoverflow.com/a/28042476
has comment: http://stackoverflow.com/comment/44464691
tagged with: titanium
has comment: http://stackoverflow.com/comment/44495193

http://stackoverflow.com/q/27974437
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/44342696
has comment: http://stackoverflow.com/comment/44382596
type: Question
has body: If I have the next array in the scope $scope.colors = [ "red", "blue", "yellow", "orange", "black", "purple" ]; and I use an ng-repeat &lt;div ng-repeat="car in cars"&gt; I would like that for each iteration on that div will be added one of the colors from $scope.colors. I would like to have it added randomly or by order. I found that link http://www.whatibroke.com/?p=938 where there is a directive that adds a random class from a list, but I couldn't make it work in the ng-repeat, I paste the code from that example in case could help. app.directive("ngRandomClass", function () { return { restrict: 'EA', replace: false, scope: { ngClasses: "=" }, link: function (scope, elem, attr) { //Add random background class to selected element elem.addClass(scope.ngClasses[Math.floor(Math.random() * (scope.ngClasses.length))]); } } }); &lt;div class="test" ng-random-class ng-classes="classes"&gt;&lt;/div&gt; I know I could create something like myclass1, myclass2, myclass3, etc using the $index, but would prefer to use more descriptive classes names. Thank you
has answer: http://stackoverflow.com/a/27996183
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44344169
has title: AngularJs: I want to add a class from an array or list, for each iteration inside ng-repeat
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27996183
tagged with: angularjs
upvote count: 2
has comment: http://stackoverflow.com/comment/44342627
has comment: http://stackoverflow.com/comment/44341734
tagged with: angularjs-directive

http://stackoverflow.com/q/28073055
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/28076871
has title: I am working on a summation script for PDF JavaScript
tagged with: javascript
type: UnansweredQuestion
has body: This works fine when all the fields have a value but if a field is empty it acts like a string puting all the values the field. I would like this to sum up all fields even if the field is empty. This script is being added on the "custom calcuation script" on my total field (Amount on Schedule F_11). Please var v1 = getField("Amount on Schedule F_1a").value; var v2 = getField("Amount on Schedule F_1b").value; var v3 = getField("Amount on Schedule F_37").value; var v4 = getField("Amount on Schedule F_46").value; var v5 = getField("Amount on Schedule F_2").value; var v6 = getField("Amount on Schedule F_3b").value; var v7 = getField("Amount on Schedule F_4b").value; var v8 = getField("Amount on Schedule F_5a").value; var v9 = getField("Amount on Schedule F_5c").value; var v10 = getField("Amount on Schedule F_6b").value; var v11 = getField("Amount on Schedule F_6d").value; var v12 = getField("Amount on Schedule F_7").value; var v13 = getField("Amount on Schedule F_8").value; var v14 = getField("Amount on Schedule F_8_1").value; var v15 = getField("Amount on Schedule F_8_2").value; var v16 = getField("Amount on Schedule F_8_3").value; var v17 = getField("Amount on Schedule F_8_4").value; var v18 = getField("Amount on Schedule F_8_5").value; var v19 = getField("Amount on Schedule F_8_6").value; var v20 = getField("Amount on Schedule F_8_7").value; event.value = ((v1+v2+v3+v4+v5+v6+v7+v8+v9+v10+v11+v12+v13+v14+v15+v16+v17+v18+v19+v20) !==0)? (v1+v2+v3+v4+v5+v6+v7+v8+v9+v10+v11+v12+v13+v14+v15+v16+v17+v18+v19+v20) :"";
tagged with: http://stackoverflow.com/tag/pdf
has answer: http://stackoverflow.com/a/28074131

http://stackoverflow.com/a/28115972
score: 5
has comment: http://stackoverflow.com/comment/44607038
type: AcceptedAnswer
upvote count: 5
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28115789
type: Answer
has body: The code is not quite equivalent between Javascript and Java. In Javascript, all numbers are doubles, so floating-point math will take place. However, in Java, integer division will take place, so that for example 1/4 will yield 0, not 0.25. As written, in Java I get 0.6856620239020387. Changing the Java numbers to use double literals: Double mu = M / (a * (1.0 - esq * (1.0 / 4.0 + esq * (3.0 / 64.0 + 5.0 * esq / 256.0)))); Now, I get the other number: 0.6868129133457879, the value I get in Javascript.
has comment: http://stackoverflow.com/comment/44607286
answers question: http://stackoverflow.com/q/28115789

http://stackoverflow.com/q/28058696
has body: I am using bootstrap and it gives .table elements the following styles: width:100%; max-width:100%; If I put that table into a container which is not wide enough to fit the table's contents, the table will ignore its max width and render wider than the container. The problem is that safari does not report the width of that table correctly. It reports it as if it were 100% of the container. Open this on chrome and then on safari: http://jsfiddle.net/6nfotj8j/2/ How can I get jquery to give me the correct width of the table without removing the max-width? (side note - this code will go into a jquery plugin, so id like to change/assume as little as possible about the underlying DOM) edit only affects safari version 7, works as expected in 5
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/28058893
tagged with: jquery
type: UnansweredQuestion
tagged with: css
tagged with: safari
has title: Get real table width in safari when max-width is defined
type: Question

http://stackoverflow.com/a/28078724
has comment: http://stackoverflow.com/comment/44542662
has body: Javascript objects don't have such feature like property binding. So the only way is to use QML object. If you have any calculation in JS you can put it in different js file. import "myObject.js" as SomeObjects QtObject { id: myObject property string myVar: "" function someCalculation () { SomeObjects.somefunction(myVar); } } Text { text: myObject.myVar } Component.onCompleted: { myObject.myVar = "Hello" }
has comment: http://stackoverflow.com/comment/44546903
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28069189
has comment: http://stackoverflow.com/comment/44543068
has comment: http://stackoverflow.com/comment/44542493
answers question: http://stackoverflow.com/q/28069189
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44547543
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/44543238
score: 2

http://stackoverflow.com/q/28017432
has title: websocket onmessage not firing during ajax request
tagged with: mojolicious
score: 0
tagged with: perl
has body: I have a web application that performs a Jquery .post request for database queries. I also have three different web socket connections that are used to push status updates from the server to the client (CPU and Memory stats in a live chart, database status, and query queue). While a query is not running, everything works smoothly, but once a query is started (post request), then the three web socket connections seem to hang/block while waiting for the query to return. I was reading about this and have not found any relevant answers...I suspect that it is probably something really dumb on my part...but this has had me scratching my head for the better part of a day now. I thought I might try moving the web socket connections to web workers...but in theory, the POST should not be blocking to begin with...So, here are the relevant snippets of code...The full source is a couple of thousand lines of code...so I didn't want to inundate anyone with it...but could show it if it is useful. So, the big question is what am I doing wrong here? Or perhaps, am I misunderstanding how AJAX calls work as far as blocking goes? // query execution button that grabs the query for the most recently focused query source (SPARQL editor, history, or canned) $("#querySubmitButton").on("click", function(e) { // Disable the query button $("#querySubmitButton").attr('disabled',true); // Let's make sure we are clearing out the work area and the popup contents $("#viz").empty(); // Get YASQE to tell us what type of query we are running var queryType = editor.getQueryType(); // refactored so that we can clean up the on-click function and also make other query types in a more modular way switch(queryType) { case 'SELECT': sparqlSelect(); break; case 'CONSTRUCT': sparqlConstruct(); break; case 'ASK': sparqlAsk(); break; case 'DESCRIBE': sparqlDescribe(); break; case 'INSERT': sparqlInsert(); break; default: popup.show("Unrecognized query type.","error"); break; } }); // Functions to do each of the q…
answer count: 1
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28053898
accepted answer: http://stackoverflow.com/a/28053898
type: Question

http://stackoverflow.com/a/28041165
accepted answer of: http://stackoverflow.com/q/28040959
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44466023
has body: jQuery's . trigger() is a synchonous operation, just like console. log(). Since JavaScript is single-threaded the order of execution in your example is guaranteed.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28040959
type: Answer

http://stackoverflow.com/comment/45319090
score: 0
has text: Managed to solve my issue: Turned out I had to reflow the chart after 100ms: `timeout(function() { chart.reflow(); }, 100);` and draw the series after 500ms: `$timeout($scope.addSeries, 500); ` This way I get to keep the loading/drawing animation too. Thanks!
comment on: http://stackoverflow.com/a/28014421
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28103625
has body: You should add click event only when the DOM is ready. NOTE: In the case of jsfiddle this is default behaviour. document.addEventListener("DOMContentLoaded", function(event) { document.getElementById('buybutton').addEventListener("click", function(e){ console.log("bought"); }); });
accepted answer of: http://stackoverflow.com/q/28103396
answers question: http://stackoverflow.com/q/28103396
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/44752502
has text: Timer functionality is in Javascript. I have used setTimeout
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28083115

http://stackoverflow.com/comment/44609872
score: 0
type: AnswerComment
has text: But wouldn't that make the sub-menu items not the part of the menu? It's a wordpress website, so I'm reluctant to make such changes.
comment on: http://stackoverflow.com/a/28117453
type: Comment

http://stackoverflow.com/a/27981323
score: 1
has body: I'm using this on one of my projects, it may work for you. //window events $(window).on('scroll', function(){ that = $(this); if(that.scrollTop()&gt;break_point){ //YOUR CODE } }); UPDATE I've worked on a work around for your problem. First of all try updating your jQuery, if the problem persists try using this: I already tested this on your page, it seems to be working fine. $(window).on('scroll', function(){ that = $(this); //because you are wrapping all contents var offsetTop = Math.abs($('.wrapper-1').offset().top); if(offsetTop&gt;break_point){ //CODE HERE } }); Honestly hope it works. Cheers
upvote count: 1
has comment: http://stackoverflow.com/comment/44354227
answers question: http://stackoverflow.com/q/27981065
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44350346
has text: Is about loading page with javascript.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27979013
type: QuestionComment

http://stackoverflow.com/comment/44345497
type: QuestionComment
has text: possible duplicate of [Access a JavaScript variable from PHP](http://stackoverflow.com/questions/2338942/access-a-javascript-variable-from-php)
comment on: http://stackoverflow.com/q/27976537
score: 0
type: Comment

http://stackoverflow.com/comment/44545959
has text: Try `e.preventDefault();` on the `click` handlers
comment on: http://stackoverflow.com/q/28084057
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/28066772
upvote count: 2
has comment: http://stackoverflow.com/comment/44553309
has comment: http://stackoverflow.com/comment/44550989
score: 2
answers question: http://stackoverflow.com/q/28066667
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28066667
has comment: http://stackoverflow.com/comment/44514856
type: Answer
has comment: http://stackoverflow.com/comment/44946618
has comment: http://stackoverflow.com/comment/44513358
has body: I believe it the directive is being called before it has the value. Wrapping it in a timeout works. App.directive('knob',['$timeout', function ($timeout) { return { restrict: 'A', link: function(scope, element, attrs) { $timeout(function () { // You might need this timeout to be sure its run after DOM render. $(element).knob(); }, 0, false); } }; }]);

http://stackoverflow.com/q/28041957
possible better answer: http://stackoverflow.com/a/28042012
has body: I have a problem in call a function. My example: jQuery(function($){ var testFunc = function(){ console.info('call jQuery testFunc'); } }); function callJqueryTestFunc(){ testFunc(); // error - function not exists } Please, someone help me? Thank you very much
upvote count: 1
answer count: 4
accepted answer: http://stackoverflow.com/a/28042080
type: AnsweredQuestion
has title: javascript function vs jquery function
downvote count: 3
type: Question
has answer: http://stackoverflow.com/a/28042028
linked to: http://stackoverflow.com/q/500431
score: -2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44467222
has comment: http://stackoverflow.com/comment/44467616
has answer: http://stackoverflow.com/a/28042080
has answer: http://stackoverflow.com/a/28042012
has comment: http://stackoverflow.com/comment/44467226
has answer: http://stackoverflow.com/a/28042035
favorite count: 0

http://stackoverflow.com/a/28085467
upvote count: 2
answers question: http://stackoverflow.com/q/28064159
has comment: http://stackoverflow.com/comment/44591530
accepted answer of: http://stackoverflow.com/q/28064159
has body: As I recall in a NodeJS environment you must do something like this to actually create a record: db.get('collectionName').insert({..something...}); or db.get('collectionName').save({...something...}); but you don't get to use the collection name as a property of db. The line you're mentioning is only used in MongoDB shell, which is not Javascript. I guess you're misunderstanding what's MongoDB shell and what's a MongoDB driver. So long story short MongoDB (driver) is not able to access an undefined property. EDIT In response to your comment.. MongoDB JS driver's GitHub page pretty much points out how to insert a field and always uses the syntax I mentioned: https://github.com/mongodb/node-mongodb-native As for what you're using in the shell it's pretty clear that you can't just use Javascript in a command shell. So I guess I'll point you to a place in which you can see in what language was MongoDB developed: http://www.mongodb.org/ pretty much the first line says it's written in C++. Hope this helps clarify your question
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/q/27983374
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44358692
has body: I need to create invoice number incrementing function like freshbooks. How t works in freshbooks is it increments number and alphabet both. Condition 1: if my invoice number is 0000012 it should be incremented to 0000013 Condition 2: if my invoice number is 000001a it should be incremented to 000001b and so on. Any idea on how to do that? My attempt: function replaceCharAt(string, index, character){ return string.substr(0, index) + character + string.substr(index + character.length) } function generateInvoiceNumber(invoiceNumber, useIndex){ var useIndex = useIndex || invoiceNumber.length - 1; var invoiceNumber = invoiceNumber.trim(); var incrementChar = invoiceNumber[useIndex]; if(incrementChar == '9' || incrementChar == 'z' || incrementChar == 'Z'){ if(incrementChar == 9){ invoiceNumber = replaceCharAt(invoiceNumber, useIndex, '0'); } else{ invoiceNumber = replaceCharAt(invoiceNumber, useIndex, 'a'); } return generateInvoiceNumber(invoiceNumber, useIndex - 1); } else{ var replaceChar = String.fromCharCode(incrementChar.charCodeAt(0) + 1); invoiceNumber = replaceCharAt(invoiceNumber, useIndex, replaceChar); } return invoiceNumber; } This does produce the correct results. but i am not sure about all conditions and if it will hang the event loop. I will write some test and try
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44358438
has comment: http://stackoverflow.com/comment/44358726
has comment: http://stackoverflow.com/comment/44358839
has comment: http://stackoverflow.com/comment/44359230
has comment: http://stackoverflow.com/comment/44358639
type: Question
has comment: http://stackoverflow.com/comment/44358299
has answer: http://stackoverflow.com/a/27985493
tagged with: javascript
has title: Freshbooks like invoice number increment in javascript
has comment: http://stackoverflow.com/comment/44359378

http://stackoverflow.com/a/28063768
answers question: http://stackoverflow.com/q/28045076
has body: With ajaxFileUpload sending additional data is not possible beacuse the option data that you use in your code is not available in the js library. Try using different jQuery plugin like jQuery-File-Upload where you can send additional data through formData option. Hope this helps you. Thanks
score: 0
type: Answer

http://stackoverflow.com/comment/44542398
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28081905
has text: Yes, Its JQuery UI auto-complete. I added All js and CSS of my page here.

http://stackoverflow.com/q/28080644
tagged with: bootstrapping
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/28080658
has comment: http://stackoverflow.com/comment/44539992
tagged with: node.js
type: AnsweredQuestion
score: 1
tagged with: web-applications
upvote count: 1
type: Question
has body: Consider I'm bootstraping a simple application (ie. node server.js), with the following pseudo-code: var http = require('http'); var path = require('path'); var fs = require('fs'); var router = require('function-that-handles-requests.js'); // ie, an express app var routes = '/path/where/routes/are/stored'; fs.readdirSync( routes ).forEach(function( file ){ var url = path.basename( file ); var handler = require( path.resolve(routes, file) ); router.useOrAddRouteOrWhatever( url, handler ); // a real-world implementation should recurse sub-directories too }); var server = http.createServer( router ).listen( /* ... */ ); Should I consider a bad practice doing that blocking I/O?
has answer: http://stackoverflow.com/a/28080658
tagged with: javascript
has comment: http://stackoverflow.com/comment/44539897
has title: Should I consider a bad practice doing blocking I/O during the application bootstrap? (node.js)

http://stackoverflow.com/a/28080892
has comment: http://stackoverflow.com/comment/44575563
has body: Seems you have more to learn about callbacks and sequencing. This is all the code inside your request handler that you need. Of course changing to send the response when you see what is happening. async.series( [ // List out exiting collection with 0 average function(callback) { Bourbon.find({},function(err,results){ async.eachLimit(results,10,function(result,callback){ var plain = result.toObject() plain.bourbonId = plain._id.toString(); plain.avgRating = 0; delete plain._id; db.insert(plain,callback); // next each iteration },callback); // move to next in series }); }, // Get aggregate results and update the items you just wrote function(callback) { Comment.aggregate( [ { '$group': { '_id': '$bourbonId', 'avgRating':{ '$avg':'$rating' } }} ], function(err,results) { async.eachLimit(results,10,function(result,callback){ db.update( { 'bourbonId': result._id.toString() }, {'$set': {'avgRating': result.avgRating } }, callback // next each iteration ); },callback); // next in series "last" } ); } ], // This is called when both in the series are complete function(err) { if (err) callback(err); db.find({},{'_id': 0},function(err,docs) { console.log( docs ); }); } ); The aim here is: Put 0 values in a hash table ( here using nedb ) for all items Get aggregation results from the other collection Update the copy of all items with those items that actually have a value When all is done then you read back your hash table Full working example: var async = require('async'), mongoose = require('mongoose'), DataStore = require('nedb'), db = new DataStore(), Schema = mongoose.Schema; var userSchema = new Schema({ "name": String }); var ratingSchema = new Schema({ "bourbonId": { "type": Schema.Types.ObjectId, "ref": "Bourbon" }, "userId": { "type": Schema.Types.ObjectId, "ref": "User" }, "rating": { "type": Number, "required": true } }); var bourbonSchema = new Schema({ "name": { "type": String, "required": true }, "blog": { "type": String, "required": true }, "photo": { "type": St…
accepted answer of: http://stackoverflow.com/q/28080546
score: 0
has comment: http://stackoverflow.com/comment/44580516
answers question: http://stackoverflow.com/q/28080546
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44617273
type: Answer
has comment: http://stackoverflow.com/comment/44580273

http://stackoverflow.com/q/27980743
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: keyboard
favorite count: 0
has answer: http://stackoverflow.com/a/58489460
type: UnansweredQuestion
score: 13
upvote count: 13
has title: Why does the cursor not show in input fields for Internet Explorer?
type: Question
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/36154313
tagged with: javascript
has answer: http://stackoverflow.com/a/28440482
tagged with: focus
answer count: 3
has body: I have several html input fields on my web form. When I tab back and forth the field that has focus does not show the blinking cursor when using Internet Explorer, but does when using Chrome, Safari or Firefox. The text fields initially show watermark text when not in focus. I have spent days Googling the answer for this but to no avail.

http://stackoverflow.com/q/28081912
tagged with: google-maps-api-3
score: 0
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/28087096
answer count: 1
tagged with: jquery
has title: Looking For a Correct Way to Hide or Display Streets on Map
has body: I am trying to Hide/ Display Roads layers on Google Map at This Demo which is working for me but as you can see the code is duplicated in adding style many times! on: map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); map.set('styles', [{ "featureType": "road", "stylers": [{ "visibility": "off" }] }]); $('input:checkbox').change(function () { if ($(this).is(':checked')) { map.set('styles', [{ "featureType": "road", "stylers": [{ "visibility": "on" }] }]); } else { map.set('styles', [{ "featureType": "road", "stylers": [{ "visibility": "off" }] }]); } }); can you please take a look at demo and let me what is a better way to achieve this? without repeating the style many times?! Thanks
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28087096
type: Question
tagged with: javascript

http://stackoverflow.com/a/28113569
downvote count: 0
type: Answer
has body: You want the formatted_address function fillInAddress() { // Get the place details from the autocomplete object. var place = autocomplete.getPlace(); document.getElementById('fulladdress').value = place.formatted_address; }
accepted answer of: http://stackoverflow.com/q/28113393
answers question: http://stackoverflow.com/q/28113393
score: 4
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/comment/44406067
score: 2
has text: I'm not quite sure what are you trying to achieve. Do you want to style everything inside h3 besides links? Maybe you should use CSS for that :)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28009055

http://stackoverflow.com/comment/44390236
comment on: http://stackoverflow.com/a/28000435
type: AnswerComment
has text: figured it out thanks
score: 0
type: Comment

http://stackoverflow.com/a/28002173
has comment: http://stackoverflow.com/comment/44393517
answers question: http://stackoverflow.com/q/28002103
type: Answer
has body: Assuming the process eventually ends on its own and it does not output a lot of data, you could probably just buffer the data and then render when the process closes: conn.exec(scriptContent, function(err, stream) { if (err) return res.send(err); var stdout = '', stderr = ''; stream.on('close', function() { conn.end(); res.render('execresults.ejs', { stdout: stdout, stderr: stderr }); }).on('data', function(data) { stdout += data; }).stderr.on('data', function(data) { stderr += data; }); }); Secondly, if (err) res.send(err); should really have a return: if (err) return res.send(err); to prevent further execution on errors.
accepted answer of: http://stackoverflow.com/q/28002103
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/44393670
type: AcceptedAnswer

http://stackoverflow.com/q/28098798
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/28098927
has body: I want to convert: &lt;iframe src="http://www.example.com" width="0" height="0" style="visibility:hidden;display:none"&gt;&lt;/iframe&gt; Into loading it dynamically with javascript, my code so far is: var iframe = document.createElement('iframe'); iframe.src = 'http://www.example.com'; iframe.width = '0'; iframe.height = '0'; document.body.appendChild(iframe); But once that loads, a little box is visible, i tried adding: iframe.style = 'visibility:hidden;display:none'; But that had no effect, does anyone know how to do this (without JQuery)? Thanks.
tagged with: dynamic
tagged with: iframe
upvote count: 1
type: Question
type: AnsweredQuestion
has title: set style in dynamically loaded iframe
score: 1
has answer: http://stackoverflow.com/a/28098927

http://stackoverflow.com/a/28068554
has comment: http://stackoverflow.com/comment/44518303
answers question: http://stackoverflow.com/q/28068305
has comment: http://stackoverflow.com/comment/44518962
has comment: http://stackoverflow.com/comment/44521146
has comment: http://stackoverflow.com/comment/44517822
has comment: http://stackoverflow.com/comment/44520078
has comment: http://stackoverflow.com/comment/44518776
has comment: http://stackoverflow.com/comment/44520626
has comment: http://stackoverflow.com/comment/54545597
type: AcceptedAnswer
downvote count: 0
score: 8
has comment: http://stackoverflow.com/comment/44519519
has body: You can use the Symfony Serializer. http://symfony.com/doc/current/components/serializer.html You might want to write your own Twig extension to do this from within your template. Your code will look something like this: use Symfony\Component\Serializer\Serializer; use Symfony\Component\Serializer\Encoder\JsonEncoder; use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer; $encoders = array(new JsonEncoder()); $normalizers = array(new GetSetMethodNormalizer()); $serializer = new Serializer($normalizers, $encoders); $jsonContent = $serializer-&gt;serialize($object, 'json'); When you put that string into your javascript, you should have a normal JS object where you can find everything you want. You might want to use the JMSSerializerBundle, as it already has a Twig extension, and is easier to use in general. https://github.com/schmittjoh/JMSSerializerBundle/blob/master/Resources/doc/index.rst An update to give a quick overview of what is in the comments. Both the Symfony Serializer as the JMSSerializerBundle seem to have a hard time coping with Bi-directional relations (most likely Doctrine). This will result in errors like "Out of memory" or something mentioning "Self-referencing" objects / infinite loops. To solve this, you can ignore the attribute with the Normalizer. Which will look something like: use Symfony\Component\Serializer\Serializer; use Symfony\Component\Serializer\Encoder\JsonEncoder; use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer; $normalizer = new GetSetMethodNormalizer(); $normalizer-&gt;setIgnoredAttributes(array('match')); //Replace match with the parent attribute $encoder = new JsonEncoder(); $serializer = new Serializer(array($normalizer), array($encoder)); $serializer-&gt;serialize($object, 'json');
has comment: http://stackoverflow.com/comment/44521018
upvote count: 8
accepted answer of: http://stackoverflow.com/q/28068305
type: Answer
has comment: http://stackoverflow.com/comment/44518691

http://stackoverflow.com/comment/44388141
type: Comment
has text: but fabric is doing in other way. that what i need. that canvases is simply free to draw anything.
score: 0
comment on: http://stackoverflow.com/a/27999370
type: AnswerComment

imagesloaded
tags question: http://stackoverflow.com/q/27983170
type: Tag
tag name: imagesloaded

http://stackoverflow.com/q/28095737
tagged with: javascript
favorite count: 0
tagged with: google-maps-api-3
possible better answer: http://stackoverflow.com/a/28096088
accepted answer: http://stackoverflow.com/a/28097921
has comment: http://stackoverflow.com/comment/44567383
has body: I am playing around with the Google Maps API v3 for a project I am building.The premise is the user can draw a route on the map however at any point can clear it and start again. The issue I am having is restarting the polyline after the map has been cleared. Whilst the markers appear the polyline does not. I have discovered that the line poly.setMap(null); only hides the polyline that is draw and doesn't clear it therefore it is understandable why the line doesn't show. However on finding this out I now need to know how to clear it and how it can be restarted. The code is below: var poly; var map, path = new google.maps.MVCArray(), service = new google.maps.DirectionsService(), poly; var removepolyline; var geocoder; var bounds = new google.maps.LatLngBounds(); var markersArray = []; var destinationIcon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&amp;chld=D|FF0000|000000'; var originIcon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&amp;chld=O|FFFF00|000000'; var count = 0; var countname = 0; var latitude_start; var longitude_start; function initialize() { var mapOptions = { zoom: 16, }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); geocoder = new google.maps.Geocoder(); ///Geolocation // Try HTML5 geolocation if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var infowindow = new google.maps.InfoWindow({ map: map, position: pos, content: 'Current Location' }); map.setCenter(pos); }, function() { handleNoGeolocation(true); }); } else { // Browser doesn't support Geolocation handleNoGeolocation(false); ///Place fallback loop } ///Allows the polyline to follow the road poly = new google.maps.Polyline({ map: map }); google.maps.event.addListener(map, "click", function(evt) { if (path.getLength() === 0) { //Enters on first click path.push(evt.latLng); poly.setPath(path); } else { //En…
has answer: http://stackoverflow.com/a/28096088
has title: Clear Polyline from Google Maps and then restart it
has answer: http://stackoverflow.com/a/28097921
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
upvote count: 2
answer count: 2
tagged with: google-maps
tagged with: api

http://stackoverflow.com/comment/44578515
has text: @ChrisV A girl I know said that if I could guess her number, she'd confirm it.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28101350
type: QuestionComment

http://stackoverflow.com/comment/44576523
score: 2
comment on: http://stackoverflow.com/q/28100431
has text: What do you mean "if I run the Test.java to test"? How do you run it?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44525580
comment on: http://stackoverflow.com/q/28072806
has text: Okay well yeah.. the simple solution is to remove keyup from that binding.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/28078057
linked to: http://stackoverflow.com/q/28076060
tagged with: javascript
type: UnansweredQuestion
has title: Cycle through all immediate children of XML DOM by tag name in JavaScript
has answer: http://stackoverflow.com/a/28079084
has body: I have this kind of dynamic XML to parse, where a section tag always has an "allSubSections" tag, which may or may not be filled with more sections (of the exact same xml format). Since each section has the "allSubSections" tag, it could theoretically go very very deep with nested sections, but in real life usage, usually goes only a few levels deep. There is only ever one "allSections" tag in my XML document. Here is the XML: <allSections> <allSections> So I need to cycle through, creating javascript objects out of this xml. As with the XML, an object may have subsections of a similar type to itself. I believe I need to cycle through only the direct children of "allSections" with the tag name of "section" as the first step. How would I do that? I just asked a question Here, about doing that, but not cycling through a collection tag and got a great answer. Now I need the equivilent answer for this collection tag "allSections", Here is my current code: var theSections = xml.querySelectorAll("poAssessmentVersion>allSections"); for (i = 0; i < theSections.length; i++) { var section = new AssessmentSection(); section.description = theSections[i].querySelectorAll("AssessmentSection>description")[theSections.length - i].childNodes[0].nodeValue; version.allSections.push(section); } Is there some way to cycle through the tag getting only the immeditate children ? I feel like my current code is getting close but The order of my list of sections is not quite right. In my example XML I wrote <AssessmentSection> as but it is really <assessmentSection> in my xml.
type: Question
tagged with: http://stackoverflow.com/tag/xml
has answer: http://stackoverflow.com/a/28080653
score: 0
answer count: 2
tagged with: dom

http://stackoverflow.com/a/28021554
score: 0
has body: I found out what the problem was. The answers I got were not helping, because I needed to keep the listener in the controller instead of moving it to the view. The problem was that I needed to put the listener on home gridpanel like init: function() { this.control({ 'home gridpanel': { itemdblclick: this.editUser } }); }, Now it works like charm.
has comment: http://stackoverflow.com/comment/44429789
has comment: http://stackoverflow.com/comment/44429396
type: Answer
answers question: http://stackoverflow.com/q/27980836

http://stackoverflow.com/comment/44539770
score: 1
comment on: http://stackoverflow.com/q/28080541
type: Comment
type: QuestionComment
has text: You should do some research and try aout some stuff, then present what you have done; As start help: You first Need to make a decission about how you want to get The Data back to the Server (Ajax or Request Variables)

http://stackoverflow.com/q/28076525
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/31092093
type: Question
has answer: http://stackoverflow.com/a/33580051
has answer: http://stackoverflow.com/a/31092093
has body: I was wondering if it was possible to overlay a line ontop of a chart.js graph, such as a line graph ? For example, on the x axis a horizontal line would be drawn at value 20 across the graph
tagged with: chart.js
has answer: http://stackoverflow.com/a/73257436
score: 7
tagged with: javascript
has title: Overlay Line on chart.js Graph
upvote count: 7
favorite count: 0
has answer: http://stackoverflow.com/a/28089135
accepted answer: http://stackoverflow.com/a/28089135
answer count: 4

http://stackoverflow.com/comment/44493805
type: QuestionComment
has text: Does the html markup for the embedded videos have a `title` attribute? i.e. ``
type: Comment
comment on: http://stackoverflow.com/q/28055172
score: 0

http://stackoverflow.com/comment/104574990
score: 1
comment on: http://stackoverflow.com/a/28088291
has text: The `CSS.supports()` API is not supported in any version of IE and was only recently supported in Edge. Instead you can use `if (typeof window.getComputedStyle(document.body).mixBlendMode === 'undefined') { /* not supported */ }`
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44495346
comment on: http://stackoverflow.com/q/28056691
score: 0
type: Comment
type: QuestionComment
has text: just "namespace" your css selectors, and load the css code once. it's ok if there is no template using it right away, and that's better than loading it later and re-modifying the parsed rules each layout.

http://stackoverflow.com/a/28120255
has comment: http://stackoverflow.com/comment/44650764
type: Answer
has comment: http://stackoverflow.com/comment/44681245
has comment: http://stackoverflow.com/comment/44677332
upvote count: 1
has comment: http://stackoverflow.com/comment/44683221
accepted answer of: http://stackoverflow.com/q/28118812
has comment: http://stackoverflow.com/comment/44681375
has body: Angular offers $watchGroup (since 1.3). Basically, it returns the scope variable oldValue and newValue in the manner how we put it in watchGroup. Use the index of the scope variable to get its respective newVal and oldVal like below. To get newValues of respective scope variables: newValue[0] // returns new value of dec newValue[1] // returns new value of bin newValue[2] // returns new value of oct newValue[3] // returns new value of hex To get oldValues of respective scope variables: oldValue[0] // returns old value of dec oldValue[1] // returns old value of bin oldValue[2] // returns old value of oct oldValue[3] // returns old value of hex $scope.$watchGroup(['dec','bin','oct','hex'], function(newValues, oldValues, scope) { console.log(newValues[index]); //put index value as 0(dec), 1(bin), 2(oct) or 3(hex) console.log(oldValues[index]); //put index value as 0(dec), 1(bin), 2(oct) or 3(hex) }); NOTE: Below logic is considering that only one value will change at a time. Edit 1 To catch which variable was updated last, you can try below code. var arrayOfValues = ['dec', 'bin', 'oct', 'hex']; $scope.$watchGroup(arrayOfValues, function(newValues, oldValues, scope) { let last_changed; var chanedIndex = newValues.findIndex(function(val, key){ return val !== oldValues[key]; }); last_changed = arrayOfValues[chanedIndex]; // above logic could simply avoid the below conditional logic (refer // comment above in front of if condition) if (angular.isDefined(last_changed)) { // your logic will come here as per your question switch(last_changed){ case 'dec': doSomething(); case 'bin': doSomething(); case 'oct': doSomething(); case 'hex': doSomething(); } } }); Edit 2: I have minified the code and made the var arrayOfValues = ['dec', 'bin', 'oct', 'hex']; // generic method which will tell you which variable has been updated $scope.checkWhichVariableHasUpdated = fucntion(watchGroupList, newValuesObj, oldValuesObj) { let _lastUpdatedValue; angular.forEach(watchGroupList, function(v…
answers question: http://stackoverflow.com/q/28118812
has comment: http://stackoverflow.com/comment/44681729
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44678009
score: 1

http://stackoverflow.com/a/28053571
has comment: http://stackoverflow.com/comment/44491190
has comment: http://stackoverflow.com/comment/44491453
answers question: http://stackoverflow.com/q/28053354
score: 0
has comment: http://stackoverflow.com/comment/44489066
has comment: http://stackoverflow.com/comment/44519749
has comment: http://stackoverflow.com/comment/44491525
has comment: http://stackoverflow.com/comment/44491244
has body: The following code disables the dropdown when the AJAX function is called and enables it when the data is fully loaded. Execution starts when the page is fully loaded and I reduced your AJAX calls to one generic function that accepts an element and a uri as input. This function also makes a clone of the select. Appending the new options in memory and when the list is build the original select is replaced with the cloned one. This should enhance the browser performance. function loadDataAndAppendToSelect(select, uri) { $(select).prop('disabled', true); //disable // populates the dropdown id $.getJSON( uri, function( data ) { var tempElement = $(select).clone(); $.each(data, function(index, item) { $('&lt;option&gt;'). attr('value', item.fullname). text(item.fullname). appendTo(tempElement); }); $(select).replaceWith(tempElement); $(select).prop('disabled', false); //enable }); } $(document).ready(function(){ loadDataAndAppendToSelect('#salesRep', 'api/reps.php'); loadDataAndAppendToSelect('#service', 'api/services.php'); });
type: Answer
has comment: http://stackoverflow.com/comment/44491651
has comment: http://stackoverflow.com/comment/44491470

http://stackoverflow.com/comment/44443306
type: QuestionComment
comment on: http://stackoverflow.com/q/28029173
has text: Why is that important to you? (I don't really care about the answer, but you should ask yourself this question). It seems to me like it shouldn't matter and perhaps that you're better off not knowing.
score: 0
type: Comment

http://stackoverflow.com/comment/44391015
score: 0
type: Comment
type: QuestionComment
has text: Don't use same ID for input and td, id are unique
comment on: http://stackoverflow.com/q/28000919

http://stackoverflow.com/q/28110079
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28110267
has body: I have a form with dates for booking, in the date field I use datepicker. The objective this form is send parametres for a external URL. I can send parametres with method="GET", but have problem with date field because datepicker save parametres with slash "/", like: dd/mm/yyyy For this motive URL show encode like: CheckIn=31%2F01%2F2015&amp;CheckOut=18%2F03%2F2015 when the correct link should be: CheckIn=31012015&amp;CheckOut=18032015 Without the %2F encode. -- How remove this encode from link? My code: http://jsfiddle.net/thallysondias/6e03wgLL/ Maybe using str.replace? But i dont know how use.
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28110267
has title: Send date parameters from datepicker without "/" on method GET
favorite count: 0
tagged with: datepicker
type: AnsweredQuestion

http://stackoverflow.com/a/27975409
has comment: http://stackoverflow.com/comment/44378850
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27975316
has comment: http://stackoverflow.com/comment/44343578
has comment: http://stackoverflow.com/comment/44345504
score: 3
has comment: http://stackoverflow.com/comment/44378924
upvote count: 3
has comment: http://stackoverflow.com/comment/44345221
accepted answer of: http://stackoverflow.com/q/27975316
has comment: http://stackoverflow.com/comment/44345793
has comment: http://stackoverflow.com/comment/44344049
type: AcceptedAnswer
has body: // Iterate over a few gameIDs, used in URL for request. for (x = 4648; x &lt; 4650; x++) { // Pass in the callback as an anonymous function. // So below I am passing in the id and the function I want to execute. // AND, defining the results I am expecting as passed in arguments. scrapeGame(x, function(scrapeResult, err) { // This will *NOT* execute *UNTIL* you call it in the function below. // That means that the for loop's execution is halted. // This function receives the status that is passed in, // in this case, a boolean true/false and an error if any. if (scrapeResult) { // Scrape was true, nothing to do. // The for loop will now move on to the next iteration. console.log('Scrape Successful'); } else { // Scrape was false, output error to console.log and // break loop to handle error. console.log('Scrape ERROR :: ' + err); // Notice we are calling break while in the // scope of the callback function // Remove the break if you want to just move onto // the next game ID and not stop the loop break; } }); } // This function now accepts two arguments. function scrapeGame(gameId, callback) { // ************************************************ // ** Do Your Work Here ** // Request from URL, scrape HTML to arrays as necessary. // Write final array to file. // After file creation, execute the callback and pass bool // status (true/false). // ************************************************ var request = require('request'), cheerio = require('cheerio'), fs = require('fs'), categories = [], categorylist = [], ids = [], clues = [], values = [ '0', '$200', '$400', '$600', '$800', '$1000', '$400', '$800', '$1200', '$1600', '$2000' ], valuelist = [], answers = [], array = [], file = [], showGameURL = 'http://www.j-archive.com/showgame.php?game_id=' + gameId, showAnswerURL = 'http://www.j-archive.com/showgameresponses.php?game_id=' + gameId; request(showGameURL, function(err, resp, body) { if (!err &amp;&amp; resp.statusCode === 200) { var $ = cheerio.load(body); //add a row…
has comment: http://stackoverflow.com/comment/44376170
has comment: http://stackoverflow.com/comment/44380385
has comment: http://stackoverflow.com/comment/44345835

http://stackoverflow.com/a/28119921
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44615027
accepted answer of: http://stackoverflow.com/q/28119674
answers question: http://stackoverflow.com/q/28119674
type: AcceptedAnswer
downvote count: 0
has body: It's difficult to do this. If you want to have a reasonable guarantee of efficiency in the absence of additional information (e.g. when the subtrees you are not interested in could be arbitrarily large) then you would have to manually walk the DOM. Otherwise, you could pull out all candidates and filter out those you don't want: $('.grandparent') .find('.successful') .filter(function() { return !$(this).closest(".child").length; }) If you go the latter route make sure to be precise: Do you want to filter out .child elements themselves if they are .successful? Using closest does this, but perhaps you need to not do so. Is there a chance of a .child appearing above .grandparent? If so, the filter function needs to be buffed up so that it does not reject all candidate matches.

http://stackoverflow.com/comment/44612713
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28118114
type: AnswerComment
has text: i answered it, check it out.

http://stackoverflow.com/comment/44452504
comment on: http://stackoverflow.com/a/28033712
type: Comment
has text: I would like some control over what is happening, I am wondering perhaps the easiest way to get the coords of an image of a continent as you can imagine the details of the edges? Or the best way to do map around it, the hover state requires a pin also.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44492915
type: QuestionComment
comment on: http://stackoverflow.com/q/28055545
score: 1
has text: Is it possible that `$curimage` or `$file` contain characters that are not acceptable array key names?
type: Comment

http://stackoverflow.com/q/28072418
has comment: http://stackoverflow.com/comment/44524495
has title: Is it possible to traverse object in JavaScript in non-recursive way?
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/46661323
tagged with: computer-science
type: Question
tagged with: javascript
tagged with: data-structures
accepted answer: http://stackoverflow.com/a/28078253
has comment: http://stackoverflow.com/comment/44525134
has body: For example we have a JavaScript object which can contain other objects with arbitrary depth of nesting. Is it possible to traverse every element of this object not using recursion? If not then what are minimum requirement for data structure to make it traversal using non-recursive iteration?
upvote count: 3
answer count: 2
has answer: http://stackoverflow.com/a/46661323
downvote count: 1
has answer: http://stackoverflow.com/a/28078253
favorite count: 0
has comment: http://stackoverflow.com/comment/44524314

http://stackoverflow.com/comment/44454650
type: Comment
has text: Made the change and updated question! Unfortunately still loads at the end of the page
comment on: http://stackoverflow.com/a/28034717
type: AnswerComment
score: 0

http://stackoverflow.com/q/28015873
tagged with: javascript
has title: Disable some built-in functionality in Sails.js
linked to: http://stackoverflow.com/q/44838905
score: 11
has answer: http://stackoverflow.com/a/28017720
has body: I'm developing a REST API backend application using Sails.js 0.10 as a framework. This application will be strictly REST, authentication will be implemented using oAuth bearer tokens. All responses will be in JSON format. Considering this specific requirements I do not need some functionality embedded into Sails.js and I want to remove it from my application (so it will run faster without extraneous code). So, my question is: How do I disable the following built-in functionality? Blueprints Static Cookies Sessions Views WebSocket CSRF i18n What else can be disabled that is not required in my use case? The documentation is kinda fragmented on this specific question. All configuration options are described for each module, but there is no information of how such a module can be disabled and/or removed from the application.
upvote count: 11
favorite count: 0
accepted answer: http://stackoverflow.com/a/28017720
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: sails.js
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/44622343
type: AnswerComment
has text: I altered a few things to optimize it for the API I'm retrieving the data from, but the basic principle works, thanks!
type: Comment
comment on: http://stackoverflow.com/a/28099407
score: 0

http://stackoverflow.com/q/28119674
favorite count: 0
has answer: http://stackoverflow.com/a/28119831
duplicate of: http://stackoverflow.com/q/13305514
answer count: 5
has title: Is it possible to prevent jQuery.find() from searching below certain nodes of the DOM tree?
accepted answer: http://stackoverflow.com/a/28119921
has answer: http://stackoverflow.com/a/28120184
score: 2
has comment: http://stackoverflow.com/comment/44613758
has answer: http://stackoverflow.com/a/28119921
has body: Suppose the following DOM structure: .grandparent .parent .child .successful .a .b .an-arbitrary-subtree .parent .child .a .b .a-different-arbitrary-subtree .adopted .child .a .b .another-arbitrary-subtree .with-different-parents .but-sometimes-common-css-classes .successful Were I to $('.grandparent').find('.successful') unsurprisingly, I'd get back [.child .successful, .but-sometimes-common-css-classes .successful] Is there any way I might prevent jQuery's find method from traversing below the .child nodes? Perhaps I could reimplement $.find() myself and add a top-level class on the node to halt the search (in this case on .b) Why am I asking? Even though we do not yet have Shadow Dom, I'd like to create components that can contain components (created by other developers anonymously) without worrying about leakages. Polymer isn't stable enough, yet. I prefer to scope my jQuery selectors in these components, but can only scope from the top node of a subtree, and have no means yet to constrain scope into the depths of the tree.
has comment: http://stackoverflow.com/comment/44613850
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28119831
tagged with: polymer
has comment: http://stackoverflow.com/comment/44614016
tagged with: dom
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/28119863
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/28119852
tagged with: jquery

http://stackoverflow.com/q/28110867
type: Question
has body: I'm trying to check if an object (this.target) is looking at a specific position (newPosition). What I have right now is the following: new THREE.Matrix4().lookAt( newPosition, this.target.position, this.target.up ) == this.target.matrix But for some reason, this won't work. How are you meant to check if an Object3D is looking at a specific position?
tagged with: rotation
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28143977
score: 0
has comment: http://stackoverflow.com/comment/44663937
answer count: 1
has answer: http://stackoverflow.com/a/28143977
tagged with: three.js
type: AnsweredQuestion
has title: Check if object is looking at position
tagged with: coordinates

http://stackoverflow.com/q/28011890
tagged with: javascript
has body: function iBlockquote(){ rich_body_eng.document.execCommand('FormatBlock', false, " "); var quote = window.getSelection().focusNode.parentNode; $(quote).addClass("quote"); } Above I'm adding a blockquote to the selected text with execCommand(). Another thing I want to do is add a CSS class called quote to the <blockquote tag, so the output would be something like Some text . It doesn't seem to work. Please help. I'm using this question as a guide. How to add class or id or CSS style in execCommand formatBlock 'p' tag?
has answer: http://stackoverflow.com/a/33969088
answer count: 2
tagged with: execcommand
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/23380628
possible better answer: http://stackoverflow.com/a/33969088
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/28012108
type: Question
accepted answer: http://stackoverflow.com/a/28012108
has title: Adding CSS Class with execCommand()

w3c
type: Tag
tag name: w3c
tags question: http://stackoverflow.com/q/28014306

http://stackoverflow.com/a/27976371
type: Answer
has comment: http://stackoverflow.com/comment/44345770
has comment: http://stackoverflow.com/comment/44354505
has comment: http://stackoverflow.com/comment/44346424
has body: setTimeout(function(){ document.getElementById('dContent').value = 'full'; document.getElementById('submit-download').click(); var page = parseInt(location.search.match(/\d\d?$/)[0]) if(!isNaN(page) &amp;&amp; page &lt; 20){ location.href='https://www.myurl.com/search?query=keyword&amp;page=' +(page + 1); } }, 1000);
accepted answer of: http://stackoverflow.com/q/27975986
answers question: http://stackoverflow.com/q/27975986
has comment: http://stackoverflow.com/comment/44373696
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/44419481
has text: Thanks! But i would like to test the Ajax-Success Callback!
type: AnswerComment
comment on: http://stackoverflow.com/a/28016100
score: 0
type: Comment

http://stackoverflow.com/comment/44332677
type: Comment
has text: I uploaded an paint image to help clarify.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27967935

http://stackoverflow.com/comment/44356795
comment on: http://stackoverflow.com/a/27982428
type: Comment
has text: issue happens only when i have these escaped parameters. i don't how to escape exactly without error
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44415250
comment on: http://stackoverflow.com/a/28013911
type: Comment
has text: Note that depending on how the date is formatted comparing the string representation does not give the same result as comparing the dates. See superpuccio's comment [here](http://stackoverflow.com/a/493018/4178025) for an example.
score: 0
type: AnswerComment

http://stackoverflow.com/a/67280686
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/28038768
upvote count: 11
score: 11
has body: I'm doing it automatically using the gspread python library by calling the addimportrangepermissions endpoint. sheet.client.request( 'post', f'https://docs.google.com/spreadsheets/d/{sheet.spreadsheet.id}/externaldata/addimportrangepermissions', params={'donorDocId': external_sheet.spreadsheet.id} ) I know it's not via the apps script, but it could provide you some hints on how to do it there. Note: I didn't find any doc about this, so I though this could help anyone trying to do the same in any platform (app script, python, etc.).

http://stackoverflow.com/comment/44503375
type: QuestionComment
comment on: http://stackoverflow.com/q/28061036
has text: @jQuery.PHP.Magento.com done I didnot understood your moto behind it
score: 0
type: Comment

http://stackoverflow.com/q/27969563
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27969648
type: Question
has body: I have a simple javascript scroll function that fixes my sidebar navigation and works fine on it's own, but I need to adjust it so different page types have different scroll events. Example: pages with banners need to have the fixed sidebar at a different scroll point that pages without a sidebar. The indicator of a different page will be that the sidebar for a page without a banner will have a parent div that a page with a banner will not have. I am using a wordpress theme so my customization on this is limited. Below is my example HTML and JS, but you can also see it at : http://jsfiddle.net/61L4ac2j/ HTML: Page without banner example Page with banner example JS: $(function() { var div = $(".sidebar-wrapper"); $(window).scroll(function() { var scroll = $(window).scrollTop(); if (($("sidebar-wrapper").parent().parent("mk-main-wrapper")) & (scroll > 147)) { div.css( "background", "yellow" ); } else if (scroll > 263) { div.css( "background", "green" ); } else { div.css( "background", "blue" ); } }); }); For simplification purposes, I used background color, but my actual JS will use "addclass". See JS below: $(function() { var div = $(".sidebar-wrapper"); $(window).scroll(function() { var scroll = $(window).scrollTop(); if ($("sidebar-wrapper").parent().parent("mk-main-wrapper") & scroll > 147) { div.addClass("fixed-product-nav"); } else if (scroll > 263) { div.addClass("fixed-product-nav"); } else { div.removeClass("fixed-product-nav"); } }); }); The issue is I cannot get the first IF Statement true, which you can see at the JSFiddle. It looks like something with the parent elements. I feel like I'm close and just missing something. Thanks!
score: 0
tagged with: wordpress
tagged with: scroll
answer count: 1
has answer: http://stackoverflow.com/a/27969648
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/7615214
has title: Scroll Javascript functions for different parent divs

http://stackoverflow.com/comment/44381942
type: Comment
has text: @GtwoK updated the code with resize ( there is a debounce on the resize that isn't 100% necessary, but generally is considered a good practice ).
comment on: http://stackoverflow.com/a/27995147
type: AnswerComment
score: 0

http://stackoverflow.com/a/27984345
score: 3
has comment: http://stackoverflow.com/comment/44416966
upvote count: 3
has comment: http://stackoverflow.com/comment/44380287
answers question: http://stackoverflow.com/q/27977762
downvote count: 0
has comment: http://stackoverflow.com/comment/44373238
type: Answer
has body: This one uses map and reduce methods of Array object. function get_products_of_all_ints_except_at_index(inList) { var product = function (x, y) { return x * y; }; var lists = inList.map(function (v, i, a) { return a.slice(0, i).concat(a.slice(i + 1, a.length)); }); return lists.map(function (v, i, a) { return v.reduce(product); }); } // test case console.log(get_products_of_all_ints_except_at_index([1, 7, 3, 4]));

http://stackoverflow.com/comment/44486661
type: Comment
has text: Why are you even using ajax?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28052073

http://stackoverflow.com/comment/44549657
type: AnswerComment
type: Comment
score: 0
has text: This actually helped me a lot. But, I wonder, how to implement this for dynamic number of date fields.
comment on: http://stackoverflow.com/a/28086114

http://stackoverflow.com/comment/44538008
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28079504
has text: What would the URL structure have to look like for this to work. I tried `example.com?offer=1234` and that didn't work.

http://stackoverflow.com/comment/44459682
has text: It is well defined: OP wants to be notified from one place, whenever an error occurs.
type: AnswerComment
comment on: http://stackoverflow.com/a/28037512
score: 0
type: Comment

http://stackoverflow.com/comment/44438253
comment on: http://stackoverflow.com/q/28026467
score: 1
has text: `main` is a standard HTML5 tag. I _think_ that shouldn't interfere with your using it as a directive, but for clarity it might be better to rename it.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28033097
type: Question
score: -2
has comment: http://stackoverflow.com/comment/44451415
has answer: http://stackoverflow.com/a/28033300
accepted answer: http://stackoverflow.com/a/28033300
tagged with: javascript
downvote count: 2
has body: I'm having some issues with the Angular filters, according to the docs the filter only works with arrays, I have now a very big object, is actually to display some dynamic content. I will leave you guys some different examples of what I am going through. 1st the behavior I want to achieve, you can see it here. 2nd let's say that this is with the real JSON object that just extract from Network in my browser console. In the second example you verify why my searcher is not working, is actually because of the object I just mentioned above. I have service named SportsFactory with this function $http.get(CONSTANT_VARS.BACKEND_URL + '/lines/sports/' + agent) .success(function(sports) { //here I need: forcing array instead of object sports = _.values(sports); sports = _.sortBy(sports, function(sport) { return sport.priority; }); console.log(sports) LocalForageFactory.set(CONSTANT_VARS.LOCALFORAGE_SPORTS, sports); defer.resolve(sports); }) .error(function(err) { defer.reject(err); }); as you can see there is a console.log which is returning this: [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object] now, what can I do in order to have my filters working correctly? What can I do in order to convert that sports object into an array? basically this part of the function is the one returning that object I told you, which is the one that I need to return an Array instead .success(function(sports) { //forcing array instead of object sports = _.values(sports); sports = _.sortBy(sports, function(sport) { return sport.priority; }); console.log(sports) LocalForageFactory.set(CONSTANT_VARS.LOCALFORAGE_SPORTS, sports); defer.resolve(sports); })
tagged with: arrays
answer count: 1
has title: AngularJS, filters: how to turn a big giant object (JSON) into an array?
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/44451316
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/28101931
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to loop an array and display the data, kinda like an image slider. I want it to use '0' then after 3 seconds display '1' etc etc, then loop back to the start. var people = { 0: { 'name': 'Name', 'desc': 'Some text about this person.', 'imgSrc': " " }, 1: { 'name': 'Name', 'desc': 'Some text about this person.', 'imgSrc': " " }, }; $(document).ready(function() { setInterval(function() { $(".name").replaceWith(array[i]['name']); $("article").replaceWith(array[i]['desc']); $(".team-img").replaceWith(array[i]['imgSrc']); }, 3000) });
has comment: http://stackoverflow.com/comment/44579470
has title: Loop multidimensional array and display the data in html
has answer: http://stackoverflow.com/a/28102142
type: Question
tagged with: arrays
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/44579296
has comment: http://stackoverflow.com/comment/44579462
answer count: 1
tagged with: multidimensional-array
type: UnansweredQuestion

node.js
tags question: http://stackoverflow.com/q/28073760
tags question: http://stackoverflow.com/q/28052074
tags question: http://stackoverflow.com/q/28042257
tags question: http://stackoverflow.com/q/28005556
tags question: http://stackoverflow.com/q/28054365
tags question: http://stackoverflow.com/q/27994345
tags question: http://stackoverflow.com/q/28101990
tags question: http://stackoverflow.com/q/28051353
tags question: http://stackoverflow.com/q/28115761
tags question: http://stackoverflow.com/q/28055778
tags question: http://stackoverflow.com/q/28085728
tags question: http://stackoverflow.com/q/28082945
tags question: http://stackoverflow.com/q/28101041
tags question: http://stackoverflow.com/q/28089059
tags question: http://stackoverflow.com/q/28051182
tags question: http://stackoverflow.com/q/28022054
tags question: http://stackoverflow.com/q/27986436
tags question: http://stackoverflow.com/q/28031302
tags question: http://stackoverflow.com/q/28036494
tags question: http://stackoverflow.com/q/28002620
tags question: http://stackoverflow.com/q/28066317
tags question: http://stackoverflow.com/q/28035116
tags question: http://stackoverflow.com/q/28033101
tags question: http://stackoverflow.com/q/28041975
tags question: http://stackoverflow.com/q/28017812
tags question: http://stackoverflow.com/q/28064295
tags question: http://stackoverflow.com/q/27986687
tags question: http://stackoverflow.com/q/27966565
tags question: http://stackoverflow.com/q/28116533
tags question: http://stackoverflow.com/q/28013570
tags question: http://stackoverflow.com/q/27964241
tags question: http://stackoverflow.com/q/28103152
tags question: http://stackoverflow.com/q/27965485
tags question: http://stackoverflow.com/q/28060280
tags question: http://stackoverflow.com/q/28105957
tags question: http://stackoverflow.com/q/28016172
tags question: http://stackoverflow.com/q/28050535
tags question: http://stackoverflow.com/q/28035036
tags question: http://stackoverflow.com/q/28098916
tags question: http://stackoverflow.com/q/27971062
tags question: http://stackoverflow.com/q/27973663
tags question: http://stackoverflow.com/q/28077855
tags question: http://stackoverflow.com/q/28020439
tags question: http://stackoverflow.com/q/28080290
tags question: http://stackoverflow.com/q/28004759
tags question: http://stackoverflow.com/q/28037025
tags question: http://stackoverflow.com/q/28032934
tags question: http://stackoverflow.com/q/28117733
tags question: http://stackoverflow.com/q/27993227
tags question: http://stackoverflow.com/q/28037645
tags question: http://stackoverflow.com/q/28049978
tags question: http://stackoverflow.com/q/28074088
tags question: http://stackoverflow.com/q/28013144
tags question: http://stackoverflow.com/q/28032086
tags question: http://stackoverflow.com/q/28059521
tags question: http://stackoverflow.com/q/28069677
tags question: http://stackoverflow.com/q/28037475
tags question: http://stackoverflow.com/q/27975302
tags question: http://stackoverflow.com/q/27968896
tags question: http://stackoverflow.com/q/28110249
tags question: http://stackoverflow.com/q/28099283
tags question: http://stackoverflow.com/q/28016416
tags question: http://stackoverflow.com/q/27980478
tags question: http://stackoverflow.com/q/27989654
tags question: http://stackoverflow.com/q/27975339
tags question: http://stackoverflow.com/q/27986750
tags question: http://stackoverflow.com/q/28113447
tags question: http://stackoverflow.com/q/28119740
tags question: http://stackoverflow.com/q/28080546
tags question: http://stackoverflow.com/q/27971706
tags question: http://stackoverflow.com/q/28027255
tags question: http://stackoverflow.com/q/28066917
tags question: http://stackoverflow.com/q/28019782
tags question: http://stackoverflow.com/q/27975129
tags question: http://stackoverflow.com/q/28037145
tags question: http://stackoverflow.com/q/28093569
tags question: http://stackoverflow.com/q/28005076
tags question: http://stackoverflow.com/q/28031025
tags question: http://stackoverflow.com/q/28032619
tags question: http://stackoverflow.com/q/28116187

http://stackoverflow.com/q/27991776
type: AnsweredQuestion
score: -5
has title: How to access the JSON data?
tagged with: http://stackoverflow.com/tag/json
has body: how to access the JSON data every time i alert for the same it shows undefined . don't know where is the problem . var FJS = FilterJS(art, '#movies', { template: '#movie-template', search: { ele: '#searchbox' }, callbacks: { afterFilter: function(result) { $('#total_movies').text(result.length); // alert(art);// this is the alert which is showing array of objects. len = result.data.onwardflights[1].origin; alert(len); } } }); This is the JSON tree . { "data": { "returnflights": [], "onwardflights": [ { "origin": "delhi", "status": "V", "DepartureTime": "21:14", "cancellationPolicy": "0:4:100:0;4:12:25:0;12:-1:10:0", "cCount": 0, "farebasis": "0", "seat": "ST",
has comment: http://stackoverflow.com/comment/44374817
type: Question
has comment: http://stackoverflow.com/comment/44374866
downvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/44374438
has comment: http://stackoverflow.com/comment/44374853
possible better answer: http://stackoverflow.com/a/27991853
has comment: http://stackoverflow.com/comment/44374476
has answer: http://stackoverflow.com/a/27991853
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/27991936
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27991936
has comment: http://stackoverflow.com/comment/44374450
has comment: http://stackoverflow.com/comment/44374348

http://stackoverflow.com/comment/44391339
score: 0
type: QuestionComment
type: Comment
has text: What do you mean "it is not encrypting"? What is the result or are there errors?
comment on: http://stackoverflow.com/q/28000890

http://stackoverflow.com/q/27995797
accepted answer: http://stackoverflow.com/a/28000854
has body: Does beforeSave and afterSave run when files are edited by the administrator in the data browser? Or only when a file is created and saved within an app? Reason I'm wondering is because when I'm changing some column information within an already saved object, I'm getting the error message: "Error: success/error was not called". It would be extremely undesirable for the beforeSave and afterSave methods to run when objects are simply being edited after the fact by an administrator, so I really hope this is not the case. Thanks if anyone has input. Cheers.
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28000854
tagged with: parse-platform
upvote count: 1
type: Question
has title: Javascript - Parse - Cloud Code - beforeSave and afterSave
score: 1

http://stackoverflow.com/comment/61586610
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28058601
has text: @AndrewWhitaker I actually caught my mistake a few minutes later and you beat me to it, Thx for keeping humble...I will go write 9,001 lines of code now for my error.
type: Comment

http://stackoverflow.com/comment/44489938
type: QuestionComment
score: 1
has text: Ok, sorry to everybody who OT'ed this for me not giving a code example. My code is rather lengthy. I tried to shorten it, however I was not able to reproduce the behavior. That's why I just asked the general question if [] can be returned for whatever reason. Thanks rob-w for the reply. Others, sorry again.
type: Comment
comment on: http://stackoverflow.com/q/28034504

http://stackoverflow.com/a/28100518
downvote count: 0
has body: These performance tests seem to confirm what I suggested. This is premature optimization. The tests do not show any clear favorite. For any given browser, your three snippets are close to each other, with the fastest one changing most times that I ran it. In some of the runs, the overly optimized code is even slower. It may be because of JIT optimizations. Lesson to learn: Keep your code as readable as possible and worry about optimization where you know you have bottlenecks.
has comment: http://stackoverflow.com/comment/44578833
type: Answer
accepted answer of: http://stackoverflow.com/q/28098204
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28098204
type: AcceptedAnswer

http://stackoverflow.com/a/28065839
upvote count: 5
has body: The way to do this without losing the year restriction is: &lt;script type="text/javascript"&gt; $(function () { $("#From").datepicker({ dateFormat: 'dd/mm/yy', changeMonth: true, yearRange: new Date().getFullYear().toString() + ':' + new Date().getFullYear().toString(), onClose: function (selectedDate) { $("#To").datepicker("option", "minDate", selectedDate); } }); $("#To").datepicker({ dateFormat: 'dd/mm/yy', changeMonth: true, yearRange: new Date().getFullYear().toString() + ':' + new Date().getFullYear().toString(), onClose: function (selectedDate) { $("#From").datepicker("option", "maxDate", selectedDate); } }); }); &lt;/script&gt;
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28064816
type: Answer
accepted answer of: http://stackoverflow.com/q/28064816
score: 5

http://stackoverflow.com/a/27997181
answers question: http://stackoverflow.com/q/27997110
score: 0
type: Answer
has body: You have to put declaration of the sum out side or you should save that in any input and get again from it. Either put them outside : Fiddle is here var sum = 0; var clicks = 0; set('input', 25, -25, 5); OR get sum from the label again.. Fiddle is here var sum = parseInt($('label').html()); var clicks = parseInt($('.clicks').html());

http://stackoverflow.com/comment/46206487
type: Comment
has text: as already said... separate `$scope.displayAlert` and `'error-message'`. dont keep displayAlert on score, create a generic factory, and then create a message object with `{type, message}`, have message to be displayed injected into that factory in some array and then display it in interceptor
type: QuestionComment
comment on: http://stackoverflow.com/q/28031579
score: 0

http://stackoverflow.com/a/27967147
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/27966005
downvote count: 0
has body: You can't do this, it's not a valid syntax for an object literal: var Obj= { data[0][0]:data[0][1], data[1][0]:data[1][1] } You can't use a variable as the name of a property in an object literal like that. In your second example: var obj={t1:t2,t3:t4}; // no error You get no error, but you also don't get what you expected either. If you look at the object generated, you'll see this: { t1: "1", t3: 2 }; In other words you created an object with properties t1 and t3, not a and b. You have to create an empty object and populate it using the bracket notation []: var obj = {}; obj[data[0][0]] = data[0][1]; obj[data[1][0]] = data[1][1]; Any time you want to use a variable as a property name for an object, you need to use the bracket notation. In other words this: var t1 = "B"; obj[t1] = "foo"; is different from this: var t1 = "B"; obj.t1 = "foo"; In the first case you set a property called B on obj to the string "foo". In the second case you set a property t1 on obj to "foo". The object literal syntax is more like using the dot notation. To make what you want to do simpler, you can loop through the array as in @Nikos' answer. Or you can get fancy and use .reduce: var data = [ ['a', '1'], ['b', 2] ]; var obj = data.reduce(function(curr, next) { curr[next[0]] = next[1]; return curr; }, {}); alert(JSON.stringify(obj));
type: Answer

http://stackoverflow.com/q/28072727
has body: I'm in a bit of a weird situation, I am dealing with currency in my we app. On the model side, I am saving currency as cents before sending to the server as I don't want to deal with decimal points on the server side. In the view however, I want the to display normal currency and not cents. So, I have this input field where I take the data from dollars and change it to cents: And when there's a change in the input value, I change it back to cents before sending it upstream: handleUpdate: function(e) { var value = e.target.value; // changing it back from cents to dollars value = parseFloat(value) * 100; // save back to the parent component managing the prop this.props.onUserUpdate(value); } This puts me in kind of a deadlock, there's no way for me to enter a decimal point "." Let me demonstrate : 33 in the input box --> becomes 3300 in the parent state --> goes back as 33 in component prop - all good 33.3 in the input box --> becomes 3330 in the parent state --> goes back as 33.3 in the component prop - all good 33. in the input box --> becomes 3300 in the parent state --> goes back as 33 in the component prop - this is the problem As you can see in case #3, when the user first enters "." this doesn't translate back to the same number with "." Since it's a controlled input, there's basically no way of writing "." I have tried using uncontrolled element with defaultValue, but the amount prop is not ready the time the component is rendered so it's just empty http://jsfiddle.net/fpbhu1hs/
tagged with: reactjs
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/28077112
favorite count: 0
type: AnsweredQuestion
has title: translating between cents and dollars in html input in React
possible better answer: http://stackoverflow.com/a/38707841
accepted answer: http://stackoverflow.com/a/28077112
has answer: http://stackoverflow.com/a/38707841
upvote count: 10
type: Question
score: 10
tagged with: javascript

http://stackoverflow.com/q/28066570
has answer: http://stackoverflow.com/a/28069518
accepted answer: http://stackoverflow.com/a/28069518
type: Question
has comment: http://stackoverflow.com/comment/44513448
has comment: http://stackoverflow.com/comment/44513087
score: 5
tagged with: javascript
tagged with: sqlite
answer count: 1
has comment: http://stackoverflow.com/comment/44513481
has title: Read SQLite database from the disk using sql.js
favorite count: 0
upvote count: 5
has body: I am able to read the file when it is being uploaded using - input type="file", but I want to read the SQLite file from a hard coded path. The documentation for sql.js does provide a solution as given below, but i'm not able to get it working. Please help. var fs = require('fs'); var SQL = require('sql.js'); var filebuffer = fs.readFileSync('test.sqlite'); // Load the db var db = new SQL.Database(filebuffer); I hope its very simple and any one using sql.js can answer this.
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/28021149
has title: Google Charts bar chart: How to manually change the colour of every bar? (single series)
has answer: http://stackoverflow.com/a/28021575
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/28021575
upvote count: 2
type: Question
tagged with: google-visualization
tagged with: javascript
has body: I have written a simple bar chart with Google Charts, one series, it works fine, all bars are blue: Now I would like to manually set the colour of the every single bar (actually a green-to-red transition proportional to the value, to make it easier to understand what is good/bad). How can I do this? I have tried setting colors in options as described here but for some reason it does not work in my code below. chco seems to be what I need, but it is an URL parameter... how to elegantly integrate it in JavaScript code? google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Product', 'Score'], ['NemakiWare', 288], ['Nuxeo', 240], ['FileNet', 220], ['SharePoint', 98] ]); var options = { colors: ['green','blue','pink','red'], legend: 'none', hAxis: { textPosition: 'none', minValue: 0, gridlines: { color: 'transparent' } } }; var chart = new google.visualization.BarChart(document.getElementById('chart_div')); chart.draw(data, options); } &lt;script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}"&gt;&lt;/script&gt; &lt;div id="chart_div" style="width: 900px; height: 500px;"&gt;&lt;/div&gt;
answer count: 1
tagged with: bar-chart
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/10592776

http://stackoverflow.com/comment/44594258
type: Comment
type: QuestionComment
has text: `$scope.$digest();` only run digest cycle for their descendant elemet..do try `if(!$scope.$$phase)$scope.$apply();`
comment on: http://stackoverflow.com/q/28110137
score: 1

http://stackoverflow.com/a/28057764
has comment: http://stackoverflow.com/comment/44497463
answers question: http://stackoverflow.com/q/28057603
has comment: http://stackoverflow.com/comment/44497500
has comment: http://stackoverflow.com/comment/44498100
accepted answer of: http://stackoverflow.com/q/28057603
score: 1
has comment: http://stackoverflow.com/comment/44497939
has comment: http://stackoverflow.com/comment/44497795
has comment: http://stackoverflow.com/comment/44497988
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44498021
type: Answer
has body: It doesn't work because the ids for menuBreakfast and menuLunch in the script doesn't match the ids in your HTML where you use breakfastMenu and lunchMenu. Adjusted Bootply with some cleanup to add and remove only the classes that are different instead of adding and removing also the classes that should just stay the same and a second Bootply with the addition of setting #menuLunch and #menuSpecials to display:none as initially #menuBreakfast is active (so only the breakfast dummy image is displayed). As mentioned in comments, Bootstrap was down for some minutes, so in addition as stack snippet: $(document).ready(function () { $("#breakfastButton").click(function (e) { $('#menuLunch').fadeTo(200, 0); $('#menuBreakfast').fadeTo(200, 2); $('#menuSpecials').fadeTo(200, 0); $("#breakfastButtonActive").removeClass('btn btn-large btn-primary').addClass('btn btn-large btn-info'); $("#lunchMenuActive").removeClass('btn btn-large btn-info').addClass('btn btn-large btn-primary'); $("#specialsMenuActive").removeClass('btn btn-large btn-info').addClass('btn btn-large btn-primary'); }); $("#lunchButton").click(function (e) { $('#menuBreakfast').fadeTo(200, 0); $('#menuLunch').fadeTo(200, 2); $('#menuSpecials').fadeTo(200, 0); $("#lunchMenuActive").removeClass(' btn-primary').addClass('btn-info'); $("#breakfastButtonActive").removeClass('btn-info').addClass('btn-primary'); $("#specialsMenuActive").removeClass('btn-info').addClass('btn-primary'); }); $("#specialsButton").click(function (e) { $('#menuBreakfast').fadeTo(200, 0); $('#menuLunch').fadeTo(200, 0); $('#menuSpecials').fadeTo(200, 2); $("#lunchMenuActive").removeClass('btn-info').addClass('btn-primary'); $("#breakfastButtonActive").removeClass('btn-info').addClass('btn-primary'); $("#specialsMenuActive").removeClass('btn-primary').addClass('btn-info'); }); }); #menuLunch , #menuSpecials { display:none; } Breakfast Lunch Weekly Specials Weekly Specials Monday Tuesday Wednesday Thursday Friday Saturday
downvote count: 0

http://stackoverflow.com/comment/45158492
type: Comment
has text: If you use https://github.com/angelozerr/eclipse-wtp-webresources your error is normal because Eclipse WTP / Web Resouirces doesn't support WebJars. Please create an issue at https://github.com/angelozerr/eclipse-wtp-webresources/issues by attaching a simple project with webjars (I have never used this feature).
comment on: http://stackoverflow.com/q/28056700
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44582153
has text: should be allow +, and 0-9 numbers.
comment on: http://stackoverflow.com/q/28103520
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27998371
type: Answer
has comment: http://stackoverflow.com/comment/44386567
has body: Here's a solution to check that if user entered correct date: function isDate(str) { var m = str.match(/^(\d{2})\/(\d[1-12])\/(\d{4})$/); return (m) ? true : false; } Now call it simply with user entered date isDate('03/05/1991') ==&gt; true
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44386964
has comment: http://stackoverflow.com/comment/44388711
answers question: http://stackoverflow.com/q/27998286
has comment: http://stackoverflow.com/comment/44387112
upvote count: 1

http://stackoverflow.com/q/28059509
accepted answer: http://stackoverflow.com/a/28059586
has body: My code it's working , I only need if the radio not checked then press continue, at the end of the question it will show require. I have no idea how to I do that using by JavaScript. I have also tried questions[j].className = "highlight"; HTML: 1. I cant make this work. 1 2 3 4 5 6 7 8 9 10 2. this will not work 2. 1 2 3 4 5 6 7 8 9 10 Continue CSS: .highlight{ content: "*"; color:red; } JavaScript: function validateForm(cname) { var questions = document.getElementsByClassName(cname); formValid = true; for( var j=0; j<questions.length; j++ ) { if( !isOneInputChecked(questions[j], "radio") ) { formValid = false; questions[j].style.border = "2px solid red"; // i use loop to target each question here i change css. } } return formValid; } function isOneInputChecked(sel) { var inputs = sel.getElementsByTagName('input'); for (var k=0; k<inputs.length; k++) { if( inputs[k].checked ) return true; } // End of the loop, return false return false; } and my code return show really werid ,it wont target those which is not checked anymore. how i going to complete this ? thank you.
downvote count: 0
has title: JavaScript adding css text at the end
has answer: http://stackoverflow.com/a/28059586
favorite count: 0
tagged with: css
score: 2
type: AnsweredQuestion
type: Question
upvote count: 2
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/44445097
type: QuestionComment
comment on: http://stackoverflow.com/q/28017463
score: 0
type: Comment
has text: I like strict mode. Named function expressions might be promising, thanks for the link.

scroll
tags question: http://stackoverflow.com/q/27969563
tags question: http://stackoverflow.com/q/28098791
tags question: http://stackoverflow.com/q/28026935
tags question: http://stackoverflow.com/q/28103125
tags question: http://stackoverflow.com/q/27967935
tags question: http://stackoverflow.com/q/28050548
tags question: http://stackoverflow.com/q/28006499
tags question: http://stackoverflow.com/q/28003835
tags question: http://stackoverflow.com/q/28037680
type: Tag
tags question: http://stackoverflow.com/q/27973597
tags question: http://stackoverflow.com/q/27987969
tags question: http://stackoverflow.com/q/27995700
tags question: http://stackoverflow.com/q/27970378
tags question: http://stackoverflow.com/q/28087083
tags question: http://stackoverflow.com/q/28111554
tag name: scroll
tags question: http://stackoverflow.com/q/28070416
tags question: http://stackoverflow.com/q/28111826
tags question: http://stackoverflow.com/q/28100423

http://stackoverflow.com/comment/130103998
type: QuestionComment
has text: The code is correct. Your understanding of integer division is wrong. It is not `if number is not divisible by 2` but `if a number divided by 2 does NOT have remainders`
comment on: http://stackoverflow.com/q/28120525
score: 1
type: Comment

http://stackoverflow.com/a/27982217
has body: e.target is a DOM element, not a jQuery object, so does not have the attr() method hence the undefined error. You need to convert it to a jQuery object: var $target = $(e.target);
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27982188
accepted answer of: http://stackoverflow.com/q/27982188
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/76145575
score: 0
type: Comment
has text: where should i put this code if i use Create React App ? Thanks
type: AnswerComment
comment on: http://stackoverflow.com/a/34967359

http://stackoverflow.com/q/27994097
has body: Having trouble with this. Try to check if a label element contains a "*" anywhere in it and if the parent div has data-required="1" - if it does do nothing. If it does not add "* ". Fiddle - http://jsfiddle.net/9ekvrm8x/6/ $("div[data-required='1'] label").prepend( "* " );
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27994125
score: 0
has answer: http://stackoverflow.com/a/27994353
accepted answer: http://stackoverflow.com/a/27994170
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27994125
answer count: 3
has answer: http://stackoverflow.com/a/27994170
has title: Add a "*" to a label with jQuery if element does not contain a "*"

http://stackoverflow.com/comment/44490348
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28052761
type: Comment
has text: @Leigh thanks for the checkbox note, I definitely meant to cover that and forgot after I got distracted. I agree on everything else. I was just short for time. Cluttering cfoutputs all over just gets miss.

http://stackoverflow.com/comment/44607470
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28116533
has text: i agree with u, for emails i need set just to lowecase, but in the name, i need capitalize the word.

http://stackoverflow.com/comment/44659133
comment on: http://stackoverflow.com/a/28109096
score: 0
type: AnswerComment
type: Comment
has text: It was close, but I was looking for something like the below.

http://stackoverflow.com/a/28080196
has body: Your object will need to be converted to a string before you persist it to a cookie. Your code would therefore take a string, convert it to a JSON object and convert it back to a string before saving it in a cookie. Getting your data back would require reading the string, converting to json, and back to a urlParams string. Anyone who could get your urlString cookie, would be able to also get your urlParamsAsStringifiedJson cookie. I fail to see any added security there. Also, you might consider using localStorage, which has very good browser support and might be a better fit, depending on your use case.
accepted answer of: http://stackoverflow.com/q/28080087
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/28080087

http://stackoverflow.com/a/28240116
accepted answer of: http://stackoverflow.com/q/27988023
type: AcceptedAnswer
has body: Ok, so i solved my problem by having my node server sending updates to a mysql database with something like: I'm XPTO and I'm at 192.169.X.XX. so, when i access my application i tell her what i'm looking for (i always know) like this: XPTO.application.com by the subdomain i check the database for key:value and get my nodejs ip mask in network.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27988023

http://stackoverflow.com/comment/44770461
has text: I just thought the page might not be loading because the PostsController#show action was trying to process the request as HTML when the response in the controller should be JSON. It's probably not a real solution, though
comment on: http://stackoverflow.com/a/28201746
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44533687
has text: @AlexK. As I understand it I cannot write inline javascript if the default language of the page is vbscript.
comment on: http://stackoverflow.com/q/28072209
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44994334
comment on: http://stackoverflow.com/a/28030718
type: AnswerComment
has text: nevermind, came across this https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/core_promise
type: Comment
score: 2

http://stackoverflow.com/q/28033915
tagged with: twitter-bootstrap-3
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/28034237
type: AnsweredQuestion
upvote count: 0
tagged with: javascript
tagged with: angular-ui-bootstrap
favorite count: 0
tagged with: angularjs
type: Question
has title: How to display images in pairs using AngularJS in html
accepted answer: http://stackoverflow.com/a/28034237
has body: I'm developing an application using AngularJS. I would like to display a list of products in a page, but in pairs, so each row will show two images. The products are loaded using REST services. So let's assume we have already all the products loaded in the collection "products". The code I use to iterate over the products is: &lt;div id="products"&gt; &lt;div class="row" data-ng-repeat="product in products"&gt; &lt;div class="col-xs-12"&gt; &lt;img alt="" data-ng-src="{{product.pathToImage}}" height="300" width="200px"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; Like this all the products are displayed each one in a row, is there a way or can someone give me some idea to iterate the collection but displaying two (or more) images in the same row? Thank you very much in advance!
tagged with: http://stackoverflow.com/tag/html
score: -1

http://stackoverflow.com/a/28071981
score: 1
upvote count: 1
has body: U have to use $_GET instead of $_POST than. $x=$_GET['edit'];
type: Answer
has comment: http://stackoverflow.com/comment/44523523
answers question: http://stackoverflow.com/q/28071858
downvote count: 0

http://stackoverflow.com/q/28011956
downvote count: 0
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/28012448
accepted answer: http://stackoverflow.com/a/28012448
has comment: http://stackoverflow.com/comment/44411656
type: AnsweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/44411692
has body: The code below is a working example when you click the image it opens webpage browser in fullscreen, HOWEVER I don't know how to make the javascript toggle fullscreen mode when clicking image again. So the script needs to open full screen mode when clicking image the first time, then exit full screen mode when clicking the same image the second time. HTML: Click image to toogle fullscreen mode JavaScript: (function () { var viewFullScreen = document.getElementById("logo"); if (viewFullScreen) { viewFullScreen.addEventListener("click", function () { var docElm = document.documentElement; if (docElm.requestFullscreen) { docElm.requestFullscreen(); } else if (docElm.msRequestFullscreen) { docElm.msRequestFullscreen(); } else if (docElm.mozRequestFullScreen) { docElm.mozRequestFullScreen(); } else if (docElm.webkitRequestFullScreen) { docElm.webkitRequestFullScreen(); } }, false); } var cancelFullScreen = document.getElementById("logoCONFLICT"); if (cancelFullScreen) { cancelFullScreen.addEventListener("click", function () { if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } }, false); } })();
has comment: http://stackoverflow.com/comment/44411730
has title: Image/DIV Element Toggle Fullscreen
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/28016890
has comment: http://stackoverflow.com/comment/44421352
has answer: http://stackoverflow.com/a/53792583
linked to: http://stackoverflow.com/q/5623838
type: Question
tagged with: javascript
favorite count: 0
answer count: 3
linked to: http://stackoverflow.com/q/8205472
linked to: http://stackoverflow.com/q/1351442
tagged with: css
possible better answer: http://stackoverflow.com/a/53792583
has body: I have two colors in hex form, #000000 and #ffffff. I want to approximate the first color to the second color by a percentage. Something like: var percent=0.50; var color1='#000000'; var color2='#ffffff'; var newcolor=approximateColor1ToColor2ByPercent(color1,color2,percent); //newcolor should be a gray like #808080 how to do this?
has comment: http://stackoverflow.com/comment/44421082
upvote count: 3
accepted answer: http://stackoverflow.com/a/28017063
has title: how to make a color similar to another color by percentage in Javascript
linked to: http://stackoverflow.com/q/726549
downvote count: 1
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28017963
has answer: http://stackoverflow.com/a/28017063

http://stackoverflow.com/q/28083715
has comment: http://stackoverflow.com/comment/85344612
has body: Is there a way to distinguish a real mobile device from a device emulated by Google Chrome? Please note that Google Chrome can emulate Useragent, touchscreen, screen resolution and accelerometer. I need to know some features which cannot be emulated but can be detected by javascript.
has title: How to detect if a mobile device is emulated by Google Chrome?
upvote count: 15
tagged with: mobile
has comment: http://stackoverflow.com/comment/44545329
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28084346
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/76395059
favorite count: 0
has comment: http://stackoverflow.com/comment/44545363
type: Question
tagged with: android
tagged with: php
has comment: http://stackoverflow.com/comment/44545499
answer count: 1
score: 15
has answer: http://stackoverflow.com/a/28084346
has comment: http://stackoverflow.com/comment/44545699

http://stackoverflow.com/comment/44431576
score: 0
has text: `.fail(myFailFunction);` ... It looks like you know how to use referenced function, so your question doesn't make much sense
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28022883

http://stackoverflow.com/comment/44451715
score: 0
type: Comment
type: QuestionComment
has text: This is what you are looking for: [`Promise.all`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all).
comment on: http://stackoverflow.com/q/28033318

http://stackoverflow.com/a/28098849
has comment: http://stackoverflow.com/comment/44573724
upvote count: 2
accepted answer of: http://stackoverflow.com/q/28098791
score: 2
answers question: http://stackoverflow.com/q/28098791
has body: Have you checked the console? I think you have an error in your syntax: var options = {}; var pixels = 300; options['left'] = pixels; options['easing'] = "swing"; $( "#scroll" ).animate(options); You were passing options (an object itself) inside an object. Please refer to the documentation for more information.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44573687
type: Answer

http://stackoverflow.com/q/28039049
answer count: 1
has comment: http://stackoverflow.com/comment/44462262
has title: How to make an Ajax Call Using Javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44464006
has comment: http://stackoverflow.com/comment/44462298
tagged with: javascript
has comment: http://stackoverflow.com/comment/44462276
tagged with: jquery
has comment: http://stackoverflow.com/comment/44462599
tagged with: ajax
has comment: http://stackoverflow.com/comment/44465325
has body: What i need: i need to send ajax call using javascript. i have used jquery for ajax call. Jquery code: var mobile = $("#mobiledropdown".attr("value"); url = window.location.href.indexOf("?") > -1 ? document.URL + "&asyn=1" : document.URL + "?asyn=1", jQuery.support.cors = !0, $.ajax({ type: "GET", url: mobile, cache: !1, dataType: "json", crossDomain: !0, success: function(t) { if (t.industry.length > 0) { industry = "{{ page_param.page.industry_url }}"; for (var e = 0; e < t.industry.length; e++) $("#industry").append("" != industry && t.industry[e].industry_url == industry ? " " + t.industry[e].name + " " : " " + t.industry[e].name + " ") } else $("#industry").addClass("off").css({ "background-color": "#f4f4f4", "border-color": "#eaeaea", color: "#ccc" }), $("#industry").attr("disabled", ""); if (t.country.length > 0) { country = "{{ page_param.page.country_url }}"; for (var e = 0; e < t.country.length; e++) $("#country").append("" != country && t.country[e].country_url == country ? " " + t.country[e].text + " " : " " + t.country[e].text + " ") } else $("#country").addClass("off"), $("#country").attr("disabled", ""); if (t.city.length > 0) { city = "{{ page_param.page.city_url }}"; for (var e = 0; e < t.city.length; e++) $("#city").append("" != city && t.city[e].city_url == city ? " " + t.city[e].text + " " : " " + t.city[e].text + " ") } else $("#city").addClass("off").css({ "background-color": "#f4f4f4", "border-color": "#eaeaea", color: "#ccc" }), $("#city").attr("disabled", ""); if (t.type.length > 0) { type = "{{ page_param.page.event_type }}"; for (var e = 0; e < t.type.length; e++) 1 == t.type[e].entityType && $("#shows").append("" != type && t.type[e].entityType == type ? " Trade Shows " : " Trade Shows "), 2 == t.type[e].entityType && $("#shows").append("" != type && t.type[e].entityType == type ? " Conferences " : " Conferences ") } $("#shows").append(" Venues "), $("#shows").append(" Organizers "), $("#shows").append(" Top100 ") } }); Javascript ajax ca…
type: Question
has answer: http://stackoverflow.com/a/28039829
score: 0
has comment: http://stackoverflow.com/comment/44462204
has comment: http://stackoverflow.com/comment/44462171
tagged with: php

http://stackoverflow.com/comment/44596742
has text: Think this has been answered here: http://stackoverflow.com/questions/1861030/jquery-accordion-opening-a-box-based-on-href
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28111395
score: 1

http://stackoverflow.com/a/37326789
answers question: http://stackoverflow.com/q/28001859
type: Answer
score: 0
has body: I had the same problem but realised that I had targetted the container div and not the form-tag. Might save someone some time.

http://stackoverflow.com/comment/44336736
comment on: http://stackoverflow.com/q/27970131
type: QuestionComment
type: Comment
score: 1
has text: SQL injection city! ur jus aksin 4 ur db 2 gt p0wnd. `mysql_*` functions are deprecated, stop using them.

http://stackoverflow.com/comment/44561304
has text: this part will work when window is closed manually, i need to close the browser window automatically when user click the submit button.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28092470
score: 0

http://stackoverflow.com/comment/44446871
type: Comment
type: QuestionComment
has text: I smell a money making script
score: 2
comment on: http://stackoverflow.com/q/28030910

http://stackoverflow.com/q/28097146
has answer: http://stackoverflow.com/a/28097470
has comment: http://stackoverflow.com/comment/44570686
has body: I don't know if this is possible but what I'm attempting to do is "clean" an object. The basic Idea is I hve a table feeding of an object (in angular) and on click I want to add a new row (a new item in the controlling object, but I want it to have no values in it. I have underscore to play around with. Some considerations are that the object coming in is going to have different key values each time, so I'm trying to keep this polymorphic (if possible). So this is what I have so far : {{key}} {{item}} Title Current Progression {{$index + 1}}/{{inputFaces.length}} Buttons Also Built dynamically Finish So the click right (last) function is only shown if you are on the last object looks like so $scope.faceRightLast = function(index){ //copy current row and empty so we keep a polymorphic format, then add it onto current object, thus adding new empty object var storeRow = $scope.inputFaces[index]; //push new face on face tracking array $scope.inputFaces.push({'isCurrent' : false }); storeRow - clear values out? //after we have a fresh row change the is current $scope.inputFaces[index].isCurrent = false; $scope.inputFaces[index + 1].isCurrent = true; } So I'm making a copy of the current level, which I would then like to clean out the values and keep the keys then push onto the object. Is something like this possible or should I figure out a new approach. Thanks!
type: Question
has answer: http://stackoverflow.com/a/28097380
accepted answer: http://stackoverflow.com/a/28097380
tagged with: javascript
has title: Underscore, clear all values of an object but keep keys
possible better answer: http://stackoverflow.com/a/28097470
score: 0
has comment: http://stackoverflow.com/comment/44570182
answer count: 2
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44570332
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44570823

http://stackoverflow.com/comment/44711623
type: Comment
score: 0
type: AnswerComment
has text: So, did you identify what the issue was? Your question is titled "Tornado Websockets Demo not working on OpenShift" -- did you provide an answer to that? ;)
comment on: http://stackoverflow.com/a/28160351

http://stackoverflow.com/q/28111289
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28111335
downvote count: 0
has comment: http://stackoverflow.com/comment/44596285
type: Question
has answer: http://stackoverflow.com/a/28111335
has body: i got a simple project but is giving me headaches because Client-Side programming is not my thing. Basically i got a login page and the client wants that i prevent XSS attacks not allowing users not submit malicious code on username/password fields. I would do it on server side easily, but they do not want give to us access. Any chance to someone give me hints how can i do this? Even tough i know the basics of javascript/HTML, my experience ir nearly null. I know that are several questions about this topic, but sincerely, i got lost with all information Best Regards
tagged with: javascript
score: 4
possible better answer: http://stackoverflow.com/a/28111412
tagged with: xss
answer count: 2
has answer: http://stackoverflow.com/a/28111412
has comment: http://stackoverflow.com/comment/44596282
tagged with: http://stackoverflow.com/tag/html
tagged with: client-side
favorite count: 0
has comment: http://stackoverflow.com/comment/44596314
upvote count: 4
has title: Prevent XSS on client-side (Pure Javascript)

http://stackoverflow.com/a/28090803
has comment: http://stackoverflow.com/comment/44559893
has comment: http://stackoverflow.com/comment/44670945
has comment: http://stackoverflow.com/comment/44565262
has comment: http://stackoverflow.com/comment/44558270
has comment: http://stackoverflow.com/comment/44559665
has comment: http://stackoverflow.com/comment/44559769
has comment: http://stackoverflow.com/comment/44558634
has comment: http://stackoverflow.com/comment/44559715
has comment: http://stackoverflow.com/comment/44641441
score: 1
has comment: http://stackoverflow.com/comment/44659077
has comment: http://stackoverflow.com/comment/44663936
has comment: http://stackoverflow.com/comment/44562162
has comment: http://stackoverflow.com/comment/44559110
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/28089781
has comment: http://stackoverflow.com/comment/44558368
has body: I have modified your code a bit. May be this example could be helpful to you? Paste into a html file and see it work. Edit: modified code due to change in request Edit2: modified again to put the filter in functions Filter Test Filter is off ID Name Marks 22 Smith 50 23 Jackson 94 45 Doe 80 24 Doe 80 25 Doe 80 29 Doe 80
has comment: http://stackoverflow.com/comment/44558313
type: Answer

http://stackoverflow.com/q/27992550
type: Question
tagged with: jsp
tagged with: javascript
has answer: http://stackoverflow.com/a/27992629
score: 0
possible better answer: http://stackoverflow.com/a/27992578
has answer: http://stackoverflow.com/a/27992578
accepted answer: http://stackoverflow.com/a/27992590
answer count: 4
has answer: http://stackoverflow.com/a/27992659
tagged with: twitter-bootstrap
has body: Trying different ways to change the state of a button by removing the class "disabled". After having tried various suggestions that I found online I have still not been able to get it working as I would like it. Below is the snippet of from the view I accept the <a target="_blank" href="<c:url value='/TermsAndConditions' />" rel="nofollow" >terms and conditions of this transaction <a class="btn btn-default" href="<c:url value='/Cancel' />/${order.id}" role="button"> <spring:message code="result.back" /> <a id="submitBtn" class="btn btn-primary disabled" href="<c:url value='/Confirm' />/${order.id}" role="button" > <spring:message code="result.submit" /> below is lastest attempt I have tried any guidance on what I am doing wrong will be greatly appretiated
type: AnsweredQuestion
has title: trying to change the state of a submit button from disabled to enabled
tagged with: java
has answer: http://stackoverflow.com/a/27992590

http://stackoverflow.com/a/28123738
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28114164
score: 0
type: Answer
has body: the placeholder seems the easiest solution... img{ float: left; } #content{ position: absolute; width: 500px; } .column{ width: 800px; } #placeholder{ width: 550px; height: 200px; float: left; } http://codepen.io/anon/pen/jEwLOd
answers question: http://stackoverflow.com/q/28114164

http://stackoverflow.com/a/28110376
has body: Try adding this new CSS style to keep the box visible when it has focus: #search-text:focus { left: 0px; } Functional example: #search-text { left:300px; position:relative; } #search-text:focus { left: 0px; } .search:hover #search-text { left:0; position:relative; } .search { background: gray; display: inline-block; padding: 10px; overflow:hidden } SEARCH
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28110309
score: 7
answers question: http://stackoverflow.com/q/28110309
upvote count: 7
type: AcceptedAnswer

http://stackoverflow.com/comment/44321457
comment on: http://stackoverflow.com/q/27964089
score: 0
type: Comment
type: QuestionComment
has text: check [this](http://jsfiddle.net/oytoqu7s/)

http://stackoverflow.com/a/28007884
upvote count: 3
type: Answer
score: 3
downvote count: 0
has body: So you want to set default values. define the default values in a separated file. // Define default values. var options = { notifyTimeout: 5, pageInspect: true, linkInspect: true, pushItem: false, notifyMode: 'margin', }; // a method similar to jquery.ready function initOptions(callback) { // get data from remote chrome.storage.sync.get(null, function(data) { // merge remote data into local global `options` $.extend(options, data); // push them back to remote // maybe the extension updated and added new default values. chrome.storage.sync.set(options); // callback method to use updated options. callback &amp;&amp; callback(); }); } // listen to remote data changes, if soem value changed // update the global variable `options`, for example, // you changed an option in options page and push changes to remote // in contentscript, this got the changes and update to new value. // you can use the updated value without a page reload. chrome.storage.onChanged.addListener(function(changes) { for (var name in changes) { var change = changes[name]; options[name] = change.newValue; } }); in the page you want to use options, inject this script and feel free to use global variable options, it works in contentscript too. initOptions(function() { doSomethingWith(options); }); I wrote an article about this, but not in English. http://www.g2w.me/2014/08/sync-chrome-extension-options/
has comment: http://stackoverflow.com/comment/44409259
has comment: http://stackoverflow.com/comment/44406541
accepted answer of: http://stackoverflow.com/q/28006730
has comment: http://stackoverflow.com/comment/44410818
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28006730

http://stackoverflow.com/a/28231775
type: Answer
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: At the end, the following did the job for me. Thanks to JLRishe and A. Wolff for their support. In my previous code, there were two problems. I was not inserting the "img" element along with other conversion code. (Silly mistake but I was working with conversion code for the first time. So please pardon me). Inserting src of the "img" tag in the default format would give error. The default &amp;amp; would render Invalid URL encode error upon AJAX response. Thanks for Tag Assitant. Rather than using &amp;amp;, use &amp; directly like this. www.googleadservices.com/pagead/conversion/xxxxxxxxx/?label=CiaXCOXjzlcQy__EyQM&amp;guid=ONscript=0 Here is what finally worked for me. if (res == "yes") { $('#success').fadeIn().delay(5000).fadeOut(); $('#regform')[0].reset(); &lt;!-- Google Code for Lead Conversion Page --&gt; /* &lt;![CDATA[ */ window.google_conversion_id = xxxxxxxxx; window.google_conversion_language = "en"; window.google_conversion_format = "2"; window.google_conversion_color = "ffffff"; window.google_conversion_label = "CiaXCOXjzlcQy__EyQM"; window.google_remarketing_only = false; /* ]]&gt; */ $.getScript("//www.googleadservices.com/pagead/conversion.js"); window.scriptTag2 = document.createElement('noscript'); window.imgTag = document.createElement('img'); imgTag.height = 1; imgTag.width = 1; imgTag.border = 0; imgTag.src = "//www.googleadservices.com/pagead/conversion/xxxxxxxxx/?label=CiaXCOXjzlcQy__EyQM&amp;guid=ONscript=0"; } I hope it will help the someone else with the same problem. Thank you.
accepted answer of: http://stackoverflow.com/q/27997531
answers question: http://stackoverflow.com/q/27997531

http://stackoverflow.com/q/28088714
downvote count: 0
type: UnansweredQuestion
score: 1
tagged with: java
type: Question
tagged with: jsoup
upvote count: 1
answer count: 1
tagged with: javascript
has title: Dealing with pagination in web pages while using jsoup
favorite count: 0
has body: I have been using jsoup to crawl through webpages of a particular website. Basically i am trying to extract all the href's that have a link of a pdf. I have been successful in getting all the link of a particular page . But there are 10 such pages. The web pages uses a logic of javascript _doPostBack() function to navigate to other pages. How do i get this done by jsoup. This is how i am trying it right now Document document = Jsoup.connect(" some website name") .data("__EVENTARGUMENT", __EVENTARGUMENT) .data("__EVENTTARGET", __EVENTTARGET) .data("__EVENTVALIDATION", __EVENTVALIDATION) .data("__VIEWSTATEGENERATOR ", __VIEWSTATEGENERATOR) .cookie("ASP.NET_SessionId", sessionId) .followRedirects(true) .timeout(0) .userAgent( "Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6") .post(); But i am getting a false url output. I have defined all the variables before sending.
has answer: http://stackoverflow.com/a/28089249

http://stackoverflow.com/comment/44438126
comment on: http://stackoverflow.com/q/28022960
score: 0
type: Comment
type: QuestionComment
has text: tried removing the default UI, that has no effect on the map. I also made a new variable that saves the bounds after markers are generated and insertd map.fitBounds into the save function, but again with no luck :(

http://stackoverflow.com/q/28000614
score: 0
tagged with: jquery-selectors
answer count: 1
tagged with: javascript
tagged with: jquery
has body: The following code should alert the HTML content of a DIV. The DIV is selected by finding its data attribute for the field panel. However the alert is undefined for reasons I cannot explain. $('.access .panel').html(results).data('panel','logon'); alert($('.access .panel[data-panel=logon]').html());
has title: jQuery Select Element by Data Attribute Unexpected Results
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44390370
has answer: http://stackoverflow.com/a/28000660
type: Question

http://stackoverflow.com/q/28107345
score: 0
linked to: http://stackoverflow.com/q/20620300
has title: Passing a PHP variable back to ajax and json
answer count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/44589103
tagged with: http://stackoverflow.com/tag/json
has body: This is something a user helped me with, he told me to use json and it seems smart. But it doesn't work correctly i'm not sure how json and ajax truly work. &lt;?php $rx=$_GET["rx"]; $ry=$_GET["ry"]; $arr=array(); session_start(); if($rx==$_SESSION['randomx'] and $ry==$_SESSION['randomy']){ $arr['good'] = "Cestitam, zadeli ste pravilno celico! rabili ste samo:".$_SESSION['poskus']; } else{ $razdalija=sqrt(($rx-$_SESSION['randomx'])*($rx-$_SESSION['randomx'])+($ry-$_SESSION['randomy'])*($ry-$_SESSION['randomy'])); $arr['bad'] = $_SESSION["poskus"].". Zgresili ste za: ".round($razdalija); $_SESSION["poskus"]++; } echo json_encode($arr); ?&gt; //php function test(celica,i,j){ //this is the js function with ajax $.ajax({ type: "get", url: "preveri.php", data: { rx: i, ry: j} }).success(function(data){ if(data.hasOwnProperty('good')){ //comparing which array json sent celica.className="zelena"; //cell name green $('#tekst').val($('#tekst').val()+ data.good + "\n"); //data should be the text that returns from php } else{ celica.className="rdeca"; $('#tekst').val($('#tekst').val()+ data.bad + "\n");} }); } I need to get the "good" and "bad" array so i can compare them in ajax and know which came back so i can change the cell style.
type: Question
has comment: http://stackoverflow.com/comment/44589014
has comment: http://stackoverflow.com/comment/44589194
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/q/28053346
has comment: http://stackoverflow.com/comment/44488833
type: Question
has comment: http://stackoverflow.com/comment/44489297
tagged with: clipboard-interaction
has comment: http://stackoverflow.com/comment/44489125
tagged with: javascript
has comment: http://stackoverflow.com/comment/44489241
upvote count: 1
linked to: http://stackoverflow.com/q/27908309
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
answer count: 0
tagged with: clipboard
type: UnansweredQuestion
has title: Chrome Extension: Temporarily swap/stash clipboard contents
linked to: http://stackoverflow.com/q/4418958
has comment: http://stackoverflow.com/comment/44490937
has comment: http://stackoverflow.com/comment/44488798
has body: I am in the process of creating a chrome extension that allows you to click on context menu options when you are in an editable element. Clicking a context menu option automatically places some text where the cursor is. The problem I am having is that the process for placing the text differs based on where the text is being placed. For example, If the text is being placed in a textarea, (like the one I am typing in now), the process is different than if I need to put the text in, say, a YouTube comment box, which is its own custom div and does not support the operations that I would use when editing the contents of a normal textarea In my search for a flexible solution that would work the same for all elements that are in the editable category of the chrome.contextMenus API, I thought of the following Idea: I should be able to do what I want if I store my variable in the system clipboard with document.execCommand('copy') and then paste it in wherever the cursor is with document.execCommand('paste') The downside here is that the user would loose whatever they used to have in their clipboard. I originally planned on just pasting the original contents into my own textarea, then restoring it once I am done with the clipboard, but there are 2 problems with this approach: The user would loose whatever formatting they had originally This would only work for text, not images. Is there a way that I can save the contents of the clipboard that would allow me to copy them back to the clipboard at later time without the user noticing any modification to the content? If I have any glaring misconceptions, please correct me as I am new to JS, the DOM and HTML
has comment: http://stackoverflow.com/comment/44489259
has comment: http://stackoverflow.com/comment/44488865
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44491315

http://stackoverflow.com/q/28030180
tagged with: jquery
favorite count: 0
tagged with: wysihtml5
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28235124
downvote count: 0
tagged with: twitter-bootstrap
score: 1
has title: Disable bootstrap wysihtml5 when using sortable.js
type: Question
has answer: http://stackoverflow.com/a/28235124
tagged with: jquery-ui-sortable
tagged with: javascript
has body: I have a set of sortable divs each containing text areas that I have enabled Bootstrap WYSIHTML5. This is all working fine until I try to sort, then I lose the contents of the textarea. My solution is to disable the WYSIWYG on the start() event of sortable, then re-enable on update(). However, I've looked high and low for the code to do this and cannot find it anywhere on the GitHub page or elsewhere. https://github.com/bootstrap-wysiwyg/bootstrap3-wysiwyg Does anyone know where this can be found or have the experience to know what the code would be? For the record, I've tried this, but get an unknown object console error: $('textarea').data('wysihtml5').editor.composer.disable();
upvote count: 1
answer count: 1

http://stackoverflow.com/q/28008915
has answer: http://stackoverflow.com/a/28010033
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Displaying/Hidding chained CSS3 animations with jQuery on Mouseenter/Mouseleave
tagged with: css-animations
score: 2
answer count: 1
accepted answer: http://stackoverflow.com/a/28010033
favorite count: 0
upvote count: 2
tagged with: css
type: AnsweredQuestion
has body: I am playing a bit with animate.css and jQuery on a bootstrap-based environment. But I have a big problem! I want to trigger animations on mouseenter / mouseleave, so I chained some complex set of callbacks, and now It's driving me crazy. Look at my jQuery (no-conflict mode because of other plugins): jQuery(document).ready(function () { var animationend = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend"; var imgRotacion = "animated rotateOut"; var h3Bounce = "animated bounceIn"; var pFlip = "animated flipInX"; var imgRotacionOff = "animated rotateIn"; var h3BounceOff = "animated bounceOut"; var pFlipOff = "animated flipOutX"; jQuery(".procaption").on("mouseenter", function () { jQuery(this).find("img").addClass(imgRotacion).one(animationend, function () { jQuery(this).hide(); jQuery(this).parent().find("h3").removeClass("hidden").addClass(h3Bounce).one(animationend, function () { jQuery(this).parent().find("p").removeClass("hidden").addClass(pFlip); }); }); }); jQuery(".procaption").on("mouseleave", function () { jQuery(this).find("p").removeClass().addClass(pFlipOff).one(animationend, function () { jQuery(this).removeClass().addClass("hidden"); jQuery(this).parent().find("h3").removeClass().addClass(h3BounceOff).one(animationend, function () { jQuery(this).removeClass().addClass("hidden"); jQuery(this).parent().find("img").removeClass(imgRotacion).show().addClass(imgRotacionOff); }); }); }); }); The HTML is pretty simple: This is a title But this is a description! The behavior I want to achieve: Well, I want to chain all the animations, so they appear and disappear in some kind of order at mouseenter and mouseleave events. Actually, it's "working" but only when mouseleaveis triggered after the last animation of mouseenter have happened. If I try to mouseenterand instantly mouseleave, the But this is a description! line appears along with the ... That shouldn't happen! Here's the jsFiddle. I'm sure there should be some easier way, but I…
type: Question

http://stackoverflow.com/a/28113360
answers question: http://stackoverflow.com/q/28113198
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/28113198
type: Answer
has body: It's because your submit button is disabled. If you remove disabled="disabled" it will work. In that code it might make sense to do a check when the password field changes and show/hide the tooltip then, rather than on hover - and just leave the submit button disabled, until they match.

http://stackoverflow.com/a/28001920
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28001805
type: Answer
has body: You probably can do something like this $('article.news-container:odd').each(function(){ $(this).next().addBack().wrapAll(" "); });
accepted answer of: http://stackoverflow.com/q/28001805
score: 0
has comment: http://stackoverflow.com/comment/44394594
has comment: http://stackoverflow.com/comment/44394988

http://stackoverflow.com/a/27968726
type: Answer
downvote count: 0
score: 1
has body: if (condition1 &amp;&amp; condition2 &amp;&amp; condition3) { doSomething(); }else if (!condition1){ doWhatIDoWhenC1isFalse(); }else if (!condition2){ doWhatIDoWhenC2isFalse(); }else{ doWhatIDoWhenC3isFalse(); } You have to do something along the lines of this. No way to cleanly get which expression that failed.
upvote count: 1
answers question: http://stackoverflow.com/q/27968511

http://stackoverflow.com/q/27998888
has title: AngularJS child directive depending on parent directive reusability
has body: Let's define a trivial scenario where a blog has a list of Posts, each with Comments and other Objects. In structuring the Post page, I can image defining the following elements: or: To provide reusability, each directive associated to an element has its own isolated scope. Considering then for example the directive associated to , I can supply it with an Add button, a Reload comments button etc. That's easy, as long as its functions are limited to its own scope. Comments are loaded when Post is first loaded, in the link method of the directive associated to . How can i trigger Comments reloading when (the parent) Post changes? In the directive associated to , should I place a scope.$watch('post') to listen when the associated Post changes and trigger on change the Comments reloading? Should I create a register function in the Post directive, where Comments and Objects subscribe their own controllers, and are notified from a Post function when they need to be reloaded? That is, a manually implemented Observer pattern. $broadcast and $on? Not sure how to implement them with isolated scopes.
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/28000273
has comment: http://stackoverflow.com/comment/44389817
type: Question
linked to: http://stackoverflow.com/q/16199212
tagged with: javascript
answer count: 1
tagged with: angularjs

http://stackoverflow.com/comment/44478681
has text: @NaeemShaikh How could that be expected? And is it possible to remove that line?
score: 0
comment on: http://stackoverflow.com/q/28048236
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27968574
score: 13
has comment: http://stackoverflow.com/comment/44331091
has comment: http://stackoverflow.com/comment/44330395
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44332098
has comment: http://stackoverflow.com/comment/44330691
has comment: http://stackoverflow.com/comment/44332643
has comment: http://stackoverflow.com/comment/44331330
type: Answer
upvote count: 13
has comment: http://stackoverflow.com/comment/44330560
has body: You need to change the CSS classes of the input parent element div.form-group, not the input itself: The HTML after the submit button click should look like this: Name To achieve this, alter your JavaScript code to this:
answers question: http://stackoverflow.com/q/27968361
has comment: http://stackoverflow.com/comment/44330790
accepted answer of: http://stackoverflow.com/q/27968361
downvote count: 0

http://stackoverflow.com/q/28108982
type: Question
has answer: http://stackoverflow.com/a/28109410
has answer: http://stackoverflow.com/a/28109086
tagged with: javascript
has body: I'm having an issue when trying to submit my form. I have made a workaround so that the input gets sent to parse.com by using a hidden button which is visible until all fields are filled in, then this button is hidden and the real submit button is enabled. The problem is that I want to be able to submit the form directly by clicking the submit button without having to click the button twice. I have the following HTML: @ Javascript: Parse.com script $(document).ready(function() { var parseAPPID = "bla"; var parseJSID = "bla"; Parse.initialize(parseAPPID, parseJSID); var VcardObject = Parse.Object.extend("VcardObject"); $("#vcardForm").on("submit", function(e) { e.preventDefault(); console.log("Handling the submit"); //add error handling here //gather the form data var data = {}; data.name = $("#name").val(); data.vorname = $("#vorname").val(); data.fullemail = $("#fullemail").val(); data.telefon = $("#telefon").val(); data.firma = $("#firma").val(); var vcard = new VcardObject(); vcard.save(data, { success:function() { openPage('danke'); console.log("Success"); }, error:function(e) { console.dir(e); } }); }); });
has title: Single click to submit form
answer count: 3
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28111240
favorite count: 0
type: UnansweredQuestion
downvote count: 0
score: 1
tagged with: forms

http://stackoverflow.com/comment/57344585
type: AnswerComment
comment on: http://stackoverflow.com/a/31544156
type: Comment
has text: In the current version of chrome, at least, sayHello.name is still ""; Note that like all functions, sayHello is an object, so you can define arbitrary properties to it if you want. You can't write to "name" as it is read-only, but you could sayHello.my_name="sayHello"; Not sure what that gets you though, since you can't do/reference that within the body of the function.
score: 1

http://stackoverflow.com/comment/44376866
type: Comment
type: QuestionComment
has text: OK but why out of all the CashThreshold amounts is 5000000 coming up?
comment on: http://stackoverflow.com/q/27991433
score: 0

http://stackoverflow.com/q/28007794
tagged with: css
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/5105530
score: 0
has title: Javascript to change keyframe values in external css sheet (No Inline Style Changes!)
type: Question
has answer: http://stackoverflow.com/a/28011435
tagged with: rotation
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28011435
tagged with: css-animations
has comment: http://stackoverflow.com/comment/44403661
answer count: 2
has body: What I am trying to do is depending on a variable I get, change the 100% rotate value in the keyframe to the new calculated value. I have no problem with using Javascript to do this, but I want it to be done in the External CSS, not inline, once changed I need to restart the animation for that time. Is this possible? If so, how? (NOTE ALL DONE CURRENTLY THROUGH BUTTON CLICK) this is not to be saved, only done to update the graphic with a new position. .arrow { -webkit-animation: rotate 3s linear 0 1; animation: rotate 3s linear 0 1; -webkit-transform: rotate(0deg); transform: rotate(0deg); -webkit-animation-play-state: paused; animation-play-state: paused; visibility: visible !important; } @-webkit-keyframes rotate { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } Any help will be much appreciated! I have been trying to find something that would work for about a week now.
has answer: http://stackoverflow.com/a/28327026
accepted answer: http://stackoverflow.com/a/28327026

http://stackoverflow.com/q/28013128
has body: I'm trying to reload an image from my webserver every n seconds. The code below drags the new picture, but it doesn't replace the old one in the client. Where is my mistake? &lt;div ng-app="refresh-div" ng-controller="refresh_control"&gt; &lt;img ng-src="{{imageUrl}}" /&gt; &lt;/div&gt; &lt;script&gt; var app = angular.module('refresh-div', []) .controller('refresh_control', function ($scope, $http, $timeout) { $scope.imageURL = 'assets/now.png?_ts=' + new Date().getTime(); $scope.getData = function () { $http.get($scope.imageURL, { cache: false }).success(function (data, status, headers, config) { $scope.image = data; $scope.imageUrl = "http://mywebsite/assets/now.png"; }); }; $scope.intervalFunction = function () { $timeout(function () { $scope.getData(); $scope.intervalFunction(); }, 1500) }; $scope.intervalFunction(); }); &lt;/script&gt;
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44414127
has answer: http://stackoverflow.com/a/28014604
score: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28014604
has comment: http://stackoverflow.com/comment/44434557
has answer: http://stackoverflow.com/a/28013459
type: Question
upvote count: 4
answer count: 2
has title: Reload image in Angular
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28013459
has comment: http://stackoverflow.com/comment/44414016
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/54876282
answers question: http://stackoverflow.com/q/28117500
downvote count: 0
has body: I blogged a solution at http://www.emberdaily.com/2019/02/25/filter-by-multiple-values/ Essentially, this.get('myProjects').filter(project =&gt; project.get('status') === 'done' || project.get('status') === 'active');
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/113166982
score: 2

http://stackoverflow.com/q/27993134
has comment: http://stackoverflow.com/comment/44377027
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/27999962
has comment: http://stackoverflow.com/comment/44377634
answer count: 3
has answer: http://stackoverflow.com/a/27993223
has comment: http://stackoverflow.com/comment/44377033
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/44377137
has answer: http://stackoverflow.com/a/27993236
type: UnansweredQuestion
tagged with: momentjs
upvote count: 0
has comment: http://stackoverflow.com/comment/44377107
has comment: http://stackoverflow.com/comment/44377238
type: Question
has body: My user can change the url with a date. When I enter the url`s date params to 2015-02-31 and I create a momentJS object of it I get a date like 03 March 2015. Even when I consider that the date 2015-02-31 and its month '02' is actually the third month for javascript then the date after creation should be 31 March 2015 and not 03 March 2015 So why the wrong date?
has title: Why does momentJS convert "02-31-2015" into "03 March 2015"

http://stackoverflow.com/q/28061992
has answer: http://stackoverflow.com/a/28062106
type: Question
linked to: http://stackoverflow.com/q/2450954
has answer: http://stackoverflow.com/a/28083269
tagged with: javascript
has body: I have this code: This give me a random image and it changes when i click on it. This images are 5 math questions, i want to add 5 answers images: answer1.png, answer2.png ... answer5.png I want my script to do this: When i enter webpage to give me a random image (question) when i click on it to give me the answer image. Ex. If random image is 1.png to give me answer1.png when i click answer1.png to give me another random question then the answer to that question and so on ... I don't want to get repeated questions until are all displayed then go another random sequence of 5 images and answers. Thank you! Or i can use different webpages with links instead of images, but is harder to meke no repeat. What do you think?
score: 0
tagged with: random
answer count: 3
has comment: http://stackoverflow.com/comment/44504966
has answer: http://stackoverflow.com/a/66434377
type: UnansweredQuestion
has title: Javascript random image and answer

http://stackoverflow.com/q/28006714
has comment: http://stackoverflow.com/comment/44401841
has title: Delete Javascript object item adding null value
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/28006742
type: Question
duplicate of: http://stackoverflow.com/q/500606
has body: I have an javscript object finalTitleList =[{"Title":"ffd","Iscompleted":"","Id":0}, {"Title":"fdfmdbk","Iscompleted":"","Id":1}, {"Title":"fdf,d","Iscompleted":"","Id":2}] Suppose i like to delete an 2nd item using delete finalTitleList[1], after deletion it delete the item but length is not updated(snapshot attached: contain only 2 item but showing length 3). So when i am adding that object in localstorage using localStorage.setItem("TaskTitleList16", JSON.stringify(finalTitleList)); On place of deleteditem it shows null. I want to completely remove that item, please help me.
has answer: http://stackoverflow.com/a/28006742
tagged with: javascript
score: 9
answer count: 1
favorite count: 0
upvote count: 9
linked to: http://stackoverflow.com/q/500606

http://stackoverflow.com/q/28100970
has title: How can vbscript get javascript postback webform data?
score: 0
answer count: 1
tagged with: asp.net
type: UnansweredQuestion
tagged with: dopostback
has body: Firstly, I am new to all kinds of scripting. Any help is greatly appreciated. I am using Vbscript to try and grab data submitted via javascript:webform postback, and I am lost. I know absolutely nothing about javascript. Every time someone adds something to the input field &amp; clicks the Add button, a form(?) is created on the page adding this info, for example the number "123456789", click Add, "987654321", click add...a list is created. After I click add, those variables still do not show up in the source coding, so I do not know how to get that infomation. Here is the Javascript postback info : '&lt;input type="button" name="ctl00$ContentPlaceHolder1$Button2" value="Add" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&amp;quot;ctl00$ContentPlaceHolder1$Button2&amp;quot;, &amp;quot;&amp;quot;, true, &amp;quot;icn&amp;quot;, &amp;quot;&amp;quot;, false, true))" id="ctl00_ContentPlaceHolder1_Button2" tabindex="6" style="font-size: xx-small" /&gt;' Here is the input field the info gets entered into : '&lt;input name="ctl00$ContentPlaceHolder1$CCICN" type="text" maxlength="100" id="ctl00_ContentPlaceHolder1_CCICN" tabindex="4" style="width:104px;text-align: center" /&gt;' There are several hidden input fields.. and a viewstate one with a insanely long value. '&lt;input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /&gt;' I am unsure what other information you would need to help. Thank you.
tagged with: vbscript
type: Question
has answer: http://stackoverflow.com/a/28161388
tagged with: javascript

http://stackoverflow.com/a/28073214
has body: You need to add a language parameter in you API request. For example: https://maps.googleapis.com/maps/api/js?language=ja will return information in Japanese. You can visit this page about Google Maps Language Localization. Also, the list of supported languages.
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/28062542
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/127057189
answers question: http://stackoverflow.com/q/28062542
type: Answer
upvote count: 4

http://stackoverflow.com/comment/44365584
has text: Can you show how Quiz.get is implemented?
type: Comment
comment on: http://stackoverflow.com/q/27987325
type: QuestionComment
score: 0

http://stackoverflow.com/a/28062621
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has body: To check field length, just add minlength attribute to the &lt;input&gt; tag, like &lt;input id="pw" name="pw" minlength="6" type="password"&gt; To add some custom validation, use addMethod(): jQuery.validator.addMethod("func", function(value, element) { return this.optional(element) || check expression here; }
upvote count: 1
has comment: http://stackoverflow.com/comment/108676192
answers question: http://stackoverflow.com/q/28062463
accepted answer of: http://stackoverflow.com/q/28062463

http://stackoverflow.com/comment/44411029
score: 0
has text: as there are two button in you code. It is possible to use only one button to do above task?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28011682

http://stackoverflow.com/a/28005627
has comment: http://stackoverflow.com/comment/44399950
has body: To me this seems the most straightforward way of doing this: var first = 'newpost'; var currentDiv = document.getElementById(first); function addDivToggle(buttonId, divId) { var button = document.getElementById(buttonId); var newDiv = document.getElementById(divId); button.addEventListener('click', function(){ currentDiv.style.display = 'none'; newDiv.style.display = ''; currentDiv = newDiv; }); } addDivToggle('button1', 'newpost'); addDivToggle('button2', 'UpgradesDiv'); Here i'm assuming that 'newpost' is already visible, and the other divs are hidden.
answers question: http://stackoverflow.com/q/28005368
has comment: http://stackoverflow.com/comment/44406623
has comment: http://stackoverflow.com/comment/44406574
score: 0
type: Answer

http://stackoverflow.com/a/31308106
type: Answer
has body: I upgraded to v4 and the below code 'kinda' works for pushing the values (but the select2 control is duplicated with the option. possibly a bug in v4). $('.searchrow').click(function (e) { var srchdata = $(this).data('search').split("|"); var target = ".srchtarget-" + $(this).data('target'); var targetoption = target + " option[value='" + srchdata[0] + "']"; var parentctrl = window.parent.document; $(targetoption,parentctrl).attr("selected","selected"); $(target,parentctrl).select2(); });
answers question: http://stackoverflow.com/q/28004771
score: 0

http://stackoverflow.com/comment/44532353
has text: i'll pull using the cdn. :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28071197
type: Comment

http://stackoverflow.com/comment/44541987
comment on: http://stackoverflow.com/q/28039442
score: 0
has text: not really familiar with ember but i assume you may have access to DOM elements and then can do something like `$(emberElement).datepicker()`
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44549093
type: QuestionComment
comment on: http://stackoverflow.com/q/28085629
score: 0
has text: Please post the code you've used to help us understand your problem..
type: Comment

http://stackoverflow.com/comment/44371734
score: 0
type: AnswerComment
type: Comment
has text: I think this is what I need, I will try it after dinner and if this does what I think it does I will accept your answer, thanks!
comment on: http://stackoverflow.com/a/27990361

http://stackoverflow.com/comment/44594156
comment on: http://stackoverflow.com/q/28110186
has text: Please, can you post the HTML involved ?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/28012667
has title: Uncaught TypeError: Cannot set property 'innerHTML' of null in javascript
favorite count: 0
linked to: http://stackoverflow.com/q/14028959
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
duplicate of: http://stackoverflow.com/q/14028959
score: 1
upvote count: 1
has body: Testing time remaining = I am trying to run this reverse timer but it does display anything . I get an error message when i Log it. I also checked it with increasing timer duration but still i get an error.When i alert it i get the exact count down.
type: Question
tagged with: javascript
downvote count: 0
has answer: http://stackoverflow.com/a/28012710
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/44330105
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27967453
has text: Quoting from the site: "When an HTML document has been switched to designMode, [...]". This is not exactly what I'm looking for.

timer
tag name: timer
type: Tag
tags question: http://stackoverflow.com/q/28020891
tags question: http://stackoverflow.com/q/27975841
tags question: http://stackoverflow.com/q/28097204

http://stackoverflow.com/q/27974801
tagged with: d3.js
type: UnansweredQuestion
tagged with: dictionary
has body: I'm new to D3 and have been making graphs based on the examples at http://bl.ocks.org/robschmuecker/7880033 and http://bost.ocks.org/mike/map/. I found out elsewhere on this site (D3 tree graph with links) how to link the node labels in the tree graph to another page. However, when I tried something similar with the map, it simply didn't work and I'm trying to figure out why. I've used the Firefox web inspector to see more of what's really happening in the output, but am still confused. The links in the tree diagram look like this in the web inspector: Example text These work like any other link would. The ones in the map look like this: Example text These don't work at all. The text displays as it should, but nothing happens if I click on them. Here's the code I'm using to generate them: svg.selectAll(".place-label") .data(places.features) .enter().append("a") .attr("xlink:href", function(d) {return "www.example.com"}) .append("text") .attr("class", "place-label") .attr("transform", function(d) { return "translate(" + projection(d.geometry.coordinates) + ")"; }) .attr("x", function(d) { return d.geometry.coordinates[0] > -1 ? 6 : -6; }) .attr("dy", ".35em") .style("text-anchor", function(d) { return d.geometry.coordinates[0] > -1 ? "start" : "end"; }) .style("fill", function(d) {return d.properties.level;}) .text(function(d) { return d.properties.name; }); Note that the "level" property in the next-to-last line comes from a column I added to the file containing city information in CSV form before I converted it to JSON and the value assigned to the "href" attribute will be replaced with something based on another column I added to this file. Update: I tried changing the code to this: svg.selectAll(".place-label") .data(places.features) .enter() .append("g") .attr("transform", function(d) { return "translate(" + projection(d.geometry.coordinates) + ")"; }) .append("a") .attr("xlink:href", function(d) {return "www.example.com"}) .append("text") .attr("class", "place-…
has title: Adding links to a D3 map
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/18230133
tagged with: hyperlink
tagged with: javascript
has comment: http://stackoverflow.com/comment/44342813
has comment: http://stackoverflow.com/comment/44343344
answer count: 1
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44343021
favorite count: 0
has answer: http://stackoverflow.com/a/27994584

http://stackoverflow.com/a/28083095
type: Answer
answers question: http://stackoverflow.com/q/28082164
has body: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#Conversion_getter new Date('2015-01-01').toDateString();
has comment: http://stackoverflow.com/comment/44582117
has comment: http://stackoverflow.com/comment/44651414
score: 0

http://stackoverflow.com/comment/44663160
has text: Of course, this makes so much sense. This was just one of those mental blocks I needed to get past in my introduction to low-level OpenGL programming. Thanks again!
type: AnswerComment
comment on: http://stackoverflow.com/a/28141524
score: 0
type: Comment

http://stackoverflow.com/comment/44613184
has text: it seems that the speech marks around the number associated with value is breaking the chart. The JSON is now valid. so "value" :"21" speech marks around 21 break the chart. I started with jquery but when the chart did not work I wanted to eliminated the ajax as the problem and get it working on one page narrow down the causes of failure
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28118986
type: AnswerComment

http://stackoverflow.com/comment/44543477
comment on: http://stackoverflow.com/q/28082711
score: 0
type: Comment
type: QuestionComment
has text: Do you have your code that handles the rotation?

http://stackoverflow.com/a/27966352
type: Answer
has comment: http://stackoverflow.com/comment/44325865
score: 2
answers question: http://stackoverflow.com/q/27966080
upvote count: 3
has body: Just click on another element on the page you are sure is present. Browser.Driver.FindElement(By.Id("testtest123")).Click(); Another solution may be to invoke javascript removing the focus from that email field, it depends on the trigger you have set for the ajax to trigger.
has comment: http://stackoverflow.com/comment/44327061
downvote count: 1
has comment: http://stackoverflow.com/comment/44325953

http://stackoverflow.com/q/28037535
has answer: http://stackoverflow.com/a/28047338
has body: Jquery fade toggle, how can I to add fade effect delay in each button for 1000 ms, 1500 ms ,200ms etc it confuses me because there is already a fade toggle in the div .thanks in advance Building Construction Locational Clearance Exemption Certificate Conversion Order EEC/CNC Subdivision Memorial Preliminary Approval Development Permit Alteration Plan Simple Subdivision
tagged with: javascript
tagged with: fade
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/28047338
type: Question
has comment: http://stackoverflow.com/comment/44459799
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 2
has comment: http://stackoverflow.com/comment/44459608
has title: Jquery fade toggle how to add fade effect in each button
answer count: 1

http://stackoverflow.com/comment/44539264
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28080245
type: QuestionComment
has text: @Treadstone You didn't find a way? There's a big [?] in the edit text box's toolbar which you can get help for everything.

http://stackoverflow.com/q/28030674
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28030793
tagged with: http://stackoverflow.com/tag/json
score: 6
duplicate of: http://stackoverflow.com/q/244777
type: Question
has comment: http://stackoverflow.com/comment/44446078
tagged with: javascript
has comment: http://stackoverflow.com/comment/44446129
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/44446105
upvote count: 6
tagged with: visual-studio
linked to: http://stackoverflow.com/q/244777
has body: Some date is stored in a json file, how can I comment out some lines like below? [ { "id":"aaaa", // "path": "xxxx", "path": "yyyy" }, { "id":"bbbb", "path": "cccc" } ] My IDE is Visual Studio.
has title: How can I comment out lines inisde json file?

http://stackoverflow.com/a/27978399
upvote count: 1
has body: All valid email addresses contain the @ symbol. You can read the Internet Message Format standard for more information: https://www.rfc-editor.org/rfc/rfc5322 Specifically 3.4.1. Addr-spec specification: https://www.rfc-editor.org/rfc/rfc2822#section-3.4.1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27978382
score: 1

http://stackoverflow.com/comment/44375220
has text: I don't think this would be end behavior. I've written very similar applications (albeit not using phonegap) and I've gotten good performance. Obviously, this is limited to the networks that your clients are using. If you are writing a specialized app for an area, you could conceivably look into overlaying cached map data if you think it will be a problem.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27991792

http://stackoverflow.com/comment/44427953
score: 0
comment on: http://stackoverflow.com/q/28020880
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/26017571/object-declarations-do-strings-as-keys-make-a-difference/26017647#26017647

http://stackoverflow.com/a/43842821
type: Answer
has body: Set the z-index higher for buttons than slide div and put backface-visibility:hidden; on button and slide both.
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/28041675
downvote count: 0

http://stackoverflow.com/q/28059029
tagged with: select
linked to: http://stackoverflow.com/q/27981674
type: Question
has title: select option generate value from ajax on change
possible better answer: http://stackoverflow.com/a/28059272
has answer: http://stackoverflow.com/a/28059272
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/28059053
has body: I have here the code and flow of my project i have 3 select here one for continent one for country one for city i get data to populate these select from ajax request it is now working fine i just want to make a bit fancy so i want to have a few function 1.When Continent is select the list of country for that continent is listed in the country list when the change happens I want the city to also show the cities of the first entry in the country currently it does not happened what i do is i still need to change the entry in country select to show the list of cities 2.Question is do i need to add another ajax request inside the ajax request for continent i am not sure this one is feasible i tried it, it is not working for now Ajax Code $('.continentname').change(function() { var id = $(this).find(':selected')[0].id; //alert(id); $.ajax({ type:'POST', url:'../include/continent.php', data:{'id':id}, success:function(data){ // the next thing you want to do var country= document.getElementById('country'); $(country).empty(); var city = document.getElementById('city'); $(city).empty(); for (var i = 0; i &lt; data.length; i++) { $(country).append('&lt;option id=' + data[i].sysid + ' value=' + data[i].name + '&gt;' + data[i].name + '&lt;/option&gt;'); } } }); }); $('.countryname').change(function() { var id = $(this).find(':selected')[0].id; $.ajax({ type:'POST', url:'../include/country.php', data:{'id':id}, success:function(data){ // the next thing you want to do var city = document.getElementById('city'); $(city).empty(); for (var i = 0; i &lt; data.length; i++) { $(city).append('&lt;option id=' + data[i].sysid + ' value=' + data[i].name + '&gt;' + data[i].name + '&lt;/option&gt;'); } } }); }); From database i put the value into the option select like $("#continent").val(continentid); $("#continent").change(); $("#country").change(); $("#country").val(countryid); $("#city").val(cityid);
score: 11
tagged with: php
upvote count: 11
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28059053

http://stackoverflow.com/a/28042536
answers question: http://stackoverflow.com/q/28032329
has comment: http://stackoverflow.com/comment/44492778
type: Answer
has comment: http://stackoverflow.com/comment/44468807
has comment: http://stackoverflow.com/comment/44492897
upvote count: 1
downvote count: 1
has body: Not the prettiest solution but I afraid there is no such Qml mechanism. You could apply on your image second image with same source and clip it to your needs, like below: Image { id: img anchors.fill: parent source: "bug.png" Item { id: info anchors.centerIn: parent height: 200 width: 200 Text { text: "HAMMER TIME" color: "white" } /* BLUR CODE HERE TO BLUR BACKGROUND OF THIS ITEM */ /* which is a part of "bug.png" image with 200x200 size */ /* and offset equals to "info.x" and "info.y" */ clip:true Image { id: img2 x: -info.x y: -info.y width: img.width height: img.height source: img.source } FastBlur { anchors.fill: img2 source: img2 radius: 32 } }
score: 0

http://stackoverflow.com/comment/44383146
has text: So each node will have an x,y on a map, and some other random bits of properties to them, and then an array of other nodes that it connects to so the path finder can find a path to destination through these nodes..
type: Comment
comment on: http://stackoverflow.com/a/27996408
score: 0
type: AnswerComment

http://stackoverflow.com/a/28046569
has body: You would need to do something like this: google.maps.event.addListener(marker, 'click', function() { alert("Hello World"); }); Where marker is the reference to the marker you created (of type google.maps.Marker). So, you do it whenever you want, but you'll need a valid google.maps.Marker object, ideally you'll want to do it promptly after creating your marker. So, updating your code to the following should work: $(document).ready(function() { //--- Ajax Request ------------------------------------------------------------------------------------------------------------------------ $.ajax({ dataType: "json", url: "karte-e.php", success: function(msg) { initialize(msg); } }); //--- Ende Ajax Request ------------------------------------------------------------------------------------------------------------------------ //--- Funktionen Google Maps API ------------------------------------------------------------------------------------------------------------------------ function initialize(json) { var mapProp = { center:new google.maps.LatLng(51.508742,-0.120850), zoom:2, mapTypeId:google.maps.MapTypeId.ROADMAP }; map=new google.maps.Map(document.getElementById("googleMap"),mapProp); setMarkers(map, json); } function setMarkers(map, locations) { var image_normal = { url: 'Pins/pin-blau.png', size: new google.maps.Size(32, 32), origin: new google.maps.Point(0,0), anchor: new google.maps.Point(0, 32) }; var image_neu = { url: 'Pins/pin-rot.png', size: new google.maps.Size(32, 32), origin: new google.maps.Point(0,0), anchor: new google.maps.Point(0, 32) }; var shape = { type: 'rect', coords: [5, 1, 27, 32] }; for (var i = 0; i &lt; locations.Standorte.length -1; i++) { var myLatLng = new google.maps.LatLng(locations.Standorte[i].lat, locations.Standorte[i].lng); var marker_normal = new google.maps.Marker({ position: myLatLng, map: map, icon: image_normal, shape: shape, title: locations.Standorte[i].Titel, zIndex: i }); (function(marker){ google.maps.event.addListener(mark…
has comment: http://stackoverflow.com/comment/44511663
has comment: http://stackoverflow.com/comment/44481371
has comment: http://stackoverflow.com/comment/44485569
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44510622
downvote count: 0
has comment: http://stackoverflow.com/comment/44510905
has comment: http://stackoverflow.com/comment/44526105
answers question: http://stackoverflow.com/q/28046440
has comment: http://stackoverflow.com/comment/44475646
type: Answer
has comment: http://stackoverflow.com/comment/44546599
has comment: http://stackoverflow.com/comment/44590528
upvote count: 3
accepted answer of: http://stackoverflow.com/q/28046440
score: 3
has comment: http://stackoverflow.com/comment/44516032

http://stackoverflow.com/comment/44612269
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28118757
score: 1
has text: It is [*much more efficient*](http://jsperf.com/jquery-vs-pojs-no-text) to use `if (!/\S/.test(this.textContent || this.innerText))`.

http://stackoverflow.com/comment/44608010
score: 0
type: AnswerComment
has text: My bad, didn't notice. There is a property called `__metadata` that contains an url (and a bunch of other things) that contains `kuwait`, so all objects fill match that. I will give you a solution soon.
type: Comment
comment on: http://stackoverflow.com/a/28105438

http://stackoverflow.com/a/28085339
type: Answer
upvote count: 4
has body: You are trying to get select data attribute, and not option's. Also, I can see that all you data attributes are identical. Then you can move it from option to select itself: and use code snipped from your question unmodified. function check_status(obj) { var uid = obj.options[obj.selectedIndex].getAttribute('data'); alert(uid) } open pending finished canceled
downvote count: 0
answers question: http://stackoverflow.com/q/28085201
score: 4

http://stackoverflow.com/comment/44475161
comment on: http://stackoverflow.com/a/28046357
type: Comment
type: AnswerComment
has text: I was removing a debugging line (document.write) ... the StackOverflow editor isn't as friendly to use as I expected :(
score: 0

http://stackoverflow.com/comment/44433561
type: AnswerComment
comment on: http://stackoverflow.com/a/28022273
score: 0
type: Comment
has text: I changed first line for these one, but it's still not working.

http://stackoverflow.com/a/28037277
downvote count: 0
has comment: http://stackoverflow.com/comment/44472386
type: Answer
score: 2
upvote count: 2
has body: Backbone binds events using a view method called delegateEvents(). The method scopes event selectors to those of the view, using this.$el.on(eventName, selector, method); If you want to bind view methods to elements outside your view you'll have to do it the old fashioned way, $(selector).click(this.someMethod); While making sure to bind the method to your view object using something like Underscore's _.bindAll and to call $.off when you dispose the view.
answers question: http://stackoverflow.com/q/28036967

http://stackoverflow.com/comment/44528199
score: 0
type: AnswerComment
type: Comment
has text: Post it on JsFiddle or Plunker.
comment on: http://stackoverflow.com/a/28074007

http://stackoverflow.com/q/27972448
answer count: 2
tagged with: arrays
has answer: http://stackoverflow.com/a/27972692
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44337658
has title: Return numbers of an array in javascript
has body: I made an array with some numbers Number: function() { var someArray = [3,3,1]; for (var i=0, item; item=someArray[i]; i++) { return item; } } }; It only repeats the first number of the array when I call it. newRound: function() { $('[data-round]').text(++this.round); this.sequence.push(this.Number()); this.copy = this.sequence.slice(0); this.animate(this.sequence); }, Each round it should add one number of the array. But somehow I keep getting the first number of the array only.
has comment: http://stackoverflow.com/comment/44337586
type: Question
has answer: http://stackoverflow.com/a/27972727
tagged with: javascript
has comment: http://stackoverflow.com/comment/44337609
score: 0

http://stackoverflow.com/comment/44366347
comment on: http://stackoverflow.com/a/27987646
type: Comment
score: 1
has text: Note that `:first` is a jQuery extension, and as such, would be more performant if used separately. `$("#div1 .another").filter(":first")` or `$("#div1 .another").first();` http://api.jquery.com/first-selector/
type: AnswerComment

http://stackoverflow.com/q/27975389
score: 0
has comment: http://stackoverflow.com/comment/44343406
has comment: http://stackoverflow.com/comment/44346332
has title: TypeError: a is undefined in my Javascript
has comment: http://stackoverflow.com/comment/44381947
tagged with: angularjs
has body: I cleaned up my code but now when I run it I am getting the following error TypeError: a is undefined I am not sure where it is coming from since it was working before I added the nested view and did not change the controller. Here is my code in plunkr. Let me know if there is anything else you need.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44345012
upvote count: 1
has answer: http://stackoverflow.com/a/27976845
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44346543
has comment: http://stackoverflow.com/comment/44346395
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44346454
favorite count: 0

http://stackoverflow.com/comment/44400359
type: Comment
comment on: http://stackoverflow.com/a/28005947
type: AnswerComment
score: 0
has text: Without seeing what's in getItems it's difficult to answer, but as long as each item has title set to the title then each textbox will be populated with the title. If the value is changed in the textbox then the item title will be set

http://stackoverflow.com/comment/44605266
type: QuestionComment
type: Comment
has text: Tnx for the remark, here is the jsfiddle http://jsfiddle.net/pevoje/j34j24nr/
comment on: http://stackoverflow.com/q/28110782
score: 0

http://stackoverflow.com/comment/44525546
has text: @Crayon Violent, at the moment I am indeed using _.on("keyup change blur")_ as triggers. Your idea sounds interesting, I will look into it. Thank you.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28072806

http://stackoverflow.com/a/28083423
score: 2
has body: GetElementById should be getElementById
upvote count: 2
answers question: http://stackoverflow.com/q/28083384
has comment: http://stackoverflow.com/comment/44544802
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44545050
accepted answer of: http://stackoverflow.com/q/28083384
type: Answer
has comment: http://stackoverflow.com/comment/44544955

http://stackoverflow.com/q/28099930
has comment: http://stackoverflow.com/comment/44575606
has answer: http://stackoverflow.com/a/28099974
tagged with: php
type: Question
tagged with: javascript
score: 0
answer count: 1
has body: if($rx==$_SESSION['randomx'] and $ry==$_SESSION['randomy']){ echo "Cestitam, zadeli ste pravilno celico! rabili ste samo:".$_SESSION['poskus']; } else{ $razdalija=sqrt(($rx-$_SESSION['randomx'])*($rx-$_SESSION['randomx'])+($ry-$_SESSION['randomy'])*($ry-$_SESSION['randomy'])); echo $_SESSION["poskus"].". Zgresili ste za: ".round($razdalija); $_SESSION["poskus"]++; } Both echos return a sentense how can i differenciete those two sentences? In the ajax function i want to compare which one came back so i can set the background color.
tagged with: jquery
tagged with: ajax
has title: Passing a PHP variable back to ajax
type: UnansweredQuestion

http://stackoverflow.com/q/28092152
type: Question
has title: Pass js variable to form action url
tagged with: javascript
has body: I'm not sure if this is possible, or if I am doing it the wrong way? I have a form that when submitted, should send the user to a URL depending on the input. e.g If the users inputs '2', the URL should be books/itemView?id=2 I have created a var = id, which takes the search input box data. Is it possible to add this variable to my current form action? Perhaps there is a more efficient way? My current code is as follows; &lt;form id="search" action="&lt;?php echo URL; ?&gt;books/itemView?id=" method="post"&gt; &lt;input type="text" name="search" id="demo"/&gt; &lt;input type="submit" value="Submit"&gt; &lt;/form&gt; My JS $(document).ready(function(){ var id = $('#search').val(); }); Quite new to JS so any help appreciated.
tagged with: jquery
answer count: 3
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
possible better answer: http://stackoverflow.com/a/28092227
accepted answer: http://stackoverflow.com/a/28092501
tagged with: php
has answer: http://stackoverflow.com/a/28092237
has answer: http://stackoverflow.com/a/28092227
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/44560648
score: 1
has answer: http://stackoverflow.com/a/28092501

http://stackoverflow.com/comment/44369095
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27989033
has text: getElementByName should be getElementsByName, missing an 's'.
type: Comment

http://stackoverflow.com/a/28115699
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28114184
score: 1
has body: This is really bad practice, to have people edit an html table for data. I would make an array that is easily readible to any human being so they can edit it: var categoryData = [ "History", "English", "Economics", "Computer Science" // and so on... ]; var universitiesData = [ "West Virginia University", "Fairmont State University", "University of Charleston" // and so on... ] Then you can attach it in the $scope.categoriesData and $scope.universitiesData and use ng-repeat on it to sort and filter, etc.

http://stackoverflow.com/comment/44585347
score: 0
comment on: http://stackoverflow.com/q/28105403
type: Comment
type: QuestionComment
has text: The logic here hurts my head. What exactly are you trying to do, because I'm sure there's a nicer way of doing it.

http://stackoverflow.com/q/28073096
has title: How do I update dropdown boxes based on previous dropdown box's values
type: Question
tagged with: javascript
answer count: 1
tagged with: drop-down-menu
tagged with: jquery
has answer: http://stackoverflow.com/a/28081217
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has body: I'm currently a beginner in javascript and i'm having a hard time passing the value of a dropdown box. I only know how to get the value into php if I wrap the select stuff into a post form and create a button to get the values when it's clicked but since this is javascript there isn't a submit button and I need to update the second dropdown list based on the value of the first dropdown list and update the third dropdown list based on the first and second values. My table looks like this: Currently, what my code does is it only stores the values inside the dropdown boxes. What I wanted it to do is if "guy" chooses January and chooses week 1, year should only contain 2015 and when he chooses week 2, year should only contain 2013. <?php mysql_connect("localhost","root","") or die(mysql_error()); mysql_select_db("my_db") or die (mysql_error()); $queryMonth = mysql_query("SELECT DISTINCT month FROM list WHERE username='guy'"); $queryWeek = mysql_query("SELECT DISTINCT week FROM list WHERE username='guy', month='Should be the value of the first select'"); $queryYear = mysql_query("SELECT DISTINCT year FROM list WHERE username='guy', month='Should be the value of the first select', week='Should be the value of the second select'"); ?> Select your option <?php while($getMonth = mysql_fetch_assoc($queryMonth)) { echo ' '.$getMonth['month'].' '; } ?> Select your option <?php while($getWeek = mysql_fetch_assoc($queryWeek)) { echo ' '.$getWeek['week'].' '; } ?> Select your option <?php while($getYear = mysql_fetch_assoc($queryYear)) { echo ' '.$getYear['year'].' '; } ?>
score: 0

http://stackoverflow.com/comment/44466804
comment on: http://stackoverflow.com/q/27987006
score: 0
has text: feel free to answer your own question
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28097497
has comment: http://stackoverflow.com/comment/44607368
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/28096584
score: 2
has comment: http://stackoverflow.com/comment/44570832
upvote count: 2
has body: since I think that innerHTML is a property, not a function Javascript supports setters. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set Before this became part of the language standard native objects (such as DOM Nodes) already used setter functionality internally.
answers question: http://stackoverflow.com/q/28096584

http://stackoverflow.com/comment/44519961
comment on: http://stackoverflow.com/a/28070039
type: Comment
has text: By the way, the IV is supposed to be random for every ciphertext. Just so you know. Generally it is prefixed to the ciphertext and sliced off before decryption .
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44330707
comment on: http://stackoverflow.com/a/27968908
type: Comment
has text: You are building a whole new array just to solve this problem. Creating unnecessary loops (which won't work in browsers not supporting `Array.prototype.foreach`). Seams awfully elaborate and a bit of overkill for this situation. A tip: move the for loop into the function so the function returns the sum instead of having to add a for lus every time you want to have the sum.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44607420
has text: Please ask a real, demonstrative, question with real, representative, code.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28116580
score: 1

http://stackoverflow.com/a/28027877
upvote count: 1
has comment: http://stackoverflow.com/comment/44462526
has body: There are a couple of options, Milind Anantwar has one, the other is to use the originally clicked element, which is passed to the event as a target property on the event argument. You can also simplify your code a lot. Please note that your bookmark anchors will cause the page to spring to the top, so also add e.preventDefault(); to any solution you choose: $('.shop-currencies').click(function(e) { e.preventDefault(); $('a', this).removeClass('current'); // remove related anchor current class $(e.target).addClass('current'); }); JSFiddle: http://jsfiddle.net/TrueBlueAussie/5Lsuazvt/ The one downside to this is that clicking inside .shop-currencies, but not on a currency link, will clear the current selection. Because of this you are better off targetting the links instead: $('.shop-currencies a').click(function(e) { e.preventDefault(); $(this).siblings().removeClass('current'); // remove related anchor current class $(this).addClass('current'); }); JSFiddle: http://jsfiddle.net/TrueBlueAussie/5Lsuazvt/1/ Which can be reduced to one line: $('.shop-currencies a').click(function(e) { e.preventDefault(); $(this).addClass('current').siblings().removeClass('current'); }); JSFiddle: http://jsfiddle.net/TrueBlueAussie/5Lsuazvt/2/ Saving the best for last And one last point... It is more efficient (but hardly noticeable) to add a single delegated event handler, instead of attaching 4 seperate handlers: $('.shop-currencies').on('click', 'a', function(e) { e.preventDefault(); $(this).addClass('current').siblings().removeClass('current'); }); JSFiddle: http://jsfiddle.net/TrueBlueAussie/5Lsuazvt/3/ Final thoughts: The IDs on the links are unnecessary if you have an appropriate this available. You can remove them from the HTML. You have the currency value you require in data-currency attributes, so you could use it like this: $('.shop-currencies').on('click', 'a', function(e) { e.preventDefault(); $(this).addClass('current').siblings().removeClass('current'); alert($(this).data…
answers question: http://stackoverflow.com/q/28027362
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28027362
type: Answer
score: 1

http://stackoverflow.com/q/28116533
has comment: http://stackoverflow.com/comment/44607406
has comment: http://stackoverflow.com/comment/44607222
accepted answer: http://stackoverflow.com/a/28116596
has comment: http://stackoverflow.com/comment/44607372
has answer: http://stackoverflow.com/a/57895961
tagged with: node.js
possible better answer: http://stackoverflow.com/a/30388217
has answer: http://stackoverflow.com/a/28116701
linked to: http://stackoverflow.com/q/1026069
has answer: http://stackoverflow.com/a/30388217
has comment: http://stackoverflow.com/comment/44607299
has comment: http://stackoverflow.com/comment/44607478
has comment: http://stackoverflow.com/comment/44607659
has comment: http://stackoverflow.com/comment/44607439
upvote count: 7
type: AnsweredQuestion
score: 7
tagged with: database
tagged with: javascript
has answer: http://stackoverflow.com/a/57661037
answer count: 6
has answer: http://stackoverflow.com/a/28116596
has comment: http://stackoverflow.com/comment/44607409
has answer: http://stackoverflow.com/a/61925971
has title: How can i capitalize strings in mongoose?
type: Question
tagged with: mongodb
has body: I have my schema: Schema = { name: String, email: String, animal: String }; And i know that mongoose have some methods to help me uppercase, lowercase, even trim my String, but what about capitalize? I want be me able to uppercase only the firsts letters of the name and the email. How can i do that?? I am using a form to catch the data, them save in my database using a post route, and there are some users that type all lowecase, and i was trying deal with this problem with css. input#name { text-transform: capitalize; } But this not work.
has comment: http://stackoverflow.com/comment/44607470
downvote count: 0
tagged with: mongoose
has comment: http://stackoverflow.com/comment/44607628
favorite count: 0

http://stackoverflow.com/comment/44392428
comment on: http://stackoverflow.com/a/28001653
type: Comment
has text: @A.Wolff - Give me a second, still testing something ?
score: 0
type: AnswerComment

http://stackoverflow.com/a/27970724
has comment: http://stackoverflow.com/comment/44335542
has body: I don't have strong idea but just an idea. What about to use something like this? var cfg = {prop1: '@myProp1'}; angular.module("myMod",[]). directive("myDir", { restrict: "E", scope: { config: cfg.prop1, prop2: "@myProp2", }, controller: function($scope){ $scope.config; $scope.prop2; }, });
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27970543

http://stackoverflow.com/q/28063494
type: Question
has title: extract password protected zip file using javascript (client side)
score: 5
answer count: 1
has body: There are many excellent libraries to open zip files on the client as: zip.js, jszip etc ... But I could not find any library that can open an encrypted zip file. is there a solution to open a zip file on the client side (in the browser)?
tagged with: javascript
tagged with: jszip
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/69763914
upvote count: 6
tagged with: zip.js
has answer: http://stackoverflow.com/a/66651178
tagged with: encryption
downvote count: 1

http://stackoverflow.com/q/27995299
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has title: each loop on nested JSON children to build a course "chooser" using underscore.js?
has body: Im trying to build a basic site fed with JSON That works as such… So what I have setup is a table in mysql structured like so… Where name is the initial list of buttons, then after choosing name you will get each successive choice as needed until you pull up the specific course detail. hopefully I am strait forward so far. What I have tried so far (and it does work-ish). so I use getJSON with a little bit of PHP like so... function getList() { $.getJSON(serviceURL + 'getProducts.php', function(data) { products = data.items; }); then I do some $.each with some ifs and some appends... $.each(products, function(index, product) { if (product.program === '' &amp;&amp; product.platform === '') { $('#theList').append('&lt;div.....' + course etc.. + '); }; if (product.program !== '' &amp;&amp; product.platform === '') { something else and so on.... and it works(mostly) but it completely sucks. I have a version of the site right now, that I can click on the product and go through many of the options all the way to a course list and then course detail. I end up having to do addition getJSON with url hashes to get the next level of choices and because I have wait for the data to load I have to create crazy id's for the divs to append to when the data is finally fetched so it appends in the correct place. Like I said, it works, but I know it is the wrong way to do it. To be honest the mysql table is only 110 rows, i could have this all hardcoded a week or two faster than I am figuring this out. But I really need to learn this. is underscore.js my solution? so in my travels of the interwebs I discover underscore.js and I try this.. var Sample = _.groupBy(products, 'name'); console.log(Sample); And I get a beautiful JSON array. {"Fred":[ {"name":"Fred","Type":"Red","program":"basic","platform":"windows"}, {"name":"Fred","Type":"Red","program":"basic","platform":"osx"}, {"name":"Fred","Type":"Red","program":"basic","platform":"OS X"}, {"name":"Fred","Type":"Red","program":"basic",…
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27995577
type: Question
tagged with: underscore.js
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/27987434
has body: I think the issue is being constantly bound to the key press. I have restructured your code and it performs well if you unbind the key press. (function(){ $(document).keypress(Keypress); function Keypress(event){ ShowTextbox(); PrefillInput(); FocusOnEnd(); $(document).off('keypress',Keypress) } function ShowTextbox(){ $('input').addClass('visible'); } function PrefillInput(){ $('input').val(String.fromCharCode(event.which)); $('input').focus(); } function FocusOnEnd(){ $('input')[0].setSelectionRange(1, 1); }})() Here is a working fiddle http://jsfiddle.net/qfzaLmyw/1/
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27986678

http://stackoverflow.com/q/28112854
has comment: http://stackoverflow.com/comment/44599538
type: Question
has body: var test = function(x) { return x + 2; }; and I can use test(3) but when I use var test = (function(x) { return x + 2; })(); I cannot use test(3) why?
tagged with: javascript
has answer: http://stackoverflow.com/a/28113067
has title: what's the difference between those two?
answer count: 3
has comment: http://stackoverflow.com/comment/44599497
has comment: http://stackoverflow.com/comment/44599558
favorite count: 0
has answer: http://stackoverflow.com/a/28112888
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4806150
tagged with: node.js
duplicate of: http://stackoverflow.com/q/4806150
has answer: http://stackoverflow.com/a/28112905
upvote count: 3
score: 0
downvote count: 3

http://stackoverflow.com/comment/44504223
has text: Try to put your different polygon positions into multidimensional array. When you start new polygon, increment your first dimension in all array uses ( simdiX, simdiY, sonraX ... ). When you draw, add new loop for the first dimension.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28061473

http://stackoverflow.com/q/28046325
has comment: http://stackoverflow.com/comment/44475037
answer count: 1
has comment: http://stackoverflow.com/comment/44474958
has comment: http://stackoverflow.com/comment/44474987
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44475362
has comment: http://stackoverflow.com/comment/44475019
has title: Copy one array's value to second array's value continuously
has body: I have a requirement that one array is copied continuously to second array if first array's value is changing. Suppose there are two arrays array1 and array2, and if array1 value is changing then array2 must be changing as per array1. So keeping array1 and array2 same. Thanks
type: Question
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/44475545
score: 0
tagged with: onchange
has answer: http://stackoverflow.com/a/28046728

http://stackoverflow.com/a/28095769
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28095637
has body: Try to use mouseup instead of click, $("a").mouseup(function(e) { e.preventDefault(); alert(e.which); });

http://stackoverflow.com/comment/44479348
comment on: http://stackoverflow.com/a/28047868
type: Comment
score: 1
has text: but than he also has to define default values for every field $scope.myModel = { foo: '', bar: '' };
type: AnswerComment

http://stackoverflow.com/q/27967797
type: Question
has comment: http://stackoverflow.com/comment/44334884
tagged with: javascript
has comment: http://stackoverflow.com/comment/44448215
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44328648
score: 1
tagged with: dom-events
has comment: http://stackoverflow.com/comment/44335370
has title: JavaScript event handler function scope control
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27968033
has comment: http://stackoverflow.com/comment/44433084
has body: I've got three interconnected methods inside an object: dragStartHandler: function(e) { console.log(e.type, 'dragstart', e.pageX, e.pageY); document.addEventListener('mousemove', this.dragMoveHandler, false); document.addEventListener('mouseup', this.dragEndHandler.bind(this), false); }, dragMoveHandler: function(e) { console.log(e.type, 'dragmove', e.pageX, e.pageY); this.updateRotation(); }, dragEndHandler: function(e) { console.log(e.type, 'dragend', e.pageX, e.pageY); document.removeEventListener('mousemove', this.dragMoveHandler, false); }, They handle rotation based on mouse pointer position. I can't figure out what to do to have access to original this inside dragMoveHandler and be able to remove the element listener at the same time. I tried using .bind(this) but it returns anonymous function which I can't remove inside dragEndHandler. Is there a technique I'm not aware of?
linked to: http://stackoverflow.com/q/11565471
duplicate of: http://stackoverflow.com/q/11565471
upvote count: 1

http://stackoverflow.com/q/28081905
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44542300
has comment: http://stackoverflow.com/comment/54811436
linked to: http://stackoverflow.com/q/14812267
type: Question
has comment: http://stackoverflow.com/comment/44542575
has comment: http://stackoverflow.com/comment/44542457
has body: I am showing autocomplete list when a user type in text box. When usr type then i call AJAX call and get results from server, Then show then in autocomplete. Everything is working fine after entering 2 or 3 character in text box, Autocomplete list will be shown. But if i enter only single character then list is not showing. I traced my code and ajax call is sucessfully called, But failed to show autocomplete. Here is my code:- $('.search_').each(function () { var id=this.id; $('#'+this.id).unbind("propertychange change keyup paste input").on("propertychange change keyup paste input", function(e){ if(e.keyCode === 13){ $('#'+this.id+"_search").click(); } var inputId=$("#"+id+"_val").val(); var gridId=id.substring(0,SecondIndexOf("_",id)); var url='dtmReader.php'; var a='{"functioncd":"dataspin","userguid":"'+$('#uid').val()+'","sessguid":"'+$('#sessid').val()+'","transguid":"","tablename":"'+$('#tblName_'+gridId).val()+'", "qufield0":"'+inputId+'","quvalue0":"'+$('#'+this.id).val()+'"}'; request = $.ajax({ dataType: 'text', type: "POST", url: url, data:{str:a} }); request.done(function(response, textStatus, jqXHR) { var response12=JSON.parse(response.split("{{").join("{")); var autoCompleteArray=[]; for(var i=0;i<response12.length;i++){ autoCompleteArray.push(response12[i].datavalu); } console.log(autoCompleteArray); $("#"+id).autocomplete({ source: autoCompleteArray, select: function (event, ui) { $('#'+this.id+"").val(ui.item.value); $('#'+this.id+"_search").click(); $("#"+this.id+"_searchField").val(); }}); }); request.fail(function(jqXHR, textStatus, errorThrown) { // console.log(textStatus); }); }); }); All JS and CSS of page:-
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/44542483
tagged with: javascript
has comment: http://stackoverflow.com/comment/44542398
has title: auto-complete list showing after 3 character
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/44542539
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28081990

http://stackoverflow.com/q/28016647
has answer: http://stackoverflow.com/a/28016957
answer count: 2
upvote count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/28017253
accepted answer: http://stackoverflow.com/a/28017253
has body: background: i have a page in my web app with an iframe in it that displays a pdf file. I require a browser's print preview window to appear as soon as this page in my web app loads. The print preview window will contain the contents of the iframe and print it. Currently, i bind a function on the iframe's load event as follows: $('#iframe').load(function () { $("#iframe").get(0).contentWindow.print(); }); This works fine when i debug locally. However when i upload to server, the print preview screen will not automatically popup. In fact i have to first click on a button or element for it appear. Is there a way around this? Thanks in advance..
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: iframe
has title: Javascript: printing the contents of iframe on page load not working
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28016957

http://stackoverflow.com/comment/44522147
comment on: http://stackoverflow.com/q/28057199
score: 0
type: Comment
type: QuestionComment
has text: I don't have an android device nearby so I can't say, but I can test next week and report back

http://stackoverflow.com/comment/44544476
type: QuestionComment
has text: Your code is correct, there is your code on [jsFiddle](http://jsfiddle.net/6LLfhvrt/1/). You have a mistake in the direction of the scripts or images.
comment on: http://stackoverflow.com/q/28082878
score: 1
type: Comment

http://stackoverflow.com/q/28020400
tagged with: http-put
tagged with: angularjs
has answer: http://stackoverflow.com/a/28020482
accepted answer: http://stackoverflow.com/a/28020482
type: AnsweredQuestion
has title: Callback for resource update
type: Question
answer count: 1
tagged with: javascript
has body: This is my code below. It works properly when I use it in save method but in update, it gives me an error TypeError: Cannot read property 'then' of undefined Services .factory('Details', function($resource, HostUrl){ return $resource(HostUrl + '/api/v1/details/:id' , { id: '@id' } ,{ update: { method: 'PUT' } }); }) Controller function updateStatus(details_id,status_id){ var details = Details.get({id: details_id}); details.status_id = status_id; details.$update({id: details_id}) .$promise.then(function(data){ // Success }, function(error){ // Error }); } How to do this properly? Thanks.
score: 0

http://stackoverflow.com/comment/44473822
has text: @Mr.Polywhirl something like this: http://jsfiddle.net/654geqvp/2/ ? bust still doesn't work.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28044600

http://stackoverflow.com/comment/44577985
score: 0
has text: i know that a good alternative is use date: with a date object type in my model, them use moment.js to format the date in my views.. but, i have this search input, and i need search for dates with this DD/MM/YYYY format, not the default format..
comment on: http://stackoverflow.com/q/28100958
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44371610
comment on: http://stackoverflow.com/q/27990302
score: 0
type: Comment
type: QuestionComment
has text: Or this one: [What purpose of asterisk (*) in ES6 generator functions](http://stackoverflow.com/questions/27778105/what-purpose-of-asterisk-in-es6-generator-functions)

http://stackoverflow.com/q/28008897
tagged with: javascript
has answer: http://stackoverflow.com/a/46846606
has answer: http://stackoverflow.com/a/28009119
answer count: 3
has title: Node.js Twitter API cursors
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/28009119
tagged with: node.js
type: AnsweredQuestion
tagged with: twitter
has answer: http://stackoverflow.com/a/29717642
type: Question
has body: I'm using npm-twit to get followers of a specific account. The Twitter API returns up to 5000 results from a single GET request. If the user I'm querying has over 5000 followers a "next_cursor" value is returned with the data. To get the next 5000 results, I need to re-run the GET function, passing it the "next_cursor" value as an argument. I just can't seem to work out how to do it. I was thinking a while loop, but I can't reset the global variable, I think because of scope: var cursor = -1 while ( cursor != 0 ) { T.get('followers/ids', { screen_name: 'twitter' }, function (err, data, response) { // Do stuff here to write data to a file cursor = data["next_cursor"]; }) } Obviously I'm not a JS genius, so any help would be much appreciated.
score: 5
upvote count: 5
possible better answer: http://stackoverflow.com/a/46846606

http://stackoverflow.com/q/28055432
has comment: http://stackoverflow.com/comment/44495024
tagged with: parse-platform
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/28079184
has comment: http://stackoverflow.com/comment/44537067
has answer: http://stackoverflow.com/a/28056622
type: Question
has comment: http://stackoverflow.com/comment/44493887
linked to: http://stackoverflow.com/q/28058127
answer count: 1
tagged with: ios
tagged with: javascript
has comment: http://stackoverflow.com/comment/44498025
tagged with: subquery
score: 0
has comment: http://stackoverflow.com/comment/44496497
has title: Sending push notification to specific device knowing phone number, parse.com
accepted answer: http://stackoverflow.com/a/28056622
has body: I would just to get things clear here or get other suggestions if possible if it is better. This is how my application works now: 1) Anonymous user is created if its the first time the user open the application 2) Phone verification is needed to be done. If verified, i save the phone number in a custom field in user object ( do i need to make this user a real user after this or can i still go with anonymous user?)( verification is one time only of course) 3) The user will be able to pick a friend from his contact list(ABPeoplePicker) and then send a push notification to that friend's device. Now i have set up a relationship with the User and the installation object with this code: PFInstallation *installation = [PFInstallation currentInstallation]; installation[@"user"] = [PFUser currentUser]; [installation saveInBackground]; And this created a pointer to the users ObjectId So my question is how would i create a query and send a push notification to a number retrieved from that Users friend list?. I am having a hard time to connect how i can get from a phone number to the installation device that i need to send the notification to. If you could provide help in javascript since i read it is safer to send it through cloud code! Also a subquestion mentioned above if i need to make the anonymous user to a real user. many thanks!!

http://stackoverflow.com/q/27992615
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44376785
has comment: http://stackoverflow.com/comment/44376977
has comment: http://stackoverflow.com/comment/44376921
has title: jsTree not rendering list properly?
answer count: 1
tagged with: asp.net
has body: I'm trying to use jsTree and going through the first example on their site just results in a normal list, not tree stylized. I have this div Root node 1 Child node 1 Child node 2 Root node 2 and this javascript at the bottom. The list displays normally, just regular HTML, not as a tree like it should. There are no errors in the console. The jsTree js file is included after jquery1.9.1 in the Site.Master file, which is linked to this page through the MasterPageFile. I'm using ASP.NET for the site, I didn't think it would matter but maybe it does? I thought it would be straightforward. I'm assuming I'm missing something simple, any ideas?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/42588478
tagged with: jstree
tagged with: asp.net-mvc
score: 0
linked to: http://stackoverflow.com/q/27968798

http://stackoverflow.com/comment/44466347
score: 0
comment on: http://stackoverflow.com/a/28041449
type: Comment
has text: @user15662 : this may help you. :)
type: AnswerComment

http://stackoverflow.com/q/28027455
score: -4
has comment: http://stackoverflow.com/comment/44440366
has comment: http://stackoverflow.com/comment/44440081
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28027477
type: Question
answer count: 2
tagged with: javascript
downvote count: 5
has body: Why I can not get this value in javascript ? When I mouseover TEST , it's will alert 110 Why not alert 111-1 function xxx(value) { alert(value); } TEST
has answer: http://stackoverflow.com/a/28027561
accepted answer: http://stackoverflow.com/a/28027561
has title: Why i can not get this value in javascript?
has answer: http://stackoverflow.com/a/28027477
upvote count: 1
favorite count: 0

http://stackoverflow.com/comment/44562983
score: 1
type: AnswerComment
type: Comment
has text: that's because the sort function should be `b.frequency - a.frequency`
comment on: http://stackoverflow.com/a/28077352

http://stackoverflow.com/comment/44484257
comment on: http://stackoverflow.com/a/28017198
score: 0
type: Comment
has text: I see two markers and two maps in the code snippet and the fiddle. What are you looking at?
type: AnswerComment

http://stackoverflow.com/q/28084197
type: Question
has body: I have applied a datepicker in my script but I am facing an issue in it. Whatever version of jquery I apply it said "Undefined is not a function" and datepicker not runs. My site is LIVE please help me in that case, What I am missing. http://mountainsportshaus.com/skirental/step-1.php Error Screen Shot: http://awesomescreenshot.com/0a848v1oe9 My jquery code: Thanks
downvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/44546256
tagged with: javascript
tagged with: jquery
favorite count: 0
upvote count: 0
has answer: http://stackoverflow.com/a/28084577
type: UnansweredQuestion
score: -2
has title: Jquery issue Undefined is not a function in jquery
has comment: http://stackoverflow.com/comment/44546227

http://stackoverflow.com/a/29028112
answers question: http://stackoverflow.com/q/28043242
type: Answer
has body: I don't know if you have solved your issue now, but I had the same requirements : offline app, generating pdf from HTML, and in my case, styling the generated pdf with CSS. After trying many solutions, the main problem was to style with CSS. Finally I used WkhtmlToPdf (http://wkhtmltopdf.org/). Basically I embed the binaries (for mac os and for windows) in the app, and regarding the platform, I execute them with the Ti.Process method. WkhtmlToPdf generates a pdf in the specified path, so in this way, you will be able to open this pdf. (In order to set the path for the pdf, i use openSaveAsDialog (http://tidesdk.multipart.net/docs/user-dev/generated/#!/api/Ti.UI.UserWindow-method-openFileChooserDialog) which allows the user to set the path and the name of the generated pdf).
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/28043242
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/28040017
tagged with: ipad
tagged with: extjs
has body: In ExtJS grid date field in iPad misbehaves as when we click on it the ipad keypad comes up hiding the calendar. If we hide the keypad calendar also goes. So unable to pick the date. Is there a remedy for this.? I thought of popup the calendar upward so that the keypad does not hide it. Is there a way to do that. Thanks, Anish Karunakaran.
tagged with: sencha-architect
tagged with: datepicker
has comment: http://stackoverflow.com/comment/44463956
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44463858
type: Question
has comment: http://stackoverflow.com/comment/44464139
tagged with: javascript
score: 0
has title: Extjs date field popup calendar upward in iPad

http://stackoverflow.com/q/28070942
favorite count: 0
has title: jQuery change active class from a to li
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28071040
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44521210
tagged with: javascript
has answer: http://stackoverflow.com/a/28071040
answer count: 1
downvote count: 0
has body: We use some jQuery to make our navigation sticky from some point on the page and to add an active class to sections on the page. Currently the active class is added to the a class inside the li. But I want to add this to the li instead of the a href. How can I achieve this? Code: &lt;script&gt; $j(window).scroll(function(){ var sticky = $j('.menu-header-product'), scroll = $j(window).scrollTop(); var elementOffset=jQuery("#productnav").offset(); if (scroll &gt;= elementOffset.top - 57) sticky.addClass('sticky'); else sticky.removeClass('sticky'); }); $j(window).scroll(function(){ var sticky = $j('.content'), scroll = $j(window).scrollTop(); var elementOffset=jQuery("#productnav").offset(); if (scroll &gt;= elementOffset.top - 57) sticky.addClass('sticky'); else sticky.removeClass('sticky'); }); $j(document).ready(function () { $j(document).on("scroll", onScroll); $j('a[href^="#"]').on('click', function (e) { e.preventDefault(); $j(document).off("scroll"); $j('li').each(function () { $j(this).parent().removeClass('active'); }) $j(this).parent().addClass('active'); var target = this.hash; $jtarget = $j(target); $j('html, body').stop().animate({ 'scrollTop': $jtarget.offset().top - 120 /**just subtract the height of the fixed html part */ }, 500, 'swing', function () { window.location.hash = target; $j(document).on("scroll", onScroll); }); }); }); function onScroll(event){ var scrollPosition = $j(document).scrollTop(); $j('nav li').each(function () { var currentLink = $j(this); var refElement = $j(currentLink.attr("href")); if (refElement.position().top - 125 &lt;= scrollPosition &amp;&amp; refElement.position().top - 125 + refElement.height() &gt; scrollPosition) { $j('nav ul li a').parent().removeClass("active"); currentLink.parent().addClass("active"); } else{ currentLink.parent().removeClass("active"); } }); } &lt;/script&gt;
tagged with: jquery

http://stackoverflow.com/q/27966479
tagged with: javascript
has answer: http://stackoverflow.com/a/27968118
has comment: http://stackoverflow.com/comment/44325783
accepted answer: http://stackoverflow.com/a/27966843
has comment: http://stackoverflow.com/comment/44325741
favorite count: 0
possible better answer: http://stackoverflow.com/a/27968118
tagged with: time
linked to: http://stackoverflow.com/q/1056728
upvote count: 1
type: AnsweredQuestion
has body: I am getting a date and a time from 2 input boxes with datebox plugin. I have the date as "16-01-2015" and time as "11:37 AM". I need to send both to my server to add to the database but my database need the date in format: "2015-01-16 21:11:00" How can I convert my both strings in a date or a string with the other format? I also need to convert 12 hour time to 24h time.
score: 1
has answer: http://stackoverflow.com/a/27966843
tagged with: date
has comment: http://stackoverflow.com/comment/44325797
type: Question
answer count: 2
has title: Convert date to other format in javascript
downvote count: 0

http://stackoverflow.com/comment/44371916
comment on: http://stackoverflow.com/a/27990084
type: AnswerComment
score: 0
type: Comment
has text: I mean, yes this works, but almost any CSS styling desire could be accomplished by just making an image/svg of how you want elements to work. The less images you can use by creating it with HTML/CSS the more control you have to tweak/be dynamic.

http://stackoverflow.com/comment/44442473
has text: Hi Nick, thanks for your reply. Forgive my ignorance but i haven't heard of that, could you please explain how to use this? Many Thanks,
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28028649
score: 0

http://stackoverflow.com/a/27993677
downvote count: 0
has body: In regards to working with HTML in JS var div = document.createElement('div'); div.setAttribute('id', 'mydiv'); document.body.appendChild(div); This will create a div, give it an ID and append it to the body. This is a much more solid way to work with html in JS. You could also load (or preload) and image like: var img = new Image(); img.src = "path to my file"; document.body.appendChild(img); Hope this helps, feel free to ask me any questions you have.
upvote count: 2
answers question: http://stackoverflow.com/q/27993124
type: Answer
score: 2

angularjs-ng-repeat
tags question: http://stackoverflow.com/q/28031286
tags question: http://stackoverflow.com/q/28106060
tags question: http://stackoverflow.com/q/28094394
tags question: http://stackoverflow.com/q/28080422
tags question: http://stackoverflow.com/q/28079295
tags question: http://stackoverflow.com/q/28058702
tags question: http://stackoverflow.com/q/28110137
tags question: http://stackoverflow.com/q/27976191
tags question: http://stackoverflow.com/q/28047033
tags question: http://stackoverflow.com/q/28005920
tags question: http://stackoverflow.com/q/28062423
type: Tag
tags question: http://stackoverflow.com/q/28109001
tags question: http://stackoverflow.com/q/28112078
tags question: http://stackoverflow.com/q/28052849
tags question: http://stackoverflow.com/q/28036481
tags question: http://stackoverflow.com/q/28021905
tags question: http://stackoverflow.com/q/28120676
tags question: http://stackoverflow.com/q/28031706
tags question: http://stackoverflow.com/q/28076015
tags question: http://stackoverflow.com/q/28083545
tags question: http://stackoverflow.com/q/28095896
tags question: http://stackoverflow.com/q/28069219
tags question: http://stackoverflow.com/q/27997306
tag name: angularjs-ng-repeat
tags question: http://stackoverflow.com/q/28009261
tags question: http://stackoverflow.com/q/27992723
tags question: http://stackoverflow.com/q/28021215
tags question: http://stackoverflow.com/q/28013227
tags question: http://stackoverflow.com/q/28084640
tags question: http://stackoverflow.com/q/28105627
tags question: http://stackoverflow.com/q/28043733
tags question: http://stackoverflow.com/q/28001490
tags question: http://stackoverflow.com/q/28016049
tags question: http://stackoverflow.com/q/28056900
tags question: http://stackoverflow.com/q/28080352
tags question: http://stackoverflow.com/q/28032201
tags question: http://stackoverflow.com/q/27996468

http://stackoverflow.com/comment/44482964
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28050403
score: 2
has text: I don't get what the issue is.

http://stackoverflow.com/q/28015264
tagged with: javascript
tagged with: jquery-validate
answer count: 1
has answer: http://stackoverflow.com/a/28015958
tagged with: jquery
has body: I am doing my form validation with jquery validation plugin. Everything seems fine but its not working. No message appears. Or may be its due to files that I have included. files included here is jquery here is html. Name: Email: Password: Retype-Password: Already a member?Login Submit
accepted answer: http://stackoverflow.com/a/28015958
type: AnsweredQuestion
has title: Validation plugin files are not working
score: 0
type: Question

http://stackoverflow.com/comment/44417579
comment on: http://stackoverflow.com/q/28015076
score: 0
has text: @DanielRuf I wasnt suggesting it as an answer but it does provide a little information about waiting for the dom to load before you can maipulate it.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28038983
has body: You should change in this code onmouseover="resizeImg(this, 300)" to onmouseover="resizeImg(this, 200)". in future you change this value to controle your zoom size. 300 means 3x zoom of your original size image so you mange your zoom size from this.
answers question: http://stackoverflow.com/q/28038046
type: Answer
downvote count: 1
upvote count: 0
score: -1

http://stackoverflow.com/q/28007495
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28007979
has title: How to throw an error message to the client when check() throws an Match.Error?
score: 0
tagged with: exception
tagged with: meteor
has answer: http://stackoverflow.com/a/28007979
type: AnsweredQuestion
tagged with: error-handling
has body: I am publishing some documents from the Products collection, and using check() to ensure the options passed to it are valid. If the client passes in invalid options, I want to have a customized error message displayed on the console. I am using the audit-argument-checks package to ensure I have checks for all methods and publish functions. On the client, I passed in an invalid option (reverse should be a boolean), but no errors are observed on the client console nor the server log. // Server Meteor.publish('products', function (opts) { try { check(opts, { sort: Match.Optional(String), reverse: Match.Optional(Boolean), start: Match.Optional(Number), limit: Match.Optional(Number), userId: Match.Optional(String) }); } catch (err) { this.error(new Meteor.Error('invalid-opts', "Please check your options are valid")); // Throws back an error saying invalid options } // Some more code }); // Client Template.home.helpers({ productListings: function () { Meteor.subscribe('products', {sort: 'created', reverse: 'asdasd'}); return Products.find({}); } }); I have tried using Match.test() in place of check(), but this does not satisfy the audit-argument-checks package, and I'd want to use it to ensure I don't miss any checks. How can I throw an error message to the client when check() throws an Match.Error?

http://stackoverflow.com/comment/108747578
comment on: http://stackoverflow.com/a/28084346
score: 4
type: AnswerComment
type: Comment
has text: The definitive way to determine this is to check for `navigator.maxTouchPoints > 1` Because Chrome emulated devices will always have only 1 touchpoint (ie. your mouse cursor), while actual (modern) mobile devices will always have more than 1, and devices without touch support will always have 0. You're welcome.

http://stackoverflow.com/comment/44586767
has text: If your target is <iOS8, then the best you can do is what LucaD has described. You can't directly call Obj-C methods from JS, you can just work-around by intercepting location changes via the ` webView:shouldStartLoadWithRequest:navigationType:` delegate method.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28105900

http://stackoverflow.com/a/28167995
type: AcceptedAnswer
downvote count: 0
has body: The problem was that I was using the Ripple Emulator in the browser. It has some crappy settings that restrict domain access. You can change it but I thought screw it and decided to use the Android Emulator to debug instead and it worked fine.
accepted answer of: http://stackoverflow.com/q/28021519
type: Answer
answers question: http://stackoverflow.com/q/28021519
upvote count: 1
score: 1

http://stackoverflow.com/comment/44634485
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28119594
has text: Some guys did understand it right away apparently ;) Cheers.
score: 0

http://stackoverflow.com/a/28036328
has comment: http://stackoverflow.com/comment/44457387
type: Answer
has body: In contrast to Robby Cornelissen's answer - there is no problems with readability if you format it properly (and not writing PHP, since it messed up the operator by making it left-associative in contrast to all other languages that have that construct): var y = x == 0 ? "zero" : x == 1 ? "one" : "other"; EDIT What I was looking for is a shorter version of "if expression 1 is true, return expression 1. Else if expression 2 is true, return expression 2. Else return expression 3". Is there no clean way to do this? There is: expression1 || expression2 || expression3. (It would have been nice if you had put this into your question in the first place.) This is commonly used for default values: var defaults = null; function hello(name) { var displayName = name || (defaults &amp;&amp; defaults.name) || "Anonymous"; console.log("Hello, " + displayName + "."); } hello("George"); // =&gt; Hello, George. hello(); // =&gt; Hello, Anonymous. defaults = {}; hello(); // =&gt; Hello, Anonymous. defaults.name = "You" hello(); // =&gt; Hello, You. However, it is important to be aware of the conditions for truthiness. For example, if you expect "" or 0 to be a valid value that does not need to be replaced by a default, the code will fail; this trick only works when the set of possible non-default values is exactly the set of truthy values, no more and no less. E.g. function increment(val, by) { return val + (by || 1); // BUG } increment(10, 4); // =&gt; 14 increment(10, 1); // =&gt; 11 increment(10); // =&gt; 11 increment(10, 0); // =&gt; 11 &lt;-- should be 10 In this case you need to be explicit: function increment(val, by) { return val + (typeof(by) === "undefined" ? 1 : by); }
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/28036275
answers question: http://stackoverflow.com/q/28036275
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/44604125
comment on: http://stackoverflow.com/q/28114925
has text: @RhapX: done ! I updated the post as requested!
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/48283386
type: QuestionComment
has text: do you have at the top of your html?
score: 0
comment on: http://stackoverflow.com/q/28006300
type: Comment

http://stackoverflow.com/q/28034785
answer count: 0
type: UnansweredQuestion
tagged with: android
has title: iframe embedded youtube video shows black on mobile browsers
upvote count: 1
tagged with: youtube
score: 1
tagged with: iframe
type: Question
has body: I'm trying to use the youtube iframe api to add a video onto my page based on the video ID I have stored in the database. I'm using this method because I want to know when the video ends so that I can show a button to submit a form. My problem is that on my iPhone 5 and an Android tablet the video comes up black. It has the title at the top that will show when you tap the black box but no video plays. It works find in Firefox and Chrome on OSX. The code I'm using is as follows: &lt;div id="video-content" class="span6"&gt;&lt;!--Youtube video inserted here by javascript --&gt;&lt;/div&gt; &lt;script&gt; //Start youtube javascript code var tag = document.createElement('script'); tag.src = "//www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var player; function onYouTubeIframeAPIReady() { player = new YT.Player('video-content', { videoId: '&lt;?php echo $video_ids['video_id']; ?&gt;', events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); } function onPlayerReady(event) { event.target.playVideo(); } function onPlayerStateChange(event) { if (event.data == 0) { $('#test-submit').show(); console.log('Done'); } }
tagged with: ios
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/44460032
score: 0
comment on: http://stackoverflow.com/q/28037504
type: Comment
type: QuestionComment
has text: This might be handy http://www.lettercount.com/ :)

http://stackoverflow.com/comment/44447194
comment on: http://stackoverflow.com/q/28022317
type: QuestionComment
has text: maybe i'm not understanding how it should work, but without pressing any buttons and just adding text then removing it only the second text box shows the "This field is required. " message, the first text box doesn't seem to show it, it shows it only after one of the buttons has been clicked.
type: Comment
score: 0

http://stackoverflow.com/q/28033776
has answer: http://stackoverflow.com/a/28033912
type: AnsweredQuestion
tagged with: contextmenu
has body: Is there a way to use javascript to programmatically get the context menu items that are available when a right click event is generated within a browser. For example in Chrome be able to have an array filled with the following: Back,Forward,Reload,Save as, Print, Translate to English, View page source, View page info and so on. Is it possible to get such values without the need for generating a right click event so the context menu doesn't appear on the user's browser? Thanks
type: Question
tagged with: javascript
has title: Get Browser Context Menu Items using Javascript
score: 0
accepted answer: http://stackoverflow.com/a/28033912
answer count: 1

http://stackoverflow.com/a/28022216
has comment: http://stackoverflow.com/comment/44430475
type: Answer
has body: From my testing, your getSelectionParentElement() function is returning the "strong" element when the selection is confined to the strong element. See this fiddle demo: http://jsfiddle.net/akfg87n6/ If you select only letters from TEST, then it returns the strong element, while if you select letters from the div (I added "before" and "after" text to make that possible) then it returns the div element. This is as expected according to the commonAncestorContainer() documentation at https://developer.mozilla.org/en/docs/Web/API/Range: Range.commonAncestorContainer [Read only] Returns the deepest Node that contains the startContainer and endContainer nodes. When the entirety of your text selection resides within the strong element, then the strong element is the deepest Node that contains the start and end container nodes (which, incidentally, are both the strong element in that case). But if the selection extends outside of the strong element into the div content, then the strong element no longer contains the entirety of the selection, and so commonAncestorContainer() must return a shallower element, which will be the div if the text selection is still confined within the div content.
answers question: http://stackoverflow.com/q/28021963
has comment: http://stackoverflow.com/comment/44431137
has comment: http://stackoverflow.com/comment/44431037
has comment: http://stackoverflow.com/comment/44430528
score: 0

http://stackoverflow.com/comment/44502137
type: Comment
type: QuestionComment
has text: @DelightedD0D Okay, I created a fiddle too, http://jsfiddle.net/9wm0oeah/2/
comment on: http://stackoverflow.com/q/28057956
score: 0

mongoose
tags question: http://stackoverflow.com/q/28120864
tags question: http://stackoverflow.com/q/28042257
tags question: http://stackoverflow.com/q/27993410
tags question: http://stackoverflow.com/q/28101467
tags question: http://stackoverflow.com/q/28011016
tags question: http://stackoverflow.com/q/27998002
tags question: http://stackoverflow.com/q/27966977
type: Tag
tags question: http://stackoverflow.com/q/28080546
tags question: http://stackoverflow.com/q/28116533
tag name: mongoose
tags question: http://stackoverflow.com/q/28032086
tags question: http://stackoverflow.com/q/27989654
tags question: http://stackoverflow.com/q/28051444
tags question: http://stackoverflow.com/q/27980896
tags question: http://stackoverflow.com/q/28091155
tags question: http://stackoverflow.com/q/28044453
tags question: http://stackoverflow.com/q/28100958
tags question: http://stackoverflow.com/q/28087624
tags question: http://stackoverflow.com/q/28101756
tags question: http://stackoverflow.com/q/28033262

http://stackoverflow.com/q/28001938
downvote count: 0
has title: MediaWiki: How do I use an AJAX POST in JS to send data to a custom API extension (PHP)?
type: Question
has comment: http://stackoverflow.com/comment/51286700
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: mediawiki-extensions
upvote count: 3
has body: I've been stumped on this for a while. I've successfully created a MediaWiki API extension from which I'm able to extract data using an API url, but now I want to go the other way. I want to use JS to send a simple bit of data to the server for storage in a session variable (in PHP). I've experimented with something like the following: $.ajax({ // start POST request type: "POST", // url to which the request is sent url: "/", // data to the server data: { myvariable: 0 }, // Type of data dataType: 'json', // Funciton to be called if the request succeeds success: function( data ){ console.log("POST successful with " + data); } }) What I don't fundamentally get is how to "pick up" the POSTed data in PHP. In my research, I came upon something saying I should look for $_POST['myvariable'] in PHP. Yet I'm not sure how or where I'd create something that would listen for such a POST from JS. It seems to me the easiest solution to this would be if I could write a method onto my API extension that simply assigns the value of the myvariable that's POSTed to the session variable whenever that thing is POSTed. I've written this method already, in fact, but it's unclear to me how I'd instruct AJAX to invoke it in PHP. I've also read that this type of thing may not be advisable for security reasons. I've seen advice elsewhere suggesting I should do something in JS like: var api = new mw.Api(); ...and then use the Api object's methods to execute Ajax GET and POST requests. Well, I tried creating an instance of this object, and it throws errors on the console that say it's not a recognized function or something of that nature. I'm rather new at all this, but I'm at my wit's end trying to figure out something that in theory ought to be very simple. Any suggestions?
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47244832
tagged with: php
score: 3

http://stackoverflow.com/q/28075294
tagged with: javascript
has title: avoid errors if one of variable undefined all script stop working
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/44530154
tagged with: undefined
has comment: http://stackoverflow.com/comment/44530296
has answer: http://stackoverflow.com/a/28075369
accepted answer: http://stackoverflow.com/a/28075369
has body: my problem Confined to missing a value of a variables users can put values of this vars var name = "name"; var age = "age"; var sex = "sex"; var weight = "weight"; if one variable is not defined ,it make all script stop what's the best ways to avoid this error have atrying with switch (variable){ default: //codes breake; } or switch (variable){ case undefined: //codes breake; } or if(typeof variable==='undefined'){ //do that } need to more Tips and Advice in this cases Especially if we have big code blocks ..please share your experience for intermediate learner note : simply my code for users contains vars with external script.js embeded
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28075458
has answer: http://stackoverflow.com/a/28075458
tagged with: switch-statement
type: Question
tagged with: case
tagged with: if-statement

http://stackoverflow.com/q/28110103
type: UnansweredQuestion
tagged with: titanium
type: Question
tagged with: database
answer count: 1
has answer: http://stackoverflow.com/a/28127514
tagged with: javascript
has body: I am creating a math quiz using Titanium and Parse.com as my database. So the students will first input their details including student ID which will be stored in the database. Then, they will attempt the questions and their answers will be stored in the database. I am having trouble posting values to a specific row in table. Currently, when an answer is submitted to the database, a new row will be created. But what I want to do is whenever there is an answer sent to the database, it will be posted to the row which corresponds to the student's ID. [To retrieve the student's ID, I use --> var studentNric = Ti.App.Properties.getString('studentNric');] This is the code that I am using to do the post to the database. nextbtn.addEventListener('click', function() { var parseURL = "https://api.parse.com/1/classes/student_submitted_answer"; var ans = ansTextfield.value; var postJson = { question1ans : ans + '' }; var xhr = Ti.Network.createHTTPClient({ onload: function(e) { Ti.API.info(this.responseText);//check what the parse.com send back var responseObject = JSON.parse(this.responseText); }, onerror: function(e) { Ti.API.info(this.responseText); //alert('Error Getting Key Values'); }, timeout:10000 /* in milliseconds */ });//end of HttpClient object creation, xhr. xhr.open("POST", parseURL); xhr.setRequestHeader('X-Parse-Application-Id', 'PyuzSSnK8IvmdvIjlUxlJSLt4HooekKBiGAw1PPr'); xhr.setRequestHeader('X-Parse-REST-API-Key', 'BM2o9tWcxjcHV0TPVayKF78eTF4HV1y3pvX5RQdF'); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send(JSON.stringify(postJson)); }) Someone help me please? Thanks in advance for your help.
score: 0
has title: How to update specific row in table from Parse.com in Titanium?
tagged with: parse-platform

http://stackoverflow.com/q/28100979
has comment: http://stackoverflow.com/comment/44577637
has comment: http://stackoverflow.com/comment/44577749
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/59105611
type: Question
has comment: http://stackoverflow.com/comment/44577793
has answer: http://stackoverflow.com/a/28101246
has answer: http://stackoverflow.com/a/68872481
linked to: http://stackoverflow.com/q/1048336
downvote count: 0
tagged with: button
tagged with: javascript
answer count: 6
tagged with: dom-events
accepted answer: http://stackoverflow.com/a/28101246
has body: function showCheckbox(){ var node_list = document.getElementsByClassName('check'); for (var i = 0; i < node_list.length; i++) { if(node_list[i].style.display == 'none') { node_list[i].style.display = 'block'; } else { node_list[i].style.display = 'none'; } } } input[type=checkbox]{ display:none; position:relative; } Ψάρεμα Γήπεδο When the page loads for first time and I press the button on the first click it does not triggers the onclick function. If I press it the second time it triggers the event. Other buttons triggers the event on the first click without problem. Does anyone know what is the problem or did it have the same?
has answer: http://stackoverflow.com/a/28101499
has answer: http://stackoverflow.com/a/28101592
has answer: http://stackoverflow.com/a/28101408
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44577921
possible better answer: http://stackoverflow.com/a/28101499
favorite count: 0
score: 8
has comment: http://stackoverflow.com/comment/44577540
upvote count: 8
has title: Button does not function on the first click

http://stackoverflow.com/comment/44598550
has text: Have you tried adding this line? this.bc.placeAt(document.body) (or wherever else you wish it to be)
score: 0
comment on: http://stackoverflow.com/q/28108693
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27995700
has body: I can't place my window.scroll(0,0) anywhere, it break will my transition. because the item and content is align side by side, when I scroll either one side, and i come back, the scroll history isn't the same anymore $(function(){ $('.item').on('click', function(){ $(this).addClass('slideLeftItem'); $('.content').show(0,'', function(){ $('#back').show(); }).addClass('slideRightContent'); }); $('#back').on('click',function(){ $('.item').show().removeClass('slideLeftItem'); $(this).hide(); $('.content').removeClass('slideRightContent').once('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd', function() { $(this).hide(); }); }); }); .content{ display:none; position: absolute; right: -200px; top: 0px; background: blue; transition: 0.4s; } .item{ transition: 0.4s; } .slideRightContent{ right: 0px; } .slideLeftItem{ left: -200px; } #back{ display:none; height: 20px !Important; background: grey !Important; } .content, .item{ width:200px; height: 200px; background: red; } .phone{ position: relative; overflow: hidden; overflow-y:scroll; transition: 0.4s; width:200px; border: 10px solid #000; } < back item My content item 2 My content 2 item 3 My content 3 is long My content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is long My content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 is long My content 3 is longMy content 3 is longMy content 3 is longMy content 3 is longMy content 3 i…
has comment: http://stackoverflow.com/comment/44381994
tagged with: javascript
score: 0
tagged with: jquery
has title: forget scrolling history by not using window.scroll()
has comment: http://stackoverflow.com/comment/44382046
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44381945
has comment: http://stackoverflow.com/comment/44382083
answer count: 0
has comment: http://stackoverflow.com/comment/44381849
type: UnansweredQuestion
tagged with: scroll
has comment: http://stackoverflow.com/comment/44381959
has comment: http://stackoverflow.com/comment/44381924
type: Question

http://stackoverflow.com/q/28028615
has body: I want to plot multiseries line chart witht the below json data where month is a x-axis data, case count y-axis and groupName are lines . I am having problem in formating a data for the lines. I Want a multi series line graph something like this.http://projects.delimited.io/experiments/multi-series/multi-chart.html any help is appreciated. json data [ { "groupName":"Casio GzOne", "caseCount":8, "caseCreatedMonth":"10-2014" }, { "groupName":"GALAXY", "caseCount":80, "caseCreatedMonth":"10-2014" }, { "groupName":"HTC ", "caseCount":14, "caseCreatedMonth":"10-2014" }, { "groupName":"LG Mobile Phones", "caseCount":27, "caseCreatedMonth":"10-2014" }, { "groupName":"Motorola", "caseCount":29, "caseCreatedMonth":"10-2014" }, { "groupName":"Nokia Lumia", "caseCount":3, "caseCreatedMonth":"10-2014" }, { "groupName":"Sony Ericsson Xperia", "caseCount":4, "caseCreatedMonth":"10-2014" }, { "groupName":"Verizon Ellipsis", "caseCount":18, "caseCreatedMonth":"10-2014" }, { "groupName":"iPhone 5", "caseCount":29, "caseCreatedMonth":"10-2014" }, { "groupName":"iPhone 6", "caseCount":33, "caseCreatedMonth":"10-2014" }, { "groupName":"Casio GzOne", "caseCount":4, "caseCreatedMonth":"11-2014" }, { "groupName":"DEFAULT", "caseCount":32, "caseCreatedMonth":"11-2014" }, { "groupName":"GALAXY", "caseCount":83, "caseCreatedMonth":"11-2014" }, { "groupName":"HTC", "caseCount":14, "caseCreatedMonth":"11-2014" }, { "groupName":"HTC ", "caseCount":7, "caseCreatedMonth":"11-2014" }, { "groupName":"LG Mobile Phones", "caseCount":14, "caseCreatedMonth":"11-2014" }, { "groupName":"Motorola", "caseCount":29, "caseCreatedMonth":"11-2014" }, { "groupName":"Nokia Lumia", "caseCount":3, "caseCreatedMonth":"11-2014" }, { "groupName":"Sony Ericsson Xperia", "caseCount":3, "caseCreatedMonth":"11-2014" }, { "groupName":"Verizon Ellipsis", "caseCount":3, "caseCreatedMonth":"11-2014" }, { "groupName":"iPHONE", "caseCount":14, "caseCreatedMonth":"11-2014" }, { "groupName":"iPhone 5", "caseCount":13, "caseCreat…
tagged with: d3.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28033191
accepted answer: http://stackoverflow.com/a/28033191
has title: D3js: how to plot multiseries line chart with json data
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/28113198
has comment: http://stackoverflow.com/comment/44600875
tagged with: css
has comment: http://stackoverflow.com/comment/44600558
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/44600836
answer count: 1
has answer: http://stackoverflow.com/a/28113360
tagged with: javascript
has title: Tooltip not working on submit button
score: 0
has comment: http://stackoverflow.com/comment/44600560
tagged with: http://stackoverflow.com/tag/html
has body: I have this code in my HTML file: Enter Password: This is the tooltip Confirm Password: Passwords do not match And these are my functions: function ShowToolTip(){ document.getElementById("tooltipbox").style.visibility = 'visible'; } function HideToolTip(){ document.getElementById("tooltipbox").style.visibility = 'hidden'; } function SubmitToolTip(){ document.getElementById("subTT").style.visibility = 'visible'; } function SubmitToolTipHide(){ document.getElementById("subTT").style.visibility = 'hidden'; } When I hover over the textarea for the password the tooltip correctly displays and when I move the mouse outside the region the tooltip correctly disappears. I cannot understand why, with the same logic, it will not appear over the submit button when I hover over that. Even though I have used the same Javascript function.
accepted answer: http://stackoverflow.com/a/28113360

http://stackoverflow.com/q/27974109
has answer: http://stackoverflow.com/a/27974419
accepted answer: http://stackoverflow.com/a/27974419
has title: Index/position of dynamic jquery ui sortable blocks?
type: Question
tagged with: indexing
tagged with: jquery-ui-sortable
tagged with: jquery-ui
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/44341333
has body: Unfortunately, I am not able to get this working in jsfiddle but maybe I overlooked something (http://jsfiddle.net/bJpyU/46/). I have blocks dynamically created and need to save the order that they are placed. Because of the dynamic fashion that this is set up, I am not able to get the index (it's always 0, and the block starting first always shows as first index wise regardless of where it is dragged). toArray and serialize are showing up as blank. I've even tried counting nth-child. Any idea how to get the order? HTML Monthly License Revenue Graph Data Yearly License Revenue Graph Data JQUERY var sortdiv = "Graphs" var blockClasses = "col-lg-4"; $(".sortable_portlet_" + sortdiv[2] + "_column").sortable({ connectWith: ".sortable_portlet_" + sortdiv[2] + "_column", handle: ".portlet-title", //placeholder: "dragColumn", forceHelperSize: true, forcePlaceholderSize: true, start: function (e, ui) { ui.placeholder.height(ui.helper.outerHeight()); ui.placeholder.width(ui.helper.outerWidth()); // get original block size blockClasses = ui.item.parent().attr('class'); }, stop: function (e, ui) { var parent = ui.item.parent(); blockWidth = blockClasses.split(" "); parent.attr('class', function (i, c) { return c.replace(/(^|\s)col-lg-\S+/g, blockWidth[0]); }); //console.log(ui.position) SavePortletDrop(sortdiv[2]); } });
type: AnsweredQuestion

http://stackoverflow.com/comment/44426384
type: Comment
has text: I have updated the answer for the rapid clicking issue. Rest should work fine. Accept the answer if it solves your problem.
comment on: http://stackoverflow.com/a/28000249
type: AnswerComment
score: 0

http://stackoverflow.com/a/28033712
has comment: http://stackoverflow.com/comment/44452648
answers question: http://stackoverflow.com/q/28033498
downvote count: 0
has comment: http://stackoverflow.com/comment/44452504
has body: If you are looking for a utility to make image maps in HTML, there are many options. I used one in windows 98 about 15 years ago called GEOHTML. It's still available but hard to find. oh, and it's really old :-) There are web app options as well like http://www.image-maps.com/
type: Answer
has comment: http://stackoverflow.com/comment/44452825
upvote count: 1
score: 1

http://stackoverflow.com/q/28115582
score: 0
has comment: http://stackoverflow.com/comment/44605430
has comment: http://stackoverflow.com/comment/44605502
has body: I have confused for the how to get the data from objects in arrays and I had developed for the line graph but x-axis problem is raising, how to solve the problem, my object is given below. var data=[{"key":[2009,0],"value":200},{"key":[2009,1],"value":201},{"key":[2009,2],"value":204},{"key":[2009,3],"value":204},{"key":[2009,4],"value":206},{"key":[2009,5],"value":200},{"key":[2009,6],"value":100},{"key":[2009,7],"value":208},{"key":[2009,8],"value":600},{"key":[2009,9],"value":290},{"key":[2009,10],"value":270},{"key":[2009,11],"value":400}, {"key":[2010,0],"value":200},{"key":[2010,1],"value":201},{"key":[2010,2],"value":204},{"key":[2010,3],"value":204},{"key":[2010,4],"value":206},{"key":[2010,5],"value":200},{"key":[2010,6],"value":100},{"key":[2010,7],"value":208},{"key":[2010,8],"value":600},{"key":[2010,9],"value":290},{"key":[2010,10],"value":270},{"key":[2010,11],"value":400}, {"key":[2011,0],"value":200},{"key":[2011,1],"value":201},{"key":[2011,2],"value":204},{"key":[2011,3],"value":204},{"key":[2011,4],"value":206},{"key":[2011,5],"value":200},{"key":[2011,6],"value":100},{"key":[2011,7],"value":208},{"key":[2011,8],"value":600},{"key":[2011,9],"value":290},{"key":[2011,10],"value":270},{"key":[2011,11],"value":400}]; var parseDate = d3.time.format("%x").parse //console.log(data); //data.forEach(function (d){ //d.key=d.key[1]; //d.value=d.value; //}) var s1=data.map(function (d,i){return {key:d.key[0],value:d.value}}) console.log(s1); var margin = {top: 15, right: 20, bottom: 70, left: 85}, width = 440,height = 450; var x=d3.time.scale().domain(d3.extent(s1,function (d,i){return d.key[1]})) .range([0,width]) var y=d3.scale.linear().domain(d3.extent(s1,function (d,i){return d.value})) .range([height,0]) var xAxis = d3.svg.axis().scale(x).orient("bottom") var yAxis = d3.svg.axis().scale(y).orient("left") var line = d3.svg.line() .x(function(d) { return x(d.key); }) .y(function(d) { return y(d.value); }) .interpolate("cardinal") var div = d3.select("body…
has title: How to get the data from given array of objects in d3.js
has comment: http://stackoverflow.com/comment/44605412
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28119687
type: Question
linked to: http://stackoverflow.com/q/28125053
has comment: http://stackoverflow.com/comment/44605600
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/28038863
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44462117
has body: I'm loading a page using jQuery's .load() function. The page I'm loading links to an external javascript file. So i try to execute that by calling getScript(). This is the code for loading the page: &lt;script&gt; $j(document).ready(function() { $j( "#scriptin" ).load("home.html"); $j("#index").click(function(e) { e.preventDefault(); // if desired... $j( "#scriptin" ).load("home.html"); }); $j("#artists").click(function(e) { e.preventDefault(); // if desired... $j( "#scriptin" ).load( "artists.html" ); $.getScript("pix.js"); }); $j("#concert").click(function(e) { e.preventDefault(); // if desired... $j( "#scriptin" ).load( "storminateacup.html" ); $.getScript("stormload.js"); }); }); Now when the concert link is clicked, as you can see in the code I load storminateacup.html and after that i call the external script stormload.js This is stormload.js $( "#scriptintwo" ).load( "latest.html" ); }); $("#artists").click(function(e) { e.preventDefault(); // if desired... $( "#scriptintwo" ).load( "artists.html" ); }); $("#latest").click(function(e) { e.preventDefault(); // if desired... $( "#scriptintwo" ).load( "latest.html" ); }); $("#videos").click(function(e) { e.preventDefault(); // if desired... $( "#scriptintwo" ).load( "videos.html" ); This script doesn't seem to run. When i wrap it around a $document.ready() and open the link directly (i.e without using.load()) it works perfectly. But when i load it without document.ready nothing happens and when i load it with document.ready() only one of the clicks work.
has title: External javascript doesnt work when called using jquery's getScript()
answer count: 0
score: 0
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44462296
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44494663
type: AnswerComment
has text: I also just tried using two variables thisScrollTop and lastScrollTop and using the difference, but that did not work either. (lastScrollTop = thisScrollTop; thisScrollTop = $(this).scrollTop();) and then in animate (scrollTop: lastScrollTop - thisScrollTop;)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28036710

http://stackoverflow.com/q/28117044
accepted answer: http://stackoverflow.com/a/28117082
type: Question
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28119055
has comment: http://stackoverflow.com/comment/44608534
tagged with: jquery
has answer: http://stackoverflow.com/a/28117082
favorite count: 0
linked to: http://stackoverflow.com/q/4326845
has answer: http://stackoverflow.com/a/28119055
upvote count: 1
answer count: 4
type: AnsweredQuestion
score: 1
has title: Scrolling Two Divs Using JQuery/Javascript
has answer: http://stackoverflow.com/a/28117129
has comment: http://stackoverflow.com/comment/44608314
has answer: http://stackoverflow.com/a/28117234
has body: Wrapper - Overflow Hidden Div One: Sidebar Div Two: Main Content Div Two will have a normal scroll. Div One I wish to have no visible scroll however when you scroll Div One it scrolls Div Two. Upon Div One's height hitting the bottom, it will no longer scroll and visa-versa for scrolling back up. This will result in the sidebar always being visible at the side. Before you ask, I've tried all positioning types to get this to work resulting in many failed attempts. My live demo can be seen here: http://rafflebananza.com/admin/newadmin.html# Note I've tried to make a JSFiddle simplified but my maths does not seem to work in there the same. Please suggest whether I should fork all my page to there or whatnot for future visitors needing the same help. Overview Scrolling in the wrapper will scroll sidebar to point x only (x being the sidebars height) then stopping but will continue to allow the content to be scrolled. Visa-versa for scrolling back up. Somewhat half way there... var scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop, position = document.body.scrollTop; function scrollD() { var scroll = document.body.scrollTop; if (scroll &gt; position) { // Scrolling Down Functions } else { // Scrolling Up Functions } position = scroll; }

http://stackoverflow.com/q/27968231
tagged with: javascript
tagged with: fullcalendar
type: UnansweredQuestion
score: 2
favorite count: 0
type: Question
upvote count: 2
answer count: 1
has title: Updating events in client side with Javascript
has answer: http://stackoverflow.com/a/27999854
has body: I would like to know if there is anyway to update a Fullcalendar event in Javascript without having to reload the page, just by clicking a link with role button. When I click on the link 'Save' the event is updated in the server side but not in the client side, and I need the event to be updated in both sides. What I'm trying to do is edit the events of a Fullcalendar opening a modal form through eventClick. This is the code of my javascript function drawControl(controls) { $('#calendar').fullCalendar({ editable: true, aspectRatio: 1, contentHeight: 500, scrollTime: '24:00:00', minTime: '01:00:00', maxTime: '24:00:00', defaultView: 'agendaWeek', header:{left:"prev,next,today", center:"title", right:"month, agendaWeek, agendaDay"}, events: allControls(controls), eventRender: function(event, element) { var bloodLevel=event.title if(bloodLevel &gt;= 180) { element.css('background-color', 'red'); } else if(bloodLevel &lt; 70) { element.css('background-color', 'yellow'); } }, eventClick: function(calEvent, jsEvent, view) { x=calEvent.id; $('#modalTitle').html(calEvent.title); $('#control_day_edit').val(moment(calEvent.start._i).format("DD-MM-YYYY hh:mm A/PM")); $('#control_level').val(calEvent.title.toString()); console.log(calEvent) console.log(calEvent.title) console.log(calEvent.start._i) console.log(calEvent.id) $('#eventUrl').attr('href',"/users/:user_id/controls/calEvent.id/edit"); $('#fullCalModal').modal(); y=calEvent; } }) } }); document.getElementById('button_edit').addEventListener("click", editControl); function editControl(event) { event.preventDefault(); console.log(y); console.log(x); var controlEdited = { "level": document.getElementById('control_level').value, "day": document.getElementById('control_day_edit').value, "period": document.getElementById('control_period').value, "id": x } $.post("/editControls", JSON.stringify(controlEdited)); y.title = document.getElementById('control_level').value; y.start = moment(document.getElementById('control_day_edit…
downvote count: 0

http://stackoverflow.com/q/27968511
has comment: http://stackoverflow.com/comment/44330205
has comment: http://stackoverflow.com/comment/44329865
has comment: http://stackoverflow.com/comment/44329960
has comment: http://stackoverflow.com/comment/44329831
has comment: http://stackoverflow.com/comment/44330411
has title: What condition is false in a multiple conditions if statement
has comment: http://stackoverflow.com/comment/44329877
answer count: 4
has answer: http://stackoverflow.com/a/27968771
upvote count: 3
has comment: http://stackoverflow.com/comment/44329746
possible better answer: http://stackoverflow.com/a/27968726
type: Question
has comment: http://stackoverflow.com/comment/44329721
accepted answer: http://stackoverflow.com/a/27968647
type: AnsweredQuestion
score: 3
tagged with: conditional-statements
tagged with: if-statement
has comment: http://stackoverflow.com/comment/44329829
has body: I'm writing a multiple if statement in Javascript. I've 3 (or more) conditions, and I wanna doSomething() only if all these 3 conditions are true. If only one of these 3 are false, I wanna doSomethingElse(). I think my code it's right, but my problem is on another level. What if I wanna know for which condition my statement is false? E.g.: condition1=true, condition2=true, condition3=false. if (condition1 &amp;&amp; condition2 &amp;&amp; condition3) { doSomething(); } else { doSomethingElse(); }; I've thought that I can put another if statement in the else part. if (condition1 &amp;&amp; condition2 &amp;&amp; condition3) { doSomething(); } else { if (condition1 == false) { doWhatIDoWhenC1isFalse(); }; }; Is this the right way? Is there any other way to do this? Maybe faster way! Thank for your help, and be nice to me, it's my second day on Javascript :)
has comment: http://stackoverflow.com/comment/44329947
has answer: http://stackoverflow.com/a/27968647
has answer: http://stackoverflow.com/a/27969098
downvote count: 0
has comment: http://stackoverflow.com/comment/44332174
tagged with: javascript
has answer: http://stackoverflow.com/a/27968726
has comment: http://stackoverflow.com/comment/44333624
has comment: http://stackoverflow.com/comment/44329863
favorite count: 0

http://stackoverflow.com/q/27965908
tagged with: asp.net
tagged with: vb.net
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27966127
type: Question
tagged with: c#
has title: How would I Insert a fileupload selection into a gridview, then add new row?
has comment: http://stackoverflow.com/comment/44325015
tagged with: javascript
has answer: http://stackoverflow.com/a/27966127
score: 0
answer count: 1
tagged with: .net
has body: I would like to have a gridview that has a fileupload control with a button labeled "Add", like so: Filename | Delete --------------------------------------------- [FileUpload Control][Add button] | X When a user presses the Add button, they will browse for a file to upload and select it. When the selection is complete, a new grid row is generated in order to give the user an option to select more files. Filename | Delete --------------------------------------------- Filename in text box | X &lt;- fileupload control is replaced w/txtbox containing filename selected [FileUpload Control][Add button] | &lt;- new row is added for user to select another file How do I accomplish this?

http://stackoverflow.com/q/27993633
tagged with: wordpress
type: Question
has title: Wordpress issue with Isotope
has answer: http://stackoverflow.com/a/28227624
tagged with: javascript
score: 0
answer count: 2
has body: I have a theme that does not seem to be completely compatible with a plugin in wordpress. The plugin is called: DHVC Woocommerce products. It seems to cause the following issue: "no such method 'reLayout' for isotope instance" I read a bit online and it mostly seems to be due to a conflict issue (i.e. 2 versions clashing). I currently have Isotope v1.5.26). I tried to upgrade to http://isotope.metafizzy.co/isotope.pkgd.min.js however that still brought about that same issue. Any ideas as to what next I could try?
tagged with: jquery-isotope
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27995055

http://stackoverflow.com/comment/44471059
has text: As @SwapnilMotewar has pointed out, this conditional statement only works for browsers, `less than` IE9 so 8, 7, 6. Check this answer out here:http://stackoverflow.com/questions/14585703/ie10-stylesheet. Also, have you tried debugging using Firebug or the Developer console? (F12 for most).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28043620
score: 0

http://stackoverflow.com/a/28119726
upvote count: 1
answers question: http://stackoverflow.com/q/28119594
accepted answer of: http://stackoverflow.com/q/28119594
type: AcceptedAnswer
downvote count: 0
has body: This is what I found: The scrollbar-xxx-color property changes the color of the scrollbars. (xxx = either base, face, track, arrow, highlight, shadow, 3dlight, and darkshadow) So the iframe's scrollbar color can be changed by using these into the BODY element of the page you have in your iframe. Not in the page where you add the &lt;iframe ... to, but the page that loads into the iframe. Source: http://www.tagindex.net/css/frame/scrollbar_color.html
type: Answer
score: 1

http://stackoverflow.com/comment/47622970
type: QuestionComment
type: Comment
has text: You could try using the AWS CLI (aws.amazon.com/cli) the both sets of credentials to see whether the same problem occurs. That way, you'll know if the problem is with the credentials or with the code.
comment on: http://stackoverflow.com/q/28099537
score: 0

http://stackoverflow.com/a/28065493
upvote count: 1
has comment: http://stackoverflow.com/comment/44512944
downvote count: 0
has comment: http://stackoverflow.com/comment/44553004
has comment: http://stackoverflow.com/comment/44514579
answers question: http://stackoverflow.com/q/28064993
type: Answer
has comment: http://stackoverflow.com/comment/44513886
has comment: http://stackoverflow.com/comment/44513992
has body: To scroll div you shuold use: $('selector').scrollTop(ypos) and $('selector').scrollLeft(xpos) jQuery API Documentation .scrollTop()
score: 1

http://stackoverflow.com/comment/44503281
comment on: http://stackoverflow.com/q/28061036
has text: var start=request.param('startDate'); formatedStartDate = getYearMonthDate(new Date(start)); function getYearMonthDate(date){ var monthYear=date.getFullYear()+" "+date.getMonth()+ " " + date.getDate(); return monthYear; }
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44581884
comment on: http://stackoverflow.com/q/28103407
type: Comment
type: QuestionComment
has text: ahh yes, use `on()` for that. You should have seen errors thrown for `function is undefined` or similar such description
score: 0

http://stackoverflow.com/comment/44486482
type: Comment
type: QuestionComment
has text: How about ? http://stackoverflow.com/questions/1451208/access-iframe-elements-in-javascript
comment on: http://stackoverflow.com/q/28052114
score: 0

http://stackoverflow.com/q/28092100
has comment: http://stackoverflow.com/comment/44561442
has body: I have a problem with Snap.svg and javascript. I'm trying to animate an svg on mouseEnter event, but I'm getting an error when an event is fired: Uncaught SyntaxError: Unexpected identifier localhost/:3 Uncaught SyntaxError: Unexpected identifier Inside of this error I find: (function(val /**/) { return Snap.path.toString.call(object Array) //error in this line }) My code looks like this: function init() { var speed = 250, easing = mina.easeinout; [].slice.call(document.querySelectorAll('.gallery figure')).forEach(function(el) { var s = Snap(el.querySelector('svg')), path = s.select('path'), pathConfig = { from: path.attr('d'), to: el.getAttribute('data-path-hover') }; el.addEventListener('mouseenter', function() { path.animate({ 'path': pathConfig.to }, speed, easing); }); el.addEventListener('mouseleave', function() { path.animate({ 'path': pathConfig.from }, speed, easing); }); }); }
score: 2
has comment: http://stackoverflow.com/comment/44562332
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Snap.svg and javascript throws Uncaught SyntaxError
answer count: 1
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/44560990
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28098003

http://stackoverflow.com/comment/44373192
type: QuestionComment
comment on: http://stackoverflow.com/q/27990642
has text: I was using that, but to make everything work an hover at the same time, this was the only way I could make it work with my skill level
score: 0
type: Comment

http://stackoverflow.com/q/27986980
has body: I wonder if in Developer Tools or any other tool, there is the possibility to provide a selector, e.g "input.name.highlight" and track all the code that javascript ran against it in real time? Usually bad javascript/jquery code that is running using very generic selectors or selectors like $("input").not(".foo, .bar, .baz, .qux") or running on a global scope is difficult to track so I wonder if there is a tool that would automate debugging process by outputting the line numbers of the code that just ran against the selected elements.
tagged with: css-selectors
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: developer-tools
has title: Is there a way to find all the javascript code that ran against a specific element selection?
answer count: 0
has comment: http://stackoverflow.com/comment/44365063
score: 1
has comment: http://stackoverflow.com/comment/44365248
upvote count: 1
type: Question
tagged with: debugging
has comment: http://stackoverflow.com/comment/44365151
tagged with: javascript
linked to: http://stackoverflow.com/q/11268457

onclick
tags question: http://stackoverflow.com/q/28069985
tags question: http://stackoverflow.com/q/28013991
tags question: http://stackoverflow.com/q/28067927
tags question: http://stackoverflow.com/q/28087962
tags question: http://stackoverflow.com/q/28036928
tags question: http://stackoverflow.com/q/28041097
tags question: http://stackoverflow.com/q/28032951
tags question: http://stackoverflow.com/q/28109743
tags question: http://stackoverflow.com/q/28113996
tags question: http://stackoverflow.com/q/27995618
tags question: http://stackoverflow.com/q/28103522
tags question: http://stackoverflow.com/q/28046260
tags question: http://stackoverflow.com/q/28095637
tags question: http://stackoverflow.com/q/28090805
type: Tag
tags question: http://stackoverflow.com/q/28041121
tags question: http://stackoverflow.com/q/27981079
tags question: http://stackoverflow.com/q/28053036
tag name: onclick
tags question: http://stackoverflow.com/q/27995129
tags question: http://stackoverflow.com/q/28039924
tags question: http://stackoverflow.com/q/28000359
tags question: http://stackoverflow.com/q/28073560

http://stackoverflow.com/comment/44356999
type: Comment
type: QuestionComment
score: 0
has text: i remember that i had similar problems. Just call $("select").change() after you set the value
comment on: http://stackoverflow.com/q/27982937

http://stackoverflow.com/comment/44404889
type: QuestionComment
comment on: http://stackoverflow.com/q/28008454
has text: @adeneo , not working , i just wonder if there any way to make it without .closest !
score: 0
type: Comment

http://stackoverflow.com/q/28095985
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28105866
has comment: http://stackoverflow.com/comment/44567823
has body: I'm implementing a very simple Node.js Websocket server for a game in HTML5 + PHP. I tested my server locally and works fine, but when I deployed my server and client (in different domains, of course), I just can't connect them. I deployed the server at https://evennode.com. I'm new to Node.js, maybe I'm missing something in my code. var users = []; var WebSocketServer = require('ws').Server; var connections = {}; var registered = {}; var connectionIDCounter = 0; var port = process.env.PORT || 80; var wss = new WebSocketServer({port: port}, function(){ console.log('Listening on port: ' + port); }); wss.on('connection', function(socket) { socket.id = connectionIDCounter ++; connections[socket.id] = socket; registered[socket.id] = 'Guest' + socket.id; connections[socket.id].position = {}; connections[socket.id].position.x = 0; connections[socket.id].position.y = 1.8; connections[socket.id].position.z = 0; console.log('Connected: ' + socket.id); socket.on('message', function(message) { var resultObject = JSON.parse(message); parseMessage(this.id, resultObject); }); socket.on('close', function(message) { sendUserState(this.id, 'disconnected'); delete registered[this.id]; delete connections[this.id]; }); }); I little help would be appreciated.
has comment: http://stackoverflow.com/comment/44581034
has title: Node.js Websocket server won't work online
type: Question
has comment: http://stackoverflow.com/comment/44572202
tagged with: javascript
has comment: http://stackoverflow.com/comment/44567768
has comment: http://stackoverflow.com/comment/44578945
score: 0
has comment: http://stackoverflow.com/comment/44579691
has comment: http://stackoverflow.com/comment/44572214
accepted answer: http://stackoverflow.com/a/28105866
answer count: 1
tagged with: websocket
linked to: http://stackoverflow.com/q/20645231
tagged with: php
tagged with: node.js

http://stackoverflow.com/q/28008215
has comment: http://stackoverflow.com/comment/44404417
score: -6
favorite count: 0
has comment: http://stackoverflow.com/comment/44408998
has title: How to list array names in json
has answer: http://stackoverflow.com/a/28008260
has body: I have arrays within arrays in json. is there anyway in which i can list the name of an array. if one array exists which contains 5 other array is there a way to list all the names 5 array, not their content but their names. is there a way to do this in javascript for example hey, i got the jist of your answer but i just want to clarify. i have json as follows, { "array1":[ { "array2":[ { "array3":[ ] } ], "array21:[ { }] } ] } I wanted to know that first i list all the arrays in array1 then all the arrays in array2 then all the arrays in array3. like if i list all the arrays in array1 i should get the result array2 and array2 and so on. is this possible? according to your answer arrays cannot be named hence its not possible but just clarifying
downvote count: 6
has comment: http://stackoverflow.com/comment/44404418
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/28008260
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/28077930
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/44534861
type: UnansweredQuestion
has title: Renaming Array with Variable
type: Question
has answer: http://stackoverflow.com/a/28078009
tagged with: javascript
has body: One of the problems with teaching yourself how to code is that you miss some things that might be fairly simple: I have written a function which takes text files (e.g. "someData1.txt", "someData2.txt" etc.) turns their contents into an array ("myArray"), and extracts their title as a variable ("fileName"). I am at the stage where I have parsed the filenames and the arrays, but I would like to rename each array with the variable, so that the first array becomes "someData1", and so on. I already have a bunch of code which will do various things with each different array, so it would useful if I could name them the way I wish. I thought I could use valueOf to do it, as in fileName.valueOf() = myArray; but that does not work. So how do I do this? Thanks!
has answer: http://stackoverflow.com/a/28077990

http://stackoverflow.com/comment/44451756
type: Comment
comment on: http://stackoverflow.com/a/28033119
score: 0
type: AnswerComment
has text: @Dan, I found what you're asking for on the site, I'll update my answer

jsf
tags question: http://stackoverflow.com/q/28066958
type: Tag
tags question: http://stackoverflow.com/q/28089825
tags question: http://stackoverflow.com/q/27984726
tags question: http://stackoverflow.com/q/28086217
tags question: http://stackoverflow.com/q/28078801
tags question: http://stackoverflow.com/q/28003389
tag name: jsf
tags question: http://stackoverflow.com/q/28100003
tags question: http://stackoverflow.com/q/28044191

http://stackoverflow.com/a/28112281
score: 4
has comment: http://stackoverflow.com/comment/44598441
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28112171
answers question: http://stackoverflow.com/q/28112171
has comment: http://stackoverflow.com/comment/44598499
type: Answer
has body: JSLint is actually asking you to move the variable declaration to the top of the function scope: function myfunction() { var i, j, k; // other code for (i = 0; i &lt; 100; i=i+1) { //another JSLint Recommendation: Don't use ++ for (j = 0; j &lt; 100; j=j+1) { for (k = 0; k &lt; 100; k=k+1) { console.log(i); console.log(j); console.log(k); } } } } The reason is that variables have function level scope in JavaScript. If I had declared 'j' inside of the for loop for i, it would have been 'hoisted' to the top of the function and would have actually existed throughout that whole function, not just in the for loop. JSLint makes this recommendation because that's what is going on behind the scenes anyway, and you could be in for a rude surprise if you don't expect that to be the case.

http://stackoverflow.com/a/28072239
has comment: http://stackoverflow.com/comment/44523907
upvote count: 7
type: Answer
has comment: http://stackoverflow.com/comment/44524007
answers question: http://stackoverflow.com/q/28072082
has comment: http://stackoverflow.com/comment/44523880
has body: You can first convert to lowercase using js String.prototype.toLowerCase() and then compare: function DoColor() { document.getElementById("ID").style.backgroundColor = "#F4FFFF"; alert("ID color = " + $("#ID").css("background-color")); // this shows RGB(244, 255, 255) alert($("#ID").css("background-color").toLowerCase() === "rgb(244, 255, 255)"); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="text" id="ID" onclick="DoColor()"&gt;
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/44523831

http://stackoverflow.com/comment/44469393
has text: yes i want i dont want it to provide the list but choose the first one in the list as a suggestion just like your typing googl and its allready showing google.com in your adres bar.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28042704
score: 0

http://stackoverflow.com/a/28042012
score: 1
has body: Yes, testFunc() doesn't exist within that context i.e. within the callJqueryTestFunc() So, you can pass a variable to the function and call that function like this: var testFunc = function(){ console.info('call jQuery testFunc'); } }); function callJqueryTestFunc(testFunc){ testFunc(); // now, it exist through closure }
has comment: http://stackoverflow.com/comment/44467513
has comment: http://stackoverflow.com/comment/44467324
upvote count: 2
has comment: http://stackoverflow.com/comment/44467306
downvote count: 1
answers question: http://stackoverflow.com/q/28041957
type: Answer
has comment: http://stackoverflow.com/comment/44467360

http://stackoverflow.com/comment/44715822
comment on: http://stackoverflow.com/a/28027064
type: AnswerComment
type: Comment
score: 0
has text: The problem with this solution is the fact it adds a click event to EVERY cell of the table. Yeah it works, but when the table as a lot of cells, that gets expensive. I am not sure what is harder to understand since it is the same code other than the fact the td is not in the selector. Learn about the power of event delegation, you will be using the more you code.

list
type: Tag
tags question: http://stackoverflow.com/q/28029764
tags question: http://stackoverflow.com/q/28013834
tag name: list
tags question: http://stackoverflow.com/q/28083400

http://stackoverflow.com/comment/44539457
comment on: http://stackoverflow.com/q/28080393
score: 0
type: Comment
type: QuestionComment
has text: Which event you use to get selected item. Option changed or ?

http://stackoverflow.com/comment/44530716
comment on: http://stackoverflow.com/a/28074937
type: AnswerComment
score: 0
type: Comment
has text: Alright now zoomIntoArea(featureCollection); is working. But I really have tested it that way before. Strange things happening here. Ok question is solved. Thank you.

http://stackoverflow.com/q/28004175
type: UnansweredQuestion
answer count: 0
score: 1
tagged with: forms
upvote count: 1
type: Question
has title: Javascript Form Validation referencing issue
tagged with: javascript
has comment: http://stackoverflow.com/comment/44397027
has comment: http://stackoverflow.com/comment/44397914
tagged with: validation
downvote count: 0
has comment: http://stackoverflow.com/comment/44397004
favorite count: 0
has body: Im trying to validate a form for an assignment and have hit a wall, apologies in advance if I miss the obvious Im quite new to programming. Im trying to validate multiple form fields to check for erroneous data before the form is submitted. I have a separate function in an external file for each type of field that holds a regex and checks the input and acts on the result. My problem is that I built the functions to need parameters to work. At the moment I have the functions placed in the onblur section of each field to validate and provide feedback as the user progresses through the form. Now when I want to build a master function to call all the functions in the onsubmit section of the form my referencing wont work, I must be missing something trivial but I've gone over the code again and again. Sample onblur code: Any number Sample External File Function: function validateNumber(pId, id, value){ var inputCorrectMsg = "<--Input is Valid"; var inputIncorrectMsg = "<--Error: Please enter a number."; var regEx = /\d\d\d\d/; var trimValue = value.replace(/^\s+|\s+$/, ''); var trimValue1 = trimValue.replace(/^0+/g, ''); var result = regEx.test(trimValue1); if (result == true){ feedbackColour(pId, id, result, inputCorrectMsg); } else{ feedbackColour(pId, id, result, inputIncorrectMsg); } return result; } What I need to be able to do from the external file: function lastCheck(){ var result1 = validateNumber('anyNumberP', 'anyNumber', anyNumber.value); var result2 = validateOtherStuff('etc', 'etc', 'etc'); if(result1 && result2 = false){ return false; }else{ return true; } } I tried the referencing the function like above but it wont work in my master function. Wether its the reference to the function or the variables passed to the function im not sure. If anyone can help id REALLY appreciate it, thanks!

http://stackoverflow.com/comment/44728546
comment on: http://stackoverflow.com/a/28117105
has text: Thanks, this worked great, for those reading after, the two other answers have a lot more explanation of why this works.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27995784
score: 1
type: AcceptedAnswer
downvote count: 0
has body: Give all your spans the classes class="unformatted" and class="formatted" instead of ids. Loop through all of the unformatted elements getting each element's html (the date), reformat it, then use jQuery's eq() to set the modified text to the matching formatted element // give all your spans, classes `class="unformatted"` and `class="formatted"` // loop through all of the `unformatted` elements $('.unformatted').each(function(index, element){ // use a regular expression to get an array of the different date parts // then rearrange them if($(element).html().match(/\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d/)){ var dateParts= $(element).html().match(/(\d{4})-(\d\d)-(\d\d)\s(\d\d:\d\d:\d\d)/); // dateParts will now be an array with 4 items --> [YYYY, MM, DD, HH:MM:SS] // use jquery's `eq()` to set the modified text // to the matching `formatted` element $('.formatted:eq('+index+')').html( dateParts[3]+'-'+ dateParts[2]+'-'+ dateParts[1]+' '+ dateParts[4] ); } }); .formatted{ margin-left:20px; color:green; } Table Header 1983-12-22 06:22:25.0000 Table Header 1943-06-15 12:22:14.0000 Table Header 1999-12-04 02:22:27.0000
type: Answer
accepted answer of: http://stackoverflow.com/q/27995226
answers question: http://stackoverflow.com/q/27995226
upvote count: 1

dreamweaver
type: Tag
tag name: dreamweaver
tags question: http://stackoverflow.com/q/27964089

http://stackoverflow.com/comment/44444405
comment on: http://stackoverflow.com/q/28029764
has text: The bucle run a lot of loops(huge). Maybe the total letters in the list.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27968361
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
score: 6
has answer: http://stackoverflow.com/a/27968568
has answer: http://stackoverflow.com/a/27968574
type: AnsweredQuestion
tagged with: javascript
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/27969560
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/39530044
has body: I want to validate a form in a bootstrap modal without using any framework. It's actually a simple modal with only an input text and two buttons "Close" and "Send". The user should type his/her name in the input box and click send. The form is the sent with the method post. What I want to do is that, if the user doesn't enter anything in the input box of and clicks on the button "Send", the input box should have a red border circling it instead of the default blue border. Here's the code for my modal: &lt;div id="myModal" class="modal fade" tabindex="-1"&gt; &lt;div class="modal-dialog modal-lg"&gt; &lt;div class="modal-content"&gt; &lt;!--form--&gt; &lt;form class = "form-horizontal" id="myForm" method="post" action="test.php" role="form"&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;My modal&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;p&gt; Please enter your name: &lt;/p&gt; &lt;br/&gt; &lt;div class="form-group"&gt; &lt;div class="col-lg-12"&gt; &lt;label class="control-label" for="firstname"&gt;Name&lt;/label&gt; &lt;input type="text" class="form-control required" id="firstname" name="firstname"&gt; &lt;/div&gt; &lt;/div&gt; &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;button id="myFormSubmit" class="btn btn-primary"&gt;Send&lt;/button&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; I tried using javascript to change the class of the input text to has-errorbut it doesn't produce the red outline. When I click on send it sends the empty value through the post method instead of Here's my javascript code: &lt;script type="text/javascript"&gt; $('#myForm').validate({ rules: { name: { minlength: 1, required: true }, }, highlight: function (element) { $('#firstname').removeClass('has-success').addClass('has-…
has title: Validate input text in bootstrap modal
upvote count: 6
possible better answer: http://stackoverflow.com/a/27968568
accepted answer: http://stackoverflow.com/a/27968574
answer count: 4

http://stackoverflow.com/a/28043978
answers question: http://stackoverflow.com/q/28019840
type: Answer
has comment: http://stackoverflow.com/comment/44497229
score: 1
upvote count: 1
has body: Like you see in link that you included the kendo tooltip (with autoHide: false property) hides when you: click outside the tooltip scroll page hit Esc Until Telerik will not implement function to prevent it, the only way is using jquery event.stopImmediatePropagation(). For example for block tootlip from hide when you click outside you can write: $("#target").kendoTooltip({ autoHide: false }); $('html').on('mousedown', function(e){ e.stopImmediatePropagation(); }); Working demo: http://dojo.telerik.com/ugUCI Unfortunately it will prevent any html onmousedown events like DropDownLists/ComboBoxes hiding etc.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28019840

http://stackoverflow.com/q/28059170
has comment: http://stackoverflow.com/comment/44499827
has comment: http://stackoverflow.com/comment/44499864
type: AnsweredQuestion
score: 3
upvote count: 3
accepted answer: http://stackoverflow.com/a/28059230
type: Question
has body: I am trying to get the height of a div using javascript. I have seen this question a lot on stackoverflow and seen both answers. Some say clientHeight and some say offsetHeight. For my project, I have a div with content inside that does not have a pre-set css height. I want to get the height of it with javascript. Which is better to use? and please NO JQUERY. Thanks
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/28059229
has answer: http://stackoverflow.com/a/28059230
has answer: http://stackoverflow.com/a/28059229
favorite count: 0
has title: offsetHeight vs. clientHeight

http://stackoverflow.com/comment/44562464
score: 1
has text: There is not enough information here to figure out whats going on with your code. I can just give you some hints, use the developer tool in IE and see if your java script is failing somewhere if not place some breakpoints and that will give you a better idea why your code is not working. I am assuming for some reasons either your createPrintableHtml() is failing to return contents or if it is returning html contents properly, $('input[name="htmlData"]') statement is failing ( may be because of an invalid character in your html etc )
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28092910

http://stackoverflow.com/q/28090736
favorite count: 0
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/44557999
score: 1
has title: Can't make "Enter" key call a function instead of submit page
type: Question
has body: This code works fine when I map the function to the "Ctrl" key (char code 17). But it submits the page when I change it to the "Enter" key (code 13). Why would this happen? The question paragraph. sub-question EDIT: I changed the function below but I get the same problem: $(document).ready(function(){ $("#userInput").keyup(function(event){ if(event.keyCode == 13){ event.preventDefault(); processInput(); } }); flashcards_main(); });
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28090760
accepted answer: http://stackoverflow.com/a/28090760
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/28046964
downvote count: 0
score: 1
has body: You cant detect enter keypress on the input and trigger the button's click event. $("button").on("click", function(e){ $("body").append($(" ").attr("type", "text")); }); $(document).on("keypress", "input", function(e){ if(e.which == 13) $("button").trigger("click"); }); Add Input
upvote count: 1
answers question: http://stackoverflow.com/q/28046767
type: Answer

http://stackoverflow.com/comment/44376839
has text: yes, sorry if I was unclear, I would like the order within each property array to be determined by the order of the objects in the original array (as @muistooshort said)
score: 1
comment on: http://stackoverflow.com/q/27992813
type: QuestionComment
type: Comment

http://stackoverflow.com/q/28061121
answer count: 1
has body: Very little problem, please help! Javascript object not defined whether it worked years ago: &lt;script type="text/javascript"&gt; var obj_Car = new object(); obj_Car.color = "beige" document.write(obj_Car.color); &lt;/script&gt;
favorite count: 0
has comment: http://stackoverflow.com/comment/44503452
downvote count: 2
accepted answer: http://stackoverflow.com/a/28061217
tagged with: object
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44503471
type: Question
upvote count: 0
score: -2
tagged with: javascript
has title: javascript object not defined whether it worked years ago
has answer: http://stackoverflow.com/a/28061217

raphael
tags question: http://stackoverflow.com/q/28091306
tags question: http://stackoverflow.com/q/28080330
tags question: http://stackoverflow.com/q/28109660
tags question: http://stackoverflow.com/q/28113365
tag name: raphael
tags question: http://stackoverflow.com/q/28098889
type: Tag

http://stackoverflow.com/a/28056815
has body: There is no JavaScript function to achieve this. However, you could set a boolean value to true when you add the listener, and false when you remove it. Then check against this boolean before potentially adding a duplicate event listener. Possible duplicate: How to check whether dynamically attached event listener exists or not?
has comment: http://stackoverflow.com/comment/88926030
has comment: http://stackoverflow.com/comment/51208754
upvote count: 118
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/54966813
answers question: http://stackoverflow.com/q/28056716
type: Answer
accepted answer of: http://stackoverflow.com/q/28056716
has comment: http://stackoverflow.com/comment/54966942
score: 118
downvote count: 0
has comment: http://stackoverflow.com/comment/137708142
has comment: http://stackoverflow.com/comment/66757224

http://stackoverflow.com/a/28079505
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28079243
type: Answer
answers question: http://stackoverflow.com/q/28079243
score: 2
upvote count: 2
has body: You'll want to do Parser.prototype.insertFoos = function() { this._streamParseFile(this.csvFoo, this._parseFoo.bind(this), function() { // ^^^^^^^^^^^ console.log('Done Foo'); }); }; Notice that your es.mapSync callback is overly complicated (no reason for that IEFE!) and you (yet?) don't actually need a callback for makeObj - parseFoo is synchronous.
has comment: http://stackoverflow.com/comment/44539395

http://stackoverflow.com/a/72233643
has body: Here is my options config const options = { responsive: true, plugins: { legend: { position: 'top', }, tooltip: { enabled: true }, }, scales: { xAxis: { ticks: { maxTicksLimit: 7, minRotation: 0, maxRotation: 0 } } } };
type: Answer
answers question: http://stackoverflow.com/q/28031873
score: 0

http://stackoverflow.com/q/28043104
has answer: http://stackoverflow.com/a/28043129
has answer: http://stackoverflow.com/a/30766252
upvote count: 1
has title: Don't show selected item in dropdown list
has answer: http://stackoverflow.com/a/28043585
answer count: 4
has comment: http://stackoverflow.com/comment/44469243
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
favorite count: 0
tagged with: jquery-select2
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 1
has answer: http://stackoverflow.com/a/28043288
has body: I have a select2 dropdown with a few values (let's say colors), and I want to remove from the dropdown list the current selected item. For example, if all the options are white, green, red, blue and the current selected item is white, if the user clicks on the dropdown, he'll only see the other 3 colors (green, red and blue). Now, I can easily remove the currently selected item with jquery, and restore it back on change, but that really doesn't feel clean. Is there any built-in method for doing that, or at least a method that is a little bit more "cleaner"?

http://stackoverflow.com/q/28057155
type: Question
has title: Angular edit a copy of a copy
tagged with: javascript
has answer: http://stackoverflow.com/a/28057504
score: 0
answer count: 2
has body: I'm having a few problems editing a copy of a copy. When you first edit a record it is assigned to a $scope.original and a copy is taken for editing and stored in $scope.copy which can be changed and saved back to $scope.original which in-turn updates $scope.something correctly. The problem is while editing the first record if you then take a copy of one of the values for further editing, it doesn't get updated when the $scope.saveSomething() function is called. var myApp = angular.module('myApp', []); function MyCtrl($scope) { $scope.Something = [{ name: "Aye", desc: new Date() }, { name: "Bee", desc: new Date() }, { name: "See", desc: new Date() }]; //=================== First copy $scope.edit = function(what) { $scope.original = what; $scope.copy = angular.copy(what); } $scope.save = function(copy) { angular.copy($scope.copy, $scope.original); $scope.cancel(); } $scope.cancel = function() { $scope.copy = null; } //=================== Second copy $scope.editName = function(what) { $scope.originalName = what; $scope.copyName = angular.copy(what); } $scope.saveName = function() { angular.copy($scope.copyName, $scope.originalName); $scope.cancelName(); } $scope.cancelName = function() { $scope.copyName = null; } } edit save cancel edit name saveName cancelName I'm fairly new to Angular, and have been scratching my head on this one for a while now, any ideas why? Edit Updated the code to give a better example, the first version suggested that you might know which value of the first edit's values you were editing, and the solution scarlz posted ( http://jsfiddle.net/Karl33to/w23ppp9r/ ) just sets that value directly in the second save function, but I need to be able to do the second edit on any of the values that the first edit loads. Have also created a fiddle if that's easier for you to run / fork http://jsfiddle.net/w23ppp9r/2/
tagged with: angularjs
has answer: http://stackoverflow.com/a/28096918
type: UnansweredQuestion

http://stackoverflow.com/q/28010022
tagged with: javascript
has answer: http://stackoverflow.com/a/28010271
score: 0
has body: I have a table which is filling dynamically via SignalR+knockout.js I'd like to somehow add a new cell and draw chart (flotchart.org) with MemPercent to this cell. How to add this? In a static case the chart can be made this way: var container1 = $("#placeholder1"); var plot1 = $.plot(container1, dataSeries, { series: { shadowSize: 0 }, yaxis: { min: 0, max: 100 }, xaxis: { show: false } }); function update() { plot1.setData(series); plot1.draw(); setTimeout(update, updateInterval); } update(); My questions: 1. how to add cell with chart dynamically? 2. how to access any chart containers during the update? Thnx.
has comment: http://stackoverflow.com/comment/44408139
answer count: 1
accepted answer: http://stackoverflow.com/a/28010271
type: AnsweredQuestion
has title: javascript: How to add div to table cell dynamically?
has comment: http://stackoverflow.com/comment/44407862
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/44407929
type: Question
tagged with: charts

http://stackoverflow.com/comment/44408196
comment on: http://stackoverflow.com/q/28010155
score: 0
type: QuestionComment
type: Comment
has text: Does the update help at all.

jquery-ui-sortable
tags question: http://stackoverflow.com/q/27973267
tags question: http://stackoverflow.com/q/27974109
tags question: http://stackoverflow.com/q/28092353
tag name: jquery-ui-sortable
type: Tag
tags question: http://stackoverflow.com/q/28030180

http://stackoverflow.com/comment/44380778
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27995038
type: Comment
has text: I don't get what you mean. The code looks just like yours. Getting the information from getName, assigning it to "name" and then using it in the res.render().

http://stackoverflow.com/comment/44461544
score: 0
has text: OK, I found the mistake : I had to add this just before the JS script `// $(window).load(function(){"` and this `});// ` at the end
type: Comment
comment on: http://stackoverflow.com/a/28037795
type: AnswerComment

http://stackoverflow.com/comment/44323826
type: Comment
has text: @SergeyRomanov I need to add the class to the element based on the validity of the child element.
comment on: http://stackoverflow.com/a/27964593
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44575310
type: QuestionComment
score: 0
has text: I edited to illustrate that my app is an outside resource so putting ${initData} in the controller isn't an option
comment on: http://stackoverflow.com/q/28099714
type: Comment

http://stackoverflow.com/comment/44491446
comment on: http://stackoverflow.com/q/27994773
score: 0
type: Comment
type: QuestionComment
has text: Thanks for the comment, the more that I look around the more I am thinking I will need to make it so the users can draw the text box.

http://stackoverflow.com/comment/44494495
score: 0
has text: is it perfectly work before the search keyword input?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28055979

http://stackoverflow.com/a/28047322
has body: You have to do a CRON job, which will execute the file you defined every x minutes/hours/...
type: Answer
answers question: http://stackoverflow.com/q/28047255
score: 3
upvote count: 3
downvote count: 0

http://stackoverflow.com/comment/44498661
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28058519
score: 5
has text: 1. Split it by `.` 2. Use `for`. 3. ??????? 4. PROFIT!!!!111

http://stackoverflow.com/a/28147490
type: AcceptedAnswer
downvote count: 0
has body: Since it looks like you are using TeX-input, you can specify classes in the configuration of the tex2jax pre-processor, e.g., &lt;script type="text/x-mathjax-config"&gt; // ... tex2jax: {ignoreClass: "class2"} &lt;/script&gt; See the MathJax documentation for more details.
type: Answer
answers question: http://stackoverflow.com/q/28098997
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28098997
has comment: http://stackoverflow.com/comment/119412632
has comment: http://stackoverflow.com/comment/119464138

http://stackoverflow.com/a/28001232
upvote count: 6
has comment: http://stackoverflow.com/comment/44391688
has comment: http://stackoverflow.com/comment/44391710
has comment: http://stackoverflow.com/comment/44391700
accepted answer of: http://stackoverflow.com/q/28001220
has comment: http://stackoverflow.com/comment/44391626
answers question: http://stackoverflow.com/q/28001220
type: Answer
has comment: http://stackoverflow.com/comment/44391609
has comment: http://stackoverflow.com/comment/44391601
score: 6
has comment: http://stackoverflow.com/comment/44391650
has body: Quotes are optional when keys are proper identifiers or numbers. For other keys, quotes are required: var foo = { identifier: "no quotes", "@balloonz are pretty": "quotes necessary" }; Property names that are not identifiers must be accessed using the [ ] operator: if (foo["@balloonz are pretty"] != null) { // ... } The semantics of property access via [ ] and . are the same; it's just a syntactic distinction. if (foo.identifier != null) { // ... }
downvote count: 0
has comment: http://stackoverflow.com/comment/44391533
has comment: http://stackoverflow.com/comment/44391605
type: AcceptedAnswer

http://stackoverflow.com/comment/44699793
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28106039
score: 0
has text: Hi micronys i am giving you plnkr for this problem please see where's the problem?

http://stackoverflow.com/q/28077416
has answer: http://stackoverflow.com/a/28077437
type: Question
has comment: http://stackoverflow.com/comment/44533822
has title: JavaScript variable with no initial value returns null in one case and undefined in another
tagged with: javascript
has comment: http://stackoverflow.com/comment/44533739
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/28077437
has body: So I am learning JavaScript and tested the code below: var name; console.log( name ); returns null var c; console.log( c ); returns undefined why is this? Documentation states: A variable declared using the var statement with no initial value specified has the value undefined. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Values,_variables,_and_literals#Declaring_variables Any references to official documentation would be great!
has comment: http://stackoverflow.com/comment/44533775
type: AnsweredQuestion

http://stackoverflow.com/q/28094179
accepted answer: http://stackoverflow.com/a/28095528
favorite count: 0
has title: Responsive Filemanager 9 opens blank dialog in TinyMCE 4
has comment: http://stackoverflow.com/comment/44566159
upvote count: 1
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44565087
score: 1
has answer: http://stackoverflow.com/a/28095528
tagged with: responsive-filemanager
has comment: http://stackoverflow.com/comment/44566128
type: Question
tagged with: tinymce-4
has comment: http://stackoverflow.com/comment/44566562
linked to: http://stackoverflow.com/q/1216274
has body: I'm trying to configure Responsive Filemanager 9 (http://www.responsivefilemanager.com/) for my project using TinyMCE4 My folder structure are: TinyMCE: http://localhost/tinyPaintWeb/ http://localhost/tinyPaintWeb/index.html http://localhost/tinyPaintWeb/plugins/responsivefilemanager Filemanager http://localhost/filemanager source folder (just for testing) http://localhost/lesFiles I'm following the documentation instructions as follows: config.php $base_url="http://localhost"; $upload_dir = '/lesFiles/'; $current_path = '../lesFiles/'; $thumbs_base_path = '../lesFiles/thumbs/'; index.html (tiny configuration) plugins: ["compat3x print pagebreak fullscreen code image table paintweb responsivefilemanager",], image_advtab: true, external_filemanager_path:"/filemanager/", filemanager_title:"Responsive Filemanager" , external_plugins: { "filemanager" : "/filemanager/plugin.min.js"}, toolbar: "undo redo pagebreak | bold italic | table | paintwebEdit image responsivefilemanager | fullscreen", the file manager icon appears in the Tiny, but when i click it, only appears a dialog with the title "Responsive Filemanager" and blank content. what i missing??? thank you
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/28097633
type: AnsweredQuestion
has body: Im trying to get method chaining to work using javascript: (function(){ var first = function(){ console.log("1st Chain"); return this; }; var second = function(){ console.log("2nd Chain"); } first().second(); })(); Only the first function is printing to the console but the second function is saying its undefined. However when I tried it using a Constructor, it works. var Chaining = function(){ this.first = function(){ console.log("1st Chain"); return this; }; this.second = function(){ console.log("2nd Chain"); }; }; var chain = new Chaining; chain.first().second(); // this works fine.
possible better answer: http://stackoverflow.com/a/28098111
has answer: http://stackoverflow.com/a/28098111
has answer: http://stackoverflow.com/a/28097762
type: Question
has comment: http://stackoverflow.com/comment/44571188
has comment: http://stackoverflow.com/comment/44571261
has comment: http://stackoverflow.com/comment/44572247
tagged with: javascript
answer count: 3
score: 2
has comment: http://stackoverflow.com/comment/44571200
downvote count: 0
accepted answer: http://stackoverflow.com/a/28097762
has comment: http://stackoverflow.com/comment/44571334
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/28098278
has title: Method chaining using javascript not working?

http://stackoverflow.com/comment/44564847
has text: @Questifer Darn; that's pretty confusing if JQuery briefly gives up on its rules of "operate on multiple elements". Pete is right that it can still work via classes, but you need to keep track of the forms via proper variable references inside functions, rather than ID selection.
type: Comment
comment on: http://stackoverflow.com/q/28092676
type: QuestionComment
score: 1

http://stackoverflow.com/q/28093914
has comment: http://stackoverflow.com/comment/44564284
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I need to write a new HTML file from a string using file system, I'm using Cordova 2.4.0. . That HTML would have some images loaded from a local folder, so because I need just one file (a HTML without png/jpg images alongside it) I'm trying to encode this images and apply them through CSS as background images (The CSS code is embeded in the same String, future HTML file). Well, the way I make these modifications to the string is by using functions returns. For example: padding-top: 5%; background-image: url(' + agregaImagenLocal('../img/ESTELAR.png') + '); background-color: white; The function "agregaImagenLocal(pathToLocalImage)" : function agregaImagenLocal(pathToLocalFile) { var canvas = document.getElementById('canvasOculto'); var imagen = new Image(150,100); canvas.width = imagen.width; canvas.height = imagen.height; var contextoCanvas = canvas.getContext('2d'); imagen.onload = function () { contextoCanvas.drawImage(imagen, 0, 0); urlImagenLocal = canvas.toDataURL(); } imagen.src = pathToLocalFile; return urlImagenLocal //??????? } I was doing this without the "onload" event, so it returned a blank image. But with this function inside the "onload" I don't know how to return the base64 encoded image to the first function.
has comment: http://stackoverflow.com/comment/44564206
tagged with: android
tagged with: css
has title: Javascript - Cordova - Android - Return base64 encoded canvas drawn with local image file
has answer: http://stackoverflow.com/a/28094349
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28094349
type: Question
has comment: http://stackoverflow.com/comment/44564437
tagged with: javascript
has comment: http://stackoverflow.com/comment/44564247
score: 0

http://stackoverflow.com/a/28105241
has comment: http://stackoverflow.com/comment/44585110
has body: The reason all array object are reference type so point to only one instance. Try using constructor function like this. var template = function(portno, stf){ this.portNumber = portno; this.stuff = stf; } myfunc(template, 3); function myfunc(template, count) { var ports = {} for (var i = 0; i &lt; count; i++) { var portNumber = i + 1; ports[portNumber.toString()] = new template(portNumber , template.stuff); } console.debug(JSON.stringify(ports, null, 4)); return ports; }
upvote count: 3
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/28105132
type: Answer

http://stackoverflow.com/comment/44415056
has text: Regarding binding support if I add data-binding to the template via . How do I tell my model about the 'whereDidYouMeet'property
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28013803

http://stackoverflow.com/a/28071924
answers question: http://stackoverflow.com/q/28071716
score: 0
type: Answer
has body: Take a look at post Font size description

http://stackoverflow.com/comment/44571837
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28094349
has text: In the code above (your second block of code), Is there a missing parenthesis? (the one that closes the convertImgToBase64 function... ?)
type: AnswerComment

http://stackoverflow.com/a/28098267
score: 0
has comment: http://stackoverflow.com/comment/44572757
type: Answer
has body: If you are really bothered by it ...generate full strings instead which actually results in less function calls and less appends to the DOM which are expensive var htm = ''; for(var x=0; x&lt;3; x++) { htm+= "&lt;div&gt;" + x + "&lt;/div&gt;\n"; } $("#parent").append(htm);// only one append You could even add \t for tabbing.
answers question: http://stackoverflow.com/q/28098009

http://stackoverflow.com/comment/44375356
has text: @dandavis: The actual solution is a bit more... focused than that.
type: Comment
comment on: http://stackoverflow.com/q/27992204
type: QuestionComment
score: 1

http://stackoverflow.com/comment/44505168
type: Comment
type: QuestionComment
has text: This does not allow `app/tests` or `app/views/.mapdata.coffee`, but would allow `app/anything/views/.mapdata.coffee`. Is that what you intend?
score: 0
comment on: http://stackoverflow.com/q/28061988

http://stackoverflow.com/comment/44582551
has text: @Shiladittya If you are responding to a particular user, you must use the "@username" format, otherwise the user will not be notified of your comment.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28084906
score: 0

http://stackoverflow.com/comment/44536970
comment on: http://stackoverflow.com/a/28078867
score: 0
type: AnswerComment
has text: @WIlhelmKlopp that broke the "ticking" of the clock.
type: Comment

http://stackoverflow.com/comment/44607494
type: QuestionComment
score: 0
has text: Maybe I should just correct my comment. You should't do such things. It just makes your code less maintainable. I know that it works that way, but in a more complex project this could cause you some trouble.
comment on: http://stackoverflow.com/q/28092883
type: Comment

http://stackoverflow.com/comment/44398525
type: Comment
type: QuestionComment
has text: Convert them to UNIX timestamp and then compare
score: 2
comment on: http://stackoverflow.com/q/28005066

http://stackoverflow.com/q/28036676
has answer: http://stackoverflow.com/a/28041472
has answer: http://stackoverflow.com/a/28036745
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/28036742
has title: Avoid horizontal scrolling to position absolute div to the right with CSS
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
score: 2
upvote count: 2
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28036742
has answer: http://stackoverflow.com/a/28036752
has body: I'm putting a div with CSS absolute position, hidden on the right of the HTML document and shows me a horizontal scroll, and I can avoid this? Here's an example: http://jsfiddle.net/milindex/3pettu8m/1/ $("#open").click(function(e) { e.preventDefault(); $("#menu").toggleClass("show"); }); #menu { position: absolute; background-color: #222; z-index: 10; width: 280px; color: #bbb; top: 0; -webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; transition: all 0.3s ease; opacity: 1; } .right { right: -280px; } .show { right: 0; } #showmenu { margin-left: 100%; position: absolute; top: 0; padding: 6px 10px 7px 10px; font-size: 1.3em; color: #FFCC33; -webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; transition: all 0.3s ease; } Open Main Item 1 Item 2 Item 3 Item 4
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28036745

http://stackoverflow.com/a/28254287
answers question: http://stackoverflow.com/q/28077239
has body: For social sharing, you will need to encode the entirety of your maps configuration into the querystring. A mediocre version might look something like: location.hash = '#' + JSON.stringify({ m:markers, i:infoWindows }); However, this would never work for Twitter given the imposed URL length restrictions. You could use a URL shortening service to shorten the ugly JSON URLs. Or, use a decent querystring builder, there are a multitude available on GitHub. // at some point restore from the hash: function restore() { var hash = location.hash.substring(1), json = hash &amp;&amp; JSON.parse(hash); // do what you gotta do. json.m.forEach(addMarker); json.w.forEach(addWindow); } restore(); // on DOMContentLoaded or whatever function share(markers, windows) { var url = location.href.replace(/#.*$/,'') + '#'; // swap this for something less terrible: url += JSON.stringify({ m:markers, w:infoWindows }); shorten(url, function(short) { window.open('//www.twitter.com/share?url=' + encodeURIComponent(short)); }); } function shorten(url, callback) { // use what you know. example is http://github.com/synacorinc/jan http.get('https://api-ssl.bitly.com/v3/shorten?access_token=ACCESS_TOKEN'+ '&amp;format=txt&amp;longUrl='+encodeURIComponent(url), function(err, res, body) { callback(body); } }); }
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44922302
type: Answer
accepted answer of: http://stackoverflow.com/q/28077239
score: 3
upvote count: 3

http://stackoverflow.com/comment/44444104
comment on: http://stackoverflow.com/q/28029294
score: 0
type: Comment
type: QuestionComment
has text: yes, I added the header and changed the application/json as well and still the same problem

http://stackoverflow.com/comment/44438120
has text: No need for the parseInt
type: Comment
comment on: http://stackoverflow.com/a/28026448
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44430173
score: 0
has text: data.php is in the same folder. data.php works at the end. it shows data from textarea, and saves it in data.txt
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28022055

http://stackoverflow.com/comment/44467947
comment on: http://stackoverflow.com/a/28041694
score: 0
type: AnswerComment
has text: How have you configured splash within your project?
type: Comment

http://stackoverflow.com/q/28093902
has answer: http://stackoverflow.com/a/28094007
type: Question
linked to: http://stackoverflow.com/q/9755911
tagged with: javascript
tagged with: date
has answer: http://stackoverflow.com/a/28095952
has answer: http://stackoverflow.com/a/71829484
has body: I have already tried out this question but it didn't solve my question. I have a PHP server which sends a date via JSON to the user where it is then processed by Javascript: PHP: 'date' =&gt; date('D M d Y H:i:s O', strtotime($array['Time'])) Javascript var time = new Date(data.date).toLocaleString() But instead of getting 18. January 2015 ..., I get 3. March 5877521 -596:-31:-23 GMT+0:53:28. What is wrong there? Some things you might need to know: The server has the central european timezone as well as the date sent. I am trying (above is only an example) to internationalize the date with javascript.
has comment: http://stackoverflow.com/comment/44564015
score: 0
answer count: 3
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has title: Send date from PHP to Javascript
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/44564017

http://stackoverflow.com/a/27991152
has comment: http://stackoverflow.com/comment/58236129
has comment: http://stackoverflow.com/comment/44373232
downvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/44373095
has comment: http://stackoverflow.com/comment/44373189
has body: You should use Meteor.userId() instead.
upvote count: 0
score: -5
answers question: http://stackoverflow.com/q/27991128

http://stackoverflow.com/a/28013386
has comment: http://stackoverflow.com/comment/44414019
has comment: http://stackoverflow.com/comment/44415413
score: 4
has comment: http://stackoverflow.com/comment/44413985
has comment: http://stackoverflow.com/comment/44416396
answers question: http://stackoverflow.com/q/28013368
has body: It is JSLint error not JS error. In your case it considers that ternary operators should been used only for assignment such as var foo = bar ? 2 : 3; since there is no assignmet JSLint consider that string useless. Change it to if-else block or use JSHint with proper settings instead.
type: Answer
has comment: http://stackoverflow.com/comment/44414352
has comment: http://stackoverflow.com/comment/44415449
upvote count: 4
has comment: http://stackoverflow.com/comment/44414175
downvote count: 0
has comment: http://stackoverflow.com/comment/44414120

http://stackoverflow.com/comment/44370430
has text: It's a bit more complicated than that. ToPrimitive accepts a hint which should indicate whether the object should be converted to a number or string. If no hint is provided, the default is "string" for Date objects and "number" for all other objects. In case of "number", the `valueOf` method of that object is called. **However** if that method does *not return* a primitive value, it falls back to `toString`. And by default, `valueOf` simply returns the object itself, so it's not a primitive.
type: Comment
comment on: http://stackoverflow.com/a/27989332
score: 1
type: AnswerComment

http://stackoverflow.com/comment/44335785
type: QuestionComment
comment on: http://stackoverflow.com/q/27971236
score: 0
has text: Also, use the `for` attribute of a label to "assign" it to the radio button.
type: Comment

http://stackoverflow.com/comment/44496504
type: QuestionComment
has text: not sure if in the same way, but the values vary from iOS to android as well...
comment on: http://stackoverflow.com/q/28057199
score: 0
type: Comment

underscore.js
tags question: http://stackoverflow.com/q/28021607
tags question: http://stackoverflow.com/q/27995299
type: Tag
tags question: http://stackoverflow.com/q/28036967
tags question: http://stackoverflow.com/q/27996620
tags question: http://stackoverflow.com/q/28101528
tags question: http://stackoverflow.com/q/27992813
tag name: underscore.js
tags question: http://stackoverflow.com/q/28010866
tags question: http://stackoverflow.com/q/28030113
tags question: http://stackoverflow.com/q/27976268
tags question: http://stackoverflow.com/q/28070911
tags question: http://stackoverflow.com/q/28049881
tags question: http://stackoverflow.com/q/27983468
tags question: http://stackoverflow.com/q/28092885
tags question: http://stackoverflow.com/q/28007398
tags question: http://stackoverflow.com/q/28120453

http://stackoverflow.com/a/27991482
has body: I modified you function a bit. This is not tested. Hope it helps... function formCheck(sender,args) { //Getting the Email field value &amp; text. var l_Email = $find("&lt;%=AlertMissedEmail.ClientID %&gt;").get_value(); var l_EmailText = $find("&lt;%=AlertMissedEmail.ClientID %&gt;").get_textBoxValue(); //Setting up the Reg expression for email. var reg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; var hasInvalidMail = false; if (l_EmailText.length &lt; 7) { // valid email to have 7 chars at least return false; } //split emails if there is ; var emails = []; if(l_EmailText.indexOf(';') &gt;= 0) { emails = l_EmailText.split(';'); } else { emails[0] = l_EmailText; } //loop all emails for(var i=0; i&lt;emails.length;i++) { if (!reg.test(l_Email)) { //stop checking if we find error hasInvalidMail = true; break; } } return hasInvalidMail; } You can make some enhancement to return only the valid emails
type: Answer
has comment: http://stackoverflow.com/comment/44374134
has comment: http://stackoverflow.com/comment/44377499
accepted answer of: http://stackoverflow.com/q/27991224
answers question: http://stackoverflow.com/q/27991224
score: 0
type: AcceptedAnswer

.net
tags question: http://stackoverflow.com/q/28011099
tags question: http://stackoverflow.com/q/28084053
tag name: .net
tags question: http://stackoverflow.com/q/28080957
type: Tag
tags question: http://stackoverflow.com/q/27965908
tags question: http://stackoverflow.com/q/28024240
tags question: http://stackoverflow.com/q/28066979
tags question: http://stackoverflow.com/q/28096271
tags question: http://stackoverflow.com/q/28117094
tags question: http://stackoverflow.com/q/28096098
tags question: http://stackoverflow.com/q/28021386

http://stackoverflow.com/comment/44443739
type: QuestionComment
comment on: http://stackoverflow.com/q/28029398
score: 3
has text: You ordered a pizza online for delivery. You eat the pizza before it gets to your house. Surprise, there is no pizza to eat!
type: Comment

http://stackoverflow.com/comment/44350042
type: Comment
has text: This might clear the content of a hidden cell, but the cell will still be in the table, won't it? It's also a bit hit and miss, as cells with `visibility:hidden` or `opacity:0` will not be cleared as they aren't selected by `:hidden`.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27979112

http://stackoverflow.com/a/27988529
answers question: http://stackoverflow.com/q/27987806
type: Answer
upvote count: 0
score: -1
has body: As one of the other posters has mentioned, you need to add JQuery to your project. First, create a folder called "jquery" inside your web-page's directory. Then download the latest JQuery js file and save it inside your the "jquery" directory. The latest JQuery (accurate at the time of posting this comment) is here. http://code.jquery.com/jquery-2.1.3.min.js After that, add this code to where the other links are: &lt;link href="jquery/jquery-2.1.3.min.js" rel="stylesheet"&gt; Then adjust your href as necessary depending on whether your web-page is in the root directory or one of the sub-directories for your site.
has comment: http://stackoverflow.com/comment/44368537
has comment: http://stackoverflow.com/comment/44368337
downvote count: 1

http://stackoverflow.com/comment/44377027
type: QuestionComment
score: 8
comment on: http://stackoverflow.com/q/27993134
has text: Because there is no 31th day of February. The 31st day after the beginning of February is the 3rd of March (depends on year leapness). (Try entering the fiftieth of February, and see if it lands mid-April).
type: Comment

http://stackoverflow.com/a/28030255
type: Answer
has body: Whenever I need to execute JS from a Gridview I try to avoid using asp controls like LinkButton as they tend to cause a postback which you then need to prevent, which can be done, but I find it far easier to just embed a basic html button or img tag with an onclick set for your JS. No postback and no extra code to prevent a postback. <asp:TemplateField> <asp:Label ID="Label1" runat="server" Text='<%# Eval("CategoryName")%>'></asp:Label> Button Text </asp:TemplateField> Then in the OnRowDatabound event you do the following because runat="server" has been set: dim btn as HtmlButton = e.Row.FindControl("LinkButton1") dim div as HtmlContainer = e.Row.FindControl("Shoow") dim js as String = String.Format("toggleDiv('#{0}')", div.UniqueID) btn.Attributes.Add("onclick", js) and the JS: function toggleDiv(divId) { $(divId).toggle('slow'); }
answers question: http://stackoverflow.com/q/28025218
score: 0

http://stackoverflow.com/q/28113430
tagged with: javascript
tagged with: express
tagged with: ejs
answer count: 2
has body: I am going to use a default template called layout.ejs, and this is the code in the file: &lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;%- body %&gt; &lt;/body&gt; &lt;/html&gt; Now i am trying to bind this file with my new.ejs, that is inside my event folder: &lt;% if (parseInt(page['prevPage'].charAt(0)) === 0) { %&gt; &lt;a type="button" class="btn btn-default" href="/admin/bookings/&lt;%= page.nextPage %&gt;"&gt;Próximo &amp;gt;&lt;/a&gt; &lt;% } else { %&gt; &lt;a type="button" class="btn btn-default" href="/admin/bookings/&lt;%= page.prevPage %&gt;"&gt;&amp;lt; Anterior&lt;/a&gt; &lt;a type="button" class="btn btn-default" href="/admin/bookings/&lt;%= page.nextPage %&gt;"&gt;Próximo &amp;gt;&lt;/a&gt; &lt;% } %&gt; The templating engine is not working, is not binding the two files. i need some extra configuration in express to do that? I am using express 4.* Thanks.
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/55393816
accepted answer: http://stackoverflow.com/a/28114198
has comment: http://stackoverflow.com/comment/44600995
has title: ejs <%- body %> not working
upvote count: 1
tagged with: node.js
has comment: http://stackoverflow.com/comment/44601347
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28114198
score: 1
has comment: http://stackoverflow.com/comment/44601199
type: Question
has answer: http://stackoverflow.com/a/55393816

angularjs-directive
tags question: http://stackoverflow.com/q/28067961
tags question: http://stackoverflow.com/q/28117418
tag name: angularjs-directive
tags question: http://stackoverflow.com/q/28005920
tags question: http://stackoverflow.com/q/28008605
tags question: http://stackoverflow.com/q/28121789
tags question: http://stackoverflow.com/q/28109773
tags question: http://stackoverflow.com/q/28062050
tags question: http://stackoverflow.com/q/28016476
tags question: http://stackoverflow.com/q/28080085
tags question: http://stackoverflow.com/q/27964253
tags question: http://stackoverflow.com/q/28056177
tags question: http://stackoverflow.com/q/28102391
tags question: http://stackoverflow.com/q/28021905
tags question: http://stackoverflow.com/q/28012172
tags question: http://stackoverflow.com/q/27989493
tags question: http://stackoverflow.com/q/28116680
tags question: http://stackoverflow.com/q/27969325
tags question: http://stackoverflow.com/q/27983560
tags question: http://stackoverflow.com/q/28058400
tags question: http://stackoverflow.com/q/27974576
tags question: http://stackoverflow.com/q/27974428
tags question: http://stackoverflow.com/q/27970971
tags question: http://stackoverflow.com/q/28049060
tags question: http://stackoverflow.com/q/28008385
tags question: http://stackoverflow.com/q/28087699
tags question: http://stackoverflow.com/q/28080612
tags question: http://stackoverflow.com/q/27988502
tags question: http://stackoverflow.com/q/28038881
tags question: http://stackoverflow.com/q/28033899
tags question: http://stackoverflow.com/q/28013227
tags question: http://stackoverflow.com/q/28023660
tags question: http://stackoverflow.com/q/28079257
tags question: http://stackoverflow.com/q/28117411
tags question: http://stackoverflow.com/q/28097829
tags question: http://stackoverflow.com/q/28105796
tags question: http://stackoverflow.com/q/27974437
tags question: http://stackoverflow.com/q/28076442
tags question: http://stackoverflow.com/q/28107624
tags question: http://stackoverflow.com/q/28066459
tags question: http://stackoverflow.com/q/28060503
type: Tag
tags question: http://stackoverflow.com/q/27996468
tags question: http://stackoverflow.com/q/28097152
tags question: http://stackoverflow.com/q/28021748
tags question: http://stackoverflow.com/q/28088265
tags question: http://stackoverflow.com/q/28103165
tags question: http://stackoverflow.com/q/27984403
tags question: http://stackoverflow.com/q/28034294
tags question: http://stackoverflow.com/q/28106060
tags question: http://stackoverflow.com/q/27992470
tags question: http://stackoverflow.com/q/28058702
tags question: http://stackoverflow.com/q/28045436
tags question: http://stackoverflow.com/q/27973927
tags question: http://stackoverflow.com/q/28102503
tags question: http://stackoverflow.com/q/28041649
tags question: http://stackoverflow.com/q/28063107
tags question: http://stackoverflow.com/q/28019280
tags question: http://stackoverflow.com/q/28035553
tags question: http://stackoverflow.com/q/27971147
tags question: http://stackoverflow.com/q/27982935
tags question: http://stackoverflow.com/q/28118518
tags question: http://stackoverflow.com/q/27970543

http://stackoverflow.com/comment/44466024
type: AnswerComment
has text: In project manifest file make the activity exported. Like, ex...<activity android:name=".view.MainActivity" android:label="@string/app_name" android:exported="true" >
type: Comment
comment on: http://stackoverflow.com/a/28041191
score: 0

http://stackoverflow.com/a/28017003
accepted answer of: http://stackoverflow.com/q/28016196
has comment: http://stackoverflow.com/comment/44422630
answers question: http://stackoverflow.com/q/28016196
has comment: http://stackoverflow.com/comment/44439125
has comment: http://stackoverflow.com/comment/44438879
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44438977
score: 0
has comment: http://stackoverflow.com/comment/44439176
type: Answer
has comment: http://stackoverflow.com/comment/44439346
has comment: http://stackoverflow.com/comment/44428568
has body: Have you included in the header the bootstrap.js script file? The main reason why it won't work is because you either haven't included it, or you miss-typed something. Can you show us what scripts you have included? And also, please run the page on Mozilla (if possible), open the console and post the screenshot here. We will be able to see if there is any javascript problem. EDIT: (based on OP first comment) As far as I can see, you have included &lt;script src="Scripts/jquery-1.9.1.js"&gt;&lt;/script&gt;, but have not included the bootstrap.js file. Include it like this: &lt;script src="Scripts/bootstrap.js"&gt;&lt;/script&gt; and it should be working. (of course, if the bootstrap.js is located in the Scripts folder. If it is in another folder, change the path properly.) If this won't work again, do a screen shot from the Mozilla console only, and show us what is going on there. EDIT 2: (based on OP first comment) Also, remove one of these two: &lt;link href="Content/bootstrap.min.css" rel="stylesheet" /&gt; &lt;link href="Content/bootstrap.css" rel="stylesheet" /&gt; You either want to use the bootstrap.min.css which is minified and for huge css files is better to use min version so it won't create a lot of trafic, or you will use the non-minified version i.e. bootstrap.css.
has comment: http://stackoverflow.com/comment/44481281

http://stackoverflow.com/q/27969017
has comment: http://stackoverflow.com/comment/44507992
has comment: http://stackoverflow.com/comment/44431229
favorite count: 0
has comment: http://stackoverflow.com/comment/44556569
accepted answer: http://stackoverflow.com/a/28721291
upvote count: 2
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/44470794
has comment: http://stackoverflow.com/comment/44439823
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44431872
has answer: http://stackoverflow.com/a/28721291
has comment: http://stackoverflow.com/comment/44444717
score: 1
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/44558071
has title: Manual page refresh required to show user's name as logged in
downvote count: 1
has body: I have a website running on Apache/2.4.7 (Ubuntu) server without any errors, I installed on it a PHP script that use CodeIgniter 2.1.4 and Bootstrap. At the top of the page, the login box works as modal popup but when someone attempts to sign in, the script reloads the page but doesn't show the user's name logged in. Only after a manual refresh of the page can the user see their name. I've been trying to search for a solution for more than a month, including doing a new fresh install of both server and script, changing the .htaccess file, stopping memcached, etc. I contacted both the owner of the script and CodeIgniter support, they told me that is probably an overload Ajax issue. Since my script is mostly Ajax and it works fine except the login, is it possible to do the login in a different way? How could I integrate the script properly? This is my login function (assets/js/custom.js): function login() { var email = $('#loginForm [name="email"]').val(); var pwd1 = $('#loginForm [name="password1"]').val(); if (isEmpty(pwd1) || isEmpty(email)) { alert(msg_required_fields); return false; } $.post(base_url + 'main/login', { "email": email, "pwd1": pwd1 }, function(data, textStatus, xhr) { if (data.error == 1) { alert(data.msg); } if (data.error == 0) { document.location = base_url + 'main/reload'; } }, "json"); } UPDATE I have the same problem also for the logout function: function logout() { $this-&gt;admin-&gt;deleteTable('online',array('iduser' =&gt; $this-&gt;session-&gt;userdata('id'))); $this-&gt;session-&gt;unset_userdata('id'); $this-&gt;session-&gt;sess_destroy(); if( $this-&gt;session-&gt;userdata('facebook') == '1') redirect(base_url(),"main/facebook/logout"); else redirect(base_url()."main/reload","refresh"); }
has comment: http://stackoverflow.com/comment/44452594
type: Question
has comment: http://stackoverflow.com/comment/44557958
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/2652816
has comment: http://stackoverflow.com/comment/44485035
answer count: 1
has comment: http://stackoverflow.com/comment/44437117
has comment: http://stackoverflow.com/comment/44550528
has comment: http://stackoverflow.com/comment/44478451

http://stackoverflow.com/q/28015393
tagged with: data-visualization
has title: How to fix viz that is getting out of sync when I change browser tabs?
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/28016380
upvote count: 1
type: Question
has body: I'm using this jsFiddle as a template, and I've noticed that when I change browser tabs and change back, the graph gets out of sync (the colored lines don't move but the x-axis shifts). What can I add in d3 that will shift both the viz's lines AND time axis when I change browser tabs then change back to the viz tab? Full code below: Live Pressure Data
downvote count: 0
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/28016380
favorite count: 0
tagged with: d3.js

http://stackoverflow.com/q/28049574
accepted answer: http://stackoverflow.com/a/28051769
type: AnsweredQuestion
tagged with: javascript
has body: I am having trouble binding one selectbox to another. I would like for the options in one selectbox to depend on what is selected in the other. In this situation I would like to for the content of the second selectbox to populate according to what is selected in the first. I'm pretty new to Ember so I am looking for some guidance on what approach to take. I have tried using computed properties, but that wasn't successful. Do I need to use an observer to monitor for changes in the first select box? view #Lookup Controller App.LookupController = Ember.ObjectController.extend({ content:[ { name: "Customers", fields:["first_name", "last_name", "address", "email"] }, { name: "Products", fields:["sku", "name"] }, { name:"Sales", fields:["product_sku", "sales_rep", "customer_id", "transaction_id", "date"] } ], lookupDE:"Sales", adjustFilter: function(){ var myContent = this.get("content"); for(i=0; i<myContent.length; i++){ if(myContent[i].name == this.lookupDE){ return myContent[i].fields; } } console.log(this.lookupDE); // console.log(this.names[i].name); //return ["first_name", "last_name", "address", "email"]; }.property(), actions: { formString: function(){ //console.log(this.lookupDE); var outputString = '%%[Lookup("'+this.lookupDE+'")]%%'; $("#output").text(outputString); } }, });
type: Question
tagged with: ember.js
answer count: 1
has title: contentBinding two selectboxes in Ember
score: 0
has answer: http://stackoverflow.com/a/28051769

http://stackoverflow.com/comment/44499615
comment on: http://stackoverflow.com/q/28059008
score: 0
has text: added my div-html code and the problem is: value from button does not accept imageId value when children is change to it
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28096253
has body: I'm building a hobby/hack project which needs to cross-reference a users' GMC number with a publicly available source of numbers at http://webcache.gmc-uk.org/gmclrmp_enu/start.swe The actions need to do the following: 1. Take the number submitted by the user in the application 2. Open http://webcache.gmc-uk.org/gmclrmp_enu/start.swe 3. Post in the number into the GMC Reference Number field 4. Submit the search 5. Retrieve the result and cross reference it with the user details added to ensure they are correct GMC-UK seem to do everything possible to avoid non-human queries to the data. The form isn't declared as a form and the submit button is in JavaScript, referencing a separate applet which in turn hides as much info as possible. We've tried using Mechanize but it doesn't support JavaScript. Import.io was another option, but again no support. If someone can physically open the page, enter and submit the info then there must be a way of doing this automatically, even if it is tough. Any ideas?
has comment: http://stackoverflow.com/comment/44615695
tagged with: ruby
tagged with: mechanize
answer count: 2
has answer: http://stackoverflow.com/a/28107370
accepted answer: http://stackoverflow.com/a/28373604
has comment: http://stackoverflow.com/comment/44572712
has comment: http://stackoverflow.com/comment/44577549
tagged with: rubygems
score: 0
has comment: http://stackoverflow.com/comment/44598575
possible better answer: http://stackoverflow.com/a/28107370
tagged with: javascript
has answer: http://stackoverflow.com/a/28373604
type: Question
type: AnsweredQuestion
has title: Automated filling in, submission and review of response of javascript form in ruby

http://stackoverflow.com/comment/44451738
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28033246
has text: Note that you need to restart your apache server before the settings take effect (if you haven't)

http://stackoverflow.com/a/28063961
has body: You can do this using forEach: var data = [ {name : 'xxxx' , type: 'jpeg' , path: '../'}, {name : 'yyyy' , type: 'gif' , path: '../'}, {name : 'zzzz' , type: 'jpeg' , path: '../'} ]; var result = {}; data.forEach(function(elem){ result[elem.type] = result[elem.type] || []; result[elem.type].push(elem.path + elem.name + '.' + elem.type); }); Keep in mind that Array.prototype.forEach() can not be used in IE8 or lower, but the mdn page has some polyfills for that.
answers question: http://stackoverflow.com/q/28063766
type: Answer
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/44508822
upvote count: 0

http://stackoverflow.com/q/27985023
tagged with: coordinate-systems
has title: OpenLayers projection
downvote count: 0
has answer: http://stackoverflow.com/a/27988161
accepted answer: http://stackoverflow.com/a/27988161
tagged with: geojson
has body: I have a little problem with OpenLayers 3. I have the following script: var map = new ol.Map({ view : new ol.View({ center : [5.611155, 52.238879], projection : 'EPSG:4326', zoom : 8.5, minZoom : 8.5, maxZoom : 12.5 }), layers : [ new ol.layer.Tile({ source : new ol.source.OSM() }), ], target : 'map' }); This should, if I am not mistaken, show a map centred on a place in The Netherlands. But instead of showing a map, I only see blue. Even if I set the zoom to 1, there is no world to see. The problem doesn't seem to be there if I remove the projection attribute from the view. But then of course I should give all coordinates in another coordinate system, which is not possible because I depend on other systems as well. When I removed the projection attribute from the view attribute and loaded a GeoJSON file like this: new ol.layer.Vector({ source: new ol.source.GeoJSON({ projection: 'EPSG:4326', url: 'data/map.geojson' }) }) It should place a layer on top of The Netherlands, but instead the GeoJSON was shown somewhere in Africa. Can someone help me?
type: AnsweredQuestion
score: 1
tagged with: openlayers-3
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/44524424
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28072242
has text: You are invoking getMedia. it should be ' ' On the other hand, I don't see any invocation of the function inside the directives link function.

indexing
tags question: http://stackoverflow.com/q/28107475
tags question: http://stackoverflow.com/q/27974109
type: Tag
tag name: indexing

http://stackoverflow.com/comment/44364782
type: QuestionComment
score: 0
has text: `00000000001000` in JS is not ten minutes, the time unit is a millisecond. Also drop off the leading zeros, that number might be interpreted as an octal number.
comment on: http://stackoverflow.com/q/27986800
type: Comment

http://stackoverflow.com/comment/44445925
type: QuestionComment
score: 2
has text: Random guess : you're calling your collection constructor with your hash as argument, something like `new Yourcollection(hash)`
comment on: http://stackoverflow.com/q/28030317
type: Comment

http://stackoverflow.com/comment/44452502
type: Comment
comment on: http://stackoverflow.com/a/28033558
score: 0
type: AnswerComment
has text: His object model doesn't require recursion. It's only one level deep. The parentID decides where the element must go. You just need to traverse the array.

http://stackoverflow.com/q/28072771
upvote count: 0
tagged with: javascript
tagged with: eventhandler
favorite count: 0
has title: How to do form field repetition in JavaScript?
type: Question
tagged with: field
has body: I got a form with a list of games I'm asking people to add that they've played. It says "Add Game" with a hyperlink which has an event handler onClick which directs to a JavaScript function - it only does this once but I want it to do this as many times as the user decides to add games - without any limits - how can this be done? Here are the screen shot images followed by the code: http://i59.tinypic.com/16jk1nt.png http://i59.tinypic.com/2zzntoo.png Here's the JavaScript code for the above images: function addFields1(){ var container = document.getElementById("container1"); while (container.hasChildNodes()) { container.removeChild(container.lastChild); } container.appendChild(document.createTextNode("Add Game")); var input = document.createElement("input"); input.type = "text"; container.appendChild(input); container.appendChild(document.createElement("br")); } Here's the HTML form for the above JavaScript code: Add Game Add Game When I click the "Add Game" hyperlink, it enters a blank input box only once while I want it to enter it as many times as I keep on clicking the "Add Game" hyper link. Also, I would like the "Add Game" hyper link to replicate itself every time I click that link.
tagged with: input
score: -1
has answer: http://stackoverflow.com/a/28073198
answer count: 1
downvote count: 1
tagged with: hyperlink
type: UnansweredQuestion

http://stackoverflow.com/q/28014507
possible better answer: http://stackoverflow.com/a/28015334
has answer: http://stackoverflow.com/a/28030934
tagged with: javascript
has answer: http://stackoverflow.com/a/28015334
has comment: http://stackoverflow.com/comment/44418224
has title: HTML select permanent display value?
answer count: 2
has comment: http://stackoverflow.com/comment/44417310
favorite count: 0
accepted answer: http://stackoverflow.com/a/28030934
has comment: http://stackoverflow.com/comment/44418603
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44418075
tagged with: css
score: 0
upvote count: 1
has body: How would one make a drop down select box always show the same value, rather than the selected value? Example: Blue Red I would like the select box to always show "color" rather than "blue" or "red" when they are selected.
downvote count: 1
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/57799774
type: AnswerComment
score: 0
type: Comment
has text: Fortunately, I was able to fix this problem by myself a halfyear ago and my solution is almost the same as yours. So, I will not post answer and accept it but just accept yours.
comment on: http://stackoverflow.com/a/35037675

http://stackoverflow.com/comment/44572557
comment on: http://stackoverflow.com/a/28097957
score: 0
type: Comment
has text: mkay I'll make a plunkr for you... brb getting a red bull and snickers
type: AnswerComment

http://stackoverflow.com/a/28079261
type: Answer
has body: The way it works is not recommended, because your browser reloaded all content of your app and it breaks all concept of a Single Page Application. One of approaches is using ng-view/ui-view in your template (html file) and $location in your service/controller to replace the url address if user authentication was ok. Take a look in this plnkr with two examples that work: http://plnkr.co/edit/vPyH5lwbwYCMx6RCnVb0?p=preview
score: 0
answers question: http://stackoverflow.com/q/28054348

http://stackoverflow.com/comment/44504295
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28061578
score: 2
has text: possible duplicate of http://stackoverflow.com/questions/7321896/jquery-find-element-by-text

http://stackoverflow.com/a/28041778
answers question: http://stackoverflow.com/q/28041758
type: Answer
has comment: http://stackoverflow.com/comment/44469332
downvote count: 0
score: 1
type: AcceptedAnswer
upvote count: 1
has body: Remove the escape character. Leave everything else alone. "&lt;br&gt;"; If you are trying to write XHTML (which I wouldn't recommend as it is more trouble than it is worth, and if you are making this mistake then you won't be getting any benefit from it) then the syntax for an empty element is &lt;br /&gt; not &lt;br\&gt;.
accepted answer of: http://stackoverflow.com/q/28041758

http://stackoverflow.com/q/27979663
has title: Uncaught SyntaxError: Unexpected token ILLEGAL in dojo
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44350954
tagged with: dojo
type: Question
has body: I wrote a upload script using dojo and form: HTML &lt;form action="/Form/Upload" enctype="multipart/form-data" id="FormId" method="post"&gt; &lt;input id="..." name="..." type="file" onchange="UploadImage(this, FormId);" /&gt; &lt;/form&gt; Dojo require([ "dojo/dom-attr", "dojo/request/iframe"], function (domattr, iframe) { UploadFile = function (Uploader, form) { if (Uploader.value != "") { if (Uploader.files[0].size &lt; 50000000) { iframe(form.formAction, { form: form, handleAs: "text", timeout: 20000, method: "POST" }).then(function (name) { . . . }, function (err) { . . . }); } } }; }; For some reason I get an error Uncaught SyntaxError: Unexpected token ILLEGAL But this does not happen every time! After I refresh the page it sometimes works and some times gives an error. Then I run debugger in chrome it doesn't even get to dojo. It throws an error on the &lt;form&gt; row. (all the dots is a irrelevant code because it doesn't get to that point when the error is thrown but is works perfectly after I refresh the page)
tagged with: forms
linked to: http://stackoverflow.com/q/12719859
has comment: http://stackoverflow.com/comment/44351174
has answer: http://stackoverflow.com/a/27979713
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44361513
score: 0

http://stackoverflow.com/a/28047683
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44477524
has body: Your problem is here data: formData+serialForm,. FormData must be passed alone, if you want to add data to it use the constructor or append. function uploadImg($this, event){ var formData = new FormData($this[0]); //construct the form data with the form ... formData.append(imgUsage+'_upload_input', file); formData.append('img-usage', imgUsage); ... data: formData, //just pass the formdata object
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44477920
accepted answer of: http://stackoverflow.com/q/28047234
type: Answer
answers question: http://stackoverflow.com/q/28047234

http://stackoverflow.com/a/28088692
type: Answer
has body: Another way, without Jquery: var arrayString = int_array.join(); var str_array = arrayString.split(",");
has comment: http://stackoverflow.com/comment/44554087
upvote count: 1
has comment: http://stackoverflow.com/comment/44554120
answers question: http://stackoverflow.com/q/28088559
score: 1
downvote count: 0

http://stackoverflow.com/a/27965242
score: 5
type: Answer
answers question: http://stackoverflow.com/q/27965161
type: AcceptedAnswer
upvote count: 5
downvote count: 0
has body: It is a meaningless operation, multiplying by 1 doesn't do anything. Just use width.
accepted answer of: http://stackoverflow.com/q/27965161

http://stackoverflow.com/q/28044705
has answer: http://stackoverflow.com/a/28045258
has answer: http://stackoverflow.com/a/28045074
tagged with: jquery
favorite count: 0
has title: multiple Buttons opens up same action but different ID container
has body: I have multiple Buttons (12 at the moment), all have the same id with following letter. each btn fire up a same function but different ID container. here is the HTML: this is content A!!!! close this is content B!!!! close this is content C!!!! close I have a code that working but it contains more than 500 lines... here is the JS: $(document).ready(function () { $("#projectA").on("click", function () { $(".content_projectA").slideDown(); $('html,body').animate({ scrollTop: 300 }, 200); }); $("#closeA").on("click", function () { $(".content_projectA").hide(); $('html,body').animate({ scrollTop: 200 }, 400); }); }); //---- B -------// $(document).ready(function () { $("#projectB").on("click", function () { $(".content_projectB").slideDown(); $('html,body').animate({ scrollTop: 300 }, 200); }); $("#closeB").on("click", function () { $(".content_projectB").hide(); $('html,body').animate({ scrollTop: 200 }, 400); }); }); //---- C -------// $(document).ready(function () { $("#projectC").on("click", function () { $(".content_projectC").slideDown(); $('html,body').animate({ scrollTop: 300 }, 200); }); $("#closeC").on("click", function () { $(".content_projectC").hide(); $('html,body').animate({ scrollTop: 200 }, 400); }); }); I am looking for a way to short it up. here is the code on fiddle- http://jsfiddle.net/mirifarr/6j060L2k/ Many thanks
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28045269
answer count: 4
has answer: http://stackoverflow.com/a/28046212
upvote count: 3
type: Question
score: 3
tagged with: javascript
downvote count: 0

http://stackoverflow.com/comment/44510721
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/28065163
has text: May I just ask, if the same behaviour happens when you try these in the svg directly? I mean `onmouseout="circle.animate(..."`

http://stackoverflow.com/a/27990813
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27990761
score: 1
has body: You should use CSS. For each level, you can create a different CSS class. Example: .level1 { background-color: red; } .level2 { background-color: blue; }

http://stackoverflow.com/q/28043447
tagged with: javascript
has comment: http://stackoverflow.com/comment/44470311
tagged with: ajax
has title: Is it possible to detect the finish of all asynchronous tasks on a web page?
has answer: http://stackoverflow.com/a/28043813
score: 0
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/44469950
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3709597
has comment: http://stackoverflow.com/comment/44470105
has comment: http://stackoverflow.com/comment/44469786
has answer: http://stackoverflow.com/a/28043706
has body: it's all in the title. I need to know when all asynchronous tasks are finished on my web page. Is it possible with a kind of custom listener or something?
type: Question
answer count: 2

http://stackoverflow.com/comment/52016287
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28079835
has text: @Triynko - `-webkit-` declaration is to support `-webkit-` browsers.

http://stackoverflow.com/q/28054220
score: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/28054333
tagged with: http://stackoverflow.com/tag/html
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28054383
accepted answer: http://stackoverflow.com/a/28054383
type: Question
has answer: http://stackoverflow.com/a/28054311
has body: I'm looking for a way to position the #header element of my page as "fixed" only after having scrolled for about 100% to the right. Here is the JSFiddle demo: http://jsfiddle.net/3zrw2xko/1/ Here is the JavaScript: var header = $("#header"); $(document).scroll(function() { if($(this).scrollLeft() &gt;= window.innerWidth) { header.css( { "display":"", "position" : "fixed", "top" : "0", "left" : "0", "width" : "50px", "height" : "50px", "background" : "red", "z-index" : "9999" } ); } else { header.css({"display" : "none"}); } }); But there's one last issue: when I refresh the page of my real project containing this script, the red square disappears and I have to scroll again. I think that this is about the use of window.innerWidth Because it takes the position calculated from the current position. The ideal solution would be to take the position calculated from the left of the document, and not from the left of the current window.
has title: Position of an element with Javascript after refresh
tagged with: javascript
linked to: http://stackoverflow.com/q/16206322
has answer: http://stackoverflow.com/a/28054466
possible better answer: http://stackoverflow.com/a/28054311

http://stackoverflow.com/a/28051698
has body: The server is also looking for an Accept header. So try adding something like 'Accept': 'text/html;q=0.9,*/*;q=0.8', to your headers object.
downvote count: 0
answers question: http://stackoverflow.com/q/28051353
type: Answer
accepted answer of: http://stackoverflow.com/q/28051353
score: 2
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/a/28069809
answers question: http://stackoverflow.com/q/28069574
score: 0
has body: You need to return the new sorted array produced by sort() and make sure the substrings are converted to numbers, so you can compare them correctly. Try this: function sortArray(){ return top10.sort(function(a, b){ var ax = Number(a.substr(7, 4)); var bx = Number(b.substr(7, 4)); return bx&gt;ax; }); }
type: Answer

http://stackoverflow.com/a/28106811
has body: You can use on() function to achieve event delegation. This way, you can select every dynamicaly added element with class .dynamic $(document).on('click', '.dynamic', function() { var that = $(this); that.css({'background-color': 'red'}); // do your stuff here .. });
score: 0
answers question: http://stackoverflow.com/q/28106778
has comment: http://stackoverflow.com/comment/44588039
type: Answer

http://stackoverflow.com/comment/44369270
has text: Not from within a browser. Client-side JavaScript can only use web-related standards like HTTP/Ajax and WebSockets. If you need raw TCP, you will need a server-side layer to create the TCP socket.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27989053
type: Comment

http://stackoverflow.com/a/28021589
type: Answer
has body: You could use a function: // This function accepts an array as a parameter function findInURL(arr) { for(var i = 0; i &lt; arr.length; i++) if(document.location.href.indexOf(arr[i]) &gt; -1) return 1; return 0; } And use it like: if(findInURL(['test/test/test1', 'test/test/test9', 'test/test/foo'])) document.location.href = 'http://www.test.com/thank-you';
answers question: http://stackoverflow.com/q/27991899
score: 0

http://stackoverflow.com/q/28104357
type: Question
has comment: http://stackoverflow.com/comment/44583499
has comment: http://stackoverflow.com/comment/44593756
has comment: http://stackoverflow.com/comment/44593860
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44588762
answer count: 1
has answer: http://stackoverflow.com/a/28126645
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44590589
has body: I want to use the content of a variable (containing string content of code), to be loaded in Node. Below is an example of target string, I want to load: var codeVar = "var _ = require('lodash');\n _.each(..."; I read about using Module in Node which does the require functionality behind the scenes. I can use the Module.wrap(&lt;var&gt;) successfully, but have no luck in getting the Module._load or Module._compile working. I need something like: var code = require(codeVar); Any ideas / pointers ??
has comment: http://stackoverflow.com/comment/44591172
tagged with: node.js
has title: Using `require` on the variable content (not filepath)?
has comment: http://stackoverflow.com/comment/44591068

http://stackoverflow.com/comment/44466891
type: AnswerComment
has text: Well Thanks but i would like to do that in Angular way
type: Comment
comment on: http://stackoverflow.com/a/28041754
score: 0

http://stackoverflow.com/comment/44443623
comment on: http://stackoverflow.com/q/28014583
score: 0
type: Comment
type: QuestionComment
has text: @Barmar Yes , I mean he should use variable correctly.

http://stackoverflow.com/comment/44548910
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28085107
has text: there are 2 sets of code.In which does your problem lie..??
score: 0

http://stackoverflow.com/comment/44442194
type: AnswerComment
type: Comment
has text: Hmm, don't know off the top of my head -- I would benchmark for the individual case. My gut feeling is that this would only become an issue once there are way too many transitions going on for humans to make sense of the whole thing.
comment on: http://stackoverflow.com/a/28028182
score: 0

http://stackoverflow.com/q/28001065
has body: Why is this form sending data twice? Also, the second time, the data is "undefined". The form: &lt;form action="/loginPage" method="POST" &gt; Username: &lt;input type="text" id="username"&gt; &lt;br&gt;&lt;br&gt; Password: &lt;input type="text" id="password"&gt; &lt;br&gt;&lt;br&gt; &lt;input type="submit" id="Login" value="Login" &gt; &lt;/form&gt; The client-side script: $(document).ready(function(){ $('form').submit(function(event){ //event.preventDefault(); This prevents from sending data twice, but then the page doesn't redirect to "Hi, &lt;username&gt;" $.post("/loginPage",{username: $("#username").val(),password: $("#password").val()}, function(data){ ; }); }); }); The server-side script: app.post('/loginPage', function(req, res) { var username = req.body.username; console.log("Now, "+username); res.send("Hi, "+username); //res.sendFile(__dirname + '/lobby.html'); }); This is the output I get when I run this code: Hi, Sho Hi, undefined I'm stuck at this one for the past whole day. Please help me.
tagged with: javascript
has title: Why is POST method sending form data twice to the server?
tagged with: express
accepted answer: http://stackoverflow.com/a/28001108
answer count: 3
possible better answer: http://stackoverflow.com/a/28001101
has answer: http://stackoverflow.com/a/28001101
tagged with: node.js
favorite count: 0
has answer: http://stackoverflow.com/a/57111412
upvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28001108
score: 1
downvote count: 0

http://stackoverflow.com/comment/44592443
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/69441/discussion-between-sajeetharan-and-ved).
comment on: http://stackoverflow.com/a/28109147
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28089796
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: string
has comment: http://stackoverflow.com/comment/44556153
favorite count: 0
has comment: http://stackoverflow.com/comment/44556405
tagged with: regex
has comment: http://stackoverflow.com/comment/44556169
has body: I have two links on page. I need jquery or pure JS script to do this on page load: Find this docs/ANY VALUE/ from first link and copy ANY VALUE to second link Link 1 Link 2
type: UnansweredQuestion
downvote count: 2
has title: Regex string that copy from one link to another
upvote count: 1
tagged with: hyperlink
score: -1
type: Question
has answer: http://stackoverflow.com/a/28090252
has comment: http://stackoverflow.com/comment/44556408

http://stackoverflow.com/a/28119755
answers question: http://stackoverflow.com/q/28119727
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44613860
score: 4
has body: for (var i = 1; i &lt; 10; i++) { var string_to_store = "string " + i; /* store string_to_store to localStorage */ }
type: Answer
has comment: http://stackoverflow.com/comment/44613892
accepted answer of: http://stackoverflow.com/q/28119727
has comment: http://stackoverflow.com/comment/44613844
upvote count: 4
has comment: http://stackoverflow.com/comment/44613932

http://stackoverflow.com/comment/44499353
score: 0
has text: http://stackoverflow.com/questions/6505033/leading-zero-in-javascript
type: Comment
comment on: http://stackoverflow.com/q/28058863
type: QuestionComment

http://stackoverflow.com/comment/44505192
comment on: http://stackoverflow.com/a/28062137
score: 0
type: AnswerComment
type: Comment
has text: That is the simplest way to connect these two scopes. You can use `ng-change` to call a function on the parent controller that broadcasts an event or something like that but it wouldn't be simpler.

http://stackoverflow.com/a/28111305
type: Answer
score: 6
type: AcceptedAnswer
downvote count: 0
upvote count: 6
answers question: http://stackoverflow.com/q/28111273
accepted answer of: http://stackoverflow.com/q/28111273
has body: Your selector is invalid try this:- $('.btn.btn-default').prop("disabled", "disabled");

http://stackoverflow.com/comment/60738249
comment on: http://stackoverflow.com/a/28052804
type: AnswerComment
has text: Just a side note: if you want to have 100% if you reached the bottom, use this line: `var wh = $(document).height() - $(window).height();` instead.
type: Comment
score: 2

http://stackoverflow.com/q/27965975
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/27966043
has body: I am using Deezer Javascript SDK and loaded it over https. &lt;script src="https://cdns-files.deezer.com/js/min/dz.js"&gt;&lt;/script&gt; But from today Chrome and Firefox has problem, because Deezer SDK loading some script over https and Chrome rejected as insecure content. Chrome console: Mixed Content: The page at 'https://....' was loaded over HTTPS, but requested an insecure script 'http://www.deezer.com/js_trad-v00340851.php?l=cs'. This request has been blocked; the content must be served over HTTPS. playerBB.php:1 Mixed Content: The page at 'https://....' was loaded over HTTPS, but requested an insecure script 'http://cdn-files.deezer.com/js/min/core-v00340851.js'. This request has been blocked; the content must be served over HTTPS. playerBB.php:1 Mixed Content: The page at '...' was loaded over HTTPS, but requested an insecure script 'http://cdn-files.deezer.com/js/min/live-v00340851.js'. This request has been blocked; the content must be served over HTTPS.
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/33250190
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: deezer
has title: Deezer content is served over HTTP

http://stackoverflow.com/q/28110638
has answer: http://stackoverflow.com/a/28114226
tagged with: angularjs
type: Question
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/44595839
has title: Angular directive to execute a function after HTML element has been loaded
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28114369
has body: There is the following code in some controller: angular.element(document.querySelector('#fileInput')).on('change', handleFileSelect) This code executes before "#fileInput" is loaded. I fixed it: $timeout(-&gt; angular.element(document.querySelector('#fileInput')).on('change', handleFileSelect) , 1000) But it isn't a good solution, because page loading may take more than 1000 milliseconds. How can I fix it? Thanks in advance!
downvote count: 0
score: 1
favorite count: 0

http://stackoverflow.com/comment/44614288
comment on: http://stackoverflow.com/q/28120023
type: Comment
type: QuestionComment
score: 0
has text: For example, should it add the new anchor tag to the div? And should new `` also be used for adding new anchors, and if so what is the purpose of using links in the first place?

http://stackoverflow.com/comment/44461667
comment on: http://stackoverflow.com/a/28008331
type: AnswerComment
score: 0
type: Comment
has text: @Acidic You really believe education is only about showing what's good?

http://stackoverflow.com/q/28058293
tagged with: playframework
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Play framework: update web page when a value is selected from drop down
has body: I am using play framework for the first time. I want to update the web page when a value is selected from drop down with out refreshing the web page. Consider the following example: &lt;select&gt; &lt;option value= "Apple"&gt; Apple &lt;/option&gt; &lt;option value = "Banana"&gt; Banana &lt;/option&gt; &lt;/select&gt; When a value is selected from drop down it should be posted to server. Then server should return some information based on the value it got. Now we should display the content corresponding to the value selected from drop down with out page refresh. I didn't find a way to implement this using play framework. Conventionally we can do this by hiding a div initially and when a value is selected from drop down we can add content (fetched from back end) to the div and show it. I didn't understand how to implement the server side part. In play framework, controller generally returns Result type. How to return a Json value on a request in play framework ? Can anyone please suggest other ideas ?? Thanks
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28059085
upvote count: 1
type: Question
score: 1
accepted answer: http://stackoverflow.com/a/28059085

http://stackoverflow.com/a/28066214
downvote count: 0
type: Answer
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/28066159
has body: Even if the AJAX succeeds, you are redirecting the browser to a different page after the first AJAX request: window.location = "api/home.php"; So I would suggest removing that.

http://stackoverflow.com/q/28045436
tagged with: angularjs
has body: I have an angular form which performs custom validation of all fields, anytime any form field changes. The validity of each value can change, based on the value of other values in the form, hence the validation of the entire form with each edit. The validation works correctly, but the form field being edited, loses focus every time the validation is performed (each key-press). I'm pretty sure this is down to a flaw in my validator implementation (which I copied off somewhere on the internet months ago and can no longer find). The problem occurs in Chrome, but not in IE9. Below is the implementation. Is there anything obvious I'm doing wrong here, that would cause the focus problems I'm getting? angular.module('myComponent').directive('myValidator', function (MyApiResource) { return { restrict: 'A', require: 'ngModel', link: function (scope, ele, attrs, ctrl) { function myValidator(value) { if (value) { var myObject = JSON.parse(JSON.stringify(scope.myObject)); myObject[attrs.name] = value; MyApiResource.validate(myObject, function (uiValidationFailures) { for (var attributeName in myObject) { if (scope.correctionForm[attributeName]) { var valid = !uiValidationFailures.filter(function (el) { return el.AttributeName === attributeName; }).length; scope.correctionForm[attributeName].$setValidity('myValidator', valid); if (valid &amp;&amp; attributeName !== attrs.name &amp;&amp; scope.correctionForm[attributeName].$pristine) { scope.correctionForm[attributeName].$setViewValue(myObject[attributeName]); } scope.uiValidationFailures[attributeName] = valid ? undefined : uiValidationFailures.filter(function (el) { return el.AttributeName === attributeName; }); } } return value; }); return value; } scope.uiValidationFailures[attrs.name] = undefined; return undefined; }; ctrl.$parsers.unshift(myValidator); ctrl.$formatters.unshift(myValidator); } } });
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28046112
has title: AngularJS custom validation against a resource
tagged with: angularjs-resource
type: Question
tagged with: angularjs-directive
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28046112
tagged with: validation
answer count: 1

http://stackoverflow.com/q/27995252
has comment: http://stackoverflow.com/comment/44494389
has comment: http://stackoverflow.com/comment/44381296
has comment: http://stackoverflow.com/comment/44381316
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/44381315
downvote count: 1
has body: I am making an async call from a webpage to another resource at a url like /example/url/here.html which contains a partial view and inserting the response into the innerHTML of a div on the first page. However, the partial view here.html might contain &lt;script&gt; references and some inline script that doesn't get loaded/run when inserting to innerHTML. I'm wondering if jQuery's load() function would solve this, and if so how to implement a similar function in javascript, as I cannot use jQuery. Here's the code I'm using that isn't working: function (elemId, url) { var successCallback = function (responseText) { var elem = document.getElementById(elemId); elem.innerHTML(responseText); }; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { successCallback(xmlhttp.responseText); } }; xmlhttp.open("GET", url, true); xmlhttp.send(); }
has comment: http://stackoverflow.com/comment/44381301
type: Question
score: 0
has comment: http://stackoverflow.com/comment/44381385
has answer: http://stackoverflow.com/a/27995409
has comment: http://stackoverflow.com/comment/44381159
has title: How to implement jQuery's load() function in Javascript?
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44418684
type: QuestionComment
has text: Yes; promises are the right way to do this. http://blog.slaks.net/2015-01-05/introducing-promises/
score: 0
comment on: http://stackoverflow.com/q/28014480
type: Comment

3d-model
type: Tag
tags question: http://stackoverflow.com/q/27968897
tag name: 3d-model

http://stackoverflow.com/a/28078119
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/28077989
accepted answer of: http://stackoverflow.com/q/28077989
type: AcceptedAnswer
downvote count: 0
has body: Yes, this can be done with Parse. You'll need to write your matching function as a background job in cloud code, and then you'll need to schedule the task in the dashboard. In terms of the flexibility in scheduling, it's not as flexible as cron but you can definitely run a task at the same time every day, or every x minutes/hours. Tasks can take 15 mins max to execute before they're killed, so depending on the size of your database or the complexity of your task, you may need to break it up into different tasks or make it resumable.
type: Answer
has comment: http://stackoverflow.com/comment/57908513

http://stackoverflow.com/q/28018196
has comment: http://stackoverflow.com/comment/44423878
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: Im using an iFrame for a WYSIWYG, and would like to add a button that will align all the content within the iFrame to the center. I tried adding "text-align:center;" on the class of the iFrame but that did nothing. How can I do this?
tagged with: css
has comment: http://stackoverflow.com/comment/44423637
has comment: http://stackoverflow.com/comment/44423623
type: UnansweredQuestion
tagged with: iframe
has answer: http://stackoverflow.com/a/28021745
has comment: http://stackoverflow.com/comment/44423541
has title: iFrame text alignment
has comment: http://stackoverflow.com/comment/44423430
has answer: http://stackoverflow.com/a/28024662
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/28053539
score: 0
has answer: http://stackoverflow.com/a/28053660
answer count: 1
tagged with: ajax
has comment: http://stackoverflow.com/comment/44488962
type: UnansweredQuestion
has title: Google Chart Doesn't Load
has comment: http://stackoverflow.com/comment/44488909
type: Question
tagged with: charts
tagged with: google-visualization
tagged with: javascript
tagged with: jquery
has body: I have a problem trying to add a Google chart to my project. The page don't load or loads a blank page. After trying to load it display the page correctly for a few seconds and after that the page goes blank and gets stuck. This my code: &lt;script type="text/javascript"&gt; // Load the Visualization API and the piechart package. google.load('visualization', '1.0', {'packages':['corechart','table']}); // Set a callback to run when the Google Visualization API is loaded. google.setOnLoadCallback(drawChart); // Callback that creates and populates a data table, // instantiates the pie chart, passes in the data and // draws it. function drawChart() { // Create the data table. var data = new google.visualization.DataTable(); data.addColumn('string', 'Topping'); data.addColumn('number', 'Slices'); data.addRows([ ['TEST 1', 3], ['TEST 2', 1], ['TEST 3', 1], ['TEST 4', 1], ['TEST 5', 2] ]); // Set chart options var options = {'title':'ACTIONS', 'width':400, 'height':300}; // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.PieChart(document.getElementById('chart_div')); chart.draw(data, options); } &lt;/script&gt; This is the div I add in the view of the app &lt;div id="chart_div" style="width:400; height:300"&gt;&lt;/div&gt;
has comment: http://stackoverflow.com/comment/44489061

http://stackoverflow.com/comment/44529821
has text: If you set the height of the 'result's' window to the height of the image, you will see the desired effect of the scroll. But if you set the results window to be larger than the image, you will see the scroll has a incrementing gap within in the gradient. Any ideas?
comment on: http://stackoverflow.com/q/28055092
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27993193
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27993147
has body: You should use self in the _.each callback to have the correct scope. _.each(this.model.toArray(), function(list, i){ self.$el.append(new ListView({model: list}).render().$el); });

http://stackoverflow.com/a/28075485
score: 0
type: Answer
has body: Your "Бесплатно!" text is not in an element by itself. It is under the li element, and removing that element would not be desirable I imagine. You could manipulate its innerHTML to remove that text. var li = document.querySelectorAll('li'); for (i = 0; i < li.length; i++) { li[i].innerHTML = li[i].innerHTML.replace("Бесплатно!", ""); } Мансуровский 5.00 из 5Рейтинг 5.00 из 5 Бесплатно! Сахара 5.00 из 5Рейтинг 5.00 из 5 Бесплатно! Южно-Султаевский 4.67 из 5Рейтинг 4.67 из 5 Бесплатно! Жельтау-5 4.50 из 5Рейтинг 4.50 из 5 Бесплатно! Камбулатовский 3.50 из 5Рейтинг 3.50 из 5 Бесплатно!
answers question: http://stackoverflow.com/q/28075131

http://stackoverflow.com/q/28120736
tagged with: javascript
favorite count: 0
answer count: 3
has title: What's the difference between $document and $window.document in Angular?
has answer: http://stackoverflow.com/a/28120861
score: 7
has answer: http://stackoverflow.com/a/28120797
tagged with: angularjs
has body: I tried the following code in JSBin, the first one could get the canvas object. However, the second one cannot. JSBin: http://jsbin.com/natavejasa/1/edit?html,js,output var canvas = $window.document.getElementById('myCanvas'); JSBin: http://jsbin.com/yareb/1/edit?html,js,output var canvas = $document.getElementById('myCanvas'); So I'm wondering what's the difference between $window.document and $document.
upvote count: 7
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/46593505
has answer: http://stackoverflow.com/a/46593505
accepted answer: http://stackoverflow.com/a/28120797
type: Question
tagged with: canvas
downvote count: 0

http://stackoverflow.com/q/28046572
type: AnsweredQuestion
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/28046617
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28046613
score: 0
has comment: http://stackoverflow.com/comment/44475788
has body: I want to know best way to check all the radio button groups are checked in a page. My code - &lt;div class="radioGroup"&gt; Question1 &lt;input type="radio" value="1" name="group1"/&gt;1 &lt;input type="radio" value="2" name="group1"/&gt;2 &lt;input type="radio" value="3" name="group1"/&gt;3 &lt;input type="radio" value="4" name="group1"/&gt;4 &lt;/div&gt; &lt;div class="radioGroup"&gt; Question2 &lt;input type="radio" value="1" name="group2"/&gt;1 &lt;input type="radio" value="2" name="group2"/&gt;2 &lt;input type="radio" value="3" name="group2"/&gt;3 &lt;input type="radio" value="4" name="group2"/&gt;4 &lt;/div&gt; &lt;div class="radioGroup"&gt; Question3 &lt;input type="radio" value="1" name="group3"/&gt;1 &lt;input type="radio" value="2" name="group3"/&gt;2 &lt;input type="radio" value="3" name="group3"/&gt;3 &lt;input type="radio" value="4" name="group3"/&gt;4 &lt;/div&gt; &lt;input type="button" value="check all radio Group selected" onclick="validate();"/&gt; and I wrote a javascript function which works fine but I want a good solution means single selector solution. function validate(){ var isNotSelected = false; $(".radioGroup").each(function(i,v){ var grpName = $(this).find("input:first").attr("name"); if($(this).find("[name='"+grpName+"']:checked").val() == undefined){ isNotSelected =true; } }); if(isNotSelected){ alert("not all checked"); } else{ alert("all checked"); } } Thanks in advance
possible better answer: http://stackoverflow.com/a/28046613
accepted answer: http://stackoverflow.com/a/28046617
has comment: http://stackoverflow.com/comment/44475918
has title: check all radio groups are checked

http://stackoverflow.com/q/28081356
type: Question
tagged with: commonjs
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28182961
tagged with: browserify
answer count: 1
has body: I'm trying to start using browserify in my project. I have bundled my js-script, and want to use vendor script in traditional way. But I've stuck some problem - there is a two instance of jQuery - one included with script tag - used by vendor scripts, and one exemplar to rule them all used for some script in bundle (that scripts can not be excluded).
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has title: Browserify: how to aviod two instance of jQuery?
score: 2

http://stackoverflow.com/comment/44580979
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28102839
has text: Oddly, it posts from the first page when i try this.
score: 0

http://stackoverflow.com/a/28031067
type: Answer
has body: var Component = React.createClass({ mixins: [React.addons.LinkedStateMixin], getInitialState: function() { return { message: 'Hello!', active: false }; }, inputClick : function(e) { console.log(e.target.value); }, toggleActive : function(e){ console.log('div state', this.state.active); var newState = !this.state.active; this.setState({active: newState}); }, render: function () { var cx = React.addons.classSet; var valueLink = this.linkState('message'); var classes = cx({ 'base-class': true, 'element-active': this.state.active }); return ( &lt;div&gt; &lt;input type="text" onClick={this.inputClick} defaultValue={valueLink.value} /&gt; &lt;div onClick={this.toggleActive} className={classes}&gt; {this.state.message} &lt;/div&gt; &lt;/div&gt; ); } }); React.render(&lt;Component /&gt;, document.body); http://jsfiddle.net/su8r5Lob/1/
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/27995199
has comment: http://stackoverflow.com/comment/44446829

http://stackoverflow.com/a/28065243
answers question: http://stackoverflow.com/q/28065173
score: 1
downvote count: 0
type: Answer
has body: $.ajax calls are async be default, your code 'DoSomething' is executing because the ajax call doesnt hault execution until it returns. Put your DoSomething() inside the ajax callback function DoSomething(url){ $.ajax({ type: "GET", url: url, success: function(data) { if(data.SessionExpired === true) alert('SessionExpired'); DoSomething(); else{ DoAnotherThing(); } } }); }
upvote count: 1

http://stackoverflow.com/comment/44391710
comment on: http://stackoverflow.com/a/28001232
type: Comment
has text: @LukeP I'll add that to the answer, but I don't see any problem with the comments. They might be useful to somebody someday.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44415214
type: Comment
has text: Sure...Put the above code in a function. Next create an array of {x:,y:,w:,h:,imageObject:new Image()} objects representing the clips you need. And then feed each object in the array into the function and assign each object's imageObject property as the image created in the function.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28004700

http://stackoverflow.com/comment/44531337
type: Comment
has text: For that purpose I use ClientIDMode="Static" on the ListBox1 and just added it on the lblLabel but without result. And your solution did nog make it work either. I guess it's the if.. statement?
comment on: http://stackoverflow.com/a/28075576
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44584546
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28084906
score: 0
has text: @WestLangley We can see the exact color using STEP file in windows software but when I read the stl file then I am not getting the exact color. I want to same color which is look like real component.

http://stackoverflow.com/a/28057979
downvote count: 0
answers question: http://stackoverflow.com/q/28057243
type: Answer
has body: function validate() { //Get the user input var hostnames = document.getElementById('yourtextarea').value; //Regex to validate hostname var re = new RegExp(/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$/); //Trim whitespace hostnames = hostnames.trim(); //Explode into an array hostnames = hostnames.split(","); //Loop through array &amp; test each hostname with regex var is_valid = true; for (var i=0; i &lt; hostnames.length; i++){ var hostname = hostnames[i].trim(); if (re.test(hostname)) { is_valid = true; //if valid, continue loop } else { is_valid = false; //if invalid, break loop and return false break; } } //end for loop return is_valid; } //end function validate() Matches every example you indicated except "dom-ain.it, domain.com, domain.eu.org.something" because "something" is not valid. JSFiddle: http://jsfiddle.net/nesutqjf/2/
upvote count: 1
score: 1

http://stackoverflow.com/comment/44465048
comment on: http://stackoverflow.com/q/28040692
type: QuestionComment
has text: ajax .....................
score: 0
type: Comment

http://stackoverflow.com/comment/44490471
comment on: http://stackoverflow.com/a/28054098
has text: I thought this worked as it I was not getting errors no matter how much I tried until I submitted the form correctly and then went back to the form page to enter in another selection and I am yet again able to submit errant data. :-(
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44550673
has text: This question appears to be off topic because OP is using a copy of the book that was sent through an XSS filter and had all the occurrences of `eval` stripped out.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28086264
type: Comment

http://stackoverflow.com/a/28084785
type: Answer
has body: Is this what you are looking for? Fiddle: Demo HTML &lt;input type="text" onkeypress = "return onlyDecimal(event,this)" onblur="validateValue(this)"/&gt; JS function onlyDecimal(event, elem) { var charCode = (event.which) ? event.which : event.keyCode; console.log(elem.value.indexOf(".")); if(elem.value.length&gt;=9) { validateValue(elem); return false; } if (elem.value.indexOf(".") &gt;= 0 &amp;&amp; elem.value.split(".").length - 1 &gt;= 0 &amp;&amp; charCode &gt; 31 &amp;&amp; (charCode &lt; 48 || charCode &gt; 57)) { return false; } if ((charCode == 190 || charCode == 110 || charCode == 46) &amp;&amp; elem.value.length&gt;=5) //for '.' return true; if (charCode &gt; 31 &amp;&amp; (charCode &lt; 48 || charCode &gt; 57)) return false; } function validateValue(elem){ if(elem.value.length&lt;=9 &amp;&amp; elem.value.indexOf(".") &lt; 0) { alert("invalid value"); } else if(elem.value.length&lt;=9 &amp;&amp; elem.value.indexOf(".") !=5) { alert("invalid value"); } else if(elem.value.length&gt;0 &amp;&amp; elem.value.indexOf(".") &gt;0) { var temp=elem.value.split("."); if(temp[0].length&lt;5 ||temp[1].length&lt;3) alert("invalid value"); } }
answers question: http://stackoverflow.com/q/28082874
score: 0

http://stackoverflow.com/q/27972683
upvote count: 2
possible better answer: http://stackoverflow.com/a/27972755
type: Question
accepted answer: http://stackoverflow.com/a/27972742
has answer: http://stackoverflow.com/a/27972755
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/44338237
downvote count: 0
has body: Why in Javascript/HTML does addition of integers followed by the addition of a string followed by the addition of more integers result in the integers being added right away correctly but after the string they are treated essentially as a string? Ex. &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;p id="demo"&gt;&lt;/p&gt; &lt;script&gt; var y = 5 + 5 + 2 + "3" + 1 + 2; document.getElementById("demo").innerHTML = "&lt;br&gt;" + y + "&lt;br&gt;" &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; Running this returns 12312, which is the addition of 5+5+2 and the string "3" but then concatenates 1 and 2 rather than adding...why is this?
favorite count: 0
has title: Addition of integers followed by addition string followed by more integers
has answer: http://stackoverflow.com/a/27972742
has comment: http://stackoverflow.com/comment/44338224
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion

http://stackoverflow.com/a/28080279
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28080085
answers question: http://stackoverflow.com/q/28080085
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44573707
downvote count: 0
score: 1
has body: There could be many ways to solve this problem. using one time watch - you could also consider using two-way bound isolated scoped directive link: function(scope, elem, attrs) { //Set up watch var unWatch = scope.$watch(attrs.avatarId, function(v){ if(v){ unWatch(); init(); } }); function init(){ //initialize here } } and bind it as: Use attribute observe link: function(scope, elem, attrs) { //Set up watch var unWatch = attrs.$observe(attrs.avatarId, function(v){ if(v){ unWatch(); init(); } }); function init(){ //initialize here } } and use it with Bind promise/data app.directive('ngAvatar', function($q) { //... link: function(scope, elem, attrs) { //Set up watch $q.when(scope.$eval(attrs.character)).then(init); function init(character){ var id = character.id; //initialize here } } } and bind it as Event bus Just use angular event bus and broadcast an event from the controller which sets the data say char_loaded, listen for the event in the directive using scope.$on and once you get it initialize.
type: Answer

http://stackoverflow.com/q/28003253
has body: I'm looking for a way to integrate the Facebook profile picture in my Titanium App. I was googling an then i've tried this one: var imageAvatar = Ti.UI.createImageView({ image: "http://graph.facebook.com/"+FacebookUID+"/picture", left:10, top:5, width:50, height:50 }); But this doesn't work, it wont show me the profile picture of the persons UID. Can anybody help me ? Thank you very much! Edit #1: I've also tried it with HTML, it works fine! And the UID isn't empty, so thats not the problem. Edit #2 (more code): var tableData = []; for(var i=1; i &lt; json.length; i++) { alert(i+' - GAME #'+json[i].GameId); var row = Ti.UI.createTableViewRow({ className:'forumEvent', // used to improve table performance rowIndex:i, // custom property, useful for determining the row during events height:110 }); var imageAvatar = Ti.UI.createImageView({ image: "http://graph.facebook.com/"+Ti.App.fb.uid+"/picture", left:10, top:5, width:50, height:50 }); row.add(imageAvatar); var labelUserName = Ti.UI.createLabel({ color:'#576996', font:{fontFamily:'Arial', fontSize:defaultFontSize+6, fontWeight:'bold'}, text:'Fred Smith ' + i, left:70, top: 6, width:200, height: 30 }); row.add(labelUserName); var labelDetails = Ti.UI.createLabel({ color:'#222', font:{fontFamily:'Impact', fontSize:defaultFontSize+2, fontWeight:'normal'}, text:'Replied to post with id 1234.', left:70, top:44, width:360 }); row.add(labelDetails); tableData.push(row); } Ti.App.multi_tableView.data = tableData; //Another File Ti.App.multi_tableView = Ti.UI.createTableView({ top: 60, bottom: 80 });
has comment: http://stackoverflow.com/comment/44396752
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44396018
has title: Titanium load Facebook profile picture integration doesn't work
tagged with: facebook
tagged with: titanium
has comment: http://stackoverflow.com/comment/44395786
has answer: http://stackoverflow.com/a/32821332
has comment: http://stackoverflow.com/comment/44396144
has comment: http://stackoverflow.com/comment/44395901
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44396718
has comment: http://stackoverflow.com/comment/44396472
has comment: http://stackoverflow.com/comment/44395637
has comment: http://stackoverflow.com/comment/44396571
score: 0
has comment: http://stackoverflow.com/comment/44396371
answer count: 1
tagged with: facebook-graph-api
tagged with: appcelerator

http://stackoverflow.com/a/28061099
has body: The server-side socket.io code installs a nodejs route handler for /socket.io/socket.io.js so that it can serve the socket.io.js file from its real location when /socket.io/socket.io.js is requested by a browser. Remember, nodejs does not serve any local files automatically. It only serves files that are processed by some sort of route or handler. There is no route for node_modules/socket.io/node_modules/socket.io-client/socket.io.js so if a browser requests that, it won't serve anything.
upvote count: 1
type: Answer
score: 1
answers question: http://stackoverflow.com/q/28061042
downvote count: 0

http://stackoverflow.com/q/28068453
has title: How to realise a mousewheel zoom function with pdf.js?
has comment: http://stackoverflow.com/comment/44516956
upvote count: 2
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44517331
accepted answer: http://stackoverflow.com/a/28071433
has comment: http://stackoverflow.com/comment/44517242
type: Question
answer count: 1
tagged with: javascript
has body: pdf.js seems to be a mighty but lousy documented tool. Anyone of you knows how to create a zoom function with it? I tried something but it doesn't work as expected. Here is a fiddle: http://jsfiddle.net/oeaLzavn/2/ This is the code: HTML: &lt;div&gt; &lt;canvas id="the-canvas" style="border:1px solid black"&gt;&lt;/canvas&gt; &lt;/div&gt; CSS: canvas{ width: 500px; /* overflow: scroll; //didn't help */ } javascript: //jQuery and pdf.js needed $(document).ready(function () { var url = "http://cdn.mozilla.net/pdfjs/tracemonkey.pdf"; var pdfDoc = null, pageNum = 1, scale = 0.8, canvas = document.getElementById('the-canvas'), ctx = canvas.getContext('2d'); function renderPage(num, scale) { // Using promise to fetch the page pdfDoc.getPage(num).then(function (page) { var viewport = page.getViewport(scale); canvas.height = viewport.height; canvas.width = viewport.width; // Render PDF page into canvas context var renderContext = { canvasContext: ctx, viewport: viewport }; page.render(renderContext); }); } PDFJS.getDocument(url).then(function getPdfHelloWorld(_pdfDoc) { pdfDoc = _pdfDoc; renderPage(pageNum, scale); }); if (canvas.addEventListener) { // IE9, Chrome, Safari, Opera canvas.addEventListener("mousewheel", MouseWheelHandler, false); // Firefox canvas.addEventListener("DOMMouseScroll", MouseWheelHandler, false); } // IE 6/7/8 else canvas.attachEvent("onmousewheel", MouseWheelHandler); function MouseWheelHandler(e) { var e = window.event || e; console.log(e); var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))); console.log(delta); if (delta == 1) { scale = scale + 0.2; } else { scale = scale - 0.2; } renderPage(pageNum, scale); } }); Is scale the wrong parameter? Or is it just a css thing? Any ideas?
favorite count: 0
tagged with: zooming
tagged with: pdf.js
tagged with: http://stackoverflow.com/tag/pdf
score: 1
has answer: http://stackoverflow.com/a/28071433

http://stackoverflow.com/comment/44396073
comment on: http://stackoverflow.com/q/28003596
score: 0
has text: you mean I have to give a fiddle example?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44439125
comment on: http://stackoverflow.com/a/28017003
type: AnswerComment
score: 0
type: Comment
has text: no I haven't made any changes in the _bootstrap.js_ file and yes I am using a custom _javascript.js_ file but that's not written by but I got it from here [link](http://geedmo.github.io/yamm3/)

http://stackoverflow.com/a/27984299
has body: Have you tried to convert buslocX and buslocY to float type? buslocX = parseFloat(parts[0]); buslocY = parseFloat(parts[1]); split method converts string to array of strings and in that case bahaviour of calculations may be unexpected.
score: 2
answers question: http://stackoverflow.com/q/27984276
has comment: http://stackoverflow.com/comment/44359911
upvote count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44359789
type: Answer

http://stackoverflow.com/comment/44340852
comment on: http://stackoverflow.com/a/27973645
type: Comment
score: 0
has text: Wow thanks everyone! I should have said when I press enter on my keyboard.. I go to logins page and quickly type username and password and hit enter on my keyboard but defaults to the search submit button and does not log me in but attempts to search...
type: AnswerComment

polymer
tags question: http://stackoverflow.com/q/28090679
tags question: http://stackoverflow.com/q/28051580
tags question: http://stackoverflow.com/q/27986793
tags question: http://stackoverflow.com/q/28036992
tags question: http://stackoverflow.com/q/28011215
tag name: polymer
tags question: http://stackoverflow.com/q/28113113
tags question: http://stackoverflow.com/q/28003799
tags question: http://stackoverflow.com/q/28040130
tags question: http://stackoverflow.com/q/28070237
tags question: http://stackoverflow.com/q/28097235
tags question: http://stackoverflow.com/q/28078298
tags question: http://stackoverflow.com/q/28089252
tags question: http://stackoverflow.com/q/28035364
tags question: http://stackoverflow.com/q/28039895
tags question: http://stackoverflow.com/q/28077917
tags question: http://stackoverflow.com/q/28111554
type: Tag
tags question: http://stackoverflow.com/q/28119674

http://stackoverflow.com/comment/44754548
type: Comment
has text: I really appreciate this. Thank you very much. I only just saw the answer. Thanks again for the help and for the invaluable feedback.
comment on: http://stackoverflow.com/a/28049203
type: AnswerComment
score: 0

http://stackoverflow.com/a/27995130
answers question: http://stackoverflow.com/q/27995054
score: 0
type: Answer
has body: You should follow the documentation on https://github.com/blueimp/jQuery-File-Upload/wiki/Setup on how to build the back end. The plugin archives contain a basic PHP example which you can use as a starting point.

http://stackoverflow.com/comment/44407002
has text: Thanks alot! This is just what I needed. I have a question about the extra problem though, would this be a decent way to create a notification system? That I would just add an extra sql statement to copy what's happening when a page manipulates the database? Would I suffer any flaws in the long run?
comment on: http://stackoverflow.com/a/28009447
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44466171
has text: As an aside: you could use `evaluate()` here instead of `thenEvaluate()`. Also, prefer the `fill()` functions over `evaluate()` (it saves you having to do the extra work shown in Artjom's answer, for starters).
score: 1
comment on: http://stackoverflow.com/q/28027830
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44560990
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28092100
score: 1
has text: Any chance you could put an example on a jsfiddle ?

http://stackoverflow.com/comment/44389356
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27999908
has text: Find and event that triggers when the user finishes adding products (maybe a button clicked or something of the kind) and make the ajax call then.

http://stackoverflow.com/comment/44350646
has text: if the current focus was on textbox #search_domain and enter was pressed then the form will be submitted and validation wont be called.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27979494

http://stackoverflow.com/a/28120076
has comment: http://stackoverflow.com/comment/44614976
has comment: http://stackoverflow.com/comment/44614791
answers question: http://stackoverflow.com/q/28119901
type: Answer
has comment: http://stackoverflow.com/comment/44614611
has comment: http://stackoverflow.com/comment/44614780
has comment: http://stackoverflow.com/comment/44614560
has body: You cannot use the remote method because it's looking for a URL parameter to access "remotely" via ajax(). You obviously would not call a JavaScript function with ajax(), so using remote to call a JavaScript function makes no sense. You might be able to create a custom function using the .addMethod() method. However, you will have issues if any part of that is performed asynchronously as the custom rule will be evaluated before you have the result.
has comment: http://stackoverflow.com/comment/44614757
has comment: http://stackoverflow.com/comment/44614589
has comment: http://stackoverflow.com/comment/44614928
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/44614438
has comment: http://stackoverflow.com/comment/44614739
downvote count: 1

http://stackoverflow.com/q/28073381
score: 2
has answer: http://stackoverflow.com/a/28074007
accepted answer: http://stackoverflow.com/a/28074007
type: Question
type: AnsweredQuestion
has body: I am trying to populate a total field with id- #appointment-total_amount using javascript/jquery. Referring this Jsfiddle add two fields together - Which is working fine. I am using this code in my _form.php <?php $script = <<<EOD $(function() { $('#appointment-doctor_fee').keyup(function() { updateTotal(); }); $('#appointment-discount').keyup(function() { updateTotal(); }); var updateTotal = function () { var input1 = parseInt($('#appointment-doctor_fee').val()); var input2 = parseInt($('#appointment-discount').val()); $('#appointment-total_amount').text(input1 + input2); }; }); EOD; $this->registerJs($script); ?> But nothing is happening on the page. I am not able to see what I am missing here. Thanks. Related HTML Doctor Fee Discount Total Amount
tagged with: yii2
tagged with: javascript
upvote count: 2
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Yii2: Adding two fields and populating third field on the fly
tagged with: php

http://stackoverflow.com/q/28052244
has comment: http://stackoverflow.com/comment/44486663
answer count: 2
linked to: http://stackoverflow.com/q/118241
linked to: http://stackoverflow.com/q/8525408
downvote count: 0
has title: How many monospace characters fit horizontally and vertically in an element?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44486648
duplicate of: http://stackoverflow.com/q/118241
has comment: http://stackoverflow.com/comment/44487737
possible better answer: http://stackoverflow.com/a/28052613
has answer: http://stackoverflow.com/a/28053307
tagged with: monospace
has answer: http://stackoverflow.com/a/28052613
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/44486705
has comment: http://stackoverflow.com/comment/44486684
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/44488418
has comment: http://stackoverflow.com/comment/44486761
has body: I'm trying to find out how many monospace characters fit in an element (e.g. div), knowing the size and the font-size. For instance I expected the result being: { x: Math.floor(divWidth / fontSize) , y: Math.floor(divHeight / lineHeight) } But it seems that they are not right: for a font size 50px and width: 100px, the expected answer would be 2, but it is 3: div { font-family: monospace; background: black; color: lightgreen; font-weight: bold; width: 100px; height: 100px; font-size: 50px; } &lt;div&gt; 123 123 &lt;/div&gt; For the example above the answer should be: { x: 3 // 3 chars horizontally , y: 1 // 1 char vertically } How to compute these values automatically? var $div = $("div"); var divSize = { w: $div.width() , h: $div.height() }; var fontSize = parseInt($div.css("font-size"));
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/28053307
has comment: http://stackoverflow.com/comment/44486636
has comment: http://stackoverflow.com/comment/44486698
has comment: http://stackoverflow.com/comment/44486735
has comment: http://stackoverflow.com/comment/44487264
type: Question

http://stackoverflow.com/a/28083789
answers question: http://stackoverflow.com/q/28083708
has comment: http://stackoverflow.com/comment/44545483
has comment: http://stackoverflow.com/comment/44545704
has comment: http://stackoverflow.com/comment/108212651
has comment: http://stackoverflow.com/comment/98417485
score: 53
upvote count: 53
downvote count: 0
has body: If you want it in pure CSS: pointer-events:none;
has comment: http://stackoverflow.com/comment/129512216
type: Answer

http://stackoverflow.com/a/28070997
accepted answer of: http://stackoverflow.com/q/28070544
answers question: http://stackoverflow.com/q/28070544
type: Answer
score: 2
upvote count: 2
has body: Debugging Tips For Chrome: There are probably a number of ways you can find out where a change is coming from. But I find this one a time saver when it comes to tracking down changes in the DOM. (which will usually lead me to a function I am looking for) Break on subtree modification or attribute modifications. To do this right click on an element in the DOM tree. Specifically the one you think the change is being applied to. From there you will get a context menu which will give you these options. Selecting either one with set a DOM breakpoint. If this triggers the debugger you can then proceed to step through the code by using F11 and shift + F11 to skip over functions (useful if you wind up in a library like jQuery). While doing this, pay attention to the call stack. This will tell you where the code is coming from.. More in depth information: https://developer.chrome.com/devtools/docs/javascript-debugging
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27967415
tagged with: starttls
has comment: http://stackoverflow.com/comment/44328257
tagged with: node.js
has body: Here is the setup: [Proxy/Relay Server] &lt;---------[(SMTP TLS test client) Test server] ^ | (Internet) v --------------+----------------- | [Router] | | [ Home email appliance machine | (Home email server app (Node.js)) | (Postfix) ] So this little server is behind a NAT at a home. An external server is used as a proxy/relay for IMAP and SMTP. The home email appliance application connects out to the proxy/relay server on the internet. The home email appliance application connects to the SMTP Postfix port on localhost. Home email aplication creates a two-way pipe between the two connections. From a test server on the internet, connect a TLS-capable SMTP client to the proxy/relay server. The proxy/relay server transmits data between the proxy connection and preexisting connection from the home email appliance. The SMTP client performs STARTTLS protocol. The home email appliance application transfers data between the proxy/relay and localhost SMTP over the pipe to do SMTP over TLS. We use openssl s_client to test a TL connection to the proxy/relay server which transmits data back and forth to the client behind the NAT. It works great for plaintext, but I am not sure it is working consistently for TLS. Occasionally I get a full output with SSL certs etc fromm the openssl s_client command, but usually it just says CONNECTED and sits there. Not sure it is working in those cases. Basically its this code running behind the NAT (router) on a computer with Postfix (there is some security stuff but this is basically it): proxyOutgoing = net.connect(proxyport, proxyhost) localSMTP = net.connect(587, 'localhost') localSMTP.pipe(proxyOutgoing).pipe(localSMTP) What I am trying to figure out is, is there something about this basic idea that would cause the openssl s_client test or TLS in general to only appear to be 'working' occasionally? Do I need to somehow flush the pipes or something weird.. It keeps saying Connected(000003) but usually just that, no cert info. One theory is…
score: 2
has answer: http://stackoverflow.com/a/27989915
accepted answer: http://stackoverflow.com/a/27989915
downvote count: 0
tagged with: stream
type: AnsweredQuestion
has title: Duplex pipe between sockets seems to relay TLS behind NAT for SMTP but only sometimes
tagged with: pipe
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44330124
favorite count: 0

http://stackoverflow.com/comment/44349690
type: QuestionComment
has text: @Innovarion - My jsfiffle link - http://jsfiddle.net/0c21r1pe/1/
score: 0
comment on: http://stackoverflow.com/q/27978374
type: Comment

http://stackoverflow.com/comment/44383940
type: AnswerComment
comment on: http://stackoverflow.com/a/27996911
type: Comment
has text: not working their is an echo statement in function.php that must be displayed in div id="rssOutput" in search.php
score: 0

http://stackoverflow.com/a/28055674
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28054662
has comment: http://stackoverflow.com/comment/44496063
type: Answer
answers question: http://stackoverflow.com/q/28054662
has body: It works fine on a fiddle if you remove your alt class="abs jasonbain". Even with the invalid alt included it works fine. Your added classes on the image mess up the effect. Try it out yourself on the fiddle page. &lt;section id="landing-page"&gt; &lt;div class="center"&gt; &lt;div id="image-background"&gt;&lt;/div&gt; &lt;div class="center-image"&gt; &lt;img src="http://lorempixel.com/400/200/"/&gt; &lt;/div&gt; &lt;/div&gt; &lt;/section&gt; JS var main=function() { $("#landing-page").delay(5500).animate({"top": "0px"},200); $("#image-background").delay(5500).animate({"top": "70px"},100).animate({"top": "85px"},250).animate({"top": "80px"},300); $(".center-image").hide().delay(5700).fadeIn("slow"); } main();
score: 0

http://stackoverflow.com/comment/44523811
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28070525
score: 0
has text: Did you test the code with numbers more than $1,000,000.00 ?

http://stackoverflow.com/q/28069220
tagged with: javascript
type: UnansweredQuestion
tagged with: angularjs
type: Question
has body: I'm creating service layers to interact with Rest server, but I've got some problems with ngResource promises. var grupogestion= angular.module('app.grupogestion.services', ['ngResource']); grupogestion.factory('Grupogestion', ['$resource', function ($resource){ return $resource('api/grupogestiones/:action/:id.:format', { action: '@action', id:'@id', format:'json' }, { 'get': {method:'GET'}, 'post': {method:'POST',headers : {'Content-Type': 'application/x-www-form-urlencoded'}}, 'save': {method: 'POST',headers : {'Content-Type': 'application/x-www-form-urlencoded'}} } ); }]); grupogestion.service('GrupogestionService',['Grupogestion', function (Grupogestion){ this.findAll = function (){ Grupogestion.get({action: 'index'},function (data, status, headers, config){ return data; }); } this.save = function (grupogestion){ Grupogestion.save({'action':'add'},$.param(grupogestion)).$promise.then( function(data){ alert('k'); return data; }, function(error){ alert('j'); return error; } ); } }]); When I call var response = GrupogestionService.save(data) from angular controller, I don't get the data at the same time I call the function, so the question is: How can I modify GrupogestionService for returning data to the controller? I've tried to return the promise but I couldn't do it. Thanks for helping.
has answer: http://stackoverflow.com/a/28069407
has title: How to returning data from a resource using angular
score: 0
answer count: 1
tagged with: resources

http://stackoverflow.com/q/28032995
favorite count: 0
tagged with: parse-platform
has title: JavaScript PayPal Variable Price
has comment: http://stackoverflow.com/comment/44456675
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44456586
answer count: 0
score: 1
upvote count: 1
tagged with: paypal
type: Question
tagged with: firebase
has comment: http://stackoverflow.com/comment/44451981
has comment: http://stackoverflow.com/comment/44478465
has comment: http://stackoverflow.com/comment/44456701
tagged with: javascript
downvote count: 0
tagged with: jquery
has body: I'm working on a ecommerce-type plugin for my website and I'm using PayPal to deal with the transactions. So I followed the guide to create a "Buy Now" button on the website and I got the form that works great: &lt;form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"&gt; &lt;input type="hidden" name="cmd" value="_s-xclick"&gt; &lt;input type="hidden" name="hosted_button_id"&gt; .... However I just have a question in terms of how I can tweak this plugin: I have variables that contain the price of the items on my website so something like var price1 = 10; and these variables automatically change themselves based on changes I make on my website. (I'm using Firebase as the backend for this). So I wanted to know if it was possible to have the prices for each item updated automatically on PayPal directly with JavaScript or some API (like Firebase or Parse). Thanks in advance :)
has comment: http://stackoverflow.com/comment/44454120

http://stackoverflow.com/comment/44540576
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28080704
has text: this should be possible soon using [Object.observe()](http://www.html5rocks.com/en/tutorials/es7/observe/), and invoking node like so: `node --harmony yourapp.js`
score: 1

http://stackoverflow.com/comment/70242279
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/37974825
type: Comment
has text: As far as I know you should be able to scrap the whole `.then(function (isDisplayedd) { return isDisplayedd; })` part because it should pass along the result automatically to the next then function

http://stackoverflow.com/comment/44327901
comment on: http://stackoverflow.com/q/27967526
score: 1
has text: You should keep the async API for getCurrentData(), if _currentData isn't set, getCurrentData() should call getData().
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44546817
comment on: http://stackoverflow.com/q/28084359
has text: $scope.isActive = function (route1, route1) { ..
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27980178
upvote count: 5
tagged with: javascript
tagged with: window.open
type: AnsweredQuestion
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/44386291
has title: How to catch new window opend by window.open(url, _blank) in PhantomJS?
type: Question
has answer: http://stackoverflow.com/a/27981193
score: 5
has body: I'd like to check with PhantomJS whether my script correctly opens a new window/tab on click. The open is triggerd by a js event listener and opened through window.open(url, "_blank"). How can I listen for the new window with PhantomJS?
answer count: 1
tagged with: phantomjs
accepted answer: http://stackoverflow.com/a/27981193

http://stackoverflow.com/q/27986563
duplicate of: http://stackoverflow.com/q/2324250
has comment: http://stackoverflow.com/comment/44364064
has comment: http://stackoverflow.com/comment/44363922
answer count: 1
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/27986603
has title: Hiding Option tags in IE
favorite count: 0
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/44365809
has body: Let me start off saying I hate IE. I have a bit of code running to hide options in a select tag and then narrow them down and only show the narrowed down options. This works perfectly everywhere, except I.E. and I'm not really sure why. My code looks something like this... $("select[name='FormId']").prop("disabled", false); $(".modalContent select[name='FormId'] option").hide(); var formIds = this.model.collection.models.map(function ( model ) { return model.attributes.Form.attributes.Id }); formIds.forEach(function ( formId ) { $(".modalContent select[name='FormId'] option[value='"+ formId +"']").show(); }); Any help would be much appreciated!
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/2324250
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/44364422
tagged with: javascript
linked to: http://stackoverflow.com/q/9234830

http://stackoverflow.com/q/28045076
type: Question
has answer: http://stackoverflow.com/a/28045166
tagged with: liferay
has answer: http://stackoverflow.com/a/28112987
upvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28063768
favorite count: 0
answer count: 3
type: UnansweredQuestion
has body: I am trying to send multiple data using ajaxFileUpload.But only i am able to send the file from the ajax call.Can any one help me to send multiple data with the ajax call.Here is my code function sendToConsultant(){ var fname = $('#&lt;portlet:namespace /&gt;fname').val(); var lname = $('#&lt;portlet:namespace /&gt;lname').val(); var email = $('#&lt;portlet:namespace /&gt;email').val(); var phone = $('#&lt;portlet:namespace /&gt;phone').val(); var jobtitle = $('#&lt;portlet:namespace /&gt;jobtitle').val(); var comments = $('#&lt;portlet:namespace /&gt;comments').val(); var url = "&lt;%=candidateInterestURL%&gt;"; var fname = $('#&lt;portlet:namespace /&gt;fname').val(); var lname = $('#&lt;portlet:namespace /&gt;lname').val(); var email = $('#&lt;portlet:namespace /&gt;email').val(); var phone = $('#&lt;portlet:namespace /&gt;phone').val(); var jobtitle = $('#&lt;portlet:namespace /&gt;jobtitle').val(); var comments = $('#&lt;portlet:namespace /&gt;comments').val(); var type = "candidateInterestInJob"; $.ajaxFileUpload({ url:'&lt;%=candidateInterestURL%&gt;', secureuri : false, fileElementId : 'fileName', dataType : 'json', data:{'fname':fname,'lname':lname}, success : function(data, status) { alert('hiii'); }, error:function (data, status, e){ alert("There might be some issue with this file."); } }); This is the code i am using,But it is not working .Someone please help me Thnanks in advance.Someone please help
has title: Send more than one parameter in ajax call
downvote count: 3
score: -3

http://stackoverflow.com/q/28052875
score: 1
tagged with: caching
has comment: http://stackoverflow.com/comment/44488013
type: Question
tagged with: browser
has title: Reading cache using JavaScript
upvote count: 1
tagged with: javascript
answer count: 1
favorite count: 0
has body: This is Two questions: 1/ How can I read the cache stored by the browser if there's no permission restrictions? 2/ If the user browse into a website, is there a posibility of storing the page source code [HTML] in cache? (big website like youtube ..etc) Thanks.
has answer: http://stackoverflow.com/a/28053231
accepted answer: http://stackoverflow.com/a/28053231
has comment: http://stackoverflow.com/comment/44487933
has comment: http://stackoverflow.com/comment/44488035
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/44485577
type: Comment
comment on: http://stackoverflow.com/a/28051403
type: AnswerComment
has text: I see what you did and unsderstand it, but unfortunately it didn't worked to me, I don't know why, but thanks for the help!
score: 0

http://stackoverflow.com/comment/72590324
type: AnswerComment
comment on: http://stackoverflow.com/a/27985010
score: 0
has text: can u help me if I am using iframes and loading vimeo videos?
type: Comment

http://stackoverflow.com/comment/44610540
comment on: http://stackoverflow.com/q/28118188
has text: Since the constructor is not accessible outside of that js file, there's nothing you can do other than monkeypatching $.fn.pluginName so that everytime it is called, the method is overridden on the instance. Since that method is the bulk of the plugin, you'd be damn near rewriting it.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44342572
type: Comment
score: 1
has text: See [*MDN return statement*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return).
comment on: http://stackoverflow.com/q/27974882
type: QuestionComment

http://stackoverflow.com/a/28024784
upvote count: 1
has body: You should add the following to the .slideRightLeft class: -webkit-animation: slideRightLeft 1.3s infinite; animation: slideRightLeft 1.3s infinite; Check this link for a working demo. Edit You can find the implementation using jQuery's animate() function here. Note the added style to the img. JS jQuery( ".site-logo" ).hover(function() { jQuery( this ).animate({ left: "-=50" }, 1000) .animate({ left: "+=50" }, 1000); });
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/44435449
has comment: http://stackoverflow.com/comment/44444535
score: 1
answers question: http://stackoverflow.com/q/28024697

http://stackoverflow.com/a/28106129
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/28104731
upvote count: 1
has body: You need to put the data in an array as the second parameter of $.plot, and your options aren't quite correctly formatted. Try this: $.plot("#placeholder", [ data ], { series: { lines: { show: true, fill: true }, bars: { show: true, fill: true } }, xaxis: { mode: "categories" } }); Here is a working example: http://plnkr.co/edit/3SMVMZ1ZcCD8b9DZ3T51?p=preview
type: Answer

http://stackoverflow.com/a/28000945
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28000898
score: 1
has comment: http://stackoverflow.com/comment/44391395
has body: Does your lastTime contain anything before running main() for the first time? If not, then this code var dt = (now - lastTime) / 1000.00; can't work because lastTime is undefined
downvote count: 0

http://stackoverflow.com/q/28030528
tagged with: javascript
tagged with: jquery
has body: I can't wrap my head around the logic here. My JQuery: My check boxes: Price: $100,000-$160,000 $160,000-$200,000 $200,000-$250,000 Number Of Rooms: 3 Bedroom 4 Bedroom 5 Bedroom Square Footage: 1,200-1,600 1,600-2,000 2,000+ Neighborhoods: City View Heritage Hills Hillside Terrace Lonesome Dove Tradewinds The script works in that if you click on a checkbox it will show the div that contains the class that matches the "rel=" of that checkbox. This works except that if I check the first price filter and the first neighborhood filter it will show the home that is in that neighborhood even though it belongs to the second price filter. I need this script to take into account all of the filter sections when displaying the result. This question has been asked a few times but they are using a different method for Any suggestions? jsfiddle where I can't get my working code to work: http://jsfiddle.net/jonathanSumner90/nh8vr1kp/ the web page where it works but not the way I'm trying to figure out here: http://www.bluehavenhomes.com/floor-plans?hs_preview=1SQuQUzB-2347415373
score: 0
tagged with: filter
answer count: 1
has comment: http://stackoverflow.com/comment/44446726
type: UnansweredQuestion
has title: Logic for Jquery filtering through multiple categories
has comment: http://stackoverflow.com/comment/44447089
has comment: http://stackoverflow.com/comment/44446541
type: Question
has comment: http://stackoverflow.com/comment/44447028
has comment: http://stackoverflow.com/comment/44446904
has answer: http://stackoverflow.com/a/28031588
has comment: http://stackoverflow.com/comment/44447177

http://stackoverflow.com/comment/48319096
has text: @mason I'm unsure. I've been playing with the web.config for a while now and It just doesn't seem to fit ; in the context of this question, it mostly had to do with the master-page. I'll accept yours anyway.
type: AnswerComment
comment on: http://stackoverflow.com/a/27970365
score: 0
type: Comment

http://stackoverflow.com/comment/44478204
type: Comment
has text: dont forget to upvote and accept answer as it worked for you..
type: QuestionComment
comment on: http://stackoverflow.com/q/28044436
score: 0

package.json
tag name: package.json
tags question: http://stackoverflow.com/q/28029929
type: Tag

http://stackoverflow.com/comment/44537806
score: 0
type: AnswerComment
has text: one of those "doh!" moments. will give this a shot. Thanks
comment on: http://stackoverflow.com/a/28078441
type: Comment

http://stackoverflow.com/q/28006629
has comment: http://stackoverflow.com/comment/44401885
has comment: http://stackoverflow.com/comment/44401649
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/28006743
has comment: http://stackoverflow.com/comment/44401899
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44401604
tagged with: css
has comment: http://stackoverflow.com/comment/44401657
upvote count: 1
has comment: http://stackoverflow.com/comment/44401823
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28006743
accepted answer: http://stackoverflow.com/a/28009855
score: 1
has title: Add shadow to Canvas element (keeping the element transparent)
type: Question
answer count: 2
has body: I have a circle shape in my HTML5 canvas. I'd like to give it a shadow style but without showing the stroke, so the stroke should be 0 and shadow: visible. Here is my code: context.beginPath(); context.lineWidth = 5; context.shadowColor = 'black'; context.strokeStyle = "rgba(255,0,0,1)"; context.shadowBlur = 10; context.shadowOffsetX = 0; context.shadowOffsetY = 0; context.arc(x, y, 45, 0, 2 * Math.PI, false); context.stroke(); context.restore(); context.save(); I found a similar method online but it does not work and honestly I don't understand it. context.beginPath(); context.lineWidth = 10; RGraph.setShadow({'context': context}, 'black', 0, 0, 15) context.arc(mouseXY[0], mouseXY[1], radius + 5, 0, 2 * Math.PI, false); context.stroke(); Any Idea to make to have a shadow for an invisible shape ?
has answer: http://stackoverflow.com/a/28009855
tagged with: canvas

http://stackoverflow.com/comment/44621578
type: AnswerComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/69498/discussion-between-tim-marshall-and-tyr).
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28117082

html.dropdownlistfor
tags question: http://stackoverflow.com/q/28042601
type: Tag
tag name: html.dropdownlistfor
tags question: http://stackoverflow.com/q/28000486
tags question: http://stackoverflow.com/q/28062345

http://stackoverflow.com/a/28121826
upvote count: 3
has body: You can use the following regex. var matches = text.match(/.+\n*/g); Working Demo Or you could match a newline sequence "one or more" times or the end of the string. var matches = text.match(/.+(?:\n+|$)/g);
has comment: http://stackoverflow.com/comment/44617789
downvote count: 0
answers question: http://stackoverflow.com/q/28121766
type: Answer
score: 3

view-scope
tags question: http://stackoverflow.com/q/28050874
tag name: view-scope
type: Tag

http://stackoverflow.com/comment/44423867
type: QuestionComment
has text: It seems like a problem with your router. Can you edit the question and add the router that is handling **/users**
comment on: http://stackoverflow.com/q/28018035
score: 0
type: Comment

http://stackoverflow.com/comment/44577058
has text: if you open up developer tools in your browser and look at data-text, the value is updating in that plunkr, let me know if that worked for you @JelleVandeVliet I'm curious to find out if it's the socialshare library or just an issue of passing the scope to your directive correctly.
type: AnswerComment
comment on: http://stackoverflow.com/a/28097957
score: 0
type: Comment

http://stackoverflow.com/a/28014550
has body: If you don't have access to do a cronjob, you can do the following: When the script, that has to display this value is called, open a file (or read from a DB) the last time it was updated. For example, if the script was called today (2015.01.18), and the last call was on 2015.01.13 then you have to update X 5 times. So add 5 random values to X then store it with the new (today's) date.
upvote count: 1
answers question: http://stackoverflow.com/q/28014319
type: Answer
downvote count: 0
score: 1

twitter-bootstrap-3
tags question: http://stackoverflow.com/q/28111350
tags question: http://stackoverflow.com/q/27968361
tag name: twitter-bootstrap-3
tags question: http://stackoverflow.com/q/28096786
tags question: http://stackoverflow.com/q/28033915
tags question: http://stackoverflow.com/q/27974846
tags question: http://stackoverflow.com/q/28016196
tags question: http://stackoverflow.com/q/28001859
type: Tag
tags question: http://stackoverflow.com/q/27991517
tags question: http://stackoverflow.com/q/28005514
tags question: http://stackoverflow.com/q/27975829
tags question: http://stackoverflow.com/q/28029310
tags question: http://stackoverflow.com/q/28040371
tags question: http://stackoverflow.com/q/28071868
tags question: http://stackoverflow.com/q/28108288
tags question: http://stackoverflow.com/q/28025439

http://stackoverflow.com/comment/44420063
type: Comment
has text: Table cells have input tags.
type: AnswerComment
comment on: http://stackoverflow.com/a/28008471
score: 0

http://stackoverflow.com/a/28032000
has comment: http://stackoverflow.com/comment/44450053
accepted answer of: http://stackoverflow.com/q/28031717
has comment: http://stackoverflow.com/comment/44449861
answers question: http://stackoverflow.com/q/28031717
has comment: http://stackoverflow.com/comment/44449222
score: 0
has comment: http://stackoverflow.com/comment/44451161
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44464669
has body: This is an approach I wrote. You'll need to adept it. I don't really know the mark up of your xml document. I extrapolated from the code you submitted. What this does. Whenever somebody clicks upon a LI an AJAX call is made to the server. There the xml is updated and posted back in the response. The HTML in the page gets updated with the new data. One drawback of this method is that it only supports one action a time. If two persons would write into the same file it would result in data loss. A better solution would be to keep track of this using a database. $(".abstimmer li").click(function(){ var klick_neu = parseInt($(this).html())+1; var index = Array.prototype.slice.call($(".abstimmer li")).indexOf(this); //create an ajax call that posts the new click count to the server. $.ajax({ type: "POST", url: "abstimmer.php", dataType : "xml", data : {clicks : klick_neu, element : index}, success: function (data) { var $lis = $(".abstimmer li"); $(data).find('klick').each(function (index) { if (index &lt; $lis.length) { $lis.eq(index).html($(this).text()); } }); } }) }); The new abstimmer.php file &lt;?php $clicks = $_POST['clicks']; $index = $_POST['element']; $doc = new DOMDocument(); $doc-&gt;load("abstimmer.xml"); $elements = $doc-&gt;getElementsByTagName("klick"); $elements-&gt;item($index)-&gt;nodeValue = $clicks; $xml = $doc-&gt;saveXML(); if($handle = fopen("abstimmer.xml", "w")) { if (!fwrite($handle, $xml)) { fclose($handle); } fclose($handle); } header('Content-Type: text/xml; charset=utf-8'); echo $xml; ?&gt;
type: Answer

http://stackoverflow.com/q/28113806
tagged with: ionic-framework
type: Question
has answer: http://stackoverflow.com/a/28127870
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/28127870
tagged with: angularjs
has title: How to call a function outside $ionicActionSheet on buttonClicked?
type: AnsweredQuestion
score: 1
upvote count: 1
has body: I am trying to use $ionicActionSheet to execute a function. Moreover, in the example below, I want to call doSomethingElse() when the user clicks on first option to "do something else". I can execute commands within the function buttonClicked() succesfully, but it does not want to call the functions outside. // within controller $scope.doSomethingElse = function(textStr) { window.alert(textStr) } $scope.showActions = function(friendName) { $ionicActionSheet.show({ buttons: [ { text: 'do something else }, { text: 'do something' }, ], destructiveText: 'View all', titleText: '&lt;h4&gt;' + friendName + ' &lt;/h4&gt;', cancelText: 'Cancel', buttonClicked: function(index, $scope) { if(index==0) { // window.alert("Hello"); works fine $scope.doSomethingElse("Index 0") } if(index==1) { // window.alert("Hello"); works fine too $scope.doSomethingElse("Index 1") } return true; }, destructiveButtonClicked: function() { window.alert("Hey All"); return true; } }); }

http://stackoverflow.com/comment/87961137
type: AnswerComment
has text: I have added the case for stacked bar charts and I have updated the solution to `d3.v4`. I have a problem though. The tooltip only shows on the middle bars. See this jsfiddle [example](http://jsfiddle.net/emiliepicardcantin/mk7wpe1g/).
type: Comment
score: 1
comment on: http://stackoverflow.com/a/28070585

http://stackoverflow.com/a/28011288
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28011050
type: Answer
score: 1
has body: Easy solution in one call: me/friends?fields=first_name,last_name
answers question: http://stackoverflow.com/q/28011050

http://stackoverflow.com/q/27982382
type: Question
has answer: http://stackoverflow.com/a/27982503
tagged with: javascript
has title: How to iterate an array based on a maximum count value and not based on the length of the array
has body: I would like to know how to iterate an array based on a maximum count value and not based on the length of the array. For example, if an array has 6 elements and maximum count of iteration is 7. For example, var arrayData = ['A','B','C','D','E','F']; var count = 7; for( var n=0;n&lt;count;n++) { predictValue = arrayData[n]; } alert(predictValue); Above code will return value till position 5 i.e F value, if n=6, then it will return undefined, I want the counter to start from 0th position that is to read value A if counter n reaches length of arrayData.
has answer: http://stackoverflow.com/a/27982492
score: 0
has answer: http://stackoverflow.com/a/27982499
has answer: http://stackoverflow.com/a/27982593
has comment: http://stackoverflow.com/comment/44356033
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44356670
has answer: http://stackoverflow.com/a/27982458
has comment: http://stackoverflow.com/comment/44356226

http://stackoverflow.com/a/28112983
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/44604665
has comment: http://stackoverflow.com/comment/44599794
downvote count: 1
has body: It is in UI Bootstrap. It's a subset of Angular UI For more information, in UI bootstrap, popover uses $tooltip provider. so you can use custom html without any issue. It is exactly what popover does. Here is the working plunker You need to have the following 2 directives .directive('xngPopover', ['$tooltip', function($tooltip) { return $tooltip('xngPopover', 'popover', 'click'); } ]) .directive('xngPopoverPopup', [ function() { return { replace: true, scope: { title: '@', content: '@', animation: '@', isOpen: '=' }, templateUrl: 'tmp.html', controller: function($scope) { $scope.Hide = function() { $scope.isOpen = false; }; } }; } ]); The trigger is something like this test
answers question: http://stackoverflow.com/q/28112792
has comment: http://stackoverflow.com/comment/44600053
has comment: http://stackoverflow.com/comment/44717723
score: 0
has comment: http://stackoverflow.com/comment/44602372
has comment: http://stackoverflow.com/comment/44717766
has comment: http://stackoverflow.com/comment/44604245
has comment: http://stackoverflow.com/comment/44600313

http://stackoverflow.com/a/27999645
type: AcceptedAnswer
has body: I've done using one more page.evaluate to store modified html after canvas element captured as image as follows var page = require('webpage').create(); var fs = require('fs'); var URL = 'some web url'; page.open(URL, function(status) { if (status !== 'success') { console.log('Unable to access network'); } else { var clipRect = page.evaluate(function() { return document.getElementById("some-id").getBoundingClientRect(); }); page.clipRect = { top : clipRect.top, left : clipRect.left, width : clipRect.width, height : clipRect.height }; page.render('canvas.png'); var newHTML = page.evaluate(function() { var canvas = document.getElementById("some-id"); var newCanvas = document.createElement('img'); newCanvas.setAttribute('src', 'canvas.png'); newCanvas.setAttribute('alt', 'canvas'); canvas.innerHTML = newCanvas.outerHTML; return document.documentElement.outerHTML; }); fs.write('email.html', newHTML, 'w'); phantom.exit(); } });
answers question: http://stackoverflow.com/q/27986075
type: Answer
accepted answer of: http://stackoverflow.com/q/27986075
has comment: http://stackoverflow.com/comment/44389040
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/28113152
type: Question
score: 1
tagged with: javascript
tagged with: jquery-waypoints
upvote count: 1
has body: Here is the JS for the waypoint call and graph bar function. It repeats every time the waypoint is reached and I would like it to recognise that the waypoint has been reached once already ad not to repeat function. Thanks for your help. :) $.getScript('http://imakewebthings.com/jquery-waypoints/waypoints.min.js', function() { $('#jack_bellamy').waypoint(function() { setTimeout(function start (){ $('.bar').each(function(i) { var $bar = $(this); $(this).append('&lt;span class="count"&gt;&lt;/span&gt;') setTimeout(function(){ $bar.css('width', $bar.attr('data-percent')); }, i*100); }); $('.count').each(function () { $(this).prop('Counter',0).animate({ Counter: $(this).parent('.bar').attr('data-percent') }, { duration: 2000, easing: 'swing', step: function (now) { $(this).text(Math.ceil(now) +'%'); } }); }); }, 500) }); });
answer count: 1
has title: Not repeating the function once waypoint reached
has answer: http://stackoverflow.com/a/28205004
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28205004
favorite count: 0
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/28036265
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44485605
type: Answer
has comment: http://stackoverflow.com/comment/44457557
accepted answer of: http://stackoverflow.com/q/28035666
upvote count: 1
has body: I made a small snipset of the problem that also shows part of the answer. I would think that the encoding of the XML document you are parsing is "off", in that sence that the first element of your childNodes, is actually a textnode between the last quote of centro_de_investigacao> and the start tag of <nome. If you check the snipset (you can play around with the index parameter for example), you would see that the first button doesn't need the index increase to 1, but can work as expected with the first element, nl the one at index 0. So remove the whitespaces from your XML document, and you should be fine. Whitespaces: tab, space, newline // mocked, no real data var xmlHttpObj; function CreateXmlHttpRequestObject() { function Mock() { this.callready = function() { this.readyState = 4; this.status = 200; this.statusMsg = "OK"; if (this.onreadystatechange && this.onreadystatechange.call) { setTimeout(this.onreadystatechange.bind(this), 0); } }; this.open = function(methodType, url, async) { var el = document.getElementById('dataXml-' + url.split('.')[0]), content = el ? el.innerHTML : ''; if (typeof async === 'undefined' || async) { // no action till send is executed this.responseText = content; this.responseXml = content; return; } return content; }; this.send = function(data) { this.callready(); }; } return new Mock(); } function EnviaPedido(index, url) { xmlHttpObj = CreateXmlHttpRequestObject(); xmlHttpObj.open("POST", url, true); xmlHttpObj.onreadystatechange = ProcessaReposta.bind(this, index); xmlHttpObj.send(); } function ProcessaReposta(index, url) { if (xmlHttpObj.readyState == 4 && xmlHttpObj.status == 200) { var response = xmlHttpObj.responseText; var xmlDoc; if (window.DOMParser) { parser = new DOMParser(); xmlDoc = parser.parseFromString(response, "text/xml"); } else { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; xmlDoc.loadXML(response); } var select = document.getElementById("select"); var centrosInvestigacao = xmlDoc.getEleme…
answers question: http://stackoverflow.com/q/28035666
score: 1

http://stackoverflow.com/q/28026937
tagged with: web-sql
type: UnansweredQuestion
tagged with: google-chrome
has answer: http://stackoverflow.com/a/28027626
has body: I call openDatabase function with the following parameters: db = openDatabase("posapp", "", 'POS WebSql DB', 2 * 1024 * 1024); It works almost in 99% of cases. But sometimes it just hangs the tab and no realoing of tab helps anymore. If I debug it with dev panel eventually I end up that all process gets stuck and doesn't go further with insruction. I use Google Chrome 39.0.2171.65 (64-bit). My OS is Debian GNU/Linux 7 3.2.0-4-amd64 It works fine on Windows 7.
has title: JS openDatabase fails sometimes
type: Question
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/a/28084897
answers question: http://stackoverflow.com/q/28077047
has body: I ended up reversing the structure of my layout. Instead of the iframe in the tab system, I made the tab system in my iframe. This made it work, with some minor fixes needed for correct table positioning in firefox. Now working with IE, Firefox, Safari and Chrome. To properly position elements in firefox with a table, i did this: &lt;style type="text/css"&gt; @-moz-document url-prefix() { #firefox { vertical-align:top; padding-top: 60px; } } &lt;/style&gt; Made it work atleast for now, some work was needed to manage it but overall it will have to do... for now.
score: 0
type: Answer

http://stackoverflow.com/a/27995981
score: 1
answers question: http://stackoverflow.com/q/27995654
has comment: http://stackoverflow.com/comment/44386335
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/44422270
has comment: http://stackoverflow.com/comment/44423473
downvote count: 1
has body: Based on @liam-schauerman answer, I actually came up with this solution: var index = 0; var audioElements = document.getElementsByTagName('audio'); function playNext(index) { audioElements[index].play(); $(audioElements[index]).bind("ended", function(){ index++; if(index &lt; audioElements.length){ playNext(index); } }); } $(document).ready(function() { $("#swig").click(function() { audioElements[index].play(); $(audioElements[index]).bind("ended", function(){ index = index + 1; if(index &lt; audioElements.length){ playNext(index); } }); }); }); I just blindly coded this. If someone would elaborated and why this works I would appreciate it.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27995654

http://stackoverflow.com/comment/44411618
type: QuestionComment
comment on: http://stackoverflow.com/q/28012168
score: 0
has text: JavaScript is client side code. You could try to create request for resource created by servlet with [AJAX](http://en.wikipedia.org/wiki/Ajax_(programming)).
type: Comment

http://stackoverflow.com/a/28019305
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/28019105
score: 3
answers question: http://stackoverflow.com/q/28019105
type: AcceptedAnswer
downvote count: 0
has body: I was able to resolve this issue by changing my grunt file to watch first, then connect (grunt server settings) then wiring up dependencies. The final Gruntfile looks like this: 'use strict'; module.exports = function(grunt){ // Load grunt tasks automatically require('load-grunt-tasks')(grunt); // Configurable paths var config = { app: 'app', dist: 'dist' }; grunt.initConfig({ config: config, // watch any js files on change watch: { options: { livereload: true }, bower: { files: ['bower.json'], tasks: ['wiredep'] }, scripts: { files: ['&lt;%= config.app %&gt;/js/src/*.js'], tasks: ['uglify'] }, // sass sass: { files: ['&lt;%= config.app %&gt;/sass/**/*.scss'], tasks: ['compass:dev'] }, // watch html html: { files: ['&lt;%= config.app %&gt;/**/*.html'] } }, // Grunt server settings connect: { options: { port: 9000, open: true, livereload: 35729, // Change this to '0.0.0.0' to access the server from outside hostname: 'localhost' }, livereload: { options: { middleware: function(connect) { return [ connect().use('/bower_components', connect.static('./bower_components')), connect.static(config.app) ]; } } } }, wiredep: { app: { // Point to the files that should be updated when you run `grunt wiredep` ignorePath: /^\/|\.\.\//, src: [ '&lt;%= config.app %&gt;/**/*.html', // .html support... '&lt;%= config.app %&gt;/views/**/*.html', // .html support... '&lt;%= config.app %&gt;/views/**/*.jade', // .jade support... '&lt;%= config.app %&gt;/styles/app.scss', // .scss &amp; .sass support... '&lt;%= config.app %&gt;/config.yml' // and .yml &amp; .yaml support out of the box! ], options: { // See wiredep's configuration documentation for the options https://github.com/taptapship/wiredep#configuration //directory: 'bower_components', } } }, compass: { dev: { options: { sourcemap: true, httpPath: '/', sassDir: '&lt;%= config.app %&gt;/sass', cssDir: '&lt;%= config.app %&gt;/css', imagesDir: 'img', imagesPath: '&lt;%= config.app %&gt;/images', fontsDir: '&lt;%= config.app %&gt;/fo…

http://stackoverflow.com/q/28019050
type: Question
has body: In my existing project, I have used backbone.js to develop the application based on the google maps. Now i want to develop the same application based on ArcGIS api for Javascript. ArcGIS api for javascript is built on the top of Dojo.js. Instead of google maps i have to use esri map using ArcGIS api for javascript. Now can I integrate backbone.js with Dojo.js
tagged with: arcgis-js-api
answer count: 1
tagged with: javascript
tagged with: backbone.js
score: 0
has title: Is it possible to combine backbone.js and Dojo.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28019107
tagged with: dojo

http://stackoverflow.com/comment/44498090
score: 0
type: Comment
type: QuestionComment
has text: And also could you post your Parse related code from the app delegate. I could think of two possible issues that could cause your notifications to be unreliable.
comment on: http://stackoverflow.com/q/28058127

http://stackoverflow.com/comment/44369843
type: Comment
has text: ah yeah. phoo... basic debugging, see what you're really getting back from the ajax call. `console.log(oHTTPPost)`
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27989337

http://stackoverflow.com/comment/44437049
score: 0
type: Comment
has text: Still jumps I'm afraid?
type: AnswerComment
comment on: http://stackoverflow.com/a/28024780

http://stackoverflow.com/comment/44534856
type: Comment
has text: huh ? it works fine in Plunker. Besides, sports is Array and leagues is Array too. [typeof](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) is not the way to check if it is array or obj. Use angular.isArray instead.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/28077739

http://stackoverflow.com/q/28042928
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/28043025
tagged with: angularjs
has body: I'd like to make an equation tag, and use a label attribute to look up which equation to use. Towards that end I have the following app: (function(){ var app = angular.module('mathDocument', []); app.directive('equation', function(){ return { restrict: 'E', scope: { label: '@label'}, templateUrl: 'eqnElement.html', }; }); app.controller("DocumentController", function(){ this.equations = { "mainresult": { labeled: true, label: 'mainresult', body: 'e^{i\\pi} = -1', } }; }); })(); And a template in eqnElement.html: &lt;body ng-controller="DocumentController as doc"&gt; &lt;div&gt; {{ doc.equations[label].body }} &lt;/div&gt; &lt;/body&gt; But, when I try to use the equation tag, &lt;equation label="mainresult"&gt;&lt;/equation&gt; I end up not getting anything. If I instead used {{ label }}, I'd end up seeing mainresult as the output of the template. From what I've read, the usage of an isolate scope plays badly with controllers and might be the problem, but I'm having a hard time getting my debugger to show me anything helpful regarding that. Is there a way to make this work, or should I think about designing this differently?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28043059
accepted answer: http://stackoverflow.com/a/28043059
possible better answer: http://stackoverflow.com/a/28043025
type: Question
tagged with: javascript
has title: AngularJS Directives: Take a HTML attribute as a string, used as a dictionary key

http://stackoverflow.com/a/28062548
has body: You can check in the handler out function that whether your element is displaying or not, then apply toggle function. From your code var timer ,isToggle; $(document).ready( function(){ $(".frame").hover( function() { var descrip_in=$(".description",$(this)) timer = setTimeout(function(){descrip_in.slideToggle();}, 1500); }, function() { var descrip_out=$(".description",$(this)) clearTimeout(timer); if(descrip_out.css('display') !== 'none') descrip_out.slideToggle(1000) } ); } );
type: Answer
answers question: http://stackoverflow.com/q/28061865
score: 0

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/28056596
type: Tag

http://stackoverflow.com/q/28044207
has comment: http://stackoverflow.com/comment/44471511
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44471915
favorite count: 0
has comment: http://stackoverflow.com/comment/44471690
has answer: http://stackoverflow.com/a/28045579
has title: Wrapping every word in a div causes performance issues
has body: I am creating a one page website with nearly 5000 words as text to give a specific animation effect i need to wrap every word in a div tag with a class like this. word That results in too many divs (too many elements in DOM). I completely understand that it is ridiculous to have 5000 elements in DOM is there any other way it is possible? This is the effect I am trying to achieve: $('body').children('.word').each(function() { $(this).animate({ "opacity": "1" }, Math.floor(Math.random() * 3000) + 500); }); .word { opacity: 0; display: inline-block; } hello, how are you doing EDIT: Is this a better way http://jsfiddle.net/PrakharThakur/cxvuq96v/
possible better answer: http://stackoverflow.com/a/28044557
tagged with: css
downvote count: 1
has comment: http://stackoverflow.com/comment/44471709
has answer: http://stackoverflow.com/a/28044557
has comment: http://stackoverflow.com/comment/44471744
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44471067
has comment: http://stackoverflow.com/comment/44471227
score: -1
accepted answer: http://stackoverflow.com/a/28045579
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/28108594
has body: I am developing a cordova based mobile application. In that, I need to reset a count stored in localstorage, when day changes. Right now If I close the app and start it another day, I check the current day with previous day and reset the count if new day is detected. The problem is that if the app is opened today and is in memory when starting it next day, the count will be the same as previous day. How can I detect the day change event in cordova/javascript?
downvote count: 1
type: Question
has title: Cordova: Day change event
upvote count: 0
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/44593954
answer count: 1
has answer: http://stackoverflow.com/a/28108814
favorite count: 0
tagged with: cordova
type: UnansweredQuestion

http://stackoverflow.com/comment/44546091
has text: You should read about javascript closures., seem needed for `object` in the last function
score: 0
comment on: http://stackoverflow.com/q/28082786
type: Comment
type: QuestionComment

webrtc
tags question: http://stackoverflow.com/q/28026876
tags question: http://stackoverflow.com/q/28064331
type: Tag
tags question: http://stackoverflow.com/q/27988012
tag name: webrtc
tags question: http://stackoverflow.com/q/28098999
tags question: http://stackoverflow.com/q/28078281

http://stackoverflow.com/comment/44329257
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27968090
has text: `+{variable}` is a weird javascript shortcut that will coerce a string to a number. So that line is valid, its basically `(numeric)var plus (numeric)cell-value` (http://jsfiddle.net/1uhq8gfq/)

http://stackoverflow.com/comment/44756825
type: Comment
comment on: http://stackoverflow.com/a/28101004
score: 0
has text: This allows 83 characters per line instead of 80. If you add more text and remove `white-space: nowrap`, you'll see it wrap at different words as you expand and shrink the viewport.
type: AnswerComment

http://stackoverflow.com/q/27984719
has title: Can't parse string with JSON.parse
type: Question
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/27984874
has body: I have the following code that splits a string on the newline character and then calls JSON.parse on each line. var lines = []; var ks = data.split("\n"); _(ks).each(function(line){ lines.push(JSON.parse(line)); }, this); return lines; The problem is after the split each line is like this "{"id":"123","attr1":"abc"}" However in order for JSON.parse to work my string needs to be surrounded my single quotes like '{"id":"123","attr1":"abc"}' Is there a way to perform this conversion on each line?
answer count: 1
has comment: http://stackoverflow.com/comment/44360529
tagged with: javascript
has comment: http://stackoverflow.com/comment/44360799
has answer: http://stackoverflow.com/a/27984874
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/44360551

http://stackoverflow.com/comment/44500182
type: AnswerComment
score: 0
type: Comment
has text: Thanks, but still the same
comment on: http://stackoverflow.com/a/28059293

http://stackoverflow.com/comment/44392252
score: 0
type: Comment
type: QuestionComment
has text: Bucle = Loop. Sorry. With a $.each
comment on: http://stackoverflow.com/q/28001509

http://stackoverflow.com/q/28096741
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44569406
has answer: http://stackoverflow.com/a/28097190
accepted answer: http://stackoverflow.com/a/28097190
has body: I am learning HTML5 and Bootstrap, I have my parent container(fluid) inside which I have 3 div, I always use the code of bootstrap class(col-md/xs/sm/lg) to show how the UI should be for different view-portal but how can I dynamically re-size these div using mouse drag over its borders? I mean like enlarging a image. Also by increasing one div size the other two should dynamically re-size themselves within the container. Is there any JS code which I can download? is there any thing to learn that might help me?
has title: How can I create a DIV element that is re-sizable by mouse drag
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/4673348
score: 0
upvote count: 1
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/44569424
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44569435
tagged with: twitter-bootstrap
linked to: http://stackoverflow.com/q/8960193
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44366563
type: Comment
type: QuestionComment
has text: Have you watched the request / response in the browser's console? Are you seeing any errors in the console?
comment on: http://stackoverflow.com/q/27987806
score: 0

http://stackoverflow.com/comment/44601950
type: AnswerComment
comment on: http://stackoverflow.com/a/28112384
type: Comment
has text: I spoke too soon. Go to the jsfiddle example. Once that page loads for the first time, the title "January 2015" is on the left and the today button and arrows are on the right. These options are not specified anywhere. THEN, once you resize the frame, the header is correctly rendered according to the script. Why??
score: 0

http://stackoverflow.com/comment/44577974
has text: Thank you, sorry I was confused. I see how it's working now. I was imagining the bracket notation would get resolved in the html. I appreciate the explanation.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28096753

http://stackoverflow.com/q/28025606
tagged with: javascript
has body: I saw some similar questions here but none of them actually helped to solve my issue. I have a table on the page and a button that needs to rerender the table on click(using different pagination parameters, sorting, etc). I tried several approaches, and I succeed in passing the values to the controller with embedded js router but since the values are passed to the backend with an ajax call I'm not able to rerender the table. My embedded router looks like: @helper.javascriptRouter("jsRoutes")( routes.javascript.UserController.getUsers ) And I will call it from the page with something like: $.ajax(jsRoutes.controllers.UserController.getUsers(3, true, "login")); Now, last but not least, I want to rerender the table with the result from getUsers() call. Simply calling: public Result getUsers(int size, boolean isAsc, String sortBy) { ...... Logger.info("Returning " + size + " users"); return Results.ok(usersPage.render(userDtos)); } doesn't work for me.
tagged with: playframework
linked to: http://stackoverflow.com/q/21184733
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/28027134
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has title: Partial rendering on AJAX call in Play Framework
score: 2
tagged with: playframework-2.3
tagged with: java
type: Question
tagged with: twirl

http://stackoverflow.com/a/28066292
has comment: http://stackoverflow.com/comment/100755712
answers question: http://stackoverflow.com/q/28065551
type: AcceptedAnswer
score: 18
has comment: http://stackoverflow.com/comment/44514269
accepted answer of: http://stackoverflow.com/q/28065551
has comment: http://stackoverflow.com/comment/44519419
type: Answer
has comment: http://stackoverflow.com/comment/44514171
has body: The changelog of select2 4.0.0-beta2 states: Removed events select2-clearing - Use select2:unselecting instead https://github.com/select2/select2/releases
upvote count: 19
downvote count: 1

http://stackoverflow.com/a/28079250
answers question: http://stackoverflow.com/q/28079213
type: Answer
score: 8
has body: The forEach() method and other similar array methods like map() and filter() provide an optional parameter called thisArg specifically for this purpose. This serves as the this "argument" that is provided to the function when it is called: ptList.forEach(this.addPoint, this); When such a parameter isn't available, then choosing between using a closure variable (the variable name self is often used for this) or .bind() is mostly a matter of preference. Note that another option is to define functions inside your constructor and capture everything in a closure: function Curve(ptList) { var pts = []; function addPoint(p) { pts.push(p); } if(ptList.length &gt; 2) { ptList.forEach(addPoint); } this.addPoint = addPoint; } This requires a bit more memory than putting the functions on a prototype since every instance gets its own copy (and also rules out some of the things a prototype allows you to do), but Douglas Crockford (the inventor of JSON and JSLint) recently said that he doesn't even use this anymore, with the rationale that memory is cheap, but CPU cycles are not (traversing the prototype chain requires a fair amount of processing).
has comment: http://stackoverflow.com/comment/44537586
upvote count: 8
has comment: http://stackoverflow.com/comment/44537679
has comment: http://stackoverflow.com/comment/44538039
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28079213

internet-explorer-7
tags question: http://stackoverflow.com/q/27993893
type: Tag
tags question: http://stackoverflow.com/q/28025259
tags question: http://stackoverflow.com/q/27989025
tag name: internet-explorer-7

http://stackoverflow.com/comment/44608434
type: AnswerComment
type: Comment
has text: Something to be aware of, `interface` is a [(future) reserved word.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Future_reserved_keywords)
comment on: http://stackoverflow.com/a/28115180
score: 0

http://stackoverflow.com/comment/44553782
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28087280
has text: methods mentioned in the blogs helps in achieving my requirement

http://stackoverflow.com/comment/44505125
type: QuestionComment
has text: not in mobile phone, i mean if mouse stay on `frame` less than 1sec, I don't want the `.description` pop up.
score: 0
comment on: http://stackoverflow.com/q/28061865
type: Comment

http://stackoverflow.com/a/28037545
has comment: http://stackoverflow.com/comment/44459883
answers question: http://stackoverflow.com/q/28037475
has comment: http://stackoverflow.com/comment/44459738
has comment: http://stackoverflow.com/comment/44459491
has comment: http://stackoverflow.com/comment/44459811
score: 0
has body: I don't think it'll be recursive if you are going to pass a different callback to it. If you will pass same callback to both, it is going to be recursive. Recursive means if I'm calling the same function in function definition itself. But if you are going to pass different callbacks it will be something like bellow. Suppose you have 2 different callbacks callback1 and callback2. You have passed first callback to outer http.request and second callback to inner http.request, so outer http.request will be executing the code given in callback1 but the inner will be executing code given in callback2.
has comment: http://stackoverflow.com/comment/44459543
type: Answer

http://stackoverflow.com/comment/44423878
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28018196
score: 0
has text: I'm trying to have any user input within the iFrame be aligned to the center. There is no other page being loaded. @ancient, I tried that and it simply aligned the iframe itself and not the content inside of it, can you give me an example with code?

http://stackoverflow.com/a/28048561
upvote count: 1
has body: Any time you change the contents of a jQuery Mobile selectmenu widget, you need to tell jQM to refresh the widget: $( ".selector" ).selectmenu( "refresh", true ); API: http://api.jquerymobile.com/selectmenu/#method-refresh For your case: $("#vj").empty().selectmenu( "refresh", true ); Passing in true forces jQM to rebuild the widget, so you don't need to destroy and reinitialize.
answers question: http://stackoverflow.com/q/28037977
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/44436817
type: QuestionComment
score: 0
has text: are you getting the result in your javascript function "loadvideosuccess" ?? You have to make an ajax call to your aspnet page to get the result.
comment on: http://stackoverflow.com/q/28024240
type: Comment

http://stackoverflow.com/q/28085034
has comment: http://stackoverflow.com/comment/44548487
has comment: http://stackoverflow.com/comment/44548238
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44547963
has comment: http://stackoverflow.com/comment/44553538
tagged with: node.js
has comment: http://stackoverflow.com/comment/44548279
has comment: http://stackoverflow.com/comment/44548563
answer count: 0
has title: Trouble in redirecting page after login and logout
type: Question
has comment: http://stackoverflow.com/comment/44548774
has comment: http://stackoverflow.com/comment/44548158
has comment: http://stackoverflow.com/comment/44551329
has comment: http://stackoverflow.com/comment/44551499
tagged with: javascript
score: 0
has body: I am working on a app using nodejs, angular, cassandra which contains login and logout. when i try to login then i have to refresh to go to home page after clicking login button. and when i click on logout button then again have to refresh to go to the login/signup page. this is logout Controller (logoutCtrl.js) angular.module('app').controller('logoutCtrl', ['$scope', 'LogoutService', function($scope, LogoutService) { $scope.logout = function() { LogoutService(); }; } ]); this is logout service angular.module('app').factory('LogoutService', function($http, $location) { return function() { $http.get('/logout').then(function(result) { $location.url('/'); }); }; }); this is routes.js which is distroying the session after clicking on logout app.get('/logout', function(req, res, next) { req.session.destroy(function(err) { if (err) throw err; }); }); this is the home.html file MyApp logout how to redirect the login and logout without needing and refresh

smartgwt
tags question: http://stackoverflow.com/q/28038394
tags question: http://stackoverflow.com/q/28036860
tags question: http://stackoverflow.com/q/28018912
type: Tag
tag name: smartgwt

http://stackoverflow.com/comment/54515724
has text: It was old version of the Blender Exporter. not Clara.io. If you use Blender, just use newest one and uncheck all of scene items.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28083686
score: 0

http://stackoverflow.com/q/28016815
tagged with: javascript
has comment: http://stackoverflow.com/comment/44441374
has body: This question already has an answer here I am searching for some way to replace highlighted text that is inside a text area with a new string that has already been defined. I can get everything in the text area with: var all_text = document.activeElement.value; and I can get the highlighted text with: var selected_text = window.getSelection().toString(); But how can I replace the selected text with a new string? I have seen many related questions on this site, but every solution I have seen so far just says to use str.replace(). I do not want to simply use str.replace()because if there are multiple instances of selected_text contained within the text area, it can result undesirable behavior. I need to supplement the function with additional test conditions to ensure that only the selected text gets replaced and not some other string that happened to be equivalent to its toString() value. I thought I could make use of the anchorOffest property of selection objects, but the property doesn't seem to work in chrome. In fact most of the selection properties don't seem to be working.
has comment: http://stackoverflow.com/comment/44441559
answer count: 1
has comment: http://stackoverflow.com/comment/44421252
tagged with: string
tagged with: str-replace
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44441277
has comment: http://stackoverflow.com/comment/44421244
linked to: http://stackoverflow.com/q/3964710
score: 0
has comment: http://stackoverflow.com/comment/44439130
tagged with: selection
type: Question
has answer: http://stackoverflow.com/a/28016922
has title: Replacing highlighted text inside a text area

http://stackoverflow.com/comment/44386033
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27998118
has text: @acontell This is a reduced test case of a project I am doing, and I need to increase `j` to `j+1` after each click

http://stackoverflow.com/q/27974464
tagged with: javascript
tagged with: esri
accepted answer: http://stackoverflow.com/a/27974510
score: 0
upvote count: 1
has title: Connection error between esri and Python
downvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/27974510
favorite count: 0
has body: I am trying a Python file to Javascript and I am using Esri library. I wrote the following code but it keeps giving me error. var myObj //defined as a string which is passed to require(["esri/request"], function(esriRequest){ var dd=esriRequest{ content: {myObj}, handleAs: "json", url: "www.example.com/pythonFile.py" } } I would appreciate any help
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/28027907
has title: custom d3 scale for values and distance
answer count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44442041
has comment: http://stackoverflow.com/comment/44441681
has comment: http://stackoverflow.com/comment/44441994
type: Question
has body: I've got to display a chart of a couple of million values in relation with distance ( expressed in meters ), I'm pretty new to the d3 philosophy so I'm finding a hard time getting my head around this. The data that I've got to put on screen, are stored in a file that is quite hard to use, this is the format: CLK 2 -0.000051 -0.000084 .. .. -0.000084 -0.000116 CLK 3 -0.000084 -0.000084 -0.000051 .. -0.000149 -0.000051 CLK 4 -0.000051 -0.000116 .. -0.000042 -0.000122 so basically, the int value aside of every "CLK" is the number of the meter, and all the values between any "CLK" and "CLK" are to be evenly distributed in the chart. To make myself clear, this is an (ugly) example of the type of visualization I'd like to achieve:
has comment: http://stackoverflow.com/comment/44440958
has comment: http://stackoverflow.com/comment/44441124
tagged with: d3.js
score: 0
has comment: http://stackoverflow.com/comment/44441784
has comment: http://stackoverflow.com/comment/44441269
type: UnansweredQuestion

http://stackoverflow.com/comment/44473476
type: AnswerComment
comment on: http://stackoverflow.com/a/28042731
type: Comment
has text: Hi Seb, Were you able to find something out yet?? :)
score: 0

http://stackoverflow.com/comment/44428236
comment on: http://stackoverflow.com/q/28019245
score: 0
type: Comment
type: QuestionComment
has text: Can you reach it when you go there by hand?

http://stackoverflow.com/q/28050825
type: Question
tagged with: javascript
has title: IE 10 cross origin requests on SAP Netweaver
score: 0
tagged with: cors
answer count: 1
has comment: http://stackoverflow.com/comment/45092234
type: UnansweredQuestion
has body: I was using openUI5 as reference to develop my applications ( downloaded the library and referring local version in my application ) Now i have a need to refer sap.viz library in my application and i figured sap.viz is not part of openUI5 . So, i started to refer library from remote host like below : &lt;script id="sap-ui-bootstrap" type="text/javascript" data-sap-ui-libs="sap.ui.commons,sap.ui.table,sap.ui.ux3,sap.m,sap.viz" data-sap-ui-theme="sap_bluecrystal" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"&gt; &lt;/script&gt; I have deployed my application on SAP MII ( Netweaver java based ) . The application doesn't work in IE 0 but it works fine in Chrome. When i researched it is to do with CORS (cross origin requests ) . I tried to define Content-security-policy to ignore this using below code but it doesn't help . &lt;meta http-equiv="Content-Security-Policy" content="script-src 'self' https://sapui5.hana.ondemand.com"/&gt; &lt;meta http-equiv="X-Content-Security-Policy" content="script-src 'self' https://sapui5.hana.ondemand.com"/&gt; I have created sample code using http://jsbin.com/cigorepiri/1/edit Error i received in IE10 while debuuging is SCRIPT5022: failed to load 'sap/ui/thirdparty/jquery-mobile-custom.js' from https://sapui5.hana.ondemand.com/resources/sap/ui/thirdparty/jquery-mobile-custom.js: 0 - [object Error] So, either i need a solution to ignore this by IE10 OR Need a way to download sap.viz libary . Please advice. Thanks Hari
has answer: http://stackoverflow.com/a/28061012
tagged with: sapui5

http://stackoverflow.com/comment/44401201
type: QuestionComment
has text: try: `app.use(express.static(__dirname + '/Public'));` ? and of course make sure your styles.css is inside the /Public/ directory.
comment on: http://stackoverflow.com/q/28006301
score: 1
type: Comment

http://stackoverflow.com/q/28012985
score: 0
type: Question
has title: java script slide show is not working
has comment: http://stackoverflow.com/comment/44413445
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has body: Now i am learning html,css and javascript. Now i am working with html,css and javascript slideshow. Here is the code for slideshow: Javascript $("#slideshow &gt; div:gt(0)").hide(); setInterval(function() { $('#slideshow &gt; div:first') .fadeOut(1000) .next() .fadeIn(1000) .end() .appendTo('#slideshow'); }, 3000); And call js file in html like this: &lt;script type = "text/javascript" src= "js/slide.js"&gt;&lt;/script&gt; But images shows orderly, slideshow did not work.my page look like this https://i.sstatic.net/UOM2g.jpg May i know, what is my mistake? Any help would be highly appreciated. Thanks in advance.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28013280
tagged with: css

http://stackoverflow.com/comment/44459124
type: Comment
has text: Ha~~ i took over 15 min to write this simple answer in English,maybe i should improve my writing ability first
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28037345

device-width
type: Tag
tag name: device-width
tags question: http://stackoverflow.com/q/28031225

http://stackoverflow.com/a/28034385
score: 0
type: Answer
has body: var url = 'http://localhost/testo.php?id1=20?qty1=5?id2=13?qty2=4?id3=23?qty3=5.5'; var result = []; url.split('?').forEach(function(str, index) { if(index === 0) { return; } var arr = str.split('='); var nameParts; if(arr.length &gt; 1) { nameParts = /^([^\d]+)(\d+)$/.exec(arr[0]); if(nameParts &amp;&amp; nameParts.length &gt; 2) { result.push({ key: nameParts[1], index: nameParts[2], value: arr[1] }); } } }); console.dir(result); /* output: 0 Object { key="id", index="1", value="20"} 1 Object { key="qty", index="1", value="5"} 2 Object { key="id", index="2", value="13"} 3 Object { key="qty", index="2", value="4"} 4 Object { key="id", index="3", value="23"} 5 Object { key="qty", index="3", value="5.5"} */
has comment: http://stackoverflow.com/comment/44453898
answers question: http://stackoverflow.com/q/28034260

http://stackoverflow.com/comment/44531164
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28075764
has text: addView is function of which library

http://stackoverflow.com/comment/44401544
type: Comment
comment on: http://stackoverflow.com/a/28006525
has text: I found out it was '-webkit-overflow-scrolling': 'touch' broke the thing.
type: AnswerComment
score: 0

http://stackoverflow.com/a/28021405
has comment: http://stackoverflow.com/comment/44429387
has body: Try this.. ALL CATEGORIES hello hello hello
has comment: http://stackoverflow.com/comment/44429153
has comment: http://stackoverflow.com/comment/44429424
has comment: http://stackoverflow.com/comment/44428921
has comment: http://stackoverflow.com/comment/44429348
type: Answer
answers question: http://stackoverflow.com/q/28020496
has comment: http://stackoverflow.com/comment/44428966
score: 0

http://stackoverflow.com/comment/44354724
type: Comment
has text: Cool it kinda worked now. but when there is more than 1000 kr. in cart eg. 1200 kr. then it shows -200 kr. in the message.
comment on: http://stackoverflow.com/a/27980722
type: AnswerComment
score: 0

http://stackoverflow.com/q/27965855
has comment: http://stackoverflow.com/comment/44327220
has comment: http://stackoverflow.com/comment/44325437
has body: Using javascript getters is a cool way to bind function calls to object definitions. I've used it a number of times before, but in a recent problem I wanted to use it to bind a function that returns a jQuery promise object that gets used in a $.when...$.then chain. It seems as though using a getter doesn't work the way I was expecting it to; specifically, $.then() doesn't wait for the bound function's promise object to be resolved when it uses the function definition that the getter returns. However, if no getter is used and I just call the function directly, things work as expected. Any idea why this might be the case? Example: var myObj = { asynch1: { a: 200, b: 300, get runAsynch3() {return function() { myCustomAsynchCode3(this.a, this.b); } }, }, }; function myCustomAsynchCode1() { var df = $.Deferred(); // do stuff that, when done, calls // df.resolve(); return df.promise(); } function myCustomAsynchCode2() { var df = $.Deferred(); // do stuff that, when done, calls // df.resolve(); return df.promise(); } function myCustomAsynchCode3(val1, val2) { var df = $.Deferred(); // do stuff that, when done, calls // df.resolve(); return df.promise(); } If I make a call such as var that = this; $.when(myCustomAsynchCode1()). then(function() { return that.myCustomAsynchCode2(); ). then(function() { return that.myObj.runAsynch3(); }); runAsynch3() executes before myCustomAsynchCode2() resolves its promise object. But, if I make a call like this var that = this; $.when(myCustomAsynchCode1()). then(function() { return that.myCustomAsynchCode2(); ). then(function() { return myCustomAsynchCode3(that.myObj.a, that.myObj.b); }); everything works as expected - the promise objects are resolved without stepping on each other.
type: Question
tagged with: javascript
tagged with: jquery
has title: using a getter to bind a function that returns a promise object
score: 0
has comment: http://stackoverflow.com/comment/44327391
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44324749
has comment: http://stackoverflow.com/comment/44328056

http://stackoverflow.com/comment/44494389
comment on: http://stackoverflow.com/q/27995252
type: Comment
has text: So the issue is that the file isn't just javascript. it's html that also has javascript in it. However, the javascript in the page isn't being executed.
type: QuestionComment
score: 0

http://stackoverflow.com/comment/44613538
has text: Just as a note: you don't need to introduce an additional anonymous function for the resize, you could just write: `$(window).resize( responsiveSize )`. Additionally you could also make a regular named function `function responsiveSize() { .... }`. It does not make a real difference in functionality, but it is just a not needed _complexity_.
comment on: http://stackoverflow.com/a/28119580
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/28117371
favorite count: 0
has comment: http://stackoverflow.com/comment/44609156
downvote count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44608834
has comment: http://stackoverflow.com/comment/44608875
type: UnansweredQuestion
tagged with: css
has body: Im not even sure if this is possible. Im trying to change this background image: CSS #topnav ul li { height:4em; list-style:none; display:table-cell; text-align:center; background-image: url(images/libg2.png); border: 1px solid black; } HTML blahblah blahblah1 blahblah2 blahblah3 blahblah4 So that when you mouse over it the image changes. I know it can be done in CSS with hover but I am trying to do it with JavaScript. Any help would be awesome, even if its someone saying "Stop what you're trying, it wont work".
score: -1
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/28119100
has answer: http://stackoverflow.com/a/28121531
answer count: 2
tagged with: javascript
has title: Change a div element background thats been set in CSS with mouseover() javascript

http://stackoverflow.com/comment/44436813
type: QuestionComment
has text: myList is array and equals $myJson
comment on: http://stackoverflow.com/q/28025728
score: 0
type: Comment

http://stackoverflow.com/a/28120735
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28120676
type: Answer
has comment: http://stackoverflow.com/comment/44615794
upvote count: 3
has comment: http://stackoverflow.com/comment/44615903
accepted answer of: http://stackoverflow.com/q/28120676
score: 3
has comment: http://stackoverflow.com/comment/44615783
has body: Don't do ng-repeat on the same element that has ng-controller: {{item.naam}}
has comment: http://stackoverflow.com/comment/44616011

http://stackoverflow.com/a/28018569
score: 1
answers question: http://stackoverflow.com/q/28011409
type: AcceptedAnswer
has body: File name of web script should be like below. helloworld.get.desc.xml (your name is wrong it should be Inherit.post.desc.xml) helloworld.get.js helloworld.get.html.ftl helloworld.get.xml.ftl helloworld.get.html.400.ftl helloworld.get.xml.400.ftl helloworld.get.config.xml helloworld.get.properties
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28011409
type: Answer
upvote count: 1

http://stackoverflow.com/comment/44494195
score: 0
comment on: http://stackoverflow.com/q/28055914
type: Comment
has text: I added the lines I thought you were asking for above as additional material in the body of the post. I'm not sure I follow the emphatic NEVER. Are you speaking to the javascript submit I used, or the original <input submit... I used?
type: QuestionComment

http://stackoverflow.com/comment/44394918
has text: No problemo, my pleasure
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28003017

http://stackoverflow.com/q/28018719
type: Question
has body: hello i am trying to figure out how i would ago about pulling information from a database in php and json_encoding it ito a JavaScript object that contains several JavaScript arrays that themselves have children objects and arrays. below is the JavaScript i need. ive been playing with embedding arrays into php objects but cant seem to get it to come our correctly. self.navigation = [ { menutext:"Home", url:"/" }, { menutext:"About", url: "#/about", submenu:[ { menutext:"Pricing", url: "/pricing" } ] } ];
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44424160
accepted answer: http://stackoverflow.com/a/28020077
tagged with: php
answer count: 1
score: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/28020077
tagged with: javascript
has title: how to make this javascript object from php json encode

http://stackoverflow.com/comment/44455812
has text: Can you show your HTML and CSS?
score: 3
comment on: http://stackoverflow.com/q/28035512
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28112233
upvote count: 2
answers question: http://stackoverflow.com/q/28111878
downvote count: 0
type: Answer
score: 2
has body: Since you've included jQuery in the tags, you should definitely stick with jQuery plugins. This save you a lot of unnecessary work. Some of the form wizard plugins: jformslider jQuery Steps jquery wizard stepify If you really need for custom form wizard, you could start with something like this (according to your HTML sample) : JSFiddle Next Finish Back JSFiddle

http://stackoverflow.com/a/28038003
score: 1
has comment: http://stackoverflow.com/comment/44460448
has body: Marionette uses underscore templating by default. You'll need to either use some sort of external loader to load them in as variables, or you can place them in the DOM as script elements that you can then reference with your template property. See here: So for instance if you put it in your html, the code would look like then you could reference it in JavaScript as var ToolItemView = Backbone.Marionette.ItemView.extend({ template: '#example', }); That works nicely for small projects, for larger projects you'll want some sort of build/module system to pull in the precompiled templates and reference those directly. Way more info here: http://marionettejs.com/docs/v2.3.1/marionette.renderer.html
has comment: http://stackoverflow.com/comment/44460476
answers question: http://stackoverflow.com/q/28037474
has comment: http://stackoverflow.com/comment/44460377
upvote count: 1
has comment: http://stackoverflow.com/comment/44460252
has comment: http://stackoverflow.com/comment/44460508
type: Answer
downvote count: 0

http://stackoverflow.com/q/28024118
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/28586132
favorite count: 0
has title: Session in nodejs is being partially stored
tagged with: node.js
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/28586132
has body: I am developing an application which store a cassie object in session. Here cassie object is being partially stored in the session. Here is screenshot to set session named as cassie Here is screenshot to get session named as cassie Here only consistencies and types object is being fetched while not other. What am i doing wrong? and what should do to store cassie object in the session?
type: Question
tagged with: session
tagged with: javascript
score: 2

http://stackoverflow.com/q/28074531
favorite count: 0
tagged with: promise
has body: I am racking my brain on why $scope.$apply() inside my callback is not working. As per my understanding $scope.$apply()is used to update a view/page when data changes in callback from an asynchronous call. In my case,I want to update a progress bar as CRMData asynchronous service returns a pageful of records. When I update the progressIndicator inside $scope.$apply(), the value of progressIndicator is not updated in the view. Stepping into $scope.$apply() inside the success callback on promise, I was surprised that it is a noop(). My view where the controller function is called from ng-init. &lt;div ng-controller="OpptyCtrl" ng-init="getOpptyByPage(0,50)" &gt; &lt;div&gt; &lt;progressbar value="progressIndicator" &gt;&lt;/progressbar&gt; &lt;/div&gt; &lt;/div&gt; My controller: .controller('OpptyCtrl'['$scope','crmData', '$q',function($scope,crmData,$q) { $scope.user='user'; $scope.getOpptyByPage = function(startIndex,pageSize) { crmData.getOpptyByPage($q,$scope.user,startIndex) .then(function (result) { //On getting a pageful of records if(result.noMoreRecords == "false"){ //more records startIndex += pageSize; $scope.getOpptyByPage(startIndex,pageSize); $scope.$apply(function() { // &lt;&lt;-- is a noop $scope.progressIndicator=(startIndex/result.totalRecords); }); } }); } Any pointers will help.
tagged with: angularjs
type: UnansweredQuestion
has title: Noop() is called when invoking $scope.$apply() in angular promise
answer count: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/44569246
type: Question
tagged with: javascript
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44531666
has comment: http://stackoverflow.com/comment/44535129

http://stackoverflow.com/comment/44477378
type: AnswerComment
has text: I tried this but page is not posting back, i also tried 'code' object[] args = { "dgBloodDonorResults$ctl01$ctl02", "" }; webBrowser1.Document.InvokeScript("__doPostBack", args);'
comment on: http://stackoverflow.com/a/28042019
score: 0
type: Comment

http://stackoverflow.com/q/28099560
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/44575071
has comment: http://stackoverflow.com/comment/44575289
has comment: http://stackoverflow.com/comment/44575155
accepted answer: http://stackoverflow.com/a/28099799
tagged with: javascript
has title: Error: FS.Collection cannot remove file belongs to: "images" not: "cfs.images.filerecord"
answer count: 1
tagged with: meteor
tagged with: file-upload
score: 0
has answer: http://stackoverflow.com/a/28099799
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44575364
has body: I am getting Error: FS.Collection cannot remove file belongs to: "images" not: "cfs.images.filerecord" when I am trying to remove file. I could not find much about removing files on the docs and here too. Images = new FS.Collection("images", { stores: [ new FS.Store.FileSystem("images"), new FS.Store.FileSystem("thumbs", { beforeWrite: function(fileObj) { // We return an object, which will change the // filename extension and type for this store only. return { extension: 'png', type: 'image/png' }; }, transformWrite: function(fileObj, readStream, writeStream) { // Transform the image into a 10x10px PNG thumbnail gm(readStream).resize(60).stream('PNG').pipe(writeStream); // The new file size will be automatically detected and set for this store } }) ], filter: { allow: { contentTypes: ['image/*'] //allow only images in this FS.Collection } } }); Images.allow({ insert: function(userId, file) { return userId &amp;&amp; file.owner === userId; }, update: function(userId, files, fields, modifier) { return _.all(files, function (file) { return (userId == file.owner); }); //EO iterate through files }, remove: function(userId, files) { return userId &amp;&amp; file.owner === userId; }, download:function(){return true;} }); The full stacktrace is as below : I20150123-02:46:49.798(5)? Exception while invoking method 'deleteImage' Error: FS.Collection cannot remove file belongs to: "images" not: "cfs.images.filerecord" I20150123-02:46:49.798(5)? at EventEmitter.FS.Collection.remove (packages/cfs:collection/api.common.js:136:1) I20150123-02:46:49.798(5)? at [object Object].Meteor.methods.deleteImage (app/lib/collections/images.js:40:10) I20150123-02:46:49.798(5)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1599:1) I20150123-02:46:49.798(5)? at packages/ddp/livedata_server.js:648:1 I20150123-02:46:49.799(5)? at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1) I20150123-02:46:49.799(5)? at packages/ddp/livedata_server.js:647:1 I20150123…

http://stackoverflow.com/comment/44355840
comment on: http://stackoverflow.com/a/27982062
type: AnswerComment
has text: To make this short. function composition. I will add this to my question.
score: 0
type: Comment

http://stackoverflow.com/q/27975829
has comment: http://stackoverflow.com/comment/44344351
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27975953
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/44344240
has answer: http://stackoverflow.com/a/27975971
type: Question
has answer: http://stackoverflow.com/a/27975953
answer count: 2
tagged with: javascript
score: 0
has title: Toggle one button at at time Bootstrap
has comment: http://stackoverflow.com/comment/44344405
has body: I've been playing with this for the last hour and can't seem to figure out how to have one button toggle at a time. Also trying to have the button change to different color So if I click button1 it toggles. If I then click button2, then button1 untoggles and button2 toggles. Here's what I have so far Button1 Button2 Here it is in action: http://www.bootply.com/MaxkTJs3HH
accepted answer: http://stackoverflow.com/a/27975971

http://stackoverflow.com/q/28032900
upvote count: 0
has title: Canvas drawImage by division background sprites
tagged with: javascript
score: -1
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/28033541
type: AnsweredQuestion
has body: i am trying to set some image objects inside canvas elements (working very well) with sprites (stop working well..): Heads up: The code is simplified! HTML &lt;canvas id="canvasMap" width="600" height="600"&gt;&lt;/canvas&gt; &lt;div id="playerLeft"&gt;&lt;/div&gt; JS var canvas = document.getElementById('canvasMap'); var context = canvas.getContext('2d'); var img = new Image(); img.src = $($(document).find('#playerLeft').get(0)).css('background').replace(/^url\(["']?/, '').replace(/["']?\)$/, ''); img.onload = function () { context.drawImage(img, 0, 0); }; CSS #playerLeft { left: 0px; height:58px; display:block; width: 80px; background: url('/assets/sprites/angle.png') -0px -70px; } RESULT (Developer Console) Resource interpreted as Image but transferred with MIME type text/html: "http://example.com/rgba(0,%200,%200,%200)%20url(http://example.com/assets/spr…png)%20repeat%20scroll%200px%20-70px%20/%20auto%20padding-box%20border-box" THE QUESTION How can i made it, that the declared Image Object receives the background sprite by css defined id? I would like to solve it without a third party lib.
has comment: http://stackoverflow.com/comment/44455907
has answer: http://stackoverflow.com/a/28033541
tagged with: sprite
downvote count: 1
type: Question
tagged with: canvas

http://stackoverflow.com/comment/44406162
comment on: http://stackoverflow.com/q/28008852
has text: Just editing the given string so it works probably won't help much, you have to find what's causing the string to be invalid to begin with
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27980535
answers question: http://stackoverflow.com/q/27980361
score: 0
type: Answer
has body: base is a cursor you probably need fetch() here: var base = QuestionList.find({_id: questionId}).fetch(); or even findOne() : var base = QuestionList.findOne({_id: questionId});

http://stackoverflow.com/q/27999549
answer count: 2
possible better answer: http://stackoverflow.com/a/27999612
tagged with: handler
has body: I was having some problem when trying to do the animation like setTimeout() in Android Java. I have a list of geometries and I wanted to plot them onto map one at a time: public void getDirection(Event eventModel, final Context context) { String eventX = eventModel.getEventX(); String eventY = eventModel.getEventY(); //Code to get data geometry data from API and store in pathGeometries final Drawable d = EventDrawableImage.resizeCurrentLocImage("current_loc", context); for (int iii = 0; iii &lt; pathGeometries.size(); iii++) { final int counter = iii ; EventDetail.handler.postDelayed(new Runnable() { private long time = 0; public void run() { time += 1000; EventDetail.handler.postDelayed(this, 1000); moveNext(pathGeometries.get(counter).getX(), pathGeometries.get(counter).getY(), 0, d); } }, 1000); } } public static void moveNext(double coordx, double coordy, int k, Drawable d){ //EventMain.mMapView.removeAll(); // Set center Point p = new Point(coordx, coordy); EventMain.mMapView.zoomToResolution(p, 1); // Add marker PictureMarkerSymbol graphicIcon; graphicIcon = new PictureMarkerSymbol(d); Symbol symbol = graphicIcon; HashMap&lt;String, Object&gt; attrMap = new HashMap&lt;String, Object&gt;(); attrMap.put("currentLoc", "User Current location"); EventMain.graphicsLayer.addGraphic(new Graphic(p, symbol, attrMap)); } The problem that I was having now is at each point from pathGeometries passing into moveNext(), it does not hold for 20 seconds before moving to another point. Instead, it just loop all the way until the end without stopping at each point. Any ideas? Thanks in advance.
has title: Android Java handler post delay at each records in loop
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27999589
tagged with: android
type: AnsweredQuestion
tagged with: loops
has comment: http://stackoverflow.com/comment/44388614
type: Question
has answer: http://stackoverflow.com/a/27999589
has answer: http://stackoverflow.com/a/27999612
tagged with: java
score: 0

http://stackoverflow.com/q/28064651
has answer: http://stackoverflow.com/a/28065217
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/28067781
has comment: http://stackoverflow.com/comment/44509868
has title: Disable optgroup of multiple select which has specific label
has body: I have taken a select list with multiple option using ng-options. I am using it as below: --Select Supervisor-- This select dropdown get filled when I select some item from another dropdown.(It's a kind of cascaded dropdown). Filling it like below: $scope.GetWorkers = function (objA, objB, ddlType) { $http.post("user/Workers/", { userID: objA.Value }) .success(function (data, status, headers, config) { if (ddlType == 'sender') { $scope.sendList = data; } else { $scope.receiveList = data; $('#ddlWorkers optgroup[label="Current Users"] option').prop('disabled', true); // Not working } }) .error(function (data, status, headers, config) { showToast(ToastType.error, "Error occured while fetching workers.", "Failure"); }); } I want to disable child dropdown's specific group items. So I tried below code but it is not working: $('#ddlWorkers optgroup[label="Current Users"] option').prop('disabled', true); I don't know how do I disable specific group items of select whenever its data changes or new data loaded. Here is HTML output in which I want to disable all optgroup[label="Current Users"] members: Kevins Numen ggdfg fdgdfg Case Worker
linked to: http://stackoverflow.com/q/20318699
type: Question
score: 1
has comment: http://stackoverflow.com/comment/44511396
possible better answer: http://stackoverflow.com/a/28065217
answer count: 2
tagged with: ng-options
has comment: http://stackoverflow.com/comment/44509704
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/28067781
linked to: http://stackoverflow.com/q/11125078
has comment: http://stackoverflow.com/comment/44509978

http://stackoverflow.com/a/28051387
upvote count: 2
answers question: http://stackoverflow.com/q/28051316
has body: Firstly intid is not a standard attribute for a checkbox and will render the page invalid, meaning you could get some odd UI/JS behaviour. If you can, change it to use a data-* attribute instead: &lt;input type="checkbox" value="Dav123" data-intid="202" class="projectMember"&gt; Then in your JS you can use filter to find that specific element by the attributes you've got: jQuery.each(preload_presenters, function(i, val) { $('.projectMember').filter(function(){ return this.value == val.text &amp;&amp; $(this).data('intid') == val.intID; }).prop('checked', true); }); Example fiddle
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/28051316
score: 2

http://stackoverflow.com/comment/44573205
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28095405
has text: I don't think this is a protractor question.
score: 0

http://stackoverflow.com/comment/44399578
comment on: http://stackoverflow.com/a/28005518
has text: Not great with typescript. Try this: module MyModule { class MyClass { var myLocalReferenceToTheFunction; constructor(public myOtherService) { this.myLocalReferenceToTheFunction = myOtherService; } } }
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/61361979
type: AnswerComment
type: Comment
has text: The UI-Mask is awesome, except... It has this nasty functionality where if the pattern match fails, it clears the field on focus-away.
comment on: http://stackoverflow.com/a/33901334
score: 0

http://stackoverflow.com/a/28023148
type: AcceptedAnswer
downvote count: 0
score: 1
has body: Try to put the mail() function in condition like : if (mail($to,$email_subject,$email_body,$headers)){ return true; }else{ return false; } So you can check if the mail is sent or not.
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28023081
answers question: http://stackoverflow.com/q/28023081

http://stackoverflow.com/a/28025665
answers question: http://stackoverflow.com/q/28025392
downvote count: 0
upvote count: 2
has body: This is a perfect use case for ng-include. As per the Documentation, it fetches, compiles and includes an external HTML fragment. Use it like this: Javascript $scope.templates = [ { URL: '/path/to/file.html' }, { URL: '/path/to/file2.html'} ] HTML &lt;div ng-repeat="template in templates"&gt; &lt;div ng-include="template.URL"&gt; &lt;!-- Template markup goes here --&gt; &lt;/div&gt; &lt;/div&gt; And that's it. Just make sure that file.html and file2.html exist, and you can just drag your markup right into each corresponding one.
has comment: http://stackoverflow.com/comment/44437811
type: Answer
has comment: http://stackoverflow.com/comment/44438326
score: 2

http://stackoverflow.com/q/28033458
has answer: http://stackoverflow.com/a/28033558
has answer: http://stackoverflow.com/a/28034018
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/28034081
tagged with: javascript
linked to: http://stackoverflow.com/q/18017869
favorite count: 0
tagged with: hierarchy
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: How to create hierarchical HTML structure from flat JavaScript array?
has body: I have been asked to create a stock list using a hierarchal system with parent ID's. I'm having trouble displaying children under their parents. I know I need to use a recursive function of some kind but my brain just won't let me work out how it would go together to accommodate for infinite amounts of indenting. Example JavaScript data... [ {id: 1, parent_id: null, title: "Row 1"}, {id: 2, parent_id: 1, title: "Row 2"}, {id: 3, parent_id: 2, title: "Row 3"}, {id: 4, parent_id: 2, title: "Row 4"} ] Which the HTML should to look like... Row 1 Row 2 Row 3 Row 4 If anyone could help me it would be awesome as I've been stuck on this for almost 4 hours and I can't find anything that is relevant to my specific goal.
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/89045046

http://stackoverflow.com/comment/44771071
type: Comment
comment on: http://stackoverflow.com/q/28101121
type: QuestionComment
has text: I think he wants grunt to combine, minify and compress styles and scripts. This would be ideal for SCSS or LESS and CoffeeScript or Javascript.
score: 0

http://stackoverflow.com/comment/66991981
comment on: http://stackoverflow.com/q/27971933
type: QuestionComment
type: Comment
has text: Hi @IGNIS, did you find a solution? am also in search of a solution for this kind of problem. Can you share your solution here?
score: 0

http://stackoverflow.com/comment/44600789
type: AnswerComment
comment on: http://stackoverflow.com/a/28113410
type: Comment
score: 2
has text: Also if you go to "Network" tab, when the request is done then it will be shown, the column "Initiator" has the file and line

http://stackoverflow.com/comment/44413434
comment on: http://stackoverflow.com/q/28012816
score: 0
type: QuestionComment
type: Comment
has text: Here's a general discussion http://stackoverflow.com/questions/9614622/equivalent-of-jquery-hide-to-set-visibility-hidden (it relates to jQuery, but then you're already using jQuery anyway. It's not hard to show/hide without jQuery though)

http://stackoverflow.com/q/28103844
tagged with: http://stackoverflow.com/tag/html
has body: How would I go about inserting this text into an iframe at the caret location (and how can I make sure its plaintext; for example if they are pasting &lt; p >&lt; / p > it should post that in plaintext, rather than rendering the html.)? My code. It successfully gets the selection, but I think I am making a mistake on the range part. Either way, it doesn't work. iframeDocument.body.onpaste=function(e){ e.stopPropagation(); e.preventDefault(); if (navigator.userAgent.indexOf('MSIE') !== -1 ||navigator.appVersion.indexOf('Trident/') &gt; 0){ pasteddata = window.clipboardData.getData("Text"); var sel = document.getElementById("editor").contentWindow.window.getSelection(); range = document.getElementById('editor').contentDocument.createRange(); range.pasteHTML(pasteddata); return false; }
answer count: 0
tagged with: iframe
type: Question
has comment: http://stackoverflow.com/comment/44598118
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/44584851
tagged with: javascript
score: 0
has title: Insert text into iFrame in IE
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/comment/44344201
comment on: http://stackoverflow.com/q/27975519
score: 0
type: QuestionComment
type: Comment
has text: The problem is knowing (from the angular code) when the browser actually sends the ajax request... Is there a way to detect that?

http://stackoverflow.com/q/28095772
answer count: 1
tagged with: projekktor
score: 0
linked to: http://stackoverflow.com/q/939032
has body: I'm using projekktor for streaming my videos on browsers. I have many listeners attached on the event state. video.addListener('state', listener1); video.addListener('state', listener2); video.addListener('state', listener3); Inside the function listener3 and when state === 'COMPLETED' I need to remove the listener listener3. The thing is that to remove a listener you need the variable video. Given that listener3 is a callback, How do I pass the variable video to the function listener3?
has title: How to pass a variable to a listener/handler function
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: callback
has answer: http://stackoverflow.com/a/28096041
has comment: http://stackoverflow.com/comment/44568083
has comment: http://stackoverflow.com/comment/44567780
type: Question

http://stackoverflow.com/comment/44469219
score: 0
comment on: http://stackoverflow.com/q/28042719
has text: I think i cracked it: http://stackoverflow.com/questions/24711990/chrome-extension-contextmenus-api-can-not-add-onclick-handler?rq=1. https://developer.chrome.com/extensions/contextMenus#event-onClicked .
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44523482
score: 0
type: Comment
has text: sorry for that @maurycy
type: AnswerComment
comment on: http://stackoverflow.com/a/28071480

http://stackoverflow.com/q/28088510
tagged with: iframe
upvote count: 1
has answer: http://stackoverflow.com/a/28088781
type: Question
has body: I have an iframe on my site wrapped in a div. If I enter only one character in the telephone box it doesn't validate so red warning text appears. If I then click in the email box and press tab twice, on the second tab the form shifts to the left so I can no longer see the question text. How can I horizontally fix the form so it doesn't move to the left? IFrame code: &lt;div style="border: 0px solid #a1a1a1; width: 450px; border-radius: 25px; background: #83aeff; overflow: hidden;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;iframe style="overflow: hidden;" src="https://secure.workbooks.com/process/=QzM/Workbooks_Signup_Form?edition=trial" width="490px" height="330px" frameborder="0" scrolling="no"&gt; &lt;/iframe&gt;&lt;/div&gt; URL: http://content.workbooks.com/free-trial-workbooks-crm
tagged with: javascript
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/28088781
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Make iframe/form fixed position
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/44338447
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27972615
has text: And the store works in other places, like when you get graphs, correct?
score: 0

http://stackoverflow.com/comment/44607377
type: QuestionComment
has text: Please paste your js code as well.
comment on: http://stackoverflow.com/q/28116580
score: 0
type: Comment

http://stackoverflow.com/a/28070128
type: Answer
upvote count: 1
score: 1
has body: If you want everything to look exactly the way you want, then there is no better solution than iframe. The problem is that if you use some other solution (for example, using script from your site), then your CSS &amp; JavaScript may conflict with the rest of the page, for example: Fonts will most probably be messed up; Background colors, links etc will also be potentially wrong. If you really want to do it this way, then you should try reading something here: Embed an External Page Without an Iframe? (I just googled "embed html other website javascript".) Good luck!
downvote count: 0
answers question: http://stackoverflow.com/q/28070019

http://stackoverflow.com/a/28105475
type: Answer
answers question: http://stackoverflow.com/q/28105156
has body: I program JavaScript when using Parse CloudCode. In my case, I use CloudCode to call the Stripe API. For example: Objective-C NSDictionary *parameters = @{ @"customerId": stripeCustomerId, @"amount": @(100), }; [PFCloud callFunctionInBackground:@"chargeCustomer" withParameters:parameters block:block]; JavaScript Parse.Cloud.define("chargeCustomer", function(request, response) { Stripe.Charges.create({ amount: request.params.amount, // in cents currency: "usd", customer: request.params.customerId, },{ success: function (httpResponse) { console.log(httpResponse); response.success(httpResponse); }, error: function (httpResponse) { console.error(httpResponse.message); response.error(httpResponse.message); } }); }); As you can see, to pass on the variable from objective-c to javascript in this case, you use request.params.
score: 0
has comment: http://stackoverflow.com/comment/44586096

http://stackoverflow.com/a/28007354
has body: You're comparing strings. When comparing strings you get this: "10" &lt; "2" true Instead force the string to ints base 10: parseInt("10", 10) &lt; parseInt("1", 10) false Trying this: $("#sortable3, #sortable4").children().sortDomElements(function(a,b){ akey = parseInt(($(a).attr("sortkey"), 10); bkey = parseInt($(b).attr("sortkey"), 10); if (akey == bkey) return 0; if (akey &lt; bkey) return -1; if (akey &gt; bkey) return 1; }); should fix it.
score: 2
has comment: http://stackoverflow.com/comment/44402933
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44403031
accepted answer of: http://stackoverflow.com/q/28007330
type: Answer
answers question: http://stackoverflow.com/q/28007330
downvote count: 0

c#
tags question: http://stackoverflow.com/q/28061059
tags question: http://stackoverflow.com/q/27996951
tags question: http://stackoverflow.com/q/28091694
tags question: http://stackoverflow.com/q/27967322
tags question: http://stackoverflow.com/q/28010216
tags question: http://stackoverflow.com/q/28088984
tags question: http://stackoverflow.com/q/27987325
tags question: http://stackoverflow.com/q/28117094
tags question: http://stackoverflow.com/q/28107292
tags question: http://stackoverflow.com/q/28067385
tags question: http://stackoverflow.com/q/28060957
tags question: http://stackoverflow.com/q/28062828
tag name: c#
tags question: http://stackoverflow.com/q/28039260
tags question: http://stackoverflow.com/q/28026716
tags question: http://stackoverflow.com/q/27987215
tags question: http://stackoverflow.com/q/27991361
tags question: http://stackoverflow.com/q/28061259
tags question: http://stackoverflow.com/q/27971428
tags question: http://stackoverflow.com/q/28021386
tags question: http://stackoverflow.com/q/28051494
tags question: http://stackoverflow.com/q/27984384
tags question: http://stackoverflow.com/q/27988824
tags question: http://stackoverflow.com/q/28052114
tags question: http://stackoverflow.com/q/28090563
tags question: http://stackoverflow.com/q/28076184
tags question: http://stackoverflow.com/q/28094418
tags question: http://stackoverflow.com/q/28012917
tags question: http://stackoverflow.com/q/27973480
tags question: http://stackoverflow.com/q/28084053
tags question: http://stackoverflow.com/q/28076252
tags question: http://stackoverflow.com/q/28116234
tags question: http://stackoverflow.com/q/28091169
tags question: http://stackoverflow.com/q/27969311
tags question: http://stackoverflow.com/q/28009093
tags question: http://stackoverflow.com/q/28076657
tags question: http://stackoverflow.com/q/28113038
tags question: http://stackoverflow.com/q/28087293
tags question: http://stackoverflow.com/q/28064226
tags question: http://stackoverflow.com/q/28109092
tags question: http://stackoverflow.com/q/28057640
tags question: http://stackoverflow.com/q/28048437
tags question: http://stackoverflow.com/q/28000490
tags question: http://stackoverflow.com/q/28092910
tags question: http://stackoverflow.com/q/28024618
tags question: http://stackoverflow.com/q/28080957
tags question: http://stackoverflow.com/q/28056721
tags question: http://stackoverflow.com/q/28101896
tags question: http://stackoverflow.com/q/27981129
tags question: http://stackoverflow.com/q/28006686
type: Tag
tags question: http://stackoverflow.com/q/28017738
tags question: http://stackoverflow.com/q/28108816
tags question: http://stackoverflow.com/q/28022250
tags question: http://stackoverflow.com/q/28101300
tags question: http://stackoverflow.com/q/28068841
tags question: http://stackoverflow.com/q/27965908
tags question: http://stackoverflow.com/q/28041484
tags question: http://stackoverflow.com/q/28054601
tags question: http://stackoverflow.com/q/28040265
tags question: http://stackoverflow.com/q/28019916
tags question: http://stackoverflow.com/q/28062542
tags question: http://stackoverflow.com/q/28018754
tags question: http://stackoverflow.com/q/28024240
tags question: http://stackoverflow.com/q/27971364
tags question: http://stackoverflow.com/q/27989347
tags question: http://stackoverflow.com/q/27971546
tags question: http://stackoverflow.com/q/28012072
tags question: http://stackoverflow.com/q/27982089
tags question: http://stackoverflow.com/q/28118877
tags question: http://stackoverflow.com/q/27976439
tags question: http://stackoverflow.com/q/28060978
tags question: http://stackoverflow.com/q/27964283

http://stackoverflow.com/comment/44575066
type: AnswerComment
score: 0
type: Comment
has text: Can you please elaborate your answer? I already read docs on this function.
comment on: http://stackoverflow.com/a/28099589

http://stackoverflow.com/q/27968014
type: Question
tagged with: javascript
has title: I want to use disabled and enabled function with Jquery
has body: When I write x1 at my textbox and push the button, an alert occurs. And because of that the coupon had been used, after I shut down the alert , textbox and button becomes disabled I append the Remove Coupon text to the near it and when I click the Remove Coupon text, the textbox and button becomes enabled. However, when I click the button for the second time, it appends to the near of Remove Coupon text secondly. When I remove the Remove Coupon and enable it, How can I apply the process for again and again? Here are my codes and demo; APPLY COUPON $(document).ready(function(){ $('.couponApply').click(function(event){ var couponInputval = $(".couponInput").val(); if(couponInputval == "x1"){ alert('Coupon Applied!'); $( ".removeCoupon" ).append( "Remove Coupon" ); $(".couponInput, .couponApply").attr('disabled','disabled'); $('.removeCoupon').click(function(){ $(".couponInput, .couponApply").removeAttr('disabled','disabled'); }); } else{ alert('Error'); } event.preventDefault(); }); }); http://jsfiddle.net/509yp6k0/
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/27968093
tagged with: web
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44329044
accepted answer: http://stackoverflow.com/a/27968134
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: frontend
score: 1
has answer: http://stackoverflow.com/a/27968134
has answer: http://stackoverflow.com/a/27968093
upvote count: 1

http://stackoverflow.com/q/27977971
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27979267
has title: Show popout bubble above when no space available below
accepted answer: http://stackoverflow.com/a/27979267
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: I have build my custom drop down and it has a parent container who have fixed width and overflow:hidden in its css properties. when the element is on the bottom of the div like : I like to detect if the button is on bottom of the div then I change the drop down position to bottom currently its position is position:absolute;top:30px; my question is how to detect if the div is in the bottom of parent div bootstrap dropdown works. i have relative container and absolute dropdown
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css

http://stackoverflow.com/q/28035701
has comment: http://stackoverflow.com/comment/44456359
type: AnsweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/28036232
tagged with: ajax
type: Question
has body: Stucked in this situation: I upload several inputs fields and images using ajax. Images are encoded to base64 string with FileReader api. Everything seems to work except sending encoded images. My code (simplified): var groups = {}, objects = {}; objects["name"] = {}, objects["group"] = {}; objects["image"] = {}; var objectCount = $(".layout-object").length; $(".layout-object").each(function(i,v) { var k = objectCount-i; objects["name"][i] = $(v).val(); objects["group"][i] = $("#set-object-dropdown-"+k).val(); // get an image var file = document.getElementById('image-'+k).files[0]; var reader = new FileReader(); reader.onload = function(event) { objects["image"][i] = event.target.result; // get image in base64 }; reader.readAsDataURL(file); }); $(".layout-group").each(function(i,v) { groups[i] = $(v).val(); }); // prepare object for ajax request... var data = { name: $("#name").val(), groups: groups, objects: objects }; // console log shows all data correctly in place = in objects there is a propery "image"... console.log(data); // sending ajax POST request var posting = $.post( location.href, { data: data } ); posting.done(function(response){ console.log(response); }); Issue: in ajax request form data property "image" is missing, but before posting object with data is correct. Maybe is there a problem with readAsDataURL function and its onload event?
has title: Incomplete Form Data in ajax request
score: 0
tagged with: forms
accepted answer: http://stackoverflow.com/a/28036232
answer count: 1
has comment: http://stackoverflow.com/comment/44456988
tagged with: javascript
has comment: http://stackoverflow.com/comment/44457069

http://stackoverflow.com/comment/44435192
comment on: http://stackoverflow.com/a/28024621
type: Comment
has text: this works in a fashion but it is not keeping the data its delting the data then adding the line can u help
type: AnswerComment
score: 0

http://stackoverflow.com/a/28148905
has comment: http://stackoverflow.com/comment/44685048
downvote count: 0
has comment: http://stackoverflow.com/comment/44746984
has body: Have a look at the running tasks in series, from the Gulp documentation. If your tied to having one clean task then maybe try returning the stream per the second example from above, and see if that helps. I personally like to make clean tasks more specific, (more like the first example), so you could always try something like: ... // minify css gulp.task('clean:css', function(cb) { del(['dist/*.css'], cb); }); gulp.task('comp:css', ['clean:css'], function(cb) { return gulp.src('style.css') .pipe(minifyCss()) .pipe(rename('style.min.css')) .pipe(gulp.dest(build.css), cb); }); gulp.task('css', ['comp:css']); // concat js gulp.task('clean:js', function(cb) { del(['dist/*.js'], cb); }); // and so on
has comment: http://stackoverflow.com/comment/44692530
answers question: http://stackoverflow.com/q/28112810
type: Answer
has comment: http://stackoverflow.com/comment/44780034
has comment: http://stackoverflow.com/comment/44752367
has comment: http://stackoverflow.com/comment/44690831
upvote count: 3
has comment: http://stackoverflow.com/comment/44693223
has comment: http://stackoverflow.com/comment/44722505
has comment: http://stackoverflow.com/comment/44679270
has comment: http://stackoverflow.com/comment/44679402
score: 3

http://stackoverflow.com/comment/44336552
comment on: http://stackoverflow.com/q/27971971
score: 0
type: Comment
has text: `requestAnimationFrame` renders `setTimeout` obsolete for these kinds of scenario. Why are you using both?
type: QuestionComment

http://stackoverflow.com/a/28013398
has body: 1) You can achieve it like this. var form = document.getElementById("myForm"); if (form.elements.namedItem("pin").value === "") { alert("Please fill in your '4 Digit PIN' in the box."); valid = false; } else if (form.elements.namedItem("pin").value === "1234") { content: "✓"; color: green; } Do the same for the rest of the conditions. As suggested in the comments, the javascript code you have written has no effect as the syntax is not write. you can check How to use document.getElementByName and getElementByTag? to know more about getting elements by name and by ID. 2) For your onSubmit function, you do not need to add ; . check this tutorial for more details. http://www.formget.com/javascript-onsubmit/ 3) Please note, I have used === instead of ==. In your case it should not make any difference. However just for information, === matches object type and value both. == matches only value. So if you want to be sure that the two objects you are matching are of same type and value, then use === otherwise ==. Some IDE's give warning if you use ==. 4) Your form is getting validated as you are entering something in the text fields. You have a check for text fields to be empty and text fields to have correct text. But you do not have anything that check for incorrect input. Just do not add anything and hit submit button. Your validate function should work Modify your code like this if (form.elements.namedItem("pin").value === "" || form.elements.namedItem("pin").value != "1234") { alert("Please fill in your '4 Digit PIN' in the box."); valid = false; } Here is the working code. I have made some changes in your code and have commented them for your reference. The code is not working on JSFiddle which I do not know why. However I have tested it in Chrome and firefox and works fine. Hope this will solve your issue. :) Validation John Doe (C1_A2_2015) 4 Digit PIN: Surname: E-mail:
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28013226
has comment: http://stackoverflow.com/comment/44415710
answers question: http://stackoverflow.com/q/28013226
has comment: http://stackoverflow.com/comment/44452935
score: 1
has comment: http://stackoverflow.com/comment/44490689
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44425407
type: Answer

http://stackoverflow.com/comment/44396545
comment on: http://stackoverflow.com/q/28003814
has text: The function is not run for first five minutes of the day that results in no storage/upload at all. That is the problem. I have edited the question for clarity.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44337177
type: Comment
comment on: http://stackoverflow.com/a/27968520
type: AnswerComment
has text: it is now. I think when I initially tried it wasn't. Maybe it required the restart that resulted in the console working again.
score: 0

http://stackoverflow.com/q/28013042
has comment: http://stackoverflow.com/comment/44413338
has comment: http://stackoverflow.com/comment/44413439
has comment: http://stackoverflow.com/comment/44413320
type: Question
has comment: http://stackoverflow.com/comment/44421468
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44414088
has comment: http://stackoverflow.com/comment/44414497
has comment: http://stackoverflow.com/comment/44414183
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: Jquery ajax get method not working
has comment: http://stackoverflow.com/comment/44413397
has answer: http://stackoverflow.com/a/28013687
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/44413213
has comment: http://stackoverflow.com/comment/44414272
has comment: http://stackoverflow.com/comment/44413276
has body: I am using the following code but it seems to be not working. Sorry for asking this simple question but I want to know why this code is not working $(document).ready(function(){ $("button").click(function(){ $.get("smiley1.html",function(data,status){ alert("Data: " + data + "\nStatus: " + status); }); }); }); Send an HTTP GET request to a page and get the result back Please help me to solve it. Thanks
has comment: http://stackoverflow.com/comment/44429445
score: -2

http://stackoverflow.com/q/28049881
has answer: http://stackoverflow.com/a/28050342
accepted answer: http://stackoverflow.com/a/28050342
upvote count: 0
has body: I am trying to use _.where to look through this large json mapping file. I have used it before but the search terms never contained spaces and the function worked well. Now I am using search terms that have spaces and it never brings back any matches. Here is a segment of code with an example entityName (the search term). entityName = "HEMTT WRECKER M984A1 MK19"; alert("entityName2: " + entityName); entityMap = _.where(cdpeConfig.oobEntityMap, { "obs name" :entityName}); alert("entityMap: " + entityMap); Inside of the oobEntityMap there are json elements the above entityName should match with the following: { "obs name":"HEMTT WRECKER M984A1 MK19", "edcss name":"M977_HEMTT_CARGO", "mapping type":"skos:relatedMatch", "obs dis enum":"1:2:225:7:19:3:2", "edcss dis enum":"1:0:225:9:19:1:0" }
has title: Does javascript _.where() function not allow spaces in the string?
downvote count: 1
has comment: http://stackoverflow.com/comment/44482429
has answer: http://stackoverflow.com/a/28050343
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44481951
has comment: http://stackoverflow.com/comment/44482156
tagged with: underscore.js
score: -1
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/44482371
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/28050343
has comment: http://stackoverflow.com/comment/44481867

http://stackoverflow.com/q/28000665
tagged with: jquery
has comment: http://stackoverflow.com/comment/44390683
has comment: http://stackoverflow.com/comment/44390720
has comment: http://stackoverflow.com/comment/44390545
has answer: http://stackoverflow.com/a/28000836
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44390570
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/28000836
type: Question
has comment: http://stackoverflow.com/comment/44390738
has comment: http://stackoverflow.com/comment/44390492
has comment: http://stackoverflow.com/comment/44390625
has comment: http://stackoverflow.com/comment/44390515
has comment: http://stackoverflow.com/comment/44390760
score: 0
has comment: http://stackoverflow.com/comment/44390500
has comment: http://stackoverflow.com/comment/44390749
upvote count: 1
tagged with: forms
has body: Using jQuery its quite simple to post data to a server using ajax. Is there a jquery function to post a form using the form name and receive the status from the server like other traditional ajax post calls. But what if we simply wanted to post a form by its name or ID and when I have an unknown set of form fields. What Id like to do is fetch the form on the page, and just submit the form and current data See example code: HTML post using ajax JS $('.postform').click( function() { form_name = $(this).attr('form_name'); postto = 'http://mysite-endpoint.com/api'; form = $(form_name).submit(postto).done(function(data) { var ndata = jQuery.parseJSON(data); if(ndata.status=='error') { //display error } if(ndata.status=='success') { //looks good } }); return false; });
has comment: http://stackoverflow.com/comment/44390650
has comment: http://stackoverflow.com/comment/44390667
answer count: 1
downvote count: 1
has title: Posting a form with ajax and unknown form fields
has comment: http://stackoverflow.com/comment/44390563
has comment: http://stackoverflow.com/comment/44390506
tagged with: javascript

http://stackoverflow.com/comment/44481405
score: 0
comment on: http://stackoverflow.com/a/28049135
type: AnswerComment
type: Comment
has text: This is just for practice but it would have been more aesthetically pleasing to my pedantic mind if I could have removed the inner function got away with a one liner. Ah well. Onward and up. Cheers for answering Alnitak.

http://stackoverflow.com/q/28054773
has comment: http://stackoverflow.com/comment/44492745
has comment: http://stackoverflow.com/comment/44492285
has title: Backbone js Model Save more than once
linked to: http://stackoverflow.com/q/28064320
has body: Iam learning Backbone js and so I have started creating sample application. BTW, iam facing one problem now ie., model is saving more than once in my database. I mean when you click 'Create User' , you'll see a form, so when I click that 'Create User' button, details are getting saved more than once in my DB and so all duplicate users info displayed in the home page. Actually iam trying to practice this video: https://www.youtube.com/watch?v=FZSjvWtUxYk The output would look like this: http://backbonetutorials.com/videos/beginner/#/new Here is my Code: User Manager Please suggest me what went wrong and how to fix this?
linked to: http://stackoverflow.com/q/18504235
type: Question
has comment: http://stackoverflow.com/comment/44492370
has comment: http://stackoverflow.com/comment/44491472
has comment: http://stackoverflow.com/comment/44492900
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/28061202
answer count: 1
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/44495233
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44501664

http://stackoverflow.com/q/28016476
possible better answer: http://stackoverflow.com/a/48104739
has body: I'm still trying to understand angular... Basically, I have an html5 video and I want to listen to the onloadeddata event (http://www.w3schools.com/jsref/event_onloadeddata.asp). This is what I have: html: &lt;video autoplay="autoplay" loaded-data loop style="display: none;"&gt; &lt;source src="videos/example.mp4" type="video/mp4"&gt; &lt;source src="videos/example.ogg" type="video/ogg"&gt; &lt;/video&gt; directive: angular.module('myApp') .directive('loadedData', function () { return function ($scope, $element) { $element.addEventListener("loadeddata", function () { console.log('test'); // never calls }); } }); Is this the correct way of handling this? For some reason, the event listener never gets called. I've also tried $element.bind('loadedData', function () { console.log('test'); }); but it also doesn't work...
accepted answer: http://stackoverflow.com/a/28016540
has title: Angular on video load event
tagged with: angularjs-directive
type: AnsweredQuestion
upvote count: 5
tagged with: html5-video
type: Question
answer count: 2
score: 5
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/28016540
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/48104739
favorite count: 0

formula
tags question: http://stackoverflow.com/q/28098524
tag name: formula
type: Tag

http://stackoverflow.com/comment/44378659
type: AnswerComment
score: 0
type: Comment
has text: re-re-considering, i put it back up, it does have some decent examples. i still think an educational response is more apropos...
comment on: http://stackoverflow.com/a/27993570

http://stackoverflow.com/a/28089868
score: 3
upvote count: 3
type: Answer
has body: I have put together the following jQuery function to solve your problem. It iterates through the values, determines the largest and second largest values then applies the `text-bold' class to the relevant cells in the table JSFiddle DEMO $(function(){ //set initial values var largest = 0; var second = 0; //fetch the td elements with sum class var $sums = $('td.sum'); //iterate through to find the values that represent largest and second $sums.each(function(){ //set value of cell to variable for comparison (parsed to ensure it is a number) var value = parseInt($(this).text()); if(largest == 0) { largest = value; } else if(value &gt; largest) { second = largest; largest = value; } else if(value == largest) { } //this prevents second from being overwritten by a duplicate largest value else if(value &gt; second) { second = value; } else { } }); //iterate through again bolding the largest and second largest values //had to use this method because values can exist more than once $sums.each(function(){ if($(this).text() == largest || $(this).text() == second) { $(this).addClass("text-bold"); } }); }); You also need to make a slight adjustment to your CSS. the .text-bold class should have font-weight not text-weight assigned. .text-bold { font-weight: 700; }
downvote count: 0
answers question: http://stackoverflow.com/q/28089582

http://stackoverflow.com/a/65844878
answers question: http://stackoverflow.com/q/28007949
has body: If you didn't want to use toString() or join(), you could do something like this: for(let i=0;i&lt;/*Array*/.length;i++)if(/*Variable*/==&quot;&quot;)/*Variable*/+=/*Array*/[i];else /*Variable*/+=&quot;/*Separator*/&quot;+/*Array*/[i]; Separator is what to put between each item. In your case, you would change that to a space.
score: 0
type: Answer

http://stackoverflow.com/comment/44519827
type: QuestionComment
has text: Are you showing the actual code here? Looks like infowindow is undefined in your call to addListener - or is it a global not shown?
comment on: http://stackoverflow.com/q/28069881
score: 0
type: Comment

http://stackoverflow.com/comment/44555166
score: 0
comment on: http://stackoverflow.com/a/28089228
type: Comment
has text: @northkilidonan wasn't meant to be rude sorry, reading it again sound very rude :/
type: AnswerComment

http://stackoverflow.com/comment/44401997
has text: Setting 'font-size:100%' manually on extension's html page does the trick!!! Wonder why the default size of body wasn't 100%. Thanks
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28006732

http://stackoverflow.com/q/27967988
has answer: http://stackoverflow.com/a/27968364
has comment: http://stackoverflow.com/comment/44328893
upvote count: 11
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44328791
has answer: http://stackoverflow.com/a/27968182
tagged with: loops
possible better answer: http://stackoverflow.com/a/27968364
downvote count: 1
type: Question
score: 10
tagged with: javascript
has answer: http://stackoverflow.com/a/27968439
has comment: http://stackoverflow.com/comment/44328819
has comment: http://stackoverflow.com/comment/44328685
tagged with: iterator
accepted answer: http://stackoverflow.com/a/27968182
tagged with: for-loop
answer count: 3
favorite count: 0
has body: So I was dissapointed to find out that JavaScript's for ( var in array/object) was not equivalent to pythons for var in list:. In JavaScript you are iterating over the indices themselves e.g. 0, 1, 2, ... where as with Python, you are iterating over the values pointed to by the indices e.g. "string var at index 0", 46, "string var at index 2", ["array","of","values"], ... Is there a standard JavaScript equivalent to Python's looping mechanism? Disclaimer: I am aware that the for (var in object) construct is meant to be used to iterate over keys in a dictionary and not generally over indices of an array. I am asking a specific question that pertains to use cases in which I do not care about order(or very much about speed) and just don't feel like using a while loop.
has title: Is there a JavaScript equivalent to Python's for loops?
tagged with: python

http://stackoverflow.com/q/28086304
type: Question
has answer: http://stackoverflow.com/a/28086478
tagged with: google-maps
tagged with: javascript
tagged with: jquery
has title: Googlemaps API loads slow with many markers
tagged with: google-maps-markers
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: page-load-time
score: 1
upvote count: 3
has comment: http://stackoverflow.com/comment/44559210
downvote count: 2
has body: Im trying to load around 600 googlemap markers on page load using the function addMarker. The page takes a lot of time to load. Is there anything I can do to make it load faster while keep using the addMarker function? Thanks. var map var myLatlng = new google.maps.LatLng(35.9531719,14.3712201); var markerBounds = new google.maps.LatLngBounds(); var markers = {}; function HomeControl(controlDiv, map) { google.maps.event.addDomListener(zoomout, "click", function() { var currentZoomLevel = map.getZoom(); if(currentZoomLevel != 0) { map.setZoom(currentZoomLevel - 1); } }); google.maps.event.addDomListener(zoomin, "click", function() { var currentZoomLevel = map.getZoom(); if(currentZoomLevel != 21) { map.setZoom(currentZoomLevel + 1); } }); } function initialize() { var googleMapOptions = { center: new google.maps.LatLng(35.9531719,14.3712201), zoom: 11, mapTypeId: google.maps.MapTypeId.ROADMAP, zoomControl: false, streetViewControl: false, panControl: false, draggable: true }; map = new google.maps.Map(document.getElementById("map-canvas"), googleMapOptions); google.maps.event.addListener(map, "idle", function() { addMarker(latitude,longitude,id,'Title','url'); }); var homeControlDiv = document.createElement("div"); var homeControl = new HomeControl(homeControlDiv, map); } var infowindow = new google.maps.InfoWindow({ content: "" }); function addMarker(lat,long,id,desc,url) { var myIcon = new google.maps.MarkerImage("/images/pips/"+id+".png", null, null, null, new google.maps.Size(28,38)); var myLatlng = new google.maps.LatLng(lat,long); var marker = new google.maps.Marker({ map: map, title: desc, position: myLatlng, icon: myIcon, id: id }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent('&lt;a href="' + url + '"&gt;' + desc + '&lt;/a&gt;'); infowindow.setPosition(marker.getPosition()); infowindow.open(map, marker); }); markers[id] = marker; markerBounds.extend(myLatlng); google.maps.event.addListener(marker, "click", function() { in…

http://stackoverflow.com/a/28097025
score: 1
answers question: http://stackoverflow.com/q/28096580
upvote count: 1
has body: I would recommend using for...in loop, since you're using objects instead of arrays. for (variable in object) {... } If length property of both objects is equal, then this kind of loop alone will help you to compare objects with ease.
type: Answer
has comment: http://stackoverflow.com/comment/44569933
has comment: http://stackoverflow.com/comment/44570381
downvote count: 0

http://stackoverflow.com/q/28073693
has comment: http://stackoverflow.com/comment/44528143
type: UnansweredQuestion
tagged with: regex
answer count: 0
has comment: http://stackoverflow.com/comment/44527968
has comment: http://stackoverflow.com/comment/44526933
has body: I was having a look at a github issue in less project which is trying to permit whitespace sensitivity instead of braces akin to stylus. I started (quite brutally) hacking together a possible proposed solution so that instead of replacing the less parser completely, the even-less (whitespace sensitive version of less) can be pre-processed into less, which can then be parsed as usual. // make input string var src = [ ".navbar", " display:block;", " .item", " float:left;", " text-decoration:none;", " &amp;:hover", " text-decoration:underline;" ].join("\n") function parseEvenLess(src){ // split intput string into lines var lines = src.split("\n"); // declare variables to handle output, and tracking of indents var out = [], lastIndent = "", currentIndent = "", extras = []; // loop through lines, then each indent added during loop for(var i = 0; i &lt; lines.length + extras.length; i++){ // get the current line (from lines or added indents) var line = lines[i] || extras[i-lines.length]; // get the current indentation string currentIndent = line.match(/^\s*/)[0]; // attempt to handle ommision of `:` and `;` // must be done retrospectively (on previous line) to disambiguate `element:right` as selector or rule definition if(i &amp;&amp; currentIndent.length &lt;= lastIndent.length){ out[i-1] = out[i-1].replace(/^(\s*[^\s:]+)(\s*:\s*|\s+)(\S[^;]+);?$/g, "$1: $3;"); } // if we have increased the indentation if(lastIndent.length &lt; currentIndent.length){ // add an opening brace out[i-1] += " {"; // slip the indent onto the indentations array to handle insertion of closing braces extras.unshift(lastIndent); } // if we have decreased indentation if(lastIndent.length &gt; currentIndent.length){ // prepend the line with a closing brace (indented) line = currentIndent+"}" + line; } // add the line to the final output array out.push(line); // store reference to currentIndent for use in next iteration lastIndent = currentIndent; } // return the final string return out.join("\n"); }…
tagged with: less
type: Question
has comment: http://stackoverflow.com/comment/44527608
tagged with: javascript
has comment: http://stackoverflow.com/comment/44527650
score: 0
has comment: http://stackoverflow.com/comment/44527986
has title: Preprocess less to permit whitespace sensitive syntax

http://stackoverflow.com/q/28059860
tagged with: jquery-ui
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/44501382
has comment: http://stackoverflow.com/comment/44501253
has comment: http://stackoverflow.com/comment/44501425
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28060404
has title: Jquery Ui Tabs Reload a tab in javascript
type: UnansweredQuestion
has body: I am new to jquery and am using jquery Ui tabs. I'd like to refresh the contents of a tab on button click. I am able to refresh the contents but when I click on the button again after refreshing the page, the call is sent twice or the number of times refresh took place. How can I resolve this. Some of my code: Rights General @Html.Partial("ConfigRights",@Model.Item2,null) //some code I am calling the javascript function from an iframe in the RightsConfig Tab
type: Question
has comment: http://stackoverflow.com/comment/44501337

http://stackoverflow.com/comment/44405439
has text: Updated the question and will keep updating for more, thanks!
comment on: http://stackoverflow.com/q/28008678
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27974066
has answer: http://stackoverflow.com/a/35485186
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/58663323
score: 0
tagged with: sqlite
answer count: 1
tagged with: cordova
has title: Check if database exists using phonegap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44359474
has body: i need check if exists an database creating in my application with phonegap. Searching lot but i dont nothing found. I found content just talking about tables that already exist but nothing talking about how to verify that the database created exists. Thanks!
has comment: http://stackoverflow.com/comment/44341051

http://stackoverflow.com/comment/44622977
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28120068
score: 0
has text: Thanks for the answer, but with this method i can't get it to work. I set var extraDamage = false at the start of the setonfire function, checked in the loop for if (extraDamage === true) and wrote an onClick function doExtraDamage() { extraDamage = true; }. Still the loop itself while it is running is not interested in what i do with the button. Am i missing something?

http://stackoverflow.com/a/27992142
type: Answer
answers question: http://stackoverflow.com/q/27965485
has body: I think you misinterpret the meaning of partialRight function. Lodash documentation states for partialRight that This method is like _.partial except that partial arguments are appended to those provided to the new function. You, probably, thought that it is same as curry but goes from the right, but it's not! It will just append the extra arguments to the right of argument list: function baz() { console.log(arguments) } var qux = _.partialRight(baz, 'should be second parameter, but is not') console.log(qux("first parameter", "second parameter, should be ignored, but it's not!")) which produces: { '0': 'first parameter', '1': 'second parameter, should be ignored, but it\'s not!', '2': 'should be second parameter, but is not' } In lodash 3.0.0-pre there's function curryRight which you should try, in lodash 2.4.1 there're no such function, so I'm using dumb swap: var when = require('when'); var node = require('when/node'); var _ = require('lodash'); function readFile(param1, param2, callback) { console.log(Array.prototype.slice.call(arguments)); callback(null, [param1, param2]); } /* Swaps arguments of function with two arguments*/ function swap(f) { return function (a,b) { return f(b,a); } } var foo = _.curry(swap(node.lift(readFile)))("base64") var bar = function (fileName, index) { return node.lift(readFile)(fileName, 'base64'); }; when.map(['1', '2'], bar).done(); // works when.map(['3', '4'], foo).done(); // does work BTW, thanks for Short, Self Contained, Correct Example!
score: 0

http://stackoverflow.com/a/28080310
type: Answer
score: 2
has body: @interface is purely a type checker construct. In uncompiled code there is nothing that can inspect the comments for @interface/@implements to add any wiring for runtime checks. The goal for Closure is that the code will run the same before and after compilation (assuming that you observe the restriction for the optimization mode you are using). The typical pattern when a runtime check is desired is to tag class that implements the interface you are interested in: my.Dog.prototype.implements_my_Animal = true; then if (foo.implements_my_Animal) ... This is a bit annoying so you don't see it where it isn't needed. There are various ways to wrap this but, if you use ADVANCED mode, most result in the implementing class (my.Dog in your example) escaping and not being removable if unused.
has comment: http://stackoverflow.com/comment/76328327
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28063982
upvote count: 2
answers question: http://stackoverflow.com/q/28063982

http://stackoverflow.com/q/27968162
linked to: http://stackoverflow.com/q/4775722
tagged with: javascript
answer count: 6
upvote count: 2
tagged with: multidimensional-array
has answer: http://stackoverflow.com/a/27968908
has answer: http://stackoverflow.com/a/76429405
has answer: http://stackoverflow.com/a/27968389
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27968366
has body: I'm trying to add all the elements of an array in which are embedded 3 other arrays of differing lengths. At the third level are two 1-element arrays whose values I cannot figure out how to access. What am I doing wrong? Please advise (no lamp-throwing, please). function addArrayElems(arr) { var sum = 0; for (var i = 0; i &lt; arr.length; i++) { if (typeof arr[i] === "number") sum += arr[i]; for (var j = 0; j &lt; arr.length; j++) { if (typeof arr[i][j] === "number") sum += arr[i][j]; } //arr[i][j][k] doesn't work for (var k = 0; k &lt; arr.length; k++) { if (typeof arr[i][j][k] === "number") sum += arr[i][j][k]; } for (var l = 0; l &lt; arr.length; l++) { if (typeof arr[i][j] === "number") sum += arr[i][j]; } } return sum; } var arr = [1, 2, 3, 4, 5, [6, 7, 8, [9], [10]]]; console.log(addArrayElems(arr));
tagged with: addition
has answer: http://stackoverflow.com/a/27968794
has answer: http://stackoverflow.com/a/27968350
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44329175
has title: Newbie Multidimensional Array Addition Dilemma
type: Question
tagged with: arrays

http://stackoverflow.com/a/49823625
has body: Got same problem on one of Heroku servers and just fixed this by adding "ext-gd": "*", to composer.json file require section, hope this will help some one in the future.
answers question: http://stackoverflow.com/q/28103078
score: 0
type: Answer

http://stackoverflow.com/comment/44356146
score: 0
type: Comment
type: AnswerComment
has text: no, it does not seem to work. Same behavior is observed.
comment on: http://stackoverflow.com/a/27982427

http://stackoverflow.com/comment/45038121
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27998407
has text: What version of socket.io are you using?
score: 0

http://stackoverflow.com/q/28029773
has comment: http://stackoverflow.com/comment/44444352
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/28029802
type: Question
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/44444350
downvote count: 2
has title: access object variable from method javascript
has comment: http://stackoverflow.com/comment/44444417
answer count: 1
has body: i have a problem accessing an array within an object method. While the log returns the value perfectly, the following line returns an error that allRect[n] is undefined. I suppose it has something to do with variable accessibility, but the fact that it can be logged in one line and refuses it's existence in the next one leaves me a bit out of ideas. Thanks all. this.s = Snap('#'+id); var allRects = []; this.xPos = 0; var scale = vizWidth/locationSum(data); ... //methods this.updateViz = function() { apiRequest('datasets', 164, 'json').done( function(data){ var n = 0; data = locationDataIntoArray(data); for(i = 0; i&lt; allRects.length; i++){ console.log(allRects[n]); allRects[n].animate({ width:parseInt(data[i][2]), opacity:evaluateMachine(data[i][0])},3000); n++; allRects[n].animate({ width:parseInt(data[i][3]), opacity:evaluateTech(data[i][1])},3000); n++; } } ) };
favorite count: 0
has comment: http://stackoverflow.com/comment/44444371
has comment: http://stackoverflow.com/comment/44445529
accepted answer: http://stackoverflow.com/a/28029802

http://stackoverflow.com/comment/44586826
type: QuestionComment
comment on: http://stackoverflow.com/q/28106166
has text: Yes, you can do this with `replace`. You'd use capture groups. You may or may not need to use a function as the second argument (why does 97080 get `/W` after it, but 83233 gets `%20`?). Give it a go. Read the docs.
score: 0
type: Comment

http://stackoverflow.com/comment/44486272
type: Comment
type: QuestionComment
has text: @StackAwalke yes, I do.
comment on: http://stackoverflow.com/q/28050907
score: 0

http://stackoverflow.com/q/28050658
has title: InDesign CS6 javascript: importXML and remove empty pages
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28050787
score: 0
answer count: 1
tagged with: adobe-indesign
tagged with: http://stackoverflow.com/tag/xml
has body: I use InDesign CS6. I wrote a javascript to add an option into menu: it first imports an XML in a document, then removes empty pages. As run, before it actually imports an XML file, it removes empty pages. So there aren't enough pages for the XML. How to excute these 2 functions as wanted? Here is my program: var menuItem = "XML"; var smaTitle1 = "Import XML"; var sma1 = app.scriptMenuActions.add(smaTitle1); // Add an Event Listener sma1.addEventListener( /*event type*/ 'onInvoke', /*event handler*/ function(){ importXML(xmlPath); } ); sma1.addEventListener( /*event type*/ 'afterInvoke', /*event handler*/ function(){ // Remove empty pages alert("remove pages"); removeEmptyPages(); } ); function importXML(xmlPath){ if (app.documents.length != 0){ var myDocument = app.documents.item(0); //import the entire XML structure in the document. var myXMLImportPreferences = myDocument.xmlImportPreferences; myXMLImportPreferences.allowTransform = false; myXMLImportPreferences.ignoreWhitespace = true; myXMLImportPreferences.removeUnmatchedExisting = false; myXMLImportPreferences.importStyle = XMLImportStyles.MERGE_IMPORT; myXMLImportPreferences.repeatTextElements = true; var path = new File(xmlPath); var file = path.openDlg("Importer XML", "XML:*.xml", false); if (file != null) { myDocument.importXML(file); } } } function removeEmptyPages(){ ... // a loop to remove empty pages pages[i].remove(); ... }
type: UnansweredQuestion

http://stackoverflow.com/q/27966803
accepted answer: http://stackoverflow.com/a/27967102
has answer: http://stackoverflow.com/a/27966873
tagged with: http://stackoverflow.com/tag/html
has body: Not really sure why my register and login are right on top of each other. Probably a simple fix, but I'm pretty newish to this. I would also like to keep the dropdown menu to be right underneath the login text which is also having some issues. I just can't seem to get it to be like a normal dropmenu. A good example would of what I want to achieve would be the help box at the top of the stackoverflow site. jsfiddle: http://jsfiddle.net/Karmatix/v2z5bnvh/ Also if you could explain the solution I would greatly appreciate it. I would like to learn why I'm wrong and understand the solution so it doesn't happen again. Thanks in advance! html (got some jquery but that isn't the issue) <link rel="stylesheet" type="text/css" href="text.css" Login 1 2 3 Register css body { padding: 0; margin: 0; } nav ul{ margin: 0; padding: 0; list-style:none; } nav ul li{ float: right; width: 100%; height: 30px; line-height: 30px; text-align: right; background-color: #000; color: #fdfdfd; display: inline; } nav ul li a{ text-decoration: none; color: #fdfdfd; } nav ul li li { display: none; color: #fdfdfd; }
tagged with: css
has comment: http://stackoverflow.com/comment/44326656
answer count: 4
type: AnsweredQuestion
has title: Why isn't my text inline?
possible better answer: http://stackoverflow.com/a/27966873
has answer: http://stackoverflow.com/a/27966857
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44326784
score: 0
has answer: http://stackoverflow.com/a/27967102
has answer: http://stackoverflow.com/a/27966859

http://stackoverflow.com/comment/44488405
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28052312
type: Comment
has text: http://jsfiddle.net/incrediblex/e27r8/693/ Here is my further work. I want to set href of the element to the id got from data-id attribute and its working fine but only for the first element. Please review my fiddle. Thanks

http://stackoverflow.com/comment/44539680
type: Comment
type: QuestionComment
has text: @Felix Kling yes, much better. Being nice is for losers, remember this.
comment on: http://stackoverflow.com/q/28080316
score: 0

http://stackoverflow.com/q/28031404
tagged with: firefox
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/28080700
accepted answer: http://stackoverflow.com/a/28032323
has comment: http://stackoverflow.com/comment/44447656
tagged with: selenium
tagged with: python
has answer: http://stackoverflow.com/a/28032323
tagged with: selenium-webdriver
has body: I'm trying to set textarea value using javascript instead send_keys() method. As documentation says, I should be able to pass webelement to execute_script as parameter and refer to this parameter via arguments array. However, I've checked in firefox js console, that arguments is Object and it doesn't matter what i put as execute_script argument - arguments is always an empty object. &gt;&gt;&gt;&gt; web = webdriver.Firefox() &gt;&gt;&gt;&gt; web.get("http://somepage.com") &gt;&gt;&gt;&gt; element = web.find_element_by_tag_name("textarea") &gt;&gt;&gt;&gt; web.execute_script("return typeof(arguments)", element) u'object' &gt;&gt;&gt; web.execute_script("return arguments",element) [] Anyone has any experience with similarly subject? How can I put webElement as argument for javascript? Using Firefox 35.0, selenium 2.44.0.
type: AnsweredQuestion
has title: Selenium+firefox: empty execute_script arguments
has answer: http://stackoverflow.com/a/28080700
score: 4
has comment: http://stackoverflow.com/comment/44447831
type: Question
upvote count: 4
answer count: 2

http://stackoverflow.com/q/28080304
has body: According to String.Trim, trim() will remove all the whitespace at both ends, but I tried on Chrome 39 and Firefox 35, " abc ".trim() outputs "abc ", not "abc". Is that a bug? While IE11 handles that correctly.
accepted answer: http://stackoverflow.com/a/28080359
has title: String.trim only remove the white space on the begin when there are at both ends in Chrome 39 & Firefox
downvote count: 1
has comment: http://stackoverflow.com/comment/44539249
type: AnsweredQuestion
score: -1
type: Question
upvote count: 0
has answer: http://stackoverflow.com/a/28080359
answer count: 1
tagged with: javascript
tagged with: string
has comment: http://stackoverflow.com/comment/44539237
favorite count: 0

http://stackoverflow.com/comment/44453370
type: Comment
comment on: http://stackoverflow.com/q/28033729
has text: ver DataTables 1.10.4: line number 3019
score: 0
type: QuestionComment

http://stackoverflow.com/q/28094864
upvote count: 1
has comment: http://stackoverflow.com/comment/44565756
has comment: http://stackoverflow.com/comment/44565870
has answer: http://stackoverflow.com/a/28095015
tagged with: jquery
favorite count: 0
has body: I have a pseudoelement :after content defined in CSS. div:after { content:'This is the sentence.'; } Can anyone please advise me how to target the first character of the content and change its style. Jquery is OK but I'm trying to do it with first* pseudoelement.
has comment: http://stackoverflow.com/comment/44566293
tagged with: css
has comment: http://stackoverflow.com/comment/44565798
downvote count: 0
has comment: http://stackoverflow.com/comment/44565852
type: UnansweredQuestion
score: 1
has title: Targeting :first-letter of :after content pseudoelement
type: Question
tagged with: pseudo-element
has comment: http://stackoverflow.com/comment/44565733
has comment: http://stackoverflow.com/comment/44565776
tagged with: javascript
has answer: http://stackoverflow.com/a/28095039
has answer: http://stackoverflow.com/a/28095452
has comment: http://stackoverflow.com/comment/44565888
answer count: 3

http://stackoverflow.com/comment/44561742
type: QuestionComment
has text: within a switch, case 'audio1' : audio1.play(); break; might be an option?
comment on: http://stackoverflow.com/q/28089700
score: 0
type: Comment

http://stackoverflow.com/a/27975893
has body: Whoops, I didn't see what you were doing there in your init. Controllers need to be initialized by the container in order to have dependency injection work with them. Dependency injection injects the store into controllers and routes. With controllers being deprecated in 2.0 I'd just say move your action from your controller into route/controller that's housing that view. You'd also have to pass the store into the view If you don't want to do that, you can manually define the store on the controller when you're creating it. Define it on the view {{#view svg store=store}} Inject into the view, create an injector and add this App.inject('view', 'store', 'store:main');
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27972615
answers question: http://stackoverflow.com/q/27972615
type: Answer
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/44356998

http://stackoverflow.com/a/28041928
type: Answer
has body: change your css to #demo { width:100px; height:100px; background-color: red; -webkit-transition: 1s linear; position:relative; margin-left: 0px; } #demo.right,#demo.down { margin-left: 200px; } #demo.left { margin-left:0px; } #demo.down,#demo.left { margin-top:200px; } #demo.up { margin-top:0px; } and your script to var elem = document.getElementById("demo"); var useMe = ["right", "down", "left", "up"]; var interval; function initElemAnim() { var i = 0; elem.className = useMe[i]; interval = setInterval(function(){ if(i &lt; 4){ i = i + 1; elem.className = useMe[i]; } else{ clearInterval(interval); } }, 1000); } use setInterval() instead of setTimeout().
answers question: http://stackoverflow.com/q/28040717
score: 0

http://stackoverflow.com/a/28045398
has comment: http://stackoverflow.com/comment/91133863
has comment: http://stackoverflow.com/comment/71269922
type: AcceptedAnswer
score: 39
has body: You can get the DOM Elements themselves from the jQuery object using .get() method or array notation on the jquery object, and then select them with d3 selector like you would any DOM Element. Note that while both works, jQuery faq mentions that array notation is faster. d3.select($("#selection").get(0)); d3.select($("#selection")[0]); // equivalent to above but faster Edit: Thanks to Ken Fox for pointing out jQuery faq.
type: Answer
accepted answer of: http://stackoverflow.com/q/28045107
answers question: http://stackoverflow.com/q/28045107
downvote count: 1
upvote count: 40

http://stackoverflow.com/a/27969249
type: Answer
score: 13
downvote count: 0
upvote count: 13
answers question: http://stackoverflow.com/q/27969218
has body: It is clearly a parser error, you have invalid syntax due to the presence of - in the property name @ {has-success: form.email.$valid}. You would need to wrap them in quotes. Try:- &lt;div class="form-group" ng-class="{'has-success': form.email.$valid}"&gt;

http://stackoverflow.com/comment/44444997
type: Comment
type: QuestionComment
has text: Can you create a [jsfiddle](http://jsfiddle.net) demonstrating the problem?
comment on: http://stackoverflow.com/q/28029997
score: 0

http://stackoverflow.com/a/28075575
type: Answer
score: 2
upvote count: 2
has body: You could JSON.stringify reportData and pass that around: template.reportData = reportData; template.reportDataJSON = JSON.stringify(reportData); then: onclick="onClickFunctions('&lt;?= reportDataJSON ?&gt;'); and: function emailReport(reportData) { var reportData = JSON.parse(reportData); }
has comment: http://stackoverflow.com/comment/44531085
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28073859
accepted answer of: http://stackoverflow.com/q/28073859

http://stackoverflow.com/q/28115122
has answer: http://stackoverflow.com/a/28152014
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44604725
score: 3
upvote count: 3
has title: Fullcalendar (v2.x) Getting day-cell from an eventClick?
has comment: http://stackoverflow.com/comment/44604504
type: Question
has answer: http://stackoverflow.com/a/57640880
has body: I'm struggling to retrieve the day clicked when clicking on a multi-days (period) event (eventClick). Whe clicking on the background cell, it's easy : function dayClick(date, jsEvent, view) { //todo: store related day $scope.selectedDay = date; } But when clicking on an event (which is on a period of days), I can't retrieve which day exactly the user was on. (I need to perform a different action depending on the background day) : function alertEventOnClick(event, jsEvent, view) { // "event" stores only start and end date without any reference to the current day // "jsEvent" retrieve the "td" element but fullcalendar HTML structure is complex and it's impossible to go-up to find the day-cell // $scope.selectedDay = ?? }; I tried playing with "selectable" but "eventClick" JS Event doesn't propagate, and doesn't "select" the day Thanks
has answer: http://stackoverflow.com/a/60010202
downvote count: 0
tagged with: javascript
tagged with: fullcalendar
accepted answer: http://stackoverflow.com/a/28152014
linked to: http://stackoverflow.com/q/5855135
has answer: http://stackoverflow.com/a/41662285
has comment: http://stackoverflow.com/comment/44665051
tagged with: events
has answer: http://stackoverflow.com/a/28147323
favorite count: 0
answer count: 5
possible better answer: http://stackoverflow.com/a/28147323
has comment: http://stackoverflow.com/comment/44615676

http://stackoverflow.com/comment/44406398
score: 0
type: AnswerComment
type: Comment
has text: Are you using `$(document).ready(...)`? ( http://api.jquery.com/ready/ .) If not, it will try to run your code before the page has loaded, and fail to find the `.pass` element.
comment on: http://stackoverflow.com/a/28008686

http://stackoverflow.com/comment/44356621
has text: @PavelHoral yes I know and you are right. Better if I change my question "... do mvn clean install..." in "... build war ...".
comment on: http://stackoverflow.com/q/27982344
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44411478
has text: You mean `this.echo(this.evaluate(function(){return "string";}));` doesn't print "string"? What CasperJS and PhantomJS version do you have?
comment on: http://stackoverflow.com/q/28008063
score: 0
type: QuestionComment
type: Comment

socket.io
tags question: http://stackoverflow.com/q/28014807
tags question: http://stackoverflow.com/q/28028974
tags question: http://stackoverflow.com/q/28054914
tags question: http://stackoverflow.com/q/28008947
tags question: http://stackoverflow.com/q/28051678
type: Tag
tags question: http://stackoverflow.com/q/28061042
tags question: http://stackoverflow.com/q/28101357
tags question: http://stackoverflow.com/q/28052348
tags question: http://stackoverflow.com/q/28021519
tags question: http://stackoverflow.com/q/28001865
tags question: http://stackoverflow.com/q/28118695
tag name: socket.io
tags question: http://stackoverflow.com/q/27998407
tags question: http://stackoverflow.com/q/28051182
tags question: http://stackoverflow.com/q/28051680
tags question: http://stackoverflow.com/q/28035392
tags question: http://stackoverflow.com/q/27971706
tags question: http://stackoverflow.com/q/28076425
tags question: http://stackoverflow.com/q/28080176

http://stackoverflow.com/comment/44774569
has text: You would use this module to calculate the driving time/distances then you can pass the info through the travelling salesmen algorithm. That said you will likely want to do the optimization calculation server side for better performance. You should be able to reuse a lot of this: https://msdn.microsoft.com/library/windows/apps/hh699893(v=VS.110).aspx
type: Comment
comment on: http://stackoverflow.com/a/28097833
score: 0
type: AnswerComment

http://stackoverflow.com/a/67699341
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/28069638
has body: You could type $this.myFunction=function(){ //code here } and to execute some code if a the myFunction function is true, you could use booleans such as e.g. if(//your function is true){ and so on
downvote count: 2
score: -2

http://stackoverflow.com/q/28073119
type: Question
has title: I can't show my x-axis in monthly data using d3.js
score: 0
answer count: 1
tagged with: javascript
has body: I had developed my line graph,but unable to show the monthly(3 months)data in a year,i had shown for the year wise,but i unable to which year of month transactions are not show,the given json object var data=[{"key":[2000,0],"value":100},{"key":[2000,1],"value":200}, {"key":[2001,3],"value":400},{"key":[2001,4],"value":500}, {"key":[2002,1],"value":600},{"key":[2002,1],"value":700}, {"key":[2003,2],"value":500},{"key":[2003,1],"value":800}, {"key":[2004,5],"value":200},{"key":[2004,1],"value":900}, ] var s1=data.map(function (d,i){return {key:d.key[1],value:d.value}}) var x = d3.scale.linear().range([0, width]); var y = d3.scale.linear().range([height, 0]); var xAxis = d3.svg.axis().scale(x).orient("bottom").ticks(20) .tickFormat(d3.time.months,4) var yAxis = d3.svg.axis().scale(y).orient("left") var line = d3.svg.line() .x(function(d) { return x(d.key); }) .y(function(d) { return y(d.value); }) .interpolate("linear") var svg = d3.select("body").select("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")") x.domain(d3.extent(s1, function(d) { return d.key; })); y.domain(d3.extent(s1, function(d) { return d.value; })); svg.append("path").attr("class", "line").attr("d", line(s1));
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28073227

http://stackoverflow.com/comment/44614589
comment on: http://stackoverflow.com/a/28120076
score: 0
type: AnswerComment
has text: Yep, the console lines work fine – I just can't get it to return `true`/`false` properly.
type: Comment

http://stackoverflow.com/a/27982396
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44658813
answers question: http://stackoverflow.com/q/27982199
upvote count: 2
has body: You have quotes around "FilePath": var file = new File("FilePath"); This means it's going to try to load a file with the path "FilePath". Pretty sure this is what you want: var file = new File(FilePath); On the other hand, Quentin is absolutely right. You're not going to be able to access local files if this code is running in a web page.
type: Answer

http://stackoverflow.com/a/73598233
has body: I want to explain state and props in a simple way to you: state we use states to store some data. it's also like a variable that when you change it, your component will render again. to use states you need to import useState hook: import { useState } from 'react'; const [state_name,function_name] = useState(initial_value); you can access your state by state_name and you can change it and set a new value to it by function_name. more info: https://reactjs.org/docs/state-and-lifecycle.html props It is a mechanism to send data from one component to other. it also looks like properties in CSS. for example: &lt;Component props_value={custom_function} /&gt; you can send a custom function to Component and receive it to be manipulate. more info: https://reactjs.org/docs/components-and-props.html
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27991366

http://stackoverflow.com/a/28116477
has comment: http://stackoverflow.com/comment/44607617
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/28116384
answers question: http://stackoverflow.com/q/28116384
upvote count: 2
has body: I think what you are looking for is the Referrer var fullUrl = req.get('Referrer');
has comment: http://stackoverflow.com/comment/44607545
score: 2

http://stackoverflow.com/q/28090679
answer count: 3
score: 2
downvote count: 0
favorite count: 0
tagged with: angularjs
has title: How can I pass attribute to an imported hidden custom polymer element
has comment: http://stackoverflow.com/comment/44564952
has body: Before I created my custom Polymer element : I would like to pass an attribute to my imported hidden custom Polymer element when I import it on an other custom Polymer element like this : How could I do ? It is possible to do this ? If not what is the good way ?
has answer: http://stackoverflow.com/a/28094849
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28091051
upvote count: 2
has answer: http://stackoverflow.com/a/28091051
accepted answer: http://stackoverflow.com/a/28094849
type: Question
tagged with: polymer
has answer: http://stackoverflow.com/a/28119363
tagged with: javascript

http://stackoverflow.com/comment/44490300
type: Comment
type: QuestionComment
has text: someone already done so and i think it works
comment on: http://stackoverflow.com/q/28053913
score: 0

http://stackoverflow.com/a/28033588
type: Answer
upvote count: 0
downvote count: 2
has body: nice to meet you friend. first, pure javascript is hard to display variable in html directly. If you want to do like your code, check javascript libraries(AngularJS or hadlebar) 2nd ... ... something
score: -2
answers question: http://stackoverflow.com/q/28033452

angular-ui
tags question: http://stackoverflow.com/q/28112792
tags question: http://stackoverflow.com/q/28071098
tags question: http://stackoverflow.com/q/28076664
type: Tag
tags question: http://stackoverflow.com/q/28100852
tags question: http://stackoverflow.com/q/28079257
tags question: http://stackoverflow.com/q/28068795
tag name: angular-ui

epub
type: Tag
tags question: http://stackoverflow.com/q/28023053
tag name: epub

http://stackoverflow.com/comment/44450823
type: Comment
has text: Thank you. Can you also help with the EDIT i made to the original question? @Wilfredo-P
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28032881

http://stackoverflow.com/q/28041587
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/44468581
type: Question
tagged with: async.js
linked to: http://stackoverflow.com/q/20967006
has comment: http://stackoverflow.com/comment/44468661
tagged with: javascript
has comment: http://stackoverflow.com/comment/44468685
tagged with: express
has body: I have the following code. var queue = require('async').queue(function(task, callback) { console.log("QUEUED JOB STARTED"); require('sleep').sleep(10); console.log("QUEUED JOB FINISHED"); callback(); }, 1); router.post('/generate/', function(request, result) { console.log("REQUEST RECEIVED"); queue.push({}); result.end(); console.log("REQUEST PROCESSED"); }); When the first request comes it is immediately processed. But when the next comes just after the first one, the server waits until the queued job is finished (10 seconds) so the output is: REQUEST RECEIVED REQUEST PROCESSED QUEUED JOB STARTED QUEUED JOB FINISHED REQUEST RECEIVED REQUEST PROCESSED QUEUED JOB STARTED QUEUED JOB FINISHED Is it possible to make Node.js enqueue and answer the second request without waiting for the first to achieve the following output? REQUEST RECEIVED REQUEST PROCESSED REQUEST RECEIVED REQUEST PROCESSED QUEUED JOB STARTED QUEUED JOB FINISHED QUEUED JOB STARTED QUEUED JOB FINISHED
has comment: http://stackoverflow.com/comment/44470719
has comment: http://stackoverflow.com/comment/44468161
upvote count: 1
has title: Pushing a task to async.queue blocks express.js server
favorite count: 0
has comment: http://stackoverflow.com/comment/44468786
tagged with: node.js
answer count: 0
downvote count: 0

http://stackoverflow.com/comment/44615035
type: AnswerComment
has text: `$("#signup form").valid()` then.
type: Comment
comment on: http://stackoverflow.com/a/28120194
score: 0

http://stackoverflow.com/comment/44494651
score: 0
comment on: http://stackoverflow.com/a/28056103
type: Comment
has text: yes, it should make it an array if the name is `model[settings][]` posting directly to controller. But i am using ajax and the object is being built in javascript therefore only the last value of this is being read since its being iterated. if i have 4 elements `model[a], model[b], model[settings][], and model[settings][]`, the resulting javascript object is `data['model[a]'], data['model[b]'], and data['model[settings][]']` which is incorrect, it should be `data['model[a]'], data['model[b]'], and data['model[settings]']` with `model[settings]` key is an array type.
type: AnswerComment

http://stackoverflow.com/q/28024364
accepted answer: http://stackoverflow.com/a/28024383
has answer: http://stackoverflow.com/a/28024657
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/28024698
has title: remove specific href children jquery
type: Question
upvote count: 1
downvote count: 0
has body: My code looks something like that: &lt;a href="//index.php?eID=tx_cms_......"&gt; &lt;img width="1600" height="400" border="0" alt="" src="/link/to/my.jpg"&gt; &lt;/a&gt; For some reason, I can't figure out how to get rid of the href-elements, if this special href occurs. I tried the following: $(".w-slide a[href='//index.php?eID=']").children('img').unwrap(); didn't do it. Also I tried this: $('w-slide a').each(function() { if ($(this).attr('href').contains('/eID=tx_cms/')) { $(this).children('img').unwrap(); } } }); What am I missing? I want to keep the image-tags, but unwrap them, so there are no a tags surrounding them.
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/28024657
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/28024383

http://stackoverflow.com/q/28021132
score: 0
has comment: http://stackoverflow.com/comment/44429124
has title: Including minified javascript in external php file
has comment: http://stackoverflow.com/comment/44428969
has comment: http://stackoverflow.com/comment/44429063
has body: Basic question: How to include a script.min.js in an external php file. My current setup: index.php &lt;script type="text/javascript" src="http://localhost/js.php"&gt;&lt;/script&gt; js.php &lt;?php header('Content-type: text/javascript'); include "script1.js"; echo "\n\n"; include "script2.js"; echo "\n\n"; include "script3.js"; echo "\n\n"; ?&gt; Long Question: I've ran into this issue a couple times over the years and ignored it by including it as a separate &lt;script src=""&gt;&lt;/script&gt; but it's time to find out if there is a solution. Occasionally I'll run into a javascript file that doesn't work when included. Just produces javascript errors. (I've tried echo file_get_contents(...) also) My current script is tinymce.min.js. As above it works fine if included &lt;script src="tinymce.min.js"&gt;&lt;/script&gt; after my js.php file. But included in the php file does not work. Shouldn't be relavent as it's not the first minified script to not work. But the current error recieved in Firefox console is TypeError: c is not a constructor Side question, should I be using Content-type: application/javascript since I'm only catering for modern browsers?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44430595
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/44431098
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44428495
has comment: http://stackoverflow.com/comment/44429079
has comment: http://stackoverflow.com/comment/44429407
has comment: http://stackoverflow.com/comment/44428535
answer count: 1
has answer: http://stackoverflow.com/a/28021353
tagged with: javascript
favorite count: 0
tagged with: tinymce

http://stackoverflow.com/a/31258458
downvote count: 0
has comment: http://stackoverflow.com/comment/104390457
has body: This is only way I could find. Although somewhat inelegant, it does work. if(qs_trip_type == 0){ $('#rdo_pick').click(); }else{ $('#rdo_drop').click(); }
upvote count: 14
answers question: http://stackoverflow.com/q/28104723
type: Answer
score: 14

http://stackoverflow.com/q/28012930
tagged with: webview
answer count: 0
tagged with: javascript
has body: class class MyJavaScriptInterface { @JavascriptInterface public void processHTML(String html) { } } onCreate() WebView webview = (WebView) findViewById(R.id.webView1); webview.getSettings().setJavaScriptEnabled(true); webview.addJavascriptInterface(new MyJavaScriptInterface(), "HTMLOUT"); webview.loadUrl("javascript:var elementjs = window.HTMLOUT.processHTML(document.getElementsByName('name')[0].src);"); I want to get 'elementjs' in java. String element = elementjs;//like this How get javascript variable in java?
type: UnansweredQuestion
has title: Android convert javascript variables in webview to java variable
score: 2
downvote count: 0
favorite count: 0
type: Question
upvote count: 2
tagged with: android
tagged with: java

http://stackoverflow.com/a/27992816
upvote count: 4
has body: This is exactly where ng-init comes into picture, to alias special properties of ng-repeat, ex: ng-init="companyIdx=$index". So each child scope created by company ng-repeat will have this companyIdx property. &lt;tbody&gt; &lt;tr ng-repeat="company in companies" ng-init="companyIdx=$index"&gt; &lt;td ng-repeat="product in company"&gt; company # = {{companyIdx}} and product {{$index}} &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; Using a $parent is fine but it you have any other directive that creates a child scope in between them, eg:- ng-if, another ng-repeat etc.. you will have to go crazy doing $parent.$parent..... Aliasing with ng-init makes it clean and more readable and maintainable as well.
downvote count: 0
score: 4
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27992723
accepted answer of: http://stackoverflow.com/q/27992723

http://stackoverflow.com/comment/48160315
comment on: http://stackoverflow.com/a/30020967
type: AnswerComment
has text: Poorly-labeled self-promotion is ... not particularly wonderful. You should probably also include [usage notes or some sample code](http://meta.stackoverflow.com/a/251605), or if possible both.
type: Comment
score: 2

http://stackoverflow.com/comment/44444014
type: Comment
score: 0
has text: Have you checked your `if` condition? The comma operator is a common source of errors: it only returns the RHS value. What you have is only checking `d` and discarding the other 3 variables
type: QuestionComment
comment on: http://stackoverflow.com/q/28029320

http://stackoverflow.com/comment/44589947
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28107728
type: QuestionComment
has text: Thanks Guys always the simplest of things :)

http://stackoverflow.com/q/28058037
has answer: http://stackoverflow.com/a/28058067
possible better answer: http://stackoverflow.com/a/28058088
has body: http://jsfiddle.net/62w8f00o/ I have some HTML like this: and I want to wrap the img tag with an a tag using jQuery, like this: $(function() { var a = ''; // want to wrap the with the above here }); The final result would be like this: How can I wrap my img with the a?
tagged with: javascript
tagged with: jquery
score: -1
answer count: 3
has answer: http://stackoverflow.com/a/28058091
accepted answer: http://stackoverflow.com/a/28058067
favorite count: 0
downvote count: 2
type: AnsweredQuestion
has title: Wrap an HTML tag in another using jQuery
has answer: http://stackoverflow.com/a/28058088
upvote count: 1
type: Question

http://stackoverflow.com/comment/44614825
type: QuestionComment
has text: _"Currently, I am using ajax and php to generate the JSON file and save it on the server."_ Is requirement for client to provide name to `json` file ? For client to save file ?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28120177

http://stackoverflow.com/q/28059155
has comment: http://stackoverflow.com/comment/45006191
has answer: http://stackoverflow.com/a/28329474
has body: I used this article http://blogs.msdn.com/b/eternalcoding/archive/2013/06/28/babylon-js-how-to-load-a-babylon-file-produced-with-blender.aspx to load a Babylon file. if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "scene.babylon", engine, function (newScene) { newScene.executeWhenReady(function () { // Attach camera to canvas inputs newScene.activeCamera.attachControl(canvas); // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function () { newScene.render(); }); }); }, function (progress) { // To do: give progress feedback to user }); } Initially it wasn't working, but then I defined the mimeMap in the web config file, it started working &lt;mimeMap fileExtension=".babylon" mimeType="application/babylon" /&gt; &lt;mimeMap fileExtension=".babylonmeshdata" mimeType="application/babylonmeshdata" /&gt; The problem is when I change scene.babylon to my head.babylon, it doesn't work. Nothing loads on Firefox and I get this error on IE: 0x800a138f - JavaScript runtime error: Unable to get property '0' of undefined or null reference I did try head.babylon on http://www.babylonjs.com/sandbox/ and it loads just fine. Any suggestions on what I can do next?
type: UnansweredQuestion
tagged with: babylonjs
upvote count: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/44560337
favorite count: 0
has title: Babylon.js custom scene doesn't load

http://stackoverflow.com/comment/44543628
score: 0
type: AnswerComment
has text: I have already Add this in my php file but error show me this <?php header('Access-Control-Allow-Origin: *'); ?> but show me error in chrome but i have run this code in android phone XMLHttpRequest cannot load http://192.168.1.10/android_connect/JsonReturn.php. Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers. Please please help me out of this situation please I am useing this for android application
type: Comment
comment on: http://stackoverflow.com/a/28082787

http://stackoverflow.com/a/28087280
has comment: http://stackoverflow.com/comment/44553858
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/28086944
has comment: http://stackoverflow.com/comment/44552489
has comment: http://stackoverflow.com/comment/44553721
has comment: http://stackoverflow.com/comment/44553782
has body: This is actually a matter of setting the current location of the page to data:text/attachment in Firefox. In Chrome, it seems like setting the location won't trigger a file download. Below is my proposition that lets you specify the filename and also the part of the website you want to download as HTML (with indentation preserved). function toBase64 (str) { return window.btoa(unescape(encodeURIComponent(str))); } function triggerDownload () { var html = 'data:text/attachment;base64,' + toBase64(document.querySelector('html').innerHTML); var evt = new MouseEvent('click', { view: window, bubbles: false, cancelable: true }); var a = document.createElement('a'); a.setAttribute('download', 'file.html'); a.setAttribute('href', html); a.setAttribute('target', '_blank'); a.dispatchEvent(evt); } document.querySelector('span').addEventListener('click', function () { triggerDownload(); }); span { color: green; cursor: pointer; } Click here to download From How to download the current page as a file / attachment using Javascript? you can see other examples, where it is also possible to download a determined part of the page, etc. (ps: the snippet won't run from within the iframe that Stack Overflow adds).
has comment: http://stackoverflow.com/comment/44552888
downvote count: 0

http://stackoverflow.com/comment/44603393
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28114568
has text: Just iterate over the properties and copy them? Various libraries implement such a function, it's easy to write your own, or use the standard [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign). You might needs some "deep extension" functionality to handle `style` properly.
type: Comment

http://stackoverflow.com/comment/44550166
has text: The easier way is to make a function with the code i give you and call the code after your price or starts filter. The best way is in each filter you look what you want and the src img in the current article
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28085026

http://stackoverflow.com/comment/44329947
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27968511
score: 0
has text: Is this a question just out of curiosity, or do you have a specific use-case? It would be interesting to know, why/how you're going to use this.

http://stackoverflow.com/comment/44348008
type: Comment
comment on: http://stackoverflow.com/q/27977853
score: 0
has text: Whoops, yeah. Rewrote my longer example in this short test-case, must've forgotten to check that line.
type: QuestionComment

http://stackoverflow.com/a/28046728
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/28046325
upvote count: 1
has body: Array is an object in javascript which means you assign reference instead of value a = array(); b = a; Then both b and a contains the same array. Adding value to the a will add it into b as well. a.x = 5; alert(b.x); //will show 5 If you really need two different arrays, you may try to play with getter/setter. But not sure how exactly it should work in your case.
type: Answer

http://stackoverflow.com/q/28045346
tagged with: javascript
has comment: http://stackoverflow.com/comment/44542010
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: objective-c
tagged with: uiwebview
has answer: http://stackoverflow.com/a/28083115
type: UnansweredQuestion
upvote count: 1
has title: Calling javascript function from in objective c using webview methods
score: 1
has body: Am trying to call javascript function through objective C Steps I have followed: In Html Page: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script&gt; function init() { alert("Hello Contraceptive_Quiz!"); setTimeout(function(){destroy()},1000); } function destroy() { alert("calling destroy Contraceptive_Quiz!"); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt; In ObjectiveC.m file i have used, In my app bundle wwwfilePath folder exist: wwwfilePath structure contains : www/IYG_G8_L05/IYG_G8_L05_Directory/IYGindex1.html Here, In this structure contains www/IYG_G8_L05/ Many sub folders www/IYG_G8_L05/IYG_G8_L05_Directory1 www/IYG_G8_L05/IYG_G8_L05_Directory2 www/IYG_G8_L05/IYG_G8_L05_Directory3 So,I need to load multiple contents in html page one by one first time am loading IYG_G8_L05_Directory1 and then next like ... - (void)viewDidLoad{ NSString *filePath = [[NSBundle mainBundle] pathForResource:@"IYGindex1" ofType:@"html" inDirectory:wwwfilePath]; NSURL *htmlurl = [[NSURL alloc]initFileURLWithPath:filePath]; NSURLRequest *request = [NSURLRequest requestWithURL:htmlurl]; [_contentWebView loadRequest:request]; } In webview delegate methods: ** calling javascript functions in objective c** -(void) webViewDidFinishLoad:(UIWebView *)webView { NSString *jsString = [[NSString alloc] initWithFormat: @"init()"]; [_contentWebView stringByEvaluatingJavaScriptFromString:jsString]; } Here, init( ) method will execute and also executes destroy( ) method because of calling setTimeout( ) function in html page. My issue is: Once the destroy ( ) method executes, how can i load the next wwwfilepath i.e., IYG_G8_L05_Directory2 it shoud be call in dynamical way. Let us know how to resolve?
type: Question
downvote count: 0
tagged with: ios
answer count: 1

http://stackoverflow.com/q/28033318
type: UnansweredQuestion
has body: I am using a library called Papa Parse that allows me to load CSV files as JSON files. The library allows me to run a callback once the file has finished loading. However I am not sure what the best method is to run a callback when two required files have finished loading. This must be a common thing in javascript when multiple resources are need before a method can run. Because the files can be loading asynchronously there is no guarantee of the order they will finish loading. So I would need a way of testing if all conditions are met before the method can run. Is there a commonly used pattern to do this?
has comment: http://stackoverflow.com/comment/44451734
answer count: 0
score: 0
type: Question
has title: Javascript call function when asynchronous conditions are met
has comment: http://stackoverflow.com/comment/44451631
tagged with: javascript
has comment: http://stackoverflow.com/comment/44451613
has comment: http://stackoverflow.com/comment/44451715
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/44451885

servlets
tags question: http://stackoverflow.com/q/28036723
tags question: http://stackoverflow.com/q/28019069
tags question: http://stackoverflow.com/q/28075722
tags question: http://stackoverflow.com/q/27978448
tags question: http://stackoverflow.com/q/28100431
tags question: http://stackoverflow.com/q/28112092
tags question: http://stackoverflow.com/q/28080525
tag name: servlets
type: Tag
tags question: http://stackoverflow.com/q/28012168

http://stackoverflow.com/a/28075538
accepted answer of: http://stackoverflow.com/q/28075497
upvote count: 2
answers question: http://stackoverflow.com/q/28075497
score: 2
type: AcceptedAnswer
downvote count: 0
has body: You need to do this.resources = {}; first, you can't add properties to an undefined reference.
type: Answer
has comment: http://stackoverflow.com/comment/44530127

http://stackoverflow.com/a/28036969
has comment: http://stackoverflow.com/comment/44458719
type: Answer
has comment: http://stackoverflow.com/comment/44458710
accepted answer of: http://stackoverflow.com/q/28036945
score: 2
answers question: http://stackoverflow.com/q/28036945
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: As the error message is very clear on the fact that issue is not with $routeProvider, You may want to restructure them. Also note that config block must have a function. First create the module, then register the controller and config: angular .module('main', ['ngRoute']); and then use it or chain through, i.e angular.module("main", ["ngRoute"]).controller("MainCtrl", [ "$scope" ($scope) -&gt; return $scope.test = {} ]).config [ "$routeProvider" ($routeProvider) -&gt; //Check this return $routeProvider.when("/", templateUrl: "homePage/homePage.html" controller: "MainCtrl" ) ] otherwise with the order of the script you have you are trying to create a controller on the app main before even it exists. Also note that you need to include angular-router script as well. Demo

qualtrics
tags question: http://stackoverflow.com/q/28052172
tags question: http://stackoverflow.com/q/28097792
type: Tag
tag name: qualtrics

http://stackoverflow.com/comment/47057512
type: AnswerComment
type: Comment
has text: You need to add the prefixes to animation and keyframes this will give it cross browser support. If you want support for IE 9 and IE 10 then there is a spesial prefix just search "IE animation prefix".
comment on: http://stackoverflow.com/a/29124415
score: 0

http://stackoverflow.com/a/28019126
has body: Here is a working version: app.js if (Meteor.isClient) { Template.matches.created = function() { this.matches = new ReactiveVar([]); var self = this; Meteor.call('getMatches', function(error, result) { if (result) self.matches.set(result); }); }; Template.matches.helpers({ matches: function() { return Template.instance().matches.get(); } }); } if (Meteor.isServer) { Meteor.methods({ getMatches: function() { var url = "http://api.football-data.org/alpha/teams/73/fixtures"; try { var fixtures = HTTP.get(url).data.fixtures; return fixtures; } catch (e) { return []; } } }); } app.html {{> matches}} Tottenham Hotspur Date Home Result Away {{#each matches}} {{> match}} {{/each}} {{date}} {{homeTeamName}} {{result.goalsHomeTeam}}:{{result.goalsAwayTeam}} {{awayTeamName}} Notes The fixtures array was not being parsed out of the original HTTP result, so you were passing extra data (like the headers) back to the client. Helpers should be synchronous. Here we use a ReactiveVar which is asynchronously set when the template is created, but synchronously read in the helper. See my article on scoped reactivity if these techniques are unfamiliar to you. The each needs to be outside of the . Make sure to run: $ meteor add reactive-var http for the above example to work.
score: 3
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/28015952
type: Answer

http://stackoverflow.com/comment/44440842
type: AnswerComment
score: 0
type: Comment
has text: @Alnitak Yes . Agreed . Posted answer as a basic pattern / template for OP to , perhaps , "see" flow of chaining / sequences
comment on: http://stackoverflow.com/a/28027367

http://stackoverflow.com/q/28104723
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/35126047
has answer: http://stackoverflow.com/a/35730489
has answer: http://stackoverflow.com/a/28104778
type: UnansweredQuestion
has title: Bootstrap set radio button checked with jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/37523557
has comment: http://stackoverflow.com/comment/44586984
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/28104839
type: Question
answer count: 8
has body: I have radio buttons in my html code. I want to change their state based on my input values via jquery Here is My Html Pick-up Time Drop Time An jQuery is if(qs_trip_type == 0){ $('#rdo_pick').prop('checked',true); }else{ $('#rdo_pick').prop('checked',true); } But This has no effect I also tried with $('#rdo_pick').prop('checked','checked'); and $('#rdo_pick').attr('checked','true'); $('#rdo_pick').addClass('checked');
has comment: http://stackoverflow.com/comment/44584342
upvote count: 9
has answer: http://stackoverflow.com/a/31258458
score: 9
has answer: http://stackoverflow.com/a/28104779
has comment: http://stackoverflow.com/comment/44584598
downvote count: 0
has answer: http://stackoverflow.com/a/54748221

http://stackoverflow.com/comment/44382464
type: AnswerComment
comment on: http://stackoverflow.com/a/27995577
score: 0
type: Comment
has text: Here are some decent examples of how use classes in javascript. Admittedly javascript isn't really build for classes, but they often times become a practical requirement in more complex code. http://www.phpied.com/3-ways-to-define-a-javascript-class/

http://stackoverflow.com/comment/44855166
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28116181
has text: `Other functions work but onChatMessage doesn't.`, can you see any `console.log` output from `onChatMessage` or nothing?

http://stackoverflow.com/comment/44496690
comment on: http://stackoverflow.com/a/28057455
type: Comment
score: 0
type: AnswerComment
has text: I don't want to test each hostname, I want to test the entire string and see if it's valid or not.

http://stackoverflow.com/comment/44431644
comment on: http://stackoverflow.com/q/28022883
has text: You may want to move "document.getElementById"-lines into a function.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44357880
type: Comment
comment on: http://stackoverflow.com/a/27983347
score: 1
type: AnswerComment
has text: the docs for that feature: https://developer.chrome.com/devtools/docs/tips-and-tricks#force-element-state

http://stackoverflow.com/comment/44476033
has text: not sure I'm following the createdocumentfragment concept
score: 0
comment on: http://stackoverflow.com/q/28046480
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44495322
score: 1
has text: Related: [How do you convert epoch time in C#?](http://stackoverflow.com/questions/2883576/how-do-you-convert-epoch-time-in-c) Though, JavaScript timestamps are in [milliseconds](https://msdn.microsoft.com/en-us/library/system.datetime.addmilliseconds.aspx).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28056721

http://stackoverflow.com/a/28086411
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44550926
accepted answer of: http://stackoverflow.com/q/28085252
type: Answer
score: 0
has body: First of all, the code could (and probably should) be rewritten the following way: function Test(num1) { this.num1 = num1; console.log(this.num1); this.isValidNumber = !isNaN(this.num1); } As for the reason why your code is not working as expected – your self invoking function has its own this parameter which is unrelated to the this parameter within your constructor. In this case the this parameter of your self invoking function references the global object. (In strict mode it would've been undefined) If you really need to reference the this parameter of a containing function then there are several ways to achieve this, the simplest of which being: function Test(num1) { this.num1 = num1; var self = this; this.isValidNumber = (function() { console.log(self.num1); return !isNaN(self.num1)); }()); } In your particular case you don't even need to capture it, and this would also achieve the same effect: function Test(num1) { this.num1 = num1; this.isValidNumber = (function() { console.log(num1); return !isNaN(num1)); }()); } But again, the self invoking function is simply not required here.
answers question: http://stackoverflow.com/q/28085252

titanium
type: Tag
tags question: http://stackoverflow.com/q/28110103
tags question: http://stackoverflow.com/q/28003253
tag name: titanium
tags question: http://stackoverflow.com/q/28060130
tags question: http://stackoverflow.com/q/27988524
tags question: http://stackoverflow.com/q/28121585
tags question: http://stackoverflow.com/q/28037933

http://stackoverflow.com/comment/44353326
type: QuestionComment
has text: work through your script using console.log() and validate the if/else conditions.
score: 0
comment on: http://stackoverflow.com/q/27980825
type: Comment

http://stackoverflow.com/comment/44626476
comment on: http://stackoverflow.com/q/28108288
score: 0
type: Comment
has text: I have updated the fiddle with some content below the accordion and you can see the jump on large resolutions if you click the link, can it be avoided. http://jsfiddle.net/1crojp98/3/
type: QuestionComment

http://stackoverflow.com/comment/44621309
type: Comment
type: QuestionComment
has text: where is radio button html? what is the reason behind using hidden element?
comment on: http://stackoverflow.com/q/28121265
score: 0

instantiation
type: Tag
tags question: http://stackoverflow.com/q/28085252
tag name: instantiation

http://stackoverflow.com/q/28064983
type: AnsweredQuestion
tagged with: facebook-sdk-3.0
downvote count: 0
score: 1
type: Question
tagged with: javascript
has title: facebook share ui - share in a group
has answer: http://stackoverflow.com/a/28085390
accepted answer: http://stackoverflow.com/a/28085390
upvote count: 1
answer count: 1
tagged with: facebook-javascript-sdk
tagged with: facebook-graph-api
favorite count: 0
tagged with: facebook
has body: I want to share a link with FB.ui so I will get callbacks for success/ fail but the FB.ui does not allow to choose where to share ("on your won timeline", "in a group"....) like the old sharer.php did See screenshot- My code renders this popup: Is there a way to make the new fb.ui popup to allow to share "in a group" like the old one did? This is my code: FB.ui( { method: 'feed', name: 'some name', link: 'http://some url', picture: 'http://some image', caption: "some text", description: "some description" }, function(response) { if (response &amp;&amp; response.post_id) { console.log('Post was published.'); } else { console.log('Post was not published.'); } } );

datepicker
tags question: http://stackoverflow.com/q/28040017
tags question: http://stackoverflow.com/q/28110079
tags question: http://stackoverflow.com/q/28008669
tags question: http://stackoverflow.com/q/28067385
tags question: http://stackoverflow.com/q/28107126
tags question: http://stackoverflow.com/q/28061236
tags question: http://stackoverflow.com/q/28086935
tag name: datepicker
tags question: http://stackoverflow.com/q/28085481
type: Tag
tags question: http://stackoverflow.com/q/27971988
tags question: http://stackoverflow.com/q/28088439
tags question: http://stackoverflow.com/q/28017978
tags question: http://stackoverflow.com/q/27966645
tags question: http://stackoverflow.com/q/27984627
tags question: http://stackoverflow.com/q/28086419
tags question: http://stackoverflow.com/q/28047273

week-number
tags question: http://stackoverflow.com/q/28074033
type: Tag
tag name: week-number

http://stackoverflow.com/a/27986285
downvote count: 0
has comment: http://stackoverflow.com/comment/44366859
upvote count: 2
has body: The article discusses how to create an array "subclass". That is, we want to create an object that has Array.prototype in its prototype chain, but with an immediate prototype parent that is not Array.prototype (i.e., so that the prototype parent can provide additional methods beyond the array prototype). That article says that a fundamental difficulty in creating an array "subclass" is that arrays get their behavior from both their prototype, and simply being array instances. If arrays inherited all their behavior from Array.prototype, our work would be very quick. We would simply create an object whose prototype chain includes Array.prototype. That object would make an ideal prototype for our array-subclass instances. However, arrays have special automatic behaviors that are unique to array instances, and are not inherited from the prototype. (In particular, I mean the behaviors around the length property automatically changing when the array changes, and vice versa.) These are behaviors supplied to each array instance when it is created by the Array constructor, and there is no way to mimic them faithfully in ECMAScript 5. Therefore, the instance of your array subclass must be originally created by the Array constructor. This is non-negotiable, if we want the appropriate length behaviors. This requirement conflicts with our other requirement that the instance must have a prototype that is not Array.prototype. (We don't want to add methods to Array.prototype; we want to add methods to an object that uses Array.prototype as its own prototype .) In ECMAScript 5, any object created using the Array constructor must have the prototype parent of Array.prototype. The ECMAScript 5 spec provides no mechanism to change an object's prototype after it is created. By contrast, ECMAScript 6 does provide such a mechanism. Your approach is quite similar to the __proto__-based approach described in the article, under the section "Wrappers. Prototype chain injection.," except you us…
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44368251
accepted answer of: http://stackoverflow.com/q/27985546
answers question: http://stackoverflow.com/q/27985546
type: Answer
has comment: http://stackoverflow.com/comment/46717116
has comment: http://stackoverflow.com/comment/44377840
score: 2

http://stackoverflow.com/comment/44569686
score: 0
has text: possible duplicate of **http://stackoverflow.com/questions/18571301/angularjs-multiple-ng-app-within-a-page**
comment on: http://stackoverflow.com/q/28088265
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28114184
has comment: http://stackoverflow.com/comment/44602587
has body: Background information is that I have a table, that has to be static information and not javascript. The table is going to be edited by people who don't know HTML or Javascript. So each time that they get a new faculty member they are going to jump in and edit a GUI representation of a table. I've set up a codepen of what will be exported after the edit. Here is the HTML Markup of what will be exported when the user is done adding people. http://codepen.io/ddavisgraphics/pen/VYWmRo &lt;div class="searchTable"&gt; &lt;label&gt; Search Directory: &lt;/lable&gt; &lt;input id="mysearch" type="search" /&gt; &lt;/div&gt; &lt;select&gt; &lt;option&gt; History &lt;/option&gt; &lt;option&gt; English &lt;/option&gt; &lt;option&gt; Economics &lt;/option&gt; &lt;option&gt; Computer Science &lt;/option&gt; &lt;option&gt; Business &lt;/option&gt; &lt;option&gt; Foreign Languages &lt;/option&gt; &lt;option&gt; Sociology &lt;/option&gt; &lt;option&gt; Nursing &lt;/option&gt; &lt;option&gt; Criminal Justice &lt;/option&gt; &lt;option&gt; Management &lt;/option&gt; &lt;option&gt; Public Relations &lt;/option&gt; &lt;option&gt; Communications &lt;/option&gt; &lt;/select&gt; &lt;select&gt; &lt;option&gt; West Viringia University &lt;/option&gt; &lt;option&gt; Fairmont State University &lt;/option&gt; &lt;option&gt; University of Charleston &lt;/option&gt; &lt;option&gt; Glenville State College &lt;/option&gt; &lt;option&gt; Shepherd University &lt;/option&gt; &lt;option&gt; Wheeling Jesuit University &lt;/option&gt; &lt;option&gt; Marshall University &lt;/option&gt; &lt;option&gt; WVU-Parkersburg &lt;/option&gt; &lt;option&gt; Davis &amp; Elkins College &lt;/option&gt; &lt;option&gt; Concord University &lt;/option&gt; &lt;option&gt; Bluefield State College &lt;/option&gt; &lt;option&gt; Salem International University &lt;/option&gt; &lt;option&gt; Concord University &lt;/option&gt; &lt;option&gt; Concord University &lt;/option&gt; &lt;option&gt; Concord University &lt;/option&gt; &lt;o…
has title: Can I sort a static html table with angularJS/ Jquery / Javascript?
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/28115699
favorite count: 0
has answer: http://stackoverflow.com/a/28115249
has comment: http://stackoverflow.com/comment/44602979
accepted answer: http://stackoverflow.com/a/28115249
tagged with: angularjs
upvote count: 2
downvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/44603466
has comment: http://stackoverflow.com/comment/44602368
has answer: http://stackoverflow.com/a/28115699
type: Question
has comment: http://stackoverflow.com/comment/44603145
answer count: 2
has comment: http://stackoverflow.com/comment/44603047
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44603624

http://stackoverflow.com/comment/44440373
has text: This is going to try multiplying an `HTMLElement` by `1`, which doesn't make sense. You probably meant to multiply the element's `.value` attribute. However, that is still an unclear way of converting to a `Number`. Better to use one of the built-in parse functions.
score: 4
type: Comment
comment on: http://stackoverflow.com/a/28027606
type: AnswerComment

http://stackoverflow.com/a/31318122
upvote count: 8
type: Answer
score: 8
has comment: http://stackoverflow.com/comment/67740783
has comment: http://stackoverflow.com/comment/68000171
has comment: http://stackoverflow.com/comment/67740952
has body: Do not know, if you stil need it. Just in case and for my own practice here is working example. I used CSS framework Semantic-UI for styles and Knockout.js for chat render. Also all queries are made by sails.io.js. Put them to assets folder before the test. Model api/models/Chat.js: module.exports = { attributes: { id: { type: 'integer', primaryKey: true, autoIncrement: true, unique: true }, text: 'string' } }; Controller api/controllers/ChatController.js: module.exports = { do: function(req, res){ return res.view(); } }; View views/chat/do.ejs: Message ID Your message Send Just open http://yoursite/chat/do and see the magic =)
has comment: http://stackoverflow.com/comment/67999758
answers question: http://stackoverflow.com/q/27971706
downvote count: 0

http://stackoverflow.com/q/28018146
has answer: http://stackoverflow.com/a/39811439
type: Question
tagged with: cucumber
score: 5
has title: Specification by Example using Jasmine
upvote count: 5
tagged with: javascript
tagged with: karma-jasmine
tagged with: gherkin
answer count: 1
downvote count: 0
tagged with: jasmine
has comment: http://stackoverflow.com/comment/101168835
favorite count: 0
type: UnansweredQuestion
has body: Is there a way to implement examples (or tables) in your spec when using Jasmine? I really like the Jasmine syntax, but being able to define examples I find far more important. I'm looking to port the following to Jasmine: Scenario Outline: eating Given there are &lt;start&gt; cucumbers When I eat &lt;eat&gt; cucumbers Then I should have &lt;left&gt; cucumbers Examples: | start | eat | left | | 12 | 5 | 7 | | 20 | 5 | 15 |

http://stackoverflow.com/comment/44439347
type: QuestionComment
comment on: http://stackoverflow.com/q/28026155
has text: your zf2 From element most likely has a 'require' => 'required' attribute set.
score: 0
type: Comment

http://stackoverflow.com/q/28028690
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/28042234
accepted answer: http://stackoverflow.com/a/28042234
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Jssor bullet navigator not appearing
has body: So I'm trying to get this full width slider going with arrow navigators, bullet navigators and captions using the Jssor plugin. I've chosen not to copy/paste the example code and just tried to work with the plugin myself with only the little bit of help I get from the example. The slider works alright, but when I try add the bullet navigator, it just won't appear. HTML: CSS: #slider1_container { position: relative; top: 95px; width: 1903px; left: 0px; height: 550px; } .jssorb13 div, .jssorb13 div:hover, .jssorb13 .av { background: url(../img/b13.png) no-repeat; overflow:hidden; cursor: pointer; } .jssorb13 div { background-position: -5px -5px; } .jssorb13 div:hover, .jssorb13 .av:hover { background-position: -35px -5px; } .jssorb13 .av { background-position: -65px -5px; } .jssorb13 .dn, .jssorb13 .dn:hover { background-position: -95px -5px; } JQuery/JS (Still contains code targeting other elements of the page): $(document).ready(function () { var options = { $BulletNavigatorOptions: { $Class: $JssorBulletNavigator$, //[Required] Class to create navigator instance $ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always $AutoCenter: 1, //[Optional] Auto center navigator in parent container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 0 $Steps: 1, //[Optional] Steps to go for each navigation request, default value is 1 $Lanes: 1, //[Optional] Specify lanes to arrange items, default value is 1 $SpacingX: 10, //[Optional] Horizontal space between each item in pixel, default value is 0 $SpacingY: 10, //[Optional] Vertical space between each item in pixel, default value is 0 $Orientation: 1 } }; var jssor_slider1 = new $JssorSlider$('slider1_container', options); function ScaleSlider() { var parentWidth = $('#slider1_container').parent().width(); if (parentWidth) { jssor_slider1.$ScaleWidth(parentWidth); } else window.setTimeout(ScaleSlider, 30); } //Scale slider after document ready ScaleSlider(); $(window).bind("load", ScaleSlider); $(window).bind("…
tagged with: css
tagged with: jssor

http://stackoverflow.com/a/28110237
downvote count: 0
score: 3
accepted answer of: http://stackoverflow.com/q/28110042
answers question: http://stackoverflow.com/q/28110042
upvote count: 3
type: AcceptedAnswer
has body: I guess you are using messages = $("#messages"); before DOM ready. So at that time your javaScript not able to get $("#messages") and you are using onReceive() function after DOM load so it's working inside your function.
type: Answer

http://stackoverflow.com/q/28072806
accepted answer: http://stackoverflow.com/a/28073123
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44526007
has comment: http://stackoverflow.com/comment/44526169
answer count: 1
has comment: http://stackoverflow.com/comment/44525251
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28073123
has comment: http://stackoverflow.com/comment/44525580
has title: Delaying regex for more specific matches
has body: I have a scenario where I need to run regex tests on a numeric input that represents phone company operator services. In one instance, there is a prefix 118 which can act on its own or with a suffix of up to two digits. At the moment, my function looks something like the below. My problem is that the least specific '118' exact match fires before the more specific one. There is no sleep/wait in Javascript and unless I'm mistaken, I don't think I can get setTimeout to return a simple "return true" ? I don't mind if the answer to this question is in pure Javascript or Jquery, but not having a dependency on Jquery would be preferable. function isOperatorService(vNumber) { var vNumber = vNumber.replace(/\D/g,''); if (/^((44){0,1}118[0-9]{3})$/.test(vNumber)) { console.log("118 specific"); return true; } if(/^((44){0,1}[19]{1}[0-9]{1}[0-79]{1})$/.test(vNumber)) { console.log("Other shortcodes"); return true; } return false; } UPDATE: Re: "Provide your input and expected output." Pretty much as I described above, in Pseudo-code : if == 118 wait incase the user has not finished typing (e.g. wait incase 118118...) else do other regex cheks
score: 0
has comment: http://stackoverflow.com/comment/44525250
tagged with: regex
has comment: http://stackoverflow.com/comment/44525546
has comment: http://stackoverflow.com/comment/44525334

http://stackoverflow.com/q/28041649
has comment: http://stackoverflow.com/comment/44467988
has comment: http://stackoverflow.com/comment/44469909
has comment: http://stackoverflow.com/comment/44467975
tagged with: jquery
has comment: http://stackoverflow.com/comment/55694560
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has title: Binding handler to onLoad event inside directive
type: UnansweredQuestion
type: Question
tagged with: angularjs-directive
has body: I am setting directive on a div element, and want to bind that element's load event to an event handler, something like this: myModule.directive('myDirective', function ) { return { restrict: 'A', replace: false, compile: function(tElement, tAttributes) { return { pre: function preLink(scope, element, attrs) { element.bind('load', function (event) { console.log('Loaded'); } post: function postLink(scope, element, attrs) { } } } However, load handler is never executed, as if the div element is loaded before the element is bound. Is there a way to bind element before it is loaded ?
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/31433265

http://stackoverflow.com/comment/71130640
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/38325734
has text: This does what the OP said he doesn't want to do, and relies on [this proposal](https://tc39.github.io/proposal-class-public-fields/) which is only at Stage 2 and probably isn't even going to make ES2017 (but I think it's likely to make ES2018, and transpilers have supported it for months). It also effectively duplicates several previous answers, which isn't useful.
score: 0

http://stackoverflow.com/a/28224608
has comment: http://stackoverflow.com/comment/44813532
has comment: http://stackoverflow.com/comment/44814136
has comment: http://stackoverflow.com/comment/44812660
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44813727
has body: The Problem: Your main issue is setTimeout and setInterval are not guaranteed to fire at exactly the delay specified, but at some point after the delay. From the MDN article on setTimeout (emphasis added by me). delay is the number of milliseconds (thousandths of a second) that the function call should be delayed by. If omitted, it defaults to 0. The actual delay may be longer; see Notes below. Here are the relevant notes from MDN mentioned above. Historically browsers implement setTimeout() "clamping": successive setTimeout() calls with delay smaller than the "minimum delay" limit are forced to use at least the minimum delay. The minimum delay, DOM_MIN_TIMEOUT_VALUE, is 4 ms (stored in a preference in Firefox: dom.min_timeout_value), with a DOM_CLAMP_TIMEOUT_NESTING_LEVEL of 5. In fact, 4ms is specified by the HTML5 spec and is consistent across browsers released in 2010 and onward. Prior to (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2), the minimum timeout value for nested timeouts was 10 ms. In addition to "clamping", the timeout can also fire later when the page (or the OS/browser itself) is busy with other tasks. The Solution: You would be better off using just requestAnimationFrame, and inside the callback using the timestamp arguments passed to the callback to compute the delta time into the video, and drawing the necessary frame from the list. See working example below. As a bonus, I've even included code to prevent re-drawing the same frame twice. Working Example: var start_time = null; var frame_rate = 30; var canvas = document.getElementById('video'); var ctx = canvas.getContext('2d'); var all_images_loaded = {}; var all_images_src = (function(frames, fps){//Generate some placeholder images. var a = []; var zfill = function(s, l) { s = '' + s; while (s.length &lt; l) { s = '0' + s; } return s; } for(var i = 0; i &lt; frames; i++) { a[i] = 'http://placehold.it/480x270&amp;text=' + zfill(Math.floor(i / fps), 2) + '+:+' + zfill(i % fps, 2) } return a; })(1…
has comment: http://stackoverflow.com/comment/44813345
type: Answer
score: 4
has comment: http://stackoverflow.com/comment/44813879
accepted answer of: http://stackoverflow.com/q/28092642
has comment: http://stackoverflow.com/comment/44814008
answers question: http://stackoverflow.com/q/28092642

http://stackoverflow.com/comment/44348336
comment on: http://stackoverflow.com/q/27978024
has text: I can, but I don't want to since the app it doesn't require much javascript, so I don't need the overload of jQuery
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44536421
type: QuestionComment
comment on: http://stackoverflow.com/q/28078811
score: 0
has text: I fail to see a single connection between `SecureCartOrders` and `imgSrc`...
type: Comment

http://stackoverflow.com/q/27995743
type: Question
tagged with: rotation
tagged with: javascript
has body: I know this is a really stupid question, but I just can't wrap my head around it. var x = pressed('left') - pressed('right') // obvious (0 = nope, 1 = left, -1 = right) var z = pressed('up') - pressed('down' ) // also obvious player.rotation.y = somehowGetRotationInRadians; Thing is, I'm too stupid to know how to get the character's rotation from those two variables. I bet there is some averaging and π involved, but I have no idea how. I don't know how relevant the tags are.
has answer: http://stackoverflow.com/a/27997868
answer count: 1
has title: Character Z Rotation
tagged with: geometry
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27997868
score: 0
tagged with: math

http://stackoverflow.com/comment/44425189
comment on: http://stackoverflow.com/q/28019120
score: 0
type: Comment
type: QuestionComment
has text: check web browser error console

http://stackoverflow.com/q/27996620
favorite count: 0
has comment: http://stackoverflow.com/comment/44383438
accepted answer: http://stackoverflow.com/a/27996673
type: AnsweredQuestion
downvote count: 0
tagged with: underscore.js
score: 1
tagged with: math
has body: Given the code below: function cartesianProductOf() { return _.reduce(arguments, function(a, b) { return _.flatten(_.map(a, function(x) { return _.map(b, function(y) { return x.concat([y]); }); }), true); }, [ [] ]); }; var cp = cartesianProductOf([1, 2], [3, 4], ['a', 'b']); // [[1,3,"a"],[1,3,"b"],[1,4,"a"],[1,4,"b"],[2,3,"a"],[2,3,"b"],[2,4,"a"],[2,4,"b"]] I am looking for a way to reverse the process, such that reverseCartesian(cp,[3,4]); // [[1,'a'],[1,'b'],[2,'a'],[2,'b']]
type: Question
has answer: http://stackoverflow.com/a/27996673
tagged with: javascript
tagged with: set-theory
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/44383625
has title: Reverse of a cartesian product

http://stackoverflow.com/q/28011016
tagged with: mongodb
tagged with: mongoose
tagged with: javascript
has answer: http://stackoverflow.com/a/28011278
answer count: 1
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/12397118
has title: Save dotted field in MongoDB
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/12397118
score: 2
upvote count: 2
has body: I'am trying to save the outcome from an JSON API to a MongoDB collection. The JSON data I'am trying to save has the following structure: compatibility: { 2.7.1: { 2.2.6: [ 100, 1, 1 ] }, 2.8.3: { 2.2.6: [ 100, 2, 2 ] } } But I'am getting the following error: The dotted field '2.7.1' in 'compatibility.2.7.1' is not valid for storage. Does anyone know how to fix this?
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/comment/44618080
comment on: http://stackoverflow.com/a/28121943
has text: `filter(Boolean)` is cleaner.
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/a/27988635
upvote count: 1
has body: The purpose is that you're passing 0 as the value to the pos argument.
type: Answer
answers question: http://stackoverflow.com/q/27988603
downvote count: 0
score: 1

http://stackoverflow.com/q/27972532
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/28035447
tagged with: meteor
accepted answer: http://stackoverflow.com/a/28035447
has title: Meteor - unable to prevent refresh
has comment: http://stackoverflow.com/comment/44342066
type: AnsweredQuestion
has body: I have two different templates that use a datepicker to insert a subdocument with a date into a document. One works, one doesn't, even though they look identical. The item-due insert works fine; the delay-until insert just refreshes the page. I'm using the rajit:bootstrap3-datepicker package. HTML (condensed): {{#each actionItems}} {{> item}} {{/each}} {{#unless actionItem}} {{> delayUntil}} {{/unless}} {{#if actionItem}} {{> actionModtable}} {{/if}} Submit {{> datepicker}} Submit JS (condensed): Template.datepicker.rendered = function() { $('#due-date-picker').datepicker({ todayBtn: true, autoclose: true, todayHighlight: true }); }; Template.datepicker.events({ 'submit .item-due': function(event) { event.preventDefault(); var itemDue = event.target.text.value; Items.update(this._id, {$set: {itemDue: itemDue}}); event.target.text.value = ""; return false; }, }); Template.delayUntil.rendered = function() { $('#delay-until-picker').datepicker({ todayBtn: true, autoclose: true, todayHighlight: true }); }; Template.delayUntil.events({ 'submit .delay-until': function(event) { event.preventDefault(); var delayUntil = event.target.text.value; Items.update(this._id, {$set: {delayUntil: delayUntil}}); event.target.text.value = ""; return false; }, });
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44352762

http://stackoverflow.com/comment/44955321
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28079019
has text: Thanks. How is this different? I have not the possibility to change it now.
type: Comment

http://stackoverflow.com/comment/44338845
comment on: http://stackoverflow.com/q/27972694
score: 0
has text: This isn't going to work because of the asynchronous nature of your call. You can set the global var `resultValue` but there will be no guarantee it will be available when you call it right after `loadFile`.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28023740
answers question: http://stackoverflow.com/q/28023251
score: 0
type: Answer
has body: For your first question: You can do something like this: var flag = false; $('.textBox').on('keyup',function(e){ if(this.value) { flag = true; console.log(flag); } else { flag = false; console.log(flag); } }); On the basis of this flag you can enable/disable your save button. Since you are using a div for the 'SAVE' Button. You can grey it out to show it as disabled. And in your button 'onClick' event-handler you can put an 'if' condition for this 'flag'. Let me know if this helps and I can help you further.

http://stackoverflow.com/q/28041902
answer count: 0
tagged with: backbone-views
has body: i am trying load file from directory \ in backbone.js but it is not display the text could you please tell where I am doing wrong ? here is my code fiddle : http://jsfiddle.net/JQu5Q/20/ $(document).ready(function(){ var ContactManager = new Marionette.Application(); ContactManager.addRegions({ mainRegion:"#contend" }) ContactManager.on("start", function(){ console.log("ContactManager has started!"); var routers = new R({app: ContactManager}) }); ContactManager.start(); }) function render(tmpl_name, tmpl_data) { if ( !render.tmpl_cache ) { render.tmpl_cache = {}; } if ( ! render.tmpl_cache[tmpl_name] ) { var tmpl_dir = '/root/template'; var tmpl_url = tmpl_dir + '/' + tmpl_name + '.html'; var tmpl_string; $.ajax({ url: tmpl_url, method: 'GET', async: false, success: function(data) { tmpl_string = data; } }); render.tmpl_cache[tmpl_name] = _.template(tmpl_string); } return render.tmpl_cache[tmpl_name](tmpl_data); } Getting error: Uncaught ReferenceError: render is not defined firstpage.html:1 Uncaught SyntaxError: Unexpected token &lt; I already defined the function
has comment: http://stackoverflow.com/comment/44467282
has comment: http://stackoverflow.com/comment/44467384
type: Question
has comment: http://stackoverflow.com/comment/44468985
tagged with: javascript
has comment: http://stackoverflow.com/comment/44467520
linked to: http://stackoverflow.com/q/8366733
score: 0
has comment: http://stackoverflow.com/comment/44467474
tagged with: jquery
linked to: http://stackoverflow.com/q/14220321
tagged with: backbone.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44467597
has title: why the load html file from directory in backbone?
tagged with: marionette
has comment: http://stackoverflow.com/comment/44467542
has comment: http://stackoverflow.com/comment/44467630

http://stackoverflow.com/comment/44599419
type: Comment
has text: Sorry guys, I fixed the question
type: QuestionComment
comment on: http://stackoverflow.com/q/28111878
score: 0

http://stackoverflow.com/q/28009393
tagged with: persistence
has comment: http://stackoverflow.com/comment/44406825
has title: Invert object using only pure functions
answer count: 3
tagged with: functional-programming
has body: Assume you have an object like this: { a: [1,2,3], b: [2], c: [1,4] } and you need to convert it to: { 1: ['a', 'c'], 2: ['a', 'b'], 3: ['a'], 4: ['c'] } It's simple to do this using imperative way and mutable data structures: function convert (obj) { var key, values , result = {}; for (key in obj) { values = obj[key]; values.forEach(function (value) { result[value] = result[value] || []; // bad — mutability :( result[value].push(key); // bad — mutability :( }); } return result; } But is there any way of doing this by using only pure functions and without using any assignments? Usage of some library for functional programming is allowed.
has comment: http://stackoverflow.com/comment/44406797
favorite count: 0
accepted answer: http://stackoverflow.com/a/28009577
has comment: http://stackoverflow.com/comment/44406749
has answer: http://stackoverflow.com/a/28011039
tagged with: immutability
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28020527
score: 3
possible better answer: http://stackoverflow.com/a/28011039
downvote count: 1
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/28009577
tagged with: javascript

http://stackoverflow.com/comment/44381594
type: AnswerComment
comment on: http://stackoverflow.com/a/27995283
type: Comment
has text: It works but for some reason it does not load theses `autoplay=1&controls=0&showinfo=0&autohide=1` i dont know why
score: 0

infinite-scroll
tag name: infinite-scroll
type: Tag
tags question: http://stackoverflow.com/q/28012588
tags question: http://stackoverflow.com/q/28026627
tags question: http://stackoverflow.com/q/27987969
tags question: http://stackoverflow.com/q/28020294

http://stackoverflow.com/comment/44560023
has text: @A.Wolff I usually prefer to not expose directly my code with the naming I'm using and prefer to present a sample. @RocketHazmat Yes, it is. The function is the definition of an object that I will extend later (via `.prototype = {...}`).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28091575

http://stackoverflow.com/comment/44365912
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27986467
has text: Have you [initialized your application](http://foundation.zurb.com/docs/javascript.html) ?

http://stackoverflow.com/comment/44582034
has text: Do you have a link to your kml layer?
type: Comment
comment on: http://stackoverflow.com/q/28103395
type: QuestionComment
score: 0

http://stackoverflow.com/q/28003141
has body: I am using backbone Js with require Js and design few charts using amCharts. I included amCharts in shim as shim:{ amcharts:{ deps: [ 'jquery'' ], }, and path as: paths:{ jquery:'../lib/jquery.min', amcharts:'../lib/amcharts', I could see in console that amCharts is getting loaded but none of the charts are displayed on the browser. Then a colleague of mine included the amCharts js in html itself using script tag and Charts started to come. Anybody know what could be the reason the charts didn't come. I don't want to include amCharts library in HTML.
answer count: 2
downvote count: 0
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/28044769
accepted answer: http://stackoverflow.com/a/28022779
has title: Backbone Js + Require Js + AmCharts
tagged with: requirejs
possible better answer: http://stackoverflow.com/a/28044769
type: AnsweredQuestion
tagged with: amcharts
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28022779
has comment: http://stackoverflow.com/comment/44395170
tagged with: javascript
has comment: http://stackoverflow.com/comment/44395472

http://stackoverflow.com/q/28047924
score: 6
tagged with: odata
favorite count: 0
has body: I have two JavaScript Date objects. I need to do an OData query between these two Date objects. The information I'm querying has a field called createDate which is a DateTimeOffset. From my understanding, I can do something like this: entities?filter=((createDate ge [Date1]) and (createDate le [Date2])) My question is: What format is a DateTimeOffset? How do I convert a JavaScript Date object to DateTimeOffset format? Thank you!
type: Question
accepted answer: http://stackoverflow.com/a/28080733
upvote count: 6
has title: Format of DateTimeOffset in OData
answer count: 1
has answer: http://stackoverflow.com/a/28080733
type: AnsweredQuestion
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/28060226
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28060052
accepted answer of: http://stackoverflow.com/q/28060052
has body: reload the iframe once when it's initially hidden: $("#hyderabad").click(function () { $("#ban").hide(); $("#hyd").show(); }).one('click', function () { $("#hyd").prop('src', $("#hyd").attr('src')); }); http://jsfiddle.net/p67mq6wo/6/ Suggestion to save bandwith: only set the src of the initially visible iframe. For the other iframe(s) set an attribute data-src where you store the URL. When you show the other iframes set the src to the data-src attribute: $("#hyderabad").click(function () { $("#ban").hide(); $("#hyd").show(); }).one('click', function () { $("#hyd").prop('src', $("#hyd").data('src')); }); Especially when you have many hidden iframes the page will load much faster, because the maps will only be loaded when you show them. http://jsfiddle.net/p67mq6wo/7/ Of course you may also use a single iframe and simply set the new src based on the clicked button.
type: Answer

http://stackoverflow.com/q/28025236
upvote count: 1
tagged with: devextreme
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28052180
tagged with: knockout.js
has body: I have DevExtreme dxList: var vm = { ds: [{ "key": "group1", "items": [{ name: "item1" }, { name: "item2" }] }], tpl: function() { var r = ' '; r += ' '; r += ' '; return r; } }; }; ko.applyBindings(vm); How can I change itemTemplate run-time only for a specific item? (e.g. on mouse over)
type: Question
downvote count: 0
tagged with: javascript
tagged with: binding
has answer: http://stackoverflow.com/a/28052180
answer count: 1
has title: DevExtreme dxList change itemTemplate on mouse over
score: 1
has comment: http://stackoverflow.com/comment/44464425
favorite count: 0
has comment: http://stackoverflow.com/comment/44483118
tagged with: devexpress
has comment: http://stackoverflow.com/comment/44470149

http://stackoverflow.com/comment/44321495
type: Comment
comment on: http://stackoverflow.com/q/27964283
score: 0
type: QuestionComment
has text: What is your actual question? Is there an error? Provide a bit more information on your problem.

http://stackoverflow.com/q/28090375
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
has body: I am trying to apply a class where text matches with sibling elements. My certain condition is: I have a table with multiple rows based on data that I get through database. One of the td elements has my defined class. Now I wanted to apply a class only on those td elements where the text of this element matches with another one. So It would be like, td's whose html/text is equal has that class. I tried: $('#table tbody&gt;tr').find('td[class^="customtd"]').each(function() { if($(this).html().trim() == $(this).siblings('td').html().trim()) { $(this).addClass('active'); }else { $(this).removeClass('active'); } });
has answer: http://stackoverflow.com/a/28090501
upvote count: 3
possible better answer: http://stackoverflow.com/a/28090743
type: Question
score: 3
has answer: http://stackoverflow.com/a/28090743
has title: Apply CSS on matching text
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28090501
answer count: 2
downvote count: 0

http://stackoverflow.com/a/27983048
score: 0
type: Answer
upvote count: 1
downvote count: 1
has body: You could append a style to your element, targeting all elements (seeing as font family would only apply to text elements anyway). So, in your javascript, you would append the head section with: Note, for security reasons, SO snippets are contained and so a 'proper' live demo is out of the question here. Demo snippet $('#btn').click(function(){ $('*').css("font-family","monospace"); }); div{ font-family:"Arial"; } hi. I'm text change I've been given a font family already If you wanted to force this (that is, if the site has used the !important tag in their declaration of font-family site ), you may then have to add the dreaded !important tag, since this would be overridden if this had been used (pretty much) anywhere in the site's css. This would be achieved using the setProperty method: this.style.setProperty( 'height', '0px', 'important' ); }); is just an example of it use.
accepted answer of: http://stackoverflow.com/q/27983004
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27983004

http://stackoverflow.com/a/27976778
has comment: http://stackoverflow.com/comment/44345901
has comment: http://stackoverflow.com/comment/44345961
has comment: http://stackoverflow.com/comment/44345922
has comment: http://stackoverflow.com/comment/44345979
accepted answer of: http://stackoverflow.com/q/27976700
has comment: http://stackoverflow.com/comment/44345932
upvote count: 2
answers question: http://stackoverflow.com/q/27976700
type: AcceptedAnswer
has body: Everything is fine..Just a silly mistake..:) Do replace 'innerHtml' with 'innerHTML' like this in below: document.getElementById(cell).innerHTML = text; Learn more about that in this link.. innerHTML You can also use 'textContent', in case of no HTML content required..
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/28024657
score: 1
answers question: http://stackoverflow.com/q/28024364
upvote count: 1
has body: Try this $("a[href*='//index.php?eID=']").children("img").remove(); You can test the code here.
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44374853
score: 0
type: QuestionComment
type: Comment
has text: Please learn how to construct testcases. You won't be able to adequately debug your problems until you do. http://sscce.org
comment on: http://stackoverflow.com/q/27991776

http://stackoverflow.com/a/28101069
has body: Using $("img") selects all img elements. You need to use DOM navigation methods to get from the input for which the change event occurred to its related img element. $('.custom-upload input[type=file]').change(function() { var $this = $(this); // store a reference to current input $this.next().find('input').val($(this).val()); if (this.files &amp;&amp; this.files[0]) { var reader = new FileReader(); reader.onload = imageIsLoaded; reader.readAsDataURL(this.files[0]); } function imageIsLoaded(e) { $this.closest('.custom-upload') .find('img') .attr('src', e.target.result) .fadeIn(); }; }); I've saved a reference to the current file input in the (new) variable $this. Then in the img onload handler I've used .closest() to navigate up to the containing div and then .find() to go back down to the img in that div. (You could use $this.siblings("img") or $this.next().next(), but that would only work for your specific html structure as it is right now - using .closest() plus .find() will work even if you later add an extra (sub-)container div around the img or otherwise tweak the structure, just as long as the file input and img are still within the same containing div.) Demo: http://jsfiddle.net/jndL3rj5/
type: Answer
answers question: http://stackoverflow.com/q/28100950
accepted answer of: http://stackoverflow.com/q/28100950
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/28027808
answers question: http://stackoverflow.com/q/28027707
score: 3
has comment: http://stackoverflow.com/comment/44440790
accepted answer of: http://stackoverflow.com/q/28027707
has comment: http://stackoverflow.com/comment/44441064
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/44440873
has comment: http://stackoverflow.com/comment/44443290
has body: When you ask for a property on a JS object, JS will traverse the prototype chain until it finds that property. So objects inherit from their prototypes. A constructor is just a function. When a function (constructor of Cat) is executed, there is no rule for also invoking other functions (constructor of Mammal). You can force this to happen explicitely. e.g. function Cat(name){ Mammal.call(this, name); this.catStuff = function(){ console.log("cat says mew"); } }
upvote count: 3

math
tags question: http://stackoverflow.com/q/27968897
tags question: http://stackoverflow.com/q/28097933
type: Tag
tags question: http://stackoverflow.com/q/27996620
tags question: http://stackoverflow.com/q/27971519
tags question: http://stackoverflow.com/q/28075752
tags question: http://stackoverflow.com/q/28112315
tags question: http://stackoverflow.com/q/28016194
tags question: http://stackoverflow.com/q/28032958
tags question: http://stackoverflow.com/q/28115789
tag name: math
tags question: http://stackoverflow.com/q/27995743

http://stackoverflow.com/q/27998667
score: -1
has comment: http://stackoverflow.com/comment/44387267
has comment: http://stackoverflow.com/comment/44386974
has comment: http://stackoverflow.com/comment/44387009
accepted answer: http://stackoverflow.com/a/27998718
downvote count: 2
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44387063
has answer: http://stackoverflow.com/a/27998718
has title: cant call a javascript function within jquery
has comment: http://stackoverflow.com/comment/44387360
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44386961
type: Question
has body: I used two jqueries library &lt;script src="/Scripts/jquery-1.6.4.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/Scripts/jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt; I have a function named onSubmit(); function onSubmit() {if ($.trim($("#password").val()) != "") { $("#Command").val("LOGIN"); } } When I try to use onSubmit function, intelicense in visual studio find it without any problem, but at run time I get error undefined onSubmit. I try to use onSubmit function within this piece of code: $(function () { $("#slider").draggable({ axis: 'x', containment: 'parent', drag: function (event, ui) { if (ui.position.left &gt; 550) { $("#well").fadeOut(); onSubmit(); //this line get undefined error } else { ("opacity", 100 - (ui.position.left / 5)) } }, stop: function (event, ui) { if (ui.position.left &lt; 551) { $(this).animate({ left: 0 }) } } }); I declared onSubmit function at bottom of my codes after everythings. Im not sure if it cause problem. UPDATE: I changed my declaration like this: window.onSubmit()= function() { if ($.trim($("#password").val()) != "") { $("#Command").val("LOGIN"); } }
tagged with: javascript

http://stackoverflow.com/comment/44456209
type: AnswerComment
comment on: http://stackoverflow.com/a/28035294
score: 0
type: Comment
has text: the sequence is initiated when you invoke your readImages function. this creates a var imageArray, then calls fs.readdir. Once the directory has been read, the anonymous function (the second argument of readdir() ) is invoked, with access to the array of files. this is where files.filter is executed, etc. The last line of that anonymous function is where your custom callback gets executed. That function will be defined as the first argument of .readImages()

http://stackoverflow.com/q/28076312
accepted answer: http://stackoverflow.com/a/28078709
tagged with: location
tagged with: getelementbyid
answer count: 1
downvote count: 0
has body: I just ran into another problem using Leaflet. I want to zoom into specific locations using Links provided underneath the maps. With one link I got it to work fine but more Links don't work. I figured out that the "getelementbyId" must be the problem because an ID is meant to be unique in an html page. But I don't have enough knowledge of JS to solve this any other way. Could somebody maybe help with this problem? The locations are stored in tags: &lt;div id="map-navigation" class="map-navigation"&gt; &lt;a href="#" data-zoom="12" data-position="48.06633,7.67268"&gt; Link 1 &lt;/a&gt; &lt;/div&gt; The JS looks like this: document.getElementById('map-navigation').onclick = function(abc) { var pos = abc.target.getAttribute('data-position'); var zoom = abc.target.getAttribute('data-zoom'); if (pos &amp;&amp; zoom) { var locat = pos.split(','); var zoo = parseInt(zoom); map.setView(locat, zoo, {animation: true}); return false; } } You can check the whole thing out on jsfiddle: http://jsfiddle.net/chodid/ndznw6z7/2/ Thanks hell of a lot in advance for any advice!
favorite count: 0
tagged with: zooming
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28078709
tagged with: leaflet
score: 1
has title: Leaflet zoom on locations using multiple links
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/comment/44472241
comment on: http://stackoverflow.com/q/28042232
has text: Thanks Sebastian for your answer. What do you mean by transform into correct format?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27982199
tagged with: javascript
has body: I could not find out why this part of my code doesn't work: var loc = window.location.pathname; var dir = loc.substring(0, loc.lastIndexOf('/')); var FilePath = dir + "/" + FileName; var file = new File("FilePath"); var reader = new FileReader(); reader.onload = function(e) {FileText = reader.result;} reader.readAsText(file); alert (FileText); The intention is, I think, clear: FilePath contains the filename of a file (passed via parameter FileName) containing logging data (a plain ASCII text file, with one line per log entry), the file is located in the same directory as the web page is (loc), and I want to embed the text into my html document somewhere further down the code. Since the logged lines are of different kinds (e.g. errors, warning, other blabla ...) each line needs to be parsed and processed. I intended to split FileText into an array, and loop through it. I cannot, however, get readastext to work. Though, according to FireFox debugger, FilePath does contain the correct string, I get the NS_ERROR_FAILURE, which I, according to the sparse documentation I found about it, must consider to be the 'zillionst stupid way to say "File not found". I found tons of other posts from people messing with the file API, and tons of snippets taken from the mozilla docs which don't help me out. I read that there are maybe other ways to read a file, e.g. through Ajax, JQuery ... but before I go that way ... is it really, really absolutely impossible to accomplish what I want using just plain JavaScript, and if it is possible, who can provide a code snippet? Thanks very much, Armin.
has title: Again: how can I read a file using javascript
has comment: http://stackoverflow.com/comment/44355828
possible better answer: http://stackoverflow.com/a/27982396
downvote count: 0
has answer: http://stackoverflow.com/a/27982396
favorite count: 0
has answer: http://stackoverflow.com/a/28156255
tagged with: filereader
has answer: http://stackoverflow.com/a/28316922
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44355751
has answer: http://stackoverflow.com/a/27984851
linked to: http://stackoverflow.com/q/6847697
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/28156255
type: Question
has comment: http://stackoverflow.com/comment/44355815

http://stackoverflow.com/a/28012830
has body: You have to change your jsFiddle setting to allow your code to truly be in the global namespace. Right now, your code is in an onload handler and is thus not global and so the event handlers specified in your HTML are not found and thus never called. In the upper left of your jsFiddle, change the drop-down that says "onLoad" to be "No wrap - in head". Then, your jsFiddle will work as it does here:http://jsfiddle.net/r8fsh3ek/2/.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/28012781
accepted answer of: http://stackoverflow.com/q/28012781

http://stackoverflow.com/a/28057455
has body: While @dandavis's answer/comment is impressive, lets break it down in to steps. Get the value from the textarea and trim() leading and ending spaces. Replace all white spaces with a single white space using /\s+/g. meaning find every white space occurring one or more times. Split by ,<space> or <space>,<space>. Split returns array. Iterate every array element with filter Check if element is a valid domain. If so return it. var domains = document.querySelector("textarea").value; domains = domains.trim().replace(/\s+/g, " ").split(/\s?,\s/); var domainsTested = domains.filter(function(element){ if (element.match(/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,3})$/)) { return element; } }) document.write(domainsTested.join(" | ")); //this is just here to show the results. document.write(" Domainstring is ok: " + (domainsTested.length == domains.length)); //If it's valid then this should be equal. www.example.com , example.com, example.ca, example, example.com example.nl www.example, www.exam ple.com, sub.sub.sub.domain.tv, do main.it, sub.domain.tv
downvote count: 0
has comment: http://stackoverflow.com/comment/44496759
has comment: http://stackoverflow.com/comment/44496737
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44496690
answers question: http://stackoverflow.com/q/28057243

http://stackoverflow.com/a/27983260
downvote count: 1
has body: Try this rails escape_javascript http://api.rubyonrails.org/classes/ActionView/Helpers/JavaScriptHelper.html
upvote count: 0
score: -1
type: Answer
answers question: http://stackoverflow.com/q/27982276

http://stackoverflow.com/comment/44509318
type: Comment
type: QuestionComment
has text: guys @TrueBlueAussie cleared my wrong idea about the whole thing.
comment on: http://stackoverflow.com/q/28064398
score: 0

http://stackoverflow.com/comment/44609888
type: Comment
has text: ["Animated properties can also be relative. If a value is supplied with a leading `+=` or `-=` sequence of characters, then the target value is computed by adding or subtracting the given number from the current value of the property."](http://api.jquery.com/animate/#animation-properties)
type: QuestionComment
comment on: http://stackoverflow.com/q/28117854
score: 1

http://stackoverflow.com/comment/44409561
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28010643
score: 0
has text: Both functions are sharing `a`. It's in the global scope. However `totald` is on an interval. How is `subtractd` called?

http://stackoverflow.com/q/28093382
has comment: http://stackoverflow.com/comment/44563104
tagged with: jquery
duplicate of: http://stackoverflow.com/q/750486
has answer: http://stackoverflow.com/a/28093686
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28093533
accepted answer: http://stackoverflow.com/a/28093533
linked to: http://stackoverflow.com/q/750486
type: AnsweredQuestion
tagged with: loops
type: Question
has body: I'm interested in cycling through some div's I have on my page that have numbers in the ID. This is what I have so far... var count = 1; while(count != 12) { $('#logo-'.concat(count).concat(' &gt; img')).click(function() { if($('#info-'.concat(count)).hasClass('dropdown-active')) { $('#info-'.concat(count)).slideUp(); $('#info-'.concat(count)).removeClass('dropdown-active'); } else { $('#info-'.concat(count)).slideDown(); $('#info-'.concat(count)).addClass('dropdown-active'); } return false; }); count++; } The count seems to stop working when it reaches the if statement. So the ID's on the page are logo-1, info-1, logo-2, info-2, etc...
possible better answer: http://stackoverflow.com/a/28093686
has comment: http://stackoverflow.com/comment/44563197
tagged with: javascript
has title: Using JavaScript to cycle through elements with numbers in the ID
has comment: http://stackoverflow.com/comment/44563065
score: 0
answer count: 2
tagged with: while-loop

http://stackoverflow.com/q/28063852
tagged with: jquery
has comment: http://stackoverflow.com/comment/44508263
type: AnsweredQuestion
has title: jQuery - Avoid code repetition and shorten script
has body: I've got the following line of jquery that targets each category item within my menu and moves the li to the first ul.main_navigation_level_2. The following works but I have to copy and paste it out 10 times for each different category. $('li#main_navigation_dept_home_and_furniture_furniture ul.main_navigation_level_2') .children('li') .appendTo('li#main_navigation_dept_home_and_furniture_furniture ul.main_navigation_level_2:first'); The below is my attempt: $(".main_navigation_level_2").each(function() { var menuItem = $(this); menuItem.children('li').appendTo(':first-child',this); });
type: Question
has answer: http://stackoverflow.com/a/28064201
has comment: http://stackoverflow.com/comment/44508290
accepted answer: http://stackoverflow.com/a/28064201
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/44423048
score: 1
has text: A JSFiddle with some context for your code would be helpful.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28018081

http://stackoverflow.com/comment/44603133
type: Comment
score: 0
type: AnswerComment
has text: @user3127242 I updated the plnkr to allow you to change the id of the friends. I'm not sure what kind of update problems you are having, but the plnkr seems to update the views fine.
comment on: http://stackoverflow.com/a/28100384

http://stackoverflow.com/comment/44595784
type: Comment
comment on: http://stackoverflow.com/q/28110966
score: 0
type: QuestionComment
has text: no it is for ordering product in a flash sale as it lasts only for 2 to 3 seconds

http://stackoverflow.com/a/28118297
upvote count: 1
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/28118028
accepted answer of: http://stackoverflow.com/q/28118028
downvote count: 0
score: 1
has body: If you are passing a string, then use quotes around the string. As single and double quotes are equivalent, it would make most sense to use single quotes in your example, otherwise you end up having to escape quotes and it starts getting messy. If you are passing a literal number or the name of a variable, do not use quotes. More information on quotes: When to Use Double or Single Quotes in JavaScript.

http://stackoverflow.com/comment/44469819
score: 0
type: AnswerComment
type: Comment
has text: use track by option for the ng-options directive, updated the fiddle http://jsfiddle.net/fo1h1n53/1/
comment on: http://stackoverflow.com/a/28042543

http://stackoverflow.com/q/27990917
tagged with: javascript
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/44376221
has body: If found this Stack Overflow page that shows you how to add a Javascript include to an ASP.NET/MVC (Razor) view, so that it ends up in the HEAD section of the web page: Add CSS or JavaScript files to layout head from views or partial views It works great. But I'm wondering if there is a way to do it in a way that takes advantage of bundling? I found this SO post that says it isn't possible and to use something called Cassette, but it's from 2012 so I'm wondering if there's a way to do it now native to ASP.NET/MVC/Razor: MVC Bundles: How to add assets in views and have them render combined with the main layout page bundle I found this SO post that talks about adding new bundles dynamically but it appears to add them only to the BODY section, not the HEAD: MVC Bundles: How to add assets in views and have them render combined with the main layout page bundle
has comment: http://stackoverflow.com/comment/44374237
tagged with: bundling-and-minification
has answer: http://stackoverflow.com/a/27992809
has title: Add Javascript to header section of an ASP.NET/MVC web page from a view with bundling?
tagged with: razor
upvote count: 1
has comment: http://stackoverflow.com/comment/44374216
type: Question
accepted answer: http://stackoverflow.com/a/27992809
type: AnsweredQuestion
tagged with: asp.net-mvc
score: 1
linked to: http://stackoverflow.com/q/5110028
downvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/10920421

http://stackoverflow.com/a/28005383
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28005210
has body: Simply add the following: google.maps.event.addListener(map, 'zoom_changed', function(e) { if(map.zoom == 15) { label.setMap(map); } else { label.setMap(null); } });
has comment: http://stackoverflow.com/comment/44440628
has comment: http://stackoverflow.com/comment/44480553
has comment: http://stackoverflow.com/comment/44400001
type: Answer
has comment: http://stackoverflow.com/comment/44399865
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/28005210
has comment: http://stackoverflow.com/comment/44415007
upvote count: 1

http://stackoverflow.com/q/27974631
favorite count: 0
upvote count: 3
type: UnansweredQuestion
has body: What is going wrong with this code? When I log the array list, before the sumbit function, its ok (with the expected content and position of elements inside it's arrays). But, when I get it through e.parameter.arrayListit doesn't have the same value, neither it's elements. How to fix that? function showList(folderID) { var folder = DocsList.getFolderById(folderID); var files = folder.getFiles(); var arrayList = []; for (var file in files) { file = files[file]; var thesesName = file.getName(); var thesesId = file.getId(); var thesesDoc = DocumentApp.openById(thesesId); for (var child = 0; child &lt; thesesDoc.getNumChildren(); child++){ var thesesFirstParagraph = thesesDoc.getChild(child); var thesesType = thesesFirstParagraph.getText(); if (thesesType != ''){ var newArray = [thesesName, thesesType, thesesId]; arrayList.push(newArray); break; } } } arrayList.sort(); var mydoc = SpreadsheetApp.getActiveSpreadsheet(); var app = UiApp.createApplication().setWidth(550).setHeight(450); var panel = app.createVerticalPanel() .setId('panel'); var label = app.createLabel("Choose your theses").setStyleAttribute("fontSize", 18); app.add(label); panel.add(app.createHidden('checkbox_total', arrayList.length)); panel.add(app.createHidden('arrayList', arrayList)); Logger.log(" arrayList before submit = " + arrayList); for(var i = 0; i &lt; arrayList.length; i++){ var checkbox = app.createCheckBox().setName('checkbox_isChecked_'+i).setText(arrayList[i][0]); Logger.log("arrayList[i][0] = " + arrayList[i][0]); Logger.log("arrayList[i] ====&gt; " + arrayList[i]); panel.add(checkbox); } var handler = app.createServerHandler('submit').addCallbackElement(panel); panel.add(app.createButton('Submit', handler)); var scroll = app.createScrollPanel().setPixelSize(500, 400); scroll.add(panel); app.add(scroll); mydoc.show(app); } function include(arr, obj) { for(var i=0; i&lt;arr.length; i++) { if (arr[i] == obj) // if we find a match, return true return true; } return false; // if we got here, …
has title: Why this try of recovering an array from the `e.parameter.variableName` method is not working?
has comment: http://stackoverflow.com/comment/44344460
has answer: http://stackoverflow.com/a/28242744
score: 3
type: Question
tagged with: google-apps-script
linked to: http://stackoverflow.com/q/27805250
tagged with: google-sheets
has answer: http://stackoverflow.com/a/28119452
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44344490
has answer: http://stackoverflow.com/a/27976045
answer count: 3

http://stackoverflow.com/q/27986221
possible better answer: http://stackoverflow.com/a/27986398
has comment: http://stackoverflow.com/comment/44363434
downvote count: 1
type: Question
has title: Trying to refresh JavaScript variable that is assigned to a PHP variable
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27986398
upvote count: 1
has comment: http://stackoverflow.com/comment/44363520
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27986407
has comment: http://stackoverflow.com/comment/44363401
has answer: http://stackoverflow.com/a/27986441
answer count: 5
has answer: http://stackoverflow.com/a/27986945
has body: I have assigned two variables that are equal to a PHP variable that can change at any time. I am trying to update a div every 5 seconds; for example, to update the number. I am assuming this doesn't work because the PHP doesn't run again once the page has loaded. What is the best way to get around this? I don't mind linking to another page if necessary. Here's my code: $(document).ready(function() { var buyprice = &lt;?php echo $coinTicker-&gt;price($coin2[1] , 'buy'); ?&gt;; var sellprice = &lt;?php echo $coinTicker-&gt;price($coin2[1] , 'sell'); ?&gt;; $('#currentbuyprice').html(buyprice); $('#currentsellprice').html(sellprice); setInterval(function() { var buyprice = &lt;?php echo $coinTicker-&gt;price($coin2[1] , 'buy'); ?&gt;; var sellprice = &lt;?php echo $coinTicker-&gt;price($coin2[1] , 'sell'); ?&gt;; $('#currentbuyprice').html(buyprice); $('#currentsellprice').html(sellprice); }, 5000); });
tagged with: php
has answer: http://stackoverflow.com/a/27986489
has answer: http://stackoverflow.com/a/27986407
type: AnsweredQuestion

http://stackoverflow.com/q/28004834
has title: FirefoxOS - get resource files from JS?
tagged with: firefox-os
type: Question
has answer: http://stackoverflow.com/a/28077425
has answer: http://stackoverflow.com/a/30056177
tagged with: javascript
has answer: http://stackoverflow.com/a/28034056
score: 0
answer count: 3
has body: Is there a way to hold a large block of text, or images/videos, embedded in a FirefoxOS app, while directly accessing them from the app (similar to /res/raw/ in Android)? I don't see where the /data/ directory is being accessed in the example app.
type: UnansweredQuestion

http://stackoverflow.com/a/28064445
score: 1
type: AcceptedAnswer
downvote count: 0
has body: You can do it like this: var test = [ {"testId" : 99, "current" : false }, {"testId" : 10, "current" : false }]; test.forEach(function(r) { if (r.testId == 99) { r.current = true; } }); Not sure why you want to avoid the loop, and also not clear from your question if you want to do it for all elements that satisfy the condition (which the above code currently does) or break after the first one. JS Fiddle
accepted answer of: http://stackoverflow.com/q/28064359
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28064359

http://stackoverflow.com/q/28117791
type: Question
has comment: http://stackoverflow.com/comment/44609683
tagged with: javascript
has answer: http://stackoverflow.com/a/28117871
has comment: http://stackoverflow.com/comment/44609993
has comment: http://stackoverflow.com/comment/44609953
answer count: 1
tagged with: minify
has body: I have a javascript file that has two global variables. The problem is that when I minify the file the variables are removed and I get errors in the console. How can I minify the file and have it keep my global variables. /** global variables **/ window.$url = 0; window.$searchText = 0;
has title: js global variable removed when minified
favorite count: 0
linked to: http://stackoverflow.com/q/9773964
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44609680
upvote count: 3
score: 0
downvote count: 3
has comment: http://stackoverflow.com/comment/44609643

http://stackoverflow.com/q/27978374
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/65104263
has body: When using keyup keydown to select option from autocomplete list textbox is showing value. But incase of selection from mouse it is working properly. JsFiddle - http://jsfiddle.net/0c21r1pe/1 $("#promoteActionTextBox").autocomplete({ source: actionNames, minLength: 0, select: function (event, ui) { event.preventDefault(); $(this).val(ui.item.label); $('#promoteActionError').hide(); $(this).attr('actionId', ui.item.value); }, change: function (event, ui) { if (!ui.item) { $(this).val(''); } else { $('#promoteActionError').hide(); $(this).val(ui.item.label); $(this).attr('actionId', ui.item.value); } } }).focus(function (event, ui) { event.preventDefault(); $('#promoteActionTextBox').autocomplete("search"); this.value = ui.item.label; });
type: Question
answer count: 2
tagged with: jquery-ui
tagged with: autocomplete
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44349690
has title: Jquery Ui AutoComplete is not working with keyup/down when used with label value
has comment: http://stackoverflow.com/comment/44355046
has answer: http://stackoverflow.com/a/27980591
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/45165575
answers question: http://stackoverflow.com/q/28024178
upvote count: 0
score: -2
has body: you can use document.referrer. in your javascript file, just simply add window.location = document.referrer;
type: Answer
downvote count: 2

http://stackoverflow.com/comment/44603982
type: Comment
comment on: http://stackoverflow.com/q/28114925
has text: Post your `MyFunc()` function and the inputs please.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44553696
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27997872
has text: i am not sure what is the problem, but ('form').valid will not work unless i have to check each item separately , while if i define the following "function bindForm(dialog) { $('form', dialog).submit(function () { if ($(this).valid()) {" so i use (this).valid() instead of ('form').valid() will work for me? so is using (this).valid() considered a wrong approach ?

http://stackoverflow.com/a/28072471
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44524453
has comment: http://stackoverflow.com/comment/44527387
has body: Instead of using the value of this that jQuery sets when it calls an event handler, use the target jQuery passes to the event handler. They're both the same object: The DOM element that triggered the event. So your code becomes: class Cart constructor: -&gt; @bind_listeners() bind_listeners: -&gt; $('td.product').on 'change', 'select', @product_change.bind(@) update_prices: -&gt; # For each row of items get span.subtotal and sum # Replace content of "total" field with result product_change: (e) -&gt; # Get new product's price. I need jQ's 'this' new_price = $(e.currentTarget).find ':selected' # Replace subtotal field $('span.subtotal').html new_price @update_prices() (Note that I've used .bind to prevent the value of this from being overridden when jQuery calls product_change. You could, alternatively, define the method with =&gt; to accomplish the same thing.) Using this in methods to consistently refer to the object those methods are attached to, rather than something else, will make your life as a CoffeeScripter much easier.
accepted answer of: http://stackoverflow.com/q/28071498
has comment: http://stackoverflow.com/comment/44568836
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28071498
downvote count: 0
has comment: http://stackoverflow.com/comment/44525521
has comment: http://stackoverflow.com/comment/44568913
has comment: http://stackoverflow.com/comment/44549397
type: Answer

http://stackoverflow.com/q/28037021
score: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28037043
downvote count: 1
type: Question
upvote count: 5
tagged with: javascript
linked to: http://stackoverflow.com/q/258372
has body: So I have been trying for hours. Any tips or ideas on how to make a webpage scroll horizontal instead of scrolling down? Edit: When someone scrolls vertically, instead of scrolling vertically you scroll Horizontally.
answer count: 1
has comment: http://stackoverflow.com/comment/44458578
has comment: http://stackoverflow.com/comment/44458571
has answer: http://stackoverflow.com/a/28037043
favorite count: 0
has title: How to Horizontal Scroll when scrolling vertical?
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/27987112
score: 0
answer count: 2
tagged with: shim
upvote count: 1
has body: I was writing something and in my research found that arrays are documented to have map/reduce/filter, but not in IE ?8? or older. So I poked around, found JavaScript: What dangers are in extending Array.prototype?, and besides several responses to cool my enthusiasm for extending Array.prototype (perhaps even as a shim), the accepted response said: ...This is annoying and has bit me. Old IE sometimes has problems with adding this kind of functionality. You'll just have to see if it works in a case by case basis. For me the problem I had was adding Object.keys to IE7. It seemed to stop working under certain circumstances. Your mileage may vary. So, in other words, my use case was to shim for older IE was a mechanism that may be dodgy in older IE. So if I want to support old IE, I should make and use my own standalone map / reduce / filter? I'm planning on taking a different approach in what I am writing now, but it would be nice to know for reference's sake, "If I want feature X that is not in browser Y, and shims may break in browser Y, what is the preferred approach?"
downvote count: 1
linked to: http://stackoverflow.com/q/8859828
favorite count: 0
has comment: http://stackoverflow.com/comment/44365654
type: UnansweredQuestion
has title: Does shimming map / reduce / filter work in Exploder 6 / 7 / 8?
has answer: http://stackoverflow.com/a/28013523
has answer: http://stackoverflow.com/a/27987176
type: Question
tagged with: backwards-compatibility
tagged with: internet-explorer
tagged with: javascript
tagged with: prototype

http://stackoverflow.com/q/28070269
type: Question
score: -2
tagged with: javascript
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/28070332
has comment: http://stackoverflow.com/comment/44519883
has comment: http://stackoverflow.com/comment/44525449
type: UnansweredQuestion
upvote count: 0
has body: Getting an unexpected identifier error in my function. javascript if (dailyRewardActive) //used to show how much time till it ends { minutes = (((900000 - timer) / 60)/1000 - ((((900000 - timer)) % 60)/1000) seconds = ((900000 - timer) % 60000) //getting it here document.getElementById("timer").innerHTML = minutes.toFixed(0)+":"+seconds.toFixed(0); timer = timer + 1000*timeBetweenTicks; } html Time left on Daily Reward: 0 timer is a global variable (I know thats bad practice but would be very difficult to change in this code at this point)
has title: unexpected identifier daily reward function

http://stackoverflow.com/q/28031800
has body: I have a pretty simple ng-href feeding off of an object in a repeat that is causing a little issue. Everywhere else on my app, if I use ng-href it keeps the single page feel and does not refresh the app, however in this instance it seems to be refreshing the page and I can't figure out why. &lt;md-button ng-if="category.link" ng-href="/{{category.link}}"&gt; I just have this inside of a repeat, feeding off a repeated object, which just says show this button if it has a link and attaches the ng-href to it (using angular-material buttons). The link works fine, it's just refreshing the page. Any insight would be very helpful, I can't seem to figure this one out. Thanks!
has comment: http://stackoverflow.com/comment/44448987
tagged with: angularjs
has answer: http://stackoverflow.com/a/34292273
has comment: http://stackoverflow.com/comment/44448941
has title: Angular, ng-href causing page to refresh
has answer: http://stackoverflow.com/a/28032081
has comment: http://stackoverflow.com/comment/44448208
type: UnansweredQuestion
tagged with: javascript
type: Question
score: 0
answer count: 2

http://stackoverflow.com/a/28100500
upvote count: 2
has comment: http://stackoverflow.com/comment/44576563
downvote count: 0
has body: All it neeeds to be is 0. $(".clicker").click(function () { $('#container').animate({ scrollTop: 0 }, 2000); });
type: Answer
answers question: http://stackoverflow.com/q/28100423
score: 2

http://stackoverflow.com/a/42155603
type: Answer
has body: Have you tried put variable in brackets? &lt;div ui-layout-container size='{{sizeModel}}'&gt;
answers question: http://stackoverflow.com/q/28071098
score: 0

http://stackoverflow.com/q/27987969
has answer: http://stackoverflow.com/a/27988299
type: Question
tagged with: javascript
has body: Quite often on pages with infinite scroll you might face scenario: you're scrolling a lot, then you click some link from inifinite list, you dont like what you've clicked so you go back you'd like to continue scrolling from the point you've left. but all items you were scrolling are not there and you need to scroll everything you've already seen again. How do you handle those situations? Do you know any solution for that? Is there any way to save state of page or at least know what this situation was and load proper ammount of infinite list and scroll user to last seen item.
tagged with: dynamic-pages
has title: Website Infinite scrolling - return scroll position after user 'go back' in browser
upvote count: 2
linked to: http://stackoverflow.com/q/11373741
answer count: 3
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/27988258
type: UnansweredQuestion
tagged with: infinite-scroll
has comment: http://stackoverflow.com/comment/44368876
score: 2
downvote count: 0
tagged with: scroll
has answer: http://stackoverflow.com/a/68935249

http://stackoverflow.com/q/28104502
linked to: http://stackoverflow.com/q/1747039
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44585113
has comment: http://stackoverflow.com/comment/44583764
tagged with: forms
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has title: jquery pass a custom function to click event does not work
has body: This may be a stupid question but I'd like to get some clarification on the matter. I have a function that loops through an array and copies values from input A to input AA (B to BB, and so on). But I want this function to execute when a hidden div is visible only. So I was trying to do this: $('#showSave').on('click', function () { copyInputValues(); $('#divModal').css('display', 'block'); }); Then I also tried this to no avail: $('#showSave').click(copyInputValues); This is my custom function: function copyInputValues() { var minInputs = ['abel1', 'abel2', 'abel3', 'abel4']; $.each(minInputs, function (i, val) { $('#l' + val).change(function () { $('#modalL' + val).val($(this).val()); }); }); } What is wrong with these scripts? I'm not very versed on javascript or jquery. I'm kinda learning and I've found stackOverflow to be a great source of information. Thanks again for your help!
answer count: 1
has answer: http://stackoverflow.com/a/28104665

http://stackoverflow.com/comment/44472051
has text: Its a school assignment and I used first thing I got working. Also AJAX request was REQUIRED so that was my option.
comment on: http://stackoverflow.com/a/28044623
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44417448
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28014268
has text: @Hanet has a fiddle in his post the shows that it does work so maybe issue elsewhere. Any errors in the console?
type: AnswerComment

http://stackoverflow.com/comment/44409967
has text: I am sticking to the first option of the one page/one view..So , lets say i am on page 1 and when i hit 'Next' on page 2, should i make an ajax call by submitting the form?because i have to do validations on page 1..Similarly when i click 'Back' when i am on page 2, should i again make the ajax call
type: Comment
comment on: http://stackoverflow.com/q/28005503
score: 0
type: QuestionComment

http://stackoverflow.com/q/28065163
has comment: http://stackoverflow.com/comment/44511453
has title: interaction issue with mouseover and mouseout on clip image with svg on IE11 and IE10
upvote count: 1
has comment: http://stackoverflow.com/comment/44511383
has comment: http://stackoverflow.com/comment/44515440
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
type: UnansweredQuestion
downvote count: 0
has body: This is my task : I have a polygon that clip an image; On mouseover, i change the plot of the polygon with an animate method; On mouseout, i set back the initial plot with an animate method. It's working fine with all browsers (IE9 too) except IE10 and IE11. The issue is that it seems that the "clipped object" loses focus right after the mouseover and the mouseout is triggered directly for IE10 and IE11. It's working fine if : I clip any others element (text, polygon, line); I remove all animate method; I animate the content of the polygon (the image) and not the plot of the polygon. I try this with two libraries : snap.svg.js and svg.js. And the exact same issue came out. Here a the sample code with Snap. var paper = Snap(currentWidth, currentHeight).appendTo(myDocument)); var img = paper.image($model.path+'assets/images/ui/right_layer.png'); var circle = paper.circle(300, 300, 100).attr({ fill: '#fff' });; var clipped = img.attr({ clipPath: circle }); img.mouseover(function(){ circle.animate({r: 50}, 1000); }) img.mouseout(function(){ circle.animate({r: 100}, 1000); })
score: 1
has comment: http://stackoverflow.com/comment/44515115
has comment: http://stackoverflow.com/comment/44510721
type: Question
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/44511533
tagged with: javascript

ppapi
tag name: ppapi
type: Tag
tags question: http://stackoverflow.com/q/28044968
tags question: http://stackoverflow.com/q/28059325

http://stackoverflow.com/a/27991904
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27991309
downvote count: 0
has body: Highcharts-ng directive needs those properties to go under options. $scope.highchartsNG = { options:{ plotOptions: { pie: { dataLabels: { enabled: true, distance: -50, style: { fontWeight: 'bold', color: 'white', textShadow: '0px 1px 2px black' } }, startAngle: -90, endAngle: 90, center: ['50%', '75%'] } } }, In highchartsNGConfig the options property is a standard highcharts options object. e.g. anything you can pass into `new Highcharts.Chart(options); works here. This options object is watched for changes. When something changes here the whole chart is recreated.
type: Answer
has comment: http://stackoverflow.com/comment/44379964
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/27991309

http://stackoverflow.com/q/28070312
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28070357
answer count: 2
has comment: http://stackoverflow.com/comment/44519979
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44519935
has answer: http://stackoverflow.com/a/60045560
upvote count: 2
has title: how to bypass robots.txt while crawling
score: 1
has body: Can anyone please tell me if there is any way to ignore or bypass robots.txt while crawling. Is there any way to modify script in such way that it ignores robots.txt and go on with crawling? Or is there any other way to achieve the same? User-agent: * Disallow: / User-agent: Googlebot Disallow:
downvote count: 1

css-animations
tags question: http://stackoverflow.com/q/28010455
tags question: http://stackoverflow.com/q/27997841
tags question: http://stackoverflow.com/q/28007794
type: Tag
tag name: css-animations
tags question: http://stackoverflow.com/q/28008915

http://stackoverflow.com/comment/112654718
type: QuestionComment
has text: I found my issue was that I had `overflow-x: hidden` on both html and body. If I moved it to just html, it was fine. However, IE11 would now ignore it, meaning I had to add an additional `overflow-x: hidden` to an internal element. As another note, it was due to adding flex and sticky footer stuff that caused this bug to manifest itself. Translates and position absolutes probably affect it too.
comment on: http://stackoverflow.com/q/28050548
score: 0
type: Comment

http://stackoverflow.com/comment/44611978
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28118877
has text: And why are you only writing your "showFile()" function if the PDFLink has a value? I'd write the function to the page no matter what.
score: 1

http://stackoverflow.com/comment/44517023
comment on: http://stackoverflow.com/q/28068595
score: 0
type: Comment
type: QuestionComment
has text: You'll want to use promises. Caching asynchronous results is trivial with them.

http://stackoverflow.com/comment/44617006
has text: Whatever element you put the text into already. You could then give it a class, say `class="preserve"` and then in the stylesheet `.preserve { white-space : pre }`.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/28120585

http://stackoverflow.com/q/28083395
type: Question
has body: I spent hours testing all my code, step by step, and still can't make it work. I eventually got the php file to send a test object to the mysql database but I still can't get the jQuery ajax post to connect to php. Can anyone spot the issue? I get the "500 internal server error" message when I run the code. Javascript: var jsonEntry = {"timestamp":"2015/01/21 22:18:00","note":"hi there","tags":["one", "two"]}; // send json converted object to php file via ajax $("#sendButton").click(function () { $.ajax({ url: 'php/ajax.php', type: 'POST', dataType: 'JSON', data: jsonEntry, error : function(xhr, status, error) { alert(xhr.status); alert(error); }, success : function(data) { console.log('send success'); } }); }); PHP code from "ajax.php:" &lt;?php if(isset($_POST["data"])) { $json = file_get_contents('php://input'); $obj = json_decode($json, true); $timeStamp = $obj[timestamp]; //added semicolon here $note = $obj[note]; $tags = $obj[tags]; //Connecting to a database //Connection info $hostname = "localhost"; $username = "root"; $password = "root"; //Code to connect $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); echo "Connected to MySQL&lt;br&gt;"; // Select database to work with $selected = mysql_select_db("notes", $dbhandle) or die("Could not select examples"); //Execute SQL query and return records mysql_query("INSERT INTO notes (dateAndTime, noteBody, noteTags) VALUES ('$timestamp', '$note', '$tags')"); // Close the connection mysql_close($dbhandle); } ?&gt; UPDATE: I have added the semicolon where needed in the php file but now get error 200, "SyntaxError: JSON Parse error: Unexpected EOF."
tagged with: mysql
upvote count: 2
has answer: http://stackoverflow.com/a/28083450
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/44544763
has title: How do I connect my ajax post to php and mysql?
score: 2
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44544962
tagged with: php

editor
tags question: http://stackoverflow.com/q/28119404
tag name: editor
tags question: http://stackoverflow.com/q/28032288
type: Tag

http://stackoverflow.com/a/28121060
answers question: http://stackoverflow.com/q/28110631
has comment: http://stackoverflow.com/comment/44628216
has comment: http://stackoverflow.com/comment/44679172
type: Answer
score: 0
has body: If you are using the Closure Library support you can include a definition of CLOSURE_DEFINES along with the reset of the source that you send to the compiler. To see this in action, you can do the following: http://closure-compiler.appspot.com/home // ==ClosureCompiler== // @compilation_level ADVANCED_OPTIMIZATIONS // @output_file_name default.js // @use_closure_library true // ==/ClosureCompiler== var CLOSURE_DEFINES = { 'FOO' : true } /** @define {boolean} */ var FOO = false; if (FOO) { alert('me'); } This results in: alert("me");

http://stackoverflow.com/comment/44471980
type: Comment
type: QuestionComment
has text: Updated with changes and new exception.
comment on: http://stackoverflow.com/q/28013769
score: 0

http://stackoverflow.com/comment/44458568
has text: @zairwolf i visited the link, please see the update
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28036870

http://stackoverflow.com/comment/44486497
score: 0
type: Comment
type: QuestionComment
has text: And http://stackoverflow.com/questions/19498725/control-iframe-content-with-javascript-html
comment on: http://stackoverflow.com/q/28052114

http://stackoverflow.com/comment/44519568
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28069111
has text: The transition on background-image definitely does not work, as expected, as it is NOT animateable. You can however fake it using before pseudo element apparently. Do some digging around on that. I'll also leave it up to you to implement a control mechanism to ensure that no two numbers are ever selected in succession. Here is a starting point: http://stackoverflow.com/questions/19451425/javascript-generating-random-numbers-in-a-range-excluding-certain-numbers

http://stackoverflow.com/comment/44412145
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28012280
has text: The image has stopped loading in canvas now.

http://stackoverflow.com/comment/44566742
comment on: http://stackoverflow.com/q/28095317
score: 0
has text: Seems to work here ... http://jsfiddle.net/rfornal/5s0w64dd/
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/80965418
type: Comment
comment on: http://stackoverflow.com/a/28008999
has text: This is not supported after v1.0
type: AnswerComment
score: 0

http://stackoverflow.com/q/28004585
has answer: http://stackoverflow.com/a/28004700
possible better answer: http://stackoverflow.com/a/37487480
downvote count: 1
type: Question
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/28004700
tagged with: html5-canvas
favorite count: 0
has body: A spritesheet image object that contains sprites... var spritesheet = new Image(); spritesheet.src ="foo.png"; I would like to be able to get a sub image from that spritesheet variable with the desired x, y, width, and height. And then assign a variable that is the sub image of the spritesheet. How do I do that?
has answer: http://stackoverflow.com/a/37487480
score: 2
type: AnsweredQuestion
has title: How to get images from a texture atlas with Javascript?
upvote count: 3

http://stackoverflow.com/comment/60095291
type: Comment
has text: thanks for the additional function. I will implement this into my app
comment on: http://stackoverflow.com/a/36177551
score: 0
type: AnswerComment

http://stackoverflow.com/a/28043688
score: 1
answers question: http://stackoverflow.com/q/28043620
has body: maybe you forgot about 'css/' folder in href? &lt;link rel="stylesheet" type="text/css" href="css/movimentacao-ie.css" /&gt;
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/44586374
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28093767
has text: Cool. But do you ever clear the value in the data service? Let's say the user clicks "Add customer", fills out half of it and then decides not to continue and clicks somewhere else. If he then comes back to the same form, without using history navigation, how do you prevent that the old values are filled in?
score: 0

http://stackoverflow.com/a/28093092
score: 10
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28091317
has comment: http://stackoverflow.com/comment/44562820
type: Answer
accepted answer of: http://stackoverflow.com/q/28091317
upvote count: 10
has body: The element that should be passed is the &lt;span&gt; which simulates the radio look and feel, this span has .ui-radiobutton-box as CSS class, the simple call would be: PF('selectOneRadioWV').select($('.ui-radiobutton-box').first()) This would select the first radio. However the select function would select only, which is not the expected behaviour, the expected one would be unselect the previous selected radio and select the new one. Being that said, if you would like to select based on value (which makes more sense) the following approach would work: PF('selectOneRadioWV').jq.find('input:radio[value="1"]').parent().next().trigger('click.selectOneRadio'); In there it's selecting the radio input which has the value 1 then navigating to the corresponding .ui-radiobutton-box where it triggers the event defined by the widget. In that way you make sure any ajax related events are called accordingly.
has comment: http://stackoverflow.com/comment/44562849

http://stackoverflow.com/comment/44616141
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28119815
has text: The transition method and the selectAll method both append attributes for width and height in relation to the xScale and yScale gathered from d, the data. However, because the values returned for them are currently NaN, I have a feeling that they are taking strings, perhaps the names or unable to get the temperature data in particular.

http://stackoverflow.com/comment/44523336
score: 0
type: Comment
has text: Problem is that user starts at `index.php` where they enter some search parameters into a form. These are then POSTed to `wos.php` and further data is retrieved via a Web API. This data is then processed and the final processed data ($recordArray) is passed to `data.php` to display in a bar graph with jQuery. So if I go straight to `data.php` I'm not posting any of the necessary search parameters into the form on `index.php`. I'll put code for `index.php` above...
comment on: http://stackoverflow.com/a/28066850
type: AnswerComment

http://stackoverflow.com/q/28002094
has answer: http://stackoverflow.com/a/28109333
has comment: http://stackoverflow.com/comment/44393238
has answer: http://stackoverflow.com/a/28002220
linked to: http://stackoverflow.com/q/10046010
has comment: http://stackoverflow.com/comment/44393229
has title: jQuery - Alert Based on JSON Response Data
has body: I need to display an alert based on occurrence of string in a JSON response. Here is my code: $.ajax({ method: 'POST', url: dataString2, data: dataString, headers: { "Authorization": "Basic " + btoa('' + Username + '' + ":" + '' + Password + '') }, success: function(jqXHR) { if (jqXHR.responseJSON('ok')) { alert('First Real Server Configured'); } }, statusCode: { 406 : function() { alert('There is an unexpected string in your data.\nFix the error and try again.'); }, 401 : function() { alert('Wrong username or password.'); } }, }); }); Here is the JSON response: { "status":"ok" } HTTP response code is "200 OK", and the server is responding with Content-Type:application/json When using the above code, I get: Uncaught TypeError: undefined is not a function Any idea?
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/44393326
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44393291
has comment: http://stackoverflow.com/comment/44393287

http://stackoverflow.com/a/27986709
score: 14
has body: Try this: Phone : Valid phone number is required phone number should be 10 digits
type: Answer
has comment: http://stackoverflow.com/comment/72826832
downvote count: 2
upvote count: 16
has comment: http://stackoverflow.com/comment/68604172
accepted answer of: http://stackoverflow.com/q/27986173
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/78430082
answers question: http://stackoverflow.com/q/27986173

http://stackoverflow.com/comment/44438799
score: 0
type: QuestionComment
type: Comment
has text: Does the URL of the page in question contain usercontrols, i.e. `domain/usercontrols/page.aspx`? Relative links will remain within the current "folder" on the webserver. Either change your links to being absolute, or user `href="../test"`
comment on: http://stackoverflow.com/q/28026716

http://stackoverflow.com/comment/44488154
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28050965
has text: That is the part I already have up and running. What I am needing is the object to do the JQuery on. (Note that this tabs are being loaded form the ajax function of the tabs,)
score: 0

http://stackoverflow.com/comment/44595799
has text: possible duplicate of [What's the easiest way to call a function every 5 seconds in jQuery?](http://stackoverflow.com/questions/2170923/whats-the-easiest-way-to-call-a-function-every-5-seconds-in-jquery)
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28110966

http://stackoverflow.com/comment/44577528
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28100228
score: 0
has text: You are expected to put some effort into the task before you ask a question here. Otherwise you will be downvoted and closed.

http://stackoverflow.com/comment/44590103
type: AnswerComment
comment on: http://stackoverflow.com/a/28107540
type: Comment
has text: see: in view i have ` Register ` and if i write: `scope.registerUser = function() { ... }` it will run directive's method, not controllers
score: 0

ratchet
type: Tag
tag name: ratchet
tags question: http://stackoverflow.com/q/27974312
tags question: http://stackoverflow.com/q/28093005

http://stackoverflow.com/q/28071138
tagged with: youtube
type: AnsweredQuestion
tagged with: nivo-slider
upvote count: 1
tagged with: https
type: Question
accepted answer: http://stackoverflow.com/a/29030602
tagged with: javascript
tagged with: jquery
has body: I have a website which is accessed via https (and all resources are loaded via https too), where I have a Nivo Lightbox which should show a Youtube video (as an overlay over the website). The JavaScript libraries I use (jquery and nivo-lightbox) are both stored on our server and referenced directly. Unfortunately, I get a Mixed Content error in the browser. It says that the YouTube-video (referenced with https) is from an insecured resource (so not https) and is therefore has been blocked. I tried various things to overcome this problem, e.g. by removing "https:" and just having "//youtube.com/..."; but couldn't solve the problem or other people who still couldn't solve the issue... Does anyone have a similar problem and/or a solution? Any help would be very much appreciated.
answer count: 2
possible better answer: http://stackoverflow.com/a/47935608
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/47935608
has title: Mixed Content error when using Nivo Lightbox over https
favorite count: 0
linked to: http://stackoverflow.com/q/20605423
has answer: http://stackoverflow.com/a/29030602

http://stackoverflow.com/q/28031706
tagged with: angularjs-ng-repeat
favorite count: 0
has answer: http://stackoverflow.com/a/28031991
accepted answer: http://stackoverflow.com/a/28031991
tagged with: angularjs
has body: I have some data that consists of various brands, and each brand has a nested array (of strings) containing range names: [ { "brandName" : "Brand 1", "ranges" : [ "Range A1", "Range A2", "Range A3" ] }, { "brand" : "Brand 2", "ranges" : [ "Range B1", "Range B2", "Range B3" ] }, ] What I am trying to do is display a select element with a list of options containing range names as their values and innerHTML, based on the previously selected brand in a separate select element. I'm not sure how to go about targeting the selected brand object in order to gain access to the nested array, as I'm trying to do it 'the Angular way'. Currently, I've been trying with ngRepeat, but can't get it to work. In the controller: $scope.formData = { brandData : [ { "brandName" : "Brand 1", "ranges" : [ "Range A1", "Range A2", "Range A3" ] }, { "brandName" : "Brand 2", "ranges" : [ "Range B1", "Range B2", "Range B3" ] }, ], currentBrand : undefined, currentRange : undefined }; And the simplified markup: Select a brand None {{brand.brandName}} Select a range None {{rangeName}} There are some similar questions floating around, but I couldn't find any specific to the data structure that I have. Thanks in advance! UPDATE Thanks to Rohan, I have now achieved my original goal. However, I also wanted the value of each option element to get set to the same value as its innerHTML. To do this I used the track by... feature of ngOptions: Select a brand Select a range For a working example, I have forked and updated Rohan's jsfiddle: http://jsfiddle.net/munkychop/hgzdannz/1/
upvote count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28032015
downvote count: 0
possible better answer: http://stackoverflow.com/a/28032015
type: Question
tagged with: javascript
score: 4
has title: Display HTML options based on separately selected options with Angular
answer count: 3
has answer: http://stackoverflow.com/a/28031965

http://stackoverflow.com/q/27980706
has answer: http://stackoverflow.com/a/27982044
has comment: http://stackoverflow.com/comment/44381808
linked to: http://stackoverflow.com/q/18541297
type: Question
has comment: http://stackoverflow.com/comment/44385190
has comment: http://stackoverflow.com/comment/44354097
tagged with: monads
has comment: http://stackoverflow.com/comment/44354924
score: 18
has comment: http://stackoverflow.com/comment/44354026
tagged with: javascript
upvote count: 19
has comment: http://stackoverflow.com/comment/44382275
has title: JavaScript function composition by chaining
has answer: http://stackoverflow.com/a/27982062
has comment: http://stackoverflow.com/comment/44385140
downvote count: 1
favorite count: 0
tagged with: io-monad
has body: I have checked the possibility of duplicate question, and cannot find the exact solution. I wrote some function chain code in JavaScript as below, and works fine. var log = function(args) { console.log(args) return function(f) { return f; }; }; (log('1'))(log('2'))(log('3'))(log('4')); //1 //2 //3 //4 I want to make this lazy evaluation. Or to compose function. var log = function(args) { var f0 = function() { return console.log(args); }; return function(f1) { return function() { f0(); return f1; }; }; }; var world = (log('1'))(log('2'))(log('3'))(log('4')); console.log(world); //should be just a function, // but in fact //1 //[function] world(); //should be //1 //2 //3 //4 // but in fact // 2 Something is very wrong. Can you fix it? Thanks. This question is resolved, but there is further async issue as shown in comment discussion When we have // unit :: a -> IO a var unit = function(x) { return function() { return x; }; }; // bind :: IO a -> (a -> IO b) -> IO b var bind = function(x, y) { return function() { return y(x())(); }; }; // seq :: IO a -> IO b -> IO b var seq = function(x, y) { return function() { return x(), y(); }; }; var action = function(x) { return function(y) { return y ? action(seq(x, y)) : x(); }; }; var wrap = function(f) { return function(x) { return action(function() { return f(x); }); }; }; var log = wrap(console.log); // -- runtime -- // HACK: when `world` is modified by passing a function, // the function will be executed. Object.defineProperties(window, { world: { set: function(w) { return w(); } } }); We also often want async chain reactions badly. var asyncF = function(callback) { setTimeout(function() { for (var i = 0; i < 1000000000; i++) { }; callback("async process Done!"); }, 0); }; var async = wrap(asyncF(function(msg) { world = log(msg); return msg; })); Now, world = (log(1))(async)(log(3)); //1 //3 //async process Done! So far nice and smooth, now we try to use bind world = (log(1)) (bind((async), (log(x)))); //should be //1 //asyn…
linked to: http://stackoverflow.com/q/21439115
has answer: http://stackoverflow.com/a/27982378
accepted answer: http://stackoverflow.com/a/27982378
answer count: 4
tagged with: node.js
has comment: http://stackoverflow.com/comment/44381901
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44354839
possible better answer: http://stackoverflow.com/a/27982062
has answer: http://stackoverflow.com/a/27982437

http://stackoverflow.com/comment/44417938
type: Comment
score: 1
comment on: http://stackoverflow.com/a/28015334
type: AnswerComment
has text: The question is asking how to display "Color" after the user has picked a different option. It isn't asking how to set a default option.

http://stackoverflow.com/comment/44515481
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28067153
has text: add this line to your plotdata(). " ctx.fillText(myColor[i],x,y); " where x and y are positions where you want to put text
score: 0

http://stackoverflow.com/a/28021774
has body: You need a .hover() for your .homepage-modules div, and a simple boolean to handle the hover-state: var noScrolling = false; $('.homepage-modules').hover( function() { noScrolling = true; }, function() { noScrolling = false; $('.homepage-modules div').cycle(2000, 'active'); } ); And then, within your next() function: function next() { if (noScrolling) { console.log('I shouldn\'t be scrolling through.'); return; } // Otherwise, continue Note that because I've thrown a return into your next() function, it actually returns out of the whole $fn.cycle parent function, hence why it's reinitialized when hovering out of the div. I've updated your Fiddle here: http://jsfiddle.net/bd53ewoh/10/
has comment: http://stackoverflow.com/comment/44430312
downvote count: 0
has comment: http://stackoverflow.com/comment/44430412
type: Answer
answers question: http://stackoverflow.com/q/28021474
has comment: http://stackoverflow.com/comment/44429732
has comment: http://stackoverflow.com/comment/44430760
upvote count: 1
score: 1

http://stackoverflow.com/a/28082228
has comment: http://stackoverflow.com/comment/44542917
answers question: http://stackoverflow.com/q/28082190
type: Answer
has body: you are sharing the same ID to multiple inputs which makes a problem! I think you better use a class instead or remove it. <input type="text" class="total_id" value="<?php echo $db_id ?>"> <?php echo $db_date ?> <?php echo number_format($db_balance,2) ?> <?php echo $db_account ?> Update $(".btn-update").click(function(){ var total_id = $(this).closest('tr').find('.total_id').val(); alert(total_id); });
score: 0

http://stackoverflow.com/q/28028617
tagged with: three.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44444480
upvote count: 1
has answer: http://stackoverflow.com/a/28091096
type: Question
has body: Using three.js and tween.js I'm trying to create a rubick's cube. It is composed of 27 small cubes who are grouped together to be rotated by +Math.PI/2 or -Math.PI/2. The tween library is used to get a smooth rotation. My issue is that if a face is rotated multiple times (more than 10) it gets noticeably misalligned and I can't understand how to fix it (link to visual image of the problem). This is the function that rotates the objects in the example below: function rotate( ii ) { // Creates a dummy object to group multiple objects together and // rotate (only one object in this example). var rotationGroup = new THREE.Object3D(); scene.add(rotationGroup); THREE.SceneUtils.attach( box[ ii ], scene, rotationGroup ); rotationGroup.updateMatrixWorld(); // Checks that no other animations are active. If so stops the // function (this is rude, but it's not the focus of the example). if( TWEEN.getAll().length&gt;0 ) return; // Creates the tween object for animation. var tween; var duration = 300; var radiants = Math.PI/2; tween = new TWEEN.Tween( rotationGroup.rotation ).to( { z: radiants }, duration ); tween.easing( TWEEN.Easing.Quadratic.InOut ); tween.onComplete( function() { THREE.SceneUtils.detach( box[ ii ], rotationGroup, scene ); box[ii].updateMatrixWorld(); scene.remove(rotationGroup); } ); // Starts the animation. tween.start(); } I can't figure out how to create a running snippet on stackoverflow so for now I'll paste some code replicating the problem (not the rubick's one which is longer and way messier). var camera, scene, renderer; var canvas; var cameraControls; var clock = new THREE.Clock(); var box = []; function main() { init(); fillScene(); addToDOM(); animate(); function init() { var canvasWidth = window.innerWidth; var canvasHeight = window.innerHeight; var canvasRatio = canvasWidth / canvasHeight; // RENDERER renderer = new THREE.WebGLRenderer( { antialias: true } ); renderer.gammaInput = true; renderer.gammaOutput = true; renderer.setSize(canvasWidth,…
score: 1
tagged with: tween
tagged with: rotation
accepted answer: http://stackoverflow.com/a/28091096
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Misalligned smooth rotation with tween.js and three.js
has comment: http://stackoverflow.com/comment/44448415
has comment: http://stackoverflow.com/comment/44445377

http://stackoverflow.com/a/28107249
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/44589366
answers question: http://stackoverflow.com/q/28107177
has comment: http://stackoverflow.com/comment/44589202
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28107177
type: Answer
has comment: http://stackoverflow.com/comment/44589216
has comment: http://stackoverflow.com/comment/44589055
has comment: http://stackoverflow.com/comment/44589344
downvote count: 0
has body: $(x).data("options",{obj}) is a perfectly good way to do it, provided you fix the syntax error. Just pass obj directly, and jQuery will save it as an object. It will not, however, be added as an attribute. $(x).data("options",obj) If you look at the documentation for .data() it specifies that your value doesn't have to be a string: value Type: Anything The new data value; this can be any Javascript type except undefined.

http://stackoverflow.com/q/28071538
tagged with: javascript
has body: I need to display local time in city New Your for everyone user, who visit my web site. How I can do it?
answer count: 1
has answer: http://stackoverflow.com/a/28071594
favorite count: 0
accepted answer: http://stackoverflow.com/a/28071594
tagged with: php
score: 2
type: AnsweredQuestion
downvote count: 3
linked to: http://stackoverflow.com/q/4456395
type: Question
has comment: http://stackoverflow.com/comment/44522353
duplicate of: http://stackoverflow.com/q/4456395
upvote count: 5
has title: How show local time in New York in PHP?

http://stackoverflow.com/comment/44428550
has text: No worries pal. Please accept or up-vote up my answer if it assisted you in any way.
comment on: http://stackoverflow.com/a/28018781
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27971902
has body: Instead of &lt;template style='display:none' id='myTemplate'&gt; I used &lt;script type='x-tmpl-mustache' id='myTemplate'&gt;. The template tag isn't supported in IE http://caniuse.com/#search=template. Thanks for the heads up @Jonathan Sampson, I voted too.
answers question: http://stackoverflow.com/q/27970260
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/27970260
type: Answer

http://stackoverflow.com/comment/44445196
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/28025922
has text: I would **seriously** recommend using templateURL rather than template with your directive.

http://stackoverflow.com/a/28047722
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44480354
answers question: http://stackoverflow.com/q/28047665
has comment: http://stackoverflow.com/comment/44478591
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/44509606
has comment: http://stackoverflow.com/comment/44479166
has body: In jQuery: var height = Math.ceil($('#thediv').height() / 60) * 60; $('#thediv').css('height', height); EDIT: For responsiveness, you need to reset the height before it does its calculation, ie: $(window).resize(function() { $('#thediv').css('height', 'auto'); setTimeout(function() { var height = Math.ceil($('#thediv').height() / 60) * 60; $('#thediv').css('height', height); },1); });
has comment: http://stackoverflow.com/comment/44509527
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28047665

http://stackoverflow.com/comment/44476141
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28046836
has text: @h2ooooooo Actually, you'd need `sup = sup.replace(/[^\d]/g, '');` to do that.

http://stackoverflow.com/comment/44614713
type: Comment
type: QuestionComment
has text: and just to check you have pushed to git and heroku since running the command?
comment on: http://stackoverflow.com/q/28115916
score: 0

http://stackoverflow.com/comment/44359424
has text: You did not say anything about it not being on a web server. Then change the div to iFrame. I do not see any reason whatsoever not to. Add target="iframeName" to the links and you are set
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27983829

http://stackoverflow.com/comment/44537356
score: 2
has text: meaning parse the json string to a javascript object before you actually need the object. Big string like that likely takes a bit of time to parse
comment on: http://stackoverflow.com/q/28078959
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27997618
type: Answer
has comment: http://stackoverflow.com/comment/44385844
answers question: http://stackoverflow.com/q/27995661
has comment: http://stackoverflow.com/comment/44385814
has comment: http://stackoverflow.com/comment/44385856
has body: It seems possible that the links in the following code should be link; links.source = nodes[links.source] || (nodes[links.source] = {name: links.source}); links.target = nodes[links.target] || (nodes[links.target] = {name: links.target}) links.value = + links.value; Check that out first and see how it goes. It looks like you're doing some good problem solving keep it up.
score: 0
has comment: http://stackoverflow.com/comment/44393680

http://stackoverflow.com/comment/44574408
score: 0
type: Comment
type: QuestionComment
has text: this is a good question, it is just phrased badly.
comment on: http://stackoverflow.com/q/28097001

http://stackoverflow.com/q/28075477
answer count: 2
has title: Simpler Javascript for multiple HTML content
has comment: http://stackoverflow.com/comment/44530554
accepted answer: http://stackoverflow.com/a/28076249
has comment: http://stackoverflow.com/comment/44530790
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28075875
has comment: http://stackoverflow.com/comment/44530940
has comment: http://stackoverflow.com/comment/44530670
score: 0
has comment: http://stackoverflow.com/comment/44530815
has comment: http://stackoverflow.com/comment/44530619
possible better answer: http://stackoverflow.com/a/28075875
tagged with: http://stackoverflow.com/tag/html
has body: I must start with I am quite a javascript novice. Currently I am making a website where a whole bunch of items are listed. Each item has a default image and 3 images of different angles of the product. I am using JQuery to show a full sized image over the default when the user hovers over the thumbnail. My question, I have about 90 items. Is there an easier way to do this only in javascript, without having to nest 90 items. It must be only HTML / CSS / Javascript Currently for 3 items it would like this : $(document).ready(function(){ // First thumbnail on each item $("#thumb1-1,#thumb2-1,#thumb3-1").hover(function(){ $("#image1-1,#image2-1,#image3-1").show();$("#default1,#default2,#default3").hide(); },function(){ $("#image1-1,#image2-1,#image3-1").hide();$("#default1,#default2,#default3").show(); }); // Second thumbnail on each item $("#thumb1-2,#thumb2-2,#thumb3-2").hover(function(){ $("#image1-2,#image2-2,#image3-2").show();$("#default1,#default2,#default3").hide(); },function(){ $("#image1-2,#image2-2,#image3-2").hide();$("#default1,#default2,#default3").show(); }); // Third thumbnail on each item $("#thumb1-3,#thumb2-3,#thumb3-3").hover(function(){ $("#image1-3,#image2-3,#image3-3").show();$("#default1,#default2,#default3").hide(); },function(){ $("#image1-3,#image2-3,#image3-3").hide();$("#default1,#default2,#default3").show(); }); }); Rough visual Most likely will load images at the end of the page to reduce lag, also pages will be split up to about 10 on a page
has answer: http://stackoverflow.com/a/28076249
has comment: http://stackoverflow.com/comment/44530961
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44531884
has comment: http://stackoverflow.com/comment/44531846
has comment: http://stackoverflow.com/comment/44530864
type: Question

http://stackoverflow.com/comment/44518812
type: QuestionComment
comment on: http://stackoverflow.com/q/28069426
has text: sorry I misread your questions. but can you tell what change in the output css? from the 1st and 2nd refresh.
score: 0
type: Comment

http://stackoverflow.com/q/28115653
has body: I've created an iframe using javascript: fr=document.createElement('iframe'); fr.src="www.example.com"; fr.onload=doSomething(); document.body.appendChild(fr); problem is the onload part seems to be running before the iframe loads - I get an error in the console (using chrome) about something undefined in the function (and it would be defined once the iframe loads), and when I check, it turns out the iframe was never even appended.
has title: Javascript - `onload` function called before loading?
answer count: 1
has comment: http://stackoverflow.com/comment/44605548
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/10101899
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44605450
has answer: http://stackoverflow.com/a/28115676
tagged with: iframe
duplicate of: http://stackoverflow.com/q/10101899
type: Question
accepted answer: http://stackoverflow.com/a/28115676
tagged with: javascript
score: 0

http://stackoverflow.com/comment/44495823
score: 0
type: Comment
has text: see jason goemaat's answer
type: AnswerComment
comment on: http://stackoverflow.com/a/28054563

http://stackoverflow.com/a/27992629
score: 0
answers question: http://stackoverflow.com/q/27992550
type: Answer
has body: You are trying to modify a class not id of SubmitBtn. Change $('.submitBtn') to $('#submitBtn')

http://stackoverflow.com/a/28090859
answers question: http://stackoverflow.com/q/28090815
type: Answer
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28090815
has body: should only use unique ID's so if you change the #buttonDigital to a class based selector .buttonDigital then remove or change the id so each div is unique and add the class to them should work. hope it helps $(function() { $(".buttonDigital").click(function() { $(".DigitalImg").toggleClass("DigitalImg-change"); }); }); then the html would look like (you would want to use -1,-2,-4 so that each button is unique. you could also remove the id unless you need it elsewhere DIGITAL

http://stackoverflow.com/q/27982534
has title: 2 divs should open 2 different divs
type: Question
possible better answer: http://stackoverflow.com/a/27982830
tagged with: javascript
upvote count: 2
answer count: 3
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44356332
accepted answer: http://stackoverflow.com/a/27985067
has body: sorry for the title, I don't know how I should have said it better (my brain is currently melting because of this problem I can't solve). Here's a description of my problem: At first I have one div with a list of names in it: Hans Mustername Hans Mustername Hans Mustername When I click on a name in this div, a second div box (#objekt2) pops up, with more information about the person I clicked on. In this div box there may be a link to even more details, if you click this #objekt3 (new div box) should pop up. If I already clicked on the link in #objekt1 and click it again, there shouldn't be any more div added, same goes for #objekt2. Now I've tried it using jQuery, sadly it doesn't work the way it should. If I click the link in #Objekt1 2 times, 2 divs will be added. If I click the link in #Objekt2 no div is added. Here's my jQuery code for this: function checkDiv(){ var anzahlDiv = $("div").length; if (anzahlDiv == 1){ $(' testlink #1 ').insertAfter("#objekt1"); }else if (anzahlDiv == 2){ $(' testlink #2 ' ).insertAfter("#objekt2"); }else{ return; } exit; } $('#objekt1 ul li a, #objekt2 a').click(function () { checkDiv(); }); Is there anyone here who could help me out on this one please? :(
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27983054
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27985067
has answer: http://stackoverflow.com/a/27982830

http://stackoverflow.com/a/28060004
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/28059977
downvote count: 0
has body: $(function() { $( "#datepicker" ).datepicker(); $( "#format" ).change(function() { $( "#datepicker" ).datepicker( "option", "dateFormat", $( this ).val() ); }); }); datepicker is your date control refer this url http://jqueryui.com/datepicker/#date-formats

http://stackoverflow.com/comment/44672046
score: 0
type: QuestionComment
has text: @MrUpsidown: I have a table with multiple addresses and I wand the user to be able to specify them. Thus, each entry has an input field for the user to type an address.
comment on: http://stackoverflow.com/q/28114925
type: Comment

http://stackoverflow.com/comment/44418928
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27987134
has text: I don't think its got anything to do which _recognizing the new DOM_. `'$' is undefined` means the jquery is not loaded. Do you have the file defined more that one (e.g in a partial view as well as the layout which can cause problems)?

http://stackoverflow.com/q/27991309
tagged with: jquery
has answer: http://stackoverflow.com/a/27991904
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/27991904
has body: I am attempting to create a Highcharts Semi-circle donut chart in my angular application. I have installed the Highcharts-ng directive. For whatever reason, it appears to be skipping the plotOptions section completely and that is where the start and end angle are set, thereby creating the donut. What I get is a full circle pie chart. Here is my code: &lt;div ng-app="myapp"&gt; &lt;div ng-controller="myctrl"&gt; &lt;highchart id="chart1" config="highchartsNG"&gt;&lt;/highchart&gt; &lt;/div&gt; &lt;/div&gt; //See: https://github.com/pablojim/highcharts-ng var myapp = angular.module('myapp', ["highcharts-ng"]); myapp.controller('myctrl', function ($scope) { $scope.options = { type: 'pie', colors: ['#971a31', '#ffffff'] } $scope.swapChartType = function () { if (this.highchartsNG.options.chart.type === 'line') { this.highchartsNG.options.chart.type = 'bar' } else { this.highchartsNG.options.chart.type = 'line' } } $scope.highchartsNG = { options: { colors: ['#971a31', '#ffffff'], chart: { type: 'pie', backgroundColor: '#f1f1f2', height: 150 } }, series: [{ data: [10, 15, 12, 8, 7] }], chart: { plotBackgroundColor: null, plotBorderWidth: 0, plotShadow: false }, title: { text: 'Hello', style: { color: '#971a31', fontWEight: 'bold', fontSize: '15px' }, verticvalAlign: 'middle', y: 20, x: -24 }, tooltip: { pointFormat: '{series.name}: &lt;b&gt;{point.percentage:.1f}%&lt;/b&gt;' }, plotOptions: { pie: { borderColor: '#000000', size: 115, dataLabels: { enabled: false, distance: -50, style: { fontWeight: 'bold', color: 'white', textShadow: '0px 1px 2px black', } }, startAngle: -90, endAngle: 90, center: ['30%', '75%'] } }, series: [{ type: 'pie', name: 'Loan', innerSize: '50%', data: [ ['85% paid', 85], ['15% owed', 15] ] }], loading: false } }); I have created a JSFiddle here: http://jsfiddle.net/mikemahony/hzdewsx8/ What am I missing?
type: Question
tagged with: javascript
has title: How to make a Highcharts semi-circle donut chart using Hightchart-ng
answer count: 1
tagged with: highcharts
downvote count: 0

http://stackoverflow.com/q/28021215
upvote count: 1
has answer: http://stackoverflow.com/a/28021245
has body: I am trying to create a edit form which is already filled with exciting data as default as follows: &lt;form&gt; &lt;div ng-repeat="x in names"&gt; &lt;input type="text" ng-model="x.name"&gt; &lt;input type="submit" ng-click="editFeed(x)" value="Edit"&gt; &lt;/div&gt; &lt;/form&gt; and the controller $scope.names = [ { name: 'jack', }, { name: 'tom' }, { name: 'jackson' } ] $scope.x= {}; $scope.editFeed = function(x){ alert($scope.x.name); }; That gives me undefined because 'x' is ng-repeat variable. If we replace 'x' with another value; exp: 't'. I would get the input form data however that is not the issue.. So, how can I get input form data if input ng-model value is ng-repeat value..? any tips? Thanks in advance!
type: AnsweredQuestion
answer count: 1
accepted answer: http://stackoverflow.com/a/28021245
downvote count: 0
tagged with: javascript
score: 1
type: Question
tagged with: angularjs-ng-repeat
favorite count: 0
has title: How to get from input data while input ng-model is ngRepeat variable?
tagged with: angularjs

http://stackoverflow.com/comment/51880471
has text: possible duplicate of [Setting HTML5 audio position](http://stackoverflow.com/questions/9563887/setting-html5-audio-position)
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27964533
type: QuestionComment

trim
tags question: http://stackoverflow.com/q/28109895
type: Tag
tag name: trim

http://stackoverflow.com/comment/44543653
score: 0
type: QuestionComment
has text: Thanks, the stop time displays fine as a bracket **]** in the progress bar, but it doesn't seem to really stop there yet. --- In Chrome and Safari I can, but in Firefox, I can't play the video. --- I guess what's also unavoidable, is that when you mouse-click/scroll through the video at the progress bar, then the `&end` would stop being "active"? But I guess there's no easy work-around. --- Thanks for the help, however I was actually referring to *different* `&end`'s, specific for every `...href...data-time=...`. Do you think that's possible, instead of only 1 `&end` for the *whole* file?
type: Comment
comment on: http://stackoverflow.com/q/28013991

http://stackoverflow.com/a/28201539
score: -1
answers question: http://stackoverflow.com/q/28101121
downvote count: 1
type: Answer
has body: Checkout the FoundationPress-child theme, it uses grunt and a handful of other nice tools and libraries. I'm using it as a base for a WP site I made for a client of mine. It's a good starting point, along with VCCW. https://github.com/thetrickster/FoundationPress-child https://github.com/vccw-team/vccw
upvote count: 0

http://stackoverflow.com/comment/44427358
score: 0
type: Comment
type: AnswerComment
has text: Yah I might wind up doing that, was hoping there was a simpler solution
comment on: http://stackoverflow.com/a/28020236

http://stackoverflow.com/comment/44569246
type: QuestionComment
comment on: http://stackoverflow.com/q/28074531
has text: Benjamin, The result object is a json response from the asynchronous service and contains a string "false" if there are more pages. When I run $scope.$apply() in the controller outside of the .then callback, it is not a noop().The noop happens only inside the callback on the promise.
score: 0
type: Comment

http://stackoverflow.com/a/28038011
score: 0
has body: I'm trying to complete a simple model which I'm not sure if it's what you want.I've used recursive functions to do some loop work. $("#move").click(function() { fadeFunc(); }); function fadeFunc() { $(".current").fadeOut("normal", function() { $(this).removeClass("current"); if ($(this).next()) { $(this).next().addClass("current"); $(this).next().fadeIn().delay(2000).fadeOut("normal", fadeFunc); } }); } #container { width: 400px; height: 200px; border: 1px solid black; overflow: hidden; } .img_group { width: 380px; height: 180px; margin: 10px; display: inline-block; background-color: #aaa; } .img { background-color: #ccc; width: 100px; height: 160px; margin: 10px; display: inline-block; } Group 1 Group 1 Group 1 Group 2 Group 2 Group 2 Group 3 Group 3 Group 3 Move I've wrapped mutilple images into one single .
type: Answer
answers question: http://stackoverflow.com/q/28037586

http://stackoverflow.com/q/28100874
favorite count: 0
has comment: http://stackoverflow.com/comment/44577395
tagged with: http://stackoverflow.com/tag/html
has body: Is there a reason why an HTML5 app that works fine in browser would work differently when compiled with Cordova for Android? Does cordova not support all the same things as the browser? Im mainly thinking of / referring to the way JavaScript works.
accepted answer: http://stackoverflow.com/a/28102315
type: AnsweredQuestion
tagged with: cordova
upvote count: 1
has answer: http://stackoverflow.com/a/28100944
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/28100944
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28102315
answer count: 2
has title: why does an html5 app work differently in the browser than it does in Cordova (Android)?

http://stackoverflow.com/comment/44335687
comment on: http://stackoverflow.com/a/27970827
score: 0
type: AnswerComment
type: Comment
has text: @Jayme Can't help much with your displayed code, we can only assume and try to help with the code in the question. See the demo in my answer, it should just work. Please replicate the issue with a demo link. How does the controller DI and argument look like in your original code.

http://stackoverflow.com/q/27998053
has body: In my web app I am using a web api, for that I am calling the angular js custom function when key up event happen, but the problem is when i press keys the previous get request not cancels , means all GET requests works at same time. the code I've written is as follows Angular Js var req = { method: 'GET', url: 'url of api', headers: { "Key": "keyofapi", "Accept": "application/json" }, } $http(req). success(function(data, status, headers, config) { }). error(function(data, status, headers, config) { }); HTML &lt;input type="text" class="form-control" ng-keyup="check();" ng-model="myModel" /&gt; console image:: Click Here
answer count: 0
tagged with: angularjs
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
has title: Stop simultaneous GET request in angular js
has comment: http://stackoverflow.com/comment/44543000
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44385834
has comment: http://stackoverflow.com/comment/44385882

http://stackoverflow.com/a/27966070
has body: You're forgetting the closing ) on each of these. the .on() functions work fine when the syntax is correct. example Existing elements - $(".antennaCursor").on("click", function() { console.log("Hi"); }); Event delegation - $(document).on('click', '.antennaCursor', function() { console.log('Hi'); }); Many use document as the place to catch the bubbled event, but it isn't necessary to go that high up the DOM tree. Ideally you should delegate to the nearest parent that exists at the time of page load.
has comment: http://stackoverflow.com/comment/44324952
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44330354
accepted answer of: http://stackoverflow.com/q/27965986
type: Answer
has comment: http://stackoverflow.com/comment/44332025
has comment: http://stackoverflow.com/comment/44330585
answers question: http://stackoverflow.com/q/27965986
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44330331
has comment: http://stackoverflow.com/comment/44325501
has comment: http://stackoverflow.com/comment/44324873
has comment: http://stackoverflow.com/comment/44330412
upvote count: 2
has comment: http://stackoverflow.com/comment/44331951
has comment: http://stackoverflow.com/comment/44330649

http://stackoverflow.com/a/28004051
has body: I would start by rewriting your controller. From AngularJS 1.3 onwards global controllers are disabled, refer: https://github.com/angular/angular.js/blob/g3_v1_3/CHANGELOG.md#breaking-changes-13 $controller: disable using global controller constructors (3f2232b5) Register a new angular module - with a name. angular.module('app', []) .controller('MainCtrl', function ($scope) { $scope.userGroup = { name: "Kirill Kuts" }; }); update ng-app directive Here is a working demo - http://jsbin.com/mufifukuvu/1/edit?html,js,output
has comment: http://stackoverflow.com/comment/44396942
answers question: http://stackoverflow.com/q/28004000
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/28004000

http://stackoverflow.com/a/27968567
has comment: http://stackoverflow.com/comment/44333182
has comment: http://stackoverflow.com/comment/44332281
score: 0
answers question: http://stackoverflow.com/q/27966775
type: Answer
has body: The second scenario seems to me the most viable one. First, your authorization server does not have to be the same as your resource server. You only use the refresh token to get a new access token from the authorization server. But the authorization server and resource server could both be implemented in the same server. How would the client in the first scenario get the new access token back? It was requesting a resource (step 3) and does not expect to get back a new token. I would store the refresh token at the client side in browser local storage or something. This is not highly secure, but probably the best you can do.
has comment: http://stackoverflow.com/comment/44332683

http://stackoverflow.com/a/28035258
answers question: http://stackoverflow.com/q/28032958
type: Answer
upvote count: 4
has body: The sample codes in the links you posted are all cubic interpolations either from 4 points or from 2 points and 2 derivatives. The 'mu' is the parameter at which you want to evaluate the y value. The input y0, y1,y2 and y3 are the y coordinates of the 4 input points. You can do the same to evaluate x value at parameter 'mu' by passing x0, x1, x2 and x3 to the function. You said you want to have a function that will take x value as parameter input and get back y value as output. This is only possible when you represent your curve in the explicit form, i.e., y=f(x). However, explicit form is not capable of representing curves with multiple y values with the same x value. So, they are not good ways of representing curves in general. Parametric form is a better way of representing a curve. For example, a 2D curve C(t) is represented as C(t) = (x(t), y(t)) or a 3D curve can be represented as C(t)=(x(t), y(t), z(t)). Representing a full circle as (x(t), y(t))=(rcos(t),rsin(t)) is a good example of parametric form. If you want to draw a smooth curve connecting a series of data points, the easiest way is to implement the Catmull Rom spline or Overhauser spline. Both of them are special form of cubic Hermite curve. Read the Wikipedia page about cubic Hermite curve here and go to the Catmull Rom spline section within the same page and you shall be able to know how to create a Catmull Rom spline interpolating the data points and how to evaluate it to get (x, y) value to draw the spline in your canvas.
type: AcceptedAnswer
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/28032958

http://stackoverflow.com/q/27967218
has title: My JavaScript split function not working
upvote count: 2
has comment: http://stackoverflow.com/comment/44327157
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44327122
has comment: http://stackoverflow.com/comment/44328295
score: 1
has body: I have the following code which through Google Maps API gets the latitude and longitude of the position clicked on the map var latitude_longitude = evt.latLng; When I alert the variable using the code below the following is displayed: (53.4128,-1.51165) alert(latitude_longitude);////Gets latitude and Longitude - Latitude first - Longitude second However I now need to split (53.4128,-1.51165) into 2 variables Latitude and Longitude and have tried using the code below: var myarr = latitude_longitude.split(","); var latitude = myarr[0]; alert(latitude); However the alert doesn't show and I am unsure why?
accepted answer: http://stackoverflow.com/a/27967411
type: Question
has answer: http://stackoverflow.com/a/27967509
tagged with: split
tagged with: google-maps
tagged with: javascript
has answer: http://stackoverflow.com/a/27967411
has answer: http://stackoverflow.com/a/30044822
answer count: 3
favorite count: 0
possible better answer: http://stackoverflow.com/a/27967509

http://stackoverflow.com/q/28034837
type: Question
has comment: http://stackoverflow.com/comment/44456159
tagged with: javascript
has title: Issue sending complete multipart/mixed request via node
upvote count: 2
has comment: http://stackoverflow.com/comment/44455101
favorite count: 0
has comment: http://stackoverflow.com/comment/44480304
has comment: http://stackoverflow.com/comment/44455500
type: UnansweredQuestion
has body: I need to POST a multipart/mixed request which does NOT use chunking. From what I've read this means I have to essentially roll the request off of http instead of using npm request. This post got me started, but I'm stuck. The first part of the request is a basic XML payload which describes a file. The second part is the file which is to be "published". When I call request.end() I see that the POST hits the server it's intended for. However, the response callback doesn't get hit for 15-20 seconds. When it does, I see the following: The client failed to send a complete request before the timeout period elapsed. Perhaps I am calculating the content-length incorrectly so the Server is waiting on me? //Calc size of string in XMLWriter object var xmlRequestSize = Buffer.byteLength(dsXml.toString()); //Calculate Content-Size for each of two parts of a multi-part request data = fs.readFileSync("Blood Testing.tde") var fileRequestSize = Buffer.byteLength(data.toString()); console.log(xmlRequestSize); console.log(fileRequestSize); //Multi-part boundary var boundary = 'zxyzzy123456boundary'; //Request options var postOptions= { hostname: tableauServer, port: 8888, // for proxy path: '/api/2.0/sites/' + siteID + '/datasources?overwrite=true', method: 'POST', headers: { 'X-Tableau-Auth': adminAuthToken, 'Content-Length': xmlRequestSize + fileRequestSize, 'Content-Type': 'multipart/mixed; boundary=' + boundary } } postCallback = function(response) { console.log("Hit callback"); var str = ''; //another chunk of data has been recieved, so append it to `str` response.on('data', function (chunk) { str += chunk; }); //the whole response has been recieved, so we just print it out here response.on('end', function () { console.log(str); }); } var req_post = http.request(postOptions, postCallback); //Part 1 metadata req_post.write("\r\n--" + boundary + "\r\nContent-Disposition: name='request_payload'\r\nContent-Type: 'text/xml'\r\n\r\n"); //Part 1 Body req_post.write(dsXml.toString()); /…
tagged with: node.js
score: 2
answer count: 0
downvote count: 0
linked to: http://stackoverflow.com/q/23144349

http://stackoverflow.com/a/28152438
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/28108005
answers question: http://stackoverflow.com/q/28108005
type: Answer
upvote count: 1
has body: Do I get something entirely wrong about how to organize and develop projects in javascript? No, you're on the money. It sounds like common_utils.js is in your control, correct? That is, it's your code? I'm going to assume it is for now. If you find that you're adding exceptions for every function, then you're not namespacing, which will make linting lots easier. Note that this is what d3js is doing, give or take. Here's an example of d3 usage with the d3 namespace from their website: D3 employs a declarative approach, operating on arbitrary sets of nodes called selections. For example, you can rewrite the above loop as: d3.selectAll("p").style("color", "white"); See that d3 object? You need to do the same thing. You should declare a single "parent" object in common_utils.js and attach every function to it. Then you only need to declare one global in your JSL/Hint settings to get all of common_util.js's functions. Here are two quick, non-OO examples. The first is probably the most straightforward. Note that you do need the (space) between the function keyword and its first parens. That is, var spam = function () is correct in JSLint and var spam = function() is not. JSLint thinks the second looks like a typical named function, not an assignment. Fair enough. /*jslint browser: true, devel: true, sloppy: true, white: true */ var commonUtils = {}; // create the "parent" object. // then add your functions to it, one by one. commonUtils.test1 = function (myString) { if (console.log) { console.log("myString is: " + myString); } }; commonUtils.test2 = function (myString) { window.alert("myString is: " + myString); }; ... or -- and this is a little more common, I think -- you can use JSON notation, which is easy enough to understand once you've got the above example down: /*jslint browser: true, devel: true, sloppy: true, white: true */ var commonUtils = { test1: function (myString) { if (console.log) { console.log("myString is: " + myString); } }, test2: function (myString)…
has comment: http://stackoverflow.com/comment/44678986
has comment: http://stackoverflow.com/comment/44680284
has comment: http://stackoverflow.com/comment/44682322

http://stackoverflow.com/a/48878145
score: 5
upvote count: 5
has body: You can also create gulp node server task runner like this: gulp.task('server', (cb) =&gt; { exec('node server.js', err =&gt; err); });
answers question: http://stackoverflow.com/q/28048029
downvote count: 0
type: Answer

http://stackoverflow.com/q/28001182
answer count: 1
tagged with: jquery
has body: I've tried searching for this across the web, but I found nothing specific. So, has anyone had an experience with Foundation 5 Top Bar? I don't see any options to make dropdown animated. It just appears. Is there some kind of a property for data-options. I know there are some properties like this: data-options="sticky_on: medium" Is there something like: data-optiins="submenu_animation: fade" Or something similar
has title: Animate Foundation 5 dropdown menu
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/32846874
tagged with: css
has comment: http://stackoverflow.com/comment/44456161
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/23149793
score: 0
tagged with: zurb-foundation

http://stackoverflow.com/a/28085507
has body: I don't know Pootle or Zanata. But I'll tell you a way to translate it automatically based on user-agent once you have the translation files on .json format. You can have a Lang service in angular like this: http://jsfiddle.net/e5nhttcf/ module.factory('Lang',['$q', '$http', function($q){ var lang = {}; lang.literals = {}; lang.current = navigator.language; lang.getLiterals = function(){ var deferred = $q.defer(); $http.get(location.origin + "/getlang/"+lang.current).success(function(data, status, headers, config){ if(data){ lang.literals = data; deferred.resolve(); } }); return deferred.promise; }; return lang; } }]); First, you call getLiterals when initialising the application. Then, you just need to inject the factory in the controller and assign the literals to a local variable. Then in html you have a reference to localized literals: &lt;div&gt; {{literals.greetings}} &lt;/div&gt; Note: I did not test the code, use only as a reference
answers question: http://stackoverflow.com/q/28083021
score: 0
has comment: http://stackoverflow.com/comment/44837600
type: Answer
has comment: http://stackoverflow.com/comment/44670804
has comment: http://stackoverflow.com/comment/44678536

http://stackoverflow.com/comment/44451453
has text: Maybe he wants to learn jQuery.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28029820
score: 0

http://stackoverflow.com/a/28083628
upvote count: 13
score: 13
has body: I'm assuming it is a search box of some kind. ngDisabled is really used for interactive elements and not list items. You can use ng-if or ng-hide to remove those items completely from the list: item item You can use ngClass to apply a specific class when disabled to make it appear disabled: item If you want an item to be visible but not click-able, you may have to do a hack like re-opening the search box if the item is disabled or sinking the event.
accepted answer of: http://stackoverflow.com/q/28083400
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28083400
type: Answer

http://stackoverflow.com/a/28089247
has comment: http://stackoverflow.com/comment/44559525
has comment: http://stackoverflow.com/comment/44557807
type: Answer
has comment: http://stackoverflow.com/comment/44558904
upvote count: 3
has body: You can override that by using overflow-x. I couldn't see accordion on the link you gave but generally you can apply it by: http://jsfiddle.net/882jof8L/ //CSS #your-accordion .panel-body { overflow-x: scroll; } //HTML &lt;div class="panel-body"&gt; &lt;table style="width: 1000px;"&gt;...&lt;/table&gt; &lt;/div&gt; Properties you can use with overflow-x: overflow-x: visible|hidden|scroll|auto|initial|inherit; In your case adding your style sheet after bootstrap might help: &lt;link rel="stylesheet" href="YOUR_PATH/bootstrap.min.css"&gt; &lt;link rel="stylesheet" href="YOUR_PATH/YOUR_STYLE_SHEET.css"&gt; Styles are applied in the order they are read by the browser. This means styles appears at the top of a style sheet will be changed by the last one. For example following style will result paragraph as black: p { color: red; } p { color: black; } Or you can force browser to show scroll by using: overflow-x: scroll !important; What does !important do: CSS rules that has the !important directive will always be applied no matter where that rule appears in the CSS document.
has comment: http://stackoverflow.com/comment/44558164
score: 3
has comment: http://stackoverflow.com/comment/44557571
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28088878
answers question: http://stackoverflow.com/q/28088878

http://stackoverflow.com/comment/44405362
has text: I posted solution in answer. hope it will be useful
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28008520

http://stackoverflow.com/comment/44598399
type: QuestionComment
has text: Maybe you could add a button which calls a function in your controller which logs or alerts the variable. As parameter you could give `attrs.formId` which then looks (in an Array or something - Ok, I see you have Objects, should work with `$scope.content[id]`, when `id` is your `attrs.formId` sent from the Button). Then you can check if the value really is correct
comment on: http://stackoverflow.com/q/28111841
score: 0
type: Comment

http://stackoverflow.com/comment/44560447
type: QuestionComment
comment on: http://stackoverflow.com/q/28089359
score: 0
has text: My point is, this code should NOT be in your app; Hangouts should request `GetUserMedia` itself, you only need to take care of that permission request. If this code is in your app, it may be conflicting with Hangouts.
type: Comment

http://stackoverflow.com/comment/44531608
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28075722
has text: ` ` tags and mouse listeners. Take a look at [this question](http://stackoverflow.com/q/55677)

http://stackoverflow.com/a/28106315
answers question: http://stackoverflow.com/q/28106256
has comment: http://stackoverflow.com/comment/44587777
upvote count: 2
has comment: http://stackoverflow.com/comment/44587282
has comment: http://stackoverflow.com/comment/44587193
score: 2
has comment: http://stackoverflow.com/comment/44587127
has body: Empty before looping, and start at zero $( "#cont_qty" ).change(function() { var cont_qty = this.value; $("#munna").empty(); for(var i=0 ; cont_qty&gt;i; i++) { itemCount++; var auto_tr = '&lt;tr id="tr'+itemCount+'"&gt;&lt;td&gt;&lt;input class="input-medium" type="text" id="cont_no'+itemCount+'" name="cont_no'+itemCount+'" value=""&gt;&lt;/td&gt;&lt;/tr&gt;'; $("#munna").append(auto_tr) } });
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/28106256

http://stackoverflow.com/comment/44388031
score: 0
has text: Have you tried using `position` and then `top`, `left`, `bottom` and/or `right` to position you canvases within a container?
comment on: http://stackoverflow.com/q/27999331
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44568840
type: QuestionComment
comment on: http://stackoverflow.com/q/28094887
score: 0
type: Comment
has text: Can you be more specific and define the rules that determine how one object takes precedence over another? For example, where does an object that has a value in the first and last property fit within the sorted output?

http://stackoverflow.com/comment/44395331
comment on: http://stackoverflow.com/a/27996545
has text: This answer is not completely correct, see my comment to the question. (I'd comment here, but you seem to be having a dialog with yourself.)
type: Comment
score: 3
type: AnswerComment

http://stackoverflow.com/comment/44429661
has text: No chance to help here without relevant code. Please make [a minimal example](http://stackoverflow.com/help/mcve). You may even solve this yourself while making it.
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28021488

http://stackoverflow.com/q/28084359
has answer: http://stackoverflow.com/a/28084681
has answer: http://stackoverflow.com/a/28084490
type: Question
answer count: 3
has comment: http://stackoverflow.com/comment/44546616
tagged with: javascript
has comment: http://stackoverflow.com/comment/44546817
score: 0
linked to: http://stackoverflow.com/q/28140151
has comment: http://stackoverflow.com/comment/44546936
possible better answer: http://stackoverflow.com/a/28084490
has answer: http://stackoverflow.com/a/28084397
accepted answer: http://stackoverflow.com/a/28084397
has title: ng-class condtionally and $location path Angular
tagged with: angularjs
has body: here is my site for example : example.com and the conditions are : i want to add class when user in these location : First condiotion: example.com/# wihch is user click on something without link like href="#" and Second :example.com/Cartable Here is my little code : $scope.isActive = function (route) { return route === $location.path(); } HTML ng-class="{cartable:isActive('/Cartable')}" it's working , but how can i add two url , something like this: ng-class="{cartable:isActive('/Cartable', '/#')}" thanks
type: AnsweredQuestion

http://stackoverflow.com/q/28022704
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28022798
has body: Consider the following two functions, // function var returnObject = function() { var values = []; return { sum: function(addend) { var toReturn = 0; if (addend) { values.push(addend); } values.forEach(function(el) { toReturn += el; }); return toReturn; } } }; // immediately executed function var returnImmediatelyExecutedFunction = (function() { var values = []; return { sum: function(addend) { var toReturn = 0; if (addend) { values.push(addend); } values.forEach(function(el) { toReturn += el; }); return toReturn; } } }()); I'm having an "eeeergh! brain!" moment at this point about this, but I don't understand why the returnObject returns a unique closure state every time it's used, but returnImmediatelyExecutedFunction returns the same state. Consider the output of the following: var summer1 = returnImmediatelyExecutedFunction; summer1.sum(2); summer1.sum(4); summer1.sum(8); console.log(summer1.sum()); var summer2 = returnImmediatelyExecutedFunction; summer2.sum(2); summer2.sum(4); summer2.sum(8); console.log(summer2.sum()); var summer3 = returnObject(); summer3.sum(2); summer3.sum(4); summer3.sum(8); console.log(summer3.sum()); var summer4 = returnObject(); summer4.sum(2); summer4.sum(4); summer4.sum(8); console.log(summer4.sum()); Output: 14 28 // why not 14? 14 14
has answer: http://stackoverflow.com/a/28022796
accepted answer: http://stackoverflow.com/a/28022798
type: Question
has title: Why does (function() { ... }()) create "singleton" state?
score: 0
answer count: 3
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28022794
has answer: http://stackoverflow.com/a/28022794

http://stackoverflow.com/q/28083596
type: Question
has answer: http://stackoverflow.com/a/28083729
accepted answer: http://stackoverflow.com/a/28083730
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/44545327
has comment: http://stackoverflow.com/comment/44545171
has comment: http://stackoverflow.com/comment/44545219
tagged with: javascript
has title: how to give focus for text box in jquery?
has body: i want to focus a text box when user enter a wrong value .but i don't know how to add focus() in my code. any suggestion &lt;input type="text" class="form-control" id="txtfirstname" alt="spnfirstname" name="txtfirstname"&gt; &lt;input type="text" class="form-control" id="txtmiddlename" name="txtmiddlename" alt="spnmiddlename"&gt; $('document').ready(function () { $('#txtfirstname,#txtmiddlename,#txtlastname,#txtmothertongue,#txtplaceofbirth') .bind('keyup', function () { var theValue = $(this).val(); var spanid = $(this).attr("alt"); if (theValue != '' &amp;&amp; theValue.match(/^[\a-zA-Z]+$/) == null) { theValue = theValue.replace(/[^a-zA-Z, ]/g, '') $("#" + spanid).text("alphabets only"); $('#txtfirstname').focus(); } else $("#" + spanid).text(" "); }); });
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28083730
tagged with: jquery
possible better answer: http://stackoverflow.com/a/28083729
has answer: http://stackoverflow.com/a/28084327

http://stackoverflow.com/q/27983740
has answer: http://stackoverflow.com/a/27983897
has comment: http://stackoverflow.com/comment/44358670
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44358891
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44358833
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/44358791
tagged with: laravel
has comment: http://stackoverflow.com/comment/44358684
score: 1
has title: PHP/Javascript: See if someone is visiting the same url
type: Question
has comment: http://stackoverflow.com/comment/44360124
answer count: 1
downvote count: 0
tagged with: javascript
has body: I have a project built in Laravel with AngularJS where you can view and edit a report. I want to implement the feature that when someone is editing the report, no one else should be allowed to do the same. It should be locked while someone is editing it. When the user is done editing it or leaves the page, the report should open up for anyone to edit it again. What are your recommendations for this? I've thought a little bit about cookies/sessions, but I'm not sure how to detect if the user leaves the page.
tagged with: ajax
has comment: http://stackoverflow.com/comment/44358731

http://stackoverflow.com/comment/44572596
has text: @PatrickLawler Hi Patrick, I applied it to a div. I edited my OP once more, it is updating the score. But when I click the tweet button, it just shows "0"
type: AnswerComment
comment on: http://stackoverflow.com/a/28097957
score: 0
type: Comment

http://stackoverflow.com/comment/44493635
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27971489
score: 0
has text: Sorry, I'm editing now, I was using angular-route, and changed to ui-router to see if resolve the problem, but still the same

http://stackoverflow.com/a/28018614
score: 1
has body: The issue is you're setting a background-image on a div with no height or width. Add those: window.onload = function() { var testDiv = document.createElement("div"); testDiv.style.backgroundImage = "url('http://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Smiley.svg/2000px-Smiley.svg.png')"; testDiv.style.backgroundSize="cover"; //image is large, you dont need this if you dont want testDiv.style.height="100px"; //add some value testDiv.style.width="100px"; //add some value document.body.appendChild(testDiv); } FIDDLE
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28018581
answers question: http://stackoverflow.com/q/28018581
has comment: http://stackoverflow.com/comment/44424040
type: Answer
downvote count: 0

http://stackoverflow.com/q/28118268
answer count: 8
possible better answer: http://stackoverflow.com/a/41251257
tagged with: javascript
tagged with: jquery
score: 4
has body: I am trying to send text messages on whatsapp web version on chrome. (www.web.whatsapp.com) This is the code: document.getElementsByClassName("input")[1].innerHTML="This message was written via JS script! "; var input = document.getElementsByClassName("icon btn-icon icon-send"); input[0].click(); But the problem is , initially when no text is present the input box looks like this: And only when I physically write some text it changes to this: And only now my script works since it requires the Send text button. I tried Jquery code to simulate keypresses at $('.input)by following function: function pressKey() { var e = jQuery.Event("keypress"); e.which = 32; // # space $(".input").trigger(e)[1]; e.which = 91; $(".input").trigger(e)[1]; e.which = 32; // # space $(".input").trigger(e)[1]; e.which = 32; // # space $(".input").trigger(e)[1]; } It didn't work. How can I get the Send text button by script? Here is the screen recording :
has answer: http://stackoverflow.com/a/33939685
has answer: http://stackoverflow.com/a/43056160
has title: I am trying to send text- messages on WhatsApp with javascript?
has answer: http://stackoverflow.com/a/59520466
favorite count: 0
has answer: http://stackoverflow.com/a/34314710
has answer: http://stackoverflow.com/a/28119994
upvote count: 4
has answer: http://stackoverflow.com/a/28274775
has answer: http://stackoverflow.com/a/28285140
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28285140
downvote count: 0
has answer: http://stackoverflow.com/a/41251257
type: Question

http://stackoverflow.com/comment/44371281
type: QuestionComment
comment on: http://stackoverflow.com/q/27989048
has text: oh, I completely escaped that,.. Thanx!!
score: 0
type: Comment

http://stackoverflow.com/q/28001539
has comment: http://stackoverflow.com/comment/44392502
has title: Generate html pages with Javascript
downvote count: 0
tagged with: client-side
favorite count: 0
tagged with: static
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44392567
tagged with: http://stackoverflow.com/tag/html
has body: I'm developing a site in which the user can create his set of questions and asnwers. I'll have some datas, for example: Question1: "What's your name?"; Right answer: "Emiliano"; Wrong answers: ["Luke", "Mathew"] Question2: "What's your favourite color?"; Right answer: "Green"; Wrong answers: ["Blue", "Black"]ù ...and so on. and I want to give to some users the chance to create their own test. My solution has to be focus on the performance (in my last quiz-site I had 10k users online at the same time). How can I do? I've thought I can generate static html pages from my data (this is how we've done since now, but since now our quizzes were generate by us and not by users, so we generated like 2 quizzes per day and in these two times we were able to use some expensive-performance tool like php). I've read I can use node.js to generate my pages server-side, but there's some way to generate them client-side? I don't want to use my server as long as I can. I need to generate page like www.mysite.com/user-name/1.html www.mysite.com/user-name/2.html www.mysite.com/user-name/3.html www.mysite.com/user-name/result.html In which 1.html contain Question1 data and so on. Also, let me know if I can do this in another "simple" way. Thank you and sorry If I've written some meaningless things (in case, let me know what mistake I've made), first week on Javascript (and coding).
has comment: http://stackoverflow.com/comment/44392254
has comment: http://stackoverflow.com/comment/44392151
answer count: 0
has comment: http://stackoverflow.com/comment/44392205
score: 1
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/a/36153479
score: 1
upvote count: 1
has body: You can have an unlimited storage with WebSQL on Chrome extension only. https://developer.chrome.com/extensions/declare_permissions
answers question: http://stackoverflow.com/q/28084995
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44787311
type: QuestionComment
has text: Solved ! Just changed css property from display : none to visibility : hidden :)
score: 0
comment on: http://stackoverflow.com/q/28111010
type: Comment

http://stackoverflow.com/q/28006732
has body: I am working on a chrome extension which returns the font-size property of any element. I am loading the ajax response data into the extension document and computing their properties. Now something strange happening and I'm not being able to find out the reason. I have a heading tag on the webpage I'm analysing upon. Style tab (inspect element) on the webpage says its font-size is 2em and computed value is 32 pixels. Now, when i load the same page in my chrome extension, Style tab (inspect element) on my extension says its font-size is 2em but shows its computed style to be 24px. To clarify, I'm attaching the images of styles and computed syles of both webpage and chrome extension. Case 1: Style (Webpage) Computed Style (Webpage) Case 2: Style (After Loading In Chrome Extension) Computed Style (After Loading In Chrome Extension) I just want to know why is this happening? Same styles (2em) but browser window showing computed size as 32 and extension window (on same browser) showing 24px.
has title: Same style values, same element but different computed values on same browser
tagged with: css
upvote count: 1
type: Question
tagged with: computed-values
has answer: http://stackoverflow.com/a/28006832
has comment: http://stackoverflow.com/comment/44401991
downvote count: 0
has comment: http://stackoverflow.com/comment/44401997
tagged with: javascript
tagged with: computed-style
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/44401958
score: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44401814

http://stackoverflow.com/comment/44601351
has text: Yes unfortunately I cannot change HTML structure :(
comment on: http://stackoverflow.com/q/28113552
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44424257
has text: Within *sortItems*, *$listbox* was undefined. It's much better if you post code here.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28017510

http://stackoverflow.com/comment/94749777
score: 3
has text: How is it different then `spyOn(foo, 'setBar')` without `.and.callThrough()`?
comment on: http://stackoverflow.com/a/28008973
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44438879
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28017003
type: Comment
has text: [link](http://i59.tinypic.com/23m7pxj.png) [link](http://i57.tinypic.com/jkxczt.png)

http://stackoverflow.com/comment/44495122
type: Comment
has text: You could put a script in the footer so you know the page is loaded.
comment on: http://stackoverflow.com/q/28056397
score: 0
type: QuestionComment

http://stackoverflow.com/q/28020923
has answer: http://stackoverflow.com/a/28021129
has comment: http://stackoverflow.com/comment/44428445
type: Question
has answer: http://stackoverflow.com/a/28021145
tagged with: javascript
has answer: http://stackoverflow.com/a/28021041
linked to: http://stackoverflow.com/q/15666048
has body: I have the below structure of html/angular: I want to access the scope of "one-controller" from "four-controller", how do I do that. I have read that typically all child controllers have by default access to parents controller, but in my case its not working. As read, I see that for one level up, $scope.$parent... will work, but in my case, how do I access the top level one. Do I need to use $rootScope for that or is there any other way.
score: 0
has title: angularjs - access top level controller scope in web app
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/28021143
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44431503
tagged with: prototypal-inheritance

http://stackoverflow.com/comment/44404418
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28008215
score: 0
has text: Are you asking how to print their *key*? Did you try a Google (it's the biggest search engine in the world) search for "javascript object list keys"?

http://stackoverflow.com/comment/44609439
has text: OK, cool. That makes sense. I will check out my data and figure out what the standard deviation of my normal accelerations is. So each time I get a height or an acceleration measurement, I would first predict the new state with the dt from the last prediction. Then I would update it with the measurement. The update for height would be something like z = height, d = [1,0,0] and for accel it would be z = accel and d=[0,0,1]. Thanks for your help so far, it is really cool that this is starting to make sense.
comment on: http://stackoverflow.com/a/28107734
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28011220
tagged with: http://stackoverflow.com/tag/xml
score: 0
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28011589
has body: Problem: Trying to print one question and 4 answers at a time from an XML file. JS code: var xmlDoc, quest, ans, i, n; xmlDoc = loadXMLDoc("questions.xml"); quest = xmlDoc.getElementsByTagName('main'); document.write(" "); for (i = 0; i < quest.length; i+=1) { document.write(" "); document.write( quest[i].childNodes[0].nodeValue ); document.write(" "); for(n = 0; n < 4; n++) { document.write(" "); document.write( quest[i].childNodes[n].nodeValue ); document.write(" "); } } document.write(" "); Desired output: Each question comes with four answers below it. Right now only the questions are being printed correctly. The structure for the XML file is:
tagged with: javascript
has title: Outputting XML data to HTML by use of JS
accepted answer: http://stackoverflow.com/a/28011589
answer count: 1

http://stackoverflow.com/a/28003321
upvote count: 2
has body: My "guidance" on constructing the object would be to avoid this style of inserting each string separately: menuItems.product[0].product = "prod1"; menuItems.product[0].item[0] = "prod1Item1"; because this involves a lot of writing the same thing over and over, which is more error-prone and less readable/maintainable. I would prefer inserting more coarse-grained objects: menuItems.product[0] = { product: "prod1", item: ["prod1Item1"]; } Edit: Your edit is asking a completely different question, but it sounds like what you want to do is sort the elements of prodItems based on their "product" properties, then do the same thing for the "items" array inside the elements. I think the simplest way to do this would be to use Array.sort() with a custom comparison function that returns -1 on the element you want to see at the top. Something like this (hastily written and untested): function returnDict(product, item) { prodItems = prodItems.sort(function(a, b) { if(a.product === product) { return -1; } else if(b.product === product) { return 1; } else { return 0; } }); prodItems[0].items = prodItems[0].items.sort(function(a, b) { if(a === item) { return -1; } else if(b === item) { return 1; } else { return 0; } }); return prodItems; }
answers question: http://stackoverflow.com/q/28003198
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44395769
type: Answer
has comment: http://stackoverflow.com/comment/44395567
score: 2
accepted answer of: http://stackoverflow.com/q/28003198

http://stackoverflow.com/comment/44545613
score: 0
type: Comment
has text: no error in console can i show you to my all code in my upper Question
type: AnswerComment
comment on: http://stackoverflow.com/a/28082787

http://stackoverflow.com/q/28114841
has comment: http://stackoverflow.com/comment/44603872
favorite count: 0
has comment: http://stackoverflow.com/comment/44603841
score: -3
has comment: http://stackoverflow.com/comment/44603878
has comment: http://stackoverflow.com/comment/44603833
upvote count: 1
has comment: http://stackoverflow.com/comment/44603968
has comment: http://stackoverflow.com/comment/44604287
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44604137
has comment: http://stackoverflow.com/comment/44603884
has answer: http://stackoverflow.com/a/28114966
type: Question
has comment: http://stackoverflow.com/comment/44603924
has comment: http://stackoverflow.com/comment/44603865
tagged with: javascript
has body: I'd like to know how to get the source code of an external page using native, no-library JavaScript - is it possible? (Notice: I'm trying to get the JSON contents of a web page like this one) I can't use external libraries such as JQuery. Edit - turns out that using the XMLHttpRequest works very well, as well as (if I have a server available) I can use... var my_file = &lt;?php echo '"'.file_get_contents("file.json").'"' ?&gt; Also, I can use JSON.parse() to get the contents of a file: // Extending from the previous block of code var my_json = JSON.parse(my_file);
downvote count: 4
accepted answer: http://stackoverflow.com/a/28114966
has comment: http://stackoverflow.com/comment/44604019
has comment: http://stackoverflow.com/comment/44603951
answer count: 1
has title: Get source code of external page **using native JS**?
has comment: http://stackoverflow.com/comment/44603903

http://stackoverflow.com/a/28072580
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28070824
answers question: http://stackoverflow.com/q/28070824
type: Answer
downvote count: 0
score: 1
has body: You could save off the individual styles that you are interested in one by one and then re-apply them later using the jQuery("selector").css("styleName") method that you alluded to, but I don't think there's an easy way to do them all at once. It's not impossible, but wouldn't be very efficient and probably wouldn't actually give you the result you want, once the element is in its new position. After the discussion, we found that the sizing issue wasn't really due to the styles, but due to the element that the width was being calculated from. When the element is positioned normally in the page-flow, it uses its most recent positioned parent's width and then takes off margin to find the width of the child content. When the element is removed from the page flow, its width is then independent of the parent. So to get the two to match up, record the parent's width rather than the element itself and set the width to match the parent, instead of trying to maintain the element's width.

http://stackoverflow.com/comment/44440290
has text: `oCreditStatus`'s value is stored as a string. You will need to convert it to a number before adding with it: `var oOrigValu = Number(oCreditStatus.value)`
type: Comment
comment on: http://stackoverflow.com/q/28027560
type: QuestionComment
score: 4

http://stackoverflow.com/q/27972223
has comment: http://stackoverflow.com/comment/44338339
has comment: http://stackoverflow.com/comment/44338226
has comment: http://stackoverflow.com/comment/44338273
has body: I am building a simple sandbox/practice style website on heroku I am trying to learn nodejs and I am learning Angular. After much hit and miss I got the server to load my home.html page, however it cannot seem to find my vendor scripts. Such as my angular, contollers, and some images/css. The path I have setup for angular is: &lt;script src="/vendor/angular.min.js"&gt;&lt;/script&gt; &lt;script src="/controller.js"&gt;&lt;/script&gt; This is coming from a localhostconnection by the way, so http://localhost Here is an example of what my simple index.js in node looks like: var express = require("express"); var app = express(); app.set("port", (process.env.PORT || 5000)); app.engine('html', require('ejs').renderFile); app.set('views engine', 'html'); app.use(express.static(__dirname + "/public")); app.get("/", function(request, response) { response.render("home.html"); }); app.listen(app.get("port"), function() { console.log("Node app is running at localhost:" + app.get("port")); }); this is located in the root of the webfiles and it points to a views folder which includes my home.html (how I got my home page to finally load) However it still says it cannot find my vendor scripts. These are located inside their own vendor folder that is in the root folder, and the views folder is also its own folder in the root folder the setup is like so: -views ---home.html -vendor --some vendor folders(bootstrap etc) ---angularjs.js and other vendor scripts I am sure I am missing something simple here, but I am a beginner with nodejs and still learning at this point. Thank you ahead of time for the help, and let me know if I can offer anymore information.
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44338765
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Webpage cannot find certain files
tagged with: node.js
has comment: http://stackoverflow.com/comment/44337997
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44338131
tagged with: heroku

http://stackoverflow.com/comment/44606994
has text: I don't see the two functions over in the Drive API going anywhere. They were an announced fully supported feature [ https://www.youtube.com/watch?v=bi9AUGr7qus ]. I'm much less sure about toJson and loadFromJson, though I have a feeling these were unintentionally leaked in the public api and will be documented at some point in the future.
type: AnswerComment
comment on: http://stackoverflow.com/a/28105123
score: 0
type: Comment

http://stackoverflow.com/a/29224329
type: Answer
has body: It seems that you are using the wrong notation: you want to insert FORMULA and not VALUE so far. Check the Spreadsheet Class and Range Class docs. Here is what you are looking for: setFormula(formula): Updates the formula for this range. setFormulaR1C1(formula): Updates the formula for this range. setFormulas(formulas): Sets a rectangular grid of formulas (must match dimensions of this range). setFormulasR1C1(formulas): Sets a rectangular grid of formulas (must match dimensions of this range). So for example sheet.getRange("E10").setValue("=A22"); sheet.getRange("E11").setValue("=H22"); sheet.getRange("E12").setValue("=J22"); sheet.getRange("E13").setValue("=Round(E11/E12)"); sheet.getRange("E14").setValue("=B22"); sheet.getRange("E15").setValue("=D22"); sheet.getRange("E17").setValue("=sum((G22/E3)*100)"); sheet.getRange("E18").setValue("=E11-E3"); sheet.getRange("E19").setValue("=ROUND(E18/B6)"); could become var Formulas = [ "=A22","=H22","=J22" "=Round(E11/E12)", "=B22","=D22", "=Sum((G22/E3)*100)", "=E11-E3", "=ROUND(E18/B6)" ] sheet.getRange("E10:E19").setFormulasR1C1(Formulas); //not sure about the A1 notation if that would accept this parameters else //replace by getRange(10,5,19,5) (
score: 0
accepted answer of: http://stackoverflow.com/q/28050192
answers question: http://stackoverflow.com/q/28050192
type: AcceptedAnswer

http://stackoverflow.com/q/28039342
upvote count: 3
has body: I am using Firefox regular edition since years and have very seamless experience while browsing and debugging apps. Few months back firefox launched its developer edition, so I switched to FF developer edition. But what I experienced is that, it crashes a lot while debugging JS (angularjs and jquery code) and some times the debugger does not hit at all even though that line of codes are being executed. This is really an annoying behaviour of firefox developer edition. Why it is so unstable even though I haven't installed any addons at all. Is Firefox Developer Edition is unstable or it is something related to my system. What I observed so far if some line of my code in js (Angular, Jquery or plain vanilla) has any error (like calling any undefined scope variable in controller in angularjs or calling any function from services which is undefined in angularjs) it crashes while executing same in chrome it simply skips that line and shows error in console. For debugging I apply breakpoints at multiple lines and then use F8 to jump line. Is there any solution to solve this issue? Here is crash report.
tagged with: firefox-developer-edition
has comment: http://stackoverflow.com/comment/45825612
type: Question
tagged with: web-inspector
accepted answer: http://stackoverflow.com/a/28040388
score: 3
has comment: http://stackoverflow.com/comment/44498151
has title: Annoying behaviour of Firefox Developer Edition - Crashes a lot while debugging JS
has comment: http://stackoverflow.com/comment/45857223
tagged with: firefox-developer-tools
answer count: 2
has comment: http://stackoverflow.com/comment/45834761
tagged with: firefox
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/45681034
possible better answer: http://stackoverflow.com/a/28773732
has answer: http://stackoverflow.com/a/28040388
has answer: http://stackoverflow.com/a/28773732
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/45833467

http://stackoverflow.com/comment/44338342
has text: Yes, thank you! I didn't have the at the end of the create modal. Thank you so much!
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27971989

http://stackoverflow.com/q/28093975
score: 0
has comment: http://stackoverflow.com/comment/44564342
has body: I try to make a choropleth map with OpenLayers3 and a GeoJson generate in a javascript. I want to use the properties of my GeoJson for make this map. For Example, if I've a city with properties ["name"='1'] and a city with properties ["name"='2'] I want to have blue color for the '1' and red color for the '2'. I found on the internet, how to make this map with OpenLayers2 ([Example for make a choropleth map with OL2][1]) but I don't find the equivalence in OL3. The code with OL2 look like : var subteStyleMap = new OpenLayers.StyleMap({ 'strokeWidth': 4 }); var lookup = { "1": {strokeColor: "#46C7FA"}, "2": {strokeColor: "#E81D1A"} } subteStyleMap.addUniqueValueRules("default", "number", lookup); var geojson_layer = new OpenLayers.Layer.Vector("GeoJSON", { projection: new OpenLayers.Projection("EPSG:4326"), strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "generation_geojson2.php", format: new OpenLayers.Format.GeoJSON() }), styleMap: subteStyleMap }); I started the adaptation but I don't find the equivalence for 'addUniqueValueRules' var lookup = { "1": {strokeColor: "#46C7FA"}, "2": {strokeColor: "#E81D1A"} } subteStyleMap.addUniqueValueRules("default", "number", lookup); var vector_arret_tad = new ol.layer.Vector ({ source: new ol.source.GeoJSON({ url: 'generation_geojson2.php',defaultProjection :'EPSG:4326', projection: 'EPSG:3857'}), name: 'City', style: subteStyleMap }); What is the OL3 equivalence of this code, or another solution for this problem?
has title: <OpenLayers3> Make choropleth map with GeoJson
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28105517
tagged with: openlayers-3
type: Question
has comment: http://stackoverflow.com/comment/44585231
tagged with: javascript
answer count: 1
accepted answer: http://stackoverflow.com/a/28105517
has comment: http://stackoverflow.com/comment/44585428

http://stackoverflow.com/q/28115861
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44606025
accepted answer: http://stackoverflow.com/a/28116388
tagged with: angularjs
type: Question
has title: How to add dom element in my case
tagged with: http://stackoverflow.com/tag/html
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/28116388
tagged with: javascript
has body: I am trying to add an additional element when user click an link inside a td. I have something like in html {{item.name}} so my actually html is like 1 2 3 4 5 6 7 8 …more My goal is to put new new tr tag between two tr tag when user click a button so it will be like //click any of link here inside a td, add new tr next to it 1 2 3 4 Newly added <- add one if I click 1,2,3,4 5 6 7 8 Newly added <- add one if I click 5,6,7,8 my js angular.module('myApp').directive('itemDetail', function() { return { restrict: 'A', link: function(scope, elem) { var html = ' newly added ' elem.bind('click', function() { //not sure what to do here. there is no closet method in Jquery lite }) } }; } ); I am not sure how to accomplish this by using directive. Any tips? Thanks a lot!
possible better answer: http://stackoverflow.com/a/28116114
has comment: http://stackoverflow.com/comment/44606001
has answer: http://stackoverflow.com/a/28116114

http://stackoverflow.com/comment/44459129
type: QuestionComment
comment on: http://stackoverflow.com/q/28036249
score: 0
has text: Just don't dispatch it on the `document`, but on the element that you want?
type: Comment

http://stackoverflow.com/a/28146510
type: Answer
score: 2
upvote count: 2
has body: Figured it out. The trick is to override the default force.drag behavior. By default the drag behavior labels the node being dragged as fixed and directly changes its position. This is to prevent it from being pulled by the other nodes as it is being dragged. When multiple nodes are selected, all of them have to be fixed and we have to directly change their positions (all of px, py, x, and y). This allows us to drag multiple nodes at once. See the fiddle here: http://jsfiddle.net/pkerpedjiev/29majy5c/2/ Along with the corresponding code: var width = 400, height = 500, shiftKey; var svg = d3.select("body") .attr("tabindex", 1) .on("keydown.brush", keydown) .on("keyup.brush", keyup) .each(function() { this.focus(); }) .append("svg") .attr("width", width) .attr("height", height); var link = svg.append("g") .attr("class", "link") .selectAll("line"); var brush = svg.append("g") .datum(function() { return {selected: false, previouslySelected: false}; }) .attr("class", "brush"); var node = svg.append("g") .attr("class", "node") .selectAll("circle"); var graph = {"nodes":[{"x":444,"y":275},{"x":378,"y":324},{"x":478,"y":278},{"x":471,"y":256},{"x":382,"y":269},{"x":371,"y":247},{"x":359,"y":276},{"x":364,"y":302},{"x":400,"y":330},{"x":388,"y":298},{"x":524,"y":296},{"x":570,"y":243},{"x":552,"y":159},{"x":502,"y":287},{"x":511,"y":313},{"x":513,"y":265},{"x":602,"y":132},{"x":610,"y":90},{"x":592,"y":91},{"x":575,"y":89},{"x":607,"y":73},{"x":591,"y":68},{"x":574,"y":73},{"x":589,"y":149},{"x":620,"y":205},{"x":621,"y":230},{"x":589,"y":234},{"x":602,"y":223},{"x":548,"y":188},{"x":532,"y":196},{"x":548,"y":114},{"x":575,"y":174},{"x":497,"y":250},{"x":576,"y":196},{"x":504,"y":201},{"x":494,"y":186},{"x":482,"y":199},{"x":505,"y":219},{"x":486,"y":216},{"x":590,"y":306},{"x":677,"y":169},{"x":657,"y":258},{"x":667,"y":205},{"x":552,"y":227},{"x":518,"y":173},{"x":473,"y":125},{"x":796,"y":260},{"x":731,"y":272},{"x":642,"y":288},{"x":576,"y":269},{"x":605,"y":187},{"x":55…
answers question: http://stackoverflow.com/q/28113792
downvote count: 0

http://stackoverflow.com/a/28074847
has comment: http://stackoverflow.com/comment/44529091
downvote count: 0
type: Answer
score: 2
has body: You don't need to include the javascript file into the views folder. In fact I would say this is actually a bad idea, since the view folder in Codeigniter is meant to hold php files which are kind of like a templates. Instead consider putting javascript or other loadable media in their own folder outside of Codeigniter. Simply create a folder called js off of your root (it's probably the same level as the application folder). Then just reference the files using relative links &lt;script type="text/javascript" src="/js/mnd3js.js" &gt;&lt;/script&gt; or with an absolute link &lt;script src="&lt;?php echo base_url() ?&gt;js/jquery.js"&gt;&lt;/script&gt; I prefer relative links myself, but ultimately it depends on your application.
upvote count: 2
answers question: http://stackoverflow.com/q/28053389
has comment: http://stackoverflow.com/comment/44530052

http://stackoverflow.com/a/28084478
type: Answer
upvote count: 1
score: 1
has body: Why are you using XPath? It seems that QTP's default object identification should work fine for you. Browser("title:=.*").Page("title:=.*").Frame("html id:=file_007").WebFile("name:= file007").Set "C:\file.txt" If you need to use XPath then I think that QTP only supports XPath's inside a document, so you need to identify the Frame (optionally by XPath) and then under it identify the element relative to its owner Frame.
answers question: http://stackoverflow.com/q/28068669
downvote count: 0

http://stackoverflow.com/comment/44399892
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/28005749
has text: Please provide demo that replicates problem

http://stackoverflow.com/comment/44486997
comment on: http://stackoverflow.com/q/28052419
type: Comment
has text: The cleanest approach would be to use stylesheets. Without them, no easy/clean way comes to my mind.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44567292
has text: then start looking at what `data.date` looks like in your JS code, because there's no way a properly formatted date string would be interpreted as having the year 5877521. or being "negative five hundred and ninety-six o'clock".
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28094007

http://stackoverflow.com/a/28094050
has comment: http://stackoverflow.com/comment/44565680
type: AcceptedAnswer
upvote count: 3
has comment: http://stackoverflow.com/comment/44565657
type: Answer
has comment: http://stackoverflow.com/comment/44579738
downvote count: 0
has body: While you may add more lines to your code, function declaration is the fastest. This particularly applies to instances where you are invoking the same function multiple times. Ex. collection lookups, array iteration, etc... Using Benchmark.js, you can quickly see the difference. ☃ seth:~/Node/function-performance$ node test.js Anonymous x 121 ops/sec ±8.31% (64 runs sampled) Function Expression x 137 ops/sec ±5.25% (72 runs sampled) Function Declaration x 165 ops/sec ±0.84% (86 runs sampled) Fastest is Function Declaration This is using the following code to test: "use strict"; var Benchmark = require('benchmark') var suite = new Benchmark.Suite var stuff = [1,2,3,4,5,6,9,8,9,10,11,12,13,14,15]; var myEventHandler = function() { // do something }; function myEventHandler2() { // do something }; suite.add('Anonymous', function() { for (var i = 0; i &lt; 10000; ++i) { stuff.forEach(function() { // do something }); } }) .add('Function Expression', function() { for (var i = 0; i &lt; 10000; ++i) { stuff.forEach(myEventHandler); } }) .add('Function Declaration', function() { for (var i = 0; i &lt; 10000; ++i) { stuff.forEach(myEventHandler2); } }) .on('cycle', function(e) { console.log(String(e.target)) }) .on('complete', function() { console.log('Fastest is ' + this.filter('fastest').pluck('name')) }) .run({ 'async': true }); The same also goes for the browser. To support Zeeker's comment - In the event you're not running the function more than once in a given instance, you can usually get away with anonymous functions, however it can clean up your invocations when using function declarations.
accepted answer of: http://stackoverflow.com/q/28093569
has comment: http://stackoverflow.com/comment/44566134
score: 3
has comment: http://stackoverflow.com/comment/44566011
answers question: http://stackoverflow.com/q/28093569

http://stackoverflow.com/comment/44461795
score: 0
type: Comment
has text: Maybe there is CSS hiding the results on your site? It does create a Unordered List (UL) Element.
comment on: http://stackoverflow.com/a/28038769
type: AnswerComment

http://stackoverflow.com/q/28060696
type: UnansweredQuestion
tagged with: iframe
tagged with: php
has title: Fancybox next/previous not showing iframe
linked to: http://stackoverflow.com/q/9827473
linked to: http://stackoverflow.com/q/8929879
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/7536456
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
upvote count: 1
has answer: http://stackoverflow.com/a/28063243
favorite count: 0
has body: Hi guys is it possible to show next and previous button on fancy using iframe? I tried using this code but its not showing. function open_photo(obj) { $.fancybox({ href : $(obj).attr("data-id"), width : '75%', height : '75%', autoScale : true, type : 'iframe', overlayShow : false, transitionIn : 'elastic', transitionOut : 'elastic', centerOnScroll: true, showNavArrows : true }); }

http://stackoverflow.com/q/28107942
has comment: http://stackoverflow.com/comment/44593384
possible better answer: http://stackoverflow.com/a/28114234
downvote count: 0
has answer: http://stackoverflow.com/a/28114234
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44593870
has body: I'm wanting to animate the slide of span to the left, than when transition stops, have it instantly move to another position without transition, and then afterwards slide it back into it's original position with transition. I must use CSS for the animation, not JS. My problem is once I've animated the span to the left, and had it instantly go move, I cannot transition back into position. Here's an example (click the span to animate): http://jsbin.com/tosaxedura/3/edit body, html, div { display:block; width:100%; height:100%; margin:0; padding:0; } div { background:black; display:block; height:200px; width:200px; margin:0 auto; } span { display:block; height:inherit; width:inherit; background:red; transition:transform 275ms cubic-bezier(0.470, 0.000, 0.745, 0.715), opacity 275ms cubic-bezier(0.470, 0.000, 0.745, 0.715); } $('body').on('click', 'span', function () { var self = $(this); self.css('transform', 'translateX(-100%)').css('opacity', '0.5'); self.one('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd', function (e) { self.css({ 'transition-duration': '0', 'transform': 'translateX(100%)' }); // move back into original position (overlaying the black) with animation self.one('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd', function (e) { //self.css('transition-duration', ''); //self.removeAttr('style'); }); }); });
tagged with: css
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/28111290
has comment: http://stackoverflow.com/comment/44593988
type: AnsweredQuestion
has title: CSS Transition Transform: Sliding element one way, and having it slide back in from the opposite direction
tagged with: transition
type: Question
tagged with: transform
accepted answer: http://stackoverflow.com/a/28111290
answer count: 2
tagged with: jquery-animate

http://stackoverflow.com/a/27981163
downvote count: 0
has body: Modal window in pure HTML and CSS You can achieve what you want doing this : .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; } DEMO HERE
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27981063
answers question: http://stackoverflow.com/q/27981063
type: AcceptedAnswer
type: Answer
score: 2

http://stackoverflow.com/comment/44564943
type: AnswerComment
comment on: http://stackoverflow.com/a/28094355
score: 0
type: Comment
has text: Um... I'm not sure that that has anything to do with your hardware... But back on topic ...I think you guys are on to something here... If I trigger a mouse down event, will it 'override' the existing one?

http://stackoverflow.com/comment/44502462
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28060537
has text: The app is in our IIS.

http://stackoverflow.com/comment/44348844
has text: Thanks, but that still isn't working cleanly with my `cb` handler. I.e.: `async.each objects, ((item, next) -> objects[objects.indexOf(item)].whoami_async; do next), done` will always succeed, even when it's defined like: `whoami_async: (cb) => cb new Error`.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27978361
type: Comment

http://stackoverflow.com/q/28059390
tagged with: ruby
type: UnansweredQuestion
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/28059604
has title: Reading custom JS Files in rails 4.1
type: Question
has body: In my Rails 4.1 project I have the following code: { &lt;% = javascript_include_tag "application", "data-turbolinks-track" =&gt; true%&gt; } which I load all my js files with extention. My question is if there is another way to load the .js files that are only of resources necessary for a given form ??????
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28060149
score: 0

http://stackoverflow.com/q/27975986
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27976371
answer count: 1
tagged with: javascript
has body: I am need to collect data from a website that allows me to download the results of a query but only the ones currently being displayed on that page. I have no experience whatsoever with javascript or even any real programming. A friend told me that I might be able to do it with the "Custom JavaScript for websites" Addon for Chrome. I managed to get it to download the file I want for each page using: document.getElementById('dContent').value = 'full'; document.getElementById('submit-download').click(); I still need to manually change to the next page. I tried to do this automatically by adding a cycle: for (i = 1; i &lt; 20; i++) { location.href='https://www.myurl.com/search?query=keyword&amp;page=' +i; document.getElementById('dContent').value = 'full'; document.getElementById('submit-download').click(); } But it doesn't seem to work*. My google skills and limited knowledge only took me this far. Am I doing something wrong? I wonder if the addon actually allows this as I reckon it might not work as a new page is being loaded. Is there another software that I might use for this purpose? Thank you in advance for your help. the url for the queries follows the page=1 / =2 / ... rule for the results
score: 0
accepted answer: http://stackoverflow.com/a/27976371
has title: How to retrieve results from a search from several pages
type: Question

http://stackoverflow.com/comment/44573446
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28098664
has text: Hello guys, added an example of Backbone anotated source :) Thank you for your replies
score: 0

http://stackoverflow.com/a/29990007
score: 0
answers question: http://stackoverflow.com/q/28112739
type: Answer
has body: You can also try to use the onload of the first script to call for the second one?

http://stackoverflow.com/a/28009214
has body: Try to search for opening a tags, not for spaces. $('h3').each(function () { var h = $(this).html(); var index = h.indexOf('&lt;a'); if (index == -1) { index = h.length; } $(this).html('&lt;span style="color:#fff;"&gt;' + h.substring(0, index) + '&lt;/span&gt;' + h.substring(index, h.length)); }); And seriously, it would be better just to apply CSS styles for h3 and a tags.
answers question: http://stackoverflow.com/q/28009055
score: 0
type: Answer

http://stackoverflow.com/comment/44517854
score: 0
type: AnswerComment
has text: What I want is to find a way to compare if the checked radio button's value matches that of the correct array's value. So i tried something else (edited in the code)and it doesnt work either. Any clues on how to do it?
type: Comment
comment on: http://stackoverflow.com/a/28069099

http://stackoverflow.com/comment/44412502
type: Comment
comment on: http://stackoverflow.com/q/28012603
has text: It seems like `RestService` is not configured to post your data as JSON, but form-data. Where is `RestService` from/defined?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44417531
comment on: http://stackoverflow.com/q/28015013
score: 0
type: Comment
type: QuestionComment
has text: So what is your objective? `textarea` doesn't render html so it's not clear what you are trying to do

http://stackoverflow.com/a/28075543
has comment: http://stackoverflow.com/comment/44534907
answers question: http://stackoverflow.com/q/28072242
type: AcceptedAnswer
score: 0
type: Answer
has body: function BaseController ($scope, dataFactory) { $scope.getMedia = function () { dataFactory.getMedia() .success(function (data) { //same like your }) .error(function (error) { $scope.status = 'Unable to load ' + error.message; }); } $scope.getMedia(); } angular .module('bellApp') .controller('BaseController', BaseController); directive function singleSlider() { return { // default is A, no need to asign templateUrl: 'views/single-slider.html', scope: { topitems :'=', bottomitems :'=' }, link: function ($scope) { $scope.displayInfo = function (item) { $scope.itemDetail = item; $scope.box = true; }; $scope.close = function () { $scope.box = false; }; ... ( shortened for example ) } }; } angular .module('bellApp') .directive('singleSlider', singleSlider); View ... &lt;div single-slider topitems="topItems" bottomitems="bottomItems" class="media-slider"&gt;&lt;/div&gt; thats all what i can help without see your dataFactory or rest of the directive Edit: or give your directive a controller and do what you did in the controller for the directive in the directive controller function singleSlider() { return { ... controller: 'NameOfYourController' } }
accepted answer of: http://stackoverflow.com/q/28072242
has comment: http://stackoverflow.com/comment/44534347

http://stackoverflow.com/comment/44471568
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28044089
has text: @RajavelD - To highlight more text you have to press and hold the Ctrl key and select the second text.
score: 0

http://stackoverflow.com/a/30363010
type: Answer
answers question: http://stackoverflow.com/q/28044780
has body: So from reading the code you always proxy to http://localhost:4000/socket.io/, however you want this to be dynamic? You could pass the server you wish to proxy to in the initial request as a parameter? You could potentially pass this in the protocol field of the WebSocket constructor. Then read this on the servers on-open event.
score: 0

http://stackoverflow.com/a/42861143
upvote count: 15
downvote count: 0
answers question: http://stackoverflow.com/q/28119084
has body: isDisplayed resolves to whether the element is visible or not, but throws an exception if it is not in the DOM. isPresent resolves to whether it is there in the DOM or not, regardless of whether it is actually visible or not. It doesn't throw an exception. The following code can be used to avoid the exception that isDisplayed throws if the element is not found in the DOM : function isVisible(e) { var deferred = protractor.promise.defer(); if (e) { e.isDisplayed().then( // isDisplayed Promise resolved function(isDisplayed) { deferred.fulfill(isDisplayed); }, // Silencing the error thrown by isDisplayed. function(error) { deferred.fulfill(false); } ); } else { deferred.reject(new Error('No element passed')); } return deferred.promise; } Even an object with both the visibility and presence can be passed while resolving, for example : deferred.fulfill({ visible: isDisplayed, present: true }); However, this won't work well with expect statements.
score: 15
type: Answer

http://stackoverflow.com/comment/44905595
type: AnswerComment
type: Comment
has text: I saw that, on the documentation of [addJavascriptInterface](http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface), they say that the added objects will not apear in JavaScript until the page is next (re)loaded. your code seems logical but weirdly it only work if we add the first loadData!
score: 0
comment on: http://stackoverflow.com/a/28270620

http://stackoverflow.com/comment/44550842
has text: Yes, you're right. I'll get a genuine book later, from our library.
type: Comment
comment on: http://stackoverflow.com/a/28086352
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44491450
score: 0
type: Comment
has text: Holy crap, you have no idea how much time I wasted today trying to fix this. Thanks a lot, going to accept this in a few minutes :-)..
comment on: http://stackoverflow.com/a/28054710
type: AnswerComment

http://stackoverflow.com/comment/44614200
type: Comment
comment on: http://stackoverflow.com/q/28119901
has text: The `remote` method is doing `ajax` on a URL parameter. By passing it a function instead of a URL, it's trying to access your JavaScript function via `ajax`, so obviously it will not work. [Have you tried making a custom rule?](http://jqueryvalidation.org/jQuery.validator.addMethod/)
score: 0
type: QuestionComment

http://stackoverflow.com/q/27996919
duplicate of: http://stackoverflow.com/q/6300937
answer count: 1
downvote count: 0
favorite count: 0
tagged with: iife
has body: I've got the following (simplified) Batman.js file: (function(){ "use strict"; window.Batman = function(){ // Global references this.version = "1.0.1"; }; Batman.prototype.saveGotham = function(params) { var _ = this; // Works fine destroyGotham.call(_, params); }; // Private function destroyGotham(params){ var _ = this; // &lt;!-- "possible strict violation" } }()); JSHint complains about a possible strict violation at the indicated line. How do I get around this without dropping the "use strict"? P.S: I'd like the troublesome var _ = this to reference the Batman instance.
accepted answer: http://stackoverflow.com/a/27996930
tagged with: strict
has title: Resolve possible strict violation (and help Batman save Gotham)
linked to: http://stackoverflow.com/q/6300937
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27996930
tagged with: javascript

http://stackoverflow.com/comment/44393564
has text: Thanks man. But, I was looking for an answer just for another single click. Please see below. Gave you a +1.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28001112
type: AnswerComment

http://stackoverflow.com/comment/44475080
type: Comment
comment on: http://stackoverflow.com/q/28046260
has text: Create a jQuery on click event something like `$('button').click() { function() { $('#timeslots').show(); });`
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44584851
score: 0
comment on: http://stackoverflow.com/q/28103844
type: Comment
type: QuestionComment
has text: can you share the HTML markup?

http://stackoverflow.com/q/28082949
type: Question
tagged with: url
tagged with: javascript
has comment: http://stackoverflow.com/comment/44577970
score: 0
tagged with: asp.net
has comment: http://stackoverflow.com/comment/44545376
answer count: 0
tagged with: oauth
type: UnansweredQuestion
tagged with: http-redirect
has title: I want to use Google authentication but I got 400 error:Invalid_request
has body: I develop using ASP.NET MVC 5. And I added Google Authentication to my project. (OAuth) First of all, I set to google develop console: Original Javascript : http://localhost/ Redirection URL : http://localhost/signin-google And It worked well. Then for the test, I deposit project to my office private network. There is virtual directory 'test231' and had 3 area(aa,bb,cc). And all of 3 area want to use google authentication. So I try to add to google develop console many ways: Original Javascript(Fail) : http://test231/aa/(or bb, cc) Original Javascript : http://test231/ (1) Redirection URL(Fail) : http://test231/signin-google (2) Redirection URL(Fail) : http://test231/aa/signin-google All cases are got the 'ERROR'. Error: invalid_request Invalid parameter value for redirect_uri: Non-public domains not allowed: http://test231/aa/signin-google There are no differences between localhost and test231. How Can I use google Authentication in my test server? What url I have to register in develop console? Login View using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) { Login } ExternalLogin (AccountController) public ActionResult ExternalLogin(string provider, string returnUrl) { return new ChallengeResult(provider, Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl })); } ExternalLoginCallback (AccountController) public async Task<ActionResult> ExternalLoginCallback(string returnUrl) { var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(); var result = await SignInManager.ExternalSignInAsync(loginInfo, isPersistent: false); return View("ExternalLoginConfirmation"); }

http://stackoverflow.com/comment/44572901
comment on: http://stackoverflow.com/a/28098453
type: AnswerComment
score: 0
type: Comment
has text: This is what I'm looking for! http://jsfiddle.net/243rz8eq/13/ Thanks! Yeah, I can make the IDs whatever I want, so the replace works or the simpler a,b,c works. Thanks guys. Forgot about referencing objects that way. Ugh.

http://stackoverflow.com/a/28096461
accepted answer of: http://stackoverflow.com/q/28096366
downvote count: 0
has comment: http://stackoverflow.com/comment/44572519
score: 1
has comment: http://stackoverflow.com/comment/44569472
has comment: http://stackoverflow.com/comment/44571647
answers question: http://stackoverflow.com/q/28096366
has comment: http://stackoverflow.com/comment/44569633
has comment: http://stackoverflow.com/comment/44569671
has comment: http://stackoverflow.com/comment/44569873
has comment: http://stackoverflow.com/comment/44569171
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44570350
has comment: http://stackoverflow.com/comment/44569564
type: Answer
has comment: http://stackoverflow.com/comment/44569553
has body: In general I would use the following approach... if (typeof window['myApp']=='undefined') {alert('its okay.');} else {alert('Error: native API added, have AJAX message server, email you.');} ...of course whether or not you should do this is subjective, I personally use... var option = new function() {this.name = '';} option.whatever = 'this string'; alert(option.whatever);//'this string' ...however I may rename it and revise it in the future as I do with all my code. As Ingo Bürk points out in the comments it seems ultimately everything is an object child of the window object, the only difference between those objects is the context and how you can interact with them (e.g. you can not delete an object defined by var though you can delete window.myObject when it is defined as window.myObject = 1;. For more in-depth information refer to the answer for 'Javascript global variables'.

http://stackoverflow.com/a/28109444
type: AcceptedAnswer
upvote count: 1
answers question: http://stackoverflow.com/q/28108229
has comment: http://stackoverflow.com/comment/44622959
has body: Assume that the selected div has the class .selected, this function will center the div: function centerSelected() { var selectedElement = $('.image .selected'); var p = selectedElement.position(); var w = $('.nhood').width(); var h = $('.nhood').height(); var offsetX = (w/2)-p.left - (selectedElement.width() / 2); var offsetY = (h/2)-p.top - (selectedElement.height() / 2); if(offsetX &gt; 0) offsetX = 0; if(offsetY &gt; 0) offsetY = 0; $('.image').css('left', offsetX + 'px'); $('.image').css('top', offsetY + 'px'); } Just call centerSelected after every zoom operation. Here is a jsfiddle with slightly modified css to get the presentation work: http://jsfiddle.net/q1r95w3g/3/ Edit If you want the div to get centered during jQuery animation, you can call centerSelected in the step callback of the animate method, e.g.: function zoomIn() { $(draggable).animate({ height: '4000', width: '4000', borderWidth: 0 },{ duration: 600, complete: function() { $divs.animate({ borderWidth: 0 }); }, step: function(now, fx) { centerSelected(); } }); }
accepted answer of: http://stackoverflow.com/q/28108229
type: Answer
has comment: http://stackoverflow.com/comment/44594861
has comment: http://stackoverflow.com/comment/44622772
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44593398

http://stackoverflow.com/q/28010456
has answer: http://stackoverflow.com/a/28011164
tagged with: javascript
answer count: 1
tagged with: meteor
type: UnansweredQuestion
has body: Several of my methods take in IDs as input. I was wondering how could I use the check package to check if these were valid ids or not. It seems Meteor doesn't use the conventions defined in the Mongo docs.
score: 2
downvote count: 0
favorite count: 0
type: Question
upvote count: 2
has title: How to test for collection ID in Meteorjs

http://stackoverflow.com/a/27992182
has comment: http://stackoverflow.com/comment/44378948
has comment: http://stackoverflow.com/comment/44377735
accepted answer of: http://stackoverflow.com/q/27992064
has comment: http://stackoverflow.com/comment/44376526
has comment: http://stackoverflow.com/comment/44379007
has comment: http://stackoverflow.com/comment/44376740
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/44377202
has comment: http://stackoverflow.com/comment/44377147
has comment: http://stackoverflow.com/comment/44377285
score: 1
has comment: http://stackoverflow.com/comment/44377374
has comment: http://stackoverflow.com/comment/44377407
answers question: http://stackoverflow.com/q/27992064
has comment: http://stackoverflow.com/comment/44378076
has comment: http://stackoverflow.com/comment/44378174
has comment: http://stackoverflow.com/comment/44377693
has comment: http://stackoverflow.com/comment/44377928
has comment: http://stackoverflow.com/comment/44377421
has comment: http://stackoverflow.com/comment/44378889
has comment: http://stackoverflow.com/comment/44377264
has comment: http://stackoverflow.com/comment/44376108
has comment: http://stackoverflow.com/comment/44377999
has comment: http://stackoverflow.com/comment/44376809
has body: Several JavaScript methods for accessing the array: var array = ['foo', 'bar', 'hello', 'world']; //simple for loop for(var i in array){ console.log('array item value: ', array[i]); } //forEach loop array.forEach(function(value){ console.log('array item value: ', value); }); Your array may have strings, numbers, objects, booleans, etc as each item, once you have access to that item using one of the above methods you can manipulate that item however you'd like. Information on forEach loops Information on for loops Information on iterating arrays
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44377985

http://stackoverflow.com/a/28223468
has body: I got answer from following link http://devnull.absolventa.de/2014/03/25/jsdoc-and-the-revealing-module-pattern/ Its working. Also instead of doxygen, i used jsdocs which is pretty easy.
score: -1
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/28056131
downvote count: 1

http://stackoverflow.com/q/28058787
tagged with: regex
has comment: http://stackoverflow.com/comment/44500694
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28058999
type: Question
possible better answer: http://stackoverflow.com/a/28058999
has comment: http://stackoverflow.com/comment/44499208
answer count: 2
has answer: http://stackoverflow.com/a/28059938
has title: Javascript - Use variable RegExp to match multiple keywords in an array of data
tagged with: javascript
score: 0
has body: I'm using AngularJS in here. I have no problem matching those words except "C++". Every time I type in "c++" as keyword to generate the RegExp in Javascript and run the matching, I get the error in console as below: SyntaxError: Invalid regular expression: /(\bc++\b)/: Nothing to repeat The code snippet is as below: $scope.data = [ {'title': 'Blue Java Programming Book'}, {'title': 'Red C++ Programming Book'}, {'title': 'Javascript Dummies Guide'} ]; $scope.submit = function() { $scope.length = $scope.keywords.split(" ").length; $scope.keywordsArray = $scope.keywords.split(" "); $scope.pattern = ""; for (var y = 0; y < $scope.length; y++) { $scope.pattern += "(?=.*?\\b" + $scope.keywordsArray[y] + "\\b)"; } $scope.pattern+=".*"; $scope.patt = new RegExp($scope.pattern, "i"); for (var x = 0; x < $scope.data.length; x++) { console.log("Match [" + x + "] " + $scope.patt.test($scope.data[x].description)); } } Submit I understand that the + sign in RegExp is for matching one or more times of the preceding character, then I tried hardcode the RegExp as below to test and it matches, but not the way I wanted as I need the RegExp to be generated every time I key in the keywords. $scope.regExp = /c\+\++/i Is there any way to generate a RegExp on the fly with multiple keywords to match an array of data that includes "c++"?
accepted answer: http://stackoverflow.com/a/28059938
has comment: http://stackoverflow.com/comment/44499544

http://stackoverflow.com/q/27991308
has comment: http://stackoverflow.com/comment/44373394
has comment: http://stackoverflow.com/comment/44373518
downvote count: 2
has comment: http://stackoverflow.com/comment/44373907
has answer: http://stackoverflow.com/a/27991733
type: AnsweredQuestion
type: Question
has title: Javascript object search
answer count: 2
has body: I have this code: (it reads a folder of mp3 files and retrieves all paths) var base = "../media/audio/"; var arr1 = [ {path:"../media/audio/Numbers/Cat1/01.mp3"}, {path:"../media/audio/Numbers/Cat1/02.mp3"}, {path:"../media/audio/Numbers/Cat1/03.mp3"}, {path:"../media/audio/Numbers/Cat1/04.mp3"}, {path:"../media/audio/Letters/Cat1/01.mp3"}, {path:"../media/audio/Letters/Cat1/02.mp3"}, {path:"../media/audio/Letters/Cat1/03.mp3"}, {path:"../media/audio/Color/Cat1/01.mp3"}, {path:"../media/audio/Color/Cat1/02.mp3"}, {path:"../media/audio/Color/Cat1/03.mp3"} ]; I want to get this: var arr2 = [ [{ category:"Numbers", path:[ {path:"../media/audio/Numbers/Cat1/01.mp3"}, {path:"../media/audio/Numbers/Cat1/02.mp3"}, {path:"../media/audio/Numbers/Cat1/03.mp3"}, {path:"../media/audio/Numbers/Cat1/04.mp3"} ] }], [{ category:"Letters", path:[ {path:"../media/audio/Letters/Cat1/01.mp3"}, {path:"../media/audio/Letters/Cat1/02.mp3"}, {path:"../media/audio/Letters/Cat1/03.mp3"} ] }], [{ category:"Color", path:[ {path:"../media/audio/Color/Cat1/01.mp3"}, {path:"../media/audio/Color/Cat1/02.mp3"}, {path:"../media/audio/Color/Cat1/03.mp3"} ] }] ]; Find every category after the 'base' string, split them in array, inside each array and object with category and path property.
upvote count: 0
score: -2
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27991535
accepted answer: http://stackoverflow.com/a/27991733
has answer: http://stackoverflow.com/a/27991535
has comment: http://stackoverflow.com/comment/44373678
favorite count: 0

http://stackoverflow.com/q/28076504
type: UnansweredQuestion
has title: Does OpenLayers support y-ordering for marker layers?
score: 1
upvote count: 1
type: Question
has body: I'm working with an OpenLayers map utilizing Marker layers, and I need to ensure that the markers overlap correctly, with markers lower on the y-axis appearing above higher markers. I assumed I could do this easily with y-ordering, as shown here: http://dev.openlayers.org/examples/ordering.html However, passing in rendererOptions: { yOrdering: true } doesn't seem to be working, and the example shows it being applied to a Vector layer rather than a Marker layer. Will I have to convert my Marker layers to Vector layers in order to get the benefit of y-ordering, or is there another way to make it work?
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: openlayers
has answer: http://stackoverflow.com/a/29023129

http://stackoverflow.com/q/28049256
has body: I started to learn Laravel. And displayed a lot of problems. Much too much for a product which should facilitate life. But not about this story is the story. Laravel 4, jQuery 2 Try to download the content from another file in the main file by pressing a button. But page javascript thrown "Uncaught ReferenceError: address is not defined" And the place where you want to retrieve new content upload itself. Weirdest that another laravel site with the same settings, everything is loading. Main file with content place and jquery ajax script $('#lsnbBtnAddHistory').on('click', function() { $.get('address-view-history', { aid: aid }, function(result) { $('#itemContent').html(result); }); }); route.php file Route::get('/address-view-history/', array( 'as' =&gt; 'address-view-history-get', 'uses' =&gt; 'AddressController@getAddressViewHistory' )); Does anybody have an idea why route.php file not found url path. Edit: I found a solution that works $.get( '{{ URL::asset("/") }}address-view-history', {}, function(result) { $('#itemContent').html(result); }); But another laravel folder/page/site with the same settings on the same computer works without {{URL :: asset ("/")}}. Why route.php unable to retrieve and process the "address-view-history"?
score: 1
has answer: http://stackoverflow.com/a/28049373
has title: Laravel + jquery ajax does not find the address for file
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: php
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/44390492
comment on: http://stackoverflow.com/q/28000665
type: Comment
type: QuestionComment
score: 1
has text: And your question is?

http://stackoverflow.com/comment/44413348
type: Comment
type: QuestionComment
has text: It seems like your project is pretty new, you should consider migrating to Ember CLI even for this one. It’s the new default for Ember applications, it’s very pleasant to work with and will be better supported than the global namespace-style applications (`App.` and the like).
comment on: http://stackoverflow.com/q/28012514
score: 0

http://stackoverflow.com/a/27979897
has body: In your attempted fiddle you are calling: width = this.width(); height = this.height(); , which are undefined. First assign the src attribute and then read width and height like this: $('#blah').attr('src', e.target.result).show(); width = $('#blah').width(); height = $('#blah').height();
downvote count: 0
has comment: http://stackoverflow.com/comment/44352436
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27979612
score: 1
has comment: http://stackoverflow.com/comment/44352091

http://stackoverflow.com/comment/44405755
type: Comment
has text: @donuts You won't use CSS for gaming. It's obvious fast drawing and object moves will work better in Canvas2D/3D. But you're talking about developing the Web entirely with Canvas. Please understand you're in the wrong way! Anyway, I would be glad to compare Canvas2D vs CSS3 using keyframe animations with GPU acceleration... Anyway, this goes out of the scope of your question!!!!!
type: AnswerComment
comment on: http://stackoverflow.com/a/28008709
score: 0

http://stackoverflow.com/comment/44591418
has text: Yes, you're right. But we can Use Array.sort() since databases is an Array: db._adminCommand( {listDatabases: 1}).databases.sort(function(item1, item2){return item1.name > item2.name});
type: Comment
score: 1
comment on: http://stackoverflow.com/a/28107198
type: AnswerComment

http://stackoverflow.com/q/28089564
score: 0
has title: Best way to keep elements inside DIV not to inherit page styles
has comment: http://stackoverflow.com/comment/44555695
answer count: 1
has answer: http://stackoverflow.com/a/28089843
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44555688
has comment: http://stackoverflow.com/comment/44555736
has comment: http://stackoverflow.com/comment/44555722
has body: I am using CKEditor to allow user to post some rich content as comment. But while displaying I am using DIV as parent and throwing all content inside it. So, obviously it inherits all the CSS of page. I want to prevent that, below are options I have Avoid generic styles like p, div { ... }. For the DIV assign an ID and reset all styles applied on page for that DIV. Use IFrame to display content. (This seems a good solution for me but I am trying to IFrames as much as I can). Any new suggestions on this please?
type: Question
tagged with: javascript

http://stackoverflow.com/q/28097770
tagged with: onchange
possible better answer: http://stackoverflow.com/a/28098000
has body: In an HTML form, I need to track which checkboxes get checked so I can insert it in my query object that is to be posted to the backend. I have the following three checkboxes in an array in the $scope: $scope.typeCheckBoxes = [ {label: "A", val: true}, {label: "B", val: false}, {label: "C", val: false} ]; and this below is my template for rendering the checkboxes in the form: &lt;span ng-repeat="chk in typeCheckBoxes"&gt; &lt;input type="checkbox" ng-model="chk.val" id="chk.label" ng-change="addType(this)" /&gt; &lt;label&gt;{{chk.label}}&lt;/label&gt; &lt;/span&gt; and in my controller, I tried to create the function addType() to add the checked checkbox to my query object: $scope.queryObj = { types: [] }; $scope.addType = function(e) { var selectedBox = angular.element(e.id); // not working if (selectedBox) { $scope.queryObj.types.push(selectedBox); } }; However, I am not sure how I can get the id of the checked checkbox. your help is appreciated very much.
favorite count: 0
has answer: http://stackoverflow.com/a/28114050
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/28098121
upvote count: 1
tagged with: checkbox
type: AnsweredQuestion
score: 1
tagged with: angularjs-controller
has comment: http://stackoverflow.com/comment/44571677
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/28098121
tagged with: javascript
has title: AngularJS: tracking which checkbox is checked
has answer: http://stackoverflow.com/a/28098000
answer count: 3

http://stackoverflow.com/a/27979887
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27979749
score: 1
has body: $('#sender_name').change(function(event){ if ($('#sender_name').attr('required')== 'required') { $('#sender_name').removeAttr('required'); } else { ($('#sender_name').attr('required')== 'required') } here is the code http://jsfiddle.net/64r1o0oq/ $('.sender_name_text').toggle(); }); This should work...
upvote count: 1

http://stackoverflow.com/a/28085293
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44548652
has comment: http://stackoverflow.com/comment/44548547
upvote count: 1
has comment: http://stackoverflow.com/comment/44548488
type: Answer
has comment: http://stackoverflow.com/comment/44548948
has comment: http://stackoverflow.com/comment/44548300
has comment: http://stackoverflow.com/comment/44548427
downvote count: 0
has body: Use this in jQuery: $("iframe").contents().find("a").attr("href"); P.S.: This will work if your iframe source is part of the same domain. If that belongs to an external domain (like in your example), you will not be able to retrieve the value (read about same-origin policy)
score: 1
accepted answer of: http://stackoverflow.com/q/28085161
answers question: http://stackoverflow.com/q/28085161

http://stackoverflow.com/comment/44414237
type: QuestionComment
comment on: http://stackoverflow.com/q/28013513
has text: @Mikey, that's what `$(function() {...` does.
score: 0
type: Comment

http://stackoverflow.com/comment/44563035
comment on: http://stackoverflow.com/a/28091709
has text: @JoeyHinton that did the trick. Man it is tough trying to learn 5 languages at once lol Thank you
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/q/28073357
has title: Regex to filter out "n" occurence of character
has comment: http://stackoverflow.com/comment/44526335
type: Question
has comment: http://stackoverflow.com/comment/44526363
tagged with: validation
has answer: http://stackoverflow.com/a/28077727
has answer: http://stackoverflow.com/a/28077779
has answer: http://stackoverflow.com/a/28077689
tagged with: javascript
has comment: http://stackoverflow.com/comment/44534361
score: 0
possible better answer: http://stackoverflow.com/a/28077727
answer count: 3
has comment: http://stackoverflow.com/comment/44526320
tagged with: regex
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/28077779
has comment: http://stackoverflow.com/comment/44526527
has comment: http://stackoverflow.com/comment/44526334
has body: I need a regular expression (for input validation) that filters out all the special characters except "underscore", so all the characters in range [a-zA-Z0-9\underscore] are allowed and can occur more than once. But in my expression I cannot have 2 consecutive occurrences of "underscore" and also my string cannot start with "_".
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44526165

http://stackoverflow.com/comment/44344082
comment on: http://stackoverflow.com/q/27975760
score: 0
type: Comment
type: QuestionComment
has text: What are you trying to accomplish in the end? Are you just trying to add a unique id for each like 1,2,3,etc. ... or are you trying to get some other unique attribute appended?

http://stackoverflow.com/q/28085897
linked to: http://stackoverflow.com/q/24236255
has comment: http://stackoverflow.com/comment/44552342
has answer: http://stackoverflow.com/a/28091148
has comment: http://stackoverflow.com/comment/44557800
tagged with: google-chrome-extension
has body: I have a listener defined in my content script in chrome extension: document.addEventListener("startRecording", function(data) { chrome.runtime.sendMessage({'action' : 'captureCurrentTab'}); }); and have a function defined in my extension.js: chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request.action == "captureCurrentTab"){ captureCurrentTab(); } }); function captureCurrentTab() { chrome.tabs.getSelected(null, function(tab) { chrome.tabCapture.capture(MediaStreamConstraint, handleCapture); }); } var MediaStreamConstraint = { //audio: true, video: true, videoConstraints: { mandatory: { chromeMediaSource: 'tab', minWidth: 1920, maxWidth: 1920, minHeight: 1080, maxHeight: 1080 } } }; function handleCapture(stream) { console.log('content captured'); console.log("Adding Stream: ", stream); } but when i send message to start recording from my web application like this: var event = document.createEvent('Event'); event.initEvent('startRecording'); document.dispatchEvent(event); then extension throws exceptions: 1) Error in response to tabCapture.capture: MediaStream is mandatory. 2) Unchecked runtime.lastError while running tabCapture.capture: Extension has not been invoked for the current page (see activeTab permission). Chrome pages cannot be captured. Here are the permissions i have supplied: "permissions": [ "tabCapture", "tabs", "activeTab", "http://*/*", "https://*/*" , "http://localhost:1615/*" ] But when I click on my extension button and repeat the same process (send message for recording) then everything works fine. I don't know why I have to click extension button every time to start capturing screen. How can I start it automatically? I have also defined shortcut keys for my extension. When I press them before sending message for recording then everything works fine. but when I triggered/simulate them from my application then again end up with same exception. Please help.
has comment: http://stackoverflow.com/comment/44557814
has title: Programmatically invoke tab capture throws exception
type: UnansweredQuestion
score: 1
tagged with: javascript
type: Question
upvote count: 1
answer count: 1
downvote count: 0
favorite count: 0

flux
tag name: flux
tags question: http://stackoverflow.com/q/28012356
type: Tag

http://stackoverflow.com/comment/44339841
has text: I'm using phoneGap to create a server where I test it.
type: AnswerComment
comment on: http://stackoverflow.com/a/27973199
score: 0
type: Comment

http://stackoverflow.com/q/27984403
score: 1
has body: Bulky question ahead so let's break this down. I try to achieve a similar behavior like the native for . I can't nest them so I use a style like this: Some other content... Lorem ipsum In my case is a custom directive and is an arbitrary elment. It could look like this: Some element... Some other content... My directive Sadly my id isn't really static. It is an expression. It could look like this: Some element... Some other content... My directive Now to my problem: Inside I want to get the element configured in the for attribute. Lets say foo has the value "bar"set in the $rootScope inside I get foo-bar. However no matter where I try it (inside compile, link, controller, with or without a priority, etc.) the specific element (here ) has still test-{{ foo }}at that time, so I get null with getElementById. How can I get the element outside the diretive, if it has an id containing an expression? Here is an example: http://jsfiddle.net/cd6uooze/ (Note: In my real world app this problem is slightly different. I can actually getElementById the right element from a directive even if it the id contains an expression. However this works only until the specific template is inside the $templateCache. I couldn't really break this down in the JSFiddle, but it the example from the JSFiddle is very similar.)
type: Question
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/27984497
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44375108
answer count: 1
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27984497
upvote count: 1
type: AnsweredQuestion
has title: Angular: How to get an element by id with an expression from a directive?
has comment: http://stackoverflow.com/comment/44360081

http://stackoverflow.com/a/27995283
has comment: http://stackoverflow.com/comment/44381415
answers question: http://stackoverflow.com/q/27995200
score: 0
accepted answer of: http://stackoverflow.com/q/27995200
has comment: http://stackoverflow.com/comment/44381259
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44381323
has comment: http://stackoverflow.com/comment/44381649
type: Answer
has comment: http://stackoverflow.com/comment/44381594
has comment: http://stackoverflow.com/comment/44381673
has body: just set the src of the iframe with the random youtube id instead: JS var paths = ["ONjesT18bVQ","ONjesT18bVQ","ONjesT18bVQ"]; //array of ids var item = paths[Math.floor(Math.random()*paths.length)]; //random document.getElementById("video").src = "https://youtube.com/embed/"+item+"?autoplay=1&controls=0&showinfo=0&autohide=1" //set id HTML FIDDLE

http://stackoverflow.com/q/27973125
has answer: http://stackoverflow.com/a/27973163
type: Question
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27973163
has body: I currently have the follow set up: (all divs with a class of "secret" are hidden) &lt;div class="row"&gt; &lt;div class="block align"&gt; &lt;a class="desktop" data-toggle-target="click-1"&gt; &lt;/a&gt; &lt;div&gt; &lt;div class="block align"&gt; &lt;a class="desktop" data-toggle-target="click-2"&gt; &lt;/a&gt; &lt;div&gt; &lt;div&gt; &lt;div class="row"&gt; &lt;div id="click-1" class="secret"&gt; stuff &lt;div&gt; &lt;div id="click-2" class="secret"&gt; stuff &lt;div&gt; &lt;div&gt; &lt;div class="row"&gt; &lt;div class="block align"&gt; &lt;a class="desktop" data-toggle-target="click-3"&gt; &lt;/a&gt; &lt;div&gt; &lt;div class="block align"&gt; &lt;a class="desktop" data-toggle-target="click-4"&gt; &lt;/a&gt; &lt;div&gt; &lt;div&gt; &lt;div class="row"&gt; &lt;div id="click-3" class="secret"&gt; stuff &lt;div&gt; &lt;div id="click-4" class="secret"&gt; stuff &lt;div&gt; &lt;div&gt; I slideToggle one a time with the following $('.align .desktop').click(function (e) { $( '#' + $(this).data('toggleTarget') ).slideToggle(300).toggleClass('open'); }); The problem is, if I click on data-toggle-target="click-2" to open the corresponding div, i need any other divs that are open to close first, then have the corresponding div slideToggle
score: 0
answer count: 2
has title: Slidetoggle div only after previous element has close
tagged with: slidetoggle
has answer: http://stackoverflow.com/a/27973698
tagged with: javascript
type: AnsweredQuestion
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27973698

http://stackoverflow.com/q/27982470
linked to: http://stackoverflow.com/q/19764018
has title: How to control animation speed (requestAnimationFrame)?
type: Question
has answer: http://stackoverflow.com/a/52999358
tagged with: canvas
tagged with: requestanimationframe
tagged with: javascript
has body: I change the text color with requestAnimationFrame(animate); function: requestAnimationFrame(animate); function animate(time){ ... // change text color here if (offset_s &lt; offset_e) {requestAnimationFrame(animate);} } offset_s and offset_s indicates start and end positions of the text for color change. In some cases the animation should last for 2 seconds, but in order cases - for 5 seconds, but offset_e - offset_s could be the same in these two cases. What can I do to control the speed of animation based on given time in seconds/milliseconds?
score: 4
has comment: http://stackoverflow.com/comment/44357498
has comment: http://stackoverflow.com/comment/44356195
tagged with: html5-canvas
upvote count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27984016
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27990502
tagged with: animation
answer count: 4
downvote count: 0
has answer: http://stackoverflow.com/a/64392220

browser
tags question: http://stackoverflow.com/q/28008673
tags question: http://stackoverflow.com/q/28004475
tags question: http://stackoverflow.com/q/27983985
tags question: http://stackoverflow.com/q/28101378
tags question: http://stackoverflow.com/q/28052875
tags question: http://stackoverflow.com/q/27989886
tags question: http://stackoverflow.com/q/28054284
tags question: http://stackoverflow.com/q/28011594
tags question: http://stackoverflow.com/q/28001438
tags question: http://stackoverflow.com/q/28088186
tags question: http://stackoverflow.com/q/28111010
tags question: http://stackoverflow.com/q/28111237
tags question: http://stackoverflow.com/q/28012917
tags question: http://stackoverflow.com/q/28051250
tag name: browser
type: Tag
tags question: http://stackoverflow.com/q/28114319

http://stackoverflow.com/comment/47133090
comment on: http://stackoverflow.com/q/27973980
score: 1
type: Comment
type: QuestionComment
has text: remove //require turbolinks in app.js and install jquery turblinks

http://stackoverflow.com/comment/56048576
type: QuestionComment
comment on: http://stackoverflow.com/q/28085629
has text: because i wanted to give the discount,if user shared my page on facebook
score: 0
type: Comment

http://stackoverflow.com/comment/44566655
type: Comment
has text: I just provided my html code in the question
type: QuestionComment
comment on: http://stackoverflow.com/q/28095317
score: 0

http://stackoverflow.com/comment/44349753
comment on: http://stackoverflow.com/q/27979002
type: Comment
type: QuestionComment
has text: Welcome to StackOverflow. Have you tried anything so far? Is it possible for you to show your code, even if it doesn't work?
score: 5

http://stackoverflow.com/comment/44509172
score: 0
type: Comment
type: QuestionComment
has text: the question updated asks exactly that, where do I place cleartimeOut?
comment on: http://stackoverflow.com/q/28064398

http://stackoverflow.com/q/27997079
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27998913
has body: How can I get all possible values of field of type parameter set from JavaScript? I.e. I have entity Entity1 and it has field Field1, which is set of parameters(Param1,Param2,Param3). How can I retrieve Param1, Param2 and Param3 from crm and pass it to select element of html?
type: Question
score: 0
answer count: 1
has title: Get possible values of field of type parameter set
tagged with: dynamics-crm
tagged with: dynamics-crm-2013
tagged with: dynamics-crm-2011
has comment: http://stackoverflow.com/comment/44419144
tagged with: javascript

http://stackoverflow.com/q/27983359
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27983834
has title: I need help creating a Windows 7 Gadget
answer count: 1
has body: I need to create a Windows 7 Gadget (or Widget) as a mini project. I know how to create a basic HelloWorld gadget (including the xml manifest and the html page), but I do not know how to make a complex one. My company uses a bug tracking software (say, XYZ). My widget needs to be able to access and display data from XYZ regarding bugs, given a bug ID, or other search criteria. I currently have the APPGUID and server name for XYZ. Please help. I do not know where to start.
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/20475027
tagged with: windows
tagged with: http://stackoverflow.com/tag/html
tagged with: widget
score: 0
tagged with: windows-desktop-gadgets

http://stackoverflow.com/q/28018958
has comment: http://stackoverflow.com/comment/44424527
has title: Get a list of objects that have the same value for a specific property
has comment: http://stackoverflow.com/comment/44424502
favorite count: 0
has answer: http://stackoverflow.com/a/28019022
has answer: http://stackoverflow.com/a/28018986
answer count: 5
accepted answer: http://stackoverflow.com/a/28019089
has answer: http://stackoverflow.com/a/28018989
has comment: http://stackoverflow.com/comment/44424595
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28019003
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/28019089
type: Question
has body: I have a bunch of objects that have a .type property assigned them. All the objects are in an array like this: var arr = []; arr[0] = {'type':1,'x':56,'y':2}; arr[1] = {'type':2,'x':1, 'y':23}; arr[2] = {'type':1,'x':23,'y':63}; What i would like to do is return a list of all the objects that have for example type == 1. Is there any built in way to do or will I have to iterate each one individually and push those that match to a new array?
has comment: http://stackoverflow.com/comment/44424695
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28018986
upvote count: 1

http://stackoverflow.com/a/27997868
accepted answer of: http://stackoverflow.com/q/27995743
answers question: http://stackoverflow.com/q/27995743
type: Answer
has body: be more specific in current state your question does not make much sense it implies you want to control some object (player) by arrow keystrokes I assume 2D for now so what you need is: object position and orientation data struct plr_object { double x,y; // position in pixels or meters or whatever double a; // angle in radians } plr; this must be persistent so global or static variable ... or locally global variable or reference to it on keyboard event (or in some timer) double da=5.0*M_PI/180.0; // rotation speed double dl=5.0; // movement speed bool _redraw=false; // handle rotation if (pressed('left' )) { plr.a+=da; redraw=true; } if (pressed('right')) { plr.a-=da; redraw=true; } // handle movement if (pressed('up' )) { plr.x+=dl*cos(plr.a); plr.y+=dl*sin(plr.a); redraw=true; } if (pressed('down' )) { plr.x-=dl*cos(plr.a); plr.y-=dl*sin(plr.a); redraw=true; } if (_redraw) redraw the scene ... redraw in redraw you have to handle angle of the object so it is draw rotated use transform matrix for that or if your object is just some easy GDI like circle+line then just draw the direction significant part rotated.
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/28018460
type: Answer
score: 2
downvote count: 0
has body: You can initialize the property prop1 in your object as an empty array [] and then add the proper objects to it using push method. The code: var a = 1; var b = ["a","b"] var b1 = ["c","d"] var c = {} c.prop = a; c.prop1 = []; // initialization for (var index = 0 ; index &lt; b.length; index++){ c.prop1.push(b[index] + b1[index]); // pushing computed values }
answers question: http://stackoverflow.com/q/28018378
upvote count: 2
accepted answer of: http://stackoverflow.com/q/28018378
has comment: http://stackoverflow.com/comment/44427050
type: AcceptedAnswer

http://stackoverflow.com/q/27986755
tagged with: forms
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has title: javascript cannot propertly display document.forms element
score: 1
favorite count: 0
has body: My issue is the following - my browser does not display the myForm1 function properly. What happens is that the "namedItem" just appears quickly on the screen when clicking the try button and then disappears It does this only with the form element. The one below does exactly what is required from it. Here is my code: Tenancy: Try it Simple text Show
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/27986789
upvote count: 1

http://stackoverflow.com/comment/44483420
type: Comment
has text: I believe you don't undestook my question. I know get the range and selection. I want to know there is a way to synchronize that events!
comment on: http://stackoverflow.com/a/28050463
type: AnswerComment
score: 0

http://stackoverflow.com/a/28066649
has comment: http://stackoverflow.com/comment/44513724
has comment: http://stackoverflow.com/comment/44513523
has comment: http://stackoverflow.com/comment/44513395
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28066475
has body: You can access all files from assets folder as same as you would access files on a server - by relative paths. To load /assets/www/images/logo.jpg from file /assets/www/index.html: &lt;img src="images/logo.jpg" /&gt; Update: in jQuery: $('#myLogo').attr('src', 'image/logo.jpg');

http://stackoverflow.com/comment/44465693
type: QuestionComment
has text: You have to include the JavaScript on that page. You can not make one page execute JavaScript on another page, unless you we are talking about `iframes`.
score: 0
comment on: http://stackoverflow.com/q/28041047
type: Comment

http://stackoverflow.com/comment/44503179
score: 0
type: Comment
type: QuestionComment
has text: You might want to look into the <core-scaffold> item.
comment on: http://stackoverflow.com/q/28051580

http://stackoverflow.com/comment/44341051
comment on: http://stackoverflow.com/q/27974066
score: 0
type: Comment
has text: I think the `openDatabase` method works transparently, so it'll create a database if it doesn't exist and return it, or return an already existing one. Why does it matter in your case?
type: QuestionComment

http://stackoverflow.com/comment/44512597
type: QuestionComment
type: Comment
has text: Synchronous calls are not possible in the $http. The backend sets async by default. Synchronous calls cause blocking and blocking is bad!
score: 0
comment on: http://stackoverflow.com/q/28066343

http://stackoverflow.com/q/28082556
has answer: http://stackoverflow.com/a/28082702
tagged with: css
has comment: http://stackoverflow.com/comment/44544146
has comment: http://stackoverflow.com/comment/44575005
has comment: http://stackoverflow.com/comment/44576736
has answer: http://stackoverflow.com/a/28084022
has comment: http://stackoverflow.com/comment/44574852
has comment: http://stackoverflow.com/comment/44543522
has comment: http://stackoverflow.com/comment/44544727
type: Question
has comment: http://stackoverflow.com/comment/44571814
has comment: http://stackoverflow.com/comment/44543262
tagged with: javascript
has comment: http://stackoverflow.com/comment/44549477
has title: Is there a getElementById for style rules?
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/44574810
upvote count: 1
downvote count: 1
has body: Short question is all in the title.... TL;DR below. This question and the comments talk about using the id on a style sheet containing a single rule as a clever technique for isolating styles that must change significantly, and works for changing both the selector and the style content. A case that seems like it would be more frequent to me would be just to change the content, and that can be done by referencing the cssRule.style.properties ... if the correct cssRule can be located. But individual style rules don't seem to have provision for an id, or a way to locate them among the (sometimes) hundreds of style rules in a style sheet (or collection of style sheets). this link talks about how to locate a rule by the selector text, but it seems one must match the selector text exactly, and that the implementation only finds the first rule with that selector text, although there could be more than one. The last one might be more useful to find, if the desire is to change a visible style. Obviously the code could be tweaked to return the last, or to return an array... but sometimes the selector text gets atrociously long, too. Having a way to flag the particular rule that wants to be changed dynamically would seem to be useful. If the stylesheet is manipulated, keeping the array index would be a brittle, bug-susceptible way of finding it.
has comment: http://stackoverflow.com/comment/44545206
favorite count: 0
has comment: http://stackoverflow.com/comment/44572465
linked to: http://stackoverflow.com/q/23572766
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44544808

http://stackoverflow.com/a/27970827
answers question: http://stackoverflow.com/q/27970720
has comment: http://stackoverflow.com/comment/44335858
type: Answer
has comment: http://stackoverflow.com/comment/44334330
upvote count: 3
has comment: http://stackoverflow.com/comment/44457875
has body: You are returning $q promise from the factory. It does not have the methods success and error they are special functions added by $http in the returned httpPromise (which is just an extension of QPromise). You can either change your factory to return httpPromise by removing the then chaining: return $http({ method: 'get', url: 'http://services.tvrage.com/feeds/fullschedule.php', params: { country: 'US', key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' } }); Or chain it in your controller with standard q promise functions then/ catch. controllers.controller('MainCtrl', ['$scope','$http','tvRage', function ($scope, $http, tvRage) { tvRage.getSchedule().then(function(data){ var parser = new X2JS(); var x2js = parser.xml_str2json(data); $scope.request = x2js; }).catch(function(){ alert('nouuu'); }); } ]); But with the specific error you are getting it looks like possibly in your original code your DI list does not match argument list. Re-verify by logging what is tvRage and other arguments injected in the controller. This could easily happen because of argument mismatch in the original code. Ex:- .controller('MainCtrl', ['$scope','tvRage', function ($scope, $http, tvRage){ //Now tvRage will be undefined and $http will be tvRage. Working Demo angular.module('app', []).controller('ctrl', ['$scope', '$http', 'tvRage', function($scope, $http, tvRage) { tvRage.getSchedule().success(function(data) { console.log(data) }).error(function() { alert('nouuu'); }); } ]).factory('tvRage', function($http) { var tvRage = {}; tvRage.getSchedule = function() { return $http({ method: 'get', url: 'http://services.tvrage.com/feeds/fullschedule.php', params: { country: 'US', key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' } }); }; return tvRage; });; &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"&gt;&lt;/script&gt; &lt;div ng-app="app" ng-controller="ctrl"&gt; &lt;/div&gt;
score: 3
has comment: http://stackoverflow.com/comment/44335663
has comment: http://stackoverflow.com/comment/44335687
has comment: http://stackoverflow.com/comment/44334372
downvote count: 0

http://stackoverflow.com/a/27992647
has comment: http://stackoverflow.com/comment/44385901
has comment: http://stackoverflow.com/comment/44396421
type: Answer
has comment: http://stackoverflow.com/comment/44380251
answers question: http://stackoverflow.com/q/27991293
accepted answer of: http://stackoverflow.com/q/27991293
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44404383
score: 0
has body: Please take a look here or take a look at the code below. First, I calculate the heigh of one element and get his position. After that I compare the part to the current position. So far, no flickering on Safari or Chrome, I hope this will fix it. It seams that your solution raised multiple events, if you look at the console.log(y); you will notice a lot of double values for part 2, 3, 4 and 5. $(window).scroll(function() { var y = $(this).scrollTop(); var sectionHeigth = $('section').height(); var part = Math.round((y / sectionHeigth)); $('.link').each(function(event) { var position = $($(this).attr('href')).offset().top; if ((part * sectionHeigth) != position) { $(this).removeClass('active'); } else { $(this).addClass('active'); } }); }); Here is the update to your comment. I'll check if the current position is between the start and start + height position. That's all. $(window).scroll(function() { var y = $(this).scrollTop(); $('.link').each(function(event) { var position = $($(this).attr('href')).offset().top; var a = $($(this).attr('href')).height(); if (y &gt;= position &amp;&amp; y &lt;= position + a) { $(this).addClass('active'); } else { $(this).removeClass('active'); } }); });

http://stackoverflow.com/q/27969484
has comment: http://stackoverflow.com/comment/44379625
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44465513
has body: Firstly sorry for my poor English. This Christmas I received a Thymio. For the fun of it, I have linked my robot with a Raspberry Pi. From the Thymio documentation, we can communicate to this robot with DBUS. I want use Node.js to live remote my Thymio, so I have found node-dbus library and this script in Python to help me. Actually I can get Thymio's variables values with: aseba.GetVariable("thymio-II", "prox.ground.ambiant",function(error,data){}); But I can not set variable for move my robot. In Python this script works: network.SetVariable("thymio-II", "motor.left.target", [300]) But in Node.js: http://jsfiddle.net/kwaky/pxkL57gv/ &lt;== (my full script) aseba.SetVariable("thymio-II", "motor.left.target",[300]); Returns: events.js:72 throw er; // Unhandled 'error' event ^ Error: write EPIPE at errnoException (net.js:905:11) at Object.afterWrite (net.js:721:19) And this: aseba.SetVariable("thymio-II", "motor.left.target",300); Does not work and doesn't return an error. If you have ideas?
tagged with: node.js
score: 3
answer count: 0
has comment: http://stackoverflow.com/comment/44384548
has title: setVariable in node-dbus
has comment: http://stackoverflow.com/comment/44350770
type: Question
upvote count: 6
tagged with: javascript
tagged with: dbus
has comment: http://stackoverflow.com/comment/44388013
downvote count: 3
has comment: http://stackoverflow.com/comment/44444879
has comment: http://stackoverflow.com/comment/44461915
has comment: http://stackoverflow.com/comment/44388057
has comment: http://stackoverflow.com/comment/44338902
favorite count: 0

http://stackoverflow.com/comment/44465754
comment on: http://stackoverflow.com/q/28041056
has text: I seriously doubt such a "simple" thing would not be cross-browser... Here's a tip : 99% of the time, the issue is not jQuery but the way you use it, always try to figure out what you did wrong instead of blaming jQuery, you'll end up sparing a lot of time.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/44628424
type: QuestionComment
comment on: http://stackoverflow.com/q/28058480
type: Comment
has text: I beg your pardon, I edited the mistake :)
score: 0

http://stackoverflow.com/q/27964661
has comment: http://stackoverflow.com/comment/44346923
has answer: http://stackoverflow.com/a/28398219
favorite count: 0
has answer: http://stackoverflow.com/a/27964662
has body: When I access my web application in Chrome, it creates a Web SQL Database with the following command: window.openDatabase('dbName', '1.0', 'database', -1); I can immediately see the database listed in Chrome Development Tools -> Resources -> Web SQL and after tables are created and filled with data it all shows properly. But when I reload application or enter it at a different tab, the database isn't listed in Web SQL list. Why? Per standard the database must persist among tabs and sessions - http://www.w3.org/TR/webdatabase/ When I try it at a different site, like http://www.html5rocks.com/en/tutorials/webdatabase/todo/, all works properly I have found where it should be stored on disk - @C:\Users\\AppData\Local\Google\Chrome\User Data\Default\databases@ in Windows 7. The file is there.
has comment: http://stackoverflow.com/comment/44322899
type: AnsweredQuestion
score: 1
upvote count: 1
tagged with: google-chrome
possible better answer: http://stackoverflow.com/a/28398219
type: Question
has title: Web SQL database in Chrome isn't preserved among tabs and sessions
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27964662
answer count: 2
tagged with: web-sql
downvote count: 0

http://stackoverflow.com/a/28080322
has body: Why not just: Session.set('someBoolean', !Session.get('someBoolean'));
accepted answer of: http://stackoverflow.com/q/28080300
answers question: http://stackoverflow.com/q/28080300
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/comment/44559565
has text: Edited your update in the question which included the code based on my suggestion.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28091170
type: AnswerComment

http://stackoverflow.com/a/28131393
has body: It seems I was missing a functionality of my orm, which was sequelize. They allow me to retrieve the association as long as I include the model on my query. The modifications needed to be done were the following: Controller compaintsRouter.get('/', function(req, res) { var model = data.complaint.findAndCount({ include: [data.user, { model: data.comment, include: [data.user] }, { model: data.user, as: 'follower' }], limit: 15, offset: 15 * (req.query.page || 0) }).then(function(result){ res.render('complaints/list', {model: result.rows}); }); }); Method that uses the data: votesUp: function() { var aux = this.follower .selectMany(function(f){return f.UserComplaint}) .map(function(v){ return ((v.liked === true) ? 1: 0); }); aux.push(0); return aux.reduce(function(acc, v){ return acc+v; }); }
type: Answer
answers question: http://stackoverflow.com/q/28119740
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/28119740
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/44355815
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27982199
type: QuestionComment
has text: it could be that your browser don't have the permission to read the file?

http://stackoverflow.com/a/28018222
has body: First of all you are going off the track , you should use knokcout for event binding as you have knockout so why still using Jquery events . After that you can make a boolean observable for each button and add that observable with disable binding . For disable binding you can have a look at this Disable/Enable Binding . Think this will help you
has comment: http://stackoverflow.com/comment/44423509
type: Answer
answers question: http://stackoverflow.com/q/28018151
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44423708
upvote count: 1
has comment: http://stackoverflow.com/comment/44423468

http://stackoverflow.com/a/28079892
has body: HTML &lt;!-- main content --&gt; &lt;div id="frameContainer"&gt; &lt;content select=".testpage" fit&gt;&lt;/content&gt; &lt;/div&gt;&lt;!-- End main content --&gt; JS ready: function() { window.addEventListener('hashchange', this.parseLocationHash.bind(this)); }, domReady: function() { this.async(function() { this.parseLocationHash(); }, null, 300); }, parseLocationHash: function() { var route = window.location.hash.slice(1); for (var i = 0, item; item = this.$.menu.items[i]; i++) { if (item.getAttribute('tag') === route) { this.$.menu.selected = i; return; } } this.$.menu.selected = this.$.menu.selected || 0; }, menuSelect: function(e, detail) { if (detail.isSelected) { this.item = detail.item; if (this.item.children.length) { this.item.selected = 0; } this.item.tag = this.item.getAttribute('tag'); var url = this.item.getAttribute('url'); window.location.hash = this.item.tag; if (this.narrow) { this.$.drawerPanel.closeDrawer(); } else { this.animateCard(); } } }, animateCard: function() { this.$.card.classList.remove('move-up'); this.$.card.style.display = 'none'; this.async(function() { this.$.card.style.display = 'block'; this.moveCard(this.$.mainHeaderPanel.offsetHeight); this.async(function() { this.$.card.classList.add('move-up'); this.moveCard(null); }, null, 300); }); }, moveCard: function(y) { var s = this.$.card.style; s.webkitTransform = s.transform = y ? 'translate3d(0, ' + y + 'px,0)' : ''; }, cardTransitionDone: function() { if (this.$.card.classList.contains('move-up')) { this.$.card.classList.remove('move-up'); } }, togglePanel: function() { this.$.drawerPanel.togglePanel(); }, index.html &lt;custom-element class="testpage"&gt;&lt;/custom-element&gt; &lt;div class="testpage" style="margin: 20px;"&gt; Augue duis dolore te feugait nulla, facilisi nam liber tempor cum soluta nobis eleifend option. Legere me lius quod ii legunt saepius claritas est. Exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex. Humanitatis per seacula quarta decima et q…
has comment: http://stackoverflow.com/comment/47651266
has comment: http://stackoverflow.com/comment/47633127
answers question: http://stackoverflow.com/q/28078298
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28078298
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/53109985

http://stackoverflow.com/q/28058732
score: 2
answer count: 0
upvote count: 2
tagged with: d3.js
type: UnansweredQuestion
has title: Linking nodes in a D3.js Force Layout from multiple different JSON arrays
tagged with: force-layout
has body: I'm working with a nested JSON feed to create a Force Directed graph with D3.js. My current code looks for an child arrays named 'children'. And displays all items in those arrays as nodes. This has worked for a while and I've been happy. But I now need to add a few more child arrays per item. So my JSON structure would be similar to the following: { "structure":[ { "name":"Grandfather", "children":[ { "name":"Father 1", "son":[ { "name":"Son" } ], "daughter":[ { "name":"Daughter" } ] }, { "name":"Father 2", "son":[ { "name":"Son" } ], "daughter":[ { "name":"Daughter" } ] } ] } ] } One of the things I'd like to achieve by doing this is to give nodes from different arrays separate styling. And this is an image of the type of graph I'm looking to create. Here is the D3.js code that I currently use. This works when there is only one child array named children. var w = 1000, h = 800, radius = 10, node, link, root, title; var jsonURL = 'assets/scripts/nodes.json' d3.json(jsonURL, function(json) { root = json.words[0]; //set root node root.fixed = true; root.x = w / 2; root.y = h / 2 - 80; update(); }); var force = d3.layout.force() .on("tick", tick) .charge(function(d) { return -500; }) .linkDistance(function(d) { return d.target._children ? 200 : 120; }) .size([w, h - 160]); var svg = d3.select(".graph").append("svg") .attr("width", w) .attr("height", h); function update() { var nodes = flatten(root), links = d3.layout.tree().links(nodes); // Restart the force layout. force .nodes(nodes) .links(links) .start(); // Update the links… link = svg.selectAll("line.link") .data(links, function(d) { return d.target.id; }); // Enter any new links. link.enter().insert("svg:line", ".node") .attr("class", "link") .attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { return d.target.x; }) .attr("y2", function(d) { return d.target.y; }); // Exit any old links. link.exit().remove(); // Update the nodes… node = svg.sel…
tagged with: http://stackoverflow.com/tag/json
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/65211157
has comment: http://stackoverflow.com/comment/133207914
downvote count: 0
has body: I found that for my circumstance, I was able to use the Range header to request 0 bytes and then inspect the response headers which held the file size: var params = { method: "GET", headers: { Range: "bytes=0-0", }, }; var response = UrlFetchApp.fetch(fileUrl,params); var headers = response.getHeaders(); var fileSizeString = headers['Content-Range'] var fileSize = +headers['Content-Range'].split("/")[1]; The response headers had Content-Range=bytes 0-0/139046553 as a value that I could then use to convert to an integer (139046553) number of bytes.
type: Answer
answers question: http://stackoverflow.com/q/27977737
score: 3
upvote count: 3

http://stackoverflow.com/q/28118028
has answer: http://stackoverflow.com/a/28118310
has answer: http://stackoverflow.com/a/28118297
accepted answer: http://stackoverflow.com/a/28118297
has title: Passing Parameters from HTML Button to JavaScript Function
type: Question
has comment: http://stackoverflow.com/comment/44610529
possible better answer: http://stackoverflow.com/a/28118310
tagged with: javascript
score: 0
answer count: 2
has body: I have some short code for a button in html: First Second Third function showSelectsVar (x) { x=document.getElementById(x).value; var insertTextVar = document.createTextNode(x); var child = document.getElementById(x); child.parentNode.insertBefore(insertTextVar,child); } this is the Jsfidde i think the problem is in the js, but i got stuck I want to pass an id of a select menu to a js function, the function then inserts the current value of the selectmenu into the page dynamically. Is there a resource that help understand when to use single, double and no quotes when passing parameters? Thanks
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/242813

http://stackoverflow.com/q/28076425
score: 2
downvote count: 0
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/44532003
tagged with: node.js
upvote count: 2
tagged with: socket.io
answer count: 1
has title: Socket.io emit to everyone in the room except the sender
has answer: http://stackoverflow.com/a/28076533
linked to: http://stackoverflow.com/q/10058226
tagged with: javascript
type: UnansweredQuestion
has body: So I have a chat room, and I want to emit a message to everyone except me (b/c I'm going to update the chat window via JS on form submit with my message), I tried like this: io.sockets.in(socket.room) .broadcast .emit('new message', { 'username' : socket.nickname, 'message' : data, 'color' : socket.color }); It doesn't work. Do you guys know how can I do this?
duplicate of: http://stackoverflow.com/q/10058226

http://stackoverflow.com/comment/44523724
type: Comment
score: 1
comment on: http://stackoverflow.com/q/28072082
has text: @naveen - I think you missed my point. Just asking "Any ideas?" is not a question [that can be answered]. I am asking the questioner to be specific., not attacking their grammar (which I dont care about).
type: QuestionComment

http://stackoverflow.com/a/28023661
answers question: http://stackoverflow.com/q/28023446
score: 2
type: AcceptedAnswer
downvote count: 0
has body: Could look like so var target = document.getElementById( 'day' ); [].forEach.call(document.querySelectorAll( '#night &gt; li' ), function( li ) { day.appendChild( li ); });
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/44433400
accepted answer of: http://stackoverflow.com/q/28023446

http://stackoverflow.com/comment/44491695
type: Comment
comment on: http://stackoverflow.com/a/28054095
type: AnswerComment
score: 0
has text: Ah - yes, on the inside of that function, you would need to dynamically get the correct ID selector. I missed where that was applying.

http://stackoverflow.com/comment/44599106
comment on: http://stackoverflow.com/q/28112707
has text: You'll have to use an `each`, or loop of some variety. When you use `data` on a selector containing multiple elements only the first element will be read.
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44330968
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27968694
has text: http://www.demos.amp47ds.com this like is work restor down the browser window and click on the right buttons

http://stackoverflow.com/q/28002127
type: Question
has answer: http://stackoverflow.com/a/28002868
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44394174
has answer: http://stackoverflow.com/a/28002528
has title: Angular circular svg progress bar gradient stroke
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: angularjs
has body: I am trying to build an angular directive which will display circular progress of something. Here is the fiddle I want to have repetitive linear gradient gradient light dark lines in the stroke something like Some code from fiddle
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44393691
upvote count: 1
tagged with: css
score: 1

mysql
tags question: http://stackoverflow.com/q/28060188
tags question: http://stackoverflow.com/q/28118531
tags question: http://stackoverflow.com/q/27964153
tags question: http://stackoverflow.com/q/27977772
tags question: http://stackoverflow.com/q/28083395
tags question: http://stackoverflow.com/q/28059368
tags question: http://stackoverflow.com/q/28103075
tag name: mysql
tags question: http://stackoverflow.com/q/28047960
tags question: http://stackoverflow.com/q/28038346
tags question: http://stackoverflow.com/q/28082190
tags question: http://stackoverflow.com/q/28120784
tags question: http://stackoverflow.com/q/28031516
tags question: http://stackoverflow.com/q/28058480
tags question: http://stackoverflow.com/q/28009509
tags question: http://stackoverflow.com/q/28041680
tags question: http://stackoverflow.com/q/28005799
tags question: http://stackoverflow.com/q/28070118
tags question: http://stackoverflow.com/q/28098525
tags question: http://stackoverflow.com/q/27968195
tags question: http://stackoverflow.com/q/28051504
tags question: http://stackoverflow.com/q/28036708
type: Tag
tags question: http://stackoverflow.com/q/28082308
tags question: http://stackoverflow.com/q/27968607
tags question: http://stackoverflow.com/q/28085848
tags question: http://stackoverflow.com/q/28027248
tags question: http://stackoverflow.com/q/28008960
tags question: http://stackoverflow.com/q/27990920
tags question: http://stackoverflow.com/q/28068839
tags question: http://stackoverflow.com/q/27995226
tags question: http://stackoverflow.com/q/28072841
tags question: http://stackoverflow.com/q/28048276
tags question: http://stackoverflow.com/q/27989571
tags question: http://stackoverflow.com/q/27989054
tags question: http://stackoverflow.com/q/28037518
tags question: http://stackoverflow.com/q/28091557
tags question: http://stackoverflow.com/q/27980825
tags question: http://stackoverflow.com/q/28091777
tags question: http://stackoverflow.com/q/28027726
tags question: http://stackoverflow.com/q/28096367
tags question: http://stackoverflow.com/q/28044339
tags question: http://stackoverflow.com/q/28071858
tags question: http://stackoverflow.com/q/28070809

http://stackoverflow.com/a/28020652
answers question: http://stackoverflow.com/q/28020540
score: 0
type: AcceptedAnswer
type: Answer
has body: ^(?![0-9]+$)[a-zA-Z0-9]+$ Try this.This will make sure you have at least one digit through negative looaheadSee demo. https://regex101.com/r/tX2bH4/43 NODE EXPLANATION -------------------------------------------------------------------------------- ^ the beginning of the string -------------------------------------------------------------------------------- (?! look ahead to see if there is not: -------------------------------------------------------------------------------- [0-9]+ any character of: '0' to '9' (1 or more times (matching the most amount possible)) -------------------------------------------------------------------------------- $ before an optional \n, and the end of the string -------------------------------------------------------------------------------- ) end of look-ahead -------------------------------------------------------------------------------- [a-zA-Z0-9]+ any character of: 'a' to 'z', 'A' to 'Z', '0' to '9' (1 or more times (matching the most amount possible)) -------------------------------------------------------------------------------- $ before an optional \n, and the end of the string
accepted answer of: http://stackoverflow.com/q/28020540

http://stackoverflow.com/q/28037809
accepted answer: http://stackoverflow.com/a/28078684
has body: I do understand that filter is being used to display more specific results. But is there a way that I can use it to exclude a specific user or image instead? Or do instafeed.js have another option for me to do this? var feed = new Instafeed({ target: 'instafeed', get: 'tagged', tagName: 'hashtag', limit: '10', sortBy: 'most-recent', resolution: 'standard_resolution', clientId: 'xxxxx', template:'&lt;img class="item" src="{{image}}"&gt;', filter: function(image) { //filter to exclude specific user } }); Appreciate any feedbacks. Many thanks!
type: AnsweredQuestion
tagged with: javascript
tagged with: instagram
type: Question
possible better answer: http://stackoverflow.com/a/28585503
has answer: http://stackoverflow.com/a/28078684
has answer: http://stackoverflow.com/a/28621154
has answer: http://stackoverflow.com/a/28585503
score: 0
answer count: 3
tagged with: instafeedjs
has title: Instafeed.js - how to filter out or exclude specific image or user?

http://stackoverflow.com/q/28055063
has title: Save image as png and allow user to share image to social media
has comment: http://stackoverflow.com/comment/44492567
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44494482
has comment: http://stackoverflow.com/comment/44494145
has comment: http://stackoverflow.com/comment/44494603
answer count: 0
downvote count: 0
score: 1
has body: I want same the image once it is converted. I tried canvas.toDataURL("image/png"); but that did not work for me. I tried the code below and while it created an img, it didn't display the screenshot. I am a newbie using javascript. Can you help please. function showImage() { html2canvas($('#hpImplement'), { onrendered: function(canvas) { var elem = document.createElement("img"); elem.setAttribute("src", canvas); elem.setAttribute("alt", "Flower"); document.getElementById("hpShare").appendChild(elem); }, }); } I even tried: function showImage() { html2canvas($('#hpImplement'), { onrendered: function(canvas) { var theCanvas = canvas.toDataURL("image/png"); var elem = document.createElement("img"); elem.setAttribute("src", theCanvas); elem.setAttribute("alt", "Flower"); document.getElementById("hpShare").appendChild(elem); }, }); }
has comment: http://stackoverflow.com/comment/44493569
type: Question
tagged with: javascript
tagged with: html2canvas
tagged with: jquery
upvote count: 1
favorite count: 0

http://stackoverflow.com/q/28115187
type: AnsweredQuestion
has body: On Sunday, I made a working script to send form data into my database and email with Mandrill. Since Wednesday, my script doesn't work anymore. I'm trying to find the error but nothing fixed it. I think I have an error in my PHP script but I don't know where and what. Console log of my AJAX returns correct data but PHP doesn't do anything. It doesn't receive data. There is my HTML Envoyer JavaScript $(document).ready(function() { $('#formContact').submit(function(event) { var formData = { 'name' : $('#formName').val(), 'email' : $("#formEmail").val(), 'subject' : $("#formSubject").val(), 'message' : $("#formMessage").val() }; $.ajax({ url: "commons/test.php", type: "POST", data: formData, dataType: 'json', encode: true }) .done(function(data){ console.log(formData); console.log(data); if( ! data.success){ alert('Error'); }else{ alert('Success'); } }); event.preventDefault(); }); }); PHP <?php error_reporting(E_ALL); ini_set("display_errors", 1); include('../adm/dbconnect.php'); <- this work well $data = array(); if (!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['subject']) && !empty($_POST['message'])) { // var_dump($_POST['name']); // var_dump($_POST['email']); // var_dump($_POST['subject']); // var_dump($_POST['message']); $to = 'contact@sheguey.land'; $content = ''.$_POST['message'].''; $subject = 'Nouveau message de '.$_POST['email'].' - Sheguey Land'; $from = ''.$_POST['email'].''; $uri = 'https://mandrillapp.com/api/1.0/messages/send.json'; $api_key = 'my mandrill api key'; $content_text = strip_tags($content); $postString = '{ "key": "' . $api_key . '", "message": { "html": "' . $content . '", "text": "' . $content_text . '", "subject": "' . $subject . '", "from_email": "' . $from . '", "from_name": "' . $from . '", "to": [ { "email": "' . $to . '", "name": "' . $to . '" } ], "track_opens": true, "track_clicks": true, "auto_text": true, "url_strip_qs": true, "preserve_recipients": true }, "async": false }'; $ch = curl_init(); curl_setopt(…
has title: form Submit AJAX + PHP
has comment: http://stackoverflow.com/comment/44605275
tagged with: forms
has answer: http://stackoverflow.com/a/28116055
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
tagged with: ajax
has answer: http://stackoverflow.com/a/28117057
answer count: 3
has comment: http://stackoverflow.com/comment/44605396
possible better answer: http://stackoverflow.com/a/28116055
favorite count: 0
has comment: http://stackoverflow.com/comment/44605708
has answer: http://stackoverflow.com/a/28137666
tagged with: php
accepted answer: http://stackoverflow.com/a/28137666

http://stackoverflow.com/comment/44564910
type: Comment
has text: Nvm, I misunderstood, I was thinking that you wanted to move the mouse pointer.
comment on: http://stackoverflow.com/a/28094355
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44518061
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28068841
has text: debug and see the response
score: 0

http://stackoverflow.com/comment/44408969
has text: you can use `window.onresize`.
score: 0
comment on: http://stackoverflow.com/q/27998432
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28103510
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28137893
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/9576615
answer count: 1
has comment: http://stackoverflow.com/comment/44582224
tagged with: jquery
has title: Opening popup in new tab
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28137893
has comment: http://stackoverflow.com/comment/44591173
tagged with: popup
has body: So I recently implemented a chrome extension to grab images in an active tab and extract them to a popup for downloading. I would like to give users the option to view the popup window (including the extracted images) in a new Chrome tab. However, since the popup is created dynamically by appending children to the body of my popup.html, I'm not sure how to pass the HTML for my popup to the new chrome tab. I tried using chrome.tabs.create({url: chrome.extension.getURL('popup.html#window')}); as found at Open chrome extension in a new tab but this doesn't seem to be working. Any suggestions?
type: Question

http://stackoverflow.com/comment/44525375
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28072539
has text: not easily. I am not sure it is a coding issue. It is a knowledge issue (my lack of it). Simple question, what event fires when user selects text in a contentEditable div when contentEditable is set to false.
score: 0

http://stackoverflow.com/a/28056902
has comment: http://stackoverflow.com/comment/44519383
upvote count: 5
score: 4
has body: I may not have enough information, but here are some things to try: As obvious as this is, have you read through each case that will cause a timeout in the linked doc https://github.com/angular/protractor/blob/master/docs/faq.md ? One that has got me before is Protractor will never load if you have $timeout in use in your Angular app. Are you sure you're selecting the loginBtn correctly? You may want to Testing Out Protractor Interactively: https://github.com/angular/protractor/blob/master/docs/debugging.md. From protractor directory /node_modules/protractor: $ node ./bin/elementexplorer.js http://192.168.0.100/src/ If you're logging in and going to another page, instead of sleeping to wait for the next page to load, wait until it's changed: browser.driver.wait(function() { return browser.driver.getCurrentUrl().then(function(url) { return /logged-in-url/.test(url); }); });
has comment: http://stackoverflow.com/comment/44524786
has comment: http://stackoverflow.com/comment/44532313
type: Answer
answers question: http://stackoverflow.com/q/28056312
has comment: http://stackoverflow.com/comment/44532997
downvote count: 1

http://stackoverflow.com/q/28103831
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: meteor
has answer: http://stackoverflow.com/a/28104129
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: meteor-accounts
has body: I am trying to have my user automatically logged into their account after the sign up process. Since I am using the alanning:roles package, I need to create the user on the server in order to apply the roles. In my Meteor method, I have the following account code: createClient: function (user) { if (Meteor.isServer) { check(user, { firstName: String, lastName: String, email: String, phone: String }); var newUser = Accounts.createUser({ email: user.email, password: user.password, profile: { firstName: user.firstName, lastName: user.lastName, phone: user.phone, created: new Date() } }); Roles.addUsersToRoles(newUser, ['client']); return Meteor.users.findOne(newUser); } } Then, within the callback, I login the user: Meteor.loginWithPassword(newUser._id, newUser.profile.tempPassword, function (error) { Router.go('thenextpage'); }); When I do this, it takes me to the next page, but does not log the user in. Occasionally, I get an error in the browser console that says: error logging in with token: Error: You've been logged out by the server. Please log in again. [403] Any ideas on how to make this work?
has title: How can I log a user in automatically after creating their account on the server in Meteor?
type: Question
score: 2

http://stackoverflow.com/comment/44408602
type: QuestionComment
has text: I've edited the post with the JS code
type: Comment
comment on: http://stackoverflow.com/q/28010404
score: 0

http://stackoverflow.com/comment/44547197
type: QuestionComment
has text: ... ↑ However, the start-position links can then no longer be used, since the Youtube syntax is no longer applicable. I have been reading things on the net about `function(){something.currentTime=...;});`, but I have not been able to implement this. --- So my final question would be this: what if you have the audio or video file just stored locally, instead of on Youtube, how would you go about repositioning by hyperlinks then? --- Many thanks in advance.
comment on: http://stackoverflow.com/q/28013991
score: 0
type: Comment

http://stackoverflow.com/comment/44406791
type: Comment
type: QuestionComment
has text: Like this ? http://jsfiddle.net/VPzxG/
score: 0
comment on: http://stackoverflow.com/q/28009440

http://stackoverflow.com/comment/44430323
score: 0
type: Comment
has text: ng-click="inbox.showView({'in': (category | lowercase) })" no event fired
type: AnswerComment
comment on: http://stackoverflow.com/a/28022102

http://stackoverflow.com/comment/44614692
has text: {{ mCtrl.dictList[$index].value }} will get the value.... let me see if I can figure it out how to use function....thanks
comment on: http://stackoverflow.com/a/28120009
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44423725
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28017777
type: Comment
has text: those checkboxes are disabled when will they get enabled? also can you explain the functionality you are looking for

http://stackoverflow.com/comment/44512372
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28062819
has text: @roger_that, Your code works fine here. I have tested with dataTables 1.10.4. You are probably not running your code from within a server (like `http://localhost`) `file://` will fail. So it is not the code, but how you run it.

http://stackoverflow.com/a/28061487
downvote count: 1
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/28060534
has body: Here is the code to get anchor tag using class name and auto click. Code: //on load of the page auto click the anchor tag $(document).ready(function(){ window.location = $('.download_now').attr('href'); }); Hope this helps.
type: Answer

http://stackoverflow.com/comment/44359715
score: 0
type: QuestionComment
has text: Show us your code, without code its hard to assume everything. And how can you click both video at same time `when i click on both video` explain this.
type: Comment
comment on: http://stackoverflow.com/q/27984325

http://stackoverflow.com/a/27968400
has body: You can just do what you intend to using Array.filter and Array.length var longWords = words.filter(function(str) { return str.length &gt; i; }); if (longWords.length == 0) { console.log("You have no words longer than the number " + i + "."); }
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27968323

http://stackoverflow.com/q/27989025
type: Question
has comment: http://stackoverflow.com/comment/44369598
tagged with: internet-explorer-7
tagged with: javascript
has comment: http://stackoverflow.com/comment/44370148
has comment: http://stackoverflow.com/comment/44370552
linked to: http://stackoverflow.com/q/361635
tagged with: modern.ie
has comment: http://stackoverflow.com/comment/44369765
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44369928
has title: How do a I debug IE7 script errors with no line or character number?
tagged with: internet-explorer
answer count: 0
score: 0
has body: Before you ask: the only reason I'm using IE7 in 2015 is to test that 'upgrade your browser' messages appear for IE7/IE8/IE9. IE7 says I have a script error. It has: A line number of 0 A character of 0 No other messages How can I start to debug this? Is there something I can do to get a real line number / character number or a real error message?

http://stackoverflow.com/q/28040959
has title: Theoretical JavaScript events runtime
type: Question
has answer: http://stackoverflow.com/a/28041165
answer count: 1
tagged with: javascript
score: 0
has body: I have a theoretical core JavaScript question. Is it guaranteed that the following example will give the following result in every case? Test fired Done var body = $('body') .on('test', function() { console.log('Test fired'); }); body.trigger('test'); console.log('Done');
has comment: http://stackoverflow.com/comment/44465596
accepted answer: http://stackoverflow.com/a/28041165
has comment: http://stackoverflow.com/comment/44465625
has comment: http://stackoverflow.com/comment/44465592
type: AnsweredQuestion

http://stackoverflow.com/a/28116836
upvote count: 2
has comment: http://stackoverflow.com/comment/44608155
has body: You are isolating the scope when you write: scope: { text: '=' }, Here's a slightly modified version of your code, this time, lets you call directive method. Mostly I just got rid of 'scope' in directive, and changed it to using $scope in the controller, rather than this, and Alias pattern.. WARNING: This might not reflect the correct behavior, with regard's to which variables get changed, but answers your question by showing how you can access directive's method from controller. This is usually not a good design idea.. http://codepen.io/anon/pen/azwJBm angular.module('myApp', []). controller('MyCtrl', function($scope){ var that = this; $scope.text = 'Controller text'; $scope.dirText = 'Directive text'; $scope.click = function(){ $scope.changeText(); } }). directive('myDir', function(){ return { restrict: 'E', /* scope: { text: '=' },*/ link: function(scope, element, attrs){ scope.changeText = function(){ scope.text = 'New directive text'; }; }, template: ' {{text}} ' }; }); {{text}} Change Directive Text
score: 2
has comment: http://stackoverflow.com/comment/52580088
has comment: http://stackoverflow.com/comment/44607931
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/28116680

http://stackoverflow.com/a/27984920
downvote count: 0
has body: The problem here is Isolated Worlds. Content scripts have their own JS context. You define demo in the content script context. However, when adding a DOM node like that, the onclick attribute will refer to the page context, which does not have the demo function. You have many options here. The simplest is to attach a listener to the node in the content script context: var node = $('&lt;input type="button" value="Press me"/&gt;').click(demo); $("body").prepend(node); Another way is to define demo() in the page context. To do that, you need to inject the code to the page context via a &lt;script&gt; tag. var script = document.createElement('script'); script.textContent = demo.toString(); (document.head||document.documentElement).appendChild(script); script.parentNode.removeChild(script); Do note that this code won't have access to content script context and Chrome API. However, it may be useful, as it will have access to page's own JavaScript. If you need a mix of two (access to both page and content script), you'll need to make the two contexts communicate.
has comment: http://stackoverflow.com/comment/44360975
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27984542
type: Answer
score: 6
accepted answer of: http://stackoverflow.com/q/27984542
upvote count: 6
has comment: http://stackoverflow.com/comment/44361593
has comment: http://stackoverflow.com/comment/44361612

http://stackoverflow.com/comment/44395959
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28003098
has text: I thought you want to make independent styles for levels. If you want to make it shifts a little with every level then you can make it with css like this: http://jsfiddle.net/hphvpxuo/2/
score: 0

http://stackoverflow.com/q/27975841
has comment: http://stackoverflow.com/comment/44344177
answer count: 3
has title: Run javascript function and stop either after 5 seconds or condition is met?
has answer: http://stackoverflow.com/a/27975907
tagged with: timer
type: UnansweredQuestion
score: 0
tagged with: loops
has answer: http://stackoverflow.com/a/74723285
type: Question
has body: I need to write in a pure JavaScript function which will execute only for 5 seconds and will stop if either one of the following conditions (whichever comes first) 5 seconds has elapsed user inputted a field I could only do condition 2 but can't figure out how to break the loop after 5 seconds: function beginScanningForItemVer2(){ var userInput= false; var element; while (!userInput){ element = document.getElementById("input").value; if (element != null){ userInput= true; } } } EDIT: Thanks guys for helping me. Please keep helping me... It seems I cannot use a while loop for detecting user input because my CPU usage goes up really fast while on the loop. Is there any way to accomplish both of these? Please help me
has answer: http://stackoverflow.com/a/27975975
has comment: http://stackoverflow.com/comment/44344541
tagged with: javascript

http://stackoverflow.com/q/28117141
has answer: http://stackoverflow.com/a/28117453
has comment: http://stackoverflow.com/comment/44608578
has comment: http://stackoverflow.com/comment/44608936
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44608509
has title: Two problems with jquery script: z-index and setTimeout
has answer: http://stackoverflow.com/a/28117466
tagged with: css
accepted answer: http://stackoverflow.com/a/28117453
answer count: 4
type: AnsweredQuestion
score: 0
type: Question
has body: have a side menu on the left side of the website. I want the submenu to slide open to the right with a neat animation. I have made the script: jQuery(document).ready(function($){ $(".main-navigation ul li").mouseenter(function() { if ($(this).children().length &gt; 0) { $(this).children("ul").css ({ "display" : "block", }).animate({ left: '250px', opacity: 1, }, 500) }}) .mouseleave(function() { setTimeout(function() { $(this).children("ul").css({ "display" : "none", "left" : "0px", "opacity": 0, }) }, 1000); }); }); Sliding works just fine. The menu shows up nicely. There's two problems though. One is, that the menu z-index doesn't work. The submenu's ul has a negative index set in css but when it slides it goes OVER the main ul. I want it to go UNDER the menu so it doesn't show. Second one is, the SetTimeout function doesn't seem to work. Once the mouse leaves the area the ul just stays there forever. Without the Settimeout function it disappears just nicely (instantly though, I want it to stay there awhile). I have made a jsfiddle example http://jsfiddle.net/r8vx07ae/4/
possible better answer: http://stackoverflow.com/a/28117445
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28117603
has answer: http://stackoverflow.com/a/28117445
has comment: http://stackoverflow.com/comment/44608703

http://stackoverflow.com/a/28006739
has comment: http://stackoverflow.com/comment/44401820
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44445337
type: Answer
has body: After spending half of my day finally found solution.The problem was 'name' attribute for button.Bootstrap validation having problem to understand form submitted or not! When I use following way doesn't work! Show Report With php code if (isset($_POST['submit'])) Solution! Show Report With php code ($_SERVER['REQUEST_METHOD'] == 'POST')
score: 2
accepted answer of: http://stackoverflow.com/q/28001859
answers question: http://stackoverflow.com/q/28001859

http://stackoverflow.com/a/28073000
upvote count: 3
score: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28067507
answers question: http://stackoverflow.com/q/28067507
type: Answer
has body: The difference is that browserify doesn't natively read and emit the vinyl files that the gulp pipeline deals with. gulp-browserify was an adapter for that, and I believe it did some extra things related to error handling. If possible I recommend that for the time being you avoid using gulp-browserify. In gulp 4 there may be a better way to integrate browserify with gulp. For now, see if this works for you: var vss = require('vinyl-source-stream'); gulp.task('whatever', function () { var b = browserify(entry, b_opts) .transform(some_xform); return b.bundle() .pipe(vss('bundle.js')) // ... gulp stuff .pipe(gulp.dest(dest)); }); This will generally require you to do per-file manipulations with browserify transforms and then only do bundle-level manipulation in the gulp pipeline. Further reading: gulpjs/gulp#369

http://stackoverflow.com/comment/44613544
comment on: http://stackoverflow.com/a/28119506
score: 0
type: AnswerComment
has text: I think that would be context erasing. I mean the function called "calculator". That's for me: I give some parameters in and get one out. But you're right when a OP wants that, it won't go.
type: Comment

http://stackoverflow.com/a/28107759
upvote count: 1
answers question: http://stackoverflow.com/q/28107728
score: 1
downvote count: 0
has body: onchange="showDropDown(capability_4_1_b,this.value)" You didn't quote capability_4_1_b, so it's not working. onchange="showDropDown('capability_4_1_b',this.value)"
type: Answer

http://stackoverflow.com/q/28003994
accepted answer: http://stackoverflow.com/a/28004218
answer count: 4
has comment: http://stackoverflow.com/comment/44396713
type: AnsweredQuestion
has title: Load attributes form json to javascript array
type: Question
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/28004232
has answer: http://stackoverflow.com/a/28004218
score: 0
has comment: http://stackoverflow.com/comment/44396989
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/28004135
has body: I have a data in json file those look like this: {"NAME": "name1", "value1":5, "value2":4, "value3":9} {"NAME": "name2", "value1":3, "value2":8, "value3":2} {"NAME": "name3", "value1":5, "value2":8, "value3":2} I like to load this data into 3 javascript arrays and show it on webiste in this way: table1: NAME value1 name1 5 name2 3 name3 5 table2: NAME value2 name1 4 name2 8 name3 8 How is the best way to do it in using js/jquery? I suppose is a easy thing but I'm beginner in js/jquery and I still have a problems with basic things. Thanks in advance
has answer: http://stackoverflow.com/a/28004135
has answer: http://stackoverflow.com/a/28004229
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44352466
has text: Thank you! Creating input DOM is inside a loop and it seems that when I code nameInput.onchange = function(){ editAddressHidden(nameInput.id) }; it returns the last namInput.id found in the table.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27980413

http://stackoverflow.com/comment/44342489
score: 0
comment on: http://stackoverflow.com/a/27973885
type: Comment
has text: I can't comment on why it worked for some and not others, and I'm assuming they are referring to the link you provided. I was only working with the HTML/CSS you have included in your post and that's when I saw things were all wonky. Btw, the link you provided does work for me as well. But if the CSS you provided is being used then I would suggest reexamining it.
type: AnswerComment

http://stackoverflow.com/comment/44339798
has text: I want my input to have a dropdown menu of options for months: e.g. jan, feb, march, etc. But I'm looking at javascript/jquery now because I can't find anything using CSS
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27971934

http://stackoverflow.com/comment/44460776
type: QuestionComment
has text: Please post your CSS. Most likely the problem lies there.
comment on: http://stackoverflow.com/q/28038329
score: 0
type: Comment

http://stackoverflow.com/comment/44387009
type: Comment
comment on: http://stackoverflow.com/q/27998667
has text: @ArtjomB. there is nothing in separate places. every things are gathered in same place but i wrote function onSubmit() after second part of code that i mentioned above. Should i declare onSubmit somehow first?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44478870
type: AnswerComment
score: 0
type: Comment
has text: how it looks... add campaing [link]http://gyazo.com/861ca4fcf983594b515f0cd48b29e02a
comment on: http://stackoverflow.com/a/28047981

http://stackoverflow.com/q/28114393
has comment: http://stackoverflow.com/comment/44603147
has body: I want to add an address autocomplete to a native android app. I read that there is an option that requires API key and have a limit and another one that doesn't require an API key and have no limit (Google maps javascript api v3?). Is there an example for the latter? I only found non-native examples and couldn't understand how to convert them into a native one. Is it even recommended to do it or the API key required method is more recommended? The example here: https://developers.google.com/places/training/autocomplete-android shows the api key as part of the app itself but a later note says it should be done on the server and proxied to the app... I'm confused, how should I do it then?
tagged with: javascript
tagged with: google-maps-api-3
score: 0
tagged with: android
has comment: http://stackoverflow.com/comment/44603793
answer count: 0
type: UnansweredQuestion
has title: Android address autocomplete using Google maps javascript api v3
type: Question
linked to: http://stackoverflow.com/q/15671331

http://stackoverflow.com/comment/44574159
score: 0
type: AnswerComment
has text: Just an upvote, or accept my answer if it helped you. Just helps people in the future if they find your question that the advice I offered was helpful.
type: Comment
comment on: http://stackoverflow.com/a/28056612

http://stackoverflow.com/a/28070649
score: 2
upvote count: 3
has body: Or be more clever: var getV = document.querySelector("#ST_RTM1_352X-MESSAGE_TYPED01_TXT input"); alert(getV.value);
downvote count: 1
answers question: http://stackoverflow.com/q/28070566
has comment: http://stackoverflow.com/comment/44521152
type: Answer

http://stackoverflow.com/comment/44551526
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28086944
has text: from the same domain or cross domain ?
score: 0

http://stackoverflow.com/a/27988453
type: Answer
has body: This is a good scenario for using a directive. I would create a directive and include it in all of my partials (ion-views) for each tab. You can use a global controller to manipulate/provide this directive with data. More about directives
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27984431
answers question: http://stackoverflow.com/q/27984431

http://stackoverflow.com/a/28032414
has body: Try out the filter function: var newOptions = options.filter(function(option, index) { return ids.indexOf(option.value) &gt;= 0; }); var values = newOptions.map(function(option) { return option.value; });
has comment: http://stackoverflow.com/comment/44449816
downvote count: 0
has comment: http://stackoverflow.com/comment/44449674
answers question: http://stackoverflow.com/q/28032368
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44449982
has comment: http://stackoverflow.com/comment/44449917
has comment: http://stackoverflow.com/comment/44450059
has comment: http://stackoverflow.com/comment/44450197

http://stackoverflow.com/comment/44559079
comment on: http://stackoverflow.com/q/28091169
score: 0
type: QuestionComment
type: Comment
has text: Is that a string? If you do `typeof data.view` what do you get? I suspect it's being interpreted as a string because for some reason you setting `ContentType` to `null`.

http://stackoverflow.com/q/28085141
has comment: http://stackoverflow.com/comment/44548562
score: 2
has answer: http://stackoverflow.com/a/28085515
type: Question
has body: I have this resource with a nested route in my ember app: router.js: Router.map(function() { this.resource('posts', function () { this.route('show', {path: '/:id'}); }); }); What is the convention in ember for my controllers? Do I create a separate file for each URL, or does the show handler go in /controllers/posts.js? Or is there perhaps multiple correct ways of doing this? This is what I have so far in /routes/posts.js: import Ember from 'ember'; var PostsRoute = Ember.Route.extend({ model: function() { return posts; } }); var posts = [ { id: '1', title: 'Object nr one', content: 'This is the content of Object nr one.' }, { id: '2', title: 'Obelix', content: 'A fat gaul. From a comic book.' }, { id: '3', title: 'Werner', content: 'Wat soek werner hier? Dis mos nou belaglik man.' } ]; export default PostsRoute; And this is /controllers/posts.js: import Ember from "ember"; export default Ember.ArrayController.extend({}); I would appreciate if someone showed me the correct way of doing things in this example.. I'm really struggling to find proper examples on the web. Please note that I'm using ember CLI
has comment: http://stackoverflow.com/comment/44548657
has comment: http://stackoverflow.com/comment/79596166
downvote count: 0
tagged with: javascript
tagged with: ember.js
answer count: 1
tagged with: ember-cli
favorite count: 0
has title: Controller/route conventions for nested routes in ember
upvote count: 2
type: UnansweredQuestion
tagged with: url-routing

http://stackoverflow.com/q/27999060
has body: i scraped a list of 10K Keywords and i want to delete the lines with 2 or more duplicate keywords. example keywords: abc electronics address abc electronics sales abc electronics black friday electronics ps4 electronics ps3 it should look like this: abc electronics address electronics ps4 electronics ps3 I want to do this with javascript but im really not sure how to go about this, can you guys help me figure it out thanks!!! This is what i have im thinking i can somehow use the remove method but thats as far as ive gotten i dont know what to do. var saveKeywords; saveKeywords = "CODE:"; saveKeywords += "TAG POS=1 TYPE=TEXTAREA ATTR=NAME:comment EXTRACT=TXT" + "\n"; var saveKeywords = iimGetLastExtract(); var removeDuplicates = saveKeywords.remove(duplicateKeywords);
score: 0
type: UnansweredQuestion
tagged with: imacros
has title: delete duplicate keywords javascript
type: Question
has answer: http://stackoverflow.com/a/27999112
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/44465567
has text: using function `$.load` to load a JSP via `AJAX` may help you.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28038847

http://stackoverflow.com/comment/44383152
type: QuestionComment
comment on: http://stackoverflow.com/q/27996437
has text: What is the Response supposed to be? What do you get when you type the url directly in the browser?
score: 0
type: Comment

http://stackoverflow.com/a/28035729
answers question: http://stackoverflow.com/q/28035534
type: Answer
has body: In Javascript the type of elements in an array can vary. For example var a = ["hello", 12345, {key : "value"}, true]; This is valid javascript. However it is bad practice to have more than one type in an array as you have to know the order of the expected element to access them. e.g. you have to know that the first element is a string. It would be better to represent the above array as an object with named properties: var o = { aString : "hello", aNumber : 12345, aSubobject : { key : "value" }, aBool : true }
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/44325153
has text: No quite sure what you mean by text selection. Do you mean a word or sentence in the middle of a bigger chuck of text?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27965819
score: 1

http://stackoverflow.com/comment/44501253
type: Comment
type: QuestionComment
has text: Are contets you load every time the same? or they are loaded by some parameters ?
comment on: http://stackoverflow.com/q/28059860
score: 0

http://stackoverflow.com/a/28054727
has comment: http://stackoverflow.com/comment/44491503
score: 0
type: Answer
has body: Your code is trying to send a while loop into data.addRows(). Move the function call into the while loop while (i &lt;= c) { data.addRows([[soData[i].staffName, Number(soData[i].orders)]]); i++; }
answers question: http://stackoverflow.com/q/28054651

http://stackoverflow.com/q/28040397
has body: Sample: http://kat.isltest.net/col/ This sample site is working in chrome. The function is the body is centered even it contains a wide div of 1600px. The scrollbar is then by default centered in every window size. Now, the problem is this is not working in IE and Firefox. Here's the code: if ($(window).width() &lt;= 1600) { $('body').scrollLeft(0); } if ($(window).width() &lt;= 1400) { $('body').scrollLeft(110); } if ($(window).width() &lt;= 1360) { $('body').scrollLeft(130); } if ($(window).width() &lt;= 1280) { $('body').scrollLeft(170); } if ($(window).width() &lt;= 1152) { $('body').scrollLeft(235); } if ($(window).width() &lt;= 1024) { $('body').scrollLeft(300); } if ($(window).width() &lt;= 800){ $('body').scrollLeft(400); } DO you guys have idea why? Thanks a lot! :)
has comment: http://stackoverflow.com/comment/44465478
has answer: http://stackoverflow.com/a/28040539
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/42617769
type: Question
tagged with: document-body
has comment: http://stackoverflow.com/comment/44465098
has title: $(window).width() and $('body').scrollLeft() not working in IE and Firefox
has comment: http://stackoverflow.com/comment/44464689
tagged with: javascript
possible better answer: http://stackoverflow.com/a/42617769
accepted answer: http://stackoverflow.com/a/28040539
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/44465299
has comment: http://stackoverflow.com/comment/44464557
tagged with: jquery

http://stackoverflow.com/a/27999370
answers question: http://stackoverflow.com/q/27999331
has comment: http://stackoverflow.com/comment/44388141
type: Answer
upvote count: 1
has body: Simply use CSS for that.
score: 1
downvote count: 0

object
tags question: http://stackoverflow.com/q/28036293
tags question: http://stackoverflow.com/q/27990133
tag name: object
tags question: http://stackoverflow.com/q/28060616
tags question: http://stackoverflow.com/q/27975304
tags question: http://stackoverflow.com/q/28045134
tags question: http://stackoverflow.com/q/28030933
tags question: http://stackoverflow.com/q/28087696
tags question: http://stackoverflow.com/q/28068305
tags question: http://stackoverflow.com/q/28075531
tags question: http://stackoverflow.com/q/28061121
tags question: http://stackoverflow.com/q/28009669
tags question: http://stackoverflow.com/q/28081043
tags question: http://stackoverflow.com/q/28118884
tags question: http://stackoverflow.com/q/28096580
tags question: http://stackoverflow.com/q/28054463
tags question: http://stackoverflow.com/q/28050470
tags question: http://stackoverflow.com/q/27966809
tags question: http://stackoverflow.com/q/28037918
tags question: http://stackoverflow.com/q/28008209
tags question: http://stackoverflow.com/q/28095931
tags question: http://stackoverflow.com/q/28114568
tags question: http://stackoverflow.com/q/27993908
tags question: http://stackoverflow.com/q/28001573
tags question: http://stackoverflow.com/q/27981936
tags question: http://stackoverflow.com/q/28010824
tags question: http://stackoverflow.com/q/27966005
tags question: http://stackoverflow.com/q/28013703
tags question: http://stackoverflow.com/q/28058519
type: Tag
tags question: http://stackoverflow.com/q/28042848
tags question: http://stackoverflow.com/q/28001220
tags question: http://stackoverflow.com/q/28056487
tags question: http://stackoverflow.com/q/28084034
tags question: http://stackoverflow.com/q/28098664

http://stackoverflow.com/comment/44413062
has text: I consider myself quite familiar with html, moderately familiar with javascript, and css, so I have tried with my level of skill on all three. I have succeeded with links that download to the browser. The files I need to have potential buyers of my book download are 30-40 MB book samples. That isn't going to work well sending the files to the browser. Sorry, I didn't consider anyone here a slave.
score: 1
comment on: http://stackoverflow.com/q/28012829
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44466520
type: Comment
comment on: http://stackoverflow.com/a/28041115
type: AnswerComment
score: 0
has text: Thanks for the input! Yes, I fully agree that the security check on the server is the most reliable and ideal way to go. I also pointed out that user can open console and change JS code or value of a variable. However, if the application is very complex and has hundreds of components with thousands of events, sending all the components custom from the server may become a quite challenging deal. So I wonder whether there are any tricks and approaches to handle a part of permissions on client code.

http://stackoverflow.com/comment/44587464
type: Comment
has text: Not it has moved to left
comment on: http://stackoverflow.com/a/28106477
type: AnswerComment
score: 0

http://stackoverflow.com/q/28002984
has title: Getting the next 15 Events from Google Calendar (http requests)
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28003649
tagged with: google-calendar-api
tagged with: node.js
type: AnsweredQuestion
tagged with: google-api
type: Question
has body: I want to access a public Calendar using a node api and retrieve the 15 upcoming events in json format. This is what I use at the moment: https://www.googleapis.com/calendar/v3/calendars/myCalendarID/events?maxResults=15&amp;key=MyKey This gives me 15 events, but the events are the first 15 events from 2012 - I would like to get the upcoming 15 events from today. I tried using this: &amp;startMin=2014-08-09T10:57:00-08:00 But the result stayed the same.
has answer: http://stackoverflow.com/a/28003649
score: 0

http://stackoverflow.com/a/27998547
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27998536
has comment: http://stackoverflow.com/comment/44387197
type: Answer
has comment: http://stackoverflow.com/comment/44387206
has comment: http://stackoverflow.com/comment/44386910
has body: You can pass arguments to the javascript; those additional arguments are accessible using arguments: browser.execute_script("foo(arguments[0])", 'someString') browser.execute_script("foo(arguments[0])", 'string with \n is also ok!\n')
accepted answer of: http://stackoverflow.com/q/27998536
has comment: http://stackoverflow.com/comment/44387416
upvote count: 5
has comment: http://stackoverflow.com/comment/44386849
score: 5
has comment: http://stackoverflow.com/comment/44386864

http://stackoverflow.com/q/28022005
type: Question
tagged with: angularjs-routing
score: 0
has title: AngularJS .run() causing initial views to not load
has answer: http://stackoverflow.com/a/28024311
answer count: 1
tagged with: javascript
tagged with: angularjs
has body: I have the following setup in my main angular.js file var application = angular.module('application', [...]).config([..., function(...) { //Setup routes $routeProvider... }]). directive('applicationDirective', function() { ... }). controller('main-controller', ['$scope', function($scope) { ... }]). run(['$rootScope', '$location', function($rootScope, $location) { //Empty }]); At the moment the application consists of two pages, a login page and a dashboard page. The $routeProvider is configured to load a specific view and controller for each of these routes in the $config directive. This all works fine without the .run(...); function. When I add the .run(...) function to the end, even though the body is empty it seems that the $routeProvider doesn't run straight away, the initial view doesn't load on either '/dashboard' or '/login' however if I click a link to those pages once it's been opened they work fine. Does anyone know why it's not loading the view and controller correctly when I use the run block?
has comment: http://stackoverflow.com/comment/44432260
has comment: http://stackoverflow.com/comment/44430443
has comment: http://stackoverflow.com/comment/44430288
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44432876
has comment: http://stackoverflow.com/comment/44430790

http://stackoverflow.com/q/27994232
score: 0
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/27994241
has body: Okay so I have a menu with names of transmissions. I'd like to add a small little transmission logo beside each tab. This is the code that I would like to add on to: document.getElementById("nav02").innerHTML = " " + (RIGHT HERE IS WHERE ID LIKE THE LOGO TO APPEAR, I AM NOT SURE IF THIS IS WHERE THE CODE WOULD GO EITHER)" 32RH " + " 36RH " + " 42RH " + " 42RE " + " ";
tagged with: image
type: Question
has title: Adding a picture in javascript
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 2

http://stackoverflow.com/q/27985729
answer count: 1
favorite count: 0
tagged with: cordova
tagged with: android
has comment: http://stackoverflow.com/comment/44366300
has comment: http://stackoverflow.com/comment/44362787
tagged with: firebase
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44362769
linked to: http://stackoverflow.com/q/22383281
has comment: http://stackoverflow.com/comment/44363091
has comment: http://stackoverflow.com/comment/44418100
type: Question
has comment: http://stackoverflow.com/comment/44362870
has comment: http://stackoverflow.com/comment/44369211
tagged with: javascript
has answer: http://stackoverflow.com/a/28015618
has title: Cordova with Firebase won't work
has comment: http://stackoverflow.com/comment/44417710
accepted answer: http://stackoverflow.com/a/28015618
has body: I'm using Cordova and Firebase to create a application. One of the many function I've made is this function: function searchForGameRound() { var ref = new Firebase("https://grootproject.firebaseio.com/Users/"); // Dit is de query naar Firebase toe (kan je vergelijken met een query als bij SQL) var query = ref.orderByChild("gameSearching").equalTo(true); console.log('spelen'); // Hierbij geef ik aan dat hij dit enkel 1x mag doen. Dit voorkomt dat hij dit op elk child gaat uitvoeren (wat meerdere games maakt). query.once("value", function (data) { console.log('spelen', data.val()); if (data.val() === null) { updateData(('Users/' + you + '/'), {gameSearching: true}); return; } var alreadyInCurrentGame; var object = data.val(); var user1 = Object.keys(object)[0]; var user2 = Object.keys(object)[1]; // Als je het zelf bent if (you == user1) { if (user2) { opponent = user2; } else { updateData(('Users/' + you + '/'), {gameSearching: true}); return; } } else { opponent = user1; } console.log(opponent, 'opponent found'); // Hierbij gaat hij kijken of er al een currentgame bestaat met deze user var ref = new Firebase('https://grootproject.firebaseio.com/Users/' + you + '/currentGames/' + opponent + '/'); ref.once("value", function (snapshot) { if (!snapshot.val() === null) { console.log(snapshot.val(), ' bestaat al'); alreadyInCurrentGame = true; } }, function (errorObject) { console.log(errorObject.error); }); // Als alles goed is, gooit hij er data in. if (!alreadyInCurrentGame) { console.log('spel gevonden'); var game = new Firebase("https://grootproject.firebaseio.com/Games/"); game.on("value", function (data) { var length = Object.keys(data.val()).length; for (var i = 0; i &lt; length; i++) { games.push(Object.keys(data.val())[i]); } game1 = Math.floor(Math.random() * 4); game2 = Math.floor(Math.random() * 4); game3 = Math.floor(Math.random() * 4); while(game1 == game2){ game2 = Math.floor(Math.random() * 4); } while(game2 == game3){ game3 = Math.floor(Math.random() * 4…
has comment: http://stackoverflow.com/comment/44363365
upvote count: 1

http://stackoverflow.com/comment/44340758
comment on: http://stackoverflow.com/q/27973718
score: 0
type: Comment
has text: Hello sir, I don't understand your question , you said about JS date formatting but also said about Oracle , you are trying to pass the date to DB or something like that ?? maybe this can help you http://stackoverflow.com/questions/14638018/current-time-formatting-with-javascript
type: QuestionComment

http://stackoverflow.com/comment/44585167
comment on: http://stackoverflow.com/q/28102916
type: Comment
has text: Try to isolate the exact problem. Cut away all the page-specific things. See if you can reproduce in a clean environment. It seems to work here: http://jsfiddle.net/qbwjho58/
score: 0
type: QuestionComment

http://stackoverflow.com/a/28022471
upvote count: 4
downvote count: 0
score: 4
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28022419
has body: You defined totalCount as a string. Just change var totalCount = ''; to var totalCount = 0; http://jsfiddle.net/u43cw49m/1/
type: Answer
answers question: http://stackoverflow.com/q/28022419

perl
tags question: http://stackoverflow.com/q/28017432
tag name: perl
tags question: http://stackoverflow.com/q/28031964
type: Tag

http://stackoverflow.com/a/28114928
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/28113600
accepted answer of: http://stackoverflow.com/q/28113600
has body: just pass the name of the button as a string, and access with brackets. var createMenu = function (args) { this.btnOne = new Button(); // construct a button this.btnTwo = new Button(); this.btnTwo = new Button() this.setActiveButton(this[args.desiredButton]); // access this[property] return this; } createMenu({ desiredButton: 'btnTwo' }); // string name of property

http://stackoverflow.com/comment/44423273
type: Comment
type: QuestionComment
has text: You don't need $scope.$apply here. It should work. I guess you are making some minor mistakes.
comment on: http://stackoverflow.com/q/28018188
score: 0

http://stackoverflow.com/a/28077090
has body: Both firstCount and secondCount are promises that are needed to be resolved: element.all(by.repeater('app in userApps')).count().then(function (first) { element.all(by.repeater('app in userApps')).count().then(function(second) { expect(first - second).toEqual(1); }) });
score: 4
accepted answer of: http://stackoverflow.com/q/28076983
upvote count: 4
answers question: http://stackoverflow.com/q/28076983
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44533567
type: Answer

google-polyline
tags question: http://stackoverflow.com/q/27987172
type: Tag
tags question: http://stackoverflow.com/q/28036561
tags question: http://stackoverflow.com/q/28040805
tag name: google-polyline

http://stackoverflow.com/q/28095201
has comment: http://stackoverflow.com/comment/44566338
duplicate of: http://stackoverflow.com/q/750486
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/750486
has title: Javascript Variable Clarification
has body: I came across this behavior while trying to write some tests for my code and was wondering if somebody could explain to me why this isn't performing as I expect it to. I have the following code: var arr = []; for (i = 0; i &lt; 5; i++) { console.log('pushing %s', i); arr.push(function() { console.log('logging %s - random %s', i, Math.random()); }); } for (ai in arr) { arr[ai](); } which outputs out something like this: pushing 0 pushing 1 pushing 2 pushing 3 pushing 4 logging 5 - random 0.35618519759736955 logging 5 - random 0.4480402651242912 logging 5 - random 0.9252766149584204 logging 5 - random 0.4456857305485755 logging 5 - random 0.14507507369853556 though I was expecting it to output something like this: pushing 0 pushing 1 pushing 2 pushing 3 pushing 4 logging 0 - random 0.35618519759736955 logging 1 - random 0.4480402651242912 logging 2 - random 0.9252766149584204 logging 3 - random 0.4456857305485755 logging 4 - random 0.14507507369853556 How is i changing after I've already pushed to the array? and why does i resolve to 5 in the logging ... lines even though it only reaches 4 in the pushing ... lines?
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/44566816
has comment: http://stackoverflow.com/comment/44566325
has comment: http://stackoverflow.com/comment/44566386
tagged with: javascript
score: 0

http://stackoverflow.com/comment/44482252
score: 0
has text: I am confused how to solve put the everything together. My question would be: what kind of solution should I use to send the the variables from javascript to the php. Links or some information would be very nice, and i would appreciate them. My second question is: how can I achive that I wait until the php file generates the xml, then I use it from a javascript in my html. Thanks for spending time for my problem!
comment on: http://stackoverflow.com/q/28049949
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44426828
type: Comment
has text: $ is jquery you can use any library ajax jquery or native to get the page.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28019134

http://stackoverflow.com/comment/44545276
type: Comment
score: 0
has text: for number 3 when i return the value of select from php to ajax i dont limit the search to 10 i just search possible result..is this not possible to deal with separating 10 entry do i need to limit it then i need to fire the search again if this is the case right?
type: AnswerComment
comment on: http://stackoverflow.com/a/28083569

http://stackoverflow.com/q/28101528
tagged with: underscore.js
type: Question
has body: I am trying to implement my own version of _.sortBy but I can't figure out the difference between _.sortBy and the sort that is builtin to Javascript Array instances. They seem to evaluate optional callback arguments differently. I am not sure why and how they evaluate callback arguments differently. Example: arr = [1, 2, 3, 4, 5, 6] &gt;&gt;&gt;[1, 2, 3, 4, 5, 6] _.sortBy(arr, function(num){ return Math.sin(num); }); &gt;&gt;&gt;[5, 4, 6, 3, 1, 2] arr.sort(function(num){ return Math.sin(num);}) &gt;&gt;&gt;[4, 5, 6, 3, 2, 1] All my searching for things in regards to this topic renders results in the category of databases. I could not find this answer on google or SO. Any help would be greatly appreciated. Thanks in advance! -Chopper Draw Lion4
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28101604
answer count: 1
has title: Javascript: What is the difference between _.sortBy and arr.sort?
accepted answer: http://stackoverflow.com/a/28101604
type: AnsweredQuestion

http://stackoverflow.com/a/28093431
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28088699
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28088699
has comment: http://stackoverflow.com/comment/44563135
score: 1
has body: I used Michael C. Gates suggestion and put Divs inside the elements that gave me trouble. It's now working fine. Still no idea why Firefox was the only one giving me this trouble. Oh well.
type: AcceptedAnswer

http://stackoverflow.com/comment/44558986
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28091169
has text: @MattBurland at the end of my question I paste the result from 'data.view' with removing parentheses and without removing parentheses
score: 0

http://stackoverflow.com/a/30290163
answers question: http://stackoverflow.com/q/28077795
has body: The TernJS project is what you are looking for. Here's an example integration with ACE.
type: Answer
downvote count: 1
score: 4
upvote count: 5

http://stackoverflow.com/comment/44487848
comment on: http://stackoverflow.com/a/28052995
has text: what does `specify the employee array as such` mean? Seems like all you did was fix a syntax error ... but didn't say that
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/28055887
has answer: http://stackoverflow.com/a/28198957
tagged with: javascript
has comment: http://stackoverflow.com/comment/44673079
tagged with: dom
score: 13
has comment: http://stackoverflow.com/comment/44493707
has comment: http://stackoverflow.com/comment/44495894
accepted answer: http://stackoverflow.com/a/28198957
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/44493580
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/3964710
has title: Is there a flexible way to modify the contents of an editable element?
has body: Subject: I am creating a Google Chrome extension that interacts with web pages via a content script and an event page. I have context menu options that appear if a user clicks on an element that is categorized as editable by the chrome.contextMenus API. The options act like shortcuts for commonly entered text. When the user clicks an option, some text is placed inside the element at the position of the cursor. If the user has text highlighted, it is deleted. Problem: Not all editable elements can be modified the same way. If the element is a simple textarea the desired result can be achieved by implementing this solution: Replacing selected text in the textarea However, I can not assume that I am interacting with a normal textarea. Possible nuances include: The text area being hidden inside an Iframe, which complicates the process of finding the element to interact with (document.activeElement may return the Iframe, rather than the element that actually contains the text). The &lt;textarea&gt; not being a &lt;textarea&gt;/&lt;input&gt; at all, but rather a contentEditable &lt;div&gt;. The .value approach will not work in this case. So I am searching for a flexible way to do this that can handle all edge cases elegantly. Some solutions I have tried: option 1 : I originally planned on storing the value in the system clipboard. Then, I could conceivably just use document.execCommand('paste') to modify the element. However, after trying it, this approach seems to have the same drawbacks as my initial approach. (See this question) Additionally, this approach would delete whatever was in the clipboard before the operation. This is undesirable and any solution that utilizes this approach must provide a work around. option 2 : Another option that I have considered is dispatching keyboard events for each character in the string. However, with this solution, you still run into the Iframe problem and it doesn't allow you do use special Unicode characters. ┻━┻ ︵ヽ(`Д´)ﾉ︵ ┻━┻
upvote count: 13
tagged with: text
linked to: http://stackoverflow.com/q/28130521
has comment: http://stackoverflow.com/comment/44495446
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/44588745
type: Comment
type: QuestionComment
score: 1
has text: What do you mean by all controllers in a view? What do you mean by view? It sounds like you're looking for a service though
comment on: http://stackoverflow.com/q/28106901

http://stackoverflow.com/comment/44524625
has text: @ericbelldesigns - Note that there are still some problems when you resize the window. You should probably find a better plugin.
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/28072406

http://stackoverflow.com/a/27966074
type: Answer
answers question: http://stackoverflow.com/q/27965986
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44329506
has body: you'd missed the closing ); works now. $(".antennaCursor").on("click", function() { alert("Hi"); }); Click
upvote count: 1

http://stackoverflow.com/a/47669350
downvote count: 1
score: 2
answers question: http://stackoverflow.com/q/27991366
has body: In general, state of one component(parent) is prop for the child component. State resides within a component where as props are passed from parent to child. Props are generally immutable. class Parent extends React.Component { constructor() { super(); this.state = { name : "John", } } render() { return ( &lt;Child name={this.state.name}&gt; ) } } class Child extends React.Component { constructor() { super(); } render() { return( {this.props.name} ) } } In the above code, we have a parent class(Parent) which has name as its state which is passed to the child component(Child class) as a prop and the child component renders it using {this.props.name}
type: Answer
upvote count: 3

http://stackoverflow.com/comment/44461163
score: 0
type: QuestionComment
type: Comment
has text: @mplungjan , I have added a link to the tutorial.
comment on: http://stackoverflow.com/q/28038408

http://stackoverflow.com/q/28108017
has answer: http://stackoverflow.com/a/30094208
type: UnansweredQuestion
has body: I've to insert a small image in between text using javascript. When I insert the image the text shifts right as the image comes in. I want to insert the image such that the text doesn't move or shift and the image superimpose it, using javascript. My current function is var paraId = android.selection.getParagraphID(); var range = window.getSelection().getRangeAt(0); var selectionContents = range.extractContents(); var span = document.createElement("span"); span.appendChild(selectionContents); span.setAttribute("class","uiWebviewHighlight"); span.style.backgroundColor = "blue"; span.style.color = "white"; var spanID = 'SP' + paraId; span.setAttribute("id",spanID); var image = document.createElement("img"); image.src = "http://www.google.com/intl/en_com/images/logo_plain.png"; image.height=5; image.width=5; image.align = "top"; image.style.position="relative"; span.appendChild(image); range.insertNode(span);
has comment: http://stackoverflow.com/comment/44590616
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44590241
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Insert image in HTML without shifting of text
has comment: http://stackoverflow.com/comment/44591869

http://stackoverflow.com/comment/44516531
type: Comment
comment on: http://stackoverflow.com/a/28066742
has text: That's not helping much. What exactly isn't working?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44603951
has text: Learn about the XMLHTTPRequest object. It is not magic.
score: 1
comment on: http://stackoverflow.com/q/28114841
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27997958
has title: How moment.js works with declination minutes and hours?
has body: Tell me pls, have a number, for example 1440 and i need get or minute, or minutes, or hour or hours. What can I do? I do: var getTimeouts = function (timeouts) { var timeout = +timeouts, timeoutValue = ""; if (timeout &gt; 0) { if (timeout % 60 == 0) { if (timeout == 60) { // timeoutValue = '1 hour'; } else { // timeoutValue = '... hours'; } } else { if (timeout == 1) { // timeoutValue = '1 minute'; } else { // timeoutValue = '... minutes'; } } } return timeoutValue; }; console.log(getTimeouts(1440)); // 24 hours Question: how with momont.js I can parse a number and get minute/minutes/hour/hours?
has comment: http://stackoverflow.com/comment/44385648
type: AnsweredQuestion
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/28244281
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44385640
score: 0
has comment: http://stackoverflow.com/comment/44385770
has answer: http://stackoverflow.com/a/28244281
upvote count: 1
tagged with: momentjs
favorite count: 0

http://stackoverflow.com/comment/44553830
comment on: http://stackoverflow.com/q/28088036
score: 0
type: Comment
has text: I'd mention that in your question, then - it could be that the script isn't being loaded, or an error elsewhere is preventing the Javascript from running, or there could be a bug in the Javascript code, or it could be something browser-specific. Please add as much information as possible!
type: QuestionComment

http://stackoverflow.com/q/28091036
tagged with: date
has comment: http://stackoverflow.com/comment/44559154
score: 2
has comment: http://stackoverflow.com/comment/44561834
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/18445927
has title: expand input date calendar (browser native)
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44563966
tagged with: css
has answer: http://stackoverflow.com/a/47245379
has comment: http://stackoverflow.com/comment/44558913
has comment: http://stackoverflow.com/comment/44559309
has comment: http://stackoverflow.com/comment/44558676
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/28126604
has body: Is it possible to expand a native browser calendar.. &lt;input id="calendar" type="date"&gt;&lt;/input&gt; ..just like you're actually clicking on it? I tried simulating a click event: $('#calendar').trigger('click'); but no luck. Ideas? Fiddle here PS: i'm not interested in plugins like jquery datepicker etc. Thanks
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/44541488
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28081478
has text: you are looping till `i<=option_array.length`. You should loop till length - 1

http://stackoverflow.com/comment/44536895
has text: That's completely correct but as far as i could see it's also what you were doing in your initial code and you did not mention that anywhere in your question so i didn't take that into account. I guess you're better of with the solution of Alexander Farkas. Also if you want something like that i would also recommend not attaching markers which are out of map bounds. Good luck!
comment on: http://stackoverflow.com/a/28031941
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28141524
answers question: http://stackoverflow.com/q/28095385
has comment: http://stackoverflow.com/comment/44663297
type: AcceptedAnswer
has body: As requested, my comment in expanded answer form: You're uploading new vertex and texture data every frame, essentially re-creating it every time you render. Instead, upload the data during initialization. You can accomplish this by moving your bufferData calls to your initMesh() method, and texImage2D call to the initMaterial method (you will have to bind the created objects first of course). Once those are gone from draw, you'll see much better performance. In regards to your comment about changing UV coordinates every frame, you have a few options that should perform better than what you have. First option is to update the data on the CPU (like you're doing now). It's good that the UV data is in a separate buffer - makes doing CPU updates faster and more cache coherent. Initialize the data during your initMaterial call like I recommended, but change the usage parameter to GL_DYNAMIC_DRAW instead of GL_STATIC_DRAW. This is a hint to the driver that you plan to change the data frequently. Then, inside setMeshBuffer, use gl.bufferSubData instead of gl.bufferData. This allows you to only update a part of the data, but it still typically much faster even when uploading completely new data. The second option - which I prefer - is to keep the UVs static. Instead of modifying them on the CPU, modify them in a vertex program. Depending on how you're changing the UVs, this is usually much faster than doing it on the CPU. Hope this helps, and good luck!
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/44663160
accepted answer of: http://stackoverflow.com/q/28095385

http://stackoverflow.com/comment/44541354
comment on: http://stackoverflow.com/a/28062006
score: 0
type: AnswerComment
type: Comment
has text: single ad is repeated many times..when I am trying the above code.

http://stackoverflow.com/comment/44592095
has text: Just a guess - this line: newImageData.data[ i + 3 ] = imageDataArray[ index ].data[ i + 3 ]; just sets the tranparancy to the current PNG, should it not just set it to 1?
type: QuestionComment
comment on: http://stackoverflow.com/q/28108581
type: Comment
score: 0

http://stackoverflow.com/a/28113139
answers question: http://stackoverflow.com/q/28109537
downvote count: 0
type: Answer
has body: This really would be highly valuable for all sorts of applications. Doing a quick SO and Google search, I found one service that has an API for this: https://www.url2png.com. I'm not sure, but it would seem that this type of function would have to be done backend with software installed on your server. This makes sense as we're working with rendering images; and current browsers (through Javascript or APIs) don't yet seem to have the ability to render images. (Anyone provide links to documentation in the comments if I'm wrong about this?) Update Here's another one I found that has command-line open-source code: http://cutycapt.sourceforge.net/
score: 1
upvote count: 1

http://stackoverflow.com/a/28051115
score: 0
type: AcceptedAnswer
type: Answer
has body: This will work: vAxis: { ticks: [0,5,10,15,20,21], viewWindowMode:'explicit', viewWindow: { max:21, min:0 }
answers question: http://stackoverflow.com/q/28050450
accepted answer of: http://stackoverflow.com/q/28050450

http://stackoverflow.com/a/28042035
score: 1
downvote count: 0
has body: There is nothing with jQuery. It's javascript scopes. For example (function(){ var testFunc = function(){ console.info('call jQuery testFunc'); } }()); function callJqueryTestFunc(){ testFunc(); // error - function not exists } You will get the same error. You cannot access function inside other function
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/28041957

http://stackoverflow.com/comment/44342913
comment on: http://stackoverflow.com/a/27974975
score: 0
type: Comment
has text: I already used your codes here and still got me the same undefined is not a function error. :( +1 though
type: AnswerComment

http://stackoverflow.com/a/32846874
upvote count: 1
downvote count: 0
score: 1
has body: There are no data options to add animation to the top-bar opening/closing on mobile. It will just appear and disappear. The reason is that Foundation changes the top-bar height from a specific css height value to height: auto; and you can't use CSS transition animations for height: auto. You would need to completely re-work the foundation top-bar JS to create the animation yourself with javascript. Or you could set a height on .top-bar.expanded in CSS and then the CSS transition would work. See this answer - https://stackoverflow.com/a/24719200/2247931
type: Answer
answers question: http://stackoverflow.com/q/28001182

http://stackoverflow.com/comment/92840091
type: AnswerComment
has text: For a chrome extension, you can't add the videoCapture permission it seems.
type: Comment
comment on: http://stackoverflow.com/a/28089600
score: 1

http://stackoverflow.com/q/28007827
linked to: http://stackoverflow.com/q/6010309
has comment: http://stackoverflow.com/comment/44403740
has comment: http://stackoverflow.com/comment/44403780
type: Question
has comment: http://stackoverflow.com/comment/44403746
has answer: http://stackoverflow.com/a/28007888
has comment: http://stackoverflow.com/comment/44403826
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0
answer count: 1
has body: My question is pretty simple. I have a json file stored and I fetch it using a simple xml request and store it for later use in the localstorage. Now What I need to do is that when the user selects something from the select tag, I fetch the value of the tag and use it get the data from json. For ex: database.Class.Teachers."The value from the select tag".age Is this possible with javascript or similar workaround?
duplicate of: http://stackoverflow.com/q/6010309
type: UnansweredQuestion
has title: Fetching data from a json file using variables javascript

http://stackoverflow.com/a/28105123
accepted answer of: http://stackoverflow.com/q/28097320
upvote count: 1
has body: So your last comment jogged my memory. While undocumented, I think this is actually the end point for the following Drive API calls: https://developers.google.com/drive/v2/reference/realtime/get. It's a bit weird because its not under the Realtime API and instead documented under the Drive API, but you can both export as JSON as well as import a JSON structure. Presumably the toJson function will spit out compliant JSON to be used with these functions, but I have not tested this. Edit: Also - it looks like they have more fun undocumented features that go hand-in-hand with this. In particular gapi.drive.realtime.loadFromJson is available, which presumably is the actual loading counterpart to toJson. There is also the gapi.drive.realtime.newInMemoryDocument fn that is exposed which is likely an internal function to initialize the document loaded from 'loadFromJson'. Additionally there is 'Document.isinGoogleDrive' which very likely determines if you are using an in-memory document vs a Drive backed one. Fun stuff :).
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28097320
has comment: http://stackoverflow.com/comment/44606137
type: Answer
has comment: http://stackoverflow.com/comment/44606994
downvote count: 0
score: 1

http://stackoverflow.com/a/27973163
has comment: http://stackoverflow.com/comment/44339789
has body: Since you use JQuery use their BuildIn Function for an Accordion http://jqueryui.com/accordion/ UPDATE: Or for your Structur write a function that closes all Blocks first and than opens the Clicked one.
answers question: http://stackoverflow.com/q/27973125
score: -1
downvote count: 1
has comment: http://stackoverflow.com/comment/44339925
type: Answer
upvote count: 0

http://stackoverflow.com/comment/44474316
type: Comment
comment on: http://stackoverflow.com/a/28029692
has text: @FirozTennali I see no reason why you couldn't use this with a shared tooltip. Do you have a sample jsFiddle with some of your series values? I see what you mean about the point not being graphically updated.
score: 0
type: AnswerComment

http://stackoverflow.com/q/28060052
score: 1
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28060226
has body: By default second city is hide. When click on second button, first city map will hide and second city map will show. But in there, second city map shows zoom out method. How to zoom in the Google map. JS Fiddle $(document).ready(function(){ $("#bangalore").click(function(){ $("#hyd").hide(); $("#ban").show(); }); $("#hyderabad").click(function(){ $("#ban").hide(); $("#hyd").show(); }); });
possible better answer: http://stackoverflow.com/a/28060679
has title: How to default zoom in google map in html
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28060679
favorite count: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/28060226
type: AnsweredQuestion

http://stackoverflow.com/comment/44406648
type: QuestionComment
comment on: http://stackoverflow.com/q/28009357
type: Comment
has text: You can always pass your model properties to functions in an 'external' file, but that wont address your 'security' concerns since anyone view the page can view any script file used by the page. The only way to keep your 'formula secure' is to use ajax to send the parameters to a controller, perform the calculations on the server and return the result.
score: 0

http://stackoverflow.com/comment/44610166
score: 1
type: Comment
has text: http://www.w3.org/TR/html5/syntax.html#attributes-0 says that "Empty attribute syntax" is "Just the attribute name. The value is implicitly the empty string."
comment on: http://stackoverflow.com/a/28117599
type: AnswerComment

http://stackoverflow.com/comment/130409172
score: 0
has text: This is interesting, and goes well beyond what the question was asking. But it's not a great *answer*, because it's code-only. Good answers also include explanation. Please [edit] to explain how this works.
type: AnswerComment
comment on: http://stackoverflow.com/a/66466238
type: Comment

http://stackoverflow.com/comment/44736587
type: AnswerComment
comment on: http://stackoverflow.com/a/27991783
type: Comment
has text: Hey sorry for the delayed reply... I tried to work with plunker for a while to get it to display my data but I can't get it to work... it works fine with my own data though.. here's what I have so far http://plnkr.co/edit/kX4s0eCE2Vofvou1hkf2
score: 0

http://stackoverflow.com/comment/44576450
type: AnswerComment
has text: Thanks for your fast reply.Could you explain me how to implement this on a specific page?
type: Comment
comment on: http://stackoverflow.com/a/28100345
score: 0

http://stackoverflow.com/comment/44331188
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27966151
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/68902/discussion-between-shripal-soni-and-devo).

http://stackoverflow.com/a/27997750
has comment: http://stackoverflow.com/comment/44386656
accepted answer of: http://stackoverflow.com/q/27997690
type: Answer
answers question: http://stackoverflow.com/q/27997690
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44386892
has comment: http://stackoverflow.com/comment/44385249
has comment: http://stackoverflow.com/comment/44387824
upvote count: 2
type: AcceptedAnswer
has body: Your browser will have a set of developer tools. Please learn the basics of how to use them. The JavaScript console will be reporting an error along the lines of: Uncaught SyntaxError: Unexpected token . You can't use a . character in an identifier. If you want to use it in a property name in an object literal, you have to use a string: "game.money": game.money If you want a normal data structure, then you need to create your objects separately: var save = { game: { money: game.money } }; You also need to have a game variable containing an object somewhere in scope.

http://stackoverflow.com/comment/44568632
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28096366
has text: @elclanrs Could you please elaborate on this a bit more?
score: 0

http://stackoverflow.com/comment/44340594
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27973689
has text: @tkoomzaaskz in Bluebird all errors are verbose by default. In RSVP errors are silent by default but you can add a handler to log them. In Q all errors are silent by default and there is nothing you can do about it.
type: Comment

http://stackoverflow.com/q/28102356
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44580062
linked to: http://stackoverflow.com/q/6274339
has answer: http://stackoverflow.com/a/28102396
tagged with: keyword
has comment: http://stackoverflow.com/comment/44580051
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44580092
accepted answer: http://stackoverflow.com/a/28102396
has title: how to convert only "some" of the keyword to link instead of all
type: Question
has comment: http://stackoverflow.com/comment/44580064
has body: ive been doing this for a week. still couldnt find the answer. i am trying to convert only some of the keyword to link instead of all. for example if theres 7 keywords in a paragraph, how can i only convert 3 of it? can someone help? please currently this is my code. (function($) { $.fn.replacetext = function(target, replacement) { // Get all text nodes: var $textNodes = this .find("*") .andSelf() .contents() .filter(function() { return this.nodeType === 3 &amp;&amp; !$(this).parent("a").length; }); $textNodes.each(function(index, element) { var contents = $(element).text(); contents = contents.replace(target, replacement); $(element).replaceWith(contents); }); }; })(jQuery); $("p").replacetext(/\bdress\b/gi, "&lt;a href='http://www.google.com'&gt;$&amp;&lt;/a&gt;");
answer count: 1

http://stackoverflow.com/q/27970647
tagged with: javascript
has comment: http://stackoverflow.com/comment/44334923
tagged with: ecmascript-6
score: 0
has comment: http://stackoverflow.com/comment/44352573
answer count: 1
has comment: http://stackoverflow.com/comment/44334979
tagged with: promise
tagged with: generator
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27973765
tagged with: bluebird
has body: I'm playing around with writing a web service using Node.js/Express which generates some objects based on templates and then returns the generated data. I'm using Bluebird promises to manage all the async logic. After stripping out all the unimportant stuff, my code looks something like this[1]. My problem is the core logic can block for several seconds if the requested number of output elements is large. Since I've been playing with ES6 for this project, my first thought was to factor out the element creation into a generator[2]. However, the only way I can find to get all the results from this generator is Array.from, which doesn't help with the blocking. I've played around with .map, .all, .coroutine, and a couple of other things, in an attempt to asynchronously collect the results from the generator, but I haven't had any luck. Is there any nice way to do this with Bluebird? (Or perhaps a better way of doing it altogether?) Native ES6 Promise.all can take an iterator and give back an array of values, but V8 doesn't support this yet. Also, in my experimentation with polyfills/Firefox, it seems to be synchronous. This is not-too-common operation, so I don't care much about absolute performance. I just want to avoid blocking the event queue, and I would prefer a nice, easy to read and maintain solution. [1]: let Bluebird = require('bluebird'); let templates = ...; // logic to load data templates function createRandomElementFromRandomTemplate(templates) { let el; // synchronous work that can take a couple of milliseconds... return el; }; api.createRandomElements = function(req, res) { let numEls = req.params.numEls; Bluebird.resolve(templates) .then(templates =&gt; { let elements = []; // numEls could potentially be several thousand for(let i = 0; i &lt; numEls; ++i) { elements.push(createRandomElementFromRandomTemplate(templates)); } return elements; }) .then(elements =&gt; { res.json(elements); }) .error(err =&gt; { res.status(500).json(err); }); } [2]: function* …
has title: Is it possible to asynchronously collect items from a generator into an array?
accepted answer: http://stackoverflow.com/a/27973765
has comment: http://stackoverflow.com/comment/44344228
type: Question

http://stackoverflow.com/q/28111841
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44597995
accepted answer: http://stackoverflow.com/a/28112493
score: 0
has comment: http://stackoverflow.com/comment/44598449
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44598229
has title: Dynamic ngModel and ngBind with a custom directive
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44598584
type: Question
has body: I want to create a directive that creates a auto generated ngModel for each input field, and below each input field a that has ng-bind to the ngModel of the element above so here's the directive that i did so far app.directive('cmsInput', function() { return { restrict: 'E', compile: function(element, attrs) { var type = attrs.type || 'text'; var required = attrs.hasOwnProperty('required') ? "required='required'" : ""; var htmlText = ' ' + ' ' + attrs.label + ' ' + ' ' + ' ' + ' ' + ' '; element.replaceWith(htmlText); } } }) so this direcive gives me the input elements but the ngBind doesn't work . here's is the html Test Title
has answer: http://stackoverflow.com/a/28112493
has comment: http://stackoverflow.com/comment/44598399

http://stackoverflow.com/q/28017713
has body: I´ve just created two nested directives, wich the first one shares the data requested from a services in the controller, that helps me to first load the data and pass it to the nested directive to build a form in a dynamic way, then I have a controller, in wich I delcared the $scope.model = {}, to be used as a model and obtain the values of each dynamic form, so I need to save those data from a dynamic form, I just added in the input the ng-model as it the examples in the angularjs site says, ng-model="model.field_name" but when I look for the object in my controller it didn´t updated and I just see a empty object. I´m doing something wrong or I missing something. P.S: I´m using jqlite to append the elements in the form and used the $compile(elem.contents())(scope); statement to bind all the directives in the element. For a more clear understand I've just created a fiddle: http://jsfiddle.net/rubenG/LWQ4M/9/
has comment: http://stackoverflow.com/comment/44485532
tagged with: javascript
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44477699
has comment: http://stackoverflow.com/comment/44422385
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44422379
type: Question
has comment: http://stackoverflow.com/comment/44422395
has comment: http://stackoverflow.com/comment/44422595
has title: Saving a form created from a directive dynamically?

file
type: Tag
tags question: http://stackoverflow.com/q/28064796
tag name: file
tags question: http://stackoverflow.com/q/27991488
tags question: http://stackoverflow.com/q/27972893
tags question: http://stackoverflow.com/q/28048861
tags question: http://stackoverflow.com/q/27982245

annotate
tag name: annotate
type: Tag
tags question: http://stackoverflow.com/q/28009771

http://stackoverflow.com/q/28036860
has body: I'm hoping someone can help me out with this, I'm using a jquery plugin (jquery rotate) to rotate some elements inside a container, however a new crazy requirement came up and now I also need to rotate the container div, the problem is the children elements can be dragged and dropped inside this container and when it is rotated dragging stops working and it starts acting weird (I guess it makes sense as the coordinates system is being altered by the rotation on the container so the dragging behavior just goes crazy) so the only way that I can see to keep dragging and dropping working is to "simulate" the parent rotation by somehow calculate what the position of the children elements would be if the parent is rotated (without actually rotating the parent container) and position each child element on its corresponding final position, this way the coordinates system does not get "broken" and the drag and drop of the children remains working as expected. To clarify what I'm trying to achieve lets suppose the container is 400x400px and that it has a children at top=0 and left=0, I would like to perform a "fake" 180 degrees rotation on the container that would send the child element to top=400px and left=400px (which is where the child element would visually end up being if the parent is rotated), I'm hoping there is a library I can use to perform this math (math is not my thing though) on each children and somehow "calculate" or "determine" the position they should have within the container if it is rotated 180 degrees and then position each children where they should be (the container rotation will always be a 180 degrees rotation which means it will be either at a "normal" angle of 0 degrees or a "flipped" angle of 180 degrees). Any help would be greatly appreciated.
tagged with: smartgwt
has comment: http://stackoverflow.com/comment/44458792
score: 0
answer count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44459280
tagged with: jquery
type: UnansweredQuestion
has title: Calculate "rotated" position of children elements within a div (jquery)
type: Question

http://stackoverflow.com/comment/54545597
has text: Perfect! The "$normalizer->setIgnoredAttributes(array('match'));" solution works for me. Thanks!
comment on: http://stackoverflow.com/a/28068554
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/28071944
has answer: http://stackoverflow.com/a/31482521
tagged with: ios
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ipad
type: UnansweredQuestion
has body: I have a code segment which opens a pop up once the button is clicked.This is done using JavaScript and jQuery. But unfortunately the pop up does not load in Ipad. The pop up loads in earlier versions in iPad. But with the latest versions (8.1) the Popup loads with a blank content. $("[id$='ViewButton']").click(function(){ loadPopup(); }); function loadPopup(){ //loads popup only if it is disabled if(popupStatus==0){ $("#backgroundPopup1").css({ "opacity": "0.5" }); $("#backgroundPopup1").fadeIn("slow"); $("#popupContacts").fadeIn("slow"); popupStatus = 1; } } Please share with me any prior experience on this as I am new on this. Pop Up not function correctly in iPad safari browser
has title: Pop Up not function correctly in iPad safari browser
type: Question
score: 0

http://stackoverflow.com/q/28035681
has body: I am using firefox and when I use event.which to figure out what key caused an event to fire, I get different codes when checking event.which from a keypress event vs. a keydown event. When using the '-' key (hyphen/minus). I get a value of 45 for event.which when reporting based off a keypress event, but a value of 173 when reporting based off of a keydown event. For keypress, I get the wrong code if the expected code is a value greater than 128 (I get expected_code &amp; 0x7f). But, if I do the same using a keydown, I get the expected code. JSFiddle: http://jsfiddle.net/fzd3fjqm/1/ html: &lt;input id="whichkey" value="type something"&gt; &lt;div id="log"&gt;&lt;/div&gt; &lt;div id="log2"&gt;&lt;/div&gt; javascript: $( "#whichkey" ).on( "keypress", function( event ) { $( "#log" ).html( event.type + ": " + event.which ); }); $( "#whichkey" ).on( "keydown", function( event ) { $( "#log2" ).html( event.type + ": " + event.which ) }); Is this expected? I was writing a function triggered from keypress and filtering keys based on event.which and it doesn't work well with the described behavior. If this is expected, what is the correct way to determine what key was press from withing a function triggered by keypress?
type: Question
has title: keypress and keydown providing different codes via event.which
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: events
has answer: http://stackoverflow.com/a/28035708
score: 1
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28035708

http://stackoverflow.com/comment/44465227
comment on: http://stackoverflow.com/a/28024660
type: Comment
has text: @James, what you can do is the following: use jquery and ajax to save all the textareas. Use Jquery `$.each()` function to loop through all the textareas. Give all textareas a class of textarea or something, and in the `$.each()` function make a call with ajax.
type: AnswerComment
score: 0

http://stackoverflow.com/q/28078326
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28078391
type: AnsweredQuestion
type: Question
has title: How can I send this to an onchange function for a select?
answer count: 1
accepted answer: http://stackoverflow.com/a/28078391
tagged with: javascript
score: 0
has body: I have a select element and I want to set the onchange function and send 'this', I've tried these: s.onchange= function() {console.log(this.selectedIndex);}; s.addEventListener('click', myFunction.bind(s), false); But no luck, I'm still getting 'undefined'. What is this still showing undefined even if I am binding?

http://stackoverflow.com/q/28011327
answer count: 0
type: UnansweredQuestion
tagged with: javascript-objects
type: Question
has comment: http://stackoverflow.com/comment/44410237
has body: So I have this decorate function that takes an object and a method-name and wraps it with external logic. function decorate(object, methodName) { var originalMethod = object[methodName]; object[methodName] = function () { // pre-logic var retVal = originalMethod.apply(this, arguments); // post-logic return retVal; }; } Now I want to wrap ALL of the functions in my application, i.e. All the recursive public functions of the object All private scope functions All anonymous functions Anything else I might have forgotten. My purpose in doing this is to implement a "JS Profiler" that will run alongside my application during automated testing, and output performance data to logs. I need this for testing purposes, so the solution must have minimal changes to the actual code of my application. Possible solutions I've considered: Public methods can be easily traversed and replaced using a recursive object traversal function. Some hack using eval() to be able to access private methods. Ideally, to handle all cases, I could use a proxy HTTP server (Node.js for example) that will transform each javascript file before sending it to the browser. This way my codebase will remain clean, but my tests will have the necessary changes. The first 2 are only partial solutions, and the last one seems like an overkill and also a potential "bug factory"... Does anyone have any other ideas on how to achieve what I need?
tagged with: profiling
has title: js - How to decorate/proxy/spy on all functions? For creating a runtime profiler
tagged with: javascript
tagged with: trace
tagged with: decorator
has comment: http://stackoverflow.com/comment/44410197
score: 0

http://stackoverflow.com/comment/101546530
comment on: http://stackoverflow.com/q/28100048
score: 0
has text: There is a difference. You please read my second comment, I have explained it there.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44593954
type: Comment
type: QuestionComment
has text: Down Voter, Please let me know why so I can improve.
comment on: http://stackoverflow.com/q/28108594
score: 0

http://stackoverflow.com/a/28095486
downvote count: 0
type: Answer
has body: Plain JavaScript. Assuming number is a string: function isAllSameDigit(number){ for(var i = 0; i &lt; number.length; i++){ if(number[0] != number[i]) return false; } return true; } This will short circuit as soon as a difference is found.
upvote count: 1
answers question: http://stackoverflow.com/q/28095238
score: 1

http://stackoverflow.com/a/27968439
answers question: http://stackoverflow.com/q/27967988
has body: I'm not sure I see MUCH difference. It's easy to access the value at a given index/key var list = [1,2,3,4,5]; // or... var list = {a: 'foo', b: 'bar', c: 'baz'}; for (var item in list) console.log(list[item]); and as mentioned, you could use forEach for arrays or objects... heres an obj: var list = {a: 'foo', b: 'bar', c: 'baz'}; Object.keys(list).forEach(function(key, i) { console.log('VALUE: \n' + JSON.stringify(list[key], null, 4)); });
has comment: http://stackoverflow.com/comment/107872272
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/28059835
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: jQuery smooth scroll to new page link
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28060046
has body: Smooth scrolling works fine for same page. But I want smooth scroll to work for other pages when clicked on. For example, when I click on the services link from the home page, I need to go to that services page and smoothly scroll to that div tag. Can you help me for this. HTML code Home About Technology Team Jquery jQuery('.secondmenu a').click(function (e) { e.preventDefault(); var target = this.hash; if (this.href != '#') { jQuery('html, body').animate({ scrollTop: jQuery(target).offset().top - 60 }, 1000); } });

http://stackoverflow.com/q/28100058
answer count: 1
accepted answer: http://stackoverflow.com/a/28100384
tagged with: expression
upvote count: 3
has comment: http://stackoverflow.com/comment/44576311
tagged with: angularjs-scope
tagged with: arrays
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44576133
has answer: http://stackoverflow.com/a/28100384
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/44575883
favorite count: 0
has comment: http://stackoverflow.com/comment/44576216
has title: Angular expression get property of object from equal property in array of objects
tagged with: angularjs
type: Question
has body: Sorry for the bad title, couldn't really think of an apropriate one. Anyways, I have an array of objects, which are all listed in a ng-repeat. Then, I want to find the object in another array of objects, which has the same id as the one above and get another of its properties. I hope this example code will simplify things: $scope.discussions = [ { recipient: { id: 'theid' }, messages: [] } ]; $scope.friends = [ { id: 'theid', online: false } ]; And in my view I have: Online = {{//code here}} Tried both ng-class="{online: {{friends.some(fr => fr.id == discussion.recipient._id).online}}; }" and ng-class="{online: friends.some(fr => fr.id == discussion.recipient._id).online }"

http://stackoverflow.com/comment/44615613
type: AnswerComment
has text: @olfik - then there is javascript code in the page that is ruining/overriding the normal HTML behavior. We can't say how to stop that override without seeing a lot more about the page (probably seeing the actual page and link). If you tell us what the system is that makes the ajax based page work in the first place, perhaps folks can read about what that system is doing and how to avoid it for particular links. My guess is that links can be tagged in someway so that the ajax based system will leave them alone for normal processing.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/28119926

http://stackoverflow.com/a/28014783
answers question: http://stackoverflow.com/q/28014583
downvote count: 0
score: 1
has body: Since you are already using htmlspecialchars on the $price variable to display it, I can only assume that you do not trust the contents of this variable. For security reasons you should also json_encode the price, then escape the whole attribute when putting javascript in to an onclick attribute. As per How to escape string from PHP for javascript? <?php while($stmt->fetch()) { ?> <?php echo htmlspecialchars($company); ?> <td id='<?php echo htmlspecialchars($price); ?>'><?php echo htmlspecialchars($volume); ?> <td id='<?php echo htmlspecialchars($price); ?>'><?php echo htmlspecialchars($price); ?> Submit <input type='checkbox' style='opacity:0' checked='checked' onclick='<?php echo htmlspecialchars('handleClick(' . json_encode($price) . ');') ?>'/> <?php }
type: Answer
upvote count: 1

http://stackoverflow.com/q/28020540
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28020652
score: 0
answer count: 2
has body: I am looking for an alphanumeric Regex using Javascript that must have atlist 1 letter, so the string CAN'T be all numbers. 666 = invalid a666 = valid tried to look for a regex like this all over the web couldn't find one. was hoping you can help me out.
possible better answer: http://stackoverflow.com/a/28020707
tagged with: regex
has answer: http://stackoverflow.com/a/28020707
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28020652
has title: javascript regex alphanumeric at list 1 letter
type: Question
has comment: http://stackoverflow.com/comment/44427501

http://stackoverflow.com/a/28155052
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/28119461
score: -1
upvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28119461
has body: I had to do this manually to fix the problem. mystring.replace("?t","'t") and mystring.replace("?d","'d"). This works just fine

http://stackoverflow.com/comment/44343578
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27975409
has text: In my case, the data is the string that I want to write to the file in question -- so inside of the callback, would I then do the actual writing to the file? Or do I write to the file outside of the callback and it doesn't matter what I pass back to the callback?
type: AnswerComment

http://stackoverflow.com/a/28018932
score: 0
has body: There is a feature in IE called Tracking Protection List (TPL) which blocks your scripts, more details can be found here: http://blogs.msdn.com/b/ie/archive/2010/12/07/ie9-and-privacy-introducing-tracking-protection-v8.aspx You can however personalized your TPL: http://www.thewindowsclub.com/tracking-protection-list-internet-explorer OR Host copies of the scripts and fonts within your domain
answers question: http://stackoverflow.com/q/28017814
type: Answer
has comment: http://stackoverflow.com/comment/44443613

http://stackoverflow.com/comment/44346403
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27976943
has text: Use `then` instead of `done`, and **always `return` a promise** from asynchronous functions! A promise doesn't can't know what happens in its callbacks, and doesn't wait with anything about that.

http://stackoverflow.com/a/27976691
has body: No. Userscript is a content script which is ran in a sandbox and can only access certain GM_* apis. It can only modify webpage but not the ui or chrome page. You may need userChromeJs or create your own add-on to do that. BTW, if you want to add a menu shortcut in userscript for certain website, you may try GM_registerMenuCommand.
downvote count: 0
answers question: http://stackoverflow.com/q/27976475
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/44386335
type: AnswerComment
comment on: http://stackoverflow.com/a/27995981
type: Comment
has text: audioElements here is a sequential jQuery array of each of your HTML5 tag elements. When the DOM has loaded (document.ready...), a click event is bound to your #swig element. Upon clicking that, the following anonymous function is run. audioElements[index] is interpreted as audioElements[0] (meaning the first HTML5 audio element in the array). this element is played. Next the 'ended' event (built in to audio elements) is bound to a new anonymous function. Just like click earlier! index is incremented, allowing a different audio element to be referenced. Hooray recursion!
score: 0

http://stackoverflow.com/a/27977846
answers question: http://stackoverflow.com/q/27977601
score: 0
has body: Try this: var a='&amp;bull; This is string 1&lt;br /&gt;&amp;bull; This is string 2&lt;br /&gt;&amp;bull; This is string 3&lt;br /&gt;'; var r=a.split(/&amp;bull;\s*|&lt;br\s*\/&gt;/); var nr=r.filter(function(v){return v!==''}); console.log(nr); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
type: Answer

http://stackoverflow.com/comment/44578471
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28101420
type: Comment
has text: @PSL thank for the help again, i do missed your comment, it really helps!

http://stackoverflow.com/a/28063281
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/28063203
has comment: http://stackoverflow.com/comment/44507441
score: 9
answers question: http://stackoverflow.com/q/28063203
upvote count: 9
has body: Without seeing the rest of the code it's hard to say. Using jQuery you can create and trigger arbitrarily named events, see the fiddle below: var t = $('#t'); t.on('click', function () { t.trigger('bind'); }); t.on('bind', function () { alert("Bind called"); }); Click So it could very well be that the above code catches an event triggered somewhere else.
type: AcceptedAnswer

http://stackoverflow.com/a/27968438
score: 0
has body: Since it is open, you don't need to test it. When the user presses some button or click out of the modal dialog, you can just close it. $('.ui-dialog').fadeOut();
type: Answer
answers question: http://stackoverflow.com/q/27968170

jquery-validate
tags question: http://stackoverflow.com/q/28090222
tags question: http://stackoverflow.com/q/27987099
tags question: http://stackoverflow.com/q/28022317
type: Tag
tags question: http://stackoverflow.com/q/28000172
tags question: http://stackoverflow.com/q/28015264
tags question: http://stackoverflow.com/q/28062463
tag name: jquery-validate
tags question: http://stackoverflow.com/q/28119901
tags question: http://stackoverflow.com/q/28107384
tags question: http://stackoverflow.com/q/28083850
tags question: http://stackoverflow.com/q/28102711
tags question: http://stackoverflow.com/q/28069925
tags question: http://stackoverflow.com/q/27965397
tags question: http://stackoverflow.com/q/28100123
tags question: http://stackoverflow.com/q/28113036

http://stackoverflow.com/q/27974576
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27974689
type: Question
tagged with: angularjs-directive
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has title: DOM Manipulation and selection using jQuery or AngularJS?
tagged with: angularjs
tagged with: dom-manipulation
accepted answer: http://stackoverflow.com/a/27974689
has body: I started using AngularJS a while ago. I'm loving it - it's a very useful and powerful framework and I have built a couple of web apps already. Very little code, very effective, easy to understand, powerful functionality.. it's all great! As many other developers, I am used to jQuery a lot as I have been working with it for years. Now I'm not comparing jQuery to AngularJS because I understand that they are supposed to do their own things - AngularJS is a framework, whereas jQuery is a library so it's like comparing a table to a chair. But I just want to know would be the correct way to manipulate or select DOM in AngularJS? I'll give you an example. Let's say I have the following HTML: Hello world list item 1 list item 2 list item 3 And let's say I'm using TimelineLite to animate each element on document load. In jQuery, I would have something like this: var tl = new TimelineLite(); tl.staggerFrom($('.container').children(),1,{opacity:0},0.5); Now to do the same thing in AngularJS, I thought I would use a directive, and attach it to the .container div. something like this: app.directive('beautifulLoad',function(){ return { restrict: 'A', link: function(scope,element,attrs){ var tl = new TimelineLite(); var elms = element.children(); tl.staggerFrom(elms,2,{opacity:0},0.25); } } }) Would this be a right approach? What if I wanted to create separate animations for each element inside the .container div? In jQuery I would use a selector like this: $('.container h1') but can I not do the same thing in angularJS? So can I not have the following directive instead? app.directive('beautifulLoad',function(){ return { restrict: 'A', link: function(scope,element,attrs){ var tl = new TimelineLite(); tl.staggerFrom($(element).find('h1'),2,{opacity:0},0.25); } } }) Basically what I'm trying to ask is - is it a bad approach to use jQuery inside AngularJS directives and controllers in general?

http://stackoverflow.com/q/28085728
type: Question
has title: Hull.js npm module Node.js returns convex hull instead of concave hull
answer count: 1
tagged with: javascript
score: 0
has body: I use this node.js module: https://www.npmjs.com/package/hull.js to calculate concave hull. On this link in the section "How it works" there are 3 steps about how it works. But in my case the algorithm stops on the 2nd step. So, it gives me convex hull instead of concave. What is the problem? The version of npm is 1.1.4, and the version of node.js 0.6.12.
accepted answer: http://stackoverflow.com/a/28396044
tagged with: npm
has answer: http://stackoverflow.com/a/28396044
tagged with: node.js
tagged with: concave-hull
type: AnsweredQuestion

http://stackoverflow.com/comment/44580284
comment on: http://stackoverflow.com/a/28092356
type: AnswerComment
has text: You need to move the image loading into an AsyncTask - see edit
score: 0
type: Comment

http://stackoverflow.com/q/28061155
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/44511782
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44503610
linked to: http://stackoverflow.com/q/19888519
has comment: http://stackoverflow.com/comment/44503714
tagged with: ng-view
upvote count: 3
has body: I'm using angularJS to build a website and use angular-route library for view of different pages of website. my website is working well but there is a hash tag in url when i move on different views. for removal of hash tag I'm using $locationProvider.html5Mode(true); but this is not working on page refresh. My code is given below:- Index.html &lt;body data-ng-app="myapp" data-ng-controller="myctrl"&gt; &lt;div data-ng-include=" 'pages/menu.html'"&gt;&lt;/div&gt; &lt;div ng-view class="view-animate"&gt;&lt;/div&gt; &lt;div data-ng-include=" 'pages/footer.php' "&gt;&lt;/div&gt; &lt;body&gt; app.js 'use-strict' var tc = angular.module('myapp', ['ngRoute']); tc.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider .when('/home', { templateUrl: 'pages/home.html', }) .when('/about', { templateUrl: 'pages/about.html', }) .otherwise({ redirectTo: '/home' }) }]);
type: Question
has answer: http://stackoverflow.com/a/28061386
has comment: http://stackoverflow.com/comment/44503795
score: 3
has answer: http://stackoverflow.com/a/28061291
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/28061285
has title: Clean URL or Removing Hasg tag from URL in angular ng-view

http://stackoverflow.com/comment/44417271
type: QuestionComment
comment on: http://stackoverflow.com/q/28015013
type: Comment
has text: So this means that `response` contains that full HTML code. You can do two things: 1, Parse the content in JavaScript or 2 (probably best), modify the PHP code so it only return the number. If you need help with that, you will need to share the PHP code too.
score: 0

http://stackoverflow.com/comment/44490588
type: AnswerComment
has text: @mikswe I think that he assumed you wanted the preview to appear when the form gets submitted. It seems like you actually want it when focus leaves a text field, so it would go inside your focusout method in your example (but you probably want to change it so it does focusout on any input field, instead of just fname)
comment on: http://stackoverflow.com/a/28054095
score: 0
type: Comment

http://stackoverflow.com/comment/44485729
comment on: http://stackoverflow.com/a/28051685
type: AnswerComment
score: 0
type: Comment
has text: because that's how `indexOf()` works. Will return `-1` for no match

http://stackoverflow.com/a/27971447
downvote count: 0
has body: As others have stated the style is handled by the browser but you could create your own. Heres the fiddle: http://jsfiddle.net/LdmgeLsv/5/ and the code Click OK to do something cool. OK Cancel
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/27971075
score: 2

http://stackoverflow.com/comment/44581402
score: 1
comment on: http://stackoverflow.com/q/28103145
type: QuestionComment
has text: I'd say that bulding a slideshow with background images set in CSS isn't a very good idea, and has it's limits. That's why all the slideshow plugins use image elements, it's a lot easier to access and control
type: Comment

http://stackoverflow.com/a/28094576
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/44565765
has comment: http://stackoverflow.com/comment/44599239
has comment: http://stackoverflow.com/comment/44573834
answers question: http://stackoverflow.com/q/28093480
upvote count: 3
has comment: http://stackoverflow.com/comment/44565806
has body: You need to add trigger: 'hover' to the options object as below: $('.popover-markup > .trigger').popover({ html : true, title: function() { return $(this).parent().find('.head').html(); }, content: function() { return $(this).parent().find('.content').html(); }, container: 'body', placement: 'bottom', trigger: 'hover' }); This link triggers the popover. This is the popover title. This is the popover content.
type: Answer

http://stackoverflow.com/comment/44423155
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28018081
score: 0
has text: Can you post the rest of your code?

http://stackoverflow.com/q/28009771
has body: Is it possible to annotate JavaScript function parameters as can be done with attributes in C#? Example (C#): public void DoSomething([RequiredAction(Action="some_action")] Client client) { // ... } The aim is - given a function - use reflection to inspect for instance the "type" of the parameters and perform the necessary conversions before calling it. JavaScript is indeed dynamically typed, but one could for instance want to use annotations to define the "type" of instances, a specific function expects (for instance, param should be an integer, or an array). EDIT: The type aspect is only one possible use of an annotation. One could for instance also specify one must first run a specific function on that attribute or aspects like the maximum allowed length of an array. One can of course use this answer and annotate the parameters by using specific parameter prefixes. For instance the Hungarian notation where sParam would identify the parameter should be a string. But that's not really convenient nor that extensible since it requires to specify names. Is there a more generic way to achieve this?
tagged with: annotate
has answer: http://stackoverflow.com/a/28009939
has title: Annotate javascript function parameters?
tagged with: reflection
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44407557
has comment: http://stackoverflow.com/comment/44407279
score: 7
tagged with: javascript
has comment: http://stackoverflow.com/comment/44407269
has comment: http://stackoverflow.com/comment/44407429
linked to: http://stackoverflow.com/q/1007981
type: Question
has comment: http://stackoverflow.com/comment/44407507
answer count: 2
upvote count: 7
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/58752439

http://stackoverflow.com/a/28098027
answers question: http://stackoverflow.com/q/28097933
score: 0
has body: If I understand you correct, you are looking for a power set algorithm. If so, you'll find a JavaScript implementation you can modify here: http://rosettacode.org/wiki/Power_set
type: Answer
has comment: http://stackoverflow.com/comment/44572688

http://stackoverflow.com/comment/44467322
comment on: http://stackoverflow.com/q/28041566
has text: Obviously the problem is in the input string. Dump it to the browser console just before splitting.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44327466
comment on: http://stackoverflow.com/q/27966791
type: Comment
type: QuestionComment
has text: Please add your code in JSFiddle and post the link, so we can see what happens.
score: 0

http://stackoverflow.com/a/28002851
has body: You have a mistake in your HTML as you define id="userName" twice. If you compare strings you always need the === identical operator. Try out this snippet: // I used this to check if the actual input was being updated $('#text_value').click(function() { var text_value = $("#userName").val(); if (text_value === '') alert("Please enter a title first"); else alert(text_value); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="text" id="Uname" name="typeit" value="" /&gt; &lt;!-- Input containing preset value --&gt; &lt;input type="text" id="userName" name="typeit" value="cindy" /&gt; &lt;input type="button" id="text_value" value="send" /&gt; &lt;div id="test"&gt;&lt;/div&gt;
type: Answer
score: 0
answers question: http://stackoverflow.com/q/28002721

http://stackoverflow.com/comment/44564284
has text: Not at all... In my PhoneGap application, I am converting to base64 at the time the local image is loaded, then setting the src to the base64 image. Let me see if I can modify my code to work for your needs.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28093914

http://stackoverflow.com/a/28032676
has body: It should be $httpProvider instead of $http only At angular configuration time provider will be accesible as suffix with 'Provider' Its preferable to set providers setting in configuration phase of angular rather than run phase.
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/28032604

http://stackoverflow.com/a/28136431
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/28117099
has body: The Solution I'm using now (which in fact is the Solution charlietfl brought up in the Comments) is this: $(function(){ var list = $("ul"), lis = list.children(), first_li = lis.first(), list_width, first_li_width, items_per_line var set_vars = function(){ list_width = list.width() first_li_width = first_li.width() items_per_row = Math.floor(list_width / first_li_width) } set_vars() lis.click(function(){ index = lis.index(this) next_first_index = index + (items_per_row - (index % items_per_row)) console.log(next_first_index) }) $(window).resize(function(){ set_vars() }) })
answers question: http://stackoverflow.com/q/28117099

http://stackoverflow.com/q/28112078
has body: In my html file I have the following table: Title Name {{instructor.title}} {{instructor.name}} Here's how controller looks: angular.module('angularFrontendApp') .controller('InstructorCtrl', function ($scope, Instructor) { $scope.instructors = []; $scope.instructors = Instructor.query(); }); Injected Instructor is the factory: angular.module('angularFrontendApp') .factory('Instructor', function ($resource) { return $resource('http://localhost:9000/api/instructor'); }); Most of the time the table is rendered just fine: But I noticed that when I reload the page a few times, the table sometimes looks like so: I thought that the problem occurs when the ng-repeat kicks off when the $resource's $promise is still not resolved. So I've set the breakpoint in my backend method which returns the list of instructors. When the execution was stopped, only the table header was rendered on the page. When the execution was continued and data sent from server, the table rendered just fine. Seems pretty strange to me.
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44598081
accepted answer: http://stackoverflow.com/a/28113054
answer count: 1
downvote count: 0
score: 1
tagged with: angularjs-ng-repeat
has title: AngularJS - $resource + ng-repeat issue
favorite count: 0
has comment: http://stackoverflow.com/comment/44598303
tagged with: angularjs
upvote count: 1
tagged with: ngresource
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28113054

http://stackoverflow.com/a/28037795
has comment: http://stackoverflow.com/comment/44460919
has comment: http://stackoverflow.com/comment/44460679
downvote count: 0
has comment: http://stackoverflow.com/comment/44460123
score: 1
has comment: http://stackoverflow.com/comment/44460052
has comment: http://stackoverflow.com/comment/44460153
answers question: http://stackoverflow.com/q/28037680
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28037680
has comment: http://stackoverflow.com/comment/44460404
has comment: http://stackoverflow.com/comment/44461544
has body: Try replacing 1920 with "window.innerWidth". Thats a JS DOM variable for the width of the browser window.
has comment: http://stackoverflow.com/comment/44460320
type: Answer

http://stackoverflow.com/a/28085384
type: Answer
answers question: http://stackoverflow.com/q/28085201
score: 1
upvote count: 1
has body: function check_status(obj){ var uid = obj.options[obj.selectedIndex].getAttribute('data'); alert(uid); }
downvote count: 0

http://stackoverflow.com/comment/44461983
type: Comment
comment on: http://stackoverflow.com/a/28038231
score: 0
type: AnswerComment
has text: Finally I found error in my real code. Of course, I forgot to use 'var' (in other place of code, but also influencing on passing values). Thank U!

http://stackoverflow.com/q/28038634
has answer: http://stackoverflow.com/a/28038670
has comment: http://stackoverflow.com/comment/44461501
upvote count: 1
has body: I want to change a date's format in JavaScript. I tried var today = new Date(); today.toLocaleFormat('%d-%b-%Y'); but that didn't work. How can I approach this problem?
linked to: http://stackoverflow.com/q/17032735
has comment: http://stackoverflow.com/comment/44461445
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/44461366
has title: How to change Date format in JavaScript?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44461349
score: -1
tagged with: date
type: Question
has answer: http://stackoverflow.com/a/28038828
accepted answer: http://stackoverflow.com/a/28038828
downvote count: 2
possible better answer: http://stackoverflow.com/a/28038670
has answer: http://stackoverflow.com/a/28038672
linked to: http://stackoverflow.com/q/3552461
has answer: http://stackoverflow.com/a/28038669
tagged with: javascript

http://stackoverflow.com/q/27971956
answer count: 1
has answer: http://stackoverflow.com/a/28000691
type: UnansweredQuestion
has title: Plotting with Flot Chart and using selection based Zoom, causes part of the chart to resize
tagged with: plot
has body: I am using flotcharts. That out of the way I appear to be having a random semi-reproducible issue where every so often when a selection is made, and the chart zooms in. Sometimes the grid area of the chart appears to physically resize, even though I am not apply any different settings or widths to anything. Its some type of glitch in the matrix I can't figure out. Im hoping that someone here might be able to help me sort this out having maybe run into a similar issue. $(idStr).bind("plotselected", function (event, ranges) { console.log(ranges); plot_base = a_charts.findBindingPlot('#'+$(this).attr('id')); console.log(plot_base); if(plot_base !== null &amp;&amp; plot_base !== undefined) { plot = $.plot(plot_base.chart_id, plot_base.chart_data, plot_base.chart_settings); $.each(plot.getXAxes(), function(_, axis) { var opts = axis.options; opts.min = ranges.xaxis.from; opts.max = ranges.xaxis.to; console.log(opts); }); plot.setupGrid(); plot.draw(); plot.clearSelection(); } }); Before Zooming: After Zooming a couple times getting it to glitch:
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: flot

http://stackoverflow.com/q/28085807
tagged with: typeahead.js
accepted answer: http://stackoverflow.com/a/28089029
has body: I have run into issues while writing a web-app to fetch JSON data from our CRM application. What I want to do is use Twitter's typeahead.js plugin to remotely fetch customer information from our CRM application. Microsoft does provide a way to use JSON data to communicate. They call it OData. However, this does not look like your typical JSON responses. This is why I have trouble setting up the typeahead plugin with it. When I send a GET request to the API URL, I get the following response: { "d":{ "results":[ { "__metadata":{ "uri":"http://*****/*****/XRMServices/2011/OrganizationData.svc/AccountSet(guid'de227fde-fb40-dd11-b5d3-001cc46325e5')", "type":"Microsoft.Crm.Sdk.Data.Services.Account" }, "Name":"Some company as", "AccountId":"de227fde-fb40-dd11-b5d3-001cc46325e5" }, { "__metadata":{ "uri":"http://*****/*****/XRMServices/2011/OrganizationData.svc/AccountSet(guid'5dc70a19-e91e-e311-9ad7-005056ac083a')", "type":"Microsoft.Crm.Sdk.Data.Services.Account" }, "Name":"Compnay AS", "AccountId":"5dc70a19-e91e-e311-9ad7-005056ac083a" } ] } } So here is the question: How do I setup Twitter's typeahead plugin to work with this data structure? I want the Name value from the JSON response when displaying the suggestions. And I want to grab the associated AccountId value when a suggestion is selected. This is what I got in my code so far: HTML: Company :: Time Registrering JavaScript: (js/global.js) $(document).ready(function () { var accounts = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('Name'), queryTokenizer: Bloodhound.tokenizers.whitespace, remote: "http://*****/*****/xrmservices/2011/OrganizationData.svc/AccountSet?$select=Name,AccountId&$filter=substringof('%QUERY',Name) and StateCode/Value eq 0" }); accounts.initialize(); $("#account").typeahead({ hint: true, highlight: true, minLength: 2 }, { name: 'account', displayKey: 'd.results[0].Name', source: accounts.ttAdapter() }); }); However: My code does not work. All I get is a text saying "…
has answer: http://stackoverflow.com/a/28089029
possible better answer: http://stackoverflow.com/a/28089044
has answer: http://stackoverflow.com/a/28089044
type: AnsweredQuestion
tagged with: bloodhound
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2
has title: How do I use Twitters typeahead.js with Microsoft OData API's?
tagged with: javascript
score: 0

http://stackoverflow.com/q/28105909
score: 3
downvote count: 1
has answer: http://stackoverflow.com/a/28106016
type: Question
upvote count: 4
tagged with: javascript
tagged with: variables
has answer: http://stackoverflow.com/a/28106172
has answer: http://stackoverflow.com/a/28106012
has answer: http://stackoverflow.com/a/28105970
favorite count: 0
has title: Confused with the variable in js
type: UnansweredQuestion
has body: function Person(name){ var age; this.name = name; this.setAge = function(a){ age = a; } this.getAge = function(){ return age; } } var p0 = new Person("John"); p0.setAge(24); console.log("p0.getAge "+p0.getAge());//p0.getAge 24 var p1 = new Person("Mike") p1.setAge("25"); console.log("p0.getAge "+p0.getAge());//I think the output here should be p0.getAge 25,but it is p0.getAge 24 console.log("p1.getAge "+p1.getAge());//p0.getAge 25 The variable "age" does not belong to any instance of Person as there is no "this.age" in the constructor of Person and it should be shared by instance of Person at first, But the result is not what i expected. I'm confused!
answer count: 4
has comment: http://stackoverflow.com/comment/44586410

http://stackoverflow.com/comment/44381924
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27995700
has text: @MarcoDelValle because the item and content is align side by side, when I scroll either one side, and i come back, the scroll history isn't the same anymore..
score: 0

http://stackoverflow.com/q/28109001
tagged with: angularjs-ng-repeat
tagged with: ng-bind
tagged with: angularjs
has answer: http://stackoverflow.com/a/28110052
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44593308
type: Question
accepted answer: http://stackoverflow.com/a/28110052
has title: ng-repeat / ng-bind wont show my data
tagged with: javascript
tagged with: angularjs-scope
score: 0
has body: The problem that i am getting is that my ng-repeat / ng-bind won't show the data inside $scope.articles. while in the console i get the data im expecting. I now made a code snippit so it's easier to discover the problem. var App = angular.module('App', []); App.controller('WebCtrl', function($scope, $http) { $scope.start = [{ "id": 1, "text": "test1" }, { "id": 2, "text": "test2" }, { "id": 3, "text": "test3" }, { "id": 4, "text": "test4" }]; $scope.articles = $scope.start; $http.get('/') .then(function() { $scope.menu = function(id) { $scope.articles = $scope.start[id]; console.log($scope.articles); } }); }); Todos $http 1 2 3 4 {{article.text}}
answer count: 1
has comment: http://stackoverflow.com/comment/44592741
has comment: http://stackoverflow.com/comment/44592549

http://stackoverflow.com/comment/44323016
has text: Why do you need to add dynamically `ngClass`? You have directive, just add the class to element what you want through `element.addClass()`
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27964593
type: AnswerComment

http://stackoverflow.com/a/28035100
upvote count: 1
has body: You can use Pythagoras to find points within circle. a^2 + b^2 = c^2 The following SQL uses PDO to find points within the radius of circle $stmt = $dbh-&gt;prepare("SELECT name, lat, lng, ( SQRT(POW(? - lat, 2) + POW(? - lng, 2))) AS distance FROM mytable HAVING distance &lt; ? ORDER BY distance ASC "); // Assign parameters $stmt-&gt;bindParam(1,$center_lat);//Center of circle $stmt-&gt;bindParam(2,$center_lng);////Center of circle $stmt-&gt;bindParam(3,$radius); Javascript function if required function Pythagoras (x1,y1,x2,y2){ var Dist = Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)); return Dist ; }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28031516
answers question: http://stackoverflow.com/q/28031516
type: Answer
score: 1

http://stackoverflow.com/a/28077494
has comment: http://stackoverflow.com/comment/44580647
has comment: http://stackoverflow.com/comment/44581115
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44599929
accepted answer of: http://stackoverflow.com/q/28077271
answers question: http://stackoverflow.com/q/28077271
has body: Try using $( "#test1" ).on('tooltip') or move your code to the callback function of the XMLHttpRequest You should study ajax and event handling in jquery since you are including it already in your code $('select').on('change', function(){//better to use and id on the select element $this = $(this);//creating an alias of the current selected item as a jquery object- so i use a $ in the var name to remind me its a jquery object $('#test').load('test.php?a='+$this.val(), function(){//[load][2] a quick function to fill a element with the result of the request $( "#test" ).tooltip({ content: '&lt;img src="http://www.lessons4living.com/images/penclchk.gif"/&gt;' }); $( "[title]" ).tooltip({ position: { my: "left top", at: "right+5 top-5" }); });//end load handler });//end on select
has comment: http://stackoverflow.com/comment/44597553
type: Answer

http://stackoverflow.com/q/28033729
type: AnsweredQuestion
has body: When I further check debugging and I found that it does passing the json data, here are the screen shots of debugging. Demo PLNKR <link primaryGenreName country
has answer: http://stackoverflow.com/a/28034759
upvote count: 5
has answer: http://stackoverflow.com/a/66321118
type: Question
accepted answer: http://stackoverflow.com/a/28034759
has comment: http://stackoverflow.com/comment/44453460
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/66321118
tagged with: jquery
tagged with: jquery-plugins
answer count: 3
has comment: http://stackoverflow.com/comment/44453303
tagged with: datatables
has title: DataTables - _fnAjaxDataSrc - Cannot read property 'length' of undefined
favorite count: 0
score: 5
has comment: http://stackoverflow.com/comment/44453370
has answer: http://stackoverflow.com/a/68171585
has comment: http://stackoverflow.com/comment/44453491

http://stackoverflow.com/comment/44505881
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28062553
has text: @boshkash: Can you provide the CSS also of `dataContentSection`

http://stackoverflow.com/comment/44585034
has text: i cannot because, i need to see what i drawing in real time
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28105192
score: 0

http://stackoverflow.com/comment/44372853
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27975188
type: Comment
has text: yeah! the API response: Unknown search parameter 'callback'"

http://stackoverflow.com/comment/44536252
comment on: http://stackoverflow.com/q/28073088
type: Comment
type: QuestionComment
has text: @jfriend00 I listed this out, hope it is clear enough. Thanks.
score: 0

http://stackoverflow.com/q/27996033
tagged with: node.js
has answer: http://stackoverflow.com/a/27996310
has answer: http://stackoverflow.com/a/27996148
tagged with: propertychanged
has title: How to raise property change events?
type: Question
answer count: 2
tagged with: javascript
score: 0
type: UnansweredQuestion
has body: I have the following javascript data model: function User(uid, usr_name, usr_pwd, usr_enbld) { var id = uid == null ? uuid.v4() : uid; var name = usr_name; var password = usr_pwd; var enabled = usr_enbld; Object.defineProperty(this, "id", { get: function () { return id; } }); Object.defineProperty(this, "name", { get: function () { return name; }, set: function (value) { name = value; } }); Object.defineProperty(this, "password", { get: function () { return password; }, set: function (value) { password = value; } }); Object.defineProperty(this, "enabled", { get: function () { return enabled; }, set: function (value) { if (!value instanceof Boolean) { // log - type error, must be true/false return; } enabled = value; } }); } I am trying to find out how to raise events when one of the properties are changed. The observer libraries I've found for nodejs all seem very difficult. Maybe I didn't implement it properly, but I thought that I would be able to use bindandtrigger` on a "propertyChanged" event. But that didn't work.

http://stackoverflow.com/comment/44535453
has text: @pawel, Thanks, I didn't consider node.js, but after considering what the OP is trying to do, that makes a lot of sense :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28078009
type: AnswerComment

http://stackoverflow.com/comment/44524365
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28072405
has text: You've added the JS, we need to see the PHP.
score: 0

http://stackoverflow.com/comment/44643776
comment on: http://stackoverflow.com/a/28120247
type: Comment
has text: #Just saw your fiddle# Now i see. Since it is now an object you wrote the function outside the loop and the monster health can now be affected. Understanding that was the root problem, i guess. I was checking it inside with the a bool. But yours is more elegant of course.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44371645
comment on: http://stackoverflow.com/a/27971898
score: 0
type: Comment
has text: yes, ok, but it is still local, I can sent you email mine is: niels.fischereinie@gmail.com
type: AnswerComment

http://stackoverflow.com/comment/44365481
has text: Hi, I have multiople elements with ".country" and ".state" designations, so the ids per each would need to be unique. Because I have multiple country and sttae elements, I was tryign to find a selector that accessed the sibling state element relative to a known country element.
comment on: http://stackoverflow.com/a/27974159
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27966107
type: Question
score: -5
downvote count: 5
has comment: http://stackoverflow.com/comment/44325088
answer count: 2
upvote count: 0
linked to: http://stackoverflow.com/q/901115
has comment: http://stackoverflow.com/comment/44324968
tagged with: url
accepted answer: http://stackoverflow.com/a/27966201
tagged with: javascript
favorite count: 0
has title: How do i check if my string contains certain words
has comment: http://stackoverflow.com/comment/44324988
has comment: http://stackoverflow.com/comment/44325052
has answer: http://stackoverflow.com/a/27966634
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44325050
has body: i'm trying to check if my url contains the word brand. as you can see i put my url into the variable url and now i want to check if that variable contains the word brand and replace it. My only problem is that i can't seem to find the code to check if it contains the word brand. How do i do this? navigate
possible better answer: http://stackoverflow.com/a/27966634
linked to: http://stackoverflow.com/q/1789945
has answer: http://stackoverflow.com/a/27966201

http://stackoverflow.com/a/28046615
answers question: http://stackoverflow.com/q/28046360
downvote count: 0
has comment: http://stackoverflow.com/comment/44710430
has comment: http://stackoverflow.com/comment/44667623
type: Answer
has comment: http://stackoverflow.com/comment/44709460
has body: In the exercise1.html: In the result.html:
upvote count: 1
score: 1

http://stackoverflow.com/q/27966155
type: UnansweredQuestion
type: Question
tagged with: google-maps
answer count: 1
tagged with: javascript
has body: I've stumbled upon this issue when drawing a polygon on a touch screen device: Drawing mode is set to google.maps.drawing.OverlayType.POLYGON User pans the map by touch, hold and then dragging the finger on the screen. Then the user taps on the screen to start the creation of a polygon. BUT then a "ghost" line is drawn from where the map was centered before to the position of the starting point of the polygon. Screenshot from my iPhone: The line looks like what you get when the mouse pointer is hovering over the map on a desktop browser. But of course a touch device does not have a mouse pointer. Maybe it's a mouse-event bug in the GMaps API? Any suggestions on how to avoid/remove this unwanted line? It's possible to reproduce the issue with by pointing your smart phone/pad to this fiddle: http://jsfiddle.net/w1my558L/. $(function () { var myLatlng = new google.maps.LatLng(60.629765, 6.424094); var myOptions = { zoom: 14, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var drawingManager = new google.maps.drawing.DrawingManager({ drawingControl: false, polygonOptions: { editable: true } }); var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); drawingManager.setMap(map); drawingManager.setDrawingMode(google.maps.drawing.OverlayType.POLYGON); });
tagged with: google-maps-api-3
tagged with: touch
score: 0
has answer: http://stackoverflow.com/a/31483801
has title: Google Maps API 3: Unwanted polygon line on touch devices

http://stackoverflow.com/comment/44532341
has text: @Jesse Thank you. That helps. I guess I'm stuck on the part where I have to figure out how to load in my home content. I'm doing this through Ajax so am I supposed to be calling Ajax within the click event? Do I add anything to the last code block?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28076472

http://stackoverflow.com/q/27970513
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27970560
favorite count: 0
has comment: http://stackoverflow.com/comment/44333742
has title: Check if every elemnt from a form is filled JQUERY
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has comment: http://stackoverflow.com/comment/44333753
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27970560
score: 1
tagged with: forms
type: Question
has body: I have a form with all types of form elemnts and I have a code that should run through every single one of the elemnts and check their value after the submit button is clicked. Unfortunatelly, this code doesn't work completely. What I mean is that if I don't enter any value in the input, it will print the message, but if I enter some text in it, we go to the else statement, without checking the other. Could somebody tell me why? if($('form.registration-form :input').val() == '') { // Print Error Message } else { // Do something else }
answer count: 1
downvote count: 0

http://stackoverflow.com/q/28057956
has comment: http://stackoverflow.com/comment/44500490
has title: Is there a way to not lose focus selection when replacing HTML with text in a contenteditable div?
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/17678843
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/28065347
accepted answer: http://stackoverflow.com/a/28065347
tagged with: contenteditable
has comment: http://stackoverflow.com/comment/44502137
has body: I have a div tag that I make editable. I do not want any HTML in that tag so I do not let users enter any. However, when the user does a copy / paste, it is not unlikely to include tags. I have some jQuery code to capture the paste event and just in case I tried using my saveSelection() and restoreSelection() functions which I show below which work find in many situations but here they fail... Fiddle: http://jsfiddle.net/9wm0oeah/2/ jQuery("#that_div").on("paste", function() { setTimeout(function() { // remove any HTML var selection = saveSelection(); jQuery("#that_div").text(jQuery("#that_div").text()); restoreSelection(selection); }, 0); }); function saveSelection() { var sel; if(document.selection) { return document.selection.createRange(); } else { sel = window.getSelection(); if(sel.getRangeAt &amp;&amp; sel.rangeCount &gt; 0) { return sel.getRangeAt(0); } else { return null; } } //NOTREACHED } function restoreSelection(range) { var sel; if(document.selection) { range.select(); } else { sel = window.getSelection(); sel.removeAllRanges(); sel.addRange((range)); } } Do you have any idea why it fails?
type: AnsweredQuestion

http://stackoverflow.com/q/28079139
has body: I am trying to add a double Y-axis in Chart.js for two dataset comparisons. I'm currently using Leigh Quince's LineBar extension which was the answer found here: Chart.js how to get Combined Bar and line charts? There is also a solution written about a year ago for double Y-axis but only for a Line charts, and its way out of sync with Nick's master. Seems there's either Line and Bar charts, or Double-Y but not both. My issue here is that I need to represent TSAT % (Saturation levels), left Y-axis, Line Chart, to the amount of Ferritin dosage levels, right Y-axis Bar Chart. Here's what I need it to look like: (Seems Stackoverflow has changed the color of it on me, hope you can still read the Y-Axis scales) If someone can comp up with a solution I would be greatly appreciative. Current code: var data = { labels: ["Jun 2013", "Jul 2013","Aug 2013","Sep 2013","Oct 2013","Nov 2013","Dec 2013", "Jan 2014", "Feb 2014", "Mar 2014", "Apr 2014", "May 2014"], datasets: [ { label: "TSAT", type: "line", fillColor: "transparent", strokeColor: "#a33a59", pointColor: "#a33a59", pointHighlightStroke: "#FFF", data:[33,32.9,32.9,33.2,33.2,33.2,32.7,32.9,32.9,32.7,32.7,32.7] }, { label: "Ferritin", type: "bar", fillColor: "#ed7141", strokeColor: "#ed7141", data: [939,929,949,991,992,993,976,976,973,986,972,939] } ] }; var options = { responsive: true, scaleOverride: true, scaleSteps: 10, scaleStepWidth: 5, scaleStartValue: 0, showTooltips: false, pointDot: true, pointDotRadius : 10, datasetStrokeWidth : 3, bezierCurve : false, scaleShowLines: false, scaleGridLineWidth : 2, scaleGridLineColor : "#EEEEEE", scaleLineWidth: 3, scaleLineColor: "#000000", scaleFontFamily: 'Gotham Book,sans-serif', scaleFontSize: 18, } ctx = $("#myChart").get(0).getContext("2d"); TSATChart = new Chart(ctx).LineBar(data, options); BTW... I modified Quince's LineBar to render Bar first then lines. The code originally had it reversed. As such, I may not be able to add something to jsfiddle, I will edit and add a…
has comment: http://stackoverflow.com/comment/45322106
tagged with: chart.js
has comment: http://stackoverflow.com/comment/53969970
score: 9
type: Question
tagged with: charts
linked to: http://stackoverflow.com/q/25811425
upvote count: 9
tagged with: javascript
has comment: http://stackoverflow.com/comment/52795807
has title: How to add second Y-axis for Bar and Line chart in Chart.js?
downvote count: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/32249575
favorite count: 0
linked to: http://stackoverflow.com/q/33236941
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/54330559

http://stackoverflow.com/comment/44511060
score: 2
comment on: http://stackoverflow.com/q/28065241
type: QuestionComment
type: Comment
has text: You would just loadtest the server, by making lots of requests to the static resources and also load test your api. Have a look at [jmeter](http://jmeter.apache.org/)

http://stackoverflow.com/comment/44646988
type: QuestionComment
comment on: http://stackoverflow.com/q/28027726
has text: v1.6.2 but i do not think it is a version related issue because other applications using the same version and working just fine
score: 0
type: Comment

http://stackoverflow.com/q/28038346
possible better answer: http://stackoverflow.com/a/28038418
score: 1
tagged with: mysql
downvote count: 1
linked to: http://stackoverflow.com/q/1384074
accepted answer: http://stackoverflow.com/a/28038637
type: Question
has answer: http://stackoverflow.com/a/28038425
tagged with: javascript
has answer: http://stackoverflow.com/a/28038637
has answer: http://stackoverflow.com/a/28038418
answer count: 3
favorite count: 0
upvote count: 2
has body: So I have an input text that is used to determine the amount of the purchase of item in my shopping cart. Each item has a different maximum amount of purchases, the maximum number of purchases (max) is obtained from the mysql database. I want if user input the number of items exceeds the maximum limit, then a warning appear. The shopping chart and the amount : The database example: id_item | item | brands | max - - - - - - - - - - - - - - - - - - - - - - - 1 | Baskom Sedang | Lion Star |2 2 | Pinset Anatomi| Selako |5 3 | Tromol | Selako |7 So for example if i type 3 in the "Baskom sedang" amounts (exceeding max limits), i want alert to appear. I know I'm supposed to include a javascript/code that I try, but I do not have any idea about the javascript, i'm not good with javascript. Thank you..
has title: Set maximum number input text from database in php/javascript
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/a/27995626
answers question: http://stackoverflow.com/q/27995303
type: Answer
has body: There are a lot of opinions of how to best structure an Angular app. You seem to be headed in a good direction. Here's how I prefer to do it: In your index.html, include your scripts individually. The self-invoking anonymous functions will set themselves up with Angular. Use a build process like Grunt or Gulp to minify and concatenate these later. &lt;script src="main.js"&gt;&lt;/script&gt; &lt;script src="Controller1.js"&gt;&lt;/script&gt; &lt;script src="Factory1.js"&gt;&lt;/script&gt; In your main.js (I call it app.js typically, I think it's user prefererence). (function() { 'use strict'; angular .module('MyApp', [ // any module dependencies ]); })(); In your Controller1.js, set up your controller, define it as an Angular controller and part of the application. (function() { 'use strict'; angular .module('MyApp') .controller('Controller1', Controller1); function Controller1($scope) { // do something } })(); In your Factory1.js, set up your factory function and define it as an Angular factory and part of the application. (function() { 'use strict'; angular .module('MyApp') .controller('Factory1', Factory1); function Factory1() { return function() { // return something }; } })(); After that, there isn't much to do. My main.js usually has a config function in it and handles the routing. You can initialize the app by adding the ng-app="MyApp" to your html or body. You can initialize your Controller1 simply by adding the attribute ng-controller="Controller1" to an element in your DOM. If you need Factory1 to be accessible by Controller1, then when you define the function Controller1 in Controller1.js, do it like so function Controller1($scope, Factory1) {}. That's all you really need to get it up and running with separate files.
score: 0

http://stackoverflow.com/comment/44333877
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27970365
has text: Better than hardcoding the prefix of the control (because that can change) you should change the ClientIdMode at the `web.config` level. Then the ID on the server side will match the ID on the client side.

http://stackoverflow.com/q/28036579
downvote count: 0
type: UnansweredQuestion
tagged with: charts
has comment: http://stackoverflow.com/comment/50354073
has title: react-chartjs pie chart not rendering
score: 7
has comment: http://stackoverflow.com/comment/44489445
tagged with: javascript
has comment: http://stackoverflow.com/comment/44541215
type: Question
tagged with: reactjs
answer count: 2
has comment: http://stackoverflow.com/comment/52042496
upvote count: 7
favorite count: 0
has body: I copied the react-chartjs folder and did the below: Did requiring of the react-chartjs/pie library at the top. I do not see any console errors but my pie chart is not rendered. I even tried putting all options mentioned here. var PieChart = require('../../components/react-chartjs/pie'); var MyComponent = React.createClass({ render: function() { var pieOptions = { animatable: true, }; var pieData = [ { value: 300, color:"#F7464A", highlight: "#FF5A5E", label: "Red" }, { value: 50, color: "#46BFBD", highlight: "#5AD3D1", label: "Green" }, { value: 100, color: "#FDB45C", highlight: "#FFC870", label: "Yellow" }, { value: 40, color: "#949FB1", highlight: "#A8B3C5", label: "Grey" }, { value: 120, color: "#4D5360", highlight: "#616774", label: "Dark Grey" } ]; return &lt;PieChart data={pieData} options={pieOptions}/&gt; } }); $(function(){ var feedsList = Global_feedsList; console.log("feeds:"+feedsList); React.renderComponent( &lt;BreadCrumb breadCrumbs={['Admin','Brokers']}/&gt;, document.getElementById('ribbon') ); React.renderComponent( &lt;PVDashboard feedsList={feedsList}/&gt;, document.getElementById('content') ); React.renderComponent( &lt;MyComponent /&gt;, document.getElementById('mycomponent') ); }) var pieOptions = { animatable: true, segmentShowStroke : true, segmentStrokeColor : "#fff", segmentStrokeWidth : 2, percentageInnerCutout : 0, animationSteps : 100, animationEasing : "easeOutBounce", animateRotate : true, legendTemplate : "&lt;ul class=\"&lt;%=name.toLowerCase()%&gt;-legend\"&gt;&lt;% for (var i=0; i&lt;segments.length; i++){%&gt;&lt;li&gt;&lt;span style=\"background-color:&lt;%=segments[i].fillColor%&gt;\"&gt;&lt;/span&gt;&lt;%if(segments[i].label){%&gt;&lt;%=segments[i].label%&gt;&lt;%}%&gt;&lt;/li&gt;&lt;%}%&gt;&lt;/ul&gt;" }; Used both these sites as references to write above code: http://jhudson8.github.io/react-chartjs/index.html http://www.chartjs.org/docs/#doughnut-pie-chart
has answer: http://stackoverflow.com/a/34688750
has answer: http://stackoverflow.com/a/34866495

http://stackoverflow.com/q/27976379
has comment: http://stackoverflow.com/comment/44345201
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/44345178
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44345167
has body: I'm trying to sort a ul by the value assigned by the option in the select tag. MCF3M0 - Functions and Applications 1 Star 2 Stars 3 Stars 4 Stars 5 Stars BDI3C0 - Entrepreneurship: The Venture 1 Star 2 Stars 3 Stars 4 Stars 5 Stars FSF3U0 - Core French 1 Star 2 Stars 3 Stars 4 Stars 5 Stars SPH3U0 - Physics 1 Star 2 Stars 3 Stars 4 Stars 5 Stars Submit Ratings I'm trying to sort these course by a user assigned rating. A javascript function that will help sort AND display a new list of the ranked courses would be greatly appreciated.
has title: How do I sort by value?
has comment: http://stackoverflow.com/comment/44345173
has answer: http://stackoverflow.com/a/27976681
has comment: http://stackoverflow.com/comment/44345163
has comment: http://stackoverflow.com/comment/44345190
type: Question
tagged with: selection
tagged with: javascript
tagged with: sorting
tagged with: html-lists
score: 0

http://stackoverflow.com/a/28097848
upvote count: 1
has body: Don't use ng-check it will only select a radio box but, it will not update the ng-model value. Instead of doing ng-checked use ng-init and set the value of model. Working HTML Yes or no Yes No Vendor Details Just added hide-div class to by default hide the div. And after that ng-classwill decide to show element or not on basis of condition. Working Fiddle. Hope this may help you. Thanks.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28096240
type: Answer
accepted answer of: http://stackoverflow.com/q/28096240
score: 1

http://stackoverflow.com/comment/44343406
score: 1
has text: What file/line is reported to cause this error? Post the contents of just that file here.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27975389

http://stackoverflow.com/q/28080085
tagged with: directive
has comment: http://stackoverflow.com/comment/44538913
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/44538961
score: 1
accepted answer: http://stackoverflow.com/a/28080279
has comment: http://stackoverflow.com/comment/44539110
has comment: http://stackoverflow.com/comment/44538968
has comment: http://stackoverflow.com/comment/44538938
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/28080279
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44538944
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44539129
has comment: http://stackoverflow.com/comment/44538925
has body: I have got the following directive: app.directive('ngAvatar', function() { return { restrict: 'E', replace: true, template: '&lt;img class="avatar-medium" ng-src="{{url}}" /&gt;', link: function(scope, elem, attrs) { console.log(attrs); var aType = attrs.avatarType; var aId = attrs.avatarId; console.log("Type: "+ aType); console.log("Character ID:"+ aId); var baseUrl = "http://api-character.com/"; switch(aType){ case "character": scope.url = baseUrl + "Character/"+aId+"_256.jpg"; } } } }); Unfortunately the directive is not picking up the avatar_id inside of the directive. As you can see I am console logging the attributes: console.log("Type: "+ aType); console.log("Character ID:"+ aId); In my view I am using this directive like so: &lt;ng-avatar avatar_type="character" avatar_id="{{character.character_id}}"&gt;&lt;/ng-avatar&gt; The following is the output of my console in Chrome. As you can see the avatar_id is showing as blank but on inspection of the attrs you can see that the attribute is there but just not showing in the directive code. Chrome Console: Does anyone have any idea why it would not work? Thanks
has comment: http://stackoverflow.com/comment/44538987
has comment: http://stackoverflow.com/comment/44538897
type: AnsweredQuestion
downvote count: 0
has title: AngularJS : Directive not picking up attribute

http://stackoverflow.com/q/28117500
type: Question
has answer: http://stackoverflow.com/a/54876282
answer count: 2
has answer: http://stackoverflow.com/a/28117707
downvote count: 0
tagged with: javascript
favorite count: 0
has body: Is it possible to filterBy multiple values in emberjs? I am trying to filter items in a table with different filtering variables and I'm having trouble doing so with more than one of those variables. Can anyone help out? I'm ne to emberjs and eager to learn. Thanks in advance.
tagged with: filter
tagged with: ember.js
linked to: http://stackoverflow.com/q/28094306
tagged with: ember-cli
accepted answer: http://stackoverflow.com/a/28117707
type: AnsweredQuestion
has title: Is it possible to filterBy multiple values in emberjs?
score: 10
possible better answer: http://stackoverflow.com/a/54876282
linked to: http://stackoverflow.com/q/28179679
upvote count: 10

http://stackoverflow.com/a/27997105
type: Answer
score: 13
has comment: http://stackoverflow.com/comment/79407069
has comment: http://stackoverflow.com/comment/79513138
upvote count: 14
accepted answer of: http://stackoverflow.com/q/27984639
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27984639
downvote count: 1
has comment: http://stackoverflow.com/comment/79399815
has body: Classes are just syntactic sugar. So you can do class Foo { constructor() { console.log('initializing foo'); } } Foo.prototype.render = require('./render'); Or you could create a getter: class Foo { constructor() { console.log('initializing foo'); } get render() { return require('./render'); } }

http://stackoverflow.com/q/28101350
answer count: 1
has comment: http://stackoverflow.com/comment/44578220
has comment: http://stackoverflow.com/comment/44578515
has title: Populate array with integer sequence using for loop without crashing Chrome
has comment: http://stackoverflow.com/comment/44579312
has comment: http://stackoverflow.com/comment/44580182
tagged with: google-chrome
accepted answer: http://stackoverflow.com/a/28102435
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44578163
type: Question
has comment: http://stackoverflow.com/comment/44580111
has comment: http://stackoverflow.com/comment/44578405
tagged with: crash
tagged with: for-loop
tagged with: arrays
has body: I want to populate an array with all of the possible integers between 1 000 000 and 10 000 000. When I run the loop below, it crashes the chrome tab. How can I accomplish this? var arrList = []; var list; function gen() { for (var i = 1000000; i &lt; 10000000; i++) { arrList.push(i); } } gen(); list = arrList.join(' '); // This line causes the crash console.log(list);
tagged with: javascript
has answer: http://stackoverflow.com/a/28102435
score: 0
has comment: http://stackoverflow.com/comment/44579845

http://stackoverflow.com/comment/44346164
has text: If any of the `trace()` promises is getting rejected, you won't notice (and instead wait indefinitely for your callback that is never called)
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27975395
type: AnswerComment

http://stackoverflow.com/comment/44462840
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28039401
has text: Just out of curiosity, which jQuery version are you using?

http://stackoverflow.com/comment/44545884
comment on: http://stackoverflow.com/q/28083982
has text: Also `.escape()` is deprecated in favor of encodeURI or encodeURIComponent.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44558342
has text: My bad, you also need to change the event to `keypress` to make sure the event is trapped in time to stop the action.
comment on: http://stackoverflow.com/a/28090760
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/44418787
comment on: http://stackoverflow.com/q/28015662
score: 0
type: Comment
type: QuestionComment
has text: @unobf yes, that is my objective

http://stackoverflow.com/comment/44358993
score: 0
type: Comment
has text: Could you provide a live demo so I can actually look into it?
comment on: http://stackoverflow.com/a/27983883
type: AnswerComment

http://stackoverflow.com/comment/44547816
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28084640
score: 0
has text: Can you provide an example (in code)? The question is unclear, currently.

http://stackoverflow.com/comment/44352393
type: Comment
type: QuestionComment
has text: what do you get if you console.log(file.type); ?
score: 1
comment on: http://stackoverflow.com/q/27980428

http://stackoverflow.com/comment/44604516
type: Comment
type: QuestionComment
score: 0
has text: @Testing in Firefox 35.0 and working fine for me. Nice work i must add
comment on: http://stackoverflow.com/q/28115095

http://stackoverflow.com/comment/46202311
score: 0
has text: @user2943490 no) some style is different to each controller and if generic? how to code then?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28031579

http://stackoverflow.com/comment/44395687
has text: These do not work, because preventDefault() is a **function**, I was not aware though of event.unbind but I guess it is another **function**.
comment on: http://stackoverflow.com/a/28003345
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/28116079
type: Answer
score: 6
answers question: http://stackoverflow.com/q/28115853
upvote count: 7
has body: Short answer: the undefined comes from the result of the executed statement in your JavaScript console, the function return nothing, so undefined Let try to decompose this: console.log(1); // 1 console.log(4); // 4 the code you executed return undefined setTimeout(function(){console.log(3)}, 0); // 3 Executed the next stack setTimeout(function(){console.log(2)}, 1000); // 2 1 sec after Edit: test this var a = (function(){})(); // print undefined, a is also undefined, no returned value
downvote count: 1

http://stackoverflow.com/comment/44532809
has text: Yes thanks, must have been a slip of the mouse as I am very aware of the difference
score: 0
comment on: http://stackoverflow.com/q/28076875
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28087531
type: Question
tagged with: javascript
score: 0
answer count: 2
tagged with: validation
has comment: http://stackoverflow.com/comment/44552348
has body: Following is my table structure: &lt;tr class="odd"&gt; &lt;td class=" sorting_1"&gt; &lt;input id="clone1042154701" class="fileCheckAll" type="checkbox" name="clone1042154701" checked=""&gt; &lt;/td&gt; &lt;td class=""&gt; &lt;input id="appName1042154701" class="fileAppName invalid" type="text" onblur="validate(this.value,1042154701)" name="appName1042154701"&gt; &lt;div id="error1042154701"&gt; &lt;/td&gt; &lt;tr&gt; &lt;tr&gt; &lt;tr class="even"&gt; &lt;td class=" sorting_1"&gt; &lt;input id="clone1042154702" class="fileCheckAll" type="checkbox" name="clone1042154702" checked=""&gt; &lt;/td&gt; &lt;td class=""&gt; &lt;input id="appName1042154702" class="fileAppName invalid" type="text" onblur="validate(this.value,1042154701)" name="appName1042154701"&gt; &lt;div id="error1042154702"&gt; &lt;/td&gt; &lt;tr&gt; &lt;tr&gt; . . . and many more rows On onblur event I am calling a javascript validate function which sets class as "invalid" on error. Now before form submission I am call a javascript method inside which checks class for error and returns false id error. if ($("[id^=appName]").hasClass("invalid")) { alert("Invalid Application name"); return false; } The problem that I am facing is that it is validation all the table rows irrespective of whether it is checked via checkbox or not. I need to validate only those row which are checked via checkbox. Can some please suggest me how to proceed.
tagged with: jquery
tagged with: checkbox
has answer: http://stackoverflow.com/a/28087813
type: UnansweredQuestion
has title: How to validate table value based on checkbox selected
has answer: http://stackoverflow.com/a/28090656

http://stackoverflow.com/comment/44591885
has text: I was a bit hasty so I forgot to mention it's not always "test" before the numbers, so I would need to do both. Nonetheless this answers the question I posed.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28108752

http://stackoverflow.com/comment/44571149
score: 0
type: AnswerComment
has text: You can check section titled "Integration with the browser event loop" at https://docs.angularjs.org/guide/scope link. This should explain you about what happens when you enter anything in textbox and how the model update happens in angular.
type: Comment
comment on: http://stackoverflow.com/a/28097427

http://stackoverflow.com/comment/44349021
type: QuestionComment
type: Comment
has text: You need to write custom code for it or make your own directives.
comment on: http://stackoverflow.com/q/27978478
score: 0

http://stackoverflow.com/a/28036718
has body: I think you want this: working fiddle Each pair of coordinates defines a single line segment. After drawing each line segment, start a new array of points and a new google.maps.Polyline. working code snippet: var map; var trackLine = []; var trackLats = [ [ [14.735, -20.595], [-13.913, 8.188] ], [ [-14.788, 20.562], [13.879, -8.230] ], [ [14.784, -20.546], [-13.818, 8.288] ], [ [-14.837, 20.513], [13.784, -8.329] ], [ [14.892, -20.439], [-13.758, 8.350] ] ]; var trackLons = [ [ [76.480, 90.967], [68.509, 98.386] ], [ [-115.254, -100.759], [-123.226, -93.342] ], [ [53.036, 67.521], [45.065, 74.937] ], [ [-138.698, -124.204], [-146.669, -116.791] ], [ [29.567, 44.049], [21.570, 51.438] ] ]; function initialize() { var mapCenter = new google.maps.LatLng(0.0, 139.0); var mapOptions = { zoom: 1, center: mapCenter, mapTypeId: google.maps.MapTypeId.HYBRID }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var trackCoords = new google.maps.MVCArray; var i, j, k; for (i = 0; i &lt; 5; i++) { for (j = 0; j &lt; 2; j++) { trackCoords = []; for (k = 0; k &lt; 2; k++) { trackCoords.push(new google.maps.LatLng(trackLats[i][j][k], trackLons[i][j][k])); } trackLine.push(new google.maps.Polyline({ map: map, path: trackCoords, geodesic: true, strokeColor: '#FFFFFF', strokeOpacity: 0.4, strokeWeight: 3 })); trackCoords.clear; } } } google.maps.event.addDomListener(window, 'load', initialize); html, body, #map-canvas { height: 90%; margin: 5px; padding: 1px; } &lt;script src="https://maps.googleapis.com/maps/api/js"&gt;&lt;/script&gt; &lt;div id="map-canvas"&gt;&lt;/div&gt;
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28036561
has comment: http://stackoverflow.com/comment/44458175
type: Answer
answers question: http://stackoverflow.com/q/28036561
downvote count: 0
score: 1

http://stackoverflow.com/comment/44397730
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28004615
has text: Thanks for the answer. Is possible to achieve the same result with my first example?

http://stackoverflow.com/comment/44543950
has text: i am unable to see where you grab input value and trying to put values in second table td's input
comment on: http://stackoverflow.com/q/28082757
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28026651
score: 1
has title: Knockout unable to process biding for 'foreach'
upvote count: 1
tagged with: knockout.js
type: Question
accepted answer: http://stackoverflow.com/a/28026713
tagged with: javascript
tagged with: jquery
downvote count: 0
has body: I am new to knockout. For my problem, I am trying to make it so that for each project, there is a button and textarea. The textarea will be hidden upon page load. If I click the button, it will show the textarea, or hide it (toggle). I have the following code implemented, but I am getting this error: Uncaught ReferenceError: Unable to process binding "foreach: function (){return projects }" Message: Unable to process binding "visible: function (){return show }" Message: show is not defined View Model: function ProjectViewModel(proj) { //console.log(proj); var self = this; self.projects = ko.observableArray(proj); self.show = ko.observable(false); self.toggleTextArea = function () { self.show(!self.show()); }; }; HTML: <%-- --%> Have you done project this before? I'm thinking about doing this again.
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28026713
type: AnsweredQuestion

http://stackoverflow.com/q/28112007
tagged with: mapbox
upvote count: 2
tagged with: d3.js
score: 2
type: AnsweredQuestion
tagged with: leaflet
has answer: http://stackoverflow.com/a/28113985
type: Question
has title: Leaflet: How to get pixel position of a lat lng after zoom, before zoom begins
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28113985
answer count: 1
has body: I want to transform:translate an SVG group to a latLng pixel position, and maintain that position after zoom. I've tried: map.on('zoomend', function(e) {...}); http://jsfiddle.net/L8dnsrnk/15/ But obviously that only fires after the zoom, so the SVG doesn't move as fluidly as, say, the marker does. I've tried looking at the source to see how the a Leaflet marker is repositioned, as that is essentially the behaviour I'm trying to emulate, but to no avail. If someone has another suggestion for achieving this effect, I'd be interested! :)
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg

http://stackoverflow.com/a/28027681
score: 3
upvote count: 3
has body: var oOrigValue will always be a number, and sometimes 0 (Zero). Just pass it to Number function since oOrigValue is always a number. (Note: 0 is also a number) var oOrigValue = Number(oCreditStatus.value); There are several other ways of doing the same by prefixing it with + and ~~
answers question: http://stackoverflow.com/q/28027560
downvote count: 0
type: Answer

http://stackoverflow.com/q/28114420
type: Question
has body: Right now we're using this pattern for dynamically updating models in our angular app. It works well enough, but I don't like having to repeat the ng-change all the time. Not the end of the world, but I wanted to see if there was a better pattern that I wasn't aware of. I've looked in to $watch and $watchCollection, but I am not aware of their performance implications when watching large numbers of objects, and it also seems like the watches would then be duplicated between any manual $watch/$watchCollection and the watches that ng-repeat creates. The $watch stuff also seems to be lower level as it gives you back properties or arrays that changed, rather than just dealing with the model. Are we just missing a better pattern, or is this currently the simplest way of dealing with this scenario? &lt;div ng-repeat="item in items"&gt; &lt;input type="text" ng-model="item.fooBar" ng-change="saveItem(item)&gt; &lt;input type="tel" ng-model="item.someOtherField" ng-change="saveItem(item)&gt; &lt;/div&gt; function Controller($scope){ $scope.items = [{fooBar: "test", someOtherField:123}] $scope.saveItem = function(item){ doStuffToSaveItem(item); } }
score: 0
answer count: 1
tagged with: javascript
tagged with: angularjs
type: UnansweredQuestion
has title: Are there better patterns in Angular 1.3 for calling a function every time an item in ng-repeat is modified?
has answer: http://stackoverflow.com/a/28115775

http://stackoverflow.com/comment/50604111
score: 0
type: Comment
type: AnswerComment
has text: Please provide an explanation for your answer
comment on: http://stackoverflow.com/a/31307445

http://stackoverflow.com/q/28053820
tagged with: javascript
has answer: http://stackoverflow.com/a/28053935
score: -1
accepted answer: http://stackoverflow.com/a/28053935
linked to: http://stackoverflow.com/q/14733378
tagged with: http://stackoverflow.com/tag/html
has title: Error while loading Angular JS controller
has comment: http://stackoverflow.com/comment/44489542
favorite count: 0
duplicate of: http://stackoverflow.com/q/14733378
tagged with: angularjs
type: AnsweredQuestion
has body: {{x.name}} {{x.title}} JS File var testApp = angular.module('testApp', []); testApp.controller('testControl', function($scope){ $scope.phones = [ {name: 'iPhone 6', title: 'Apple created'}, {name: 'Samsumg Galaxy 2', title: 'Samsung created'} ]; }); JS Fiddle http://jsfiddle.net/Lxk5p905/
downvote count: 1
type: Question
upvote count: 0
answer count: 1

http://stackoverflow.com/comment/44452284
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28013819
has text: I completely mis-interpreted the question - my bad sorry :)

http://stackoverflow.com/a/28050631
answers question: http://stackoverflow.com/q/28050535
score: 0
has body: Instead of doing it in an object literal all at once, you could do it by setting the properties separately. This way, when it encounters the circularity, it will already have loaded some of it: exports.services = {}; exports.services.service1 = require("./service1"); exports.services.service2 = require("./service2"); Warning: untested
type: Answer

http://stackoverflow.com/comment/44484932
type: QuestionComment
comment on: http://stackoverflow.com/q/28051383
has text: Need to define criteria in more concise terms. As it stands right now it is not very clear what objective is ... for example what is `consecutive sum`? SHow expected results
score: 0
type: Comment

http://stackoverflow.com/comment/44373099
type: QuestionComment
has text: I dont know it must be a bug in the CanvasJS.Chart or something :( Anyways I gave up on hiding the display.
comment on: http://stackoverflow.com/q/27989115
score: 0
type: Comment

http://stackoverflow.com/comment/44490423
score: 0
comment on: http://stackoverflow.com/q/28053338
type: Comment
type: QuestionComment
has text: Thanks for your quick response! I've uploaded an example app to GitHub (please see the edited question).

http://stackoverflow.com/comment/44399966
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28005725
has text: it didn't work for the moment because the parent of my div is not `body` so the the top is calculated from the parent div

http://stackoverflow.com/q/28072122
tagged with: dynamic-values
has answer: http://stackoverflow.com/a/28082703
type: AnsweredQuestion
tagged with: codeigniter
type: Question
accepted answer: http://stackoverflow.com/a/28082703
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has title: changing value of dynamically generated input field jquery
has body: i am trying to change the value of dynamically generated input field. the scenario: i have a button called add items, when clicked it append three input fields named as itemname,units and unitprice of which itemname has a jqueryui autocomplete and working great, but i am also listing keypress event of itemname field so when user press enter after selecting required itemname from autocomplete it should get units and price of the itemname which user has selected using autocomplete the code: var count = 1; $('#add-items').click(function () { $('#items').append('&lt;div&gt;&lt;br&gt;&lt;i class="fa fa-angle-right"&gt;&lt;/i&gt;. &lt;input type="text" name="itemname[]" id="itemname-' + count + '" class="itemname" placeholder="item name"/&gt;\n\ &lt;input type="text" name="units[]" id="units-' + count + '" size="10" placeholder="units" style="text-align: right"/&gt;\n\ &lt;input type="text" name="unitprice[]" id="unitprice-' + count + '" size="10" placeholder="unit price" style="text-align: right"/&gt;\n\ &lt;a href="javascript:void(0);" id="remove-items"&gt;&lt;i class="fa fa-trash-o"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/div&gt;'); $('#itemname-' + count).autocomplete({ source: "&lt;?= site_url('administrator/item-autocomplete') ?&gt;", minLength: 2 }); $('#itemname-' + count).on('keypress', function (e) { var name = jQuery(this).val(); var code = (e.keyCode ? e.keyCode : e.which); if (code == 13) { e.preventDefault(); $.ajax({ type: "POST", url: "&lt;?= base_url() ?&gt;administrator/get-unit-and-price/", data: {name: name}, dataType: "json", success: function (data) { if (data.valid == true) { //document.getElementById('units-' + count).value = data.unit; //document.getElementById('unitprice-' + count).value = data.price; $('#units-' + count).attr('value', data.unit); $('#unitprice-' + count).attr('value', data.price); //$('#units-' + count).val(data.unit); //$('#unitprice-' + count).val(data.price); } else { alert(data.html); } } }); } }); count++; }); everything working great,…

http://stackoverflow.com/q/28056083
tagged with: couchdb
favorite count: 0
accepted answer: http://stackoverflow.com/a/28058928
tagged with: rest
type: Question
upvote count: 2
answer count: 2
tagged with: node.js
has answer: http://stackoverflow.com/a/28058928
tagged with: bulkinsert
tagged with: javascript
has answer: http://stackoverflow.com/a/28182862
has comment: http://stackoverflow.com/comment/44494039
score: 2
has title: How to insert CouchDB documents in bulk?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28182862
has body: I'm tasked with modifying a legacy app so that users can upload payroll adjustments in bulk. Currently they have to fill out a form and input the data item by item, hitting submit after each one. I'm giving them the ability to upload a CSV file containing tons of adjustments at once. On the server they are inserting items into Couch one by one, like this: function wsapiPOST(req, res, next) { var path = req.path.substr(6) , url = couchPath + path + requestUtil.buildQueryString(req); request.post({ url: url, headers: { 'content-type': 'application/json' }, body: JSON.stringify(req.body) },function (err, resp, body) { if (err) { if (resp) { res.writeHead(resp.statusCode); res.end(body); } else { // This would happen if the request timed out res.writeHead(408); res.end('timeout'); } } }).pipe(res); } The Couch URL is built dynamically. req.body contains the properties for a single item. I'm new to Couch but I'm not sure how to send multiple documents for insertion in a single operation. I could throw the request.post call into a loop as is, but I imagine that's not going to be very performant. I just need pointed in the right direction for bulk insertion into Couch via its REST API.
downvote count: 0

http://stackoverflow.com/comment/53073454
comment on: http://stackoverflow.com/a/28021129
type: AnswerComment
has text: Thanks Pangolin this was an awesome way to handle the problem elegantly!
score: 0
type: Comment

http://stackoverflow.com/q/28040881
has comment: http://stackoverflow.com/comment/44500574
has comment: http://stackoverflow.com/comment/44468609
tagged with: actionscript-3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/32712370
tagged with: google-chrome
type: Question
has title: Adobe Air localconnection not working in chrome
tagged with: flash
has answer: http://stackoverflow.com/a/29376232
tagged with: air
tagged with: javascript
score: 0
answer count: 2
has body: I am sending messages through local connection web to Air application . IE, Firefox and Safari are successfuly sending messages. But chrome is failing in sending.(Only when PPAPI) Why isn't Chrome PPAPI Local connection sending message? Reference: LocalConnection - AS3 Unsandbox LocalConnections in Chrome Website flash as3 - send fart private function receivedFromJavaScript(value:String):void { //var conn:LocalConnection; //trace("JavaScript says: " + value + "\r"); ExternalInterface.call("sendToJavaScript", + value ); conn = new LocalConnection(); conn.client = new Object(); //conn.allowDomain('app#Myapplication'); //conn.allowInsecureDomain('app#Myapplication') conn.addEventListener(StatusEvent.STATUS, onStatus); conn.addEventListener(AsyncErrorEvent.ASYNC_ERROR,function(e:AsyncErrorEvent):void { //trace("ASYNC_ERROR: " + e ); ExternalInterface.call("sendToJavaScript", "ASYNC_ERROR: " + e ); }); conn.addEventListener(SecurityErrorEvent.SECURITY_ERROR,function(e:SecurityErrorEvent):void { ExternalInterface.call("sendToJavaScript", "SECURITY_ERROR: " + e ); //trace("SECURITY_ERROR: " + e ); }); conn.send("app#Myapplication:taskConnection", "localconnectionHandler", value); ExternalInterface.call("sendToJavaScript", "conn = " + conn.client.toString() + " / " + conn.domain); //conn.close(); } AIR applcation code try { conn = new LocalConnection(); conn.allowDomain("*"); conn.client = this; conn.connect("taskConnection"); trace("yes."); } catch (error:ArgumentError) { trace("Can't connect."); }

http://stackoverflow.com/comment/44590924
score: 0
has text: I assume that the `id="cont_no1"` in `tr_2` is also a typo (just to make sure you have unique id's)? You could show us the method used to create these input fields.
comment on: http://stackoverflow.com/q/28108234
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28001054
upvote count: 0
has body: JavaScript is single-threaded. If some block of code uses execution thread, no other code can be executed. This means your setTimeout() call must wait until main execution finishes. [from here]setTimeout behaviour with blocking code
answers question: http://stackoverflow.com/q/28000924
type: Answer
downvote count: 1
score: -1

http://stackoverflow.com/comment/44481922
has text: Nop! Just that one line. ` Hello World! ` No blank spaces either. Though I am trimming it.
comment on: http://stackoverflow.com/a/28049735
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28024697
has body: I have a codepen here: http://codepen.io/huwrowlands/pen/GgmjqX HTML: &lt;div class="site-branding"&gt; &lt;a href="#"&gt; &lt;img alt="Land" class="site-logo site-logo-land" src="http://website-test-lab.com/sites/landchain/wp-content/themes/landchain/assets/img/land.png" /&gt; &lt;/a&gt; &lt;/div&gt; CSS: /* Basic Styles */ .site-logo { visibility: hidden; max-width: 127px; margin: 0 auto; display: block; } /* Animation CSS */ .slideRight{ animation-name: slideRight; -webkit-animation-name: slideRight; animation-duration: 1s; -webkit-animation-duration: 1s; animation-timing-function: ease-in-out; -webkit-animation-timing-function: ease-in-out; visibility: visible !important; } @keyframes slideRight { 0% { transform: translateX(-150%); } 50%{ transform: translateX(8%); } 65%{ transform: translateX(-4%); } 80%{ transform: translateX(4%); } 95%{ transform: translateX(-2%); } 100% { transform: translateX(0%); } } @-webkit-keyframes slideRight { 0% { -webkit-transform: translateX(-150%); } 50%{ -webkit-transform: translateX(8%); } 65%{ -webkit-transform: translateX(-4%); } 80%{ -webkit-transform: translateX(4%); } 95%{ -webkit-transform: translateX(-2%); } 100% { -webkit-transform: translateX(0%); } } /**/ .slideRightLeft{ animation-name: slideRightLeft; -webkit-animation-name: slideRightLeft; animation-duration: 1s ; -webkit-animation-duration: 1s; animation-iteration-count: infinite; -webkit-iteration-count: infinite; animation-timing-function: ease-in-out; -webkit-animation-timing-function: ease-in-out; visibility: visible !important; } @keyframes slideRightLeft { 0% { transform: translateX(0%); } 50% { transform: translate(-50%); } 100% { transform: translateX(0%); } } @-webkit-keyframes slideRightLeft { 0% { -webkit-transform: translateX(0%); } 50% { transform: translate(-50%); } 100% { -webkit-transform: translateX(0%); } } JS: //Animations (Delay) jQuery(function(){ setTimeout(function(){ jQuery('.site-logo-land').addClass("slideRight"); }, 1000); }); jQuery( ".s…
tagged with: jquery
has answer: http://stackoverflow.com/a/28044320
accepted answer: http://stackoverflow.com/a/28044320
possible better answer: http://stackoverflow.com/a/28024780
tagged with: animation
tagged with: css
has answer: http://stackoverflow.com/a/28024890
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28024780
has title: jQuery .hover doesn't loop
has answer: http://stackoverflow.com/a/28024784
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/a/27990084
score: 0
has comment: http://stackoverflow.com/comment/44371916
has comment: http://stackoverflow.com/comment/44372123
has body: You need to create image sprite in png. Then in css use this code. foo{ background: url("imagefolder/image-sprite.png") 0 0 no-repeat; } foo:hover{ background-position: -10px 0; } P.S. For cool transition use something like this. transition: all .3s ease;
answers question: http://stackoverflow.com/q/27989938
type: Answer
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/44371665
has comment: http://stackoverflow.com/comment/44371623
has comment: http://stackoverflow.com/comment/44371690

mediawiki-extensions
tag name: mediawiki-extensions
type: Tag
tags question: http://stackoverflow.com/q/28001938

http://stackoverflow.com/q/28030317
score: 1
accepted answer: http://stackoverflow.com/a/28030763
has title: Backbone: collection adds random model to itself
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28030763
has body: I've been searching StackOverflow for an answer to my question, but haven't been able to get something useful yet. Some background on how I set the collection object up. On fetch, I pass the collection a hash, and set the url as http://localhost/index.php?a=hash. The server should return 12 names for that specific hash. For some reason, the first model of the collection is always a model with attributes set as a string that was used to fetch the collection data, and every model after that is perfectly fine. fetch : function(o) { var that = this, successCallback = o.success, errorCallback = o.error; $.ajax({ type : 'GET', url : this.url + o.hash, dataType : 'json', success : function(data) { _.each(data, function(name) { console.log(name); that.add(new Model({ _id : name })); }); successCallback(); }, error : errorCallback }); } List of names that are logged are the 12 that I'm expecting from the server [aaa,bbb,ccc,ddd...]. When I go to render a view using the collection, this is what I have: Object { cid="c1", attributes={...}, collection={...}, more... Object { cid="c2", attributes={...}, _changing=false, more...} Object { cid="c3", attributes={...}, _changing=false, more...} Object { cid="c4", attributes={...}, _changing=false, more...} Object { cid="c5", attributes={...}, _changing=false, more...} Object { cid="c6", attributes={...}, _changing=false, more...} Object { cid="c7", attributes={...}, _changing=false, more...} Object { cid="c8", attributes={...}, _changing=false, more...} Object { cid="c9", attributes={...}, _changing=false, more...} Object { cid="c10", attributes={...}, _changing=false, more...} Object { cid="c11", attributes={...}, _changing=false, more...} Object { cid="c12", attributes={...}, _changing=false, more...} Object { cid="c13", attributes={...}, _changing=false, more...} The models that are correct look something like this: https://i.sstatic.net/2Fprv.png The first model of the collection is: https://i.sstatic.net/5eGdB.png It looks like…
upvote count: 1
answer count: 1
favorite count: 0
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/44445925
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/44593730
comment on: http://stackoverflow.com/q/27984726
score: 0
has text: Got to apply the dirty solution to override the RichFaces CSS class through jQuery and apply them onshow event of modal dialog.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44390818
type: QuestionComment
has text: i would like to know how i can call this method in the JSP... I've already added the a String to pass it into the method.
comment on: http://stackoverflow.com/q/27998908
score: 0
type: Comment

http://stackoverflow.com/q/28109743
upvote count: 0
has answer: http://stackoverflow.com/a/28109861
answer count: 1
tagged with: button
favorite count: 0
has comment: http://stackoverflow.com/comment/44594147
has comment: http://stackoverflow.com/comment/44593421
type: UnansweredQuestion
has title: onclick condition between to alert messages
tagged with: alert
tagged with: onclick
score: -4
has comment: http://stackoverflow.com/comment/44593983
type: Question
has body: How can I make the 2nd alert appear by clicking the 1st alert? onclick="single()">
has comment: http://stackoverflow.com/comment/44593378
has comment: http://stackoverflow.com/comment/44593367
tagged with: javascript
has comment: http://stackoverflow.com/comment/44593943
downvote count: 4

http://stackoverflow.com/comment/44401163
has text: @Xan It is in an event page. Feel free to ask, if you want to see more parts of the code
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28006085

http://stackoverflow.com/comment/44447983
score: 0
has text: so would you say the above updated js file should be working or not?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28022317

http://stackoverflow.com/comment/44395574
type: AnswerComment
type: Comment
has text: I wish it had. Still nothing... :(
comment on: http://stackoverflow.com/a/28001832
score: 0

http://stackoverflow.com/comment/44498731
type: AnswerComment
type: Comment
has text: Yeah - I just ran into that problem myself. Is it possible this bug just surfaced and Google will fix shortly?
comment on: http://stackoverflow.com/a/28052584
score: 1

http://stackoverflow.com/comment/44467282
has text: don't ever use `async: false` , it blocks all script and the UI
score: 0
comment on: http://stackoverflow.com/q/28041902
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28111943
answer count: 2
has comment: http://stackoverflow.com/comment/44597646
downvote count: 0
possible better answer: http://stackoverflow.com/a/28112287
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has body: I got nice select check box from eric hanes ...site : http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ I have to pass the values that are selected from the select option in the select html tags... jQuery MultiSelect Widget Demo Option 1 Option 2 Option 3 Option 4 Option 5 Option 6 Option 7 Option 8 Option 9 Option 10 Option 11 Option 12 Submit @Malik : I have added the code with your javascript, and if I select 2 check boxes than the values are displaying like this in first alert1 var1:option1, and in the second alert var1:option1,var2:option2, In the above the var1:option1, and var1:option1,var2:option2, again the comma is repeating for the last value please check and also sending only one value but not repeated value if the 1st value sent than after the second value has to sent ..but not fist and second value to sent for the second checked...please check... but in the PHP script it is not echoing please check... php script : <?php $var1= $_POST['var1']; $var2 = $_POST['var2']; echo $var1; echo $var2; ?> I have the above code ..here the select options are selected through check box and now i have to pass the selected variables to the php variables through the ajax call and echo in the php script.. For eg : if I select option 1 and option 2, I should get alert of option 1 and again second alert option 2.. One more help ...Now this values has to pass to the ajax call and there the ajax variables has to be dynamic... I am using the load() ajax function .. $("#fetch").load("select.php",{var1:var1,var2:var2......},function(){}); here how to pass the check box variables dynamically in the ajax call. <?php $var1= $_POST['var1']; $var2 = $_POST['var2']; . . . echo $var1; echo $var2; ?>
has answer: http://stackoverflow.com/a/28215078
has comment: http://stackoverflow.com/comment/44790560
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44787689
accepted answer: http://stackoverflow.com/a/28215078
score: 1
has comment: http://stackoverflow.com/comment/44787570
upvote count: 1
has title: How to pass the select check box values dynamically to the ajax call variables post to php variables dynamically
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44787108
has answer: http://stackoverflow.com/a/28112287

http://stackoverflow.com/a/28019107
type: Answer
answers question: http://stackoverflow.com/q/28019050
score: 0
has body: Yes you can. Look at this article: http://odoe.net/blog/getting-modular-with-the-arcgis-javascript-api/ You can also find some examples here: https://github.com/driskull/framework-samples-js

http://stackoverflow.com/q/27985084
has answer: http://stackoverflow.com/a/75450764
tagged with: string
favorite count: 0
upvote count: 8
has body: I want to return true if a given string has only a certain character but any number of occurrences of that character. Examples: // checking for 's' 'ssssss' -&gt; true 'sss s' -&gt; false 'so' -&gt; false
possible better answer: http://stackoverflow.com/a/27985155
tagged with: regex
has answer: http://stackoverflow.com/a/27985155
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/73324531
has answer: http://stackoverflow.com/a/27985245
type: Question
has answer: http://stackoverflow.com/a/56394920
has title: Javascript check if string contains only certain character
score: 8
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/64241854
has comment: http://stackoverflow.com/comment/44361478
downvote count: 0
accepted answer: http://stackoverflow.com/a/27985245

http://stackoverflow.com/q/28060280
has title: Grunt + Compass having discrepancies in the httpPath
upvote count: 1
type: Question
has body: I'm new to Grunt – loving it so far (bye bye Codekit) – but I'm having an issue where the output of any compass url helpers (image-url(), font-url()) contains the incorrect path. Here is my gruntfile; module.exports = function (grunt) { grunt.initConfig( { pkg : grunt.file.readJSON('package.json'), compass : { dev : { options : { httpPath : '/', sassDir : 'scss/scss', cssDir : 'css/compiled', imagesDir : 'images', javascriptsDir : 'js', fontsDir : 'fonts', outputStyle : 'nested', relativeAssets : true } } }, cssmin : { dev : { files : { 'css/min/ctips-global.min.css' : [ 'css/compiled/global/base.css', 'css/compiled/global/header.css', 'css/compiled/global/footer.css', 'css/compiled/global/navigation.css', 'css/compiled/global/entry-content.css', 'css/compiled/global/widgets.css', 'css/compiled/global/animations.css' ] } } }, uglify : { options : { mangle : false }, dev : { files : { 'js/min/modernizr-latest.min.js' : ['js/vendor/modernizr/modernizr-latest.js'] } } }, watch : { css : { files : ['scss/scss/**', 'Gruntfile.js'], tasks : ['compass', 'cssmin'], options : { nospawn : true } }, js : { files : ['Gruntfile.js'], tasks : ['uglify'] } }, concurrent : { options : { logConcurrentOutput : true }, dev : { tasks : ['watch:css', 'watch:js'] } } }); grunt.loadNpmTasks('grunt-concurrent'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-compass'); grunt.registerTask('default', ['compass', 'cssmin', 'uglify']); grunt.registerTask('dev', ['concurrent:dev']); }; When I run 'grunt dev' Grunt runs without any warnings – indicating that it can find all the necessary resources – but the output of the compass url helpers is always missing the directory where the gruntfile exists. When I add the directory in as follows ... ... options : { httpPath : '/', sassDir : 'scss/scss', cssDir : 'css/compiled', imagesDir : 'mydirectory/images', javascriptsDir : 'js', fon…
tagged with: javascript
tagged with: gruntjs
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: grunt-contrib-compass
tagged with: node.js
answer count: 0
score: 1

http://stackoverflow.com/a/78116805
answers question: http://stackoverflow.com/q/27966791
score: 0
type: Answer
has body: $('.select2-select').select2({ maximumSelectionSize: 1 }).on('select2-opening', function(e) { if ($(this).select2('val').length &gt; 0) { e.preventDefault(); } }); Above code works well with old versions of select2. It only allow users to select at most 1 item and if an item selected, then dropdown won't be shown as customized 'select2-opening' event. However, with newer versions of select2, this code doesn't work. Actually 'select2-opening' has changed into 'select2:opening' and the code should be $('.select2-select').select2({ maximumSelectionSize: 1 }).on('select2:opening', function(e) { if ($(this).select2('val').length &gt; 0) { e.preventDefault(); } });
has comment: http://stackoverflow.com/comment/137718810

http://stackoverflow.com/a/28061035
accepted answer of: http://stackoverflow.com/q/28060925
answers question: http://stackoverflow.com/q/28060925
type: AcceptedAnswer
type: Answer
has body: After many trails i got this one better,I have tried this one working perfectly.I think this one also correct one. if(!file_url.value.match(/(^|\s)((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)/gi)){ alert('Please Enter valid Url'); return false; } Here is the demo: Demo of regex
score: 0

http://stackoverflow.com/a/27970112
score: 0
has comment: http://stackoverflow.com/comment/44335015
has body: this is just a pseudocode but basically your solution may look like this (pure js) var x = document.getElementsByClassName("charge"); for(var i = 0; i&lt;x.length; i++){ sum += x[i].value; } and just do that for all the classes you need
has comment: http://stackoverflow.com/comment/44333498
type: Answer
answers question: http://stackoverflow.com/q/27969985

http://stackoverflow.com/a/28017963
answers question: http://stackoverflow.com/q/28016890
type: Answer
has comment: http://stackoverflow.com/comment/44427329
has body: I'm not professional, just share my efforts. The way of performance colors between nature and computer is different.To get color similar to what you want, you may use light blue(#00FFFF) instead of (#OOOOFF). So I've tried two ways of color blending, first is the traditional additive mixing: newColor.R = (color1.R + color2.R)/2 For alpha blending, color1 and color2 both have their own alpha channel which represents the transparency of itself.So alpha blending algorithm should be like(R,G,B ranges from 0 to 255): newAlpha = 1 - (1-color1.Alpha) * (1-color2.Alpha) newColor.R = (color1.R/255 * color1.Alpha / newAlpha + color2.R/255 * color2.Alpha * (1-color1.Alpha) / newAlpha)*255 I've implemented them, and you can see the result: //Convert hex color into rgb color function HexToRgb(hexcolor) { var hexR = hexcolor.substr(0, 2); var hexG = hexcolor.substr(2, 2); var hexB = hexcolor.substr(4, 2); var rgbColor = []; rgbColor[0] = parseInt(hexR, 16); rgbColor[1] = parseInt(hexG, 16); rgbColor[2] = parseInt(hexB, 16); return rgbColor; } //Convert rgb color int hex color function RgbtoHex(rgbcolor) { var hexColor = rgbcolor[0].toString(16) + rgbcolor[1].toString(16) + rgbcolor[2].toString(16); return hexColor; } //Additive mixing two colors function additiveMixing(color1, color2) { var rgbColor1 = HexToRgb(arguments[0]); var rgbColor2 = HexToRgb(arguments[1]); var newColor = []; for (var n = 0; n < 3; n++) { newColor[n] = Math.round((rgbColor1[n] + rgbColor2[n]) / 2); } return RgbtoHex(newColor); } //Alpha blending two colors with two alphas function alphaBlending(color1, color2, alpha1, alpha2) { var rgbColor1 = HexToRgb(arguments[0]); var rgbColor2 = HexToRgb(arguments[1]); var newColor = []; var alpha1 = arguments[2]; var alpha2 = arguments[3]; var alpha = 1 - (1 - alpha1) * (1 - alpha2); for (var n = 0; n < 3; n++) { newColor[n] = Math.round((rgbColor1[n] / 255.0 * alpha1 / alpha + rgbColor2[n] / 255.0 * alpha2 * (1 - alpha1) / alpha) * 255); } return RgbtoHex(newColor);…
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/27995661
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44394971
possible better answer: http://stackoverflow.com/a/27997618
upvote count: 1
has answer: http://stackoverflow.com/a/27997618
has answer: http://stackoverflow.com/a/28015384
type: Question
has comment: http://stackoverflow.com/comment/44414216
has title: CSV import undefined data
downvote count: 0
has comment: http://stackoverflow.com/comment/44389633
has body: I'm having an issue with a .csv import for d3. I have been following http://www.d3noob.org/2014/02/how-to-import-data-from-csv-file-with.html http://www.d3noob.org/2013/03/d3js-force-directed-graph-example-basic.html as templates for a csv import.The Problem: I cannot seem to access any of my csv columns. When I try and access a column, I get undefined. Specifically, I was attempting use this code as an example which to build my code off of. d3.csv("data/force.csv", function(error, links) { var nodes = {}; // Compute the distinct nodes from the links. links.forEach(function(link) { link.source = nodes[link.source] || (nodes[link.source] = {name: link.source}); link.target = nodes[link.target] || (nodes[link.target] = {name: link.target}); link.value = +link.value; }); My code looks similar: d3.csv("../assets/datastore/transitions.csv", function(error, data){ if(error) return console.warn(error); var nodes = {}; data.forEach(function(d){console.log("This is the source " + d.source)}); //Compute distinct nodes from links data.forEach(function(link){ console.log("This is the source" + data.source); links.source = nodes[links.source] || (nodes[links.source] = {name: links.source}); links.target = nodes[links.target] || (nodes[links.target] = {name: links.target}) links.value = + links.value; }); I even simplified my code, and tried to access just the most basic elements of the datum. d3.csv("../assets/datastore/transitions.csv", function(error, data){ if(error) return console.warn(error); var nodes = {}; data.forEach(function(d){console.log("This is the source " + d.source)}) Finally, it seems as if my data is being read, as I do have 81 elements registered as a node under the DOM when I use firebug. If you could please hint at a potential solution, that would be great.
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/28015384
score: 1
favorite count: 0
tagged with: d3.js
has comment: http://stackoverflow.com/comment/44417997

http://stackoverflow.com/comment/44555159
has text: @Chrillewoodz sure - I've edited my existing answer to indicate the malformed JSON.
comment on: http://stackoverflow.com/q/28088568
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/28109614
type: Answer
has body: Thanks guy, ended up using: $('#tag').attr("id","newId") with 'id' as 'id' and not current id tag
answers question: http://stackoverflow.com/q/28108845
score: 0

http://stackoverflow.com/comment/58319108
comment on: http://stackoverflow.com/a/27991402
score: 0
type: AnswerComment
type: Comment
has text: oh got...for me it was number 4. I am using Typescript (pbastowski:typescript) and I used the fat arrow in my publish function. Strangely...it worked most of the times but sometimes after reload or recompile the subscription would return nothing. Then I installed another package (composite packages) and after that it didn't work at all. Always undefined (the userID). Even after removing the package, which doesn't make sense, it still didn't work. Then I found your article and you seem to have saved my day. Weird that it used to work with fat arrow (like just 15 minutes before this post..)

http://stackoverflow.com/a/28040731
answers question: http://stackoverflow.com/q/28040336
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28040336
score: 1
has body: You don't have the BulkList accessible in Javascript. Javascript has accessible only the source code that is generated by your JSP. For the list to be accessible in javascript you have to add the items to a javascript array. Something like this: &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %&gt; ... var bulkListJavascriptArray = [ &lt;c:forEach var="bulkItem" items="${BulkList}"&gt; &lt;c:out value="${bulkItem}"/&gt;, &lt;/c:forEach&gt; ]; for(var i=0; i&lt;bulkListJavascriptArray.length; i++){ console.log("value is = " + bulkListJavascriptArray[i]); }

http://stackoverflow.com/q/28090888
favorite count: 0
tagged with: twitter-bootstrap
has body: In an example below, when user clicks on any item from dropdown list, then the modal window is automatically trigerred to close. The modal window shall close when user clicks on SEND button. Category and message are required to activate the SEND button (but this is out of topic). I tried to prevent that behaviour by $('.dropdown-menu').click(function(event){ event.stopPropagation(); });​ ,but it doesn't change anything. Select category Category 1 Category 2 Category 3 Category 4 Category 5 MESSAGE SEND
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28091311
has title: How to prevent a bootstrap modal from closing when user selects item from dropdown-menu
upvote count: 1
possible better answer: http://stackoverflow.com/a/28091090
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28091090
answer count: 2
tagged with: bootstrap-modal
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/28091311
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/28110844
tagged with: http://stackoverflow.com/tag/html
has body: What I'm trying to do is to append .com in textfield during user input. Textfield will be empty and .com will be shown during typing domain name. Here is my not working code: HTML Enter domain name: &lt;input type="text" id="domain"&gt; Javascript $(document).ready(function(){ $("input").keypress(function(){ $("#domain").val(this.value + ".com"); }); }); Not working demo: http://jsfiddle.net/UUzux/25/ Thanks in advance.
has comment: http://stackoverflow.com/comment/44595830
has comment: http://stackoverflow.com/comment/44595580
has answer: http://stackoverflow.com/a/28111040
type: AnsweredQuestion
has title: Append input with defined text in textfield
linked to: http://stackoverflow.com/q/664631
has answer: http://stackoverflow.com/a/28111553
linked to: http://stackoverflow.com/q/13242967
accepted answer: http://stackoverflow.com/a/28111553
linked to: http://stackoverflow.com/q/2897155
type: Question
has comment: http://stackoverflow.com/comment/44595619
tagged with: javascript
linked to: http://stackoverflow.com/q/512528
has comment: http://stackoverflow.com/comment/44595442
possible better answer: http://stackoverflow.com/a/28111040
upvote count: 2
score: 0
downvote count: 2
answer count: 3
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/28111697
has comment: http://stackoverflow.com/comment/44595393

http://stackoverflow.com/comment/44448610
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28031887
has text: @indubitablee, it will be the value of the `td`

http://stackoverflow.com/q/28054780
answer count: 0
has comment: http://stackoverflow.com/comment/44491742
type: UnansweredQuestion
has title: Script for Amazon doesn't seem to run
linked to: http://stackoverflow.com/q/11195658
has comment: http://stackoverflow.com/comment/44491479
has comment: http://stackoverflow.com/comment/44494191
has comment: http://stackoverflow.com/comment/44491561
type: Question
has body: I'm new to JavaScript and have pieced this together from what I know of C++ code and from looking at other Greasemonkey scripts. This script is designed to add a link to view a book on ereaderiq.com to any Kindle book. Unfortunately, it doesn't seem to do anything. I'm sure I'm missing something simple and basic, but hopefully someone else's eyes can spot whatever it is I'm missing. It is my first attempt at writing my own Greasemonkey script. // ==UserScript== // @name View Kindle Book on ereaderiq // @namespace buran.public // @description Adds a link to Amazon Kindle book product pages for easy viewing of that book on ereaderiq.com // @include *.amazon.com/* // @include *.amzn.com/* // @version 1 // @grant none // ==/UserScript== function getASIN(urlstring) { var asinMatch; asinMatch = whereami.match(/\/exec\/obidos\/ASIN\/(\w{10})/i); if (!asinMatch) { asinMatch = urlstring.match(/\/gp\/product\/(\w{10})/i); } if (!asinMatch) { asinMatch = urlstring.match(/\/exec\/obidos\/tg\/detail\/\-\/(\w{10})/i); } if (!asinMatch) { asinMatch = urlstring.match(/\/dp\/(\w{10})/i); } if (!asinMatch) { return null; } return asinMatch[1]; } asin = getASIN(window.location.href); var bl = document.getElementById("btAsinTitle"); if asin.substring(0,3) !== "B00" { //do-nothing code } else { var bookTitle = document.getElementById("btAsinTitle"); var elmNewContent = document.createElement('a'); elmNewContent.href = 'http://www.example.com/'; var sb = "click here"; var ereaderiqURL = "[View on eReaderIQ]"; elmNewContent.appendChild(document.createTextNode('click here')); var elmFoo = document.getElementById('foo'); elmFoo.parentNode.insertBefore(elmNewContent, elmFoo); }
tagged with: greasemonkey
tagged with: javascript
score: 0

http://stackoverflow.com/comment/44337609
score: 3
comment on: http://stackoverflow.com/q/27972448
type: Comment
type: QuestionComment
has text: What are you looking for? In the first function, you are just returning a random number, but in the second snippet, what do you expect to happen? Should it return the first one, the second one, or a random one from the list perhaps?

hudson
type: Tag
tags question: http://stackoverflow.com/q/28035657
tag name: hudson
tags question: http://stackoverflow.com/q/28094119

http://stackoverflow.com/comment/78167258
score: 0
type: Comment
type: QuestionComment
has text: To catch lastError, see https://stackoverflow.com/a/45603880/632951
comment on: http://stackoverflow.com/q/28020878

http://stackoverflow.com/q/28099228
has answer: http://stackoverflow.com/a/28099316
type: AnsweredQuestion
tagged with: constructor
has comment: http://stackoverflow.com/comment/44574163
has comment: http://stackoverflow.com/comment/44574221
upvote count: 1
has answer: http://stackoverflow.com/a/28099257
downvote count: 1
type: Question
has title: Javascript - What is the difference between these constructor functions?
has comment: http://stackoverflow.com/comment/139983844
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/28099257
tagged with: javascript
favorite count: 0
has body: What is the difference between this constructor function: var Person = function(living, age, gender) { this.living = living; this.age = age; this.gender = gender; this.getGender = function() {return this.gender}; } and this one: var Person = function Person(living, age, gender) { this.living = living; this.age = age; this.gender = gender; this.getGender = function() {return this.gender;}; };
possible better answer: http://stackoverflow.com/a/28099316
linked to: http://stackoverflow.com/q/15336347

variables
tag name: variables
tags question: http://stackoverflow.com/q/28062884
tags question: http://stackoverflow.com/q/28116324
tags question: http://stackoverflow.com/q/28078811
tags question: http://stackoverflow.com/q/28093713
tags question: http://stackoverflow.com/q/28029199
tags question: http://stackoverflow.com/q/28010643
tags question: http://stackoverflow.com/q/28076519
tags question: http://stackoverflow.com/q/28069506
tags question: http://stackoverflow.com/q/28033452
tags question: http://stackoverflow.com/q/28014945
type: Tag
tags question: http://stackoverflow.com/q/28000898
tags question: http://stackoverflow.com/q/28016616
tags question: http://stackoverflow.com/q/28067987
tags question: http://stackoverflow.com/q/28097948
tags question: http://stackoverflow.com/q/28105909
tags question: http://stackoverflow.com/q/27996259
tags question: http://stackoverflow.com/q/27970783
tags question: http://stackoverflow.com/q/28046820
tags question: http://stackoverflow.com/q/28014480

http://stackoverflow.com/comment/44512135
comment on: http://stackoverflow.com/q/28066160
type: QuestionComment
has text: That is not even valid JSON
type: Comment
score: 2

http://stackoverflow.com/comment/44442504
has text: http://momentjs.com/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28028649

http://stackoverflow.com/q/28002103
has answer: http://stackoverflow.com/a/28002173
upvote count: 1
type: Question
tagged with: javascript
tagged with: express
accepted answer: http://stackoverflow.com/a/28002173
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ssh
has body: I'm building a node.js application to manage servers. In this application, I can create some shell scripts and execute them on a server by clicking on a button. Here is what I have in my routes.js file for this action : app.get('/exec', isLoggedIn, function(req, res) { var url = require('url'); var url_parts = url.parse(req.url, true); var query = url_parts.query; var Server = require('../app/models/server'); var Script = require('../app/models/script'); var async = require('async'); var scriptId = query.scriptId; var userId = query.userId; var serverId = query.serverId; var stdout = ""; var stderr = ""; async.parallel({ servers: function(callback){ Server.find({"_id" : serverId}).exec(callback); }, scripts: function(callback){ Script.find({"_id" : scriptId}).exec(callback); } }, function(err, results) { if (err) res.send(err); var selectedServer = results.servers; var selectedScript = results.scripts; var serverIp = selectedServer[0].serverDetails.serverAddress; var serverPort = selectedServer[0].serverDetails.serverPort; var serverUsername = selectedServer[0].serverDetails.serverUsername; var scriptContent = selectedScript[0].scriptDetails.scriptContent; var Connection = require('ssh2'); var conn = new Connection(); conn.on('ready', function() { //console.log('Connection :: ready'); conn.exec(scriptContent, function(err, stream) { if (err) throw err; stream.on('exit', function(code, signal) { //console.log('Stream :: exit :: code: ' + code + ', signal: ' + signal); }).on('close', function() { //console.log('Stream :: close'); conn.end(); }).on('data', function(data_out) { console.log('STDOUT: \n' + data_out); stdout = stdout + data_out; res.render('execresults.ejs', { stdout : stdout }); }).stderr.on('data', function(data_err) { console.log('STDERR: \n' + data_err); }); }); }).connect({ host: serverIp, port: serverPort, username: serverUsername, privateKey: require('fs').readFileSync('id_rsa') }); conn.on('error', function(e) { console.log("Connection failed or ti…
has title: display ssh2 stdout and stderr in textarea
tagged with: node.js
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/44458225
has text: Where have you seen `Meteor.http.get`? It's probably from a very old tutorial, as that is an outdated API. I wouldn't recommend reading any Meteor tutorials written before the second half of 2014. [Here is the official documentation about HTTP requests in Meteor](http://docs.meteor.com/#/full/http_call). You should *not* need to do all that asynchronous stuff - on the server Meteor's `HTTP` API works synchronously.
score: 2
comment on: http://stackoverflow.com/q/28036778
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27992653
possible better answer: http://stackoverflow.com/a/27992805
has comment: http://stackoverflow.com/comment/44376268
has comment: http://stackoverflow.com/comment/44376516
has answer: http://stackoverflow.com/a/27992805
has comment: http://stackoverflow.com/comment/44376356
has title: Can I pass a class selector to JavaScript from jQuery?
has comment: http://stackoverflow.com/comment/44376505
has comment: http://stackoverflow.com/comment/44376179
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44376202
has comment: http://stackoverflow.com/comment/44376344
has comment: http://stackoverflow.com/comment/44376281
has comment: http://stackoverflow.com/comment/44376435
has comment: http://stackoverflow.com/comment/44376315
type: Question
has comment: http://stackoverflow.com/comment/44376152
has answer: http://stackoverflow.com/a/27992919
accepted answer: http://stackoverflow.com/a/27992919
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/44376495
has comment: http://stackoverflow.com/comment/44376262
has body: I have a huge UI with over 10,000 div elements (for an experiment I am doing). I would like to find a super fast selector method that should be very raw vanilla JS. My 10,000+ divs are big containers with a class of .b0 - .b123 (large number) holding smaller imgs, each image has a class of .q0 - .q100 I would like to know If I can somehow get the container div of an image clicked in a jQuery event handler using my line: document.getElementsByClassName( e.target.className.replace( 'q', 'b' ) )[0]; where e would be the jQuery event. Or would there be a faster way?
answer count: 2
downvote count: 3
tagged with: css-selectors
upvote count: 1
favorite count: 0

http://stackoverflow.com/q/27999483
has answer: http://stackoverflow.com/a/27999532
type: Question
has body: so in my javascript file i have this document.getElementById('bodyresize').onclick = function() so that when i press a button with this code it starts that function: Click Me test but now i need another button end when i press that a function starts in my html script: function resizeanshow() { showhide(); } in that function first showhide() does its thing but now the question: what is the code that i can run bodyresize also in that same function
tagged with: javascript
has title: run getelementbyid in function html
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27999532
type: AnsweredQuestion

http://stackoverflow.com/comment/44463268
comment on: http://stackoverflow.com/q/28038494
type: Comment
type: QuestionComment
has text: Set the ID mode to static on the button. Set the ID to a known value. Hardcode the javascript call. Open in browser and debug. Verify that you can actually get the element, then unwind until you find the issue.
score: 0

http://stackoverflow.com/comment/44446673
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/28031001
has text: use a data attribute? data-name?
type: Comment

http://stackoverflow.com/comment/44485274
type: Comment
comment on: http://stackoverflow.com/q/28045137
type: QuestionComment
score: 0
has text: Are you sure you are accounting for the timezone correctly? I can't tell from your code. http://www.w3schools.com/jsref/jsref_setutchours.asp

http://stackoverflow.com/comment/44360337
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27973592
has text: I should have said when I press enter on my keyboard.. I go to logins page and quickly type username and password and hit enter on my keyboard but defaults to the search submit button and does not log me in but attempts to search...

http://stackoverflow.com/a/28026407
score: 1
upvote count: 1
has body: Newer browsers support a .classList property on DOM element nodes. It's an array of class names. Older browsers just support the .className property, which is a single string containing space-separated class names. If the if statement in the code you posted sees that the document node has a .classList property, it knows that it's running on a newer browser. If not, then it creates alternative versions of some class management utilities.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28026379
answers question: http://stackoverflow.com/q/28026379
type: Answer

http://stackoverflow.com/comment/44512572
has text: Do note that I'm a student and all this is new to me. That is why I came to seek help and guidance on this website, as most of my questions were answered here
type: Comment
score: 0
comment on: http://stackoverflow.com/q/28066202
type: QuestionComment

http://stackoverflow.com/comment/44584056
comment on: http://stackoverflow.com/q/28104350
score: 2
has text: Load the helper `$this->load->helper('html');`
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27993603
has body: I am using the Counter-Up plugin for my Meteor application. On first site load it works fine, but there seems to be a problem with real-time changes. I want to display total games created in my web app, so I have this helper: totalGames: function () { return Games.find().count(); } and this is my rendered function: Template.home.rendered = function () { $('.counter').counterUp({ delay: 10, time: 500 }); }; Now the problem is, the counter does not increase, due to the reactivity. So if user A sees the counter with the number 1 on the home site and suddenly a new game is created, the number changes to 12 and not 2. How can I solve this issue? Any help would be greatly appreciated.
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/26924253
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/27994565
score: 0
possible better answer: http://stackoverflow.com/a/27994504
accepted answer: http://stackoverflow.com/a/27994565
has answer: http://stackoverflow.com/a/27994504
tagged with: meteor
has title: Counter-Up not increasing int in Meteor application

http://stackoverflow.com/q/28099710
tagged with: adobe
type: AnsweredQuestion
has body: I am not familiar with Adobe live cycle but I am creating a form which I need some validation. When a user inputs a email I put this script to validate my email which works in another PDF but Live Cycle is not reading it for some reason. It is not reading any of my validations. Help? &lt;script&gt; var str = this.getField("1-3f-email").value; if (str != "") { var regExp = /^[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|ca|mx|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)\b$/; if (!regExp.test(str)) { app.alert("Please ensure email address is valid"); resetForm(["1-3f-email"]); } } &lt;/script&gt;
score: 1
tagged with: cycle
accepted answer: http://stackoverflow.com/a/28106943
upvote count: 1
type: Question
tagged with: javascript
tagged with: live
tagged with: livecycle-designer
has title: Adobe livecycle form validation email, numbers etc.
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/28106943
favorite count: 0

http://stackoverflow.com/comment/44437947
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28025259
score: 0
has text: @A.Wolff Amazing, it seems so stupid now but putting the type selector after the input rather than after the classname fixes the problem. this works just fine: `$('textarea.classname, input[type=text].classname').first().focus();` Post it as an answer so I can get you the reputation you deserve :)

http://stackoverflow.com/a/27983308
score: 0
answers question: http://stackoverflow.com/q/27982709
has body: myId would be the id attribute of the player, but you don't have one. &lt;video id="myPlayer" class="video-js vjs-default-skin" … &lt;script&gt;var myPlayer = videojs("myPlayer"); …
type: Answer
has comment: http://stackoverflow.com/comment/44438420
has comment: http://stackoverflow.com/comment/44363862

sencha-touch-2.1
tag name: sencha-touch-2.1
tags question: http://stackoverflow.com/q/28051557
type: Tag

http://stackoverflow.com/a/46679567
has body: Its very simple. Just add "hidden: true" to the column structure. structure: [ {name: 'Roll Number', field: 'roll', width: 'auto', defaultValue: "", hidden: true}, {name: 'Name', field: 'name', width: '100px', defaultValue: ""}, {name: 'Class', field: 'class', width: '75px', defaultValue: ""} ],
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/28023860
upvote count: 1

http://stackoverflow.com/comment/76310168
score: 0
comment on: http://stackoverflow.com/a/28098261
type: Comment
has text: @Vinay I haven't tried anything like this on so many canvases. I have, however, tried a very large number of images on a single canvas, and the lag was not pretty. There was an article I read a long while ago where a game developer reduced fps issues for mobile by copying to a canvas half the intended size then scaling up. Depending on what you need (and how crisp the frames need to be), you could try something like this to reduce the sheer amount of data that you need to process. There might also be some browser settings related to canvas that you could check out.
type: AnswerComment

http://stackoverflow.com/comment/44457923
comment on: http://stackoverflow.com/q/28036561
score: 0
type: QuestionComment
type: Comment
has text: There should be 10 single segments.

http://stackoverflow.com/q/28068305
type: Question
tagged with: object
tagged with: javascript
answer count: 1
downvote count: 0
has body: I'm attempting to open up data from a PHP Object (as shown below) but I'd like to be able to access this data within JavaScript to use in a graphing library. Object in question: What I need to be able to do is convert that into a JSON encoded object for use within Javascript. I tried using twig within Symfony to do this via: {% set playerStats = match.getStatsPlayers().getValues() }% {% dump(playerStats) %} // This is what you see above var playerStats =; console.log(playerStats); The console shows this: Which is where I'm banging my head against the wall. Where can I access the values of these properties? As an inefficient way, I've managed to get it into a JavaScript object by doing: {% for p in playerStats %} playerStats.push({ 'id': {{p.playerID}}, 'playerName': '{{p.playerName}}', 'playerOutfit': {{p.playerOutfit}}, 'playerFaction': {{p.playerFaction}}, 'playerKills': {{p.playerKills}}, 'playerDeaths': {{p.playerDeaths}}, 'playerTeamKills': {{p.playerTeamKills}}, 'playerSuicides': {{p.playerSuicides}} }); {% endfor %} I feel kinda dirty for doing that. There must be a better way to do this surely? Thanks in advance!
favorite count: 0
has answer: http://stackoverflow.com/a/28068554
has title: Converting a Symfony2 PHP entity object for use within Javascript
tagged with: symfony
tagged with: php
upvote count: 6
type: AnsweredQuestion
tagged with: twig
score: 6
accepted answer: http://stackoverflow.com/a/28068554

http://stackoverflow.com/comment/44334150
has text: You got `$('#artist').change` what is `#artist`? A form element or something else?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27970687

http://stackoverflow.com/comment/44598828
score: 0
type: Comment
has text: This Solution doesn't fit with my problem :/
comment on: http://stackoverflow.com/a/28111080
type: AnswerComment

http://stackoverflow.com/q/28113038
has body: I have JSON that looks like this: { "records": [{ "skills": "", "u_past_assignment_groups": "", "urgency": "3", "correlation_id": "", "u_program_name": "", "u_software_name": "", "group_list": "" }] } (This is a truncated version.) But the point is that it is a single element array of key,value pairs. In native JavaScript it is a very straightforward step to use JSON.parse or eval in order to convert this JSON to an actual array of key/value pairs, but, in .Net I cannot figure out how to deserialize this JSON into anything meaningful. I have tried every permutation I can come up with of JavaScriptSerializer.Deserialize and JavaScriptSerializer.DeserializeObject. No matter what I try I continue to get some sort of error about being unable to deserialize or being unable to cast. Can someone look at this code snippet and tell me how (in native .Net) I can deserialize this into a list or array of key/value pairs? Do I have to create my own object to store this data? I mean, I'd hate to have to do that. It looks like it should easily conform to a native .net data structure. //process response Stream respStream = resp.GetResponseStream(); StreamReader respReader = new StreamReader(respStream); string response = respReader.ReadToEnd(); respStream.Close(); JavaScriptSerializer jsDes = new JavaScriptSerializer(); //***This is the part I can't figure out.*** var objResp = jsDes.DeserializeObject(response); Dictionary&lt;string, string&gt;[] dicResp = (Dictionary&lt;string, string&gt;[])objResp; //****************************************** pOutput.InnerText = "Incident Number: " + dicResp[0]["key"];
type: AnsweredQuestion
has title: How can I deserialize a JSON array into a native .net data structure?
accepted answer: http://stackoverflow.com/a/28113612
score: 0
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/28113635
has comment: http://stackoverflow.com/comment/44600653
tagged with: javascript
has comment: http://stackoverflow.com/comment/44599921
answer count: 2
possible better answer: http://stackoverflow.com/a/28113635
has answer: http://stackoverflow.com/a/28113612
tagged with: asp.net

http://stackoverflow.com/comment/44496011
type: QuestionComment
has text: you don't need to worry about what they do really. it's archaic and complicated math. it can be handy once in a blue moon, but it's not as important as it was decades ago. in short, it's ok to skip that part if you just want to build apps.
comment on: http://stackoverflow.com/q/28057102
score: 0
type: Comment

http://stackoverflow.com/q/28003690
has answer: http://stackoverflow.com/a/28004210
has body: I have a table that gets dynamically created by the user and can have over 1000 rows. By clicking buttons the user can manipulate the table but I'm unable to figure out how to add a column to the whole table when the user clicks a button, and to make it appear where I want it to. Here's some example code. table td, table th{ border: 2px solid #0f0f0f; text-align:center; } JS Bin DATE Cell1 Cell2 Cell1 Cell2 Cell1 Cell2 Cell1 Cell2 DATE Cell1 Cell2 Cell1 Cell2 Cell1 Cell2 Cell1 Cell2 DATE Cell1 Cell2 Cell1 Cell2 Cell1 Cell2 Cell1 Cell2 How would I add a column between cell1 and cell2 throughout the whole table? I thought about creating a function that gets the innerHTML of all the rows and then adds the code for another column - but that wouldn't add a cell between the two columns.
type: Question
answer count: 1
tagged with: javascript
has title: How to add columns to a table between 2 other columns with JavaScript
score: 0
type: UnansweredQuestion

http://stackoverflow.com/q/28062206
has title: Meteor.js HTTP.get to fetch JSON quotes and to parse the results seem to contain a callback function
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/28063172
tagged with: javascript
score: 0
answer count: 1
tagged with: meteor
has body: I am trying to fetch data in Meteor.js from 126.com. Here is an example: http://api.money.126.net/data/feed/1000001,money.api and that will get back the following(one can test by opening above url in browser): _ntes_quote_callback({"1000001":{"code": "1000001", "percent": 0.042661, "high": 14.6, "askvol3": 318361, "askvol2": 93200, "askvol5": 214900, "askvol4": 62327, "price": 14.42, "open": 13.88, "bid5": 14.38, "bid4": 14.39, "bid3": 14.4, "bid2": 14.41, "bid1": 14.42, "low": 13.75, "updown": 0.59, "type": "SZ", "bidvol1": 459480, "status": 0, "bidvol3": 1713089, "bidvol2": 518100, "symbol": "000001", "update": "2015/01/21 15:34:15", "bidvol5": 508800, "bidvol4": 436678, "volume": 194053037, "askvol1": 90420, "ask5": 14.47, "ask4": 14.46, "ask1": 14.43, "name": "\u5e73\u5b89\u94f6\u884c", "ask3": 14.45, "ask2": 14.44, "arrow": "\u2191", "time": "2015/01/21 15:34:09", "yestclose": 13.83, "turnover": 2758192756.95} }); I can get the contents. The problem comes with the leading "_ntes_quote_callback" which I think I am expected to set up a function using that name and return the the params? How? Thanks for any suggestions. I'm very new to javascript and html so that I tried with some code though can't make it. I've tried the following: at the client side _ntes_quote_callback = (jsonobj)-&gt; jsonobj stock = Session.get 'stock' Meteor.call 'getQuote', stock, (err, results)-&gt; if err then return console.log results.content Session.set 'quote', JSON.parse results.content.val() and server side: if Meteor.isServer Meteor.methods getQuote: (stock) -&gt; url = "http://api.money.126.net/data/feed/#{stock}" HTTP.call 'GET', url
has answer: http://stackoverflow.com/a/28063172
type: AnsweredQuestion

http://stackoverflow.com/comment/44487807
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28052350
has text: Use a (semi-)recursive function instead of writing out the loop!

filemaker
tags question: http://stackoverflow.com/q/28111053
tag name: filemaker
type: Tag

http://stackoverflow.com/a/27984042
has comment: http://stackoverflow.com/comment/44360683
has body: $('.post-link').click(function(e) { e.preventDefault(); var post_id = $(this).attr('rel'), ajaxURL = site.ajaxurl; function projectShow() { $.ajax({ type: 'POST', url: ajaxURL, data: {'action': 'load-content', post_id: post_id }, }).done(function(response){ $('#project-container').html(response); $('#slider').leanSlider(); <--// This isn't initiating return false; }).fail(function(error){ //handle error }); } projectShow(); }); .done() is prefferred to success jQuery.ajax handling continue responses: "success:" vs ".done"? "jqXHR.done(function( data, textStatus, jqXHR ) {}); An alternative construct to the success callback option, the .done() method replaces the deprecated jqXHR.success() method. Refer to deferred.done() for implementation details." http://api.jquery.com/jquery.ajax/
has comment: http://stackoverflow.com/comment/44359619
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27983801

http://stackoverflow.com/comment/44399324
has text: "no jQuery please" is mentioned in the question.
comment on: http://stackoverflow.com/q/28005368
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44580111
comment on: http://stackoverflow.com/q/28101350
score: 0
has text: Does it still crash if you take out the `console.log()`?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44613918
score: 0
has text: That is not the job of the client, that is the job of the server. For example if an action exists in the client code and the user finds it and calls the server should recognize that the user does not have the right to preform the action and ignore the request.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28117733

http://stackoverflow.com/comment/44536556
type: Comment
has text: so what would the answer be it if was a GET request?
comment on: http://stackoverflow.com/a/28078880
score: 0
type: AnswerComment

http://stackoverflow.com/a/28044266
has comment: http://stackoverflow.com/comment/44471165
answers question: http://stackoverflow.com/q/28043364
score: 0
has body: In common.js you call the following render.tmpl_cache[tmpl_name] = _.template(tmpl_string); However the variable tmpl_string has an undefined value when passed to _.template(), which raises the exception. You can see this by doing var tmpl_string; _.template(tmpl_string); // Uncaught TypeError: Cannot read property 'replace' of undefined This problem arises because are trying to assign a value to the tmpl_string inside the $.ajax() success callback - but this is a asynchronous function - and the render.tmpl_cache[tmpl_name] = _.template(tmpl_string) line will be executed while we wait for the Ajax response. You could use jQuery promises to resolve this, so that the the variable is only passed to the _.template() function once you're ready.
type: Answer

http://stackoverflow.com/comment/44660398
type: QuestionComment
score: 1
has text: See also [Caching a promise object in AngularJS service](http://stackoverflow.com/q/18744830/1048572)
comment on: http://stackoverflow.com/q/28107460
type: Comment

http://stackoverflow.com/q/28024997
downvote count: 1
has title: Enabling Async file uploads with jQuery File Upload + Carrierwave + Rails 4
tagged with: javascript
tagged with: jquery
tagged with: carrierwave
type: UnansweredQuestion
tagged with: jquery-file-upload
type: Question
has body: I'm trying to allow users to move around the portal when the file uploads are happening. This is my form code: &lt;%= form_for [@myfolder, Myfile.new], html: { multipart: true, :id =&gt; "fileupload" }, :remote =&gt; true, do |f| %&gt; &lt;%= f.file_field :attachment, multiple: true, style: "display:none;" %&gt; &lt;% end %&gt; It is hitting the create action (POST), which is responding with the JSON output. format.html { redirect_to @parentfolder, notice: 'Your file was successfully created.' } format.js format.json{ render :show, status: :created, location: @myfile } Here's the jquery file uploads call in my application.js: add: function(e, data) { data.context = $(tmpl("template-upload",data.files[0])) $('#fileupload').append(data.context) $('#inline-upload-status').show(); $.getJSON('/myfiles.json', function (result) { data.formData = result; // e.g. {id: 123} data.submit(); }); } I'm not able to figure out what's wrong with this code. The file uploads are not happening.
has answer: http://stackoverflow.com/a/28025401
favorite count: 0
upvote count: 1
tagged with: ruby-on-rails
answer count: 1
score: 0

http://stackoverflow.com/a/27985186
upvote count: 5
has body: You can use: angular.element(selector).attr("data-description") to select elements as you would do with jQuery.
type: Answer
accepted answer of: http://stackoverflow.com/q/27985109
downvote count: 0
answers question: http://stackoverflow.com/q/27985109
score: 5
type: AcceptedAnswer

http://stackoverflow.com/comment/44446105
score: 0
has text: You can't comment json. You can decode the json into a native structure, REMOVE the unwanted bits, then re-encode to json, effectively deleting the unwated stuff.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28030674

http://stackoverflow.com/q/28072379
answer count: 1
has body: I try to download a locally generated file to the device file system. I was using a function that only works for chrome so I wanted to replace it by a Cordova based function. I added in IntelXDK: -The Cordova plugins File and FileTransfer. -The Android permissions WRITE_EXTERNAL-STORAGE and READ_EXTERNAL_STORAGE. -The download function: function downloadCordova2(filename, text){ //NEXT SAVE IT TO THE DEVICE'S LOCAL FILE SYSTEM console.log("file system..."); window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) { alert("in 1"); console.log(fileSystem.name); console.log(fileSystem.root.name); console.log(fileSystem.root.fullPath); fileSystem.root.getFile("test.txt", {create: true}, function(entry) { var fileEntry = entry; console.log(entry); alert("in 2"); entry.createWriter(function(writer) { writer.onwrite = function(evt) { console.log("write success"); }; console.log("writing to file"); writer.write( pdfOutput ); }, function(error) { console.log(error); }); }, function(error){ console.log(error); }); }, function(event){ console.log( evt.target.error.code ); alert(evt.target.error.message); }); } I get the error "Uncaught ReferenceError: LocalFileSystem is not defined" in the emulator, in chrome after building for chrome, in the emulator using a real Android device and, when I install the Android apk, I cannot see it but it doesn't work either. Am I missing anything to include? There are similar posts about this issue but the problems where missing plugins, permissions...
tagged with: cordova
tagged with: android
accepted answer: http://stackoverflow.com/a/28089393
type: AnsweredQuestion
tagged with: intel-xdk
type: Question
has title: IntelXDK Uncaught ReferenceError: LocalFileSystem is not defined
tagged with: javascript
has answer: http://stackoverflow.com/a/28089393
score: 0

http://stackoverflow.com/comment/44396913
score: 0
has text: Good point regarding the return method if anything still remains inside. But the main point here that the length of the `tmpStack` is always 0.
type: Comment
comment on: http://stackoverflow.com/a/28004176
type: AnswerComment

http://stackoverflow.com/a/27995147
type: Answer
has body: I've updated the code to add to resize event and to fire on page load: var setCanvasSize = function(){ canvas = document.getElementsByClassName('canvases'); var i; for (i = 0; i &lt; canvas.length; i++) { canvas[i].width = parseInt($(".projectContainer").css("width")); alert (i + " " + $(".projectContainer").css("width")); } }; var timer; //add to window resize event $(window).resize(function(){ clearTimeout(timer); setTimeout(setCanvasSize, 100); }); //fire on page load setCanvasSize(); The reason that the width isn't setting was that canvas takes an integer as a width value, while the jQuery.css("width") is returning as a string with "px" appended. A quick and dirty way to force it to just a number is by using parseInt(), but there are other ways available.
has comment: http://stackoverflow.com/comment/44381383
has comment: http://stackoverflow.com/comment/44381942
score: 0
answers question: http://stackoverflow.com/q/27995073
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44381399
accepted answer of: http://stackoverflow.com/q/27995073

http://stackoverflow.com/comment/44336364
type: QuestionComment
comment on: http://stackoverflow.com/q/27971638
score: 0
has text: @slime, I don't know javascript so I downloaded one from the internet
type: Comment

http://stackoverflow.com/q/28001865
tagged with: javascript
type: UnansweredQuestion
tagged with: express
tagged with: websocket
has answer: http://stackoverflow.com/a/28004303
type: Question
has body: I have a problem with Node.JS/Socket.IO/Express.JS and i didn't find any solution. I use: "express": "~4.10.6" "socket.io": "1.2.1" on Ubuntu Linux My problem is that when I run the server and access localhost:3000/chat at the first run all works great but after a refresh/2/3/4 the messages inserted in chat duplicates. For one refresh, i have to identical message on one submit. For two refreshes, I have 3 identical message and so on. This behaviour began when i put the socket functionality in express.js routes folder. P.S. I'm new to node.js/socket.io/express.js app.js var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var routes = require('./routes/index'); var users = require('./routes/users'); var chat = require('./routes/chat'); var app = express(); // Socket IO Things var server = require('http').createServer(app); var io = require('socket.io').listen(server); // END - Socket IO Things // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'ejs'); // uncomment after placing your favicon in /public //app.use(favicon(__dirname + '/public/favicon.ico')); 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.use('/chat', chat.random_function(io)); // catch 404 and forward to error handler app.use(function(req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); }); // error handlers // development error handler // will print stacktrace if (app.get('env') === 'development') { app.use(function(err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: err }); }); } // production error handler // no stacktraces lea…
tagged with: node.js
has title: Duplicates when I use socket.io in express.js route files
score: 0
answer count: 1
tagged with: socket.io

http://stackoverflow.com/q/28050766
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/28050813
has title: jquery - ajaxStop is not consistently executing javascript redirect
type: AnsweredQuestion
upvote count: 2
tagged with: http-redirect
type: Question
has answer: http://stackoverflow.com/a/28050813
possible better answer: http://stackoverflow.com/a/28077264
has answer: http://stackoverflow.com/a/28077264
answer count: 2
has body: I am using jquery 1.9.1. I have logout code where I need to post to multiple pages then do a redirect: &lt;script type="text/javascript"&gt; window.onload=function(){ $( document ).ajaxStop(function() { logoutRedirect(); }); logoutOfApps(); } &lt;/script&gt; These methods are in a different javascript file (but I think that is irrelavent). function logoutOfApps(){ $.post("/app1/logout"); $.post("/app2/logout"); } function logoutRedirect(){ var redirectOnLogoutURL = null; redirectOnLogoutURL = "/mylogoutdisplaypage"; top.location = redirectOnLogoutURL; } SECOND TRY: This also doesn't work consistently: &lt;script type="text/javascript"&gt; window.onload=function(){ logoutOfApps(); logoutRedirect(); } &lt;/script&gt;
score: 2
has comment: http://stackoverflow.com/comment/44483674
downvote count: 0

http://stackoverflow.com/q/28027050
has answer: http://stackoverflow.com/a/28030221
type: Question
tagged with: google-apps-script
tagged with: javascript
score: 0
answer count: 1
has body: I am trying to create a way of Google Spreadsheets recognising the existence of a certain file name and/or type from the Google Drive itself. If the file exists, I'd like an "X" to be displayed in a box within the spreadsheet. I am fairly new to gscript/javascript and I've had a play around but to no avail I currently have this, however I am unsure how to piece code together properly: function CheckIfFileExists(name, mimeType){ var flag = false; var files = DriveApp.getFilesByType(mimeType); while (files.hasNext()) { var file = files.next(); if(file.getName() == name) { flag = true; SpreadsheetApp.getActiveSheet().getRange('F2').setValue('Hello'); break; } } return flag; } I'd appreciate a point in the right direction if you could. Thanks!
has title: Google Spreadsheet link with Google Drive
linked to: http://stackoverflow.com/q/3718128
type: UnansweredQuestion

http://stackoverflow.com/comment/44418634
type: QuestionComment
comment on: http://stackoverflow.com/q/28014480
score: 0
has text: What do you recommend? I could do a callback, but it's going to be messy. I am looking at possibly trying jQuery.Deferred.
type: Comment

http://stackoverflow.com/comment/44531161
has text: Without an example of your own approach, it's hard to say whether a better one exists.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28076031

http://stackoverflow.com/comment/44499881
score: 0
comment on: http://stackoverflow.com/q/28059091
type: Comment
type: QuestionComment
has text: @Steve Mitcham I'm sorry, very new at this.. I want the button to add a product to the basket by calling the addProduct which in turn calls 2 functions within the Basket constructor function... but this just does not work

http://stackoverflow.com/q/28050058
tagged with: get
score: 0
answer count: 1
tagged with: jquery
has title: Wait to code inside function $.get done to continue
has answer: http://stackoverflow.com/a/28050121
has body: I have doing a website with javascript but I can't do that I want. I have this &lt;script type="text/javascript"&gt; res = new Array(); var fun1 = function () { var control = $.Deferred(); for (i=0;i&lt;5;i++) { $.get("URL", function(data){ res[i]=data; console.log ("i is: " + i + "and res is: " + res); }); } } setTimeout(function () { control.resolve(); }, 3000); var show = function () { console.log("Res finally is: " + res); } fun1().done(show); &lt;/script&gt; I want to do a $.get with 5 or more different URL (I have a param in the URL) but I can't do it. res[i] is always the last element in the array (in this case is always res[5]=data and I want to fill the complete array, from 0 to 15. First console.log always show i is: 5 and res is: ,,,,,20 i is: 5 and res is: ,,,,,10 ... i is: 5 and res is: ,,,,,38 and the second console.log always return the last Res finally is ,,,,,38 How can I do it correctly? Thanks!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44482547
has comment: http://stackoverflow.com/comment/44482265
linked to: http://stackoverflow.com/q/750486
type: Question
linked to: http://stackoverflow.com/q/1451009
accepted answer: http://stackoverflow.com/a/28050121
tagged with: javascript

http://stackoverflow.com/a/28106292
has body: You have to use .html() instead of .append() outside of your loop. $("#munna").html(html); Instead of $("#munna").append(html);
score: 0
answers question: http://stackoverflow.com/q/28106256
type: Answer

http://stackoverflow.com/a/28088095
downvote count: 0
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/28088058
has comment: http://stackoverflow.com/comment/44554780
has body: Is wrapping our Angular JS code in a function really good practice? Why? This is good practice and is called module pattern. As a pattern has it advantages and it disadvantages. However, it is one of the most used patterns in the JS world. In a few words, it allows you to declare as you want your variables, your functions etc. without having any conflict with any js code you use in your app. For further information on the above, please have a look here. What sort of function is it and what does it do? It is a classic function. Nothing more nothing less. Using the invoking operator () at the end, we call the function, to be executed. The latter is also known as IIFE, immediately invoked anonymous function.
score: 2

http://stackoverflow.com/a/27979171
type: Answer
has comment: http://stackoverflow.com/comment/44350233
score: 123
downvote count: 0
upvote count: 123
has comment: http://stackoverflow.com/comment/44350167
has body: If you read the docs (http://momentjs.com/docs/#/displaying/) you can find this format: moment("2015-01-16T12:00:00").format("hh:mm:ss a") See JS Fiddle http://jsfiddle.net/Bjolja/6mn32xhu/
has comment: http://stackoverflow.com/comment/44350158
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27978819
has comment: http://stackoverflow.com/comment/44350193
answers question: http://stackoverflow.com/q/27978819

http://stackoverflow.com/q/28086643
tagged with: jquery
tagged with: php
tagged with: checkbox
accepted answer: http://stackoverflow.com/a/28087250
tagged with: wordpress
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28087250
tagged with: javascript
has title: Run javascript function after login if checkbox is selected
type: Question
score: 0
answer count: 1
has body: I am making a Wordpress site where users can vote on posts if the are loggedin, this is currently working. What I want to do now, is to give them the option to place their votes by selecting a checkbox before they have loggedin on the site. If the checkbox is not selected the function must run as it does now. I hope I was clear in my explanation. Thank you in advance. This is the form that runs the script below if the users are loggedin. And have not already voted by selecting the checkbox in the form at the bottom, before loggin in. Sign <input type="hidden" id="post_id" value="<?php the_ID() ?>"> The script than users can run with the form above if they are loggedin. Should also run if users selected the checkbox in the from below, before logging in. $(".vote").click(function() { $(".vote").html('busy'); $url = "/vote/?petitie_id=" + $("#post_id").val() + "&msg=" + $("#msg").val(); $.ajax({ dataType: "json", url: $url }) .done(function(data) { $(".vote").html('done'); if (data.success) { $(".vote").html('voted') } else { $(".vote").html('already voted'); } }) .fail(function() { alert('fail'); }) }); The login form with checkbox, this has to run the script above after login if the checkbox was selected. Login and vote <?php do_action('login_form'); ?> <input type="submit" name="wp-submit" type="button" id="myButton1" class="btn btn-danger btn-lg btn-block" value="<?php esc_attr_e('Log In'); ?>" /> <input type="hidden" name="redirect_to" value="<?php echo WPUF_Login::get_posted_value('redirect_to'); ?>" /> <?php wp_nonce_field('wpuf_login_action'); ?>

http://stackoverflow.com/a/28048238
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44478725
has comment: http://stackoverflow.com/comment/44479583
type: Answer
has comment: http://stackoverflow.com/comment/44480412
upvote count: 2
has comment: http://stackoverflow.com/comment/44481117
has comment: http://stackoverflow.com/comment/44478726
has comment: http://stackoverflow.com/comment/44480476
score: 2
has body: You can check if the form was filled in and redirect them otherwise to your 404 page. Place the following script in your page that needs to be hidden: &lt;?php if (!isset($_POST['submit'])) { header("HTTP/1.0 404 Not Found"); // Default 404 redirect OR: header("Location: 404.php"); // Custom 404 page exit; } ?&gt; Change 'submit' to the name of your submit button. You can choose between a default 404 header (the first option) or a custom page (second option). If you setup your .htaccess file correctly, you should be able to use the default 404 header anyway. You can also replace 404.php with any page, for example the page with your form. If you don't want a page to be indexed by search engines, you can create a file called robots.txt and use the following content: Disallow: /private_file.php Change the file name to your own file, ofcourse. Please note that search engines do not have to follow rules set in the robots.txt file.
has comment: http://stackoverflow.com/comment/44481232
accepted answer of: http://stackoverflow.com/q/28048174
has comment: http://stackoverflow.com/comment/44481847
answers question: http://stackoverflow.com/q/28048174
has comment: http://stackoverflow.com/comment/44478700

http://stackoverflow.com/q/28101479
type: Question
has comment: http://stackoverflow.com/comment/44578692
tagged with: asp.net-mvc
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44578641
tagged with: http://stackoverflow.com/tag/html
has body: I have some javascript here &lt;script type="text/javascript"&gt; //Autocomplete variables var input = document.getElementById('location'); var searchform = document.getElementById('form1'); var place; I have created a form in my html that looks like this and everything works fine &lt;form action="javascript:void(0);" name="form1" id="form1"&gt; &lt;input type="text" name="location" class="textbox" id="location" value="" /&gt; &lt;input type="submit" value="Submit" class="submit" /&gt; &lt;/form&gt; but when I change the form to use a HTML.BeginForm like this @using (Html.BeginForm("Results", "Home", FormMethod.Get, new { name = "form1", id = "form1" })) { &lt;p&gt; @*@Html.TextBox("Location", null, new {id = "location"})*@ &lt;input type="text" name="location" id="location" value="" /&gt; &lt;/p&gt; &lt;p&gt; &lt;input class="btn btn-primary btn-lg" value='Submit' type="submit"/&gt; &lt;/p&gt; } the javascript below doesn't recognize the form1 name and there is a blue line underneath it with a message that says "cannot resolve id 'form1'" var searchform = document.getElementById('form1');
answer count: 0
type: UnansweredQuestion
tagged with: razor
has comment: http://stackoverflow.com/comment/44578762
has title: name tag isn't being recognized in my javascript from html.beginform
has comment: http://stackoverflow.com/comment/44578715

geolocation
tags question: http://stackoverflow.com/q/28018497
tags question: http://stackoverflow.com/q/28049383
tags question: http://stackoverflow.com/q/28097832
tags question: http://stackoverflow.com/q/28099362
tags question: http://stackoverflow.com/q/27999510
tags question: http://stackoverflow.com/q/28044123
type: Tag
tag name: geolocation

http://stackoverflow.com/q/28014004
has comment: http://stackoverflow.com/comment/44415536
tagged with: getelementbyid
has answer: http://stackoverflow.com/a/28014227
has comment: http://stackoverflow.com/comment/44415359
has answer: http://stackoverflow.com/a/28014223
type: AnsweredQuestion
upvote count: 2
downvote count: 3
possible better answer: http://stackoverflow.com/a/28014227
has comment: http://stackoverflow.com/comment/44415274
type: Question
has title: Editing a DOM/HTML Element
has body: I was trying to find and answer to my question but I've found none. I expect the solution to be simple, I just think I'm making some syntax errors. What I want to achieve: I want to add a new " " element to my " " through a JavaScript. The element would have an element inside, like: " " The link to would need to be taken from a form. Here's the code. I don't really know how to finish it - just starting with JavaScript. Menu Home Galeria Canvas Ankieta JQuery Mobilne <input type="text" name="tytul" id="tytul" value="Tytuł linku" Thanks for help in advance! I've editted my script.
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/28014223
tagged with: dom
answer count: 2
has comment: http://stackoverflow.com/comment/44415451
favorite count: 0
has comment: http://stackoverflow.com/comment/44415409
has comment: http://stackoverflow.com/comment/44415435

http://stackoverflow.com/comment/44507467
score: 0
type: AnswerComment
has text: Sorry, it should be in `Gemfile`.
comment on: http://stackoverflow.com/a/28061463
type: Comment

http://stackoverflow.com/q/27981483
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: css
score: 2
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28577066
answer count: 2
has comment: http://stackoverflow.com/comment/44360949
has body: I'm developing a Web Application with Knockout.js library and jQuery. Initially the form is like that: Foreach input data, on change focus, the height of my table increase, like image below: Below the HTML code of my table: TEXT TEXT TEXT TEXT Can you help me? Thanks Note: with Internet Explorer 8 I have not this problem, I have this problem with modern browser.
has title: Unexpected behavior of my site on change focus
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/44483748
has answer: http://stackoverflow.com/a/28576984

http://stackoverflow.com/q/28002113
type: AnsweredQuestion
downvote count: 1
type: Question
tagged with: angularjs-compile
tagged with: debugging
has body: I read the the documentation from angular website about debugInfoEnabled. Still doesn't clear with concept, how $compileProvider.debugInfoEnabled(false) inside angular config can improve the performance of application by removing the element level class (angular-directives) binding such as ng-scope and ng-isolated-scope. Does anyone know, how performance boost can happen by setting up debugInfoEnabled to false in $compileProvider? Can anyone help me to clear out my concept about angular $compileProvider.debugInfoEnabled feature of angular 1.3? Any Help would appreciated, Thanks in advance:)
upvote count: 9
has title: How $compileProvider.debugInfoEnabled set to false improve performance in angularjs 1.3?
has answer: http://stackoverflow.com/a/28003017
tagged with: javascript
answer count: 1
favorite count: 0
score: 8
accepted answer: http://stackoverflow.com/a/28003017
tagged with: angularjs

http://stackoverflow.com/comment/44336932
type: AnswerComment
type: Comment
score: 0
has text: @Jon yes, sure. but he doesn't - he is just using the response directly. plus, i have to update my answer. he should just echo the value without using `json_encode` at all.
comment on: http://stackoverflow.com/a/27972072

http://stackoverflow.com/comment/44592175
has text: Are you getting any error message? Is the `alert("Error!")` triggering?
comment on: http://stackoverflow.com/q/28109150
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44513821
type: QuestionComment
comment on: http://stackoverflow.com/q/28062819
has text: @markpsmith - it works with no problems for dataTables 1.9.0 and above. If you go lower, 1.8,2, it still loads the JSON, but strange things happends with the search box being undefined and so on.
score: 0
type: Comment

http://stackoverflow.com/q/28050386
tagged with: coldfusion
type: AnsweredQuestion
upvote count: 2
downvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/28125673
has comment: http://stackoverflow.com/comment/44484729
has answer: http://stackoverflow.com/a/28052761
answer count: 3
has title: ColdFusion/Javascript Dynamic Form
has body: I am struggling making this form dynamic. I have a loop that allows the customer to choose 1 thru 5 when the user chooses it does that number of loops. I am trying to figure out where I need to add _ #Add# so that when it loops it just adds a number and still works properly. The loop is working, the form is working when "1 Loop" is chosen. I am just not sure where to add _ #Add# in the JavaScript to make the second loop works correctly as well so that it receives a new name and id. Everything I have tried has just been breaking the JavaScript. Suggestions and advice would be greatly appreciated! Appearance of the loop http://jsfiddle.net/bobrierton/gettgpmj/5/ (Not Looping the JavaScript for geolocation) var placeSearch, autocomplete, autocomplete2; var componentForm = { route: 'long_name', locality: 'long_name', administrative_area_level_1: 'short_name', postal_code: 'short_name' }; var componentForm2 = { route2: 'long_name', locality2: 'long_name', administrative_area_level_12: 'short_name', postal_code2: 'short_name' }; function initialize() { // Create the autocomplete object, restricting the search // to geographical location types. autocomplete = new google.maps.places.Autocomplete( /** @type {HTMLInputElement} */ (document.getElementById('autocomplete')), { types: ['geocode'] }); autocomplete2 = new google.maps.places.Autocomplete( /** @type {HTMLInputElement} */ (document.getElementById('autocomplete2')), { types: ['geocode'] }); // When the user selects an address from the dropdown, // populate the address fields in the form. google.maps.event.addListener(autocomplete, 'place_changed', function() { fillInAddress(); }); google.maps.event.addListener(autocomplete2, 'place_changed', function() { fillInAddress2(); }); } // [START region_fillform] function fillInAddress() { // Get the place details from the autocomplete object. var place = autocomplete.getPlace(); for (var component in componentForm) { document.getElementById(component).value = ''; document.getE…
possible better answer: http://stackoverflow.com/a/28052761
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/28119223
score: 0
has answer: http://stackoverflow.com/a/28125673
has comment: http://stackoverflow.com/comment/44486207

http://stackoverflow.com/comment/44491299
type: QuestionComment
has text: and it console.log this: t {_state: null, _value: null, _deferreds: Array[0], _catched: false, _PSD: null…}
score: 0
comment on: http://stackoverflow.com/q/28054318
type: Comment

http://stackoverflow.com/a/55665691
answers question: http://stackoverflow.com/q/28016103
upvote count: 5
has comment: http://stackoverflow.com/comment/103837960
type: Answer
downvote count: 0
has body: OR you can just use the following code before clicking the stripe button ;-) StripeCheckout.__app.configurations.button0.amount = 1234; $('#stripe-button').click();
score: 5

http://stackoverflow.com/q/28004478
has answer: http://stackoverflow.com/a/28004691
answer count: 1
downvote count: 0
has title: Regexp not making all intended replacements
favorite count: 0
has body: I have the following keyup event handler: $('#id_content').on('keyup', function(e) { var input = $.trim($(this).val()); var matches = input.match(/\*\*(.*?)\*\*/); if (matches) { var submatch = matches[1]; input = input.replace(submatch, ' '+submatch+' ').replace(/\*\*/g,''); } $('#preview_tip').html(input); }); Meaning I have a textarea, and if I insert a **b** c **d**, it should make the input: a b c d But it is only making the input: a b c d What am I doing wrong in my regexp?
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28004691
score: 1
has comment: http://stackoverflow.com/comment/44397747
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44397489
tagged with: javascript
has comment: http://stackoverflow.com/comment/44397544

parse-cloud-code
tags question: http://stackoverflow.com/q/28031309
tags question: http://stackoverflow.com/q/28097144
type: Tag
tag name: parse-cloud-code

http://stackoverflow.com/comment/44362335
comment on: http://stackoverflow.com/q/27985387
score: 0
type: Comment
type: QuestionComment
has text: I hadn't considered that. Thanks..

http://stackoverflow.com/comment/44530414
type: AnswerComment
type: Comment
has text: In **mongoconnection.js**, `module.exports.db = database;` is called only after `MongoClient.connect` completes - which can take some time (possibly seconds). It's started when **mongoconnection.js** is `require()`ed by whatever uses it -- but it may not actually finish for some time. On the other hand, `var db = mongoConnection.db;` in your code (which uses the value assigned to `module.exports.db`) was also executed when **mastermanager.js** was required. In the updated code, it is only executed when getCollection() is called - presumably some time after `MongoClient.connect` completes.
score: 1
comment on: http://stackoverflow.com/a/28056731

http://stackoverflow.com/a/28044814
has comment: http://stackoverflow.com/comment/44553467
has body: as you can see you just pass the #myModalContent node to the bindForm function, and jQuery selector looks for // will never find #myModalContent $('#myModalContent', myModalContentDOMElement).submit(function () { Instead you should do something like this $('form', dialog).submit(function (e) { e.preventDefault(); // stop the default form submit action
upvote count: 1
has comment: http://stackoverflow.com/comment/44504666
has comment: http://stackoverflow.com/comment/44479491
type: Answer
has comment: http://stackoverflow.com/comment/44482831
answers question: http://stackoverflow.com/q/28036939
has comment: http://stackoverflow.com/comment/44472263
downvote count: 0
has comment: http://stackoverflow.com/comment/44481458
has comment: http://stackoverflow.com/comment/44477562
score: 1
has comment: http://stackoverflow.com/comment/44478845
has comment: http://stackoverflow.com/comment/44478860
has comment: http://stackoverflow.com/comment/44480919

http://stackoverflow.com/q/28061340
tagged with: css
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28061471
has comment: http://stackoverflow.com/comment/44503810
type: Question
has title: Dynamically create divs Side by Side
accepted answer: http://stackoverflow.com/a/28061639
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28061639
has answer: http://stackoverflow.com/a/28061413
has comment: http://stackoverflow.com/comment/44503845
tagged with: jquery
has answer: http://stackoverflow.com/a/28061531
possible better answer: http://stackoverflow.com/a/28061413
has body: I have seen so many posts pertaining the titled issue, but non of them worked in my case. I want 3 divs to appear in each row but the following code gets each div casted on new line vertically: JQuery $(document).ready(function() { $.ajax({ url: "Image/", success: function(data) { var el = $('&lt;div&gt;&lt;/div&gt;'); el.html(data); var imgArr = $('a', el); var images = []; $.each(imgArr, function(i, val) { images[i] = val.href.replace(window.location.host, "").replace("http:///", ""); if ($.inArray(images[i].split('.').pop(), ["gif", "png", "jpeg"]) != -1) $('#Panel1').append('&lt;div id="divId"' + i + ' style="height:80px;width:80px;float:left;background-image:url(\'Image/' + images[i] + '\');"&gt;&lt;/div&gt;'); }); } }); } ); HTML &lt;body&gt; &lt;asp:Panel ID="Panel1" runat="server" CssClass="centeredPanel"&gt; &lt;/asp:Panel&gt; &lt;/body&gt; CSS .centeredPanel { width:25%; height:50%; position:absolute; left:37.5%; top:25%; }​ imgArr is an array containing images which are retrieved from the folder. What am I missing?
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44426151
has text: OK, so far you have it reported in all browsers in one organization only, but only when the script is loaded from your web page, not when it is loaded directly. All issues point to something in your web page is causing a bad reaction with something in the organization's security or networking infrastructure (e.g. security software, proxies, caches, etc...). It's even possible the issue is in the organization's ISP (though less likely there).
comment on: http://stackoverflow.com/q/28018912
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44593731
type: Comment
has text: in jsfiddle: Uncaught ReferenceError: check is not defined
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28019085

http://stackoverflow.com/comment/44586544
has text: May this will help you? http://stackoverflow.com/questions/9473582/ios-javascript-bridge
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28105688

http://stackoverflow.com/comment/44476235
has text: So you know how to detect an enter keypress? Where's your code for that?
score: 0
comment on: http://stackoverflow.com/q/28046767
type: QuestionComment
type: Comment

http://stackoverflow.com/q/28023853
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/28024203
tagged with: angularjs
has title: Angular JS Directive Unloading Event or Equivalent
accepted answer: http://stackoverflow.com/a/28024203
has body: So, I have these widgets: &lt;widget ng-repeat="widget in widgets"&gt;&lt;/widget&gt; As you can tell, they are created and removed by the ng-repeat. So when someone does remove a widget, is there any where in the directive I can catch the event happening OR equivalent? .directive('widget', function widget() { var directive = { restrict: 'E', compile: compile }; return directive; function compile() { return { pre: preLink, post: postLink }; } function preLink(scope, element) { } function postLink(scope, element) { } });
type: AnsweredQuestion
upvote count: 5
type: Question
score: 5

http://stackoverflow.com/comment/44382571
comment on: http://stackoverflow.com/a/27996123
type: AnswerComment
has text: Well you can dynamically create these nodes. Ideally, you should be using a NoSQL DB for this kind of thing so it scales properly and adds query capabilities. Then attach a ORM to the data and now you have something scalable...
score: 0
type: Comment

http://stackoverflow.com/comment/44700846
type: QuestionComment
has text: http://stackoverflow.com/questions/5698641/script-not-working-on-document-ready-in-safari-chrome-ff-okay-but-works-on
comment on: http://stackoverflow.com/q/28059905
score: 0
type: Comment

http://stackoverflow.com/q/28116134
has comment: http://stackoverflow.com/comment/44606618
favorite count: 0
has answer: http://stackoverflow.com/a/28116264
possible better answer: http://stackoverflow.com/a/28116363
has comment: http://stackoverflow.com/comment/44606580
has comment: http://stackoverflow.com/comment/44606414
type: AnsweredQuestion
has body: In the below code (function x() { var j = function() { alert("234234"); } return { s: j } })() var x1 = new x(); x1.s(); How to invoke the method j()? Or before that i should be asking, is there a way to create an instance of the function x() because that is what is happening. Please see the fiddle http://jsfiddle.net/e5k6bdvn/
accepted answer: http://stackoverflow.com/a/28116264
downvote count: 1
type: Question
has title: Javascript - How to invoke a method inside self invoking function?
answer count: 2
upvote count: 0
tagged with: self-invoking-function
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/44606694
has comment: http://stackoverflow.com/comment/44606511
has answer: http://stackoverflow.com/a/28116363

http://stackoverflow.com/q/28086790
tagged with: algorithm
has answer: http://stackoverflow.com/a/28088744
tagged with: javascript
tagged with: calculus
score: 0
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28088744
has body: I'm developing the memory game in javascript (based on this tutorial: http://www.developphp.com/view.php?tid=1393 ), and now i need to calculate a fair score, based on these conditions: - The game consists of 4x4 cards (that means there are 16 cards) therefore, it takes at the very least 8 attempts (every 2 cards flipped counts as an attempt) - The game has a count down timer of 45 seconds So, in short, the best final score will have: - 8 attempts, ~10 seconds ellapsed time, 0 cards left to find. For every further attempt, elapsed time or/and cards left, the score will be decreased How can i accomplish something like this? Below, is the code i have written so far: nrTries =8; time = 35; tilesLeft = 0; function calcScore(){ var triesBonus = (nrTries * 700) / 8; var timeBonus = ((45 - time) == 0) ? 10 : (45 - time); //timeBonus = (timeBonus*500) / 10; console.log((triesBonus+'|'+timeBonus)); //score += score - ((tilesLeft / 2)*6); //return score; } //console.log(calcScore()); calcScore(); Thanks in advance!
type: Question
has title: Calculate "Memory Game's" score, based on the number of attempts, time spent and cards left

http://stackoverflow.com/q/28027318
answer count: 2
tagged with: connect-modrewrite
has answer: http://stackoverflow.com/a/28027706
has comment: http://stackoverflow.com/comment/44439841
has title: javascript Invalid regular expression with token '\'
tagged with: regex
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28027706
has body: i created the following regex for finding a url matching a word in the complete path and that does't contain the point character. (\path\?*)([^.]*)$ It works on https://www.regex101.com/#javascript, but on grunt in the connect task when i define this connect task: middleware: function(connect, options) { var middlewares = []; middlewares.push(modRewrite(["(\path\?*)([^.]*)$ /home.html [L]"])); options.base.forEach(function(base) { middlewares.push(connect.static(base)); }); return middlewares; } i got this error: Invalid regular expression: /(home?*)([^.]*)$/: Nothing to repeat and the IDE warn me in the two slash (\path\ ) between the 'path ' word. Why i can use those slashes? What can i use to replace those slashes? Thanks very much
has answer: http://stackoverflow.com/a/28027556
accepted answer: http://stackoverflow.com/a/28027556
type: Question
tagged with: grunt-contrib-connect
tagged with: javascript
score: 0

http://stackoverflow.com/q/28084731
has comment: http://stackoverflow.com/comment/44547505
has answer: http://stackoverflow.com/a/28106659
answer count: 3
has answer: http://stackoverflow.com/a/28084827
tagged with: javascript
has title: Serve Javascript with PHP: Return/Echo URL/URI
score: 0
has body: EDIT: Missed the echo statement! EDIT2: Added missing paranthesis! EDIT3: Found the solution. See below! What I am trying to achieve is this: Dynamically create a Javascript-file with PHP Serve Javascript-file as .js as embeddable Javascript on different URLs Dynamically add Page Name and Page URL information inside the JS to be used in Javascript Currently I do the following: code.php &lt;?php header("Content-type: application/x-javascript"); ?&gt; /* &lt;?php echo $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ;?&gt; */ /* &lt;?php $func = new Functions; echo $func-&gt;getPageURL(); echo $func-&gt;getPageName(); ?&gt; */ var fred; ... class.functions.php &lt;?php class Functions { function getPageURL() { $isHTTPS = (isset($_SERVER["HTTPS"]) &amp;&amp; $_SERVER["HTTPS"] == "on"); $port = (isset($_SERVER["SERVER_PORT"]) &amp;&amp; ((!$isHTTPS &amp;&amp; $_SERVER["SERVER_PORT"] != "80") || ($isHTTPS &amp;&amp; $_SERVER["SERVER_PORT"] != "443"))); $port = ($port) ? ':'.$_SERVER["SERVER_PORT"] : ''; $data = ($isHTTPS ? 'https://' : 'http://').$_SERVER["SERVER_NAME"].$port.$_SERVER["REQUEST_URI"]; return $data; } function getPageName() { $data = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1); return $data; } } Whenever someone triggers my script-embed code I route them to my code.php. Example: &lt;script src="//servingdomain/dynamic/123.js"&gt;&lt;/script&gt; Now, my code.php does a great job, but returns me this: /* servingdomain/dynamic/123.js */ /* https://servingdomain/dynamic/123.js index.php */ var fred; ... Unfortunately my getPageURL und getPageName are not executed properly, but I am failing to understand why. I am aiming to get this as output: /* servingdomain/dynamic/123.js */ /* https://otherdomain/blog/awesome-article (page-url) Awesome Article to read (page-name) */ var fred; ... How should I takle this problem and get this working correctly either by clean code or dirty workaround ... I am aware of window.location.pathname and w…
has comment: http://stackoverflow.com/comment/44554397
accepted answer: http://stackoverflow.com/a/28106659
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44548040
tagged with: php
type: Question
possible better answer: http://stackoverflow.com/a/28085360
has answer: http://stackoverflow.com/a/28085360

http://stackoverflow.com/q/28020478
has title: I found a unknown script in blogger theme
has answer: http://stackoverflow.com/a/28022303
has comment: http://stackoverflow.com/comment/44427268
tagged with: google-api
tagged with: blogger
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/53142295
accepted answer: http://stackoverflow.com/a/28022303
has comment: http://stackoverflow.com/comment/44428296
type: Question
has comment: http://stackoverflow.com/comment/44427575
upvote count: 0
has comment: http://stackoverflow.com/comment/44427427
has comment: http://stackoverflow.com/comment/44427215
has body: Can someone familiar with blogger tell me what is this script doing? &lt;script type="text/javascript"&gt; (function() { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = '//pagead2.googlesyndication.com/pagead/js/google_top_exp.js'; var head = document.getElementsByTagName('head')[0]; if (head) { head.appendChild(script); }})(); &lt;/script&gt; I tried to see what in this file //pagead2.googlesyndication.com/pagead/js/google_top_exp.js is, but the code is minified and hard to read.
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44427342
has answer: http://stackoverflow.com/a/46778132
possible better answer: http://stackoverflow.com/a/28020669
has answer: http://stackoverflow.com/a/28020669
answer count: 4
score: -1

http://stackoverflow.com/comment/44575851
type: Comment
type: QuestionComment
has text: Single sentence questions will usually be closed. You need to put more effort into your question.
comment on: http://stackoverflow.com/q/28099963
score: 0

http://stackoverflow.com/q/28021065
tagged with: jquery
has body: I have a knockout model with observable arrays bound to a table. I want to have a button that when clicked, doubles the focused textbox value. I want to do this without having a create a 'hasFocus' observable for every textbox or every ko observable. Couple of issues I experienced :- if the button just edits the value of the textbox directly using jQuery, the ko value does not get updated. I need a way to tell the button to change the underlying value if I focus on a textbox then click a button, the focus on the textbox is lost so client side also doesn't remember what textbox is focused
has title: Knockout - doubling value in a focused textbox
has comment: http://stackoverflow.com/comment/44428508
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28021639
accepted answer: http://stackoverflow.com/a/28021639
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/44428541
has comment: http://stackoverflow.com/comment/44430546
has comment: http://stackoverflow.com/comment/44428576
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44430752
answer count: 1

http://stackoverflow.com/q/27969030
has answer: http://stackoverflow.com/a/27969214
has body: So far I'm using different buttons for different transitions (each one with individual function) on one DOM element : onButtonClickUp = function(){ document.querySelector('.cube-rot').style.transform="rotateY(90deg)" }; onButtonClickDown = function(){ document.querySelector('.cube-rot').style.transform="rotateY(-90deg)" }; onButtonClickRight = function(){ document.querySelector('.cube-rot').style.transform="rotateX(90deg)" }; onButtonClickLeft = function(){ document.querySelector('.cube-rot').style.transform="rotateX(-90deg)" }; document.querySelector('.show-up').addEventListener( 'click', onButtonClickUp, false); document.querySelector('.show-down').addEventListener( 'click', onButtonClickDown, false); document.querySelector('.show-left').addEventListener( 'click', onButtonClickLeft, false); document.querySelector('.show-right').addEventListener( 'click', onButtonClickRight, false); I'm firing everything off on DomContentLoaded and it's working, but I'd like to combine the functions into one with different cases; this is what I've tried function onButtonClick(rot){ //rot = rUp || rDown|| rLeft ||rRight ; if(rot == 'rUp'){rot = "rotateY(90deg)";} else if (rot == 'rDown'){ rot = "rotateY(90deg)"} else if (rot == 'rLeft'){ rot = "rotateX(90deg)"} else if(rot == 'rRight' ){ rot = "rotateX(-90deg)"}; cubeRot.style.transform=rot }; document.querySelector('.show-up').addEventListener( 'click', onButtonClick('rUp'), false); document.querySelector('.show-down').addEventListener( 'click', onButtonClick('rDown'), false); document.querySelector('.show-right').addEventListener( 'click', onButtonClick('rRight'), false); document.querySelector('.show-left').addEventListener( 'click', onButtonClick('rLeft'), false); it doesn't work, adding different EventListners resolves in the last overriding previous.. what's the most convenient way to do this?
answer count: 3
has comment: http://stackoverflow.com/comment/44330928
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27969110
tagged with: listener
type: Question
has comment: http://stackoverflow.com/comment/44331011
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27970670
tagged with: css
has comment: http://stackoverflow.com/comment/44331049
has comment: http://stackoverflow.com/comment/44330834
score: 0
has title: Using css selectors as inputs for javascript
has answer: http://stackoverflow.com/a/27969110
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27969214

http://stackoverflow.com/q/28027119
score: 1
tagged with: angularjs-scope
type: Question
has title: Load html View after Angular controller has finished loading async functions
answer count: 1
tagged with: javascript
has body: I am displaying a button that has conditional enable or disable,in controlling function two values are checked, one value is updated after a service call.so the resultant view is showing as disabled as the function is called before and the async call updates the values later. So I want my view to call that disabling controller function later after my async call is finished. Create New Strategy $scope.shouldDisableNewStrategyLink= function(){ return !$scope.currentVenue.isEdit || !mapsAvailable; } Here the variable mapsAvailable updates later on finishes of async http call.
downvote count: 0
tagged with: asynchronous
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/28028162

http://stackoverflow.com/q/27976461
has body: By default, mouse related events are not triggered in javascript if the mouse is not actually moved, even if it is now inside/outside a target element (e.g., div or svg:rect) because of the movement of the element itself. How to efficently handle this kind of state change? EDIT There is a closely related question. However, that question seems not settled satisfactorily. Most answers propose to check whether the element is under the mouse when it moves, which really means before it moves. In my case, the target elements are complex svg:path, and there could be hundreds of them, thus making such prediction is not trivial. Is there any way to tap on the browser's built-in mechanism (with which mouse events are triggered when the mouse is moving) to detect such events?
upvote count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4403518
has title: How to trigger mouseover/mouseout events when element rather than mouse is moving?
has comment: http://stackoverflow.com/comment/44345417
has comment: http://stackoverflow.com/comment/44349297
tagged with: css
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/44348967
type: Question
score: 1
has comment: http://stackoverflow.com/comment/44345920
tagged with: javascript
tagged with: mouseevent

http://stackoverflow.com/tag/csv
type: Tag
tags question: http://stackoverflow.com/q/27987555
tag name: csv
tags question: http://stackoverflow.com/q/28077190
tags question: http://stackoverflow.com/q/27981734

http://stackoverflow.com/q/28024563
score: 1
has answer: http://stackoverflow.com/a/28026066
accepted answer: http://stackoverflow.com/a/28026066
tagged with: postmessage
upvote count: 1
tagged with: google-chrome
has body: I want to have secure communication between a web page to a Chrome extension. After quite some checking and hacking this seems to at least be non-trivial, if not outright impossible. I want to message an extension's background page (while it is running) from (some JavaScript) in a webpage (note that the webpage initiates communication, which is pretty untypical!). I send the extension some credentials (hence the need for a secured channel!) and then if these credentials are valid (as determined by logic IN the background page) then the background page should return some (JSON) values, which the web page can then display. I already have some code in place that checks whether the current browser is Chrome and whether the user has installed said extension (and some UI for him/her to install it if it is not, etc...) I also got some communication running using window.postMessage. It posts a message to itself from the webpage script to the extensions content script, and that is then propagated to the background page from there. However that is NOT secure as this MDN page quotes: .. it is recommended that postMessage not be used to communicate with chrome: pages for now; use a different method (such as a query string when the window is opened) to communicate with Chrome windows. (this comment is in the section Using window.postMessage in extensions near the bottom of the page) This seems like sound advise, as there seems no way to exclude the possibility that data send using postMessage can be intercepted by another window/tab in the browser, instead of getting to the extension. So this vulnerability could be exploited. Using a query string as the MDN article suggests is not possible in my situation since the background page is loaded at the start (no URL params present yet). Is my reasoning sound/clear? Is there any Chrome extension expert who has a suggestion? Note: A suggestion is to use externally_connectable docs but as specified in the docs the matchessection for spe…
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/25838804
downvote count: 0
answer count: 1
favorite count: 0
tagged with: security
tagged with: google-chrome-extension
has title: How to do secure communication from a(ny) web page to a Chrome extension
type: AnsweredQuestion

http://stackoverflow.com/a/28045823
upvote count: 0
has body: I use this function to get cursor position: (function($) { $.fn.getCursorPosition = function() { var input = this.get(0); if (!input) return; // No (input) element found if ('selectionStart' in input) { // Standard-compliant browsers return input.selectionStart; } else if (document.selection) { // IE input.focus(); var sel = document.selection.createRange(); var selLen = document.selection.createRange().text.length; sel.moveStart('character', -input.value.length); return sel.text.length - selLen; } } })(jQuery); The following code returns cursor position: comp.getCursorPosition(); works fine with IE11
score: -1
answers question: http://stackoverflow.com/q/28041262
downvote count: 1
type: Answer

http://stackoverflow.com/comment/44579601
score: 0
comment on: http://stackoverflow.com/q/28102126
type: Comment
has text: ... well `$.loadScript()` isn't really a drop-in replacement for this (fictional) approach, is it? The script has to be loaded and then something has to be explicitly invoked.
type: QuestionComment

http://stackoverflow.com/comment/44703263
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28019006
score: 0
has text: Thanks again, Bryan, but that also didn't work. Here's a Youtube video that shows you my exact problem. Note the menu bar popping up and down and not saying flush with the URL bar of the application. http://youtu.be/OguwjZR_GdU

http://stackoverflow.com/comment/44332270
type: QuestionComment
comment on: http://stackoverflow.com/q/27969709
score: 0
has text: If you want to use it as an array, simply use `name='request-quantity[]'` and then use jQuery's selector to select input fields what that particular name: `$('input[name="request-quantity[]"]')`
type: Comment

http://stackoverflow.com/q/27968076
has comment: http://stackoverflow.com/comment/44330082
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44329887
type: Question
has comment: http://stackoverflow.com/comment/44329591
has comment: http://stackoverflow.com/comment/44329002
upvote count: 3
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/44329643
has body: So I'm making a histogram in JavaScript, and when I initialise it I have a property "contents" of each bin which is initialised to be 0: for (var rBin = 0; rBin &lt; 255; rBin += 16) { for (var gBin = 0; gBin &lt; 255; gBin += 16) { for (var bBin = 0; bBin &lt; 255; bBin += 16) { histogram[j] = {r:rBin, g:gBin, b:bBin, contents:0, width:16}; j += 1; } } } But after this, if I log the histogram I get a problem that JavaScript logs contents and only that as NaN rather than 0: 0: Object b: 0 contents: NaN g: 0 r: 0 width: 16 ... It gets weirder. If I log only histogram[0] then it works correctly and gives me: Object {r: 0, g: 0, b: 0, contents: 0, width: 16} What am I doing wrong? EDIT: The logging is done with the lines: console.log(histogram); console.log(histogram[0]); EDIT2: Pausing this in debugger shows the histogram being stored correctly on the line console.log(histogram[0]) but not on console.log(histogram)...
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44328923
has answer: http://stackoverflow.com/a/27982360
has comment: http://stackoverflow.com/comment/44329735
tagged with: nan
has comment: http://stackoverflow.com/comment/44329026
score: 2
has comment: http://stackoverflow.com/comment/44329097
has comment: http://stackoverflow.com/comment/44355255
has comment: http://stackoverflow.com/comment/44329961
has title: JavaScript insists that 0 is NaN

http://stackoverflow.com/comment/44626366
has text: Don't mix callbacks, promises and event emitters, only one is truly necessary because most of the time event emitter events map to different resolution or rejection values
score: 1
comment on: http://stackoverflow.com/q/28117851
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28020496
tagged with: css
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28020543
has answer: http://stackoverflow.com/a/28021108
has title: How do I scroll in a - within a fixed
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28021389
tagged with: jquery
linked to: http://stackoverflow.com/q/3837037
has answer: http://stackoverflow.com/a/28021280
linked to: http://stackoverflow.com/q/16094785
has body: I have a div which has to scroll. The problem is that it's within a fixed div. I tried to fix this in different ways, I went through these posts: Div with scrollbar inside div with position:fixed Have a fixed position div that needs to scroll if content overflows but none of them worked for me. I'd like to test it with you guys and find out what's the problem. I am working on a mobile responsive website. It has a nav menu button that opens .list div up - when clicking the menu button. I inserted the div of the .list right after the nav bar. When the menu opens it doesn't show all list items in my tag. I have to give my main div .list different height sizes and I find it not so efficient. I will paste my relevant code part of the nav bar, and the relevant CSS parts. HTML: ALL CATEGORIES CSS: .sports{ /*display: none;*/ padding: 0 ; background-color: #fff; margin: 0; width:100%; /*height: 210%*/ -webkit-overflow-scrolling: touch; } .list{ width: 99.9%; /* overflow: hidden; */ /* overflow-y: scroll; */ /* top: 65%; */ overflow-x: hidden; /*overflow-y: scroll;*/ height: 75%; display: none; -webkit-overflow-scrolling: touch; } when clicking #mob-menu-btn it opens .list and makes my whole tag fixed: $('#mob-menu-btn').click(function(){ var isHidden = $('.sports').is(':visible'); if (isHidden){ $( "body" ).removeClass( "makeFixed" ); } else { $( "body" ).addClass( "makeFixed" ); } $('.list').slideToggle("fast"); }) my .makeFixed looks like this: .makeFixed{ position: fixed; } I tested this last, and it didn't solve my problem: .makeFixed{ position: fixed; top: 0; bottom:0; overflow-y:scroll; overflow-x:hidden; } and changed height: auto; and overflow-y: scroll; within .sports and .list. What might be the problem?
score: 0
has answer: http://stackoverflow.com/a/28021405
has answer: http://stackoverflow.com/a/28021389
answer count: 5
has answer: http://stackoverflow.com/a/28020543
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44406014
type: QuestionComment
comment on: http://stackoverflow.com/q/28008852
has text: @Iftah - **http://jsfiddle.net/28kxxmvt/**, works just fine ?
score: 0
type: Comment

http://stackoverflow.com/q/28031717
has body: I just gratefully managed to load the content of an XML-file into my php-document, like so: $(document).ready(function () { $.ajax({ type: "GET", url: "abstimmer.xml", dataType: "xml", success: function (xml) { var $lis = $(".abstimmer li"); $(xml).find('klick').each(function (index) { if (index < $lis.length) { $lis.eq(index).html($(this).text()); } }); } }) }) By that, the content of these nodes get pushed into the li-elements of the parental ul-element identifiable with class "abstimmer". I now want to also push data from the php-file back into the xml-file. I'd like to do this by counting the clicks on a li-element, what I do in that manner: $(".abstimmer li").click(function(){ this.clicked=this.clicked?this.clicked+1:1; $(this).html(this.clicked) var klick_neu = $(this).html(this.clicked); // Where would I need to go from here? }); I know, that I now need to send var klick_neu to a php-file that somehow parses the var klick_neu and pushes it into that xml-file. But I have no clue how to do that. Could somebody help me with that? And I am not sure, if that's alright with stackoverflows' rules, but I am just curious on an additional thing within the same problem: If I just added an onClick-Event within the ready-function, I could "seamlessly" load the updated content of the xml-file into my list - right? Thanks a lot. My XML-file will more or less, look like that: <?xml version="1.0" encoding="UTF-8"?> <abstimmer> 3 5 9 12 1 0
type: Question
has title: Update my content into XML-file
has comment: http://stackoverflow.com/comment/44448321
tagged with: javascript
upvote count: 2
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/28032000
accepted answer: http://stackoverflow.com/a/28032000
favorite count: 0
tagged with: php
has comment: http://stackoverflow.com/comment/44448123
has comment: http://stackoverflow.com/comment/44448073
tagged with: http://stackoverflow.com/tag/xml
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/28093767
answers question: http://stackoverflow.com/q/28091942
type: Answer
has body: To deal with this in our current project we declared a directive which watches the model and bounds this value to a variable in a data service. Moreover on render, this directive checks if the appropriate value is already set in the data service. If so, the model is being set to this value. As requested in comments, my StorageService: 'use strict'; /** * storage wrapper for session- or local-storage operations */ app.factory('StorageService', function( $rootScope, $http, $location) { /** * get an item * * @param item - string - the item identifier * @return - mixed - */ var get = function(item) { return JSON.parse(sessionStorage.getItem(item) ||localStorage.getItem(item)); }; /** * set an item * * @param item - string - the item identifier * @param value - mixed - the value to set * @param usePersistentStorage - boolean - the flag for session- or local-storage * @return void */ var set = function(item, value, usePersistentStorage) { var obj = { value: value, ts: new Date().getTime() }; window[usePersistentStorage ? 'localStorage' : 'sessionStorage'][value === null ? 'removeItem' : 'setItem'](item, JSON.stringify(obj)); }; /** * remove an item * * @param item - string - the item identifier * @return void */ var remove = function(item) { set(item, null, true); set(item, null); }; /** * clear the whole session- and local-storage * * @return void */ var clear = function() { sessionStorage.clear(); localStorage.clear(); }; /** * check if item has expired * * @return boolean */ var checkExpiration = function(str, minutes) { var now = new Date(), nowts = now.getTime(), item = get(str); if(item &amp;&amp; typeof item.ts != 'undefined' &amp;&amp; (new Date(nowts) - new Date(item.ts) &lt; minutes * 60 * 1000)) { return true; } else { remove(str); return false; } }; return { get: get, set: set, remove: remove, clear: clear, checkExpiration: checkExpiration }; } );
has comment: http://stackoverflow.com/comment/44588085
has comment: http://stackoverflow.com/comment/44586909
has comment: http://stackoverflow.com/comment/44588704
score: 0
has comment: http://stackoverflow.com/comment/44588416
has comment: http://stackoverflow.com/comment/44586374

http://stackoverflow.com/comment/44470939
comment on: http://stackoverflow.com/a/28043723
type: Comment
has text: try to add in top of your controller 'mainContent' this: ` $rootScope.header.msg = false; `
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44540852
comment on: http://stackoverflow.com/q/28081024
type: Comment
has text: I am not sure what exactly you are looking for. If C is plain JS then instantiate C using Angularjs and pass the data from A to a Service that The wrapper or C can pick and pass to C. I think it would make more sense to wrap your plain JS in an angular controller/service.
score: 0
type: QuestionComment

http://stackoverflow.com/q/28033437
type: Question
has comment: http://stackoverflow.com/comment/44451864
has body: I've a LS project with one Custom Control where I render a chart with chartjs. The first time I load the page everything is ok, but if I move to another page and then come back the custom control is not rendered anymore (the code is called but nothing appear). I have to press F5 everytime I want to see it! How can I fix this? UPDATE: I've notice that if I set a global variable, when I come back to the screen the variable is not reinizialized .Also another page containing the jquery-week calendar has the same issue. When I navigate away from a screen and later come back I load another instance of the "screen" or only get the old one, with all the stuff already loaded? here the code /// &lt;reference path="~/GeneratedArtifacts/viewModel.js" /&gt; function updateGraphs(chart, query, inizio, fine) { var last = 0; for (var i = inizio; i &lt;= fine; i.addDays(1)) { query(i).execute().then(function (res) { try { if (chart.datasets[0].points.length &gt; 25) chart.removeData(); var date = new Date(inizio.valueOf()).addDays(last++); var str = format_2digit(date.getDate()) + "/" + format_2digit(date.getMonth() + 1) + "/" + date.getFullYear(); chart.addData([res.results.length], last % 5 == 0 ? str : ""); } catch (e) { alert(e); } }); } } myapp.Home.created = function (screen) { var now = new Date(); var month = now.getMonth(); var year = now.getFullYear(); screen.GraficoInizio = new Date(year, month, 1); screen.GraficoFine = new Date(year, month + 1, 0); }; myapp.Home.GraficoFine_postRender = function (element, contentItem) { contentItem.dataBind("screen.GraficoInizio", function (value) { var month = contentItem.screen.GraficoInizio.getMonth(); var year = contentItem.screen.GraficoInizio.getFullYear(); contentItem.value = new Date(year, month + 1, 0); }); }; myapp.Home.GraficoClienti_render = function (element, contentItem) { // creo il grafico $(element).append("&lt;canvas id='chartClienti' width='500px' height='300px' /&gt;"); var ctx = $('#chartClienti').get(0).getContext("…
accepted answer: http://stackoverflow.com/a/31118214
tagged with: javascript
tagged with: jquery
tagged with: lightswitch-2013
score: 0
has title: Lightswitch HTML custom control show only once
answer count: 2
has answer: http://stackoverflow.com/a/31118214
has comment: http://stackoverflow.com/comment/44453335
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/31117671
tagged with: visual-studio-lightswitch
possible better answer: http://stackoverflow.com/a/31117671

http://stackoverflow.com/q/28000359
downvote count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28000426
accepted answer: http://stackoverflow.com/a/28000426
has comment: http://stackoverflow.com/comment/44389928
favorite count: 0
possible better answer: http://stackoverflow.com/a/28000541
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
has answer: http://stackoverflow.com/a/35618113
answer count: 4
type: AnsweredQuestion
has body: How to count checked checkbox using onclick event ref by id? http://jsfiddle.net/9na5Q/11/ Html is &lt;div id="yyy"&gt; &lt;input type="checkbox" id="check_id" onclick="xxx()" checked&gt; &lt;input type="checkbox" id="check_id" onclick="xxx()"&gt; &lt;input type="checkbox" id="check_id" onclick="xxx()"&gt; &lt;input type="checkbox" id="check_id" onclick="xxx()" checked&gt; &lt;input type="checkbox" id="check_id" onclick="xxx()"&gt; &lt;div&gt; and javascript is function xxx() { var zzz = document.getElementById("check_id").length; alert(zzz); }
tagged with: onclick
has title: How to count checked checkbox using onclick event ref by id?
linked to: http://stackoverflow.com/q/872296
has comment: http://stackoverflow.com/comment/44390012
has answer: http://stackoverflow.com/a/28000541
type: Question
has answer: http://stackoverflow.com/a/28000380
score: -1
linked to: http://stackoverflow.com/q/11838667

http://stackoverflow.com/comment/44552860
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28088058
score: 2
has text: It's because, your variable wouldn't get conflict with global variable if used third party services, etc...

http://stackoverflow.com/comment/51870542
type: QuestionComment
comment on: http://stackoverflow.com/q/28080242
type: Comment
has text: This is a 'feature' with a couple of work-arounds. See the long discussion about it here: http://forum.ionicframework.com/t/when-using-horizontal-scroll-ion-scroll-page-cant-be-scrolled-down-in-y-direction/3833/22 ... but yes the solution is to add more javascript which catches the vertical scroll event.
score: 0

http://stackoverflow.com/q/27989732
tagged with: cordova-plugins
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29303895
has body: ReferenceError: ProgressIndicator is not defined. Shows this error in ngCordova $ionicPlatform.ready(function() { $cordovaProgress.showSuccess(true, "Success!"); $timeout(function() { $cordovaProgress.hide(); }, 2000); }); code sample is written like this. where it calls $cordovaProgress. can anyone help with solution ?
has comment: http://stackoverflow.com/comment/69992945
has title: ProgressIndicator is not defined ngCordova.js
tagged with: ionic-framework
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44377701
score: 0
answer count: 1

http://stackoverflow.com/comment/44577793
has text: Does the first click that doesn't work result in any errors in your browser's dev console? (And when you say it doesn't trigger the function, are you certain that the function is not called at all, as compared to it being called but not correctly showing/hiding the checkboxes?)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28100979

http://stackoverflow.com/comment/44474726
score: 2
has text: P.S. The fact that you tagged the question with [tag:java] shows that it's too early for you to ask an answerable question here.
comment on: http://stackoverflow.com/q/28046084
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/73634631
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28099537
has text: @user3308774 did you find a solution for this? Please could you provide any feedback? Thank you

http://stackoverflow.com/a/28037902
has body: I simplified a bit the problem and that works for me: function getIssues(urls, array, callback) { var promises = []; for (var key = 0; key &lt; urls.length; key++) { var result = $.ajax({ url: urls[key], type: "GET", async: true, success: function(xhr, textStatus) { array.splice(-1) } }) promises.push(result); } $.when.apply(null, promises).done(function() { console.log("Calling in the when promise"); callback(array); }); } getIssues(["/firstUrl", "/secondUrl"], [1,2,3], function(array) { console.log('done', array); // array is [1] here ('spliced' twice) }); so running this (remember about changing /firstUrl and /secondUrl), you can isolate your problem.
score: 0
answers question: http://stackoverflow.com/q/28037742
type: Answer

http://stackoverflow.com/a/28104593
has comment: http://stackoverflow.com/comment/44584059
type: Answer
has comment: http://stackoverflow.com/comment/44583961
downvote count: 0
has body: You could draw the line only if the first node's id is less than the second node's id.
score: 3
accepted answer of: http://stackoverflow.com/q/28104553
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44583924
answers question: http://stackoverflow.com/q/28104553
upvote count: 3

http://stackoverflow.com/comment/44523628
comment on: http://stackoverflow.com/q/28072082
type: Comment
type: QuestionComment
score: 3
has text: Try making the comparison not case sensitive.

http://stackoverflow.com/comment/44460777
has text: You'll need to have code on the other page that changes that.
score: 1
comment on: http://stackoverflow.com/q/28038329
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28172783
answers question: http://stackoverflow.com/q/28086419
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: $('.datepicker-days').on('click', 'td.day', function (e) { e.preventDefault(); $('#datepicker_addcase').datepicker('hide'); return false; });
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/28086419

http://stackoverflow.com/comment/44546062
has text: Check your ajax url is correct or not
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/28084073

http://stackoverflow.com/q/28113019
has body: I want get a image from my local harddrive. My function returns undefined. function getImageFromLocal() { var imageurl = 0; return new WinJS.Promise(function () { picturesLib.getItemAsync("APP Folder X").then(function (appfolder) { appfolder.getItemAsync("Subfolder X").then(function (file) { file.getItemAsync("Image.jpg").done(function (image) { imageurl = URL.createObjectURL(image); }); }); }); }); return imageurl; }
score: 0
type: Question
tagged with: function
tagged with: winjs
tagged with: javascript
has answer: http://stackoverflow.com/a/28115333
tagged with: jquery
tagged with: windows
answer count: 1
has title: winJS return var from function undefined
accepted answer: http://stackoverflow.com/a/28115333
type: AnsweredQuestion

http://stackoverflow.com/comment/44606323
type: Comment
type: AnswerComment
has text: Cheers for your help, fixed, was a stupid mistake, placed js in header which caused it not to work, fixed now:)
score: 0
comment on: http://stackoverflow.com/a/28115980

http://stackoverflow.com/comment/44396224
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28003098
type: AnswerComment
has text: Thanks man. Marking as answer. But, could you please elaborate on "how" it works? Please see the updated fiddle: http://jsfiddle.net/hphvpxuo/4/. In this, you have the new "#theParentList li li" block that appears to work for all of them.. How can this work for all the indentations?! Also, now, the mouse hovering doesn't work properly. The parents don't hover correctly, and when the grand/great grand children are hovered, the whole block is highlighted. Can that be prevented?

http://stackoverflow.com/comment/44328218
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27966700
has text: how would i then use the counter once it reaches 5 to do something i have tried this if (counter === 5) { alert("form"); } but it doesnt work

http://stackoverflow.com/a/28028197
answers question: http://stackoverflow.com/q/28024385
type: Answer
has comment: http://stackoverflow.com/comment/44444101
has comment: http://stackoverflow.com/comment/44454048
score: 0
has comment: http://stackoverflow.com/comment/44479157
has body: Because 'class' is a reserved keyword in javascript, you should change it to class_name : data: {class_name: $(this).val()},
has comment: http://stackoverflow.com/comment/44453545
has comment: http://stackoverflow.com/comment/44452537
has comment: http://stackoverflow.com/comment/44478279

google-maps-api-3
tags question: http://stackoverflow.com/q/28005306
tags question: http://stackoverflow.com/q/27964630
tags question: http://stackoverflow.com/q/27992890
tags question: http://stackoverflow.com/q/28052115
tags question: http://stackoverflow.com/q/28077239
tags question: http://stackoverflow.com/q/28049877
tags question: http://stackoverflow.com/q/28031595
tags question: http://stackoverflow.com/q/27966155
tags question: http://stackoverflow.com/q/28046056
tags question: http://stackoverflow.com/q/27971366
tags question: http://stackoverflow.com/q/27999007
tags question: http://stackoverflow.com/q/28069242
tags question: http://stackoverflow.com/q/27983327
tags question: http://stackoverflow.com/q/28046440
tags question: http://stackoverflow.com/q/28049383
tags question: http://stackoverflow.com/q/28010267
tags question: http://stackoverflow.com/q/27985822
tags question: http://stackoverflow.com/q/28061584
tags question: http://stackoverflow.com/q/28087364
tags question: http://stackoverflow.com/q/28035392
tags question: http://stackoverflow.com/q/28032778
tags question: http://stackoverflow.com/q/28114393
tags question: http://stackoverflow.com/q/28099655
tags question: http://stackoverflow.com/q/28037501
tags question: http://stackoverflow.com/q/28103266
tags question: http://stackoverflow.com/q/27984594
tags question: http://stackoverflow.com/q/28001036
tags question: http://stackoverflow.com/q/27991543
tags question: http://stackoverflow.com/q/28073632
tags question: http://stackoverflow.com/q/28098113
tags question: http://stackoverflow.com/q/28058833
tags question: http://stackoverflow.com/q/27987172
tags question: http://stackoverflow.com/q/27977600
tags question: http://stackoverflow.com/q/28009169
tags question: http://stackoverflow.com/q/28076519
tags question: http://stackoverflow.com/q/28047460
tags question: http://stackoverflow.com/q/28103395
tags question: http://stackoverflow.com/q/28112570
tags question: http://stackoverflow.com/q/28069881
tags question: http://stackoverflow.com/q/28081912
tags question: http://stackoverflow.com/q/28060726
tags question: http://stackoverflow.com/q/27982664
tag name: google-maps-api-3
tags question: http://stackoverflow.com/q/28028386
tags question: http://stackoverflow.com/q/28095737
type: Tag
tags question: http://stackoverflow.com/q/27987967
tags question: http://stackoverflow.com/q/28115013
tags question: http://stackoverflow.com/q/28114925
tags question: http://stackoverflow.com/q/28114626
tags question: http://stackoverflow.com/q/28005210
tags question: http://stackoverflow.com/q/28079902
tags question: http://stackoverflow.com/q/28022960
tags question: http://stackoverflow.com/q/28023254
tags question: http://stackoverflow.com/q/27987861
tags question: http://stackoverflow.com/q/28117304
tags question: http://stackoverflow.com/q/27975430
tags question: http://stackoverflow.com/q/28088686
tags question: http://stackoverflow.com/q/28087744
tags question: http://stackoverflow.com/q/27968746
tags question: http://stackoverflow.com/q/28014143
tags question: http://stackoverflow.com/q/28017762
tags question: http://stackoverflow.com/q/28021955

http://stackoverflow.com/comment/44325886
type: QuestionComment
score: 1
has text: I don't see your HTML having the class ".up_side". What element are you trying to target? Besides, $("#dell_msg").click cannot attach an event handler to an element that doesn't exist yet. You may delegate the handling of this event like so: $('body').on({click: function(){ $(".up_side").removeClass(".list_img"); }}, '#dell_msg');
comment on: http://stackoverflow.com/q/27966402
type: Comment

http://stackoverflow.com/a/28060679
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/28060052
has body: Hello in google map iframe we can not set directly as display:none see your demo jsfiddle link See this link
downvote count: 0
type: Answer

http://stackoverflow.com/q/28069268
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/28069387
tagged with: collision
tagged with: collision-detection
has comment: http://stackoverflow.com/comment/44518044
has answer: http://stackoverflow.com/a/28073322
type: Question
answer count: 2
upvote count: 0
score: -2
tagged with: javascript
has title: Two sprites collide - which one rear ended the other?
has comment: http://stackoverflow.com/comment/44518070
has comment: http://stackoverflow.com/comment/44518038
has body: I am writing a simple game (in Javascript) where circular sprites can collide with each other. I store an angle (in degrees) and an x,y for each object. I have the collision detection working, but I need to work out which sprite hit the other. So for two objects colliding which one drove into the other (i.e. the front of which sprite made contact with the 'non front' of the other). Or to put it another way, which one rear ended the other. In the case of very close head on accidents e.g. where they make an absolute direct head on collision (180 degree collision) or are within say 5 degrees of doing so (175-185 degree collision), then I need to spot this and attribute no 'blame' to either sprite. What would the maths, or better still the code, for this be? var angleA = Math.abs(collidedWith.angle - 180); var angleB = Math.abs(this.angle - 180); var angleConsideredHeadOn = 5; var anglesSubtracted = Math.abs(angleA - angleB); if (anglesSubtracted &lt; angleConsideredHeadOn) { var headOn = true; } if (anglesSubtracted &gt;= angleConsideredHeadOn) { // There was a non-head on crash var xA = collidedWith.velocityX; var yA = collidedWith.velocityY; var xB = this.velocityX; var yB = this.velocityY; // Need to determine which sprites 'front' collided with the other's side or read }
has comment: http://stackoverflow.com/comment/44518234
favorite count: 0

http://stackoverflow.com/a/28097273
answers question: http://stackoverflow.com/q/28087744
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44584175
has comment: http://stackoverflow.com/comment/44587567
downvote count: 0
has comment: http://stackoverflow.com/comment/108042288
has comment: http://stackoverflow.com/comment/108041746
has body: These elements have a common property, they are placed via CSS at: bottom: 0px; You may use this to create a selector: #mapContainer div[style*="bottom: 0px"] to apply the padding you may use a transparent border at the bottom: #mapContainer div[style*="bottom: 0px"]{ border-bottom:50px solid rgba(0,0,0,0); } Demo: http://jsfiddle.net/doktormolle/m2rumozm/ But I'm not sure if it's a good approach(the API may change), you better try your final attempt(use the form as map-control). The issues #1 + #3 probably may be fixed when you add the original #mainFormContainer instead of a clone(at least an autocomplete works without problems as a control, I've added an autocomplete to the fiddle to demonstrate it). Issue #2 should be solvable via CSS.
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/108041942
accepted answer of: http://stackoverflow.com/q/28087744

http://stackoverflow.com/comment/44501519
type: AnswerComment
score: 0
type: Comment
has text: can you try re paste my code ? once i have 2 question it work wont anymore.
comment on: http://stackoverflow.com/a/28059586

openlayers-3
type: Tag
tags question: http://stackoverflow.com/q/28077115
tags question: http://stackoverflow.com/q/28039895
tag name: openlayers-3
tags question: http://stackoverflow.com/q/28093975
tags question: http://stackoverflow.com/q/27985023
tags question: http://stackoverflow.com/q/28077183
tags question: http://stackoverflow.com/q/28114222

http://stackoverflow.com/comment/44475948
type: Comment
type: AnswerComment
has text: consider your app is a DOC-Viewer. If you open a DOC from web browser, its mime type will check for Intents. In that case your mimeType matches, it will show open with option with your app present. This is my understanding and it is workign for me. Mine is PDF-Viewer App.
comment on: http://stackoverflow.com/a/28042526
score: 0

http://stackoverflow.com/q/28057692
tagged with: javascript
has body: Demo Using jQuery progressbar.js plugin I am not able to stop the progress bar at any certain point. Unfortunately the plugin api didn't explain how to do this but I tried to do it on my own by declaring a target variable which is storing progress value. target = bar.value(); Then I tried to stop the progress by applying an if condition like this if ((target * 100).toFixed(0) == 60) { circle.stop(); } but this is not stopping the progress bar on 60! I tried to use this based on the circle.stop(); function (If you click on stop button it stops the progess and alerts the value of bar (target) but the if stattement not working! var target; var circle = new ProgressBar.Circle('#container', { color: '#FCB03C', strokeWidth: 3, trailWidth: 1, duration: 1500, bar: 60, text: { value: '0' }, step: function (state, bar) { bar.setText((bar.value() * 100).toFixed(0)); target = bar.value(); } }); circle.animate(1, function () { circle.animate(); }) if ((target * 100).toFixed(0) == 60) { circle.stop(); } $('#stop').on('click', function () { circle.stop(); alert((target * 100).toFixed(0)); }); Can you please let me know what I am doing wrong and how I can solve this? Thanks
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/28057708
has title: Not Able to Stop Progress Bar on Certain Point
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28057708
type: Question

http://stackoverflow.com/comment/44544904
has text: `2.The table will have a fix number of row (10 rows) 3.If the result is below 10 the row will still be 10 if row is more than 10 it will show the next 10 with next and previous button`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28083291
type: Comment

http://stackoverflow.com/comment/44578309
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28093635
type: QuestionComment
has text: I am assuming the lag is because the software takes time give rect co-ords, am I right? how much time does the software take?

http://stackoverflow.com/comment/44762519
type: AnswerComment
comment on: http://stackoverflow.com/a/28146612
has text: This question makes no sence. ;) Outside? Its dark outside.
type: Comment
score: 0

http://stackoverflow.com/q/28115530
has comment: http://stackoverflow.com/comment/82549893
type: Question
tagged with: page.js
has body: We are building an application using multiple single-page apps to keep things small, but run into a problem of building links between pages. Let's say we have to pages equipment.html and maintenance.html Both are independent SPA apps each with their own client side roting tables Right now we have client side routing with page.js using #! On the equipment page we place a link Show Maintenance Hovering over the link shows http://localhost/maintenance.html#!/show/350 but when we click on the links it goes to http://localhost/equipment.html#!/maintenance.html#!/show/350 which does not take us anywhere. Now, clicking second time on the link takes us to the right page. Any way to solve this? Thanks
has comment: http://stackoverflow.com/comment/46236734
tagged with: javascript
has comment: http://stackoverflow.com/comment/44632579
has comment: http://stackoverflow.com/comment/46155426
score: 0
type: UnansweredQuestion
tagged with: url-routing
has title: client-side routing with page.js between two different spa pages
answer count: 0

http://stackoverflow.com/a/45651882
has body: I needed such a behavior too. My first attempts were to use bootstrapTable('resetSearch', 'my-query') with a fixed timeout; sadly this was yielding two requests (and additional reflows if the first query made it to the client) so it was sub-optimal. After a while I found that the goal can be achieved modifying query params wisely (i.e. for the first request only): var start_query = '20'; $('#table').bootstrapTable({ queryParams: function(params){ if(start_query){ $('.bootstrap-table').find('.search input').val(start_query) params['search'] = start_query start_query = null } return params } }); Interestingly the $input.val() call does not fire any additional callbacks so the code above uses only one query/request. Please see a working demo here: http://jsfiddle.net/e3nk137y/15364/ Edit: The preferred way to do implement such behavior probably should use searchText option; sadly it also issues two requests. I created an issue in bootstrap-table repo. Edit 2: A patch for two-request behaviour of searchText has been merged into the development branch of the Bootstrap Table plugin and should be a part of the next release.
score: 0
answers question: http://stackoverflow.com/q/28028857
type: Answer

http://stackoverflow.com/a/27984991
answers question: http://stackoverflow.com/q/27984627
type: Answer
upvote count: 1
score: 1
downvote count: 0
has body: Please replace: $("#date").val(date); With: $(".datepicker").datepicker("update", date);

http://stackoverflow.com/comment/44426990
type: Comment
comment on: http://stackoverflow.com/a/28020236
has text: So I do have that, but that would require me running through an entire for loop of all my posts to check that every time. (the order is messed up because its sorted based on different filters). Is there a more elegant way of doing this?
type: AnswerComment
score: 0

http://stackoverflow.com/q/28004984
has title: Please Help! Need javascript dropdown filter
type: Question
has answer: http://stackoverflow.com/a/28004995
tagged with: javascript
score: 0
has body: I have this site: GebrAuto does anyone have an example of a javascript searchbox with a dropdown filter? so for example i'm looking to create a searchbox for my site and allow users to either search: "Current Category" or "Whole Site". I could create a combobox and place it next to the input box but i'm trying to see if there is a fancier js way of doing this.
tagged with: filter
answer count: 1
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/a/28015383
has comment: http://stackoverflow.com/comment/44419133
accepted answer of: http://stackoverflow.com/q/28013692
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28013692
type: Answer
has comment: http://stackoverflow.com/comment/44418649
score: 1
upvote count: 1
has body: I do not believe there is any property called "assignments" on a form by default. What you want to be using is something on the lines of var inputs = document.forms[0].getElementsByTagName("input") for (var i=0; i&lt;inputs.length; i++) { if (inputs[i].type === "checkbox" &amp;&amp; inputs[i].checked){ // do your thing } }

http://stackoverflow.com/a/28054363
has comment: http://stackoverflow.com/comment/44490865
has comment: http://stackoverflow.com/comment/44490736
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/28053610
has body: its font-size: 1rem; for fonts. check here
answers question: http://stackoverflow.com/q/28053610

http://stackoverflow.com/q/28089700
tagged with: popcornjs
has comment: http://stackoverflow.com/comment/44566107
score: 1
has comment: http://stackoverflow.com/comment/44560617
has comment: http://stackoverflow.com/comment/44558432
type: Question
has comment: http://stackoverflow.com/comment/44560497
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44559158
tagged with: javascript
tagged with: string
has title: How to select a track in popcorn.js using a string and play it?
has comment: http://stackoverflow.com/comment/44558065
has body: So, here's the skinny: Running popcorn.js on a youtube video and separate audio loops. Each one is a track like 'video' and 'audio1' etc. I have user interaction over a sockets that is sending commands to the window as strings like "Play_audio1". This string is then parsed using split. so we get: var messageArray = message.split("_"); thus messageArray[0] is my command, and messageArray[1] is what track to do it to. THE PROBLEM I'm trying to execute the code to select the track using window, and run the popcorn function play() on it, but it aint working. Shoots back undefined. case 'Play': window[messageArray[1]][play](); break; Where's my mistake here? eval() works, but I heard it was the devil. EDIT: To help add to this, I'll include a popcorn.js track code: var audio1 = Popcorn.smart( "#audio1", "audiofile1.wav",{ frameAnimation: true }); and in your html you have &lt;audio id="audio1"&gt;&lt;/audio&gt; popcorn.js fills it with your selected file, and to play, you normally just use audio1.play();
tagged with: eval
has comment: http://stackoverflow.com/comment/44561691
favorite count: 0
has comment: http://stackoverflow.com/comment/44561742
type: UnansweredQuestion
tagged with: sockets
has comment: http://stackoverflow.com/comment/44560740
upvote count: 1
has comment: http://stackoverflow.com/comment/44561531
has answer: http://stackoverflow.com/a/28090076

http://stackoverflow.com/comment/44521152
score: 1
type: AnswerComment
type: Comment
has text: Useful answer (aside from the snide intro)
comment on: http://stackoverflow.com/a/28070649

http://stackoverflow.com/comment/44787763
score: 0
type: Comment
type: AnswerComment
has text: Thanks, copying the generated script to a separate file and referencing it in karma.conf.js has solved my problem. I will try to apply the post-build step later on.
comment on: http://stackoverflow.com/a/28097803

http://stackoverflow.com/comment/46717116
comment on: http://stackoverflow.com/a/27986285
type: AnswerComment
score: 0
type: Comment
has text: A subclass made by this solution requires the same mechanism to its own subclasses. One small problem ;)

http://stackoverflow.com/a/28080455
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28032079
upvote count: 2
has comment: http://stackoverflow.com/comment/102817792
answers question: http://stackoverflow.com/q/28032079
type: AcceptedAnswer
type: Answer
has body: The solution is to use an index with the multiEntry key property set to true see this link (thanks @kyaw Tun) Each index also has a multiEntry flag. This flag affects how the index behaves when the result of evaluating the index's key path yields an Array. If the multiEntry flag is false, then a single record whose key is an Array is added to the index. If the multiEntry flag is true, then the one record is added to the index for each item in the Array. The key for each record is the value of respective item in the Array. Armed with this index, a specific keyPath is no longer necessary, so you can just use a keyGen for simplicity. So, to create the database: request.onupgradeneeded = function(event) { var db = event.target.result; var objectStore = db.createObjectStore("domains", {autoIncrement: true }); objectStore.createIndex("domain", "domain", { unique: true, multiEntry: true }); for(var i in tags) { objectStore.add(tags[i]); console.log("added " + tags[i]["domain"] + " to the DB"); } }; and an example of using a domain to query for an object: var objectStore = db.transaction("domains").objectStore("domains"); var query = objectStore.index("domain").get(queryURL); query.onsuccess = function(event){...};

http://stackoverflow.com/comment/44548028
has text: i came up with this $(":input").keyup(function(e) { $( ":input" ).unbind("keyup").bind( "keyup", function() { alert(33232); if(is_draft_started == 0) { s2 = setInterval('draft("' + frm_name + '")', auto_save_time); is_draft_started = 1; } }); }); but this close keyup wont fire on first keyp
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28084613
type: Comment

http://stackoverflow.com/comment/44365151
has text: There should be a way through other tools to make it more generic. Well I wonder if there was a possibility to implement a debugger extension that will check each line of code of javascript not just jquery and see if the dom element that it affected is in the list of the ones that match the selector.. I would be interested to implement that somehow but I don't know where to start. It shouldn't be very difficult
comment on: http://stackoverflow.com/q/27986980
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44587130
score: 0
type: Comment
type: QuestionComment
has text: Anyway you have to submit the form. Better make an AJAX POST call and on servlet get the parameter. Same as mentioned by San.
comment on: http://stackoverflow.com/q/28106114

http://stackoverflow.com/comment/44544460
comment on: http://stackoverflow.com/a/28083228
has text: I think I didn't read your question precisely. It seems that your RP already contains a WHERE expression like "columnA like 'Blah' and columnB in (1,2,3)". In that case, write WHERE 1=0 -- $REPLACE_THIS$ in your query and change the script code accordingly.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44453405
score: 0
type: Comment
has text: @DanielWeiner, I'm (purposefully) not. If the data is coming in unsorted, a sort could be applied beforehand.
comment on: http://stackoverflow.com/a/28034081
type: AnswerComment

http://stackoverflow.com/a/28085360
score: 1
answers question: http://stackoverflow.com/q/28084731
has comment: http://stackoverflow.com/comment/44548644
has comment: http://stackoverflow.com/comment/44549055
downvote count: 0
has comment: http://stackoverflow.com/comment/44553423
type: Answer
has body: &lt;?php $func = new Functions; $purl = $func-&gt;getPageURL()."\n";//use () $pname = $func-&gt;getPageName(); echo $purl; echo $pname; ?&gt;
upvote count: 1

http://stackoverflow.com/q/27966057
has title: jqGrid paginator not visible in scroll pagination
favorite count: 0
has comment: http://stackoverflow.com/comment/46460579
has comment: http://stackoverflow.com/comment/46463019
tagged with: jqgrid-asp.net
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29121412
score: 1
accepted answer: http://stackoverflow.com/a/29121412
has comment: http://stackoverflow.com/comment/44869093
has body: Version of jqGrid: Guriddo jqGrid JS 4.7.0 (2014-12-08) Main jqGrid options: mtype: 'get', datatype: 'json', page: 1, scroll: 1, rowNum: 50, rowList: [10, 20, 50], width: 780, height: 250, hidegrid: false, multiSort: false, autowidth: true, multiselect: true, ignoreCase: true, shrinkToFit: true, rownumbers: true, rownumWidth: 25, viewrecords: true, gridview: true, pager: '#jqGridPager', viewsortcols: [false, 'horizontal', true] When i set scroll to 0 - everythink is working, anybody know an easy way to enable paging and virtual scrolling together on latest versions of jqGrid?
type: Question
tagged with: pagination
tagged with: jqgrid
tagged with: javascript
tagged with: jquery
upvote count: 1
answer count: 1

http://stackoverflow.com/q/27969217
has body: Good Morning to all I just want to share my little problem with this,There is an annoying border shaped triangle in the middle of the map you can take a look in it if you want. http://i57.tinypic.com/11lju3n.jpg Here is my code &lt;/script&gt; &lt;script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"&gt; &lt;/script&gt; &lt;script src="http://leaflet.github.io/Leaflet.draw/leaflet.draw.js"&gt; &lt;/script&gt; &lt;script&gt; // credits: https://github.com/turban/Leaflet.Mask L.Mask = L.Polygon.extend({ options: { stroke: false, color: '#333', fillOpacity: 0.5, clickable: true, outerBounds: new L.LatLngBounds([-90, -360], [90, 360]) }, initialize: function (latLngs, options) { var outerBoundsLatLngs = [ this.options.outerBounds.getSouthWest(), this.options.outerBounds.getNorthWest(), this.options.outerBounds.getNorthEast(), this.options.outerBounds.getSouthEast() ]; L.Polygon.prototype.initialize.call(this, [outerBoundsLatLngs, latLngs], options); }, }); L.mask = function (latLngs, options) { return new L.Mask(latLngs, options); }; var sanbartolome = { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [ [ 121.0207986831665, 14.71238001066067 ], [ 121.02015495300293, 14.71200643586981 ], [ 121.01968288421631, 14.712338502382146 ], [ 121.01908206939697, 14.712421518931281 ], [ 121.0184383392334, 14.712172469189156 ], [ 121.0180950164795, 14.711715877256967 ], [ 121.01775169372559, 14.71113475887066 ], [ 121.01766586303711, 14.710512130310955 ], [ 121.01783752441405, 14.709681956134785 ], [ 121.01818084716797, 14.708810269851188 ], [ 121.01886749267578, 14.707648016057705 ], [ 121.01895332336426, 14.70611217119577 ], [ 121.01818084716797, 14.705198961020216 ], [ 121.01792335510252, 14.704742354499942 ], [ 121.01783752441405, 14.704161217547579 ], [ 121.01818084716797, 14.703663098928693 ], [ 121.01818084716797, 14.703497059136536 ], [ 121.0185670852661, 14.703663098928693 ], [ 121.01…
score: 0
has answer: http://stackoverflow.com/a/27975887
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: [Leaflet]How to remove unwanted borders in map?
tagged with: leaflet
type: Question
tagged with: javascript

http://stackoverflow.com/q/27999828
has title: nodejs + qunit: saving returned exception in test
tagged with: qunit
tagged with: node.js
has answer: http://stackoverflow.com/a/28001244
type: AnsweredQuestion
has body: I'm new to qunit (one day) and still learning.. I would like to save the message and stacktrace from an exception. I'm not sure how to do that. In the code below, copies of stacktrace and message are places in the variables. I'm assuming the scope is different. QUnit.test("Internal scheme validator - destination list - empty - no strict", function(assert) { var path ='[{"sid":"test_scheme0","ssch":"","dstli":""}]'; var pathi = JSON.parse(path); var expected = 'undefined scheme destination list'; var err; var enm; var emsg; var estk; assert.throws( function(){ "use strict"; sysCatalog.__vschi__(pathi,"SchemeTest Ignore Message" ); }, function(e){ err= JSON.parse(JSON.stringify(e)); enm= JSON.parse(JSON.stringify(e.name)); emsg = JSON.parse(JSON.stringify(e.message)); estk = JSON.parse(JSON.stringify(e.stack)); return emsg === expected; }, 'Wrong exception message returned.\nExpected: '+ expected+'\nActual: '+ emsg +'\nBacktrace:\n'+estk ); });
has answer: http://stackoverflow.com/a/28003829
accepted answer: http://stackoverflow.com/a/28003829
possible better answer: http://stackoverflow.com/a/28001244
type: Question
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/comment/44428969
score: 0
type: Comment
has text: I really don't see how a normal include could not work. Please give us an example of a setup not working.
type: QuestionComment
comment on: http://stackoverflow.com/q/28021132

http://stackoverflow.com/a/28012868
has comment: http://stackoverflow.com/comment/44412973
has comment: http://stackoverflow.com/comment/44413195
has comment: http://stackoverflow.com/comment/44413096
has comment: http://stackoverflow.com/comment/44413443
has body: Those are deprecated. Try change it to $('#photoimg').off('click').on('change', function() ... If this error happens everywhere on the page, then perhaps it is missing the jQuery library script. <script src="<?php echo $base_url; ?>js/jquery.wallform.js" type="text/javascript">
accepted answer of: http://stackoverflow.com/q/28012842
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/44413383
type: Answer
has comment: http://stackoverflow.com/comment/44413807
answers question: http://stackoverflow.com/q/28012842

http://stackoverflow.com/comment/44404779
type: QuestionComment
comment on: http://stackoverflow.com/q/28008204
has text: @adeneo if you visit the page and enter "users" into the console, you can see the full array. I was just cutting out parts so that i didn't hit the character limit
score: 0
type: Comment

http://stackoverflow.com/a/28207871
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/51900797
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/28119912
downvote count: 0
answers question: http://stackoverflow.com/q/28119912
has body: I wasn't able to get this to work at all using any ckeditor gems. As a result, I completely removed the ck_editor rails gem and downloaded a build directly from the ckeditor website with the plugins I wanted added in. I then placed the whole ckeditors folder into my app > assets > javascripts folder and added the following to application.js //= require ckeditor/ckeditor.js I did end up having to do some customization by editing ckeditor/ckeditor.js directly, but I was finally able to get the CodeSnippet plugin to work this way. Hope this helps someone!
upvote count: 3

http://stackoverflow.com/comment/44426427
comment on: http://stackoverflow.com/q/28019279
score: 0
type: Comment
type: QuestionComment
has text: @Wander, it has javascript, PHP. It is not static. The server is apache. Do you suggest .htaccess configuration? How?

http://stackoverflow.com/comment/44371908
type: AnswerComment
type: Comment
has text: Thanks for your effort Chris. Really appreciated. Already upvoted :)
comment on: http://stackoverflow.com/a/27989983
score: 0

http://stackoverflow.com/comment/54895198
type: QuestionComment
comment on: http://stackoverflow.com/q/28064846
type: Comment
has text: This is a self answered question. They have made it hard to encode. Exactly because they don't want you copying them, nor copying that.
score: 0

http://stackoverflow.com/a/28060932
answers question: http://stackoverflow.com/q/28008731
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/46633209
downvote count: 0
has body: Now, what you missed here is that the "buffer" from the "inMemory" option is not "either/or" and does not mean that the content is held "In Memory" instead. It is in fact a "copy" of the data that is also sent to the temporary file on disk. So it really doesn't matter if you set "inMemory" or not as the files will still be created ( by default in the /tmp directory ) but these will of course unlink when out of scope: var async = require('async'), express = require('express'), multer = require('multer'), fs = require('fs'), mongoose = require('mongoose'), Grid = require('gridfs-stream'), Schema = mongoose.Schema; Grid.mongo = mongoose.mongo; var app = express(), gfs = {}; // Set up multer middleware app.use( multer({ //inMemory: true }) ); // Register handler app.post('/',function (req,res) { async.eachLimit(Object.keys(req.files), 10, function(file,callback) { var fileobj = req.files[file]; var writeStream = gfs.createWriteStream({ "filename": fileobj.fieldname }); fs.createReadStream(fileobj.path).pipe(writeStream); writeStream.on('close',function() { console.log('done'); callback(); }); writeStream.on('error',callback); },function(err) { if (err) { console.log(err); res.status(500).end(); } res.status(200).end(); }); }); mongoose.connect('mongodb://localhost/test'); // Start app listen and events var server = app.listen(3000,function() { mongoose.connection.on('open',function(err) { if (err) throw err; // Set up connection gfs = Grid(mongoose.connection.db); console.log('listening and connected'); }); }); And of course a simple test: var FormData = require('form-data'), fs = require('fs'), http = require('http'); var fname = 'GearsLogo.png'; var form = new FormData(); form.append(fname,fs.createReadStream(fname)) var request = http.request({ method: 'post', port: 3000, headers: form.getHeaders() }); form.pipe(request); request.on('response',function(res) { console.log(res.statusCode); }); Alternately call the middle-ware in-line with your request method, and/or se…
type: Answer

http://stackoverflow.com/a/27978361
has comment: http://stackoverflow.com/comment/44349252
has comment: http://stackoverflow.com/comment/44348955
score: 0
answers question: http://stackoverflow.com/q/27977853
type: Answer
has body: The second argument to async.each is an iterator function that should take two arguments, not one; the second one should be called when the iterator's work is done. For instance, this works: async.each [1, 2, 3], ((x, next) -&gt; console.log x; do next), ((err) -&gt; console.log 'done') If your iterator is asynchronous, pass the function to the async operation so that it can call it on completion: asyncOp = (x, next) -&gt; console.log "checking #{x}" if x &gt; 1 next "#{x} is too big" else next null async.each [1, 2, 3], ((x, next) -&gt; asyncOp x, next), (err) -&gt; console.log err
has comment: http://stackoverflow.com/comment/44348844

http://stackoverflow.com/comment/44443684
type: AnswerComment
type: Comment
score: 0
has text: -1 This answers the question in a harmful way. You've supplied the OP with an immediate solution but taught him/her nothing about proper programming.
comment on: http://stackoverflow.com/a/28029132

http://stackoverflow.com/comment/44366784
score: 1
comment on: http://stackoverflow.com/q/27984033
type: QuestionComment
type: Comment
has text: Can I see a link to where you are running this?

http://stackoverflow.com/comment/44476814
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28029182
has text: It looks like a gantt type of chart, see simple demo [here](http://jsfiddle.net/stephanevanraes/tgba0t7g/4/) and [here](http://jsfiddle.net/r6emu/2560/)
score: 0

http://stackoverflow.com/a/28051722
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44488903
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/44502161
accepted answer of: http://stackoverflow.com/q/28051579
has body: Try this, No items Alternatively, we can eliminate one more filter by assigning the filtered result in another variable like below, <accordion-heading> ... No items Thanks.
has comment: http://stackoverflow.com/comment/44485812
answers question: http://stackoverflow.com/q/28051579

http://stackoverflow.com/a/28031443
answers question: http://stackoverflow.com/q/28031167
type: Answer
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28031167
has body: As long as the node lists are equal in length you can simply do this in JavaScript var data=[]; $("#avc [name='date']").each(function(i){ data.push([$(this).val(), $("#avc [name='pi']")[i].value, $("#avc [name='name']")[i].value]); }); When converted from JSON to PHP array the array above will create the array below. $x= array ( array("27/01/2014", 22, "lambda"), array("12/01/2015", 55, "alpha") array("12/04/2018", 03, "beta") );

http://stackoverflow.com/comment/44653675
type: AnswerComment
has text: Also for `self.save = function(project){ $.post('/url-to-post-to', project.toAjaxParameters()); }` is `project` the same `proj` that is currently being passed to the View Model in my post? Because I keep getting some undefined errors when it gets to this save function. Trying to test different ways of writing it.
type: Comment
comment on: http://stackoverflow.com/a/28122724
score: 0

http://stackoverflow.com/comment/44426044
type: Comment
type: QuestionComment
has text: what is the exact issue nad in which platform it is js/php,
comment on: http://stackoverflow.com/q/28018844
score: 0

http://stackoverflow.com/comment/44342476
comment on: http://stackoverflow.com/a/27973580
has text: @GavinoGrifoni Which version of angular are you using?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44330746
score: 0
has text: That link is broken. You can update your markup in the question with minimal markup.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27968694

http://stackoverflow.com/comment/44392137
comment on: http://stackoverflow.com/q/27998908
score: 0
type: Comment
type: QuestionComment
has text: i've updated it. but i don't know how to call the method in jsp

http://stackoverflow.com/a/28061682
score: 0
type: Answer
has body: The problem is that you don't remove anima class. You can use setTimeout function to do this: $(document).ready(function(){ $("#container .like a img").click(function(){ $("#container .balloons a img").addClass("anima"); setTimeout(function() { $("#container .balloons a img").removeClass("anima"); }, 500) }); });
answers question: http://stackoverflow.com/q/28061474

http://stackoverflow.com/a/43102527
answers question: http://stackoverflow.com/q/27986173
has body: use ng-intl-tel-input to validate mobile numbers for all countries. you can set default country also. on npm: https://www.npmjs.com/package/ng-intl-tel-input more details: https://techpituwa.wordpress.com/2017/03/29/angular-js-phone-number-validation-with-ng-intl-tel-input/
downvote count: 0
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/89946058

http://stackoverflow.com/comment/44546512
type: AnswerComment
has text: So you basically editing $scope.entry right? If yes see updated answer
comment on: http://stackoverflow.com/a/28081811
type: Comment
score: 0

http://stackoverflow.com/comment/84116295
comment on: http://stackoverflow.com/a/27992380
has text: This answer was exactly what I was looking for ! State is for components changing data and passing it down to child components requires props since changing state is local to component.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44416972
has text: ok no problem but if i use just JSON it give me XMLHttpRequest cannot load http://demos.cs-cart.com/54bbdcef36bac/api/payments. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. How can i get the json or how can i add the Access-Control-Allow-Origin to in jquery
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28014316

http://stackoverflow.com/q/28013546
has comment: http://stackoverflow.com/comment/44424340
accepted answer: http://stackoverflow.com/a/28021497
has comment: http://stackoverflow.com/comment/44415301
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44424798
has comment: http://stackoverflow.com/comment/44414868
downvote count: 0
has body: I have a canvas with some cubes inside a draggable element and I want to rotate the camera with OrbitControls, but instead of just rotating the cubes it starts also dragging by left click (I want to drag only while clicking on the border). The code.
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
type: Question
tagged with: three.js
has title: Three JS ObitControls inside JQuery Draggable
has answer: http://stackoverflow.com/a/28021497
has comment: http://stackoverflow.com/comment/44414941
has comment: http://stackoverflow.com/comment/44415801
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/44416143

http://stackoverflow.com/a/27983897
downvote count: 0
answers question: http://stackoverflow.com/q/27983740
has comment: http://stackoverflow.com/comment/44360652
type: Answer
has body: I think that the best way is to use websockets. Report editing will create websocket connection with your server and when editing page will closed, connection will be terminated
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44360542
has comment: http://stackoverflow.com/comment/44360152

http://stackoverflow.com/q/28097874
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28098610
type: Question
has body: I'm learning JavaScript and need to disable a text box (annual interest rate) after it finished the for loop and displays the future value. I also need to modify the clear_click event so the textbox is enabled when the clear button is clicked, here is my code: var $ = function (id) { return document.getElementById(id); } var calculate_click = function () { var investment = parseFloat( $("investment").value ); var annualRate = parseFloat( $("rate").value ); var years = parseInt( $("years").value ); $("futureValue").value = ""; if (isNaN(investment) || investment &lt;= 0) { alert("Investment must be a valid number\nand greater than zero."); } else if(isNaN(annualRate) || annualRate &lt;= 0) { alert("Annual rate must be a valid number\nand greater than zero."); } else if(isNaN(annualRate) || annualRate &gt;= 20) { alert("Annual rate must be a valid number\nand less than twenty."); } else if(isNaN(years) || years &lt;= 0) { alert("Years must be a valid number\nand greater than zero."); } else if(isNaN(years) || years &gt;= 50) { alert("Years must be a valid number\nand less than fifty."); } else { var monthlyRate = annualRate / 12 / 100; var months = years * 12; var futureValue = 0; for ( i = 1; i &lt;= months; i++ ) { futureValue = ( futureValue + investment ) * (1 + monthlyRate); } $("futureValue").value = futureValue.toFixed(2); } } var clear_click = function () { $("investment").value = ""; $("rate").value = ""; $("years").value = ""; $("futureValue").value =""; } window.onload = function () { $("calculate").onclick = calculate_click; $("investment").focus(); $("clear").onclick = clear_click; }
tagged with: disabled-input
has comment: http://stackoverflow.com/comment/44571650
answer count: 2
has title: Enable/Disable textbox and button using JavaScript
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28098610
score: 0
has answer: http://stackoverflow.com/a/28098482
accepted answer: http://stackoverflow.com/a/28098482

http://stackoverflow.com/q/28083733
accepted answer: http://stackoverflow.com/a/28084060
type: AnsweredQuestion
tagged with: firefox
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/44545888
has title: placeholder with CRLF don't work in Firefox
score: 1
has answer: http://stackoverflow.com/a/28084060
has body: (Example and code inside) I have big textarea that's contain placeholder with CRLF. I implemented it with jquery (because specification of html 5 denied CRLF in placeholder). But it didn't work in Firefox. Any suggestion how to solve this problem? var placeholder = "1111 \n 2222 example."; $('textarea.span12').attr('placeholder', placeholder); $('textarea.span12').focus(function () { if ($(this).val() === placeholder) { $(this).attr('placeholder', ''); } }); $('textarea.span12').blur(function () { if ($(this).val() === '') { $(this).attr('placeholder', placeholder); } }); Working example: http://jsfiddle.net/q8kuoa25/
upvote count: 1
answer count: 1
tagged with: placeholder

html-table
tags question: http://stackoverflow.com/q/28107757
tags question: http://stackoverflow.com/q/28036251
tag name: html-table
tags question: http://stackoverflow.com/q/28116633
tags question: http://stackoverflow.com/q/27971846
tags question: http://stackoverflow.com/q/27999538
tags question: http://stackoverflow.com/q/28027300
tags question: http://stackoverflow.com/q/28078973
tags question: http://stackoverflow.com/q/27976700
type: Tag
tags question: http://stackoverflow.com/q/27964089
tags question: http://stackoverflow.com/q/28063963
tags question: http://stackoverflow.com/q/28076031

http://stackoverflow.com/q/28120023
has body: #1 so when I click on the anchor tag I want it to add a new anchor tag with jquery. How can I go about doing that?
has comment: http://stackoverflow.com/comment/44614320
score: 0
has answer: http://stackoverflow.com/a/28120133
type: Question
has comment: http://stackoverflow.com/comment/44614288
tagged with: javascript
has answer: http://stackoverflow.com/a/28120081
answer count: 3
has title: how can I add a new with jquery when the is clicked?
tagged with: jquery
has comment: http://stackoverflow.com/comment/44614331
has answer: http://stackoverflow.com/a/28120060
has comment: http://stackoverflow.com/comment/44614270
accepted answer: http://stackoverflow.com/a/28120081
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/28120060
type: AnsweredQuestion

http://stackoverflow.com/comment/44548452
has text: @Jonathan: What makes you think that? Provided you create the functions just once rather than repeatedly, declaration vs. expression doesn't matter modulo inlining (see the results from Davin's update I added to the answer).
type: Comment
comment on: http://stackoverflow.com/a/28085142
score: 1
type: AnswerComment

http://stackoverflow.com/a/28086322
has comment: http://stackoverflow.com/comment/44565650
type: Answer
has comment: http://stackoverflow.com/comment/44571949
has comment: http://stackoverflow.com/comment/44550999
has comment: http://stackoverflow.com/comment/44551107
accepted answer of: http://stackoverflow.com/q/28086249
has body: Just use the regexp (you actually already using it): $(this).text().replace(/(French|keyboard)/g, ""); And, of course in such case do not use selector :contains('French') or use both of them (I suggest to use just $("#centerplist .products .datainfo a')
score: 0
answers question: http://stackoverflow.com/q/28086249
type: AcceptedAnswer

http://stackoverflow.com/comment/44451555
comment on: http://stackoverflow.com/q/28033262
type: QuestionComment
type: Comment
has text: If you don't want to have native mongodb functionality for that, you will just extract all the docs and run the logic on each doc, selecting only those that apply to your formula
score: 0

http://stackoverflow.com/a/28081167
type: Answer
has body: The issue is that your view has several nested elements with the .js-node class. When you click the parent one, you display the children .js-node elements, but when you click one of those, the event bubbles up and re-triggers the event on the parent .js-node, which closes the children that you just clicked. You can stop this event bubbling by calling e.stopImmediatePropagation(); I've updated your toggle method like so and it works: toggle: function(e) { var $e = $(e.currentTarget); $e.children('.tree-list').slideToggle(); e.stopImmediatePropagation(); } http://jsfiddle.net/CoryDanielson/aeao3Lec/2/ The larger issue that I see is that your data is not really a collection... it's a tree. The CollectionView is really used to render a flat array of models, not a nested one. You should be rendering this data with multiple CollectionViews nested inside of each other... this will start to cause problems as your TreeItemView grows in complexity. Edit: Nope, you're using a composite view which works perfectly for rendering trees.
downvote count: 0
has comment: http://stackoverflow.com/comment/44563313
has comment: http://stackoverflow.com/comment/44562881
accepted answer of: http://stackoverflow.com/q/28080184
score: 1
has comment: http://stackoverflow.com/comment/44558867
answers question: http://stackoverflow.com/q/28080184
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/44550174
has text: @Kent thanks, I'll be careful next time
comment on: http://stackoverflow.com/q/28078478
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28098606
type: Answer
score: 11
answers question: http://stackoverflow.com/q/28098525
has comment: http://stackoverflow.com/comment/44573087
accepted answer of: http://stackoverflow.com/q/28098525
has body: Use replace to remove the unwanted characters. var newStr = '`http://bit`.`ly/2yy0foe`'.replace(/`/g, "");
downvote count: 0
type: AcceptedAnswer
upvote count: 11

http://stackoverflow.com/comment/44362681
type: Comment
has text: I have updated, it's undefined because the rule2 in jsfiddle have 2 [if] but just 1 [/if] (i have change this for test the condition) retry with the new link
comment on: http://stackoverflow.com/a/27985848
score: 0
type: AnswerComment

http://stackoverflow.com/q/27981129
linked to: http://stackoverflow.com/q/12503040
has comment: http://stackoverflow.com/comment/44357129
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44356264
has title: Loading web page and parse its html after asyncronous javascript completes
has comment: http://stackoverflow.com/comment/44354220
score: 0
linked to: http://stackoverflow.com/q/35267191
tagged with: html-parsing
type: Question
has answer: http://stackoverflow.com/a/35285374
tagged with: c#
has comment: http://stackoverflow.com/comment/44354560
tagged with: html-agility-pack
has answer: http://stackoverflow.com/a/29395923
has comment: http://stackoverflow.com/comment/44356042
has comment: http://stackoverflow.com/comment/44353758
has body: For a personal use .net project i'm trying to load and parse a skyscanner.net search results page. I know Skyscanner has APIs for these kind of tasks but it seems there isn't a free personal license to use. The problem is Skyscanner needs a lot of seconds to complete a search process, so using HtmlAgilityPack to load the document results in a page without the content i'm looking for. I tried to use WebBrowser object and its event DocumentCompleted, but it seems the event is triggered before the actual search results are loaded into the page. So, is there any way to load the page, wait for the javascript asyncronous scripts completely fill the page and then get the html to parse?
answer count: 2
tagged with: javascript
linked to: http://stackoverflow.com/q/202481

http://stackoverflow.com/a/28010822
score: 0
accepted answer of: http://stackoverflow.com/q/28010794
type: Answer
answers question: http://stackoverflow.com/q/28010794
has comment: http://stackoverflow.com/comment/44409425
has body: You don't need another var. You can just use x*2. JavaScript is smart enough to evaluate the result and add it to the string as you would expect. "2 &times; " + x + " = " + x*2 + "&lt;br />" Few notes: To denote "times" (like: "a times b"), HTML has the &amp;times; entity which renders like so: &times; It's considered bad practice to use &lt;br&gt; like this in production. Generate a table or a list, and add those as elements. You should avoid .innerHTML until you are aware of the risks of using it.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44409566

http://stackoverflow.com/comment/44407269
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28009771
score: 0
has text: JavaScript function parameters (and variables in general) don't have a type. (JavaScript *values* have a type, but a given variable can refer to different types.)

http://stackoverflow.com/comment/137718810
type: Comment
comment on: http://stackoverflow.com/a/78116805
has text: As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44340240
type: Comment
score: 2
comment on: http://stackoverflow.com/q/27973669
has text: @Tyblitz setting and immediately resetting the `.className` will have no visual effect; the browser will not immediately update the page layout, in other words.
type: QuestionComment

http://stackoverflow.com/a/28092356
score: 0
has comment: http://stackoverflow.com/comment/44584926
type: Answer
has comment: http://stackoverflow.com/comment/44585490
has comment: http://stackoverflow.com/comment/44593750
accepted answer of: http://stackoverflow.com/q/28091965
has body: You can't download the images on your main UI thread, so do it in an AsyncTask. Create this class: class LoadImageTask extends AsyncTask&lt;String, Void, Drawable &gt; { public LoadImageTask(ImageView iv) { imageView = iv; } ImageView imageView; protected Drawable doInBackground(String... urls) { try { URLConnection connection = new URL(urls[0]).openConnection(); connection.connect(); InputStream is = (InputStream) connection.getContent(); Drawable d = Drawable.createFromStream(is, "src"); return d; } catch (Exception e) { // e.printStackTrace(); return null; } } protected void onPostExecute(Drawable drawable) { if(drawable != null) imageView.setImageDrawable(drawable); } } Then change your getView() function to use the AsyncTask instead of LoadImageFromURL: // imageView.setImageDrawable(LoadImageFromURL(MyGridViewConfig. // getResim_list().get(position))); new LoadImageTask(imageView).execute(MyGridViewConfig.getResim_list().get(position));
answers question: http://stackoverflow.com/q/28091965
has comment: http://stackoverflow.com/comment/44584382
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44580284
has comment: http://stackoverflow.com/comment/44584885
has comment: http://stackoverflow.com/comment/44583914

http://stackoverflow.com/comment/44360970
has text: @nick thi is html code...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27984952
score: 0

http://stackoverflow.com/comment/44499147
score: 0
type: QuestionComment
type: Comment
has text: also a duplicate of http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key and many, many others.
comment on: http://stackoverflow.com/q/28058519

http://stackoverflow.com/comment/44396906
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28003642
type: AnswerComment
has text: Oh, sorry about that.I only tried it offline before. I just tested it online but it has the same issues as before. It works on all browsers I tried except for safari.

http://stackoverflow.com/comment/44507596
type: QuestionComment
type: Comment
has text: `$(this).scrollTop()`... Why checking for this? The value returned is an integer..
score: 0
comment on: http://stackoverflow.com/q/28063455

http://stackoverflow.com/q/28099576
type: AnsweredQuestion
tagged with: sapui5
has comment: http://stackoverflow.com/comment/44575181
possible better answer: http://stackoverflow.com/a/28129792
upvote count: 1
has comment: http://stackoverflow.com/comment/44575693
has comment: http://stackoverflow.com/comment/44575098
type: Question
has answer: http://stackoverflow.com/a/28100603
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/44575162
tagged with: express
has body: I have the array from my expressjs which looks like below. And I am assigning this array to model in my frontend framework openui5. But only the first 100 elements of array i.e [0-99] are being loaded into model and all other array elements are not considered i.e [100-520], why is this and how can I make sure that all array elements are loaded into my model? Below is the code used to load model. onAfterRendering: function () { var that = this; var businessQuery= $.ajax({ type: "GET", url: '/getAllBusinesses', dataType: "json" }); $.when(businessQuery).done(function (oBusinesses) { that.businessModel= new sap.ui.model.json.JSONModel(); that.businessModel.setData(oBusinesses[0].franchisees); //fracnchisees is array of 520 elements that.getView().setModel(that.businessModel, 'businessModel'); }); $.when(businessQuery).fail(function (jqXHR, textStatus, errorThrown) { console.log(errorThrown); }); }, My view where the model is bound to a table looks as below, var oBusinessListColumn = new sap.m.ColumnListItem({ cells: [ new sap.m.Button({ icon: '{businessModel&gt;picture/data/url}', text: '{businessModel&gt;name}', type: sap.m.ButtonType.Transparent, press: [oController.showBusiness, oController] }), new sap.m.Button({ icon: 'img/Revember32_32.png', text: { path: 'businessModel&gt;presentInRevember', formatter: jQuery.proxy(oController.formatPresentInRevember, oController) }, type: sap.m.ButtonType.Emphasized, press: [oController.invitePressed, oController] }) ] }); var oBusinessTable = new sap.m.Table('js-myBusiness-oBusinessTable', { fixedLayout: false, columns: [ new sap.m.Column({ header: new sap.m.Label({text: 'Business'}) }), new sap.m.Column({ header: new sap.m.Label({text: 'Status'}) }) ], layoutData: new sap.ui.layout.GridData({span: "L12 M12 S12"}) }).addStyleClass('css-alignHorizontalCenter css-sTopBottomMargin card'); oBusinessTable.bindAggregation('items', 'businessModel&gt;/', oBusinessListColumn); And when the table is rendered I see only first 100 element…
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/44628512
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/28100603
has answer: http://stackoverflow.com/a/28099734
has answer: http://stackoverflow.com/a/28129792
has comment: http://stackoverflow.com/comment/44574909
has title: All array elements are not assigned to model

http://stackoverflow.com/comment/44477754
score: 1
comment on: http://stackoverflow.com/a/28040391
type: AnswerComment
type: Comment
has text: Meteor's publish/subscribe is flexible and using multiple publication for the same Collection associate to very precise `find` projections will discharge the server overload.

http://stackoverflow.com/a/28062997
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44514194
has comment: http://stackoverflow.com/comment/44514620
type: Answer
has comment: http://stackoverflow.com/comment/44509747
accepted answer of: http://stackoverflow.com/q/28062615
has comment: http://stackoverflow.com/comment/44509539
has body: It's impossible to control a JS on a site from an external URL. But you can do a something else: Download the data from the external site to your server via a server-side script (like php), and recreate the filters on your site in JS. But this way you should care about copyrights and you have to maintain your script if they changed the table structure they used.
has comment: http://stackoverflow.com/comment/44507106
answers question: http://stackoverflow.com/q/28062615

http://stackoverflow.com/a/27986277
downvote count: 0
answers question: http://stackoverflow.com/q/27986173
score: 8
upvote count: 8
type: Answer
has body: Check this answer Basically you can create a regex to fulfil your needs and then assign that pattern to your input field. Or for a more direct approach: &lt;input type="number" require ng-pattern="&lt;your regex here&gt;"&gt; More info @ angular docs here and here (built-in validators)

http://stackoverflow.com/q/27972454
has answer: http://stackoverflow.com/a/28011863
tagged with: javascript
tagged with: fabricjs
accepted answer: http://stackoverflow.com/a/28011863
answer count: 2
tagged with: canvas
downvote count: 0
favorite count: 0
has title: Canvas/Fabric.js .loadFromJSON() replaces entire canvas
upvote count: 2
score: 2
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/70051163
has answer: http://stackoverflow.com/a/28050905
type: Question
has body: I have 2 JSON objects: jSONObject1 {"type":"group","originX":"left","originY":"top","left":0,"top":0,"objects": [{"type":"line","stroke":"grey","x1":430,"x2":20.0,"y1":430,"y2":430}, {"type":"line","stroke":"grey","x1":430,"x2":20.0,"y1":20.0,"y2":20.0}, {"type":"line","stroke":"grey","x1":430,"x2":430,"y1":20.0,"y2":430}, {"type":"line","stroke":"grey","x1":20.0,"x2":20.0,"y1":430,"y2":20.0}]} contains an array of lines to be drawn on the canvas that make up a building floorplan jSONObject2 {"type":"group","originX":"left","originY":"top","left":0,"top":0, "objects":[{"type":"rect","originX":"left","originY":"top","left":45,"top":-405,"width":60,"height":60,"fill":"red"}, {"type":"rect","originX":"left","originY":"top","left":105,"top":-405.0,"width":60,"height":60,"fill":"red"}, {"type":"rect","originX":"left","originY":"top","left":165,"top":-405.0,"width":60,"height":60,"fill":"blue"}, {"type":"rect","originX":"left","originY":"top","left":225,"top":-405.0,"width":60,"height":60,"fill":"blue"}]} contains an array of rectangles to be drawn on the canvas that show metrics for different points in the floorplan. I am using .loadFromJSON(...) to render the desired lines/rectangles on the canvas. The problem is that every time this function gets called, it completely replaces everything on the canvas instead of overlaying the floor plan metric rectangles over the floorplan. What is the best way to render 2 separate JSON objects onto a Canvas element without one overwriting the other? I have looked at this GitHub issue which suggests using the fromObject() method to add objects from JSON without clearing the entire canvas. In theory this sounds like a decent idea... This page also leads to 2 jsfiddle "examples" of how to use this fromObject method, one of which doesn't even work and the other of which seems to be working but is very unclear. Trying to use loadFromJSON() (Overwrites): Canvas canvas = document.getElementById("myCanvas"); canvas.loadFromJSON(JSON.stringif…
possible better answer: http://stackoverflow.com/a/28050905

http://stackoverflow.com/comment/44580133
type: Comment
comment on: http://stackoverflow.com/q/28102167
score: 0
type: QuestionComment
has text: try $(document).click. And "return false;" at the end of each function where you don't want the event to bubble up to the document.

http://stackoverflow.com/a/28024383
score: 1
has body: You need to check if your url start's with specific string, not to be equal to it: $(".w-slide a[href^='//index.php?eID=']").children('img').unwrap(); ^ by using ^ sign your selector will search for elements that have attribute with values that starts with //index.php?eID=...
has comment: http://stackoverflow.com/comment/44434429
has comment: http://stackoverflow.com/comment/44434292
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/44434355
upvote count: 2
answers question: http://stackoverflow.com/q/28024364
downvote count: 1
accepted answer of: http://stackoverflow.com/q/28024364

http://stackoverflow.com/q/27990311
answer count: 1
score: 8
accepted answer: http://stackoverflow.com/a/27990406
tagged with: javascript
tagged with: date
has body: Is there a simple way to convert standard Javascript date format to xs:dateTime So I have a date value (new Date()) and I need in the format: 2015-01-16T20:26:53.974+03:00 so Fri Jan 16 2015 22:26:53 GMT+0500 (Ekaterinburg Standard Time) -> 2015-01-16T20:26:53.974+03:00 It strange but cound't find simple solution.
type: AnsweredQuestion
downvote count: 0
favorite count: 0
upvote count: 8
type: Question
has title: Javascript date to xs:dateTime
tagged with: datetime
has answer: http://stackoverflow.com/a/27990406
tagged with: http://stackoverflow.com/tag/xml

http://stackoverflow.com/a/27979349
score: 1
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27977815
has body: localStorage could work if you are not storing too much data, but IndexedDB might be a better choice, it has a higher default storage limit and allows you to store your data in a more structured way. IndexedDB allows you to store objects and anything else that can be cloned by the structured cloning algorithm without you having to manually serialize/deserialize it (localStorage can only store strings). IndexedDB is kind of complicated and can be a pain to work with, it might be a good idea to use an abstraction layer. PouchDB is a fairly popular library that takes care of the details for you. Under the hood it uses IndexedDB (or other similar technologies depending on what the current browser supports) and presents you with a much nicer API to work with. One benefit of working with PouchDB is that if you end up using CouchDB on the server PouchDB can actually sync up with it.

http://stackoverflow.com/q/28075764
tagged with: http://stackoverflow.com/tag/html
score: 0
has comment: http://stackoverflow.com/comment/44530942
has body: For the app I'm making, when the user first enters the app, the default home page is loaded (let's call it index.html). After the user signs in, they are routed to another page of the app (let's call this feed.html). When the user leaves the app and decides to come back later, but is still logged into the app, I want the user to automatically see feed.html when the app loads, rather than index.html. Is there any way I can do this? I have tried changing the default url dynamically and in the html as indicated here, but index.html keeps loading instead of feed.html. Thanks in advance. UPDATE: var mainView; if (localStorage.getItem("isLoggedIn") !== null){ // If already logged in mainView = myApp.addView(".view-main", { url: "feed.html" }); } else { mainView = myApp.addView(".view-main", {}); } So this is my code. According to the documentation, setting the url parameter when instantiating the main view should set the default url of the page to load when the view loads, but feed.html doesn't load. Before this, I would forward the user to feed.html after index.html loads using the router: mainView.router.load({ url: "feed.html" }); but I would rather have the user land on feed.html instead of index.html if possible.
has answer: http://stackoverflow.com/a/45804871
type: Question
has title: Cannot set initial url for main-view
tagged with: javascript
has comment: http://stackoverflow.com/comment/44530830
has comment: http://stackoverflow.com/comment/44531164
has comment: http://stackoverflow.com/comment/44531196
answer count: 1
tagged with: html-framework-7
type: UnansweredQuestion

http://stackoverflow.com/a/37196396
upvote count: 35
downvote count: 0
score: 35
answers question: http://stackoverflow.com/q/28100644
type: Answer
has body: JSTransform is deprecated , please use babel instead.

http://stackoverflow.com/q/28091222
has comment: http://stackoverflow.com/comment/44559206
score: 1
linked to: http://stackoverflow.com/q/1570127
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28091412
has body: Question background: I have an MVC project where I am attempting to create a partial view modal content that is then concatenated to the rest of its respective modal markup and then finally appending to a 'main' modal div. The code: Main modal div: JQuery to trigger the modal popup along with the AddModal method to build the modal content: AddModal method to build the modal: AddModal = function() { var partialHtml = $(@Html.Partial("../Modal/Index", new { id = 1 })) $html = $(' ' + ' ' + ' ' + ' X ' + ' Modal title ' + ' ' + ' '+partialHtml+' ' + ' ' + ' Close ' + ' Save changes ' + ' ' + ' ' + ' '); $("#basicModal").append($html); }; Partial View: Test Partial view The issue: I am running into an error of Uncaught SyntaxError: Unexpected token < which is being caused by the HTML Markup of the partial view as shown: var partialHtml = $( Test Partial view ) How can I successfully escape this forward slash so that the HTML from my partial view is correctly added to the rest of the dynamically added markup?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: jQuery - dynamically loading ASP.NET partial view into modal
accepted answer: http://stackoverflow.com/a/28091412
favorite count: 0
upvote count: 1
tagged with: asp.net-mvc-4
type: AnsweredQuestion

http://stackoverflow.com/comment/44609880
type: Comment
comment on: http://stackoverflow.com/a/28117858
has text: I think this will get me where I'm going , thank you for prompt answer
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44438166
score: 0
type: Comment
type: QuestionComment
has text: I'm afraid those snippets may not be enough. Inability to release actual code is understandable, but you need to make a _complete_ example, that demonstrates the problem AND is actually something we can load as an extension.
comment on: http://stackoverflow.com/q/28021488

http://stackoverflow.com/q/28069001
has comment: http://stackoverflow.com/comment/44517789
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/44519768
tagged with: http://stackoverflow.com/tag/html
has title: iframe in center of div
has comment: http://stackoverflow.com/comment/44518237
possible better answer: http://stackoverflow.com/a/28074601
has answer: http://stackoverflow.com/a/28069526
has answer: http://stackoverflow.com/a/28074601
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28069526
has body: I want that my iframe is in the center of my div box right now, but I want it that that iframe goes in the center hope you guys can help me that I can that iframe in the middle of that white box. game1.html: &lt;html&gt; &lt;head&gt; &lt;title&gt;Racegame&lt;/title&gt; &lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt; &lt;meta name="description" content="" /&gt; &lt;meta name="keywords" content="" /&gt; &lt;!--[if lte IE 8]&gt;&lt;script src="css/ie/html5shiv.js"&gt;&lt;/script&gt;&lt;![endif]--&gt; &lt;script src="js/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="js/skel.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/initresize.js" &gt;&lt;/script&gt; &lt;noscript&gt; &lt;link rel="stylesheet" href="css/skel.css" /&gt; &lt;link rel="stylesheet" href="css/style.css" /&gt; &lt;link rel="stylesheet" href="css/style-desktop.css" /&gt; &lt;link rel="stylesheet" href="css/style-noscript.css" /&gt; &lt;/noscript&gt; &lt;!--[if lte IE 8]&gt;&lt;link rel="stylesheet" href="css/ie/v8.css" /&gt;&lt;![endif]--&gt; &lt;/head&gt; &lt;body&gt; &lt;script&gt; function showhide() { var div = document.getElementById("codebox"); if (div.style.display !== "none") { div.style.display = "none"; } else { div.style.display = "block"; } } &lt;/script&gt; &lt;script&gt; function resizeanshow() { showhide(); } &lt;/script&gt; &lt;div id="wrapper"&gt; &lt;nav id="nav"&gt; &lt;a href="index.html#work" class="icon fa fa-arrow-circle-left"style=color:red&gt;&lt;span&gt;Terug&lt;/span&gt;&lt;/a&gt; &lt;/nav&gt; &lt;div id="main"&gt; &lt;article id="work" class="panel"&gt; &lt;header&gt;&lt;h2&gt;&lt;/h2&gt;&lt;/header&gt; &lt;p&gt;&lt;/p&gt; &lt;div class="row"&gt; &lt;div class="4u"&gt; &lt;a href="#" class="image fit"&gt;&lt;img src="games/racegame/foto/fotozonder.PNG" alt=""&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class="8u"&gt; &lt;header&gt; &lt;h1&gt;&lt;strong&gt;Racegame&lt;/strong&gt;&lt;/h1&gt; &lt;/header&gt; &lt;p&gt;Spel gemaakt in unity.…
has comment: http://stackoverflow.com/comment/44517749
type: Question
tagged with: javascript

http://stackoverflow.com/q/28077239
linked to: http://stackoverflow.com/q/6887183
answer count: 3
has comment: http://stackoverflow.com/comment/44555381
possible better answer: http://stackoverflow.com/a/28096186
has body: I've created a Google Map on my web page using Google Maps JavaScript API v3. It just has bunch of markers and info windows associated with them, nothing fancy. Now I want to: Enable the user to share this Google Map (with markers and infoWindows) on social services like Facebook/Twitter Enable the user to open this map (with markers and infoWindows) in www.google.com/maps... by clicking a "enlarge this map" button, like they're accustomed to with embedded Google maps. Actually if I'm only able to achieve (2) and (1) is not possible from my website, then (1) can be achieved on www.google.com/maps.. anyway, so (2) is the critical point. I've searched over the web for a decent amount of time but I couldn't find any leads. P.S. I've tried to make this question more specific and have highlighted the specific parts for visual convenience as well. Update I'm using following code to generate said Google map var latlng = [{ title: 'Title 1', address: 'Address 1', city: 'City 1', postcode: 'Postcode 1', phone: 'Phone 1', lat: 43.7810795, lng: -79.3245521 }, { title: 'Title 2', address: 'Address 2', city: 'City 2', postcode: 'Postcode 2', phone: 'Phone 2', lat: 43.7910795, lng: -79.3245521 } /* the are many more objects like the two above ... */ ], markers = [], infoWindows = [], bounds = new google.maps.LatLngBounds(); function addMarker(info, map) { var marker = new google.maps.Marker({ position: new google.maps.LatLng(info.lat, info.lng), map: map, title: info.title, animation: google.maps.Animation.DROP }); bounds.extend(marker.getPosition()); markers.push(marker); var infoWindow = new google.maps.InfoWindow({ content: '&lt;div class="infowindow"&gt;&lt;h3&gt;' + info.title + '&lt;/h3&gt;&lt;div&gt;' + info.address + '&lt;br /&gt;' + info.phone + '&lt;/div&gt;&lt;/div&gt;', maxWidth: 200 }); infoWindows.push(infoWindow); google.maps.event.addListener(marker, 'click', function() { for (var k = 0; k &lt; infoWindows.length; k++) { if (infoWindows[k] !== infoWindow) { infoWi…
accepted answer: http://stackoverflow.com/a/28254287
favorite count: 0
has answer: http://stackoverflow.com/a/28096186
has answer: http://stackoverflow.com/a/28246299
has comment: http://stackoverflow.com/comment/44664715
downvote count: 2
has title: Share a map generated using JavaScript
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/44555641
type: Question
has answer: http://stackoverflow.com/a/28254287
tagged with: google-maps
has comment: http://stackoverflow.com/comment/44667589
upvote count: 5
tagged with: javascript
tagged with: google-maps-api-3

http://stackoverflow.com/a/27984143
downvote count: 0
type: Answer
has body: Popup Click for popup
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/27984007

http://stackoverflow.com/comment/44499234
has text: Could you post your code in fiddle? Also note that the first option is in index 0 so if you want to remove third you need to pass index 2.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28058756

http://stackoverflow.com/a/28086352
upvote count: 2
answers question: http://stackoverflow.com/q/28086264
has comment: http://stackoverflow.com/comment/44550346
has comment: http://stackoverflow.com/comment/44550842
has body: What's happening is that the eval() in the code sample executes the code in that string. That code creates a local variable called window, and assigns an empty object to it. The point is that with that particular string, the window in subroutine() is referring to that variable, but if it had been a completely different string with no mention of window, the window in subroutine could have ended up referring to the global window object. The point is that this is completely bonkers in terms of having predictable code, both for the person writing the code, and for the JS engine trying to optimize it, and for that reason you should avoid doing this.
downvote count: 0
has comment: http://stackoverflow.com/comment/44550429
has comment: http://stackoverflow.com/comment/44550725
has comment: http://stackoverflow.com/comment/44550686
type: Answer
score: 2

http://stackoverflow.com/comment/44545778
type: QuestionComment
comment on: http://stackoverflow.com/q/28081200
has text: @32teeths do you know how to make this query using http://docs.fullscale.co/elasticjs/
score: 0
type: Comment

http://stackoverflow.com/comment/44561091
score: 0
has text: Can u plz guide me on this. Thanks
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28091694

http://stackoverflow.com/comment/97595462
comment on: http://stackoverflow.com/a/28049798
has text: Code fails 'Bacon'.rot13() is coming out to 'Onp|{' when it should be 'Onpba'.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44336760
score: 0
has text: Vote it if am right check demo or let me know best way to achieve this
comment on: http://stackoverflow.com/q/27972031
type: QuestionComment
type: Comment

http://stackoverflow.com/a/28053047
type: Answer
has body: I haven't seen this before. Would it be possible for you to send me a simplest possible solution that reproduces the bug? I can tell you that the way you are using instanced view-models is irregular. I would expect you to return the constructor function itself. Perhaps that is the source of the issue?
has comment: http://stackoverflow.com/comment/44561933
score: 0
answers question: http://stackoverflow.com/q/28042767

http://stackoverflow.com/q/28091040
has answer: http://stackoverflow.com/a/28091084
tagged with: http://stackoverflow.com/tag/html
answer count: 4
possible better answer: http://stackoverflow.com/a/28091084
has answer: http://stackoverflow.com/a/28091052
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28091111
upvote count: 3
has body: I'm trying to grab the text inside my #address div using JS. For some reason, I keep getting a null value. Please correct me if I did anything that I am not supposed to. Here is what I've tried: function myFunction() { var uri = "www. google.com"; var res = encodeURIComponent(uri); var address = document.getElementById("address"); console.log(uri); // print out = www. google.com console.log(res); // print out = www.%20google.com console.log(address); // print out = null ???? } 410 Walker Street Lowell MA 01851 console.log(); Run
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28091121
accepted answer: http://stackoverflow.com/a/28091052
has title: How to grab a text inside a div using JavaScript?
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/28029173
has comment: http://stackoverflow.com/comment/44443306
score: 0
has comment: http://stackoverflow.com/comment/44443726
has title: Know if my script runs from a webview
type: UnansweredQuestion
tagged with: android
has comment: http://stackoverflow.com/comment/44443811
answer count: 0
has comment: http://stackoverflow.com/comment/44443649
tagged with: webview
type: Question
has body: I have a third party JS that is being loaded from many sites. For my statistics - I wish to know if the site is loaded from an Android WebView. I tried to find a difference between the user-agents but couldn't. Is there a user-agent difference? Is there a JS command that would result differently in a WebView? Thanks, Roni
tagged with: javascript

http://stackoverflow.com/a/27992495
type: Answer
answers question: http://stackoverflow.com/q/27992470
has body: Just wrap your template in something: template: ' ',
upvote count: 5
score: 5
downvote count: 0

http://stackoverflow.com/a/32483523
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27983071
has body: I also had a terrible headache figuring out how to make this possible. I get my grid data from a jQuery post which returns JSON data and builds te positions array. In your case this could be: var seri_data = []; this.serialized_data = seri_data; jQuery.post( 'yourfile.php', function( data ) { jQuery.each( data, function( key, value ) { seri_data.push({ 'id' : this.widgetId, 'x' : this.x, 'y' : this.y, 'width' : this.width, 'height' : this.height, }); }); }); Use the code below, it's the base of the gridstack serialization demo example which can be found here. Open that page's source and look at the load function part... Change it's code with the code provided below. _.each( items, function( node ) { this.grid.add_widget( jQuery( ' ' ), node.x, node.y, node.width, node.height ); }, this );
upvote count: 1

http://stackoverflow.com/q/28041421
upvote count: 1
has title: How to fire filter event on kendo ui grid by Enter keypress?
favorite count: 0
type: UnansweredQuestion
tagged with: telerik
has comment: http://stackoverflow.com/comment/45993554
downvote count: 0
has answer: http://stackoverflow.com/a/49256279
score: 1
type: Question
tagged with: kendo-grid
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I use Kendo UI v2014.2.716 I have a grid with paging,sorting,filtering by server side, and i enable filter row for my grid. When i test this filter, i realized that: The filters fire when : When input filter lost focus. when user choose item of filter menu. when user click on remove filter button. And when keypress enter on input filter, this make page postback. But i want filter fire when keypress enter on input filter. So i used template on columns: { field: "ShortTitle", title: "Title", filterable: { cell: { template: function (input) { input.width("60%"); input.keydown(preventPost); } }} }, And write a function to prevent postback: function preventPost(e) { if (e.keyCode === 13) { e.preventDefault(); } } But i don't know how to fire event filter when user press ENTER. i try to call onblur in preventPost function but it not working. function preventPost(e) { if (e.keyCode === 13) { e.preventDefault(); this.onblur(); } } Please show me the way to do this.Thank so much.

http://stackoverflow.com/a/28068106
downvote count: 0
answers question: http://stackoverflow.com/q/28063312
score: 1
has comment: http://stackoverflow.com/comment/44545216
has comment: http://stackoverflow.com/comment/44548048
has body: One issue I notice is that you do sphere.material.texture = ... while it should be sphere.material.map = ... And sphere.material.texture.needsUpdate should be sphere.material.map.needsUpdate = true; I think it is better to update the existing texture: texture = THREE.ImageUtils.loadTexture( "textures/DIVE_IMMO_00000.jpg"); update it: texture.image = ( "textures/DIVE_IMMO_00004.jpg" ); texture.needsUpdate = true; Not sure how it works with preloading the image etc...
has comment: http://stackoverflow.com/comment/44516056
upvote count: 1
type: Answer

http://stackoverflow.com/a/28001122
answers question: http://stackoverflow.com/q/28000463
has body: Try to return the data to jquery in array like $str[0]=true/false; $str[1]="HTTP/1.0 404 Not Found"/"Timezone: " .$tz . ". On date: ".$time In success check the condition success: function (data) { if(data[0]==true){ $("span").text(data[1]); }else{ window.location.href="HTTP/1.0 404 Not Found"; } i think so ajax call must be completed to redirect, above code works in my machine
score: 0
type: Answer

http://stackoverflow.com/comment/45073538
type: Comment
has text: Thanks. Isn't `var myIoSocket = window.io.connect('http://localhost:9006');` the connection statement?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28360126

http://stackoverflow.com/comment/44519919
has text: I know what the function does. I just do not understand what happens when the wrapper calls itself recursively. When this code works: savedArgs = savedThis = null;?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28070272
type: Comment

http://stackoverflow.com/q/28105132
has answer: http://stackoverflow.com/a/28105368
score: 0
has answer: http://stackoverflow.com/a/28105429
answer count: 5
has comment: http://stackoverflow.com/comment/44585033
has body: Can someone please explain me how to change template.portNumber value ? var template = { portNumber: null, stuff: "" } myfunc(template, 3); function myfunc(template, count) { var ports = {} for (var i = 0; i &lt; count; i++) { var portNumber = i + 1; ports[portNumber.toString()] = template; ports[portNumber.toString()].portNumber = portNumber; } console.debug(JSON.stringify(ports, null, 4)); return ports; } Result: "{ "1": { "portNumber": 3, "stuff": "" }, "2": { "portNumber": 3, "stuff": "" }, "3": { "portNumber": 3, "stuff": "" } }" Expected: "{ "1": { "portNumber": 1, "stuff": "" }, "2": { "portNumber": 2, "stuff": "" }, "3": { "portNumber": 3, "stuff": "" } }" Sorry for the stupid question but i really stuck with it. Same code works well in python. Thanks.
linked to: http://stackoverflow.com/q/122102
has answer: http://stackoverflow.com/a/28105232
has comment: http://stackoverflow.com/comment/44585062
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/28105216
linked to: http://stackoverflow.com/q/750486
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28105216
has title: Value inside loop doesn't change
type: Question
accepted answer: http://stackoverflow.com/a/28105232
has comment: http://stackoverflow.com/comment/44585302
tagged with: javascript
has answer: http://stackoverflow.com/a/28105241
favorite count: 0

http://stackoverflow.com/q/28058623
tagged with: google-chrome-extension
downvote count: 0
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/28062579
tagged with: css
has answer: http://stackoverflow.com/a/28062579
type: AnsweredQuestion
score: 1
upvote count: 1
tagged with: google-chrome
has body: So I'm trying to execute the following lines of code in a chrome extension: chrome.tabs.executeScript({ code: 'var elements = document.getElementsByTagName("*"); for (var i=0; i &lt; elements.length; i++) { elements[i].setAttribute("style", "font-family: Courier !important");}' }); chrome.tabs.executeScript({ code: 'var elements = document.getElementsByTagName("*"); for (var i=0; i &lt; elements.length; i++) { elements[i].setAttribute("style", "font-size: 18pt !important");}' }); chrome.tabs.executeScript({ code: 'var elements = document.getElementsByTagName("*"); for (var i=0; i &lt; elements.length; i++) { elements[i].setAttribute("style", "backgrond-color: #fbfbfb !important");}' }); chrome.tabs.executeScript({ code: 'var elements = document.getElementsByTagName("*"); for (var i=0; i &lt; elements.length; i++) { elements[i].setAttribute("style", "line-height: 1.5 !important");}' }); The problem is, each line will override the last line's CSS changes. I could fix this by putting all of the CSS changes in one line. However, I'd like to make each line work based on the status of a variable. For example: if (var_a === "true") { chrome.tabs.executeScript({ code: 'var elements = document.getElementsByTagName("*"); for (var i=0; i &lt; elements.length; i++) { elements[i].setAttribute("style", "font-family: Courier !important");}' }); } if (var_b === "true) { chrome.tabs.executeScript({ code: 'var elements = document.getElementsByTagName("*"); for (var i=0; i &lt; elements.length; i++) { elements[i].setAttribute("style", "font-size: 18pt !important");}' }); } How would I do this?
type: Question
tagged with: javascript
has title: Injecting CSS attributes as javascript in a Chrome Extension without overriding the previous ones

http://stackoverflow.com/comment/44601219
type: Comment
comment on: http://stackoverflow.com/a/28108213
has text: Also it's not much of a problem if you don't need to block/redirect the request. A non-blocking listener won't impact performance much.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44422834
comment on: http://stackoverflow.com/q/28017936
score: 1
type: Comment
type: QuestionComment
has text: There are known issues with focus and blur events on buttons and links on macs, not sure if this is one of those, but I think quirksmode have an overview

http://stackoverflow.com/q/28052552
favorite count: 0
has body: i have this json var person = { first_name: 'John', last_name: 'Doe', full_name: ? } How can use for the full name the previous two keys? (first_name,last_name)
has title: Use keys with value in json
has answer: http://stackoverflow.com/a/28052601
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44487031
tagged with: http://stackoverflow.com/tag/json
downvote count: 1
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/44487078
answer count: 1
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/44486992
accepted answer: http://stackoverflow.com/a/28052601
has comment: http://stackoverflow.com/comment/44487186

http://stackoverflow.com/q/28018912
has comment: http://stackoverflow.com/comment/44425345
tagged with: smartgwt
has body: My gwt application generates multiple .js files.This application serves multiple users across various geographies and locales.My problem is that a particular organisation faces a problem while loading one particualr js(named isc_core.js). All users in that organisation face that problem over some time difference. We fail to understand why only one organisation fails to load the same js over and over again. Multiple points for consideration - we have browser caching of one month for our .js files and a third party caching for serving our js across different geographies.
has comment: http://stackoverflow.com/comment/44424429
has title: A particular .js blocked by browser
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44426151
has comment: http://stackoverflow.com/comment/44425988
has comment: http://stackoverflow.com/comment/44427064
answer count: 0
has comment: http://stackoverflow.com/comment/44426506
type: Question
has comment: http://stackoverflow.com/comment/44425516
has comment: http://stackoverflow.com/comment/44425486
tagged with: javascript
has comment: http://stackoverflow.com/comment/44426047
has comment: http://stackoverflow.com/comment/44425577
score: 0

http://stackoverflow.com/comment/71875757
comment on: http://stackoverflow.com/q/28034235
score: 0
type: Comment
type: QuestionComment
has text: Thanks. This question is now 2 years old, I can imagine there are a lot of awesome plugins available :)

http://stackoverflow.com/comment/55255963
comment on: http://stackoverflow.com/a/28072875
type: Comment
has text: There isn't a one-size-fits-all solution here but using JSON.stringify and adding a `toJSON` method to your objects seems like the best solution: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior -- You could also automate toJSON with some reflection and `Object.defineProperty( ... { value: })`
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44389502
comment on: http://stackoverflow.com/a/28000008
has text: yes you are right in my success callback response contains the data but only thing is why doesn't it return data for success callback but it returns data for then callback
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44443619
type: AnswerComment
comment on: http://stackoverflow.com/a/28029272
type: Comment
score: 0
has text: that would work! BUT if you are exact and the "don't remove padding" in the OP's question is mandatory then the answer should actually be no ;-)

http://stackoverflow.com/comment/44552018
type: QuestionComment
type: Comment
has text: I think you will need to repaint it each time the filter changes, so the w-row divs don't mess up.
comment on: http://stackoverflow.com/q/28087458
score: 0

http://stackoverflow.com/q/27968227
type: UnansweredQuestion
has title: How to use firefox developer edition console while debugging?
has comment: http://stackoverflow.com/comment/44330089
has body: I was testing out Firefox Developer Edition today and noticed that while I could initially execute code in the javascript console, when I set a breakpoint in the javascript and started stepping through code, the console would become inactive (I can type in it, but pressing "enter" results in a newline instead of issuing the command) until I pressed "continue" and was no longer stepping through code. In chrome, I appreciate the ability to execute javascript via the console in the context of the code I'm stepping through. Is this possible in Firefox Developer Edition? Thanks!
has answer: http://stackoverflow.com/a/27968520
tagged with: firefox-developer-tools
type: Question
answer count: 2
tagged with: firefox
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44329300
favorite count: 0
has answer: http://stackoverflow.com/a/27969336
score: 2
upvote count: 2

http://stackoverflow.com/comment/44544835
score: 0
comment on: http://stackoverflow.com/q/28083385
type: Comment
type: QuestionComment
has text: A user script does not need a proxy. It should be able to remove all the stuff when the page loads - http://stackoverflow.com/questions/11638595/how-do-i-access-an-iframes-javascript-from-a-userscript

reagent
tags question: http://stackoverflow.com/q/28039338
tag name: reagent
type: Tag

http://stackoverflow.com/comment/46047716
type: AnswerComment
type: Comment
has text: it defined inside the Javascript and im calling Javascript Connector and retrieving value to the Fronend Using that. I will Comeup with the Solution i will post it when it finished. Thanks
comment on: http://stackoverflow.com/a/28223457
score: 0

http://stackoverflow.com/a/28102718
score: 2
upvote count: 2
has body: var x = 0; function f(){ var y = 1; var x = 1; } f(); console.log(x, y); Try the above code. The problem is that you didn't include a var in front of y. The result is that y is hoisted into global scope.
answers question: http://stackoverflow.com/q/28102692
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44495193
comment on: http://stackoverflow.com/q/28037933
has text: okay, that was an part of the answer ! thank you very much for your time!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44548412
score: 0
has text: not works video still playing when backpress on android device
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28084286

currency
tag name: currency
tags question: http://stackoverflow.com/q/28070391
type: Tag

http://stackoverflow.com/q/27975806
has answer: http://stackoverflow.com/a/27975903
has title: What are reasons to use return as a function in JavaScript?
has comment: http://stackoverflow.com/comment/44344170
type: Question
accepted answer: http://stackoverflow.com/a/27975848
has body: while I was going through concepts related to JavaScript functions, I came up with problem which I'm unable to figure it out. I use following codes i.e one with return as a function and the other as a simple function as follows function plus(a, b) { return( console.log(a+b), console.log(this), console.log(arguments) ) } plus(4,5); and function plus(a, b) { console.log(a+b), console.log(this), console.log(arguments) } plus(4,5) But when I run both I'm not able to figure it out since both results same in console. So I just want to know when should I use return as function.? and what is its main purpose? I've seen answers here but those related to return entire function or objects but didn't find specific answer to return as a function. So please help me in it.
tagged with: javascript
has comment: http://stackoverflow.com/comment/44344142
has answer: http://stackoverflow.com/a/27975848
has comment: http://stackoverflow.com/comment/44344119
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/44344128
has comment: http://stackoverflow.com/comment/44344098
possible better answer: http://stackoverflow.com/a/27975903
type: AnsweredQuestion

http://stackoverflow.com/comment/44392567
score: 0
has text: @Mouser, I need to create a complete new html page, like mysite.com/DynamicName/1.html.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28001539

http://stackoverflow.com/comment/44403096
has text: @jfriend00 is there something else i could use to do this?
comment on: http://stackoverflow.com/q/28007098
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44577582
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/28099211
has text: You need to create a new request object for an other request. You should not call `send` multiple times on the same object.
type: Comment

http://stackoverflow.com/comment/44514620
has text: If you have the XML you can easily setup a site like that one. For example, try [Datatables](http://www.datatables.net/), I think it can do all the things you need.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28062997
type: Comment

http://stackoverflow.com/comment/44544101
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28081811
type: Comment
has text: it should be your model name

http://stackoverflow.com/a/27990530
type: Answer
has body: There are definitely work-arounds using pure CSS so that you don't have to use a SVG image, and I've put one together in this JSFiddle example. It is a fairly simple task, you just create the container for your image/text that you want to have the oval hover effect. In my example, I just used a p tag to hold everything together. Inside your container you need a wrapper for your image/text that you want to be displayed at all times (the span.text in my example) and the span.circle element that holds the oval effect. Using border-radius and transform I created the oval base look, and used a few box-shadow calls to give the oval the "3D bottom border" look. I used an extra shadow to give it a floating feeling as well. You arrange the text/image (span.text) and the oval (span.circle) inside of the container (.hover) by making the container and text/image position:relative; and the oval position:absolute;. To make sure the text/image overlays the oval, you need to give the text/image wrapper a z-index larger than the z-index of the oval. Lastly, you need to give the oval a bottom position to tell it to stick to the bottom of the container. The padding on the container allows you to use bottom: 0px; and not have the bottom of the oval flushed with the bottom of the text. However, which I'll go into next, you can use negative values for bottom which is exactly what I did to give it that "fade in/up" animation on hover. Now to get the nice animation on hover, all you need to use is the transition in CSS. Set the transition on the oval (span.circle), and make sure you either declare bottom and opacity as the transitions or the catch-all all so that they animate/transition when their value is changed. The opacity is default set to 0 so that it is hidden when the element is not being hovered. The last thing to do is to give the container (.hover) the :hover pseudo-class so that when you hover the text/image (span.text) the oval (span.circle) appears and does the nice transitio…
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27989938
answers question: http://stackoverflow.com/q/27989938

mongodb
tags question: http://stackoverflow.com/q/28042762
tags question: http://stackoverflow.com/q/27966565
tags question: http://stackoverflow.com/q/28116533
tags question: http://stackoverflow.com/q/28013570
tags question: http://stackoverflow.com/q/27996352
tags question: http://stackoverflow.com/q/27985421
tags question: http://stackoverflow.com/q/28032086
tags question: http://stackoverflow.com/q/27974188
tags question: http://stackoverflow.com/q/28026138
tags question: http://stackoverflow.com/q/27967973
tags question: http://stackoverflow.com/q/28105009
tags question: http://stackoverflow.com/q/28079407
tags question: http://stackoverflow.com/q/28051444
tag name: mongodb
tags question: http://stackoverflow.com/q/28107475
tags question: http://stackoverflow.com/q/28091155
tags question: http://stackoverflow.com/q/27994972
tags question: http://stackoverflow.com/q/28008731
tags question: http://stackoverflow.com/q/27983972
tags question: http://stackoverflow.com/q/28106985
tags question: http://stackoverflow.com/q/28049219
tags question: http://stackoverflow.com/q/28120864
tags question: http://stackoverflow.com/q/28053338
tags question: http://stackoverflow.com/q/28064159
type: Tag
tags question: http://stackoverflow.com/q/28069433
tags question: http://stackoverflow.com/q/27993410
tags question: http://stackoverflow.com/q/28054199
tags question: http://stackoverflow.com/q/28100958
tags question: http://stackoverflow.com/q/28087624
tags question: http://stackoverflow.com/q/28095920
tags question: http://stackoverflow.com/q/28101756
tags question: http://stackoverflow.com/q/28099560
tags question: http://stackoverflow.com/q/28033262
tags question: http://stackoverflow.com/q/28056242
tags question: http://stackoverflow.com/q/28005070
tags question: http://stackoverflow.com/q/28042257
tags question: http://stackoverflow.com/q/28027352
tags question: http://stackoverflow.com/q/28034845
tags question: http://stackoverflow.com/q/28101467
tags question: http://stackoverflow.com/q/28011016
tags question: http://stackoverflow.com/q/28035036
tags question: http://stackoverflow.com/q/27966977
tags question: http://stackoverflow.com/q/28077855
tags question: http://stackoverflow.com/q/28020439
tags question: http://stackoverflow.com/q/28000060
tags question: http://stackoverflow.com/q/27989654
tags question: http://stackoverflow.com/q/28080546
tags question: http://stackoverflow.com/q/27980896
tags question: http://stackoverflow.com/q/28050237

http://stackoverflow.com/q/28096171
accepted answer: http://stackoverflow.com/a/28100932
score: 0
answer count: 1
tagged with: google-closure
has title: Type annotation for converting nullability
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28100932
has body: I would like to have a function that can remove the nullability of a value (throwing an exception if the value is actually null), but I can't seem to get the type annotations correct. My first attempt was: /** * @param {?T} obj * @param {string} message * @return {!T} * @template T */ function checkNotNull(obj, message) { if (obj === null) { throw message; } else { return obj; } } This doesn't seem to work, though. If I use it like foo(checkNotNull(someVar)) (where foo() expects a non-nullable parameter), I still get the TYPE_MISMATCH error (basically saying that the parameter is still marked as nullable). Is there a way to actually do this? Or do I need to keep typing in the manual null-checks followed by explicit type hints?
type: Question
tagged with: google-closure-compiler
tagged with: javascript

http://stackoverflow.com/q/28065754
tagged with: http://stackoverflow.com/tag/q
has answer: http://stackoverflow.com/a/28065873
linked to: http://stackoverflow.com/q/18856341
score: 0
answer count: 2
has title: Notify promise angular remove callback
tagged with: angularjs
tagged with: angular-promise
accepted answer: http://stackoverflow.com/a/28065873
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28065828
has body: I would like to notify multiple controllers of external changes from a service. I know that i can do this by using a deferred object and calling notify on it and registering a callback on that. e.g // in service $timeout(function() { defered.notify('In progress')} , 0) //in controller var promise = myService.promise promise.then(function(success) { console.log("success"); }, function(error) { console.log("error"); }, function(update) { console.log("got an update!"); }) ; Is there a way to remove my notify callback when the controller is destroyed?
type: Question
possible better answer: http://stackoverflow.com/a/28065828
tagged with: javascript

http://stackoverflow.com/comment/44580653
type: AnswerComment
comment on: http://stackoverflow.com/a/28102522
has text: I think you should change the wording to: "... list of all replacement patterns, which your method has done a good job at escaping them"
type: Comment
score: 0

http://stackoverflow.com/q/28011215
has comment: http://stackoverflow.com/comment/44409869
has body: I want import elements dynamically with Polymer.import( elements, callback ). If elements is already imported, then callback never gets called, otherwise it is called when elements is loaded. The question is: is there a standart way to figure out if polymer element is loaded or not?
type: AnsweredQuestion
score: 3
type: Question
tagged with: polymer
has answer: http://stackoverflow.com/a/28019011
downvote count: 0
answer count: 1
has title: How to figure out wether polymer element is loaded or not?
tagged with: javascript
favorite count: 0
tagged with: web-component
accepted answer: http://stackoverflow.com/a/28019011
upvote count: 3

http://stackoverflow.com/comment/44449936
has text: @zazvorniki, updated it, should work. If not your option array is in a different format.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28032507
score: 0

http://stackoverflow.com/a/33250190
has body: when i set the url : &lt;a href="http://127.0.0.1:8080/download/1.txt"&gt;&lt;/a&gt; from a https request, it report error : Mixed Content: The page at 'https://127.0.0.1/index.html' was loaded over HTTPS, but requested an insecure resource 'http://127.0.0.1:8080/download/1.txt'. This request has been blocked; the content must be served over HTTPS. Failed to load resource: net::ERR_CACHE_MISS when i added the target="_blank" to the url: &lt;a target="_blank" href="http://127.0.0.1:8080/download/1.txt"&gt;, it works! , it works! it's well known that target="_blank" means opening the linked document in a new window or tab or a new request!
type: Answer
answers question: http://stackoverflow.com/q/27965975
score: 0

http://stackoverflow.com/a/28089843
has body: Use the BEM methodology for your CSS. Block-Element-Modifier has been the go-to solution in all my work, including the stylesheets of a company with $1B+ in revenue and some three hundred engineers. Under BEM you'll end up with: .site-search {} /* Block */ .site-search__field {} /* Element */ .site-search--full {} /* Modifier */ In this case, your comments section could become a .comment block, with some elements and modifiers to style things inside it.
answers question: http://stackoverflow.com/q/28089564
type: Answer
score: 0

http://stackoverflow.com/a/27991018
accepted answer of: http://stackoverflow.com/q/27990946
type: AcceptedAnswer
upvote count: 2
type: Answer
score: 2
has body: offset() is an object containing two properties, top and left. use offset().top to get the y position var headPos_x = $('.head').offset().left; var headPos_y = $('.head').offset().top; alert("x:" + headPos_x + ", y:" + headPos_y);
answers question: http://stackoverflow.com/q/27990946
downvote count: 0

http://stackoverflow.com/q/27997381
score: 0
tagged with: web-console
answer count: 1
has body: I have written a function like so: function wordSnatcher(element, startsWith) { var arrOfElem = document.getElementsByTagName(element); var nwArr = []; var tmp = ""; for (var i = 0; i &lt; arrOfElem.length; i++) { tmp = arrOfElem[i]; if (tmp.textContent.charAt(0).toLowerCase() == startsWith.toLowerCase() &amp;&amp; tmp.textContent.length &gt; 3) { nwArr.push(tmp.textContent); } } return nwArr.sort(); } How this function would be implemented would look like this: wordSnatcher('li', 'b'); The end result is an HTMLCollection of all words that start with the specified letter and reside in the specified element when executed in the console of a web browser. So far I've been storing the array in a variable like this: var b = wordSnatcher('li', 'b'); But this only gets me so far... I've been racking my brain trying to figure out how I can take this array and move it into an external JavaScript file. I can't copy it from the console using the clipboard, and I also can't seem to export it to a medium where I can grab it using the clipboard (like a .txt file) If you merely iterate over the array and log it to the console it seems to, for some reason, only print out a portion of the arrays values Besides that sort of defeats the purpose of what I'm trying to do because I want to keep it formatted as an array. If you would like to try it exactly as I am trying it, use this function in the console while on this page: http://www.scrabblefinder.com/starts-with/b/ Doing this yields an array of over 5000 words, which is not easily manageable
has comment: http://stackoverflow.com/comment/44384603
has comment: http://stackoverflow.com/comment/44385080
has answer: http://stackoverflow.com/a/27997600
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44385144
type: Question
has title: Exporting data from a web browsers console to either the clipboard or a text file
tagged with: arrays
has comment: http://stackoverflow.com/comment/44386041
tagged with: javascript

parse-platform
tags question: http://stackoverflow.com/q/27972893
tags question: http://stackoverflow.com/q/28089080
tags question: http://stackoverflow.com/q/27991615
tags question: http://stackoverflow.com/q/28084066
type: Tag
tags question: http://stackoverflow.com/q/28055432
tags question: http://stackoverflow.com/q/28052654
tags question: http://stackoverflow.com/q/28099051
tags question: http://stackoverflow.com/q/28116588
tags question: http://stackoverflow.com/q/27977357
tags question: http://stackoverflow.com/q/28036521
tags question: http://stackoverflow.com/q/28058127
tags question: http://stackoverflow.com/q/27967799
tags question: http://stackoverflow.com/q/28032995
tags question: http://stackoverflow.com/q/28005281
tags question: http://stackoverflow.com/q/27970857
tags question: http://stackoverflow.com/q/28110103
tags question: http://stackoverflow.com/q/27995797
tags question: http://stackoverflow.com/q/28077989
tags question: http://stackoverflow.com/q/28077583
tags question: http://stackoverflow.com/q/28031309
tags question: http://stackoverflow.com/q/28082786
tag name: parse-platform
tags question: http://stackoverflow.com/q/28041977
tags question: http://stackoverflow.com/q/28097144

http://stackoverflow.com/a/69131980
has comment: http://stackoverflow.com/comment/122659848
score: 2
upvote count: 2
has body: The key difference between props and state is that state is internal and controlled by the component itself while props are external and controlled by whatever renders the component.
downvote count: 0
answers question: http://stackoverflow.com/q/27991366
type: Answer

http://stackoverflow.com/q/28107757
tagged with: javascript
score: 4
has body: I want my div (with style="display: none; position: absolute" by default, it's only visible when a cell is clicked) to appear in 30px left from the clicked cell in a table. addevent stands for my div which I want to put 30px left from the cell. So, I want my div to appear 30px left from the clicked cell's left. What am I doing wrong? var cell = document.getElementsByTagName('td'); for (var i=0; i&lt;cell.length; i++) { cell[i].onclick = function() { var data = this.getAttribute('data-cell'); editEvent = document.getElementById('addevent'); editEvent.style.cssText ='display: block;'; this.style.position = 'relative'; var rect = this.getBoundingClientRect(); editEvent.style.left = rect.left + 30; editEvent.getElementsByTagName('input')[3].value = data; };
favorite count: 0
accepted answer: http://stackoverflow.com/a/28108060
has comment: http://stackoverflow.com/comment/44590074
has comment: http://stackoverflow.com/comment/45802402
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44590071
has comment: http://stackoverflow.com/comment/44589974
type: Question
upvote count: 4
tagged with: html-table
has answer: http://stackoverflow.com/a/28108060
has title: Javascript / Positioning an element according to another element's position
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/44711356
has text: But I need to hide that URL just until user credentials are verified. When he's logged in and app opens, then of course URL can be seen, but I want to hide apps URL for users that are not logged in yet. Isn't that possible at all? Networking guys said that it can be somehow done by reverse proxy, but I don't fully understand how.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28112191

http://stackoverflow.com/q/27990382
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/44403361
has answer: http://stackoverflow.com/a/28378958
has comment: http://stackoverflow.com/comment/44385777
accepted answer: http://stackoverflow.com/a/28378958
tagged with: google-closure-compiler
answer count: 1
downvote count: 0
tagged with: javascript
has title: How to annotate in javascript a class that extends a generic type, using closure compiler
tagged with: generics
favorite count: 0
tagged with: extends
upvote count: 3
tagged with: annotations
has body: I created a Class factory in javascript that takes type T and generates a new enhanced class of type T, simple. I'm using google's closure compiler to compile javascript, and closure's annotation to annotate Types etc. The challenge is how to annotate a Class that extends type T, where T is a generic type. Here is a simplified Class Enhanced that extends another type: /** * @constructor */ function Foo(){ this.x = 'x'; }; /** * @constructor */ function Bar(){ this.y = 'y'; }; /** * @constructor * @param {function(new:T)} FooOrBar * @extends {T} * @template T */ function Enhanced(FooOrBar){ FooOrBar.call(this); this.z = 'z'; }; /** @type Enhanced.&lt;Foo&gt; */ var enhancedFoo = new Enhanced(Foo); /** @type Enhanced.&lt;Bar&gt; */ var enhancedBar = new Enhanced(Bar); when I compile this code with the closure compiler I get a compiler warning: 'Could not resolve type in @extends tag of Enhanced'. So, obviously the compiler does not know from where to infer T when this class is compiled. Can someone please point out why the compiler can't infer the type when the class is created, or if there is a way to annotate a generated class as extending type T.
type: Question

http://stackoverflow.com/comment/44609523
type: Comment
comment on: http://stackoverflow.com/q/28117631
score: 0
type: QuestionComment
has text: Hi guys, thanks for the help. I've tried angular and the same error... See above code

http://stackoverflow.com/comment/44591442
has text: Thanks for the input - let me know if there is a better way!
comment on: http://stackoverflow.com/a/28055131
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44355852
score: 0
comment on: http://stackoverflow.com/q/27982300
has text: post your code please. also, note that z-index only works for elements with a set positioning
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28005090
has comment: http://stackoverflow.com/comment/44448605
has comment: http://stackoverflow.com/comment/44448512
has body: It's working if you change 'bgcolorli st.length' to 'bgcolorlist.length'. But.. Why do you want to do this using JavaScript? You can also do this with WordPress functions (or just plain php if you want) like get_posts(). It allows you to set a paramater called 'orderby' to 'rand' (which stands for random ;)
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28003538
has comment: http://stackoverflow.com/comment/44460790
has comment: http://stackoverflow.com/comment/44459168

http://stackoverflow.com/a/28170307
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28046360
has body: Hi I just wanted to say that I found another way to do display what key that was pressed, if anyone else is interested. Javascript: document.onkeypress = function(e) { e = e || window.event; var charCode = e.charCode || e.keyCode, character = String.fromCharCode(charCode); console.log(charCode); if(e.charCode == 98 || e.keyCode == 98) { document.write("B = " + charCode + "&lt;br&gt;"); } else if(e.charcode == 114 || e.keyCode == 114) { document.write("R = " + charCode + "&lt;br&gt;"); } }; So when you press B or R it displays the keyCode or charCode and it works in Chrome, Explorer and in Firefox (but it's a little slow in firefox, but it works).

http://stackoverflow.com/comment/44597388
has text: You need to check the CSS for the Twitter-feed-script. OR put a link here to the website so we can check.
comment on: http://stackoverflow.com/a/28111765
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/q/28077917
has comment: http://stackoverflow.com/comment/46554312
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/49947175
favorite count: 0
has title: Polymer.js <core-animation> causes Chrome crash
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/49943174
answer count: 0
upvote count: 3
type: UnansweredQuestion
tagged with: animation
tagged with: polymer
has body: I'm working with Polymer.js and trying to create an animation using Javascript, I've been racking my brain because I can't seem to get the animation to work. I'm using (from my Bower.json): "core-elements": "Polymer/core-elements#^0.5.1", "paper-elements": "Polymer/paper-elements#^0.5.1", "polymer": "Polymer/polymer#^0.5.1" I created a JSFiddle to show a simple example, interestingly it does not crash Firefox however the animation also does not work in Firefox. Here is the relevant portion of the Javascript where I try to begin the animation: function startAnimation(template, document) { var animationTarget = template.content.querySelector('#animationTarget'); var animation = new CoreAnimation(); animation.duration = '1500'; animation.iterations = 'Infinity'; animation.keyframes = [{ 'opacity': 1 }, { 'opacity': 0 }]; animation.target = animationTarget; //animation.play(); // Uncommenting crashes my Chrome 39.0.2171.99 (64-bit) tab } I might be interacting with templates in Polymer incorrectly, any suggestions appreciated.
score: 3

twirl
type: Tag
tags question: http://stackoverflow.com/q/28025606
tag name: twirl

http://stackoverflow.com/comment/44537699
type: Comment
type: QuestionComment
has text: Thanks, This looks about right, I will have a play. thank you.
comment on: http://stackoverflow.com/q/28017762
score: 0

http://stackoverflow.com/comment/44557319
type: Comment
comment on: http://stackoverflow.com/a/28089573
score: 0
type: AnswerComment
has text: It is usually better to use an array literal instead of `new Array`, [`new Array` can cause problems](http://jslinterrors.com/the-array-literal-notation-is-preferrable). I would have used `multiDimArray.push([element.lat + ', ' + element.lng, element.yid]);`

http://stackoverflow.com/comment/44399874
type: QuestionComment
type: Comment
score: 2
comment on: http://stackoverflow.com/q/28005749
has text: Can't reproduce: http://jsfiddle.net/ark9fjxs/ (You're not expecting to see the placeholder value, are you?)

http://stackoverflow.com/comment/44511269
score: 1
type: QuestionComment
type: Comment
has text: Your calling `wbst.init()` before you have defined it, hence `undefined`. Try calling it after you have defined it :D
comment on: http://stackoverflow.com/q/28049978

http://stackoverflow.com/q/28042719
type: Question
has title: contextMenu onclick event not firing
tagged with: javascript
has comment: http://stackoverflow.com/comment/44468841
tagged with: google-chrome-extension
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44468589
has body: -- SOLVED [see comments section] -- I'm having an issue with contextMenu onclick event. When i try to create the menu dynamically from JSON that I request from an external API. The onclick event doesn't fire only after I reload the extension and has the contextMenu already created. var data = firstext.db.getJSON("list"); for ( list in data ) { chrome.contextMenus.create({"title": list.name, "contexts": ["all"], "onclick": function(data) { console.log('clicked: ' + list.id);}}); } Manifest: { "version": "0.1.3", "manifest_version": 2, "default_locale": "en", "name": "__MSG_appName__", "description": "__MSG_appDesc__", "icons" : { "16" : "assets/images/on16.png", "24" : "assets/images/on24.png", "48" : "assets/images/on48.png", "128" : "assets/images/on.png" }, "browser_action" : { "default_popup" : "popup.html", "default_icon" : "assets/images/off24.png" }, "background": { "scripts": ["assets/js/library.js", "assets/js/background.js"] }, "permissions": [ "contextMenus", "tabs", "storage", "unlimitedStorage", "webRequest", "webRequestBlocking", "&lt;all_urls&gt;" ]}
has comment: http://stackoverflow.com/comment/44468615
has comment: http://stackoverflow.com/comment/44470571
has comment: http://stackoverflow.com/comment/44468404
has comment: http://stackoverflow.com/comment/44468680
score: 0
has comment: http://stackoverflow.com/comment/44468877
tagged with: google-chrome
linked to: http://stackoverflow.com/q/24711990
has comment: http://stackoverflow.com/comment/44469219

image
tags question: http://stackoverflow.com/q/28085030
tags question: http://stackoverflow.com/q/28042535
tags question: http://stackoverflow.com/q/28018173
tags question: http://stackoverflow.com/q/28028767
tags question: http://stackoverflow.com/q/28060086
tags question: http://stackoverflow.com/q/28056812
tags question: http://stackoverflow.com/q/27982709
tags question: http://stackoverflow.com/q/28024600
tags question: http://stackoverflow.com/q/28102361
tags question: http://stackoverflow.com/q/28093591
tags question: http://stackoverflow.com/q/28054805
tags question: http://stackoverflow.com/q/28075752
tags question: http://stackoverflow.com/q/28017195
tags question: http://stackoverflow.com/q/27976401
tags question: http://stackoverflow.com/q/27985805
tags question: http://stackoverflow.com/q/28028599
tags question: http://stackoverflow.com/q/28010404
tags question: http://stackoverflow.com/q/28019082
tags question: http://stackoverflow.com/q/28094470
tags question: http://stackoverflow.com/q/28066373
tags question: http://stackoverflow.com/q/28089416
tag name: image
tags question: http://stackoverflow.com/q/28098299
tags question: http://stackoverflow.com/q/28055331
tags question: http://stackoverflow.com/q/28082878
tags question: http://stackoverflow.com/q/28059473
type: Tag
tags question: http://stackoverflow.com/q/28015630
tags question: http://stackoverflow.com/q/28110677
tags question: http://stackoverflow.com/q/27994232

http://stackoverflow.com/comment/44414175
type: Comment
score: 1
has text: Yes. The expression is little bit weird. In this case if-else should be better. But I usually do not agree with JSLint since it make your code only Crockford will like. =)
comment on: http://stackoverflow.com/a/28013386
type: AnswerComment

http://stackoverflow.com/q/27990020
has answer: http://stackoverflow.com/a/27991783
has answer: http://stackoverflow.com/a/27991802
type: Question
answer count: 2
has title: Plotting 2 graphs together in Rickshaw
tagged with: javascript
has body: Is there a way to plot 2 graphs together with different Y axes? I have some data (page views, stacked area by referrer) which I'd like to plot with an overlayed line graph of number of actions over time. I already have both graphs separately, but just wondering if there's a way to combine them into 1.
score: 0
tagged with: d3.js
type: UnansweredQuestion
tagged with: rickshaw

http://stackoverflow.com/a/27995990
has comment: http://stackoverflow.com/comment/44382541
has comment: http://stackoverflow.com/comment/44382723
has comment: http://stackoverflow.com/comment/44382591
upvote count: 1
has comment: http://stackoverflow.com/comment/44382590
answers question: http://stackoverflow.com/q/27995952
score: 1
has comment: http://stackoverflow.com/comment/44382572
has comment: http://stackoverflow.com/comment/44382489
has comment: http://stackoverflow.com/comment/44382728
has comment: http://stackoverflow.com/comment/44382353
accepted answer of: http://stackoverflow.com/q/27995952
type: AcceptedAnswer
downvote count: 0
has body: $.ajax({ type: 'GET', url: '../include/country.php', dataType : "json", data: { id: id }, success: function(data) { for(var i = 0; i &lt; data.length; i++) { console.log("PAIR " + i + ": " + data[i].sysid); console.log("PAIR " + i + ": " + data[i].name); } } });
type: Answer
has comment: http://stackoverflow.com/comment/44382701
has comment: http://stackoverflow.com/comment/44382601

http://stackoverflow.com/a/28050224
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/28049961
score: 2
upvote count: 2
has body: The error is being cause because key1 is undefined as a variable. There are actually several different ways you could do this, including manually setting the keys. var keys = [0,0,0,0...] instead of typing all this out however if your keys have a default value you could always initialize the array with a push command var keys = []; for (int i= 0; i&lt;36;i++){ keys.push({defaultValue}); } that will make all the elements in you array defined with a default value rather than as an undefined element

http://stackoverflow.com/comment/44504966
comment on: http://stackoverflow.com/q/28061992
score: 2
has text: And what is the question?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44449361
type: Comment
has text: Anything named `knob.js` *should* be abandoned !
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/28032269

http://stackoverflow.com/comment/44521338
type: Comment
has text: You're welcome! The 300.5 is just so the problem would occur so I could test if it was cured by fRect ;-) I use parseInt (as opposed to rounding) so all the adjustment will be pulled to the left. This gives the best shot at perfect alignment. But alignment will not always be perfect. One final addition might be a method that first fills a rect and then also strokes that same rect. In this case the fill would be let to bleed by 0.50 pixel on all 4 sides. The immediate stroke would overwrite any bleed. That allows for a perfectly filled+stroked rect. Good luck with your project!
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/28061572

http://stackoverflow.com/a/27980722
has comment: http://stackoverflow.com/comment/44354724
has comment: http://stackoverflow.com/comment/44354740
has body: jQuery(document).ready(function(j) { var frifragt = jQuery('.frifragt'); var priceInCart = jQuery('.priceInCart'); var diff = Number(frifragt.text()) - Number(priceInCart.text()); jQuery('.l-shopgetmore').html('K&amp;oslash;b for yderligere DKK ' + diff.toFixed(2) + ' og f&amp;aring; fragtfri levering.'); jQuery('.l-shopgetmore').hide(); setInterval(function(){ if(jQuery('.priceInCart').text() &gt; 0 || jQuery('.priceInCart').text() &lt; 1000) jQuery('.l-shopgetmore').show(); else jQuery('.l-shopgetmore').hide(); }, '600'); });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27980420
score: 0
answers question: http://stackoverflow.com/q/27980420
has comment: http://stackoverflow.com/comment/44354183
type: Answer
has comment: http://stackoverflow.com/comment/44406588

http://stackoverflow.com/a/28093857
has body: It seems I was calling setDataSource too soon after creating the Kendo Scheduler. I used a setTimeout() with 100ms and everything works perfectly. Big of an ugly hack. Still interested to know if there is a more elegant solution.
score: 0
answers question: http://stackoverflow.com/q/28093073
type: Answer

http://stackoverflow.com/q/28009610
tagged with: foreach
type: AnsweredQuestion
has body: I have a webpage that displays graphs using Google Charts. I've created multiple DataTables as below : var rttldata1 = new google.visualization.DataTable(); var rttldata2 = new google.visualization.DataTable(); var rttldata3 = new google.visualization.DataTable(); ... var rttldata10 = new google.visualization.DataTable(); At a certain point, I want to do something to all of these tables with javascript. Something like for each (datatable){ do something } Can some one point me in the right direction please?
type: Question
answer count: 2
tagged with: google-datatable
has answer: http://stackoverflow.com/a/28010819
tagged with: javascript
has title: iterate through all datatable objects in a page?
score: 0
accepted answer: http://stackoverflow.com/a/28010819
possible better answer: http://stackoverflow.com/a/28009762
has answer: http://stackoverflow.com/a/28009762

http://stackoverflow.com/comment/44497044
type: QuestionComment
score: 0
has text: nvm, I saw it, my mistake :)
comment on: http://stackoverflow.com/q/28057579
type: Comment

http://stackoverflow.com/comment/44606171
has text: It should be related to the arguments you are passing with the request. Check the description for the errors in this page: https://cloud.google.com/storage/docs/json_api/v1/status-codes. Also you can refer to this page for reference to do the get request for Google Activities API: https://developers.google.com/google-apps/activity/v1/reference/activities/list. Hope that helps!
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28111229

http://stackoverflow.com/q/28109715
tagged with: checkbox
tagged with: select
has answer: http://stackoverflow.com/a/28110305
answer count: 5
has answer: http://stackoverflow.com/a/28109959
has title: How to send the selected options from a multiselect to a load ajax call
has answer: http://stackoverflow.com/a/28109957
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28110436
has body: I got the nice plugin from the eric hanes ...from this site : http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ I want the values get alert from the selected check box from the select options ... jQuery MultiSelect Widget Demo Option 1 Option 2 Option 3 Option 4 Option 5 Option 6 Option 7 Option 8 Option 9 Option 10 Option 11 Option 12 click For eg : if I select option 1 and option 2, I should get alert of option 1 and again second alert option 2.. One more help ...Now this values has to pass to the ajax call and there the ajax variables has to be dynamic... I am using the load() ajax function .. $("#fetch").load("select.php",{var1:var1,var2:var2......},function(){}); here how to pass the check box variables dynamically in the ajax call. <?php $var1= $_POST['var1']; $var2 = $_POST['var2']; . . . echo $var1; echo $var2; ?>
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
has answer: http://stackoverflow.com/a/28110133

http://stackoverflow.com/a/28027996
answers question: http://stackoverflow.com/q/27992890
score: 0
has body: Here is my updated coded that I got to work.. I made some customizations to the markers, but this works now. As mentioned in the comments, I believe the issue had to do with the variables set for infowindow. I changed the geolocation one to 'infowindowLocation' instead and adjusted in the error flags section. var map; var infowindow; var service; function initialize() { map = new google.maps.Map(document.getElementById('map-canvas'), { zoom: 13, mapTypeControl: false, panControl: true, panControlOptions: { position: google.maps.ControlPosition.TOP_RIGHT }, zoomControl: true, zoomControlOptions: { position: google.maps.ControlPosition.RIGHT_CENTER }, scaleControl: true, streetViewControl: false }); // Start Geolocation if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var infowindowLocation = new google.maps.InfoWindow({ map: map, position: pos, content: 'Found You!' }); var request = { location: pos, radius: 3218.69, types: ['dentist'] }; infowindow = new google.maps.InfoWindow(); service = new google.maps.places.PlacesService(map); service.nearbySearch(request, callback); map.setCenter(pos); }, function() { handleNoGeolocation(true); }); } else { // Browser doesn't support Geolocation handleNoGeolocation(false); } } // Callback for Places function callback(results, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { for (var i = 0; i &lt; results.length; i++) { var place = results[i]; createMarker(results[i]); } } } // Create Marker for Places function createMarker(place) { var placeLoc = place.geometry.location; var image = 'img/flag.png'; var marker = new google.maps.Marker({ map: map, position: place.geometry.location, title: place.name, animation: google.maps.Animation.DROP, icon: image }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(place.name); infowindow.open(map,marker); }); } /…
type: Answer

http://stackoverflow.com/comment/44467558
has text: ($(window).scrollTop() < ($(window).height() - 1000) )
comment on: http://stackoverflow.com/q/28041998
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28069926
tagged with: javascript
has body: Cache all requests from an app without explicitly specifying urlsToCache. So I will cache stuff under fetch event. To respond to requests from the cache. Update the cache when fetch is success. Initially, this.addEventListener('fetch', function(event) { var fetchReq = event.request.clone(), cacheReq = event.request.clone(); event.respondWith(fetch(fetchReq).then(function(response) { var resp = response.clone(); caches.open(CACHE_NAME).then(function(cache) { req = event.request.clone(); cache.put(req, resp); }); return response; }).catch(function() { return caches.match(cacheReq); })); }); The offline situations were handled perfectly well. But the problem here was with the slow connections. The user has to wait till fetch times out or throws an error to get the response from cache. self.addEventListener('fetch', function(event) { var cacheRequest = event.request.clone(); event.respondWith(caches.match(cacheRequest).then(function(response) { if(response) return response; var fetchRequest = event.request.clone(); return fetch(fetchRequest).then(function(response) { var responseToCache = response.clone(); caches.open(cache_name).then(function(cache) { var cacheSaveRequest = event.request.clone(); cache.put(cacheSaveRequest, responseToCache); }); return response; }); })); }); With the cache taking precedence, the responses served were fine. But the problem here is that when the code updates. When /public/main.css served via sw is updated, on page reload only the cache is served, the updated content is not served. I also tried modifying the cache_name to cache-v2 from cache-v1 (so that sw binary diff exists and sw is updated and that old cache can be cleared), and cleared cache-v1 on activate event. But it gave rise to new problems where two service workers were running at the same time under the same Registration ID. More on this is in this other SO question: How to stop older service workers?
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28077702
has title: How and When should we write to cache in Service Workers?
favorite count: 0
type: Question
tagged with: service-worker
accepted answer: http://stackoverflow.com/a/28077702
upvote count: 3
has comment: http://stackoverflow.com/comment/84717658
linked to: http://stackoverflow.com/q/28069249
answer count: 1
tagged with: caching
downvote count: 1

http://stackoverflow.com/comment/44417259
score: 0
comment on: http://stackoverflow.com/q/28005503
type: Comment
type: QuestionComment
has text: When you say _I am sticking to the first option_ I assume you mean having multiple views. Ajax calls don't make a lot of sense because ajax calls stay on the same page. If you have each step in a different page, then you an approach similar to the link I gave in my second comment.

http://stackoverflow.com/comment/44537067
comment on: http://stackoverflow.com/q/28055432
score: 0
type: QuestionComment
type: Comment
has text: would love to get your opinion here since you have experience with this: http://stackoverflow.com/questions/28079184/the-verification-procedure-and-making-new-users-logic-parse-com @LyndseyScott

http://stackoverflow.com/comment/44586649
has text: *"But when the user clicking on the other radio buttons, after clicking the above radio button (its id is rd_other) the text-box is not disabling."* Well...why would it? You haven't hooked up any event handler on the other ones.
type: Comment
comment on: http://stackoverflow.com/q/28106017
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44444378
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28029352
has text: ahh ofc, every property (the functions as well) are properties of the `$scope` object, then its just pure JS that `this` points on the current `$scope` inside the service function as well.
score: 0

http://stackoverflow.com/q/28092883
linked to: http://stackoverflow.com/q/28562007
has comment: http://stackoverflow.com/comment/44607494
has body: Note: i searched a half hour. I need a special solution for this: I have the folowing code already (node some Variables have german Names i hope that's ok) function generateList () { document.getElementById("liste").innerHTML ="" var listEasy = vorNameListe[i] + " " + nachNameListe[i] + " " + alterListe[i] for (var i=0; i &lt; vorNameListe.length; i++) { document.getElementById("liste").innerHTML += "&lt;li&gt;" + listEasy + "&lt;/li&gt;" }; Now i need a javascript (pls no jquery) solution so the user can change every List entry by himself. How do i do that? further explanation: The code i have is one to bring a "li" in a existing "ul" with every loop. But then i want to give every "li entry" the ability to be changed by the user.
has title: Edit HTML list entry with javascript
has answer: http://stackoverflow.com/a/28108141
tagged with: edit
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28093013
type: Question
has answer: http://stackoverflow.com/a/28093013
answer count: 2
has comment: http://stackoverflow.com/comment/44665387
accepted answer: http://stackoverflow.com/a/28108141
has comment: http://stackoverflow.com/comment/44562083
tagged with: javascript
has comment: http://stackoverflow.com/comment/44588042
has comment: http://stackoverflow.com/comment/44587557
tagged with: html-lists
score: 0
has comment: http://stackoverflow.com/comment/44587632
has comment: http://stackoverflow.com/comment/44586790

http://stackoverflow.com/comment/44533011
has text: A demo might help. Also curious why traditional iFrame methods can't be used
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28076755
score: 1

http://stackoverflow.com/q/28115853
has comment: http://stackoverflow.com/comment/44606054
type: Question
has answer: http://stackoverflow.com/a/28116079
has body: When I execute the below code in the console I am getting as: 1,4, undefined 3,2. I would like to know why its not executing as 1,3,4 and 2 since in setTimeout(function(){console.log(3)}, 0); the milliseconds param is 0. (function() { console.log(1); setTimeout(function(){console.log(2)}, 1000); setTimeout(function(){console.log(3)}, 0); console.log(4); })();
has title: setTimeout(function(){console.log(3)}, 0); it has value 0
has comment: http://stackoverflow.com/comment/44607805
has comment: http://stackoverflow.com/comment/44608561
score: 7
has comment: http://stackoverflow.com/comment/44608487
has comment: http://stackoverflow.com/comment/44608263
has comment: http://stackoverflow.com/comment/44608054
linked to: http://stackoverflow.com/q/779379
answer count: 3
has comment: http://stackoverflow.com/comment/44606161
linked to: http://stackoverflow.com/q/24975899
tagged with: function
tagged with: javascript
favorite count: 0
upvote count: 8
has comment: http://stackoverflow.com/comment/44606817
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28116039
has comment: http://stackoverflow.com/comment/44607762
duplicate of: http://stackoverflow.com/q/779379
has answer: http://stackoverflow.com/a/28116045
has comment: http://stackoverflow.com/comment/44607991
has comment: http://stackoverflow.com/comment/44608355
has comment: http://stackoverflow.com/comment/44608199
downvote count: 1

http://stackoverflow.com/q/28030374
has title: Sorting JSON with Javascript
tagged with: arrays
tagged with: javascript
tagged with: sorting
has answer: http://stackoverflow.com/a/28030414
score: 0
has comment: http://stackoverflow.com/comment/44445663
answer count: 1
accepted answer: http://stackoverflow.com/a/28030414
has comment: http://stackoverflow.com/comment/44445959
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I currently have an array that has ~2000 arrays within. Within those secondary arrays, there is a "point" output. I would like to sort the initial array by point value (highest to lowest). here's an example of the JSON (this include the array with only three arrays, keep in mind the production array has 2000 items) [ [ 'Tony Parker', 'Greivis Vasquez', 'Manu Ginobili', 'Tyreke Evans', 23400, 98.25 ], [ 'Tony Parker', 'Greivis Vasquez', 'Manu Ginobili', 'Eric Gordon', 20500, 86.87 ], [ 'Tony Parker', 'Greivis Vasquez', 'Manu Ginobili', 'DeMar DeRozan', 23200, 97.97 ], ] The point value is the equivalent of data[0][5], data[1][5].... data[2000][5]. While I know there is a sort function within Javascript, I'm not clear as to how to use the sort function for items based within a secondary array, then to compare to other point values in secondary arrays. Thoughts?
type: Question

http://stackoverflow.com/comment/44460989
has text: This looks like it's pseudocode: you're probably meant to write the real code as part of the tutorial.
type: QuestionComment
type: Comment
score: 3
comment on: http://stackoverflow.com/q/28038408

web-services
type: Tag
tags question: http://stackoverflow.com/q/28076833
tag name: web-services
tags question: http://stackoverflow.com/q/28014717
tags question: http://stackoverflow.com/q/28045499

http://stackoverflow.com/comment/44511266
comment on: http://stackoverflow.com/q/28058127
score: 0
type: Comment
type: QuestionComment
has text: X should be a string but you've written it as a variable

file-upload
tags question: http://stackoverflow.com/q/28073659
tags question: http://stackoverflow.com/q/27975945
tags question: http://stackoverflow.com/q/28048704
tags question: http://stackoverflow.com/q/28002620
type: Tag
tags question: http://stackoverflow.com/q/27969015
tags question: http://stackoverflow.com/q/28103078
tag name: file-upload
tags question: http://stackoverflow.com/q/28104012
tags question: http://stackoverflow.com/q/28099560
tags question: http://stackoverflow.com/q/27980428
tags question: http://stackoverflow.com/q/27991890
tags question: http://stackoverflow.com/q/28108044

web-console
tag name: web-console
type: Tag
tags question: http://stackoverflow.com/q/27997381

http://stackoverflow.com/comment/44402738
type: AnswerComment
comment on: http://stackoverflow.com/a/28004833
type: Comment
has text: @mscdex So if I understood correctly now that I'm using a callback in `form.parse()` I'm saving the file on disk, right? And although my code works since data will be saved on the hard disk on the server and file.path is valid in my example code, this is not a recommended way and I should avoid saving the file on Hard Disk, right?
score: 0

http://stackoverflow.com/comment/44541301
score: 3
has text: It's not worth it for the simple reason that IE8 users aren't used to seeing rounded corners these days anyway since it isn't supported. People stopped using plugins for it a long time ago.
comment on: http://stackoverflow.com/q/28081357
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44538874
comment on: http://stackoverflow.com/q/28079970
score: 0
type: Comment
has text: Set your list's css to vertical-align: top
type: QuestionComment

http://stackoverflow.com/q/28085912
tagged with: css
has body: I'm building a jQuery function to change the colour of the link of my navigation bar. I want to identify the data attribute of a link in the navigation bar and compare it to the current title of the page. I then want to see if the current page title contains the anchor tags data attribute and if so addClass("active"); if the result is true. A key requirement is it to not match case as well. Here is my corresponding html and javascript Home About us Our boats Product list Recipes Contact us And the javascript currently is var current_title = (document).attr("title"); $("a[name=link]").each(function () { var a = $("a[name=link]").attr("data-index"); //returns true or false... var exists = current_title.test(a); if(exists) { $(a).addClass("active"); } else { //false statement..do whatever } }); Can someone help me along? I have a CSS style for an active link which will be different to usual nav items hence giving the impression its the 'active' page on the site.
type: Question
has answer: http://stackoverflow.com/a/28086022
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/28086470
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28086598
type: UnansweredQuestion
has title: Check page title is contained within link attribute and assign active class using jQuery

http://stackoverflow.com/comment/44515944
has text: @dcorking you are correct, my mistake - it is not exactly same. removed vote to close with [JavaScript 'hoisting'](http://stackoverflow.com/questions/15311158/javascript-hoisting).
score: 0
comment on: http://stackoverflow.com/q/28060101
type: QuestionComment
type: Comment

http://stackoverflow.com/q/28023091
score: 0
answer count: 1
tagged with: templates
tagged with: meteor
has body: In navbar I have 2 dropdowns, and one of them is available only if user is logged in (otherwise I hide it with {{#if currentUser}}). For a dropdown to work it should be activated with jquery like this: $('.somedropdown').dropdown();. In meteor: Template.navbar.rendered = function () { this.$('.somedropdown') .dropdown(); }; In my case I assigned these classes to dropdowns: .guest(for dropdown that is available all the time) and .useronly(for that which is available only if user is signed in). And thus I try to do re-rendering of navbar adding this.autorun to rendered callback. It checks if user is logged in and should trigger re-rendering accordingly: Template.navbar.rendered = function () { this.$('.guest').dropdown(); this.autorun(function() { if(Meteor.userId()) { $('.useronly').dropdown(); } }); }; But it does not work. When I first load webpage navbar renders OK without the .useronly dropdown. When I sign in the .useronly dropdown appears but it is not activated via jquery. If I then run activation code $('.useronly').dropdown(); in console - the dropdown starts to work. It means the problem is not with jquery code. Meteor.userId() is reactive so I don't get it why this.autorun does not thigger re-rendering. PS If it is important to mention, I use Semantic UI dropdown module http://semantic-ui.com/modules/dropdown.html (this is where jquery activation code comes from). PPS there are already similar questions on stackoverflow but I did not find any appropriate solution from the answers. Thank you for any help in advance. SOLUTION By adding console.logs into the code mentioned above I found that autorun actually worked but the jquery code ran before dropdown was actually rendered. So I wrapped autorun function into Meteor.setTimeout(): Template.header.rendered = function () { // activate always available .guest dropdown this.$('.guest') .dropdown(); // activate .useronly dropdown if user is logged in this.autorun(function() { if(Meteor.userId()) { Meteor.setTimeo…
has title: Re-render template on login
has answer: http://stackoverflow.com/a/28026694
type: AnsweredQuestion
tagged with: rendering
has comment: http://stackoverflow.com/comment/44443342
has comment: http://stackoverflow.com/comment/44439954
accepted answer: http://stackoverflow.com/a/28026694
type: Question
has comment: http://stackoverflow.com/comment/44435657
has comment: http://stackoverflow.com/comment/44439804
tagged with: javascript
has comment: http://stackoverflow.com/comment/44438987
tagged with: jquery

http://stackoverflow.com/comment/44560184
type: Comment
comment on: http://stackoverflow.com/a/28091468
score: 0
type: AnswerComment
has text: Well, it's more of an answer now, I can accept that, but I don't think this is the particular issue the asker is facing :P

http://stackoverflow.com/comment/44477534
score: 0
type: Comment
has text: @Quentin, I understand completely. I was simply trying to reinforce Daan's point. I also didn't know that using phantomJS would have the same footprint as running a browser. I guess I'll take your word for it. Cheers.
comment on: http://stackoverflow.com/a/28047328
type: AnswerComment

header
type: Tag
tags question: http://stackoverflow.com/q/27967446
tag name: header

http://stackoverflow.com/comment/44543845
comment on: http://stackoverflow.com/q/28082908
score: 4
has text: How about some `for` and `if`?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28116055
score: 0
has body: you might need quotes in formData '"' + $('#formName').val() + '"'
type: Answer
answers question: http://stackoverflow.com/q/28115187

http://stackoverflow.com/comment/44344351
type: QuestionComment
has text: I prefer regular buttons and not radio buttons
comment on: http://stackoverflow.com/q/27975829
score: 0
type: Comment

http://stackoverflow.com/comment/44386413
has text: hi Right now i have 2 slperate buttons: this one wich calls showhide() Click Me and this one wich calls bodyresize in the init.js Click Me test but i cant get that in one button that is what i need
comment on: http://stackoverflow.com/a/27997993
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27970334
answer count: 2
has comment: http://stackoverflow.com/comment/44334601
possible better answer: http://stackoverflow.com/a/27970429
has answer: http://stackoverflow.com/a/27971041
has comment: http://stackoverflow.com/comment/44334407
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/27970429
upvote count: 2
score: -3
has comment: http://stackoverflow.com/comment/44334959
type: AnsweredQuestion
type: Question
has body: I am new to JavaScript.Could anybody suggest me how to change the text of label in below code abc xyz I want to change text 'abc' and text 'xyz' to other values. My approch to change text 'abc' to 'tvr'. I've tried: $($(".col-sm-6").children()[0]).children().text("tvr"); then it also removes input field.whats wrong in my approach or please suggest some other approach.
has comment: http://stackoverflow.com/comment/44333425
accepted answer: http://stackoverflow.com/a/27971041
has title: How to edit the text of label
downvote count: 5
tagged with: javascript

http://stackoverflow.com/comment/44374405
has text: nah, what you have is alright. there was one weird thing. we use the deferred pattern so the .then in the provider eventually invokes a .then in the directive via resolve. however, using .finally(), the order would be provider's then, provider's finally, directive's then - so, by the time the directive's then() went, _dfd was cleared and it blew up. so, we just unset _dfd in the provider, but after we resolve. i imagine there's a better way but this is just for a POC.
type: Comment
comment on: http://stackoverflow.com/a/27973589
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44391842
type: Comment
comment on: http://stackoverflow.com/a/27989334
score: 0
has text: Nice suggestion. I will be looking into that!
type: AnswerComment

http://stackoverflow.com/comment/44504601
type: Comment
score: 1
has text: Why are you using `onclick` instead of `href`?
comment on: http://stackoverflow.com/q/28061813
type: QuestionComment

http://stackoverflow.com/comment/44541561
comment on: http://stackoverflow.com/q/28076281
type: Comment
type: QuestionComment
has text: please go to the following link for a working fiddle. You have not used ng-form. http://jsfiddle.net/chandings/9y6zh14z/1/
score: 1

http://stackoverflow.com/q/27977809
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29517172
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44348073
downvote count: 0
has title: Angular-bootstrap pagination gives undefined function error
score: 1
has comment: http://stackoverflow.com/comment/44348136
type: Question
has answer: http://stackoverflow.com/a/29260394
linked to: http://stackoverflow.com/q/10816073
answer count: 2
linked to: http://stackoverflow.com/q/26141818
tagged with: pagination
tagged with: javascript
upvote count: 1
has body: I am trying to use angular-bootstrap pagination footer I get the error TypeError: undefined is not a function at Object.fn (http://localhost:3000/lib/angular-bootstrap/ui-bootstrap-tpls.js:2265:5) at Scope.$get.Scope.$digest (http://localhost:3000/lib/angular/angular.js:12650:29) at Scope.$get.Scope.$apply (http://localhost:3000/lib/angular/angular.js:12915:24) at done (http://localhost:3000/lib/angular/angular.js:8450:45) at completeRequest (http://localhost:3000/lib/angular/angular.js:8664:7) at XMLHttpRequest.xhr.onreadystatechange (http://localhost:3000/lib/angular/angular.js:8603:11)angular.js:10126 (anonymous function)angular.js:7398 $getangular.js:12669 $get.Scope.$digestangular.js:12915 $get.Scope.$applyangular.js:8450 doneangular.js:8664 completeRequestangular.js:8603 xhr.onreadystatechange ui-bootstrap-tpls.js:2265 line is "setNumPages" $scope.$watch('totalPages', function(value) { setNumPages($scope.$parent, value); // Readonly variable if ( $scope.page &gt; value ) { $scope.selectPage(value); } else { ngModelCtrl.$render(); } }); I installed angular-bootstrap using bower and included 'public/lib/angular-bootstrap/ui-bootstrap-tpls.js', When I search for function setNumPages in angular-bootstrap repo i found it in src/pagination/pagination.js How do I make sure pagination.js is also loaded into my browser. I did not find pagination.js in my lib. I followed How to do paging in AngularJS?
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/44608425
comment on: http://stackoverflow.com/a/28105438
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/69474/discussion-between-tassekatt-and-milind).
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/28064266
has comment: http://stackoverflow.com/comment/44509151
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44509152
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/44508957
possible better answer: http://stackoverflow.com/a/28064360
has comment: http://stackoverflow.com/comment/44509397
tagged with: javascript
has comment: http://stackoverflow.com/comment/44509356
accepted answer: http://stackoverflow.com/a/28064466
upvote count: 3
downvote count: 1
has body: I have the following problem with percentages calculations and rounding the results. If I use Math.ceil: var total = 66666; var test1 = Math.ceil(60 / 100 * total); var test2 = Math.ceil(23.5 / 100 * total); var test3 = Math.ceil(14 / 100 * total); var test4 = Math.ceil(2.5 / 100 * total); Then test1 + test2 + test3 + test4 = 66664 If I use ParseInt: var total = 66666; var test1 = parseInt(60 / 100 * total); var test2 = parseInt(23.5 / 100 * total); var test3 = parseInt(14 / 100 * total); var test4 = parseInt(2.5 / 100 * total); Then test1 + test2 + test3 + test4 = 66668 I try to rewrite my script from Python to Javascript and in Python I didn't have any problem like this.
has title: Rounding issue in Javascript
has answer: http://stackoverflow.com/a/28064466
favorite count: 0
has answer: http://stackoverflow.com/a/28064360

http://stackoverflow.com/comment/44408434
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28009628
has text: I've used your code and lost smooth scrolling. Load worked OK.
type: AnswerComment

http://stackoverflow.com/q/28049877
has title: Is it possible to draw polylines in Timemap.js?
tagged with: http://stackoverflow.com/tag/json
tagged with: google-maps-api-3
score: 0
tagged with: google-maps
tagged with: javascript
has body: I just want to ask,is this possible to create polyline and draw moving car in timemap.js ? just like this moving car. var carPolyline = new google.maps.Polyline({ map: map, geodesic : true, strokeColor : '#FF0000', strokeOpacity : 1.0, strokeWeight : 2, icons: [{ icon: iconcar, scale: .1, offset: '100%' }], }); var carPath = new google.maps.MVCArray(); for ( var i = 0; i &lt; path_start.length; i++) { if(i === 0) { carPath.push(path_start[i]); carPolyline.setPath(carPath); } else { setTimeout((function(latLng) { return function() { carPath.push(latLng); map.setCenter(latLng); }; })(path_start[i]), 100 * i); } } } I want to move that car every time I drag the timeline. Is this possible? Thank you in advance.
has comment: http://stackoverflow.com/comment/44538564
answer count: 0
has comment: http://stackoverflow.com/comment/44538559
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/28095196
tagged with: web-crawler
type: Question
has comment: http://stackoverflow.com/comment/44723840
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/28201655
has comment: http://stackoverflow.com/comment/44689435
has comment: http://stackoverflow.com/comment/44724590
has comment: http://stackoverflow.com/comment/44721002
favorite count: 0
tagged with: selenium
upvote count: 1
accepted answer: http://stackoverflow.com/a/28201655
has body: I'm having a strange problem submitting a form through Selenium Webdriver's PhantomJS API. Upon clicking the submit button, the form gets validated (are the username and password too short, or blank, etc.), but it does not get ultimately submitted. That is, if I submit an invalid form, and check the screenshot, there are alert notifications. If I submit a valid form, nothing happens. The JS on the page is supposed to validate the form, then submit it, when the submit button is clicked. A couple rule-outs. I've tried both .click() and .submit() on the submit button, which is a button element. I've also tried .submit() on the form itself and on an arbitrary element (like password) within the form, which Selenium allows. In fact, the same code works just fine if I'm driving Firefox and not PhantomJS. I'd rather not switch over, though, as Firefox is slower and gives me unpredictable connection trouble. My specs: I'm using Selenium version 1.43 with PhantomJS 1.98 via Python 2.7 on Ubuntu 14.04 LTS (GNU/Linux 3.17.1-elastic x86_64). Code below. First is my Selenium code. Then the html for the form. Then the login.js source code from the site. What I think is happening in the js is that for some reason the invalidHandler from the .validate function is being run, but the submitHandler is not? Thanks in advance for your attention. # enter username and password up here first submitEl = self.find_element_by_css_selector("button[type='submit']") submitEl.click() self.save_screenshot('login_submission.png') Edit2: "self" is a driver object that inherits from the Webdriver.PhantomJS class. Now the form html: You have some form errors. Please check below. I forgot my password Keep me signed in Login Don't have an account yet? Create an account login.js var Login = function () { var runSetDefaultValidation = function () { $.validator.setDefaults({ errorElement: "span", // contain the error msg in a small tag errorClass: 'help-block', errorPlacement: function (error, element) { //…
type: AnsweredQuestion
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/44723614
score: 1
has title: Selenium with PhantomJS: Form being validated but not submitted
tagged with: screen-scraping

http://stackoverflow.com/comment/44592052
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28109026
score: 0
has text: unfortunately I cannot use ^ and $ as my regex works also on multiple lines by checking for unwanted "newline" characters

http://stackoverflow.com/q/28051579
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/28051722
linked to: http://stackoverflow.com/q/19664691
answer count: 1
tagged with: angularjs
duplicate of: http://stackoverflow.com/q/19664691
type: AnsweredQuestion
has title: Angular: show a message when no results in angular ng-repeat ? (specific case)
has answer: http://stackoverflow.com/a/28051722
type: Question
has body: I have an specific case where I am repeating my data within an accordion, all I need is to display to the user a message when the filter (search box) returns nothing on ng-repeat="sport in sports"

http://stackoverflow.com/a/66434377
score: 0
type: Answer
has body: you can use sort() to shuffle an array like this. let yourArray = [1, 2, 3, 4, 5, 6, 7, 8, 9]; yourArray.sort(() =&gt; Math.random() - 0.5); console.log(yourArray);
answers question: http://stackoverflow.com/q/28061992

http://stackoverflow.com/q/27997976
has body: I have the following piece of code in my MaxNodeOccurs function that checks whether argument is valid and throws exception if it is not: if (!nodeTypeParamIsValid()) { throw new Error('nodeType should be specified and should not be empty string'); } function nodeTypeParamIsValid() { return !(ng.isUndefined(nodeType) || nodeType === null || nodeType === ""); } Now I'm writing test for this functionality and I'm wondering whether I should write a test for nodeType param being undefined, null or empty string? Something like this: it('should throw exception if nodeType is undefined', function () { expect(MaxNodeOccursService.bind(null, undefined, 0)).toThrow(new Error('nodeType should be specified and should not be empty string')); }); it('should throw exception if nodeType is null', function () { expect(MaxNodeOccursService.bind(null, null, 0)).toThrow(new Error('nodeType should be specified and should not be empty string')); }); it('should throw exception if nodeType is an empty string', function () { expect(MaxNodeOccursService.bind(null, "", 0)).toThrow(new Error('nodeType should be specified and should not be empty string')); }); Or is it enough to write only test say for undefined to make sure the expection is thrown?
score: 0
tagged with: jasmine
has title: should I test for undefined, null and empty string in my test
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/44385626
has comment: http://stackoverflow.com/comment/44385695
tagged with: unit-testing
type: Question
tagged with: javascript

http://stackoverflow.com/comment/44440677
has text: in jsfiddler it works. What exactly is wrong with it?
score: 1
comment on: http://stackoverflow.com/q/28027726
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44591876
comment on: http://stackoverflow.com/a/28108713
type: Comment
has text: Thanks Robert! I think I understand, altho if the scope issue applies in that function ('pulse'), I should need to do similar adjustment to the other functions, particularly the createjs.Ticker event listeners that I'm adding at the bottom? (and well spotted with the var typo - that was actually just from me clearing up the code trying to make it easier to read, removing all the console log traces and extra variable definitions! Thanks again).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44343011
type: AnswerComment
type: Comment
has text: Yea mate, it honestly sounds like you need to read the Rails guide some more. Group the HTML you want to dynamically change via AJAX into a container. Probably change the `p` tag you have encapsulating the like/unlike buttons into a `div` tag. Assign it an id or a class, then use the Javascript file called to replace the current content with a new one. The opening `div` tag would look something like ` ` while the jQuery would be, `$('#like_or_unlike').html('<%= render partial: 'like_button' %>');`.
comment on: http://stackoverflow.com/a/27972800
score: 0

http://stackoverflow.com/a/28036502
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/28034965
has body: I am assuming the html to be something like: then my JQuery solution would be: var audios = ['audio1', 'audio2', 'audio3', 'audio4']; var canPlay = 0; $('audio').each(function(){ this.addEventListener('play', function(){ if(this.id!=audios[canPlay]){ this.pause(); this.currentTime = 0; } }); this.addEventListener('ended', function(){ canPlay = (canPlay + 1) % audios.length; }); });
answers question: http://stackoverflow.com/q/28034965
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/28111826
has comment: http://stackoverflow.com/comment/44597266
has answer: http://stackoverflow.com/a/28112515
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/48163922
score: 2
has answer: http://stackoverflow.com/a/28112323
has answer: http://stackoverflow.com/a/28111884
downvote count: 0
has title: How to use Media Queries in JavaScript
tagged with: media-queries
tagged with: scroll
has comment: http://stackoverflow.com/comment/44597267
type: Question
has comment: http://stackoverflow.com/comment/44598120
tagged with: javascript
tagged with: jquery
upvote count: 2
has body: I know little to nothing about JavaScript so I'm not even sure if my question makes sense. My point however is how to apply the same principle of media queries to change particular values on a script depending on the width of the screen. In the following example, I'm using a scroll spy active menu with a negative scrolling of -100px for Header compensation. This offset is necessary because the header has a fixed position. I need the offset value to change to 0px if window is smaller then 900px width, because at that point, Header position becomes relative. $(document).ready(function () { $(window).scroll(function () { var y = $(this).scrollTop(); $('.link').each(function (event) { if (y &gt;= $($(this).attr('href')).offset().top - 100) { $('.link').not(this).removeClass('active'); $(this).addClass('active'); } }); }); }); $(function () { $('a[href*=#]:not([href=#])').click(function () { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') &amp;&amp; location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('html,body').animate({ scrollTop: (target.offset().top - 100) }, 850); return false; } } }); });
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27991662
has comment: http://stackoverflow.com/comment/44374428
accepted answer: http://stackoverflow.com/a/27992482
answer count: 1
tagged with: nested
has body: I made a code which works but my teacher told me i was ´nesting´ because he saw a lot of if/else statements, i tried shortening my code but i just don´t see how i can get rid of these if/else statements. Here is my code, a short summary: The code is a grid of nxn pieces and can only swap with the 'blank' tile so to do that my code looks as follow: grd.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) { // This statement prevents the player from playing the game // if the timer is counting down. if (timer == true) { Toast.makeText(getApplicationContext(), "The game has not started yet!", Toast.LENGTH_SHORT) .show(); } else { clickcounter++; // Because difficulty's are 0,1,2 the row/column dimensions // are difficulty + 3, here i create the texview of the moves // as well. size = (int) difficulty + 3; TextView movesText = (TextView) findViewById(R.id.textView2); // Checks if click is even or odd. Even is firstclick odd is // secondclick if (clickcounter % 2 == 1) { firstimg = (ImageView) view; firstclick = position; firsttag = (int) firstimg.getTag(); } else if (clickcounter % 2 == 0) { ImageView secondimg = (ImageView) view; scndtag = (int) secondimg.getTag(); // To prevent cheaters to press twice on the same tile // we set this if statement if (position == firstclick) { clickcounter = 1; // Next we check whether one of the clicked images // is the blank one, if that's not the case do // nothing! } else if (firsttag != crops.size() - 1 &amp;&amp; scndtag != crops.size() - 1) { // This else statements checks what happens if one has clicked the // blank tile } else { // This statement below is the same as an switch/case statement // but because of the fact that the switch/case statement gave the // following error i chose for this method: // case expressions must be constant expressions int i = firstclick - position; if (i == -1) { if(firstclick % size == size - 1){ } else…
has comment: http://stackoverflow.com/comment/44374638
has comment: http://stackoverflow.com/comment/44374204
tagged with: android
has answer: http://stackoverflow.com/a/27992482
type: AnsweredQuestion
has title: How to prevent `nesting`
has comment: http://stackoverflow.com/comment/44374178
type: Question
tagged with: javascript
score: 0

highcharts
tags question: http://stackoverflow.com/q/28029182
tags question: http://stackoverflow.com/q/28119710
tags question: http://stackoverflow.com/q/27992657
tags question: http://stackoverflow.com/q/28054931
tags question: http://stackoverflow.com/q/28025562
tags question: http://stackoverflow.com/q/28066053
tags question: http://stackoverflow.com/q/27977849
tags question: http://stackoverflow.com/q/28030330
tags question: http://stackoverflow.com/q/28088107
tags question: http://stackoverflow.com/q/27975480
tags question: http://stackoverflow.com/q/28092927
tags question: http://stackoverflow.com/q/28061937
tags question: http://stackoverflow.com/q/28013425
tags question: http://stackoverflow.com/q/27972038
tags question: http://stackoverflow.com/q/27983248
tags question: http://stackoverflow.com/q/28086006
tags question: http://stackoverflow.com/q/28051575
tags question: http://stackoverflow.com/q/28082908
tags question: http://stackoverflow.com/q/28072029
tags question: http://stackoverflow.com/q/28085018
tags question: http://stackoverflow.com/q/28091777
tags question: http://stackoverflow.com/q/28100570
tags question: http://stackoverflow.com/q/27978027
tags question: http://stackoverflow.com/q/28091169
tags question: http://stackoverflow.com/q/28062688
tags question: http://stackoverflow.com/q/28088540
tags question: http://stackoverflow.com/q/28102067
tags question: http://stackoverflow.com/q/28114331
tags question: http://stackoverflow.com/q/28028216
tags question: http://stackoverflow.com/q/28081425
tags question: http://stackoverflow.com/q/28088958
tags question: http://stackoverflow.com/q/27991309
tags question: http://stackoverflow.com/q/27989464
tags question: http://stackoverflow.com/q/28096442
tags question: http://stackoverflow.com/q/28077870
tags question: http://stackoverflow.com/q/28042232
tags question: http://stackoverflow.com/q/28073527
tags question: http://stackoverflow.com/q/28018678
tags question: http://stackoverflow.com/q/28117712
type: Tag
tags question: http://stackoverflow.com/q/27995733
tags question: http://stackoverflow.com/q/28066225
tag name: highcharts
tags question: http://stackoverflow.com/q/27966020

http://stackoverflow.com/comment/44491651
type: Comment
comment on: http://stackoverflow.com/a/28053571
has text: jQuery is stupid. While `removeAttribute("disabled")` does what you expect in plain JavaScript `removeProp('disabled')` does not. Updated it.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44509615
comment on: http://stackoverflow.com/a/28064577
has text: `const` is like `let`, it doesn't set properties, it just puts them on the local scope chain.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44606814
comment on: http://stackoverflow.com/q/28116181
score: 0
type: QuestionComment
type: Comment
has text: No i haven't tried it. Where should I use $apply();

http://stackoverflow.com/comment/44384650
comment on: http://stackoverflow.com/q/27997417
score: 1
type: Comment
type: QuestionComment
has text: Instead of `display_menu_toggle = true;` you need to toggle it `display_menu_toggle = !display_menu_toggle;`

http://stackoverflow.com/comment/44354532
comment on: http://stackoverflow.com/a/27980644
score: 0
type: AnswerComment
has text: @DannyStaple: I want the result to be in epoch time, since in my app I use this epoch time to convert it to a human readable format in few places also use this epoc time in flot chart and high charts
type: Comment

http://stackoverflow.com/a/28025113
answers question: http://stackoverflow.com/q/28023696
has body: An easy way to shake the screen is to translate the whole context in a random direction before each draw. You have to save/restore the context to keep it in a 'clean' status. var ctx=cv.getContext('2d'); function preShake() { ctx.save(); var dx = Math.random()*10; var dy = Math.random()*10; ctx.translate(dx, dy); } function postShake() { ctx.restore(); } function drawThings() { ctx.fillStyle = '#F00'; ctx.fillRect(10, 10, 50, 30); ctx.fillStyle = '#0F0'; ctx.fillRect(140, 30, 90, 110); ctx.fillStyle = '#00F'; ctx.fillRect(80, 70, 60, 40); } drawThings(); function animate() { // keep animation alive requestAnimationFrame(animate); // erase ctx.clearRect(0,0,cv.width, cv.height); // preShake(); // drawThings(); // postShake(); } animate(); &lt;canvas id='cv'&gt;&lt;/canvas&gt; Notice you might prefer to use some sin function and some easing to have a smoother effect : var ctx=cv.getContext('2d'); var shakeDuration = 800; var shakeStartTime = -1; function preShake() { if (shakeStartTime ==-1) return; var dt = Date.now()-shakeStartTime; if (dt&gt;shakeDuration) { shakeStartTime = -1; return; } var easingCoef = dt / shakeDuration; var easing = Math.pow(easingCoef-1,3) +1; ctx.save(); var dx = easing*(Math.cos(dt*0.1 ) + Math.cos( dt *0.3115))*15; var dy = easing*(Math.sin(dt*0.05) + Math.sin(dt*0.057113))*15; ctx.translate(dx, dy); } function postShake() { if (shakeStartTime ==-1) return; ctx.restore(); } function startShake() { shakeStartTime=Date.now(); } function drawThings() { ctx.fillStyle = '#F00'; ctx.fillRect(10, 10, 50, 30); ctx.fillStyle = '#0F0'; ctx.fillRect(140, 30, 90, 110); ctx.fillStyle = '#00F'; ctx.fillRect(80, 70, 60, 40); } drawThings(); function animate() { // keep animation alive requestAnimationFrame(animate); // erase ctx.clearRect(0,0,cv.width, cv.height); // preShake(); // drawThings(); // postShake(); } startShake(); setInterval(startShake,2500); animate(); &lt;canvas id='cv'&gt;&lt;/canvas&gt;
type: Answer
score: 19
downvote count: 0
upvote count: 19
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28023696

http://stackoverflow.com/comment/44496110
has text: 1) is valid if the code does not have a "use strict" directive. That's one of the reasons that "use strict" is a good idea.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/28057075
type: QuestionComment

http://stackoverflow.com/comment/44327548
type: Comment
type: QuestionComment
has text: Please add the version of jQuery you're using as this may have an impact on what the issue may be. Add the HTML for the page might help as well.
comment on: http://stackoverflow.com/q/27967395
score: 0

http://stackoverflow.com/a/28103791
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/57804468
answers question: http://stackoverflow.com/q/28102674
has body: IEEE 754 64-bit binary floating point can represent exactly every integer with magnitude no greater than 2^53. That means you can represent exactly, as an integer number of cents, every money amount with magnitude no greater than $90,071,992,547,409.92. For comparison, the US National Debt is currently about $16,787,451,118,147.
downvote count: 0
has comment: http://stackoverflow.com/comment/57807166

http://stackoverflow.com/comment/44459944
has text: Thanks , i have been recommended that book for the 2nd time , i have it saved as a bookmark :)
comment on: http://stackoverflow.com/a/28028107
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27964253
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27966303
upvote count: 1
type: Question
tagged with: angularjs-directive
score: 1
has title: Accessing child's '$invalid' validation prop within a directive
possible better answer: http://stackoverflow.com/a/27964593
answer count: 3
has answer: http://stackoverflow.com/a/27964821
has answer: http://stackoverflow.com/a/27964593
downvote count: 0
tagged with: javascript
has body: I am trying to create a reusable directive that will simply add a class to an element based on the $invalid property of one of its children. I started creating the directive, but am unsure of how to go about accessing the $invalid prop: Simplified Markup: &lt;form&gt; &lt;div class="group" ng-validate="emailAddress"&gt; &lt;div class="wrapper"&gt; &lt;input type="email" name="emailAddress" ng-model="emailAddress" required/&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; And the directive: function ngValidate () { function linkFunction (scope, element, attributes, controller) { var el = element[0]; var targetElName = attributes.ngValidate; var $targetEl = angular.element(el.querySelector("[name='" + targetElName + "']")); $targetEl.on("blur", blurHandler); function blurHandler (event) { console.log($targetEl.$invalid); // always undefined?? // what I want to happen (sudo code): // if $targetEl is $invalid then add class 'error' to element. // if $targetEl is $valid then add class 'success' to element. } } return { restrict: "A", link: linkFunction }; } I'm a little stuck with this, so any help would be appreciated.
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27966303

http://stackoverflow.com/comment/44354238
type: Comment
has text: FYI parseInt will fail as the first character of `dateString` is not a valid integer.
comment on: http://stackoverflow.com/a/27981462
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44353372
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27980923
type: Comment
has text: This function works fine for the opening and closing of tags..but can not check for the opening and closing of single or double quotes.

http://stackoverflow.com/comment/44412929
has text: Your code looks OK to me; drawImage should respect the rotated context and render at an angle. Can you elaborate on what's going wrong?
score: 0
comment on: http://stackoverflow.com/q/28012816
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44599601
type: QuestionComment
has text: provide us jsfiddle.
comment on: http://stackoverflow.com/q/28112792
score: 0
type: Comment

http://stackoverflow.com/a/28088631
has comment: http://stackoverflow.com/comment/44554328
downvote count: 0
has comment: http://stackoverflow.com/comment/44554056
has comment: http://stackoverflow.com/comment/44554636
type: Answer
has comment: http://stackoverflow.com/comment/44554413
answers question: http://stackoverflow.com/q/28088559
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/44553981
has body: Try to pass the type into the map function, var str_array = int_array.map(String); For older versions of browsers, var str_array = []; for(var i=0;i&lt;int_array.length;i++) { str_array[str_array.length] = int_array[i] + ""; }

http://stackoverflow.com/comment/44493386
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28055545
has text: var galleryarray=new Array(); var curimg=0 function rotateimages(){ document.getElementById("slideshow").setAttribute ("src", "slideshow_images/"+galleryarray[curimg]) curimg=(curimg<galleryarray.length-1)? curimg+1 : 0 } window.onload=function(){ setInterval("rotateimages()", 2500) }
score: 0

http://stackoverflow.com/q/28014100
has comment: http://stackoverflow.com/comment/44415439
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/28014122
favorite count: 0
linked to: http://stackoverflow.com/q/10865025
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/28014136
downvote count: 1
type: Question
has body: so i have an array, containing arrays inside: var arr = [ [1,2,3,4,5], [6,7], [8,9,0] ]; What's the most elegant way to extract [1,2,3,4,5,6,7,8,9,0] I can make it like: var final = []; params.forEach(function(bulk){ final = final.concat(bulk); }); but was looking for something more elegant / pretty
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/44415453
has title: Is there an elegant way of concatenating an array of arrays?

http://stackoverflow.com/a/28053898
accepted answer of: http://stackoverflow.com/q/28017432
has body: Well, I guess when one has been heading down one road for a while, one assumes that it is in the right direction. After further head-scratching, I found the issue and it was related to the blocking/non-blocking nature of my backend web-framework. As it turns out, in Mojolicious (Perl web-framework), http calls can be either synchronous or asynchronous depending on how one writes the call. my $tx = $ua-&gt;get('http://foo.bar?query=getSomeFoo'); if($tx-&gt;success) { $self-&gt;render($tx-&gt;res-&gt;content); } else { $self-&gt;rendered($tx-&gt;res-&gt;code); } This is a blocking/synchronous request. Nothing happens until after the GET finishes. On the other hand, if one writes the request like so, it is an asynchronous request: $ua-&gt;get('http://foo.bar?query=getSomeFoo' =&gt; sub { my ($ua,$tx) = @_; if($tx-&gt;success) { $self-&gt;render($tx-&gt;res-&gt;content); } else { $self-&gt;rendered($tx-&gt;res-&gt;code); } }); So, if anyone else has encountered this issue...here is the answer. If I am the only idiot on the planet that has committed this blunder...then I guess I have put my shame out there for all to have a good chuckle at. Bottom line was that this was well documented in the Mojolicious docs...but I had been doing it one way for so long that I completely forgot about it. Cheers!
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/28017432
upvote count: 2

meteor-helper
tag name: meteor-helper
tags question: http://stackoverflow.com/q/28016921
tags question: http://stackoverflow.com/q/27980361
tags question: http://stackoverflow.com/q/28015952
type: Tag

http://stackoverflow.com/comment/44533765
type: QuestionComment
comment on: http://stackoverflow.com/q/28077188
type: Comment
has text: So did it make a difference changing it to window?
score: 0

http://stackoverflow.com/q/28110590
has comment: http://stackoverflow.com/comment/50670210
has comment: http://stackoverflow.com/comment/44594984
tagged with: javascript
tagged with: jquery
score: 0
tagged with: nofollow
tagged with: http://stackoverflow.com/tag/html
tagged with: seo
has comment: http://stackoverflow.com/comment/44594924
has body: I want to add rel="nofollow" attribute in all my external links. Below code works well on links comes with http:// and https://. my problem is its not worked on links without http (ex: /somepage.html) how can i over come this. Any solution highly appreciated. JS Fiddle HTML This is an internal link And this is an external link, with no follow (working) And this is an external link, with no follow (not-working) And this is an external link, with no follow (working) JS jQuery('a[href*="http://"]:not([href*="http://www.somepage.com"])').attr('rel', 'nofollow'); jQuery('a[href*="https://"]:not([href*="http://www.somepage.com"])').attr('rel', 'nofollow'); jQuery('a[href*="https://"]:not([href*="https://www.somepage.com"])').attr("target", "_blank"); JS Fiddle
answer count: 0
has comment: http://stackoverflow.com/comment/44595077
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44595100
has comment: http://stackoverflow.com/comment/44595903
has title: How to no-follow all external links automatically - jQuery
has comment: http://stackoverflow.com/comment/44594980
type: Question

http://stackoverflow.com/a/28119742
score: 1
type: Answer
upvote count: 1
has body: Like this? for(var i=0; i&lt;10; i++){ console.log("string " + i);//logs to the console: string 0, string 1,..string 9 }
answers question: http://stackoverflow.com/q/28119727
downvote count: 0

http://stackoverflow.com/q/27985772
answer count: 1
favorite count: 0
tagged with: requirejs
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: amd
has answer: http://stackoverflow.com/a/27989428
accepted answer: http://stackoverflow.com/a/27989428
type: Question
has title: RequireJS: How can I handle transitive dependencies failures?
tagged with: javascript
upvote count: 1
has body: I'm using RequireJS 2.1.15, and I have trouble getting the errback that I pass to the library to be executed. Here is a small sample that illustrates my problem. define("parent", ["missing"], function(){ return new Parent(); }); require(["parent"], function(parent){ alert("parent"); }, function(err){ alert("err"); }); (corresponding fiddle at : http://jsfiddle.net/605w0ex5/2/) When I run this code, none of the success or error functions of the require() actually ends up called, but RequireJS prints a console message saying Error: Script error for: missing. My problem here is that my require() call appears to be in limbo. It is neither successful nor failed even though one of the module it explicitly depends on will never ever be loaded. And the parent will never be loaded because a module is depends on cannot be loaded. The problem is I DO want to be notified when my require() call cannot be satisfied. How can I get RequireJS to actually call my errback?* I'm having this problem on Chrome 39 and RequireJS 2.1.15.

http://stackoverflow.com/a/28095124
has body: There is a proper example in angularjs doc with directive ng-disable: https://docs.angularjs.org/api/ng/directive/ngDisabled You can try similar one with onsen: &lt;input type="checkbox" ng-model="checked"&gt;&lt;br/&gt; &lt;ons-button ng-model="button" disabled="{{checked}}"&gt;Button&lt;/button&gt;
has comment: http://stackoverflow.com/comment/44705727
answers question: http://stackoverflow.com/q/28088990
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/44749983

http://stackoverflow.com/a/28098656
score: 1
answers question: http://stackoverflow.com/q/28090844
has comment: http://stackoverflow.com/comment/44573592
accepted answer of: http://stackoverflow.com/q/28090844
upvote count: 1
type: AcceptedAnswer
has body: A function in an (interpolation-)expression is called during every digest cycle and you can't possibly know in advance when this will happen. So your function has to be prepared to be called not only more often then you expect but also at unexpected times. The culprit in your case is the html5 mode. There is a global event handler that rewrites links and calls $apply. The problem is that it's done even if html5 mode is not enabled. I consider this a bug because the docs say When html5Mode is enabled, enables/disables url rewriting for relative links Anyway, you can turn this behavior off in a config block: $locationProvider.html5Mode({rewriteLinks: false}); See the docs for more information. If you need this behavior then you either prepare your function for your situation or make $scope.pathForItem a value. I recommend the latter one anyway.
type: Answer
downvote count: 0

http://stackoverflow.com/comment/44423556
comment on: http://stackoverflow.com/a/27986737
score: 0
type: AnswerComment
has text: Destination field will autosuggest values upon the input, whatever the values I selected, the statistics of these values are to be displayed upon the search button. Controller will take of the statistics part, however, all i want is getting the selected values on to the controller side, so that I can query with these values in DAO and get the results.
type: Comment

http://stackoverflow.com/q/28080748
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28082485
downvote count: 0
score: 1
has title: Automatic JavaScript code indentation in VS 2012
type: Question
has comment: http://stackoverflow.com/comment/44541770
tagged with: javascript
tagged with: visual-studio-2012
has body: In spite of having web essential &amp; productive power tool installed for Visual Studio 2012, javascript code with in aspx page doesn't indent automatically. This is how I type: for (var i=0;i&lt;=10;i++) { } This is how I want to indent: for (var i = 0; i &lt;= 10; i++){ } I am not sure which extension for VS 2012 used to do it on my older PC. The moment I type, end curly brace, it will indent my javascript code automatically. I did look at settings but didn't get it right Can anyone help me out?
upvote count: 1
has comment: http://stackoverflow.com/comment/44542488
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/44561712
type: QuestionComment
has text: Try changing `\d{1,3}` to `\d{0,3}`
comment on: http://stackoverflow.com/q/28092708
score: 0
type: Comment

http://stackoverflow.com/comment/44591318
type: Comment
comment on: http://stackoverflow.com/a/28108452
type: AnswerComment
score: 0
has text: @ken: well you can use `$.ajax` instead for ur purpose, only additional thing u need to include is the `type:post`. `$.ajax({ type: "POST", url: "some.php", data: { name: "John" }, })`

http://stackoverflow.com/comment/44494331
type: AnswerComment
comment on: http://stackoverflow.com/a/28050697
type: Comment
has text: @ndreckshage saw what issue?
score: 0

http://stackoverflow.com/comment/44490040
comment on: http://stackoverflow.com/a/28053935
type: AnswerComment
score: 0
type: Comment
has text: This is why I prefer [Plunker](http://plnkr.co/edit/?p=catalogue) for Angular

http://stackoverflow.com/comment/44538841
comment on: http://stackoverflow.com/q/28079902
score: 0
type: QuestionComment
type: Comment
has text: Can you provide sample data? Or better yet, a [Minimal, Complete, Tested and Readable example](http://stackoverflow.com/help/mcve) that demonstrates your issue.

http://stackoverflow.com/comment/44612641
has text: Would you be able to post an example, code that compares the new element to the old one then plays the sound if changed?
comment on: http://stackoverflow.com/a/28119129
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27980276
score: 1
accepted answer: http://stackoverflow.com/a/27980431
type: Question
tagged with: automated-tests
linked to: http://stackoverflow.com/q/25787140
downvote count: 0
tagged with: javascript
tagged with: ckeditor
tagged with: bender.js
answer count: 1
favorite count: 0
has body: I am trying to setup a test environment for ckeditor as described here. After installing bender, when I run bender init, I am getting a JS error at line 129 of bender.js saying 'module' is undefined. Here's a screenshot of the error dialog - I am not sure if this is due to any bug in bender.js... I followed the previous steps and all succeeded. Any direction on how to fix this?
upvote count: 1
has answer: http://stackoverflow.com/a/27980431
type: AnsweredQuestion
has title: Bender.js Error: 'module' is undefined

http://stackoverflow.com/a/28039855
accepted answer of: http://stackoverflow.com/q/28039797
answers question: http://stackoverflow.com/q/28039797
has comment: http://stackoverflow.com/comment/44463678
has body: I'm assuming you want the innerHTML text of x to be displayed in the input field elem. You cant set the 'value' attribute to an HTML element, but you can instead just set it to the desired text (e.g the time). &lt;script&gt; function addZero(i) { if (i &lt; 10) { i = "0" + i; } return i; } function checkouttimeFunction() { var d = new Date(); var h = addZero(d.getHours()); var m = addZero(d.getMinutes()); var s = addZero(d.getSeconds()); var elem = document.getElementById("cout"); elem.value = h + ":" + m + ":" + s; } &lt;/script&gt;
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/27975379
upvote count: 3
has title: Prevent SVG objects from overlapping
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has body: I am currently working on a Drag and drop project that requires svg shapes to connect with each other but not pass through. I have a jsfiddle with it working with divs but not the svgs. Any help would be appreciated. JSFIDDLE HTML <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="green"/> Sorry, your browser does not support inline SVG. <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="green"/> Sorry, your browser does not support inline SVG. JS $(".draggable").draggable({ obstacle:".boundaries", preventCollision: true, containment: "#container", start: function(event,ui) { $(this).removeClass('boundaries'); }, stop: function(event,ui) { $(this).addClass('boundaries'); } });
score: 3
has comment: http://stackoverflow.com/comment/44379990
answer count: 0
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/44343519
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/44418010
has text: @apneadiving thanks, that's very cool. care to submit it as answer?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28014526

http://stackoverflow.com/comment/44328476
type: QuestionComment
has text: are you sure that you are reaching the success callback? place breakpoint or console.log at ' myArray.push(pin);'
comment on: http://stackoverflow.com/q/27966809
score: 0
type: Comment

http://stackoverflow.com/comment/44617060
type: Comment
comment on: http://stackoverflow.com/a/28121411
type: AnswerComment
score: 0
has text: Hi ryan, have you heard of the Unity framework/IDE? Your response was helpful, but wondering how it compares to HTML5? Also is HTML 5 canvas rendering hardware accelerated, while JS is not?

http://stackoverflow.com/comment/44480114
score: 1
has text: @PSL the datepicker opens automatically on mobile devices because the input type is datetime-local. Figured out that ionic has a tap system that is interfering, answer below
comment on: http://stackoverflow.com/q/28047686
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28057431
type: Answer
accepted answer of: http://stackoverflow.com/q/28057137
has comment: http://stackoverflow.com/comment/44734665
answers question: http://stackoverflow.com/q/28057137
downvote count: 0
score: 1
has body: you embedded agular 1.* instead of a newer version. also your resource is not available anymore (404). other than that, the code works. angular.module('myApp', []).controller('Hello', function ($scope, $http) { $http.jsonp('http://groupify-webtechproject.rhcloud.com/api/test/helloworld'). success(function(data) { console.log('success', data); $scope.data = data; }). error(function(data, status) { console.log('error', data, status); $scope.data = 'error with status code: ' + status; }); }); Hello AngularJS {{data}}
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/28572989
type: Answer
score: 0
has body: Take a look at this lib, it looks like it may do what your looking for: https://github.com/goalzen/grunt-fail Although I just throw a new error, e.g.: throw new Error("Error detected!")
answers question: http://stackoverflow.com/q/27989651

database
tags question: http://stackoverflow.com/q/28019698
tags question: http://stackoverflow.com/q/28005235
tags question: http://stackoverflow.com/q/28004312
tags question: http://stackoverflow.com/q/28012586
tags question: http://stackoverflow.com/q/28002040
tags question: http://stackoverflow.com/q/28031931
type: Tag
tags question: http://stackoverflow.com/q/28032079
tags question: http://stackoverflow.com/q/28097152
tags question: http://stackoverflow.com/q/28110103
tags question: http://stackoverflow.com/q/28076933
tags question: http://stackoverflow.com/q/27972284
tag name: database
tags question: http://stackoverflow.com/q/28087929
tags question: http://stackoverflow.com/q/28059569
tags question: http://stackoverflow.com/q/28116533
tags question: http://stackoverflow.com/q/28047356
tags question: http://stackoverflow.com/q/27988595
tags question: http://stackoverflow.com/q/28116625

http://stackoverflow.com/a/28036826
has comment: http://stackoverflow.com/comment/57443575
upvote count: 4
has body: Just an idea, pass a callback as a parameter for the component: HTML: &lt;foo params="callback: callback"&gt;&lt;/foo&gt; JS: function FooComponentViewModel(params) { this.Foo = function () { alert("bar"); }; params.callback(this); } function ViewModel() { this.callback = function(vm) { vm.Foo(); }; } http://jsfiddle.net/r3d41q6c/3/
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 4
has comment: http://stackoverflow.com/comment/44458690
accepted answer of: http://stackoverflow.com/q/28036773
answers question: http://stackoverflow.com/q/28036773

http://stackoverflow.com/comment/44598720
score: 0
type: Comment
has text: how to write the javascript to rebuild FC based on viewport width? I see there is a destroy method -- http://fullcalendar.io/docs/display/destroy/ -- but how to bring it back with the desired options?
type: AnswerComment
comment on: http://stackoverflow.com/a/28112384

http://stackoverflow.com/a/28083056
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44544133
has body: You can use regular expressions to match values from textarea. Required regex would be: /^\d{5}\.{1}\d{3}$/ http://www.regexr.com/3a8rn
type: Answer
accepted answer of: http://stackoverflow.com/q/28082874
answers question: http://stackoverflow.com/q/28082874
upvote count: 1
has comment: http://stackoverflow.com/comment/44544212
has comment: http://stackoverflow.com/comment/44544235

http://stackoverflow.com/comment/44608561
comment on: http://stackoverflow.com/q/28115853
has text: @RokoC.Buljan I'm not, I formatted the question properly , now it make more sense that is focused on Browser queue, see this [edit](http://stackoverflow.com/revisions/28115853/2) that maked 3 questions
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44576471
score: 0
type: AnswerComment
type: Comment
has text: That's a solution, but I think he's looking for an explaination.
comment on: http://stackoverflow.com/a/28100439

http://stackoverflow.com/comment/44393396
comment on: http://stackoverflow.com/a/27990361
type: Comment
type: AnswerComment
has text: @StephanBijzitter: Adding this plugin should have nothing to do with that. Make sure, that your back button handler is working.
score: 0

http://stackoverflow.com/comment/44419950
score: 0
has text: Couldn't reproduce it myself, lol. But after replacing this.collection.get(id).destroy(); with console.debug("test"), this loop does not appear anymore. So it have to with this.collection.get(id).destroy(). However, these are basic backbone functions and it just destroys the obj from the collection. Not sure where to look now.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28011837

http://stackoverflow.com/comment/45076682
type: AnswerComment
has text: I still have a small problem, since the code works perfectly for previous and later actions, but when trying to get it working on current date case it doesn't work. Here is a JSFiddle http://jsfiddle.net/20s1j3h3/
type: Comment
comment on: http://stackoverflow.com/a/28244975
score: 0

http://stackoverflow.com/comment/44400569
score: 0
type: AnswerComment
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/69046/discussion-between-wayne-ellery-and-grammarxcore).
comment on: http://stackoverflow.com/a/28005947

http://stackoverflow.com/q/28033759
tagged with: mailboxer
tagged with: forms
accepted answer: http://stackoverflow.com/a/28033920
has comment: http://stackoverflow.com/comment/44453278
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
tagged with: ruby
has comment: http://stackoverflow.com/comment/44453032
has answer: http://stackoverflow.com/a/28033920
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/31734974
upvote count: 1
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/31734974
has title: Pre-fill form field with data from prior page in Rails
has body: I recently added Mailboxer to my Rails app and have everything working well. However, I want to be able to create a new message by clicking a "Message Me" button on a User's page and then have the recipient filled in already (with the User from the prior page) when the form for creating the message loads. The particular field in question: &lt;%= select_tag 'recipients', recipients_options, multiple: true, class: 'new_message_recipients_field' %&gt; And for reference, recipients_options probably won't come into play in this scenario, but it is the list of all Users--which I use primarily when I'm creating a Message from anywhere but a User page--and is defined in my Messages helper def recipients_options s = '' User.all.each do |user| s &lt;&lt; "&lt;option value='#{user.id}'&gt;#{user.first_name} #{user.last_name}&lt;/option&gt;" end s.html_safe end And my messages_controller.rb: def new end def create recipients = User.where(id: params['recipients']) conversation = current_user.send_message(recipients, params[:message][:body], params[:message][:subject]).conversation flash[:success] = "Message has been sent!" redirect_to conversation_path(conversation) end I already have the link to the New Message form on each User page... &lt;%= link_to 'Message me', new_message_path %&gt; But I don't know how to pre-fill the recipient in the subsequent form. Any suggestions for how would I go about this?

http://stackoverflow.com/q/28084802
has body: This event proceed when the user clickz on an albumPreview element. This works well, when I click on each albumPreview once but when I click again it only removea, not append again. replaceWIth() method doesn't work because of random number of elements in each albumPreview. How can I make this work? if ($('.img-container-wrap').length == 0) { //IF NOT EXIST, CREATE console.log(photoArray.response.length); for (i; i &lt; photoArray.response.length; ++i) { albumContent //CONTAINER FOT IMAGES .append($("&lt;div class='img-container-wrap'&gt;&lt;/div&gt;") .append($("&lt;div class='img-container'&gt;&lt;/div&gt;") //APPEND TO IMG-CONTAINER-WRAP .css({ "background-image": 'url("' + photoArray.response[i].src + '")' }))) } } else if ($('.img-container-wrap').length &gt; 0) { //IF EXIST, REMOVE _AND_ APPEND NEW CONTENT $(".album-content-section").find('.img-container-wrap').remove(); //REMOVE ELEMENTS for (i; i &lt; photoArray.response.length; ++i) { albumContent //CONTAINER FOR IMAGES .append($("&lt;div class='img-container-wrap'&gt;&lt;/div&gt;") .append($("&lt;div class='img-container'&gt;&lt;/div&gt;") .css({ "background-image": 'url("' + photoArray.response[i].src + '")' }))) }
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44547469
has comment: http://stackoverflow.com/comment/44547422
accepted answer: http://stackoverflow.com/a/28092731
score: 0
possible better answer: http://stackoverflow.com/a/28085025
has answer: http://stackoverflow.com/a/28085025
has title: Remove existing content AND append new
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44547575
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/44549165
has comment: http://stackoverflow.com/comment/44547631
has answer: http://stackoverflow.com/a/28092731

http://stackoverflow.com/comment/44472983
type: Comment
comment on: http://stackoverflow.com/a/28044900
has text: Yes, but you can add a class to all elements that you want to act like buttons, for example class .button, and then the selector would be $('.button').click...
score: 0
type: AnswerComment

http://stackoverflow.com/a/28034717
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44455040
has body: You should give the an ID: And then: window.getElementById("mydiv").innerHTML += link;
type: Answer
has comment: http://stackoverflow.com/comment/44454650
accepted answer of: http://stackoverflow.com/q/28034671
answers question: http://stackoverflow.com/q/28034671
score: 4

http://stackoverflow.com/q/28112495
favorite count: 0
has answer: http://stackoverflow.com/a/28112563
has answer: http://stackoverflow.com/a/28112526
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44598738
accepted answer: http://stackoverflow.com/a/28112563
has comment: http://stackoverflow.com/comment/44598688
has comment: http://stackoverflow.com/comment/44598710
possible better answer: http://stackoverflow.com/a/28112526
has title: A button toggle some from a
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/44598856
type: Question
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/44598871
score: 0
answer count: 2
has body: I have this JSFiddle. I have a ul list and some li inside. I want pressind a button to toggle the 2 first li. I tried to put and then $( "button" ).click(function() { $("ul.s1").click(function() { $(this).slideToggle(300); return false; }); }); button 1 1 9023698 8993127 9037891 but nothing happens..
tagged with: jquery

http://stackoverflow.com/comment/44560188
type: Comment
comment on: http://stackoverflow.com/a/28016695
type: AnswerComment
has text: My problem basically is that there is not a single example for what Documentation describes here...how can we see it in action then?? developers.google.com/maps/documentation/webservices/index#ParsingXML
score: 0

http://stackoverflow.com/a/28378958
type: Answer
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/27990382
answers question: http://stackoverflow.com/q/27990382
type: AcceptedAnswer
downvote count: 0
has body: my use case is Class factories where the classes cannot be annotated because they're created at runtime It sounds like the Closure Compiler may not be able to help you out here, at least not with this particular approach. You intend Enhanced to be a function that takes a class and returns a class. There are certainly languages in which operate on classes in this way (Python, Javascript, Ruby, etc.). But the Closure Compiler requires static classes in order to do its static analysis. That isn't necessarily the way that it has to work, but that is the way it was designed to work. A rough rule of thumb is this: if you can represent the types in Java, you can represent the types in Closure annotations. Of course, this isn't GWT; you're not writing Java. You can use your JS-fu to write all the meta classes you want. But don't expect the Closure Compiler to necessarily be able to type check it. The good news is that there is literally decades of research and best practices behind languages following this paradigm of static classes: C++, Java, C#. If you are familiar with these, you might ask yourself "How would I do this in those languages?" Your actual problem (whatever it is) has likely been solved hundreds or thousands of times by a design pattern for these OO languages, and you could do the same.

http://stackoverflow.com/a/28037866
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28037732
type: Answer
answers question: http://stackoverflow.com/q/28037732
upvote count: 2
has body: HTML Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam congue, tortor in mattis mattis, arcu erat pharetra orci, at vestibulum lorem ante a felis. CSS .Div1, .Div2 { float: none; padding: 20px; vertical-align: top; } .container { display: table; } .Div1 { width: 400px; background-color: LightSlateGrey; display: table-cell; } .Div2 { width: 200px; display: table-cell; background-color: tan; } Check out this : Fiddle Both the divs will take same height irrespective of its content length.
score: 2

magento
tags question: http://stackoverflow.com/q/27974365
tag name: magento
type: Tag

http://stackoverflow.com/q/28090293
type: Question
tagged with: arrays
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44557279
score: 0
has title: Declare javascript static array in function
has body: I have a table containing 21 checkboxes (rows of 7 days times three columns of time of day). I want an onClick function to toggle individual columns of three times of date on or off. I have written this JavaScript function: function toggleCol(colnum) { if (typeof toggleCol.state == 'undefined') toggleCol.state = false; toggleCol.state = !toggleCol.state; document.getElementById("req" + colnum).checked = toggleCol.state; document.getElementById("req" + (colnum + 7)).checked = toggleCol.state; document.getElementById("req" + (colnum + 14)).checked = toggleCol.state; } This works but the obvious problem is that I need not one but seven toggleCol.state variables, one for each column, presumably as an array. How do I declare and use a static array of seven members within the function? I've tried every way I can think of but I've run out of ideas!
has comment: http://stackoverflow.com/comment/44557862
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44557346
has comment: http://stackoverflow.com/comment/44557406
has answer: http://stackoverflow.com/a/28090442

http://stackoverflow.com/comment/44612437
type: Comment
comment on: http://stackoverflow.com/a/28117082
has text: Thumbs up! Working on way now to figure out the reverse (without needing to scroll to top to see top of menu)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44407482
score: 4
has text: Yes. ----------------
comment on: http://stackoverflow.com/q/28009867
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27966840
has comment: http://stackoverflow.com/comment/44328325
has body: I'm modifying an app which control the entity maintenance via jsp forms. That's ok, but the main entity (Contrato) has many other maintenances in it's own form, and my customer does not want redirects in the middle, so I must change all the jsp secondary maintenances by modals / javascript and jquery. There are no problems so far untill now when I'm trying to manage files: In former jsp view i have a &lt;form:input&gt;: &lt;form:input path ="documento" type="file" name="Documento"/&gt; Then, I have a helper java class with the attribute: private MultipartFile documento; Here MultipartFile is received perfectly when mapping the request. Now I have a modal for this maintenance with an &lt;input&gt; &lt;input id="documento" name="documento" type="file" style="width: 100%"&gt; If i request documento in java i get an string: C:\fakepath\file.ext After more attempts, using FileReader i'm able to store in a variable the URL of the file: function handleFileSelect(event) { input = event.target; reader = new FileReader(); reader.onload = function(e) { arrayBuffer = reader.result; } } Now debugging, i can see arrayBuffer variable is: data:application/pdf;base64,JVBERi0xLjQKJbXtrvsKMyAwIG9iago8PCAvTGVuZ3RoIDQ…QgMTAxMSAwIFIKICAgL0luZm8gMTAxMCAwIFIKPj4Kc3RhcnR4cmVmCjIxMTYzMgolJUVPRgo..... Which is a valid URL with the file. But when i try to send it to my @RequestMapping as @RequestParam: @RequestParam(value="file",required=false,defaultValue="0") Object file, http://localhost:8080/my/url/documentoSubmit?file=data%3Aap…MTQ2MSAwIFIKICAgL0luZm8gMTQ2MCAwIFIKPj4Kc3RhcnR4cmVmCjMwMTc4MgolJUVPRgo%3D... Failed to load resource: the server responded with a status of 400 (Petición incorrecta) How can I send the javascript URL to java server side to persist it in DB?
type: Question
score: 0
tagged with: java
answer count: 0
tagged with: jsp
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44326609
has title: Send content from client side to server side

http://stackoverflow.com/comment/44582803
type: Comment
has text: Try to clean up the code a little. Reduce the example to contain only relevant parts. For example, is the `ineditor` variable ever used?
score: 0
comment on: http://stackoverflow.com/q/28103075
type: QuestionComment

http://stackoverflow.com/comment/44404981
type: QuestionComment
score: 1
has text: Can't be that hard -> **http://jsfiddle.net/z3083kvb/**
comment on: http://stackoverflow.com/q/28008474
type: Comment

http://stackoverflow.com/a/28048752
type: Answer
answers question: http://stackoverflow.com/q/28032615
downvote count: 0
has body: Yes, it's possible to do this using the Github API. The URL must be something like that: https://api.github.com/repos/{repositoryName}/contents/{path} repositoryName is the repository where you want to put your file and path its path within this repository. Regarding the authentication, you need to follow this link https://developer.github.com/v3/#authentication. I successfully tested with basic auth. You need then to use an HTTP method PUT with content with the following structure: { "message": "a commit message", "content": "bXkgbmV3IGZpbGUgY29udGVudHM=" } The field content corresponds to the content of your file encoded with base 64. Hope it helps. Thierry
has comment: http://stackoverflow.com/comment/44484923
score: 3
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28032615
has comment: http://stackoverflow.com/comment/44505357

http://stackoverflow.com/comment/44521697
score: 1
comment on: http://stackoverflow.com/a/28058409
type: Comment
has text: This is a much better solution than the one I suggested. I'm actually going to go back to a few apps I've made an update them to use this approach.
type: AnswerComment

http://stackoverflow.com/comment/44362636
comment on: http://stackoverflow.com/q/27985858
score: 1
has text: And you can't do `a.time = "01:33:00.000".replace( ".000", "" );`?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44373380
comment on: http://stackoverflow.com/a/27991068
type: AnswerComment
type: Comment
score: 1
has text: @dystroy Thank you dystroy. That's really helpful. People like you help newbies like me to improve and I am extremely grateful

http://stackoverflow.com/q/27968746
has comment: http://stackoverflow.com/comment/44330699
has comment: http://stackoverflow.com/comment/44333233
has comment: http://stackoverflow.com/comment/44331763
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/44333002
tagged with: google-maps
tagged with: javascript
tagged with: jquery
tagged with: google-maps-api-3
score: 0
has comment: http://stackoverflow.com/comment/44331635
has body: I have a page with a gmap3 map display and one marker with an address set: $("#map_canvas").gmap3({ map: { options: { maxZoom: 15, draggable: false, scrollwheel: false, scaleControl: false, streetViewControl: false, panControl: false, mapTypeId: google.maps.MapTypeId.HYBRID, //panControlOptions: { // position: google.maps.ControlPosition.RIGHT_CENTER //}, zoomControl: false, //zoomControlOptions: { // style: google.maps.ZoomControlStyle.LARGE, // position: google.maps.ControlPosition.LEFT_CENTER //}, mapTypeControl: false } }, infowindow: { address: venueAddress, options: { content: markerInfo } }, marker: { address: venueAddress } }, "autofit"); What I'd like, is that when the marker is clicked by the user (or the text that appears in the infoWindow of the marker (this may be more correct)), that the user is sent to a google map page where they can get directions to this address. I can construct the HTML in the 'content' of the infoWindow's options, so constructing an anchor with an href to something like www.google.com/maps/ may be the way, but I'm not sure if there's a standard URL to use when doing this.
tagged with: jquery-gmap3
has title: gmap3 click marker for directions
type: UnansweredQuestion

http://stackoverflow.com/q/28086542
has title: Adding multiple dynamic values with jQuery and outputting results
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28086656
score: 1
upvote count: 1
type: Question
has body: So my issue is that I am trying to add a bunch of numbers from different boxes that change based on their dropdown, the dropdown bit is all good now I can't add the result :(! Here is my attempt so far: option 1 option 2 option 1 option 2 total: and the JS: var netprice = 0; $("#discount\\[0\\]").change(function () { $("#postdiscount\\[0\\]").val(this.value); $(".prices").each(function(index, obj){ netprice += index.value; }); $("#netpricestotal").text(netprice); }); $("#discount\\[1\\]").change(function () { $("#postdiscount\\[1\\]").val(this.value); $(".prices").each(function(index, obj){ netprice += index.value; }); $("#netpricestotal").text(netprice); }); jsfiddle: http://jsfiddle.net/t75ut97f/12/ Thanks! EDIT: Thanks guys, managed to fix it myself with Number() (http://jsfiddle.net/t75ut97f/16/) also see the accepted answer for alternative method using parseint.
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/28086645
has answer: http://stackoverflow.com/a/28086645
has answer: http://stackoverflow.com/a/28086656

http://stackoverflow.com/a/28105368
has body: This is a reference problem. console.log(myFunc(template, 3)); function myFunc(template, count) { var ports = {} for (var i = 0; i &lt; count; i++) { var portNumber = i + 1; ports[portNumber.toString()] = {portNumber:null, stuff:""}; ports[portNumber.toString()].portNumber = portNumber; } // console.debug(JSON.stringify(ports, null, 4)); return ports; }
score: 0
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/28105132
upvote count: 1

http://stackoverflow.com/comment/44482429
has text: @rwacarter yes it does work like that, it doesn't seem to like the spaces for some reason
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28049881

http://stackoverflow.com/q/28007574
downvote count: 0
tagged with: binary-data
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44403359
has title: Sending raw binary data via AJAX as BLOB
has comment: http://stackoverflow.com/comment/44403647
tagged with: xmlhttprequest
tagged with: php
has comment: http://stackoverflow.com/comment/44403485
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/44403354
type: Question
has body: I am trying to send binary data via blob... but it doesn't seem to be the same as when I base64 it before sending... Seems that somehow it is being converted from UTF8 to UTF16 in flight... or something... function upload(blobOrFile) { var xhr = new XMLHttpRequest(); xhr.open('POST', 'https://...:P', true); xhr.onload = function(e) { alert('ok'); }; // Listen to the upload progress. var progressBar = document.querySelector('progress'); xhr.upload.onprogress = function(e) { if (e.lengthComputable) { progressBar.value = (e.loaded / e.total) * 100; progressBar.textContent = progressBar.value; // Fallback for unsupported browsers. } }; xhr.send(blobOrFile); } upload(new Blob([binary_data_string], {type: 'application/octet-stream'})); What exactly am I missing / doing wrong? Real example good.dat - data received when sending it Base64 encoded and decoding via PHP - a good one. bad.dat - data received when it was sent without Base64 encoding - bad one.
has comment: http://stackoverflow.com/comment/44403379
tagged with: javascript
has comment: http://stackoverflow.com/comment/44403413
upvote count: 1

http://stackoverflow.com/q/28115890
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/28117012
has answer: http://stackoverflow.com/a/28116229
downvote count: 1
type: Question
has body: I'm helping a student out here. They have templates that contain an article with some anchor tags. These anchor tags represent "move up, move down, and remove". These articles will be dynamically changing location. What I am looking for is this: When an article is first on the page, the "Move Up" anchor should be removed. If an article is in the bottom/last position, the "Move Down" anchor should be removed. If the article is in a middle position, all anchors must be available. I know I can apply classes to the first and last articles on the page, but how can I specifically target those articles without them being in a list.
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28115989
has title: Target first and last article on a page
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44606149
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/28008397
has comment: http://stackoverflow.com/comment/44424209
tagged with: knockout.js
type: Question
tagged with: asp.net-mvc
has body: I have been told to build a web application using MVC4,Bootstrap and knockout.I am completely new to all three by the way.Please bear with me,as this might be long post.I have 3 pages : A creation page,A listing page and an Editing page.The creation page is working fine,but the listing page is where I am facing loads of problems.The listing page lists all the data. The first issue that I am facing here is that the deletion of data is happening,but I have to refresh the page to see the deletion update.Secondly,the edit button is not redirecting to the Edit page.I still am the list page itself. My controller public ActionResult Index(int? page) { Provider providerList = new Provider(); DAL DataAccess = new DAL(); IList<Provider> providers = DataAccess.GetListofProviders(); int pageSize = 5; int pageNumber = (page ?? 1); return View(providers.ToPagedList(pageNumber,pageSize)); } [HttpPut] public ActionResult Edit(int id) { DAL dataAccess = new DAL(); Provider provider = dataAccess.GetASingleProvider(id); return View(provider); } [HttpPost] public ActionResult Delete(int id) { DAL DataAccess = new DAL(); DataAccess.DeleteProvider(id); return RedirectToAction("Index"); } My JS Scripts For Delete and Edit self.Delete = function (Provider) { if (confirm('Are you sure you want to delete this row?')) { $.ajax({ url: "/Provider/Delete/" + Provider.ProviderID(), cache: false, type: 'POST', async: false, contentType: 'application/json; charset=utf-8', data: ko.toJSON(Provider.ProviderID()), success: function (data) { self.Providers.remove(Provider); } }).fail( function (xhr, textStatus, err) { alert(err); }); } } self.update = function (Provider) { $.ajax({ url: "/Provider/Edit/"+ Provider.ProviderID(), cache: false, type: 'PUT', contentType: 'application/json; charset=utf-8', data: ko.toJSON(Provider), success: function (data) { //alert(data); self.Providers.removeAll(); self.Providers(data); self.Provider(null); } }) .fail( function (xhr, textStatus, err) { alert(err); }; } E…
has title: Knockout and ASP.NET MVC 4
tagged with: javascript
has comment: http://stackoverflow.com/comment/44406738
score: 0
has comment: http://stackoverflow.com/comment/44419410
answer count: 1
has answer: http://stackoverflow.com/a/28019985
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44409947
tagged with: asp.net-mvc-4

http://stackoverflow.com/comment/44468450
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28029310
has text: Just updated the post with jsfiddle. I want the columns to reorder in way where green comes on top of blue for mobile devices without going for mobile first approach which means adjust HTML for mobile and use push/pull for desktops.

http://stackoverflow.com/comment/44521986
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28071145
has text: Whether you create them manually or in a loop, you must have multiple divs to open multiple dialogs.

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/27964327
tags question: http://stackoverflow.com/q/28055312
tags question: http://stackoverflow.com/q/28081914
type: Tag
tags question: http://stackoverflow.com/q/28003389

http://stackoverflow.com/comment/44393584
comment on: http://stackoverflow.com/q/28002261
type: Comment
type: QuestionComment
has text: possible duplicate of [Where can I find documentation on formatting a date in JavaScript](http://stackoverflow.com/questions/1056728/where-can-i-find-documentation-on-formatting-a-date-in-javascript)
score: 0

http://stackoverflow.com/q/28014082
accepted answer: http://stackoverflow.com/a/28014287
has comment: http://stackoverflow.com/comment/44415627
has comment: http://stackoverflow.com/comment/44415648
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28014288
score: 0
answer count: 3
has title: Countdown JS+PHP, what's wrong?
tagged with: jquery
tagged with: countdown
has answer: http://stackoverflow.com/a/28014450
has body: I'm trying to make this function work but i don't know what's wrong and i'm not really good at js. I want to do call my timer function with number of seconds to countdown from the span id "count". Example: Wait 5 secs <?php echo ' '; ?> What's wrong?
tagged with: php
has comment: http://stackoverflow.com/comment/44415664
has comment: http://stackoverflow.com/comment/44415474
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28014287
has comment: http://stackoverflow.com/comment/44415486
type: Question
has answer: http://stackoverflow.com/a/28014288

http://stackoverflow.com/a/28115922
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44610197
answers question: http://stackoverflow.com/q/28115714
upvote count: 2
has body: Your dependency array in controller is missing numerous dependencies passed to arguments .controller('FrameCtrl', [ 'Rootscope', function($scope, $state, $rootScope, Rootscope) { Should be .controller('FrameCtrl', ['$scope','$state', '$rootScope', 'Rootscope', function($scope, $state, $rootScope, Rootscope) { Sure seems confusing to me to name a service Rootscope!

http://stackoverflow.com/q/28047255
has comment: http://stackoverflow.com/comment/44476835
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/44477071
type: Question
has title: How do I run a Jquery method every midnight?
has comment: http://stackoverflow.com/comment/44476980
answer count: 2
has comment: http://stackoverflow.com/comment/44477008
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28047322
has answer: http://stackoverflow.com/a/28047328
score: 0
has comment: http://stackoverflow.com/comment/44476776
has comment: http://stackoverflow.com/comment/44477070
has comment: http://stackoverflow.com/comment/44476999
has comment: http://stackoverflow.com/comment/44477276
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44477031
tagged with: php
has comment: http://stackoverflow.com/comment/44477183
has comment: http://stackoverflow.com/comment/44476777
has body: I'm using CodeIgniter. I have a PHP function called AddPenalty(); in my controller. Now in my jQuery I'd do something like this: var DueDate; //this should have a Date Value var d = new Date(); var month = d.getMonth()+1; var day = d.getDate(); var now = d.getFullYear() + '/' + ((''+month).length&lt;2 ? '0' : '') + month + '/' + ((''+day).length&lt;2 ? '0' : '') + day; if(DueDate == now){ AddPenalty(); //call this function from controller } I want this script to be executed every Midnight. How should I do it? Also, how do I call controller function AddPenalty() in my jQuery?

http://stackoverflow.com/a/28005185
type: Answer
has body: One way would be something like this: var mydict = [ { words: ['go','walk','run','sprint','move'], task: 'move' }, { words: ['eat','consume'], task: 'eat' } ]; Then just iterate over it and check if your input command is in any of the objects' words array.
has comment: http://stackoverflow.com/comment/44399041
score: 2
has comment: http://stackoverflow.com/comment/44398984
downvote count: 0
answers question: http://stackoverflow.com/q/28005156
has comment: http://stackoverflow.com/comment/44399089
upvote count: 2

http://stackoverflow.com/a/28043511
score: 4
upvote count: 4
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/28043338
has body: You can rearange your code to this function a() { this.b = function() { alert('reached'); } } now instantiate it and run: c = new a(); c.b();

http://stackoverflow.com/q/28062805
tagged with: internet-explorer
tagged with: javascript
has comment: http://stackoverflow.com/comment/44507192
has title: Cookie is not set in Internet Explorer, gives an error
has comment: http://stackoverflow.com/comment/44506997
has body: I have been using the below code, to create a cookie, this works completely fine in all the browsers except INTERNET EXPLORER.. it gives the below error when i click on create cookie button. Error Message: '$' is undefined Line: 4 Char: 2 Code: 0 URI: http://localhost/js/scripts.js Code Click on the Set Cookie button below to create the testing cookie. <button style="color: black" input type="button" onclick="set_cookie(<?php echo "'".$set_cookie_url."'" ?> );" <?php if(isset($_COOKIE["cookieid"])) { ?> Disabled <?php } ?>value='Set Cookie'>Set cookie JS Code function set_cookie(url){ $.get( url, { cookieid: "628929", projectid: "1" }, set_cookie_complete); $('body').modal('show') ; } function set_cookie_complete(){ location.reload(); } function unset_cookie(url){ $.get( url, { cookieid: "628929", projectid: "1" }, unset_cookie_complete); $('body').modal('show') ; } function unset_cookie_complete(){ location.reload(); } can anybody help me to get rid of this error and set the cookie
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44506939
has comment: http://stackoverflow.com/comment/44507472
tagged with: php
has answer: http://stackoverflow.com/a/28063667
accepted answer: http://stackoverflow.com/a/28063667
type: AnsweredQuestion
downvote count: 0
tagged with: cookies
score: 1
type: Question
has comment: http://stackoverflow.com/comment/44507660
has comment: http://stackoverflow.com/comment/44507074
has comment: http://stackoverflow.com/comment/44507294

http://stackoverflow.com/comment/44411445
score: 0
has text: What I've given here is an oversimplification. The point I'm trying to make here is that whatever code I'm writing inside the evaluate doesn't seem to work. Even I've tried returning a string and capturing it outside, but that didn't work. I'm trying to figure out what I'm doing wrong here and would love to understand how to get this working.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28008063

http://stackoverflow.com/comment/44540434
type: QuestionComment
comment on: http://stackoverflow.com/q/28080316
has text: You assumed that you know better. My question was specific not like your duplicates. And I got mine answered unike your duplicates.
score: 0
type: Comment

http://stackoverflow.com/comment/44513032
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28066509
has text: Hi Jessica, can you provide a fiddle so that we can see whats going on, http://jsfiddle.net/ Dont forget to include a cdn link for flot js in the Fiddle.

http://stackoverflow.com/q/28100065
accepted answer: http://stackoverflow.com/a/28100087
has title: prototype method is not a function,why?
score: 2
has comment: http://stackoverflow.com/comment/44579270
downvote count: 1
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/28100087
type: Question
has body: (function(){ test(); }()); function Class(){ this.prop = 'hi'; } Class.prototype.mod = function(num){this.prop = num;} function test(){ var c = new Class(); c.mod('now'); // it'll say it's not a function alert(c.prop); // it's work } I wanna move function and class out to ready function to make code clean up and save memory, but I found the class method does not work. If I moved prototype to test function, it work, like (function(){ test(); }()); function Class(){ this.prop = 'hi'; } function test(){ Class.prototype.mod = function(num){this.prop = num;} var c = new Class(); c.mod('now'); // it's ok alert(c.prop); } why I must to move prototype method to test or ready function?
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44575835
favorite count: 0

http://stackoverflow.com/comment/44429922
type: QuestionComment
has text: I don't understand why so many people on SO try to use objects like they are arrays. Why can't you just declare items as an array?
comment on: http://stackoverflow.com/q/28021832
score: 0
type: Comment

http://stackoverflow.com/comment/44449443
type: Comment
has text: Use CSS media queries? I don't think it's possible to have a media query control a javascript function, unless there's a method I'm not aware of.
comment on: http://stackoverflow.com/a/28031428
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44485803
type: Comment
comment on: http://stackoverflow.com/a/28050872
has text: +1 for mentioning tail-recursion, it helped me to realise recursion has to do more with how problem is solved rather than maintaining stacks. Also I learned something new: anonymous recursion, maybe you too will find it interesting. http://en.wikipedia.org/wiki/Anonymous_recursion
type: AnswerComment
score: 1

http://stackoverflow.com/comment/44608851
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28116828
score: 0
has text: Sorry about that @adeneo - Went ahead and got more info in there for you.

http://stackoverflow.com/comment/44612246
type: Comment
type: QuestionComment
has text: Nope :( that didn't work. When I do io.on('connect'.... it spits out "connected: false, disconnected: true"
comment on: http://stackoverflow.com/q/28118695
score: 0

http://stackoverflow.com/comment/44551768
has text: Can you show what your URL looks like
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28087344

http://stackoverflow.com/a/27982062
has comment: http://stackoverflow.com/comment/44355585
has body: Let's look at what happens here: var log = function(args) { var f0 = function() { return console.log(args); }; return function(f1) { return function() { f0(); return f1; }; }; }; And inline just a bit: var log = function(args) { return function(f1) { return function() { console.log(args); return f1; }; }; }; So we're returning a function f which accepts a function f1, and returns a function g which does logic and returns f1. Quite a mouthful! Your question is why does (log('1'))(log('2'))(log('3')); Log 1. I did away with the log('4') since going to 3 is enough to show your described case. To answer that let's play compiler and do the inlining game! (log('1'))(log('2'))(log('3')) // =&gt; ( function (f1) { return function () { console.log('1'); return f1; } } )( function (f1) { return function () { console.log('2'); return f1; } } )( function (f1) { return function () { console.log('3'); return f1; } } ) Simple substitution. I took each instance of log(something), replaced it with the contents of the function, replaced the argument with the value passed. Let's do it again! ( function () { console.log('1'); return function (f1) { return function () { console.log('2'); return f1; } }; } )( function (f1) { return function () { console.log('3'); return f1; } } ) This one is a bit trickier to follow: I expanded the first function call. The topmost function received an argument f1 to which we just supplied a value, so I went into the function and replaced every occurrence of f1 with the given value (the result of log('2')), just like with the log argument. Look over what happened here again if you still don't follow, but my suggestion is doing it yourself: Copy the snippet into your favourite code editor and do the expansion yourself. Now you may see why the log('1') was called. The next thing we, the compiler, need to do is take care of the next function call. And whadya know, the first line in that function is a console.log! Better do it! What can we do!? I don't know H…
answers question: http://stackoverflow.com/q/27980706
type: Answer
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/44355442
upvote count: 6
has comment: http://stackoverflow.com/comment/44359829
has comment: http://stackoverflow.com/comment/44355840

http://stackoverflow.com/comment/44489546
comment on: http://stackoverflow.com/q/28053774
score: 1
type: Comment
type: QuestionComment
has text: It's possible but not desirable. It's an object you can iterate it recursively.

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/27990302
tags question: http://stackoverflow.com/q/28014605

http://stackoverflow.com/comment/44329887
comment on: http://stackoverflow.com/q/27968076
type: Comment
type: QuestionComment
has text: @FrédéricHamidi - so I put breakpoints on lines logging `histogram[1]`, `histogram`, and `histogram[1]` again, and at all points the histogram that got logged said `contents` was zero. I then removed the break points and it logged as NaN again...
score: 0

http://stackoverflow.com/comment/44554944
score: 0
type: AnswerComment
has text: Make sure the call to reload is inside the promise success function. Do you receive any JavaScript errors? Also to confirm, is the users table loading successfully?
type: Comment
comment on: http://stackoverflow.com/a/28081536

http://stackoverflow.com/q/28064397
has comment: http://stackoverflow.com/comment/44509372
tagged with: accordion
score: 0
has comment: http://stackoverflow.com/comment/44509126
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44509467
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/44509413
has comment: http://stackoverflow.com/comment/44509567
has comment: http://stackoverflow.com/comment/44509346
has title: JavaScript for loop only looping once
has comment: http://stackoverflow.com/comment/44509209
type: Question
has body: I have a for loop in JavaScript, which is looping through to set the values in a CSS Menu Accordion. It's setting the first one correctly, but it's not continuing through the loop, and I can't seem to figure out why or where it's stopping. It's getting to the end of the first loop as I've checked with outputting to the console. I know I shouldn't really be setting the ID as a number, but for the moment it's the best idea I have as to how to set the ID incrementing without loads of code. The JavaScript function is: function displayInfo() { x=xmlDoc.getElementsByTagName("blogPost"); var count = 1; document.getElementById("start").id = count; total = x.length; for(i=0; i<total;i++) { document.getElementById(count).id = count; title=(x[i].getElementsByTagName("postTitle")[i].childNodes[i].nodeValue); document.getElementById("title").href=title; document.getElementById("title").innerHTML=title; text=(x[i].getElementsByTagName("postText")[i].childNodes[i].nodeValue); document.getElementById("text").innerHTML=text; quote=(x[i].getElementsByTagName("postQuote")[i].childNodes[i].nodeValue); document.getElementById("quote").innerHTML=quote; link=(x[i].getElementsByTagName("postLink")[i].childNodes[i].nodeValue); document.getElementById("link").innerHTML=link; date=(x[i].getElementsByTagName("postDate")[i].childNodes[i].nodeValue); document.getElementById("date").innerHTML=date; tags=(x[i].getElementsByTagName("postTags")[i].childNodes[i].nodeValue); document.getElementById("tags").innerHTML=tags; count = count + 1; } } This runs on and then the values are set in I'm not sure if it's because it's being called on page load, but wherever else I put it it doesn't work as expected and this is the closest I've got. Thanks for any help on where I've gone wrong!
has comment: http://stackoverflow.com/comment/44510402
has comment: http://stackoverflow.com/comment/44509124
has comment: http://stackoverflow.com/comment/44509852
tagged with: javascript
has comment: http://stackoverflow.com/comment/44509793

http://stackoverflow.com/comment/44334068
has text: I`m not sure how to do that, never actually touched the web.config file. If you'll show me i`ll make sure you get the 25 points you deserve. :)
type: AnswerComment
comment on: http://stackoverflow.com/a/27970365
score: 0
type: Comment

http://stackoverflow.com/comment/44359911
type: Comment
comment on: http://stackoverflow.com/a/27984299
score: 0
type: AnswerComment
has text: @Denise it works well for me. http://jsfiddle.net/s1xky4yu/1/ in console I get `-0.0001899999988381751`

http://stackoverflow.com/comment/44368954
type: Comment
comment on: http://stackoverflow.com/a/27988914
has text: Assuming Current Target is the ins marked as clicked above, I don't think `find()` will work because the ` ` element does not wrap anything.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27972593
has body: Looking at the definition of the extend method, you can see it building up and returning a variable called Class. You should picture your methods as running on an instance of that Class (meaning that this.prototype === Class.prototype). With that in mind, you can see that this Class itself is being assigned to Class.prototype.constructor: proto = Class.prototype = o_create(this.prototype); proto.constructor = Class; So you can access this Class using this.constructor, and furthermore, the constructor of the parent class is being (as you noted) assigned to the .superclass property of Class: Class.superclass = this; So I believe that the answer you seek is simply: this.constructor.superclass Observe: http://jsfiddle.net/99gvpqzx/1/
has comment: http://stackoverflow.com/comment/44371135
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44372874
accepted answer of: http://stackoverflow.com/q/27971548
type: Answer
answers question: http://stackoverflow.com/q/27971548
downvote count: 0
score: 1

http://stackoverflow.com/a/28043059
has body: If you pass in the equations to the directives scope as well, you can have access to them: (function(){ var app = angular.module('mathDocument', []); app.directive('equation', function(){ return { restrict: 'E', scope: { label: '@label', equations: '=' }, templateUrl: 'eqnElement.html', }; }); app.controller("DocumentController", function($scope){ $scope.equations = { "mainresult": { labeled: true, label: 'mainresult', body: 'e^{i\\pi} = -1', } }; }); })(); When calling the directive: &lt;equation equations="equations" label="mainresult"&gt;&lt;/equation&gt; And eqnEquation.html: &lt;div&gt; {{ equations[label].body }} &lt;/div&gt;
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44470114
type: Answer
has comment: http://stackoverflow.com/comment/44470340
has comment: http://stackoverflow.com/comment/44469871
has comment: http://stackoverflow.com/comment/44469717
accepted answer of: http://stackoverflow.com/q/28042928
has comment: http://stackoverflow.com/comment/44489243
score: 1
answers question: http://stackoverflow.com/q/28042928
upvote count: 1
has comment: http://stackoverflow.com/comment/44486764

http://stackoverflow.com/comment/44774960
type: QuestionComment
has text: Few months ago I read [this article](http://moz.com/ugc/can-google-really-access-content-in-javascript-really), it may help you.
score: 0
comment on: http://stackoverflow.com/q/28079248
type: Comment

http://stackoverflow.com/comment/44553808
score: 0
comment on: http://stackoverflow.com/q/28088120
type: Comment
type: QuestionComment
has text: In order to speed the page up you could set the attribute defer="defer" of the script-tag to tell the html-parser that there is no document.write operation in it so do not execute it before everything has loaded.Otherweise a script might stop every following request before it's executed. Consider that this attribut can be ignored too by browsers

http://stackoverflow.com/a/28054563
has body: with ui-router at least you can do abstract: true to set the route to no template and stack controllers onto views for separated behavior. https://github.com/angular-ui/ui-router/wiki/Nested-States-%26-Nested-Views otherwise, with vanilla angularjs, theoretically you could just do template : "" if you wanted to load a controller with no template. http://weblog.west-wind.com/posts/2013/Oct/15/Routing-to-a-Controller-with-no-View-in-Angular
score: 0
has comment: http://stackoverflow.com/comment/44494917
has comment: http://stackoverflow.com/comment/44498356
has comment: http://stackoverflow.com/comment/44540068
has comment: http://stackoverflow.com/comment/44495675
type: Answer
has comment: http://stackoverflow.com/comment/44534159
has comment: http://stackoverflow.com/comment/44495823
answers question: http://stackoverflow.com/q/28054348
has comment: http://stackoverflow.com/comment/44495588

http://stackoverflow.com/comment/44572238
comment on: http://stackoverflow.com/q/28097320
type: Comment
type: QuestionComment
has text: Hmm, I can't, but maybe someone else can? toJson: function (a,b){var c=a||null,e,k=b||0;e=(Qb(),new zn);var f=db(this),g,p;g=new wo;p=bc(f.e);e=wt(e,p,f,g);null!=c?(f={},f.appId=c,f.revision=k,f.data=e,c=pc(f)):c=pc(e);return c}
score: 0

http://stackoverflow.com/comment/44539738
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28080460
has text: woot! :D kk... now time to see if I can get that working on classes
type: Comment

http://stackoverflow.com/q/28029234
linked to: http://stackoverflow.com/q/10523701
accepted answer: http://stackoverflow.com/a/28029270
has body: When I make array object named "name", type automatically changes to "String", not "Array". Why? &lt;body&gt; &lt;script&gt; console.log('---------------------------------'); var name1 = ['abc', 'def']; console.log(name1); console.log(typeof name1); console.log('---------------------------------'); var name = ['ghi', 'jkl']; console.log(name); console.log(typeof name); &lt;/script&gt; &lt;/body&gt; Result in Chrome(Mac): --------------------------------- ["abc", "def"] object --------------------------------- ghi,jkl string // &lt;- Why?
duplicate of: http://stackoverflow.com/q/10523701
upvote count: 3
type: Question
type: AnsweredQuestion
score: 3
tagged with: javascript
linked to: http://stackoverflow.com/q/21395941
has comment: http://stackoverflow.com/comment/55798303
has title: Why global variable 'name' changes to string?
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/28029270
favorite count: 0

amazon-elastic-beanstalk
tag name: amazon-elastic-beanstalk
type: Tag
tags question: http://stackoverflow.com/q/27980478

http://stackoverflow.com/comment/44537951
type: AnswerComment
score: 0
type: Comment
has text: You don't even have to insert the images; added sample code.
comment on: http://stackoverflow.com/a/28079599

http://stackoverflow.com/comment/44437574
type: AnswerComment
comment on: http://stackoverflow.com/a/28025801
type: Comment
score: 1
has text: do you see my example? I made it for you. Try it out, it should work. It is callback version of your code

http://stackoverflow.com/comment/122659848
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/69131980
has text: Indeed, though this answer is very "basic" it also show that props aren't limited to only be passed by parents, they can even be variables coming from another application such a backend in Java
score: 0

http://stackoverflow.com/a/27973375
has comment: http://stackoverflow.com/comment/44348830
answers question: http://stackoverflow.com/q/27971811
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44392139
has comment: http://stackoverflow.com/comment/44385621
has body: I'm pleased that you find my angular service usefull. In your sample you seems to mess up with parameter order : MediaSrv.loadMedia(filePath, mediaSuccess, null, status) vs function loadMedia(src, onError, onStatus, onStop) BTW, play parameter numberOfLoops does not seems to work (at least on my nexus4). If you want to loop, you will need to call play() every time the mp3 ends. Here is a short example : var myMedia = null; MediaSrv.loadMedia( 'sounds/1023.mp3', function onError(err){ console.log('onError', MediaSrv.getErrorMessage(err)); }, function onStatus(status){ console.log('onStatus', MediaSrv.getStatusMessage(status)); }, function onStop(){ console.log('onError'); myMedia.play(); }, ).then(function(media){ myMedia = media; myMedia.play(); }); With this code, your sound should play, forever... To control when your sound should stop, I suggest you to add a control parameter, like this : var myMedia = null; var shouldPlay = false; MediaSrv.loadMedia( 'sounds/1023.mp3', function onError(err){ console.log('onError', MediaSrv.getErrorMessage(err)); }, function onStatus(status){ console.log('onStatus', MediaSrv.getStatusMessage(status)); }, function onStop(){ console.log('onError'); if(shouldPlay){myMedia.play();} }, ).then(function(media){ myMedia = media; }); function playStart(){ shouldPlay = true; myMedia.play(); } function playStop(){ shouldPlay = false; myMedia.stop(); } To play multiples files in a loop, you have to store all media references and play them successively. See there : var shouldPlay = false; var playingMedia = null; var soundFiles = ['sounds/1.mp3', 'sounds/2.mp3', 'sounds/3.mp3']; var mediaInstances = []; var onPlayStop = function(){ if(shouldPlay){ if(playingMedia === null){ playingMedia = 0; } else { playingMedia = (playingMedia+1) % mediaInstances.length; } mediaInstances[playingMedia].play(); } }; for(var i in soundFiles){ MediaSrv.loadMedia(soundFiles[i], null, null, onPlayStop).then(function(media){ mediaInstances.push(media); }); } funct…
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/44413189
has comment: http://stackoverflow.com/comment/44391939

http://stackoverflow.com/q/28053999
has title: non-cacheable reported in my chrome extension, how to make "cacheable"?
has comment: http://stackoverflow.com/comment/44491375
has answer: http://stackoverflow.com/a/28055758
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44491474
has comment: http://stackoverflow.com/comment/44489899
has comment: http://stackoverflow.com/comment/44491833
has body: I'm learning to write a chrome extension. I want to inject a real-time time-stamp in current webpage. I've already finished manifest.json, and html file as background. This html file will call a js file to get current time and display it. While I do audits in chrome, it says: The following resources are explicitly non-cacheable. Consider making them cacheable if possible:clock.html, ccc.js, cbd.js. Here are contents of these three files: (1) clock.html (2) ccc.js function startTime() { var today=new Date(); var h=today.getHours(); var m=today.getMinutes() var s=today.getSeconds(); var w=today.getMilliseconds()%1000; h=checkTime(h); m=checkTime(m); s=checkTime(s); w=checkMS(w); document.getElementById('showme').innerHTML=h+":"+m+":"+s+":"+w; t=setTimeout('startTime()',1); } function checkTime(i) { if (i<10) {i="0" + i;} return i; } function checkMS(i) { if((i>9)&&(i<100)) i="0" + i; else if(i<10) i="00" + i; else {} return i; } (3)cbd.js: window.addEventListener("load", startTime); How to make them cacheable...? Thanks!
score: 0
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/44489970
type: Question
has comment: http://stackoverflow.com/comment/44490028
tagged with: javascript
has comment: http://stackoverflow.com/comment/44491197
has comment: http://stackoverflow.com/comment/44491264
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/44654053
has text: Thanks @RickyAYoder your solution is also a good one.
type: QuestionComment
comment on: http://stackoverflow.com/q/28103116
type: Comment
score: 0

http://stackoverflow.com/comment/44438510
type: QuestionComment
score: 2
has text: The `slide()` function, as posted, has a syntax error.
comment on: http://stackoverflow.com/q/28026584
type: Comment

http://stackoverflow.com/comment/44589103
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28107345
has text: Also, in the spirit of json response, the json should look like `{'status':'ok','error':0}` or `{'status':'bad','error':20}`. Than you check `if (data.status=='ok') { ... }`
score: 0

snap.svg
tags question: http://stackoverflow.com/q/28071265
tags question: http://stackoverflow.com/q/28065163
tags question: http://stackoverflow.com/q/28077708
type: Tag
tags question: http://stackoverflow.com/q/28029773
tags question: http://stackoverflow.com/q/28005424
tags question: http://stackoverflow.com/q/28038451
tag name: snap.svg
tags question: http://stackoverflow.com/q/28092100

http://stackoverflow.com/comment/44372230
type: QuestionComment
has text: Thank you ill try that out, I had no idea that this was a thing now
type: Comment
comment on: http://stackoverflow.com/q/27990642
score: 0

http://stackoverflow.com/a/27971331
type: Answer
has body: Use the contentStory ID to locate it $('#contentStory').ttwMusicPlayer(myPlaylist, { autoPlay:false, description:description, jPlayer:{ swfPath:'music-player/plugin/jquery-jplayer' //You need to override the default swf path any time the directory structure changes } });
has comment: http://stackoverflow.com/comment/44335608
score: 1
answers question: http://stackoverflow.com/q/27971265
has comment: http://stackoverflow.com/comment/44335998
upvote count: 1
has comment: http://stackoverflow.com/comment/44335908
downvote count: 0

http://stackoverflow.com/comment/128194932
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28041115
has text: I agree with @Dominik, i don't think SPA framework like VueJs are capable of delivering different page component from the backend based on user permission, the idea behind SPA is to avoid calling the backend for each page html but just for page data/content

http://stackoverflow.com/comment/44608630
comment on: http://stackoverflow.com/q/28099655
has text: How about creating a custom registry with your overlay and include that as a maptype..Default UI should give u the button and/or the label to show/hide it.. https://developers.google.com/maps/documentation/javascript/maptypes#MapTypeRegistry
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27992899
upvote count: 1
has comment: http://stackoverflow.com/comment/44376745
has comment: http://stackoverflow.com/comment/44376749
tagged with: unit-testing
has title: How to Unit Test a Feature Testing Function
type: Question
has comment: http://stackoverflow.com/comment/44376912
has comment: http://stackoverflow.com/comment/44376643
tagged with: browser-feature-detection
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/44376844
tagged with: javascript
score: 1
favorite count: 0
has body: I am curious if there is a best practice (if any at all) with trying to unit test a feature test. For example, if I have a function called isStyleSupported that detects if a CSS property is supported in the current browser, how can I reliably unit test this function knowing the results would be different in different browsers. The only thing I can think of is sniffing out the specific browser and then comparing the function's return value with what is expected for that browser. However, it seems like a bad approach given the fact that browser detection is bad practice. I've briefly looked at Modernizr to see what they do without any definitive answer as it's a lot to look through. Any ideas? Thanks.
has comment: http://stackoverflow.com/comment/44377047
has answer: http://stackoverflow.com/a/27993920
type: UnansweredQuestion

http://stackoverflow.com/a/28044213
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/28044000
has body: I'm afraid is a matter of Opera Mini configuration. Check if redirection is disabled in Opera &gt; Preferences &gt; Advanced &gt; Network I'm not sure you can override this.
type: Answer

http://stackoverflow.com/q/28014138
tagged with: javascript
tagged with: cocos2d-x
downvote count: 0
answer count: 1
favorite count: 0
tagged with: cocos2d-x-3.0
has body: I'm using Cocos2d-js v3.2 to create custom subclasses of cc.Sprite using extend(). The instances of that subclass are meant to be clickable (touchable) and require some calculations every frame. For the sake of code readability i would like to register the touch listeners and add scheduler callback inside of the constructor. This way whenever new sprite is created, it'll automatically be ready to use. I have two questions regarding this approach: Is registering listeners in constructor a best place to do such things? Constructor is called before the sprite is added to the node tree, so i'm worried if there might be some side side-effects which i'm not aware right now. When and where should I deregister the touch listeners/scheduler callback? When sprite is removed from the node tree, when it becomes invisible or when the object is destroyed Code: var MySprite = cc.Sprite.extend({ ctor: function () { this._super(); this.initUserInput(); this.initUpdates(); }, update: function (dt) { // Do some per-frame calculactions }, initUpdates: function(){ cc.director.getScheduler().scheduleUpdateForTarget(this, 1, !this._isRunning); }, initUserInput: function(){ var $this = this; var listener = cc.EventListener.create({ event: cc.EventListener.TOUCH_ONE_BY_ONE, onTouchBegan: function (touch, event) { var p = touch.getLocation(); var rect = $this.getBoundingBox(); if(!cc.rectContainsPoint(rect, p)) { return false; } }, onTouchEnded: function (touch) { }, onTouchMoved: function (touch) { } }); cc.eventManager.addListener(listener, this); } });
type: UnansweredQuestion
score: 1
has title: When to deregister event listeners and scheduled callbacks in Cocos2d-js 3.2
has answer: http://stackoverflow.com/a/28063021
upvote count: 1
tagged with: cocos2d-js
type: Question
has comment: http://stackoverflow.com/comment/45206221

http://stackoverflow.com/comment/44443590
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/28029270
has text: @tadman: There's [more of them](http://jibbering.com/faq/names/unsafe_names.html)… Though properly declared, all of those can serve as *local* variable names.

http://stackoverflow.com/comment/44352143
type: AnswerComment
comment on: http://stackoverflow.com/a/27978198
score: 0
type: Comment
has text: That partly fix my problem. Thank you.

http://stackoverflow.com/comment/44395933
has text: is there any specific reason you need to set the datatype dynamically?
comment on: http://stackoverflow.com/q/28003596
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28002888
tagged with: javascript
tagged with: jquery
upvote count: 1
downvote count: 0
answer count: 1
favorite count: 0
has title: Indented JQuery Selectable List - when number of indentation levels are not known beforehand
tagged with: css
has answer: http://stackoverflow.com/a/28003098
accepted answer: http://stackoverflow.com/a/28003098
type: AnsweredQuestion
has body: I am trying to make a selectable list with parent/child/grandchild/... indentations. Please see below: http://jsfiddle.net/hphvpxuo/1/ HTML code: Parent 1 - Lorem ipsum dolor sit amet Child 1.1 - consectetur adipiscing elit Child 1.2 - Integer nec odio CSS code: .level-1 { margin-left: .25em; margin-bottom: 1px; } .level-2 { margin-left: 1em; } Javascript code: [Please see jsfiddle] Is it possible to dynamically define CSS stylings based on the depth of children you have? In the example above, I only have parent/child levels shown (level-1 and level-2 only) - and I have defined "margin-left" appropriately for these two levels. But, the actual number of levels can only be determined during runtime - e.g. I may need 5 levels of indentation (up to "level-5") or more. Is it possible to dynamically define indentations (through CSS or not), if I don't know how many indentations I need before hand? Thanks everyone.
score: 1
type: Question
tagged with: jquery-ui

http://stackoverflow.com/a/28006890
has body: The closest div doesn't contain .similarity_points as a descendent. You could use this: self.closest('div').parent().find('.similarity_points').text('10'); But, be aware that code which is highly dependant on the structure of the DOM is also fragile.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28006854
upvote count: 1
answers question: http://stackoverflow.com/q/28006854
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/28012980
score: 1
has comment: http://stackoverflow.com/comment/44414295
has comment: http://stackoverflow.com/comment/44414836
has body: It's default behaviour of the form. For chat-like app, you should use ajax. Not only for posting the form data, but also for receiving messages from backend app. Otherwise, you'll have to reload a page to check whether or not you got some new messages. With jQuery you could use event.preventDefault() to stop the default action of the form to be triggered, and then post the data to PHP. You should split your app to 2 files. Main page, and file, where all the data is sent to (and received from). Your front end: &lt;?php session_start(); // rest of the PHP, if any... ?&gt; &lt;form method="POST"&gt; &lt;textarea id="chat_area" name="chat_text" cols="50" rows="1"&gt;&lt;/textarea&gt; &lt;input id="chat_submit" type="submit" name="submit" value="Posten"&gt; &lt;/form&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function(){ $('#chat_submit').on('click', function(e){ e.preventDefault(); $.ajax({ type : "POST", url : 'your_php_file.php', dataType : 'text', data :{ message : $('#chat_area').val() }, success : function(data){ if(data == 'success'){ // E.g.: append the message to chat area after it is successfully stored in DB. } }, complete : function(status){ // call on complete }, error : function(response){ // call when error } }); }); }); &lt;/script&gt; PHP (your_php_file.php): &lt;?php session_start(); include_once("database.php"); if( isset($_POST["message"]) ){ $name = $_SESSION["firstname"]; $time = "[" . date( "H:i", time() + 3600 ) . "]"; // a little of safety: $unsafe_message = trim($_POST["message"]); $safe_message = mysql_real_escape_string($unsafe_message); mysql_query ( "INSERT INTO chat( name, time, message ) VALUES ('$name', '$time', '$safe_message' )" ) or die('error'); echo 'success'; }else{ echo 'error'; } ?&gt;
has comment: http://stackoverflow.com/comment/44413659
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28012839
type: Answer
has comment: http://stackoverflow.com/comment/44414678
answers question: http://stackoverflow.com/q/28012839
upvote count: 1

http://stackoverflow.com/comment/44386032
type: Comment
has text: but there may another problem will be generate let your user want to deselect any option.. your option switch fine but in text box text still remain.. but this problem i leave you to solve your own
type: AnswerComment
score: 1
comment on: http://stackoverflow.com/a/27998041

http://stackoverflow.com/q/27982320
score: 0
answer count: 3
tagged with: asp.net-web-api
tagged with: query-string
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/27983433
has answer: http://stackoverflow.com/a/27983433
has answer: http://stackoverflow.com/a/27984599
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27982368
type: Question
has title: Fill select element using Angular based on query string parameter
has body: I need to fill select element with data retrieved from web api I use attribute routing for web api api/project/{pid}/users It works fine, if when pass parameter pid manualy. I need to pass parameter through querystring using angular $http.get() I tried this this.getItems = function () { return $http({ url: '/api/project/{pid}/users', method: 'GET', data: $.param({pid:123}) }); } In fiddler I got 404 error. http://localhost/api/project/%7Bpid%7D/users I read about $location.$Search and $routParam, but I need additional help.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27982368

http://stackoverflow.com/a/28010715
type: Answer
answers question: http://stackoverflow.com/q/28010579
upvote count: 1
has body: One problem is you have multiple divs w/ the same ID (Con1). Also your ID's and class names should be lower-cased. Another is you need href attribute on your anchor tags. You also need a wrapper to contain the sections that you'll be moving Up Down Some textSome textSome textSome textSome textSome textSome textSome Up Down Some textSome textSome textSome textSome textSome textSome textSome jQuery $('#wrapper').on('click','a', function(e) { var $this = $(this); var $container = $this.closest('.container'); var count = $('#wrapper').find('.container').length; if ($this.hasClass('up')) { // check to see if we're on the top level - if we are, do nothing if (!$container.index() == 0) { $('#wrapper').prepend($container); } } else { // class id "down" if (count != $container.index() - 1) { $('#wrapper').append($container); } } });
score: 1
downvote count: 0

http://stackoverflow.com/comment/44554924
type: Comment
has text: Thank you, there is also a good article on velocity.js and GSAP http://www.smashingmagazine.com/2014/09/04/animating-without-jquery/
type: AnswerComment
comment on: http://stackoverflow.com/a/28088932
score: 1

http://stackoverflow.com/q/28102554
tagged with: date
type: Question
score: 0
has answer: http://stackoverflow.com/a/28102597
accepted answer: http://stackoverflow.com/a/28102597
answer count: 1
tagged with: javascript
tagged with: datetime
has title: How reset date milliseconds using pure js
type: AnsweredQuestion
has body: I'm using EJS to compare the current date and a event date (data from database). if (event[i].date &gt;= new Date()) { render this html } The problem is that event[i].date always have the milliseconds 0, example: Fri Jan 23 2015 00:00:00 GMT-0200 (BRST) And when i try to get the new Date(), now for example, this will happen: Fri Jan 23 2015 01:28:42 GMT-0200 (BRST) So, new Date() is greater then event[i].date, this will make the html not render.. How can i set to 0 the milliseconds of new Date()? Thanks!

http://stackoverflow.com/comment/44590066
has text: @kirti No that is not required , he can use any `url` and only it needs to be mapped in the sevlet. i guess his servlet might be inside some package and not visible to the form. so try to use `./scheduleMeet` in the form action
comment on: http://stackoverflow.com/q/28107255
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44325015
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27965908
has text: I can make a gridview. I can throw a fileupload control in it no problem. I can add a row. I guess I'm just confused about how to remove a control and replace it with another. And is a gridview even the right choice of control to hold these values.. I mean i'm not even using any databinding.

http://stackoverflow.com/comment/44343308
type: QuestionComment
has text: I think I'll cover the first part and I can add info to a form when submitted, not sure how to send the html in the span to the field and have it displayed before submissio.
comment on: http://stackoverflow.com/q/27975313
score: 0
type: Comment

http://stackoverflow.com/a/29227026
has comment: http://stackoverflow.com/comment/93987765
type: Answer
score: 88
has comment: http://stackoverflow.com/comment/94004155
has comment: http://stackoverflow.com/comment/94033717
has comment: http://stackoverflow.com/comment/74712132
has comment: http://stackoverflow.com/comment/94003794
has comment: http://stackoverflow.com/comment/46673006
downvote count: 1
upvote count: 89
has comment: http://stackoverflow.com/comment/138014799
has comment: http://stackoverflow.com/comment/94027494
has comment: http://stackoverflow.com/comment/94050827
has comment: http://stackoverflow.com/comment/94003447
has comment: http://stackoverflow.com/comment/63231903
has comment: http://stackoverflow.com/comment/63231599
has comment: http://stackoverflow.com/comment/69145853
accepted answer of: http://stackoverflow.com/q/28028297
has comment: http://stackoverflow.com/comment/93991043
answers question: http://stackoverflow.com/q/28028297
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/94056732
has comment: http://stackoverflow.com/comment/94030848
has comment: http://stackoverflow.com/comment/94044649
has body: You may have moved on by now, but... as far as I know there's no way to delete a history entry (or state). One option I've been looking into is to handle the history yourself in JavaScript and use the window.history object as a carrier of sorts. Basically, when the page first loads you create your custom history object (we'll go with an array here, but use whatever makes sense for your situation), then do your initial pushState. I would pass your custom history object as the state object, as it may come in handy if you also need to handle users navigating away from your app and coming back later. var myHistory = []; function pageLoad() { window.history.pushState(myHistory, "&lt;name&gt;", "&lt;url&gt;"); //Load page data. } Now when you navigate, you add to your own history object (or don't - the history is now in your hands!) and use replaceState to keep the browser out of the loop. function nav_to_details() { myHistory.push("page_im_on_now"); window.history.replaceState(myHistory, "&lt;name&gt;", "&lt;url&gt;"); //Load page data. } When the user navigates backwards, they'll be hitting your "base" state (your state object will be null) and you can handle the navigation according to your custom history object. Afterward, you do another pushState. function on_popState() { // Note that some browsers fire popState on initial load, // so you should check your state object and handle things accordingly. // (I did not do that in these examples!) if (myHistory.length &gt; 0) { var pg = myHistory.pop(); window.history.pushState(myHistory, "&lt;name&gt;", "&lt;url&gt;"); //Load page data for "pg". } else { //No "history" - let them exit or keep them in the app. } } The user will never be able to navigate forward using their browser buttons because they are always on the newest page. From the browser's perspective, every time they go "back", they've immediately pushed forward again. From the user's perspective, they're able to navigate backwards through the pages but not forw…
has comment: http://stackoverflow.com/comment/94015062
has comment: http://stackoverflow.com/comment/74689764

http://stackoverflow.com/q/28076755
has comment: http://stackoverflow.com/comment/44547830
answer count: 0
has comment: http://stackoverflow.com/comment/44533011
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44538713
tagged with: dom
score: 0
has title: How to inject full HTML doc, then DOM-manipulate injected code
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44538690
has body: My build is running Angular, so I have jqLite available for jQuery-esque DOM manipulation. Here's my current predicament: I have a full HTML document stored in a database or elsewhere. I'm trying to inject that HTML into an iframe, so the browser can render the injected HTML accurately. Currently, I'm doing this by binding srcdoc iframe attribute to a var in my model – and the injected page renders beautifully. The kicker: after injection, I want to be able to select and modify specific elements within that injection. How do I go about doing that? Do I need to include the injected HTML using a different method? Thanks!

http://stackoverflow.com/comment/44547356
type: QuestionComment
comment on: http://stackoverflow.com/q/28062472
score: 0
type: Comment
has text: This is what the Console shows me (derives it from angular.min.js) : ** ...gify(arguments[c]):arguments[c]);return Error(a)}}function Pa(b){if(null==b||Ga(... **

http://stackoverflow.com/comment/44666686
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28011831
has text: I tried this one to and it didn't make any differens from the original code, thanks anyway !

http://stackoverflow.com/comment/44568640
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28096302
has text: @Mike'Pomax'Kamermans: Running your example with inputs 10, 20 and 30 prints 16 16, 49 49 and 34 34
score: 0

http://stackoverflow.com/a/49316193
type: Answer
has body: If you read this in 2018 you can use Object.entries method function convertObjectToList(obj) { return Object.entries(obj); }
answers question: http://stackoverflow.com/q/27966020
score: 0

http://stackoverflow.com/a/28093639
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/28092353
has comment: http://stackoverflow.com/comment/44564278
type: Answer
accepted answer of: http://stackoverflow.com/q/28092353
upvote count: 1
has body: You can add this to your sortable options: over: function (event, ui) { if ($(ui.item).closest("ul").hasClass("interested")) { $(ui.item).detach().appendTo("#categories-source"); $(ui.item).css("width", "initial"); } else { $(ui.item).detach().appendTo("#categories-chosen"); $(ui.item).css("width", "210px"); $(ui.item).css("height", "initial"); } } It puts dragged element in proper ul depending if previous one had class interested. Update Also set proper dimensions to the dragged element (because left list is one per line). Fiddle
type: AcceptedAnswer

http://stackoverflow.com/q/27999383
upvote count: 3
linked to: http://stackoverflow.com/q/14913437
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28004947
type: UnansweredQuestion
tagged with: google-chrome
score: 3
tagged with: internet-explorer
downvote count: 0
has answer: http://stackoverflow.com/a/28005041
has body: Firefox requires using &lt;script type="application/javascript;version=1.7"&gt; to activate ES6 let statement support. Note: The let keyword is only available to code blocks in HTML wrapped in a &lt;script type="application/javascript;version=1.7"&gt; block (or higher version). XUL script tags have access to these features without needing this special block. However, it seems that this actually deactivates the whole script on both Internet Explorer and Chrome, as their debuggers do not show the script anymore. Example: http://embed.plnkr.co/7YvyDZfPRsijqrHJnhMf/preview Is there any way to use application/javascript;version=1.7 on IE/Chrome, or to use ES6 let on Firefox without the type attribute? Is there any hack to activate let statement support for all major browsers, while their implementations are not 100% standard-compliant?
type: Question
answer count: 2
tagged with: firefox
tagged with: javascript
favorite count: 0
has title: How to get `let` statement work on major three browsers?

http://stackoverflow.com/q/28120012
answer count: 2
possible better answer: http://stackoverflow.com/a/28120127
downvote count: 0
has answer: http://stackoverflow.com/a/28120127
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/28120061
upvote count: 2
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28120061
has title: Javascript Date() sometimes returning wrong value
has body: Sometimes while using this constructor I am getting incorrect values: new Date(year, month, day, hours, minutes, seconds, milliseconds); I'm sure it is something I'm doing incorrectly, but can't see it. This is what I'm doing: I have an array with month, day, and year indexes like this ["02", "29", "2015"] Then I am making a Date object like this date = new Date(dateArray[2], dateArray[0] - 1, dateArray[1], 0, 0, 0, 0); When I print the date object to the console, I get this: Sun Mar 01 2015 00:00:00 GMT-0700 (MST) Sometimes however it works as expected. Using this array: ["03", "15", "2015"] I get this: Sun Mar 15 2015 00:00:00 GMT-0600 (MDT) Can anyone see what I am doing incorrectly here? Thanks in advance
tagged with: date
type: Question

http://stackoverflow.com/q/28008172
tagged with: turbogears
tagged with: python
has title: How to translate JavaScript string in TurboGears
tagged with: internationalization
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/28013917
tagged with: javascript
type: UnansweredQuestion
has body: I can translate strings in python and html files. But When I translate JavaScript strings, I get this error in browser console: Uncaught ReferenceError: _ is not defined My setup.py: message_extractors={'wiki20': [ ('**.py', 'python', None), ('templates/**.html', 'genshi', None), ('public/javascript/index.js', 'javascript', None), ('public/**', 'ignore', None) ]}, JavaScript file content: $("#bulbunu2").html(_('jquery two add this..! bla2')); When I run python setup.py extract_messages, I see js strings in .pot file,(command generate JavaScript strings) but browser give error. How can I solve this problem?
type: Question

http://stackoverflow.com/comment/44584278
comment on: http://stackoverflow.com/q/28088984
score: 0
type: Comment
type: QuestionComment
has text: @matt-johnson I believe it depends on task. We have a web app, that needs exact map of TimeZoneInfo to moment.js. It uses both server-side and client-side time conversion. So we use Windows timezone data instead of IANA in momenbt.js. I agree that IANA timezones are more accurate, and this is one of the reasons, why sometimes we need exact conversion. Both IANA and Windows TZ data update over time, and not synchronously. I would just post code here to solve this particular issue. This is not about IANA. This is about Windows -> moment.js.

http://stackoverflow.com/q/28022558
has body: I'm trying to make grease monkey script that could remove certain lines in html like this for example XXX XXX XXX I want to remove tried something like this $('li:contains("actionListItem minion minion-0")').parent().remove(); I'm still new in scripting its not working. Help would be appreciated
duplicate of: http://stackoverflow.com/q/9169032
type: Question
has answer: http://stackoverflow.com/a/28022683
has answer: http://stackoverflow.com/a/28022687
tagged with: javascript
has comment: http://stackoverflow.com/comment/44431268
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/9169032
tagged with: jquery
has title: Create Greasemonkey script to Remove certain HTML lines when found
has comment: http://stackoverflow.com/comment/44432475
has comment: http://stackoverflow.com/comment/44431418
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44431471
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44397303
type: AnswerComment
score: 0
has text: Makes sense to me now. Thanks.
type: Comment
comment on: http://stackoverflow.com/a/28004406

http://stackoverflow.com/comment/44410251
type: Comment
has text: Thanks for your answer I changed according to you but it is not working.
score: 1
comment on: http://stackoverflow.com/a/28011319
type: AnswerComment

http://stackoverflow.com/comment/44578671
type: Comment
has text: And software should have only a single reason to break. Any change unrelated to the behaviour you have implemented shouldn't break that behaviour. It's all about code quality.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28101499

http://stackoverflow.com/a/28035909
has body: This code will do that: I've used the result from your JSON as hard coded object since Meteor couldn't be loaded as an external library. var showData = [ { "draw_date" : "2015-01-17T00:00:00", "winning_numbers" : "15 16 23 27 36 09", "multiplier" : "2" } , { "draw_date" : "2015-01-14T00:00:00", "winning_numbers" : "02 04 10 41 53 22", "multiplier" : "5" } , { "draw_date" : "2015-01-10T00:00:00", "winning_numbers" : "02 09 19 28 29 19", "multiplier" : "5" }]; //set a default option to the select. var html = " Select a date "; //iterate over each lottery drawing and add it to the select. //The date will be displayed, the index of the array element will be the value. showData.forEach(function(element, index){ var date = new Date(element.draw_date); html += " "+ date.getDate() + "/" + (parseInt(date.getMonth())+1) + "/" + date.getFullYear()+ " "; }); //insert the option into the select. document.getElementById("selectDate").insertAdjacentHTML("beforeend", html); //add an onchange event handler to the select. document.getElementById("selectDate").addEventListener("change", displayWinningNumbers, false); function displayWinningNumbers(e) { //when a option is selected, test the value. If 0 or higher return the array entry with the winning numbers. if(e.target.value >= 0) { alert(showData[e.target.value].winning_numbers); } }
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44466595
has comment: http://stackoverflow.com/comment/44926025
has comment: http://stackoverflow.com/comment/44458202
downvote count: 0
answers question: http://stackoverflow.com/q/28035709
type: Answer

http://stackoverflow.com/comment/44440161
type: QuestionComment
comment on: http://stackoverflow.com/q/28027302
score: 0
has text: Are you sure you are not doing some elaborations (i.e. regular expression replacements) to the string retrieved from load function? I've just tried a similar example and everything works fine. Could you please post your complete css file?
type: Comment

http://stackoverflow.com/comment/44613090
type: Comment
comment on: http://stackoverflow.com/a/28119403
has text: okay, thanks! :-) Any idea how I can write this function without using hundreds of lines?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44416399
type: Comment
type: QuestionComment
has text: Are you not "calling" the `active_links()` function? What problem are you having exactly?
comment on: http://stackoverflow.com/q/28014546
score: 0

http://stackoverflow.com/q/28003442
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/44396620
type: AnsweredQuestion
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/44396393
accepted answer: http://stackoverflow.com/a/28004012
type: Question
has comment: http://stackoverflow.com/comment/44395771
has body: A developer recently told me I could make ajax requests to php pages, have them return javascript methods and then have the client execute those methods. How is this done? A link to a relevant resources would be great too. Edit 5 years wiser, I would now try pretty hard never to do this. Any mechanism of this kind opens too much risk of cross-site scripting attacks. It's far safer to disable all inline javascript using appropriate headers, and find another way to achieve the desired functionality. If dynamically generated scripts are really required, they can be assembled on the server and included as external scripts: &lt;script src=/dynamic-script.php?param1=blah&amp;param2=ayyylmao&gt;&lt;/script&gt; In this example dynamic-script.php would use the parameters passed to it to generate the required javascript.
upvote count: 6
tagged with: javascript
has answer: http://stackoverflow.com/a/28004012
has title: Return javascript with AJAX
answer count: 1
has comment: http://stackoverflow.com/comment/44397495

http://stackoverflow.com/a/28090850
answers question: http://stackoverflow.com/q/28090350
has body: You have, at least, 3 basic options: use a headless browser, like PhantomJS, example: &gt;&gt;&gt; from selenium import webdriver &gt;&gt;&gt; driver = webdriver.PhantomJS() &gt;&gt;&gt; driver.get('http://stackoverflow.com') &gt;&gt;&gt; driver.title u'Stack Overflow' use a virtual display (see xvfb) with the help of pyvirtualdisplay, examples here: How do I run Selenium in Xvfb? Selenium with pyvirtualdisplay unable to locate element use a remote selenium server, either your own with setting up own nodes in a grid, or at, for example, BrowserStack, or Sauce Labs: &gt;&gt;&gt; from selenium import webdriver &gt;&gt;&gt; from selenium.webdriver.common.desired_capabilities import DesiredCapabilities &gt;&gt;&gt; &gt;&gt;&gt; desired_cap = {'os': 'Windows', 'os_version': 'xp', 'browser': 'IE', 'browser_version': '7.0' } &gt;&gt;&gt; driver = webdriver.Remote(command_executor='http://username:key@hub.browserstack.com:80/wd/hub', desired_capabilities=desired_cap) &gt;&gt;&gt; &gt;&gt;&gt; driver.get('http://stackoverflow.com') &gt;&gt;&gt; driver.title u'Stack Overflow'
downvote count: 0
upvote count: 8
type: Answer
score: 8

http://stackoverflow.com/q/28107338
has comment: http://stackoverflow.com/comment/44589022
has comment: http://stackoverflow.com/comment/44589066
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/44589782
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44589663
has comment: http://stackoverflow.com/comment/44591391
has comment: http://stackoverflow.com/comment/44596821
has comment: http://stackoverflow.com/comment/44589166
score: 1
has comment: http://stackoverflow.com/comment/44589233
has comment: http://stackoverflow.com/comment/44591287
favorite count: 0
tagged with: cordova
has title: Cordova/Phonegap - camera photo to fullscreen canvas - set dimensions
answer count: 0
type: UnansweredQuestion
upvote count: 1
has body: I am using the apache cordova camera plugin to return photos from native camera in a fullscreen canvas inside the app. How to specify correct targetWidth and targetHeight options for the camera in order to return a full viewport size (fullscreen) image? I am using the viewport height as targetHeight but it doesn't works well, the final photo dimension is not == to viewport height and it's less height than the viewport, (for example viewport = 400px and image took = 350px in height) : var picOptions = { 'quality': 85, 'encodingType': 0, //JPEG 'destinationType': Camera.DestinationType.DATA_URL,//base64 'targetHeight': window.outerHeight, 'cameraDirection': 0, //back, use 1 for front camera 'allowEdit': false, 'saveToPhotoAlbum': false }; navigator.camera.getPicture(function (data) { navigator.camera.cleanup(); }, function () { navigator.camera.cleanup(); }, picOptions); thanks
has comment: http://stackoverflow.com/comment/44589298
tagged with: dimensions
tagged with: camera

http://stackoverflow.com/comment/44390040
type: AnswerComment
comment on: http://stackoverflow.com/a/28000435
has text: This is why in javascript you should declare function variables at the top because javascript doesn't have block scope.
type: Comment
score: 0

http://stackoverflow.com/comment/44506601
comment on: http://stackoverflow.com/q/28062884
type: QuestionComment
type: Comment
has text: @Quentin Yeah... I probably do need a tutorial since I've never heard of Ajax lol. I hope someone will manage to find a simple solution, and if not, I suppose it's all right :)
score: 0

http://stackoverflow.com/comment/44559158
type: QuestionComment
comment on: http://stackoverflow.com/q/28089700
type: Comment
has text: type it into the console and see what it returns
score: 0

http://stackoverflow.com/a/29134898
score: 1
answers question: http://stackoverflow.com/q/28076350
downvote count: 0
has body: If by contain nothing and clear array you mean contain an empty array you simply do: self.currentPeople([]); On a side note, testing with if(someObservable) Will always return true, to test if it contains anything use "someObservable()". That will get the observables value instead of the wrapper. I am confused though by how self.currentPeople.removeAll() throws an error, could you post more of your code if the above solution does not work out for you, and clarify what you need? I am aware half of this answer should be a comment but I do not have the rep to do so yet.
type: Answer
upvote count: 1

http://stackoverflow.com/a/28001719
score: 0
type: Answer
has body: It is a browser-specific quirk if changes before the reload get displayed or not. IE is trying to optimize page rendering by delaying page updates until all page updating has stopped. Q: If the page is about to be discarded, should recent page updates be rendered? A1: No! A new page is coming, so simply display that. (IE) A2: Yes! The updates are what the user is going to be staring at while the new page is fetched from the server. (Chrome, Firefox, Opera, Safari) The solution, as you found with setTimeout(...,300), is to delay for a short interval before reloading the page. This forces page updates to be rendered, so that they can be visible during the delay interval. The delay can be shorter than 300ms. In fact, it can be 0 or omitted entirely. According to W3C standards, the interval is actually a minimum of 4ms. This sample renders the overlay as a translucent gray layer over the entire page: <?php sleep(1); /* simulate typical server delay */ ?> This is some text. Server takes 1s to respond. Version 1: Show overlay then reload instantly. Version 2: Show overlay then reload in 0ms.
answers question: http://stackoverflow.com/q/27994508

http://stackoverflow.com/q/27991366
has answer: http://stackoverflow.com/a/69245893
has answer: http://stackoverflow.com/a/72654782
has answer: http://stackoverflow.com/a/64511452
has answer: http://stackoverflow.com/a/63664973
has answer: http://stackoverflow.com/a/70607186
has answer: http://stackoverflow.com/a/45596194
has answer: http://stackoverflow.com/a/48312600
has answer: http://stackoverflow.com/a/54808457
has answer: http://stackoverflow.com/a/57008386
has answer: http://stackoverflow.com/a/59553735
possible better answer: http://stackoverflow.com/a/32186324
has answer: http://stackoverflow.com/a/47669350
has answer: http://stackoverflow.com/a/40971810
has answer: http://stackoverflow.com/a/56718426
has answer: http://stackoverflow.com/a/49052763
has answer: http://stackoverflow.com/a/53171954
has answer: http://stackoverflow.com/a/67397891
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/76324658
has answer: http://stackoverflow.com/a/71964074
has title: What is the difference between state and props in React?
has comment: http://stackoverflow.com/comment/76543174
answer count: 50
has answer: http://stackoverflow.com/a/69131980
downvote count: 3
has answer: http://stackoverflow.com/a/59499746
has comment: http://stackoverflow.com/comment/127537153
has body: I was watching a Pluralsight course on React and the instructor stated that props should not be changed. I'm now reading an article (uberVU/react-guide) on props vs. state and it says Both props and state changes trigger a render update. Later in the article it says: Props (short for properties) are a Component's configuration, its options if you may. They are received from above and immutable. So props can change but they should be immutable? When should you use props and when should you use state? If you have data that a React component needs, should it be passed through props or setup in the React component via getInitialState?
score: 794
type: Question
has answer: http://stackoverflow.com/a/40330195
has answer: http://stackoverflow.com/a/67239921
has answer: http://stackoverflow.com/a/57008481
has answer: http://stackoverflow.com/a/52504961
has answer: http://stackoverflow.com/a/52073571
has answer: http://stackoverflow.com/a/66701592
accepted answer: http://stackoverflow.com/a/27992380
has answer: http://stackoverflow.com/a/54716982
has answer: http://stackoverflow.com/a/51986448
has answer: http://stackoverflow.com/a/73598233
tagged with: javascript
has answer: http://stackoverflow.com/a/32186324
has answer: http://stackoverflow.com/a/63817388
has answer: http://stackoverflow.com/a/57223101
has answer: http://stackoverflow.com/a/48813863
has answer: http://stackoverflow.com/a/71994692
has answer: http://stackoverflow.com/a/50196034
has answer: http://stackoverflow.com/a/47749270
has answer: http://stackoverflow.com/a/50934969
has answer: http://stackoverflow.com/a/54904143
has answer: http://stackoverflow.com/a/50229738
tagged with: reactjs
upvote count: 797
has answer: http://stackoverflow.com/a/53728938
has answer: http://stackoverflow.com/a/72103763
has answer: http://stackoverflow.com/a/48677922
has answer: http://stackoverflow.com/a/40127210
has answer: http://stackoverflow.com/a/54996431
has answer: http://stackoverflow.com/a/27992380
has answer: http://stackoverflow.com/a/54202000
has answer: http://stackoverflow.com/a/54164872
has comment: http://stackoverflow.com/comment/126406144
has answer: http://stackoverflow.com/a/52118077
has answer: http://stackoverflow.com/a/72157768
has answer: http://stackoverflow.com/a/47790917
favorite count: 0

http://stackoverflow.com/a/28103712
score: 1
has body: Use AJAX to get the data you need from the server. Echo the data into the page somewhere, and use JavaScript to get the information from the DOM. Echo the data directly to JavaScript. With AJAX, you need two pages, one is where PHP generates the output, and the second is where JavaScript gets that output: get-data.php /* Do some operation here, like talk to the database, the file-session * The world beyond, limbo, the city of shimmers, and Canada. * * AJAX generally uses strings, but you can output JSON, HTML and XML as well. * It all depends on the Content-type header that you send with your AJAX * request. */ echo json_encode(42); //In the end, you need to echo the result. //All data should be json_encoded. index.php (or whatever the actual page is named like) &lt;script&gt; function reqListener () { console.log(this.responseText); } var oReq = new XMLHttpRequest(); //New request object oReq.onload = function() { //This is where you handle what to do with the response. //The actual data is found on this.responseText alert(this.responseText); //Will alert: 42 }; oReq.open("get", "get-data.php", true); // ^ Don't block the rest of the execution. // Don't wait until the request finishes to // continue. oReq.send(); &lt;/script&gt; The above combination of the two files will alert 42 when the file finishes loading.
upvote count: 1
answers question: http://stackoverflow.com/q/28103647
type: Answer
downvote count: 0

http://stackoverflow.com/comment/44464995
comment on: http://stackoverflow.com/a/28040436
has text: if I can get the length of the list like this, `var limit = parseInt(${BulkList}.length);` why cannot I iterate through the list in script
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44471611
has text: i saw that code in other quetions it's a click on a tr but my clinet wants a click on a radio button ...
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28044109

http://stackoverflow.com/q/27985305
has title: Can't disabled one of the two submit button and vice-versa
has body: I have a form which is in this pattern &lt;form action="domains.php#searchdomain" method="post" name="m_domain"&gt; &lt;a name="searchdomain"&gt;&lt;/a&gt; &lt;table class="dataTable" width="100%" border="0" cellspacing="0" cellpadding="5" id="" style="text-align:center; margin-top:0px; border-left:1px solid #ddd; border-right:1px solid #ddd; border-top:1px solid #ddd;"&gt; &lt;tr&gt; &lt;td align="left" colspan="2"&gt;&lt;div id="display_message" &lt;?php echo $sstyle; ?&gt;&gt;&lt;?php echo $dis_msg; ?&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="left"&gt;Search Domain&lt;/td&gt; &lt;td align="left" style="display:none;" id="apply_text"&gt;Replace Selected Domains With&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center"&gt;&lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td&gt;&lt;input class="input_field" name="search_domain" id="search_domain" value="&lt;?php echo $search_domain; ?&gt;" type="text"&gt;&lt;/td&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;td&gt;&lt;input type="submit" class="btn blue_button" name="submit_domain_form" id="submit_search_button" value="Search" onclick="return searchValidate();"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt; &lt;td align="center"&gt;&lt;table width="100%" border="0" cellspacing="0" cellpadding="0" id="apply_button" style="display:none;"&gt; &lt;tr&gt; &lt;td&gt;&lt;input class="input_field" name="domain_name_url" id="domain_name_url" value="&lt;?php echo $domain_name_url; ?&gt;" type="text"&gt;&lt;/td&gt; &lt;td&gt;&amp;nbsp; &lt;input name="domain_replace_id" id="domain_replace_id" value="" type="hidden"&gt; &lt;input name="domain_replace_link" id="domain_replace_link" value="" type="hidden"&gt; &lt;/td&gt; &lt;td&gt;&lt;input type="submit" class="btn blue_button" name="submit_domain_form" id="submit_replace_button" value="Apply" onclick="return validate();"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center"&gt;…
has answer: http://stackoverflow.com/a/27985663
type: Question
has comment: http://stackoverflow.com/comment/44363049
has answer: http://stackoverflow.com/a/27985498
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/44362535
answer count: 3
has comment: http://stackoverflow.com/comment/44361767
has answer: http://stackoverflow.com/a/27985553
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44364149
has comment: http://stackoverflow.com/comment/44362897

http://stackoverflow.com/q/28088724
has body: please be gentle, I'm just learning. I'm trying to clone a div multiple times. I can get it to do it once, but not several times. I'd like to do it w/out JQuery (trying to understand basic Javascript first). Below is a sample. What am I doing wrong? var myDiv = document.getElementById("test"); var divClone = myDiv.cloneNode(true); // the true is for deep cloning document.body.appendChild(divClone); document.body.appendChild(divClone); document.body.appendChild(divClone); Here it is on jsfiddle: http://jsfiddle.net/dmperkins74/zvdekh8p/ Thanks in advance.
answer count: 3
downvote count: 0
accepted answer: http://stackoverflow.com/a/28088823
favorite count: 0
has answer: http://stackoverflow.com/a/28088860
possible better answer: http://stackoverflow.com/a/28088834
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/28088834
tagged with: clone
upvote count: 2
has answer: http://stackoverflow.com/a/28088823
type: Question
has title: Clone a Div Multiple Times
tagged with: javascript

http://stackoverflow.com/q/28036458
accepted answer: http://stackoverflow.com/a/28036511
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/28036693
tagged with: javascript
tagged with: jquery
has title: how to do simple jquery for multiple actions?
has answer: http://stackoverflow.com/a/28036483
score: 0
has answer: http://stackoverflow.com/a/28036511
possible better answer: http://stackoverflow.com/a/28036483
has answer: http://stackoverflow.com/a/28036598
has body: I need to make simple jquery that can function for many objects by Id . For example If i have this HTML : ... now if i need to do a click function for this i would do like this : $(document).on("click","#parent-id-1",function() { $('#1').show(); }); $(document).on("click","#parent-id-2",function() { $('#2').show(); }); $(document).on("click","#parent-id-3",function() { $('#3').show(); }); is there in way to make the above Jquery something more simpler since i have to many divs ? ... i mean something like this : $(document).on("click","#parent-id-|ID-NUMBER|",function() { $('#|ID-NUMBER|').show(); }); so this code would work for even 1000 id. NOTE:The |ID-NUMBER| are both the in #parent-id and just the #id.
answer count: 4

http://stackoverflow.com/q/28076297
accepted answer: http://stackoverflow.com/a/28076680
tagged with: javascript
has title: how to list all the people submitted in an input field?
has comment: http://stackoverflow.com/comment/44531782
score: 0
has comment: http://stackoverflow.com/comment/44531669
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/44532761
has comment: http://stackoverflow.com/comment/44532289
has comment: http://stackoverflow.com/comment/44532010
has answer: http://stackoverflow.com/a/28076680
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44531939
type: Question
has body: Currently in my job, we have a system that searches people in our database through the last 5 digits of their social security. However, there are many people who may have the same combination of digits, and in that case, the system displays all the people with that combination. i.e: Social firstName lastName Age 55555 John Doe 24 55555 Michael Jordan 51 55555 Mike Tyson 48 I'm not interested in the search function, but I would like to know how can I display all the people in my database(onclick) in the same way the system in my job does it. I will be using javascript because its the only language I know. However, can I even perform this task with JS? Here is what I have so far, it will be a mix of code and plain english (to describe what I want to do) : Please enter your information First name : Last name : Age : Submit This may be a lot to ask for, but please help a newbie out. Ive been trying to do this for weeks, and I might not be in the level of javascript I need to be to perform this, but your help will be greatly appreciated!
answer count: 1
has comment: http://stackoverflow.com/comment/44532271

http://stackoverflow.com/q/28024304
downvote count: 0
tagged with: tooltip
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: jquery-ui-tooltip
type: Question
has body: I'm working on a website which is built in some heavy PHP framework. So it already has included jQuery UI 1.8.16 library. Now I have to implement $(...).tooltip functionality on one web page. This feature is not availabe in jQuery UI 1.8.16 but it is available in jQuery 1.9.2 . &lt;script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"&gt;&lt;/script&gt; So I included following line into the HTML file where I want to implement the $(...).tooltip functionality. But still in firebug I got following error: TypeError: $(...).tooltip is not a function How to resolve this issue? Can someone please help me in this regard?
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/28024585
upvote count: 1
answer count: 1
tagged with: jquery-ui
has title: $(...).tooltip is not working since jQuery 1.9.2 is not working due to old jQuery UI 1.8.16 library? How to fix this?
has comment: http://stackoverflow.com/comment/44455153

http://stackoverflow.com/a/28100662
has comment: http://stackoverflow.com/comment/44577012
has comment: http://stackoverflow.com/comment/44576903
answers question: http://stackoverflow.com/q/28100644
has comment: http://stackoverflow.com/comment/44576922
has comment: http://stackoverflow.com/comment/44577146
has comment: http://stackoverflow.com/comment/44577074
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/44577266
has comment: http://stackoverflow.com/comment/44577108
score: 3
has comment: http://stackoverflow.com/comment/44576949
upvote count: 4
has body: The code you have is correct. JSX code needs to be compiled to JS: http://facebook.github.io/react/jsx-compiler.html

http://stackoverflow.com/a/28000357
score: 1
upvote count: 1
has body: jQuery automatically assigns "default" styles to elements when using fadeIn, slideDown, etc. Since the default style for divs are "block", that's what is being applied. Instead of using the class "active-slide", try specifically setting the CSS .... prevSlide.fadeIn(600).css('display','table'); Refs: jQuery bug Fiddle - you can see that "display" block was in the class' style, and you have to literally add it after the fadeIn function. In the fiddle, add .css('display','block'); and run it, you'll see the changes
accepted answer of: http://stackoverflow.com/q/28000095
answers question: http://stackoverflow.com/q/28000095
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44356763
type: Comment
comment on: http://stackoverflow.com/a/27982428
score: 0
type: AnswerComment
has text: i also have function, without parameter coming inside the method

http://stackoverflow.com/q/28046757
accepted answer: http://stackoverflow.com/a/28046798
has title: Custom function returns correct results and also undefined. Why is that?
type: AnsweredQuestion
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/44475868
has comment: http://stackoverflow.com/comment/44475830
has answer: http://stackoverflow.com/a/28046798
has body: I'm working on my JavaScript skills and i wrote that little piece of code: var Intel = ["a", "v", "f", "c", "s"]; if (Intel &amp;&amp; Intel.constructor == Array) { alert('correct'); } else { alert("false"); } alert(Intel.length); function showThemAll() { // this function will alert every single data of the table for (var i = 0; i &lt;= Intel.length; i++) { //alert of the data alert(Intel[i]); } } showThemAll(); I don't understand though why, with the correct result, I get an undefined alert. Can you please help me out?
tagged with: javascript
has answer: http://stackoverflow.com/a/28046812
score: 0
has comment: http://stackoverflow.com/comment/44476361
possible better answer: http://stackoverflow.com/a/28046812

http://stackoverflow.com/a/27983679
upvote count: 1
answers question: http://stackoverflow.com/q/27983444
has body: No, you cannot invoke JavaScript from the server-side. You can, however, have JavaScript loaded that makes calls to the server and retrieves data. With that in mind you can have a call to retrieve JSON or XML from the server in which a payload resides that can be extracted by a JavaScript function that is already defined on the client-side. // note: in this example I use jQuery because their AJAX API is terrific $.ajax({ url: "http://example.com/page.php?params=1" }) .done(function( data ) { // data is our payload doSomethingWithPayload(data); }); That way doSomethingWithPayload already is defined on the client, and is called whenever the payload is received.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27983444
score: 1

express
tags question: http://stackoverflow.com/q/28006301
tags question: http://stackoverflow.com/q/27966749
tags question: http://stackoverflow.com/q/28007514
tags question: http://stackoverflow.com/q/28056242
tags question: http://stackoverflow.com/q/28054725
tags question: http://stackoverflow.com/q/27991488
tags question: http://stackoverflow.com/q/28101990
tags question: http://stackoverflow.com/q/28055778
tags question: http://stackoverflow.com/q/27979880
tags question: http://stackoverflow.com/q/28022054
tags question: http://stackoverflow.com/q/28035116
tags question: http://stackoverflow.com/q/28099576
tags question: http://stackoverflow.com/q/27986687
tags question: http://stackoverflow.com/q/28004759
tags question: http://stackoverflow.com/q/28037645
tags question: http://stackoverflow.com/q/27975302
tags question: http://stackoverflow.com/q/28002103
tags question: http://stackoverflow.com/q/27989654
tags question: http://stackoverflow.com/q/28082043
tags question: http://stackoverflow.com/q/28052074
tags question: http://stackoverflow.com/q/27987992
tags question: http://stackoverflow.com/q/28005556
tags question: http://stackoverflow.com/q/27975018
tags question: http://stackoverflow.com/q/28115761
tags question: http://stackoverflow.com/q/28047266
tags question: http://stackoverflow.com/q/28037250
tags question: http://stackoverflow.com/q/27971489
tags question: http://stackoverflow.com/q/28116588
tags question: http://stackoverflow.com/q/28041587
tags question: http://stackoverflow.com/q/28048029
tags question: http://stackoverflow.com/q/28019289
tags question: http://stackoverflow.com/q/27985421
tags question: http://stackoverflow.com/q/28001342
tags question: http://stackoverflow.com/q/28036726
tags question: http://stackoverflow.com/q/28113447
tags question: http://stackoverflow.com/q/28119740
tags question: http://stackoverflow.com/q/28054199
tags question: http://stackoverflow.com/q/28001065
tags question: http://stackoverflow.com/q/28011400
tags question: http://stackoverflow.com/q/28051444
tags question: http://stackoverflow.com/q/28112161
tags question: http://stackoverflow.com/q/28009650
tags question: http://stackoverflow.com/q/28085655
tags question: http://stackoverflow.com/q/28113430
tags question: http://stackoverflow.com/q/27972799
tags question: http://stackoverflow.com/q/28058845
tags question: http://stackoverflow.com/q/27994972
tags question: http://stackoverflow.com/q/28104012
tags question: http://stackoverflow.com/q/28116384
tags question: http://stackoverflow.com/q/28008731
tag name: express
tags question: http://stackoverflow.com/q/28096735
tags question: http://stackoverflow.com/q/27979538
tags question: http://stackoverflow.com/q/27983972
tags question: http://stackoverflow.com/q/28092809
tags question: http://stackoverflow.com/q/28051678
type: Tag
tags question: http://stackoverflow.com/q/27969550
tags question: http://stackoverflow.com/q/28061042
tags question: http://stackoverflow.com/q/28075128
tags question: http://stackoverflow.com/q/28063632
tags question: http://stackoverflow.com/q/28097020
tags question: http://stackoverflow.com/q/28070164
tags question: http://stackoverflow.com/q/28001865
tags question: http://stackoverflow.com/q/27970184
tags question: http://stackoverflow.com/q/28118582
tags question: http://stackoverflow.com/q/27969581
tags question: http://stackoverflow.com/q/28018035

http://stackoverflow.com/comment/44542387
comment on: http://stackoverflow.com/a/28081959
score: 0
type: AnswerComment
type: Comment
has text: @zan No, I don't, sorry.

http://stackoverflow.com/q/27998684
has comment: http://stackoverflow.com/comment/44387160
score: -1
has comment: http://stackoverflow.com/comment/44387074
has comment: http://stackoverflow.com/comment/44387065
type: UnansweredQuestion
has body: I am not that good in code but I want to learn it but now I have this problem in my index.html I have this &lt;script type="text/javascript" src="js/initresize.js" &gt;&lt;/script&gt; and then in the same file I have this &lt;input type="button" onclick="test();" value="Click Me!" /&gt; I now that the file path is correct because when I comment out the src line my website looks weird. (no background etc) but I get this error when pressing the button "test is not defined" this is my initresize.js function test() { alert('Button clicked!'); }
downvote count: 1
has comment: http://stackoverflow.com/comment/44387212
has answer: http://stackoverflow.com/a/27998784
has comment: http://stackoverflow.com/comment/44386988
type: Question
has title: calling external js file from html
upvote count: 0
has comment: http://stackoverflow.com/comment/44386953
has comment: http://stackoverflow.com/comment/44386971
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44386979
has comment: http://stackoverflow.com/comment/44386990
favorite count: 0
has comment: http://stackoverflow.com/comment/44387015
has comment: http://stackoverflow.com/comment/44387093

http://stackoverflow.com/comment/44602506
type: Comment
comment on: http://stackoverflow.com/a/28114109
score: 0
type: AnswerComment
has text: @Marc me too, but given the logic in her code it seems the most likely thing that she was trying to achieve.

http://stackoverflow.com/comment/44462201
type: Comment
has text: @Andrew other reviewers declined your edit. They might not have gone through the chat transcript to see the full context.
comment on: http://stackoverflow.com/a/28033920
type: AnswerComment
score: 0

http://stackoverflow.com/q/28004141
type: Question
accepted answer: http://stackoverflow.com/a/28004333
tagged with: javascript
has body: How can I call jQuery Lightbox2 with AJAX. I am using this function for my project. $(document).ready(function() { $(".paylasimi-goster").click(function() { event.preventDefault(); var id = $(this).data("id"); $.ajax({ url: "gonderiyi_goster.php?msg_id=" + id, type: 'get', beforeSend: function() { $("#loader").fadeIn(100); }, }).done(function(data) { $("#loader").fadeOut(100); $(".sidebar").fadeIn().find(".sidebar-content").animate({ "right": 0 }, 200).html(data); imgResize(jQuery, 'smartresize'); }); }); $(".sidebar").click(function() { $(".sidebar-content").animate({ "right": "-565px" }, 200, function() { $(".sidebar").fadeOut(); }) }); $(".sidebar-content").click(function(e) { e.stopPropagation(); }); }); Also I have created this DEMO from jsfiddle. In this jsfiddle you can see there white div. Click any white div then see the right sidebar. So in the sidebar have one image. The problem is here : Lightbox2 does not work when you click on the image. How can I call Lightbox2 with ajax.
score: 0
answer count: 1
tagged with: jquery
tagged with: ajax
has title: How to call jQuery Lightbox with AJAX
tagged with: lightbox2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28004333

http://stackoverflow.com/comment/44544821
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28083385
has text: @mplungjan but is it possible to achieve this with a UserScript? Can i have an example of the code? I can't find anything about this on the internet :/

http://stackoverflow.com/comment/44345799
comment on: http://stackoverflow.com/a/27974368
type: Comment
score: 1
type: AnswerComment
has text: `exec` is overkill and long for the second task. Just do `string.match(/[^A-Za-z0-9]/g)`

http://stackoverflow.com/comment/44360253
has text: Thanks very much for the input, I agree this will work but it seems inefficient to add a mouseup function to entire document.
comment on: http://stackoverflow.com/a/27980594
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/28040934
tagged with: javascript
tagged with: forms
has body: I have a form like something like this Renta Comerciales Provincias Oficinas (11) Ranchos (12) Naves Industriales (15) + And I am handling it using a following script $(document).on('submit', '#formCategorias', function (event) { $(".validate", this).css("border", "1px solid #ddd"); event.preventDefault(); var valid = true; $.each($(".validate", this), function () { if ($(this).val().length == 0) { $(this).css("border", "1px solid red"); valid = false; } }); var formTosubmit = $(this).attr('id'); var jsonCategoria = JSON.stringify(categoria), jsonFeed = JSON.stringify(feed), url = "xxxxxxxxxx/feeds/web/ajax.php"; if (jsonCategoria != '' && jsonFeed != '') { var posting = $.post(url, { im_core: 'updateCategorias', Categorias: jsonCategoria, xmlFeeed: jsonFeed, idFeed: 11 }).done(function (data) { if (data == 1) { valid = true; } else alert("Check the form"); }); } if (valid == true) alert('#' + formTosubmit); $('#' + formTosubmit).submit(); }); The problem is that after ajax call when I use the submit() function to submit the form , the browser is doing the Ajax call() repeatedly , resulting into error , The fix could be the submit() function should submit the form on the url provided in the action tag instead of the url given to the ajax call , Can any one suggest me something Thanks in Advance
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/44465564
tagged with: jquery
has answer: http://stackoverflow.com/a/28042368
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28041026
has comment: http://stackoverflow.com/comment/44466396
has comment: http://stackoverflow.com/comment/44465593
type: Question
has answer: http://stackoverflow.com/a/28041087
has title: How to submit form after an Ajax call

http://stackoverflow.com/q/28089866
accepted answer: http://stackoverflow.com/a/28092783
has title: jQuery Follow the cursor horizontaly with a DIV
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44557141
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: Whiting the container I need the div to follow the cursor horizontally. Each div had different content and this changes based on the position. something like this codepen but the above link has both vertical or horizontal which is not what I need. I've made a DEMO $("#da-thumbs > li").hover(function () { $("div").show(); }, function () { $("div").hide(); }); $('#da-thumbs > li').mousemove(function (e) { $("div").css({ left: e.pageX - 120 }); }); .da-thumbs { list-style: none; padding:20px; display:inline-block; } .da-thumbs li { width:200px; height:200px; background: #000; float: left; margin: 5px; position: relative; z-index: 0; } .da-thumbs li a { display: block; position: relative; overflow: hidden; text-decoration: none; } .da-thumbs li a div { display:none; position: relative; background: #777; background: rgba(75, 75, 75, 0.7); width:200px; height:200px; z-index: 3; } .da-thumbs li a div span { display: block; padding: 10px 0; margin: 40px 20px 20px 20px; text-transform: uppercase; font-weight: normal; color: #fff; color: rgba(255, 255, 255, 0.9); text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.5); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 -10px 0 rgba(255, 255, 255, 0.3); } Menu by Simon Jensen Mr. Crabs by John Generalov
tagged with: css
has answer: http://stackoverflow.com/a/28092783
score: 2
type: AnsweredQuestion
upvote count: 2
possible better answer: http://stackoverflow.com/a/28090240
has answer: http://stackoverflow.com/a/28090240
has comment: http://stackoverflow.com/comment/44556673
has comment: http://stackoverflow.com/comment/44556389
type: Question

http://stackoverflow.com/comment/44344786
type: AnswerComment
has text: which jquery version used? 1.6 below, if 1.6 below,use var formID = $(this).parents("form").attr("id");
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27976156

http://stackoverflow.com/comment/44372958
type: Comment
score: 0
type: AnswerComment
has text: You can use eval but you probably shouldn't. If your only solution is eval, you should probably consider changing some other part of your design to avoid eval.
comment on: http://stackoverflow.com/a/27991007

http://stackoverflow.com/q/27987455
score: 5
has title: Hide column while exporting to excel from html table using javascript
upvote count: 5
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27987751
answer count: 1
downvote count: 0
favorite count: 0
has body: I have a html table which I have to export to excel , but while doing so, I dont want some of the td elements to be exported. When I apply javascript to hide the td, the changes are being applied only to the view form and not to the the content being exported. Need help in how to export in this case. I have included html, css and script all in one page. LOB Here I want to hide the td which contains span class "hillbillyForm" The javascript That I am using is function TableToExcel(tableid) { var id = $('[id$="' + tableid + '"]'); var $clonedTable = $("id").clone(); $clonedTable.find('[style = "display: none"]').remove(); var strCopy = $(' ').html(id.clone()).html(); window.clipboardData.setData("Text", strCopy); var objExcel = new ActiveXObject("Excel.Application"); objExcel.visible = false; var objWorkbook = objExcel.Workbooks.Add; var objWorksheet = objWorkbook.Worksheets(1); objWorksheet.Paste; objExcel.visible = true; }
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27987751
type: AnsweredQuestion
tagged with: excel
type: Question

http://stackoverflow.com/comment/44447518
comment on: http://stackoverflow.com/q/28030910
type: QuestionComment
has text: You can't 'click' on links outside the page's [origin](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy). Thank god
type: Comment
score: 0

http://stackoverflow.com/a/31265452
type: Answer
score: 7
upvote count: 7
downvote count: 0
answers question: http://stackoverflow.com/q/28050304
has body: From your comment I understand, that you only care about user_friends and email. If you use the package accounts-facebook for Userlogin, you already have the email of the user. For using the login, you must configure the service. You do this serverside on startup (more info): ServiceConfiguration.configurations.upsert({ {service: "facebook"}, { $set: { appId: "XXX", secret: "XXX", requestPermissions: ['user_friends'] //here you are requesting the permission to get the user's friends } }); The next step would be to get the user's friends. You could use a package to do it, or you could do it by hand: First you should check, if the user gave you permission. Send a Request to the Facebook-API (API): GET /{user-id}/permissions Hopefully you will get an object in the form: { "data": [ ..., { "permission": "user_friends", "status": "granted" } ] } This means, the user gave you permission to get his friends (more info). In the next step, you query the Graph-API for the friendlists more info: GET /v2.3/{user-id}/friendlists HTTP/1.1 Host: graph.facebook.com This will get you all the friendlists of the user. In the last step you can query for all or some of the lists (e.g. 'Close Friends', 'Acquaintances') with more info: GET /v2.3/{friendlist-id} HTTP/1.1 Host: graph.facebook.com

http://stackoverflow.com/comment/44356890
comment on: http://stackoverflow.com/a/27982105
score: 0
type: AnswerComment
type: Comment
has text: Does you write return false(); at the end of success?? At the end means at the end of If and else both, means separate false for each of them

http://stackoverflow.com/comment/44511195
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28065203
type: Comment
has text: thanks, but I'm not just want to instead of "browser" by ptor, I really want to remove "browser.sleep()" from my code.

http://stackoverflow.com/a/28006525
has comment: http://stackoverflow.com/comment/44401544
has comment: http://stackoverflow.com/comment/44401553
has comment: http://stackoverflow.com/comment/44401440
score: 0
has comment: http://stackoverflow.com/comment/44401506
type: Answer
answers question: http://stackoverflow.com/q/28006499
has comment: http://stackoverflow.com/comment/44401452
has body: Depends on if you have declared, the scrolling position of the document is accessed differently. Without a doctype,i.e., quirks mode, the position is universally retrieved as: document.body.scrollTop; In standard mode, this is a bit tricky. For both IE and Firefox the following code will do: document.documentElement.scrollTop; However, Webkit based browsers such as Chrome still populate the body.scrollTop value. So you'll have to pick the greater two: function get_scroll(){ var top=document.documentElement.scrollTop; if (top&lt;document.body.scrollTop) top=document.body.scrollTop; return top; } Isn't it ironic how quirks mode sometimes works more "standard" than the standard mode?

http://stackoverflow.com/comment/44495654
score: 0
type: AnswerComment
has text: Take a look at this: http://yuiblog.com/blog/2009/03/10/when-you-cant-count-on-your-numbers/
type: Comment
comment on: http://stackoverflow.com/a/28056924

http://stackoverflow.com/comment/44553057
comment on: http://stackoverflow.com/q/28088087
type: Comment
type: QuestionComment
has text: "can't make it work" is rather vague. Look at your browser's developer tools. Look at the JavaScript console. Does it report any errors? Look at the Net tab. Is the request being made? Does it get a response? Do they contain the data you expect? Compare the request you are making now with the one you were making with Angular. What is different about them?
score: 0

http://stackoverflow.com/comment/62472167
has text: The first word of this answer is correct **for the question asked** because the OP ruled out the way you name an arrow function. But the remainder of the answer is simply incorrect. Look in the specification for where the [abstract `SetFunctionName` operation](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-setfunctionname) is used. `let a = () => {};` defines a **named** function (the name is `a`) both according to the spec and in modern engines (throw an error in it to see); they just don't support the `name` property yet (but it's in the spec and they'll get there eventually).
comment on: http://stackoverflow.com/a/27977567
type: Comment
score: 24
type: AnswerComment

http://stackoverflow.com/comment/44424562
type: QuestionComment
has text: may be you can create a jsfiddle or plunkr ? because seems to be working for me..
comment on: http://stackoverflow.com/q/28009738
score: 0
type: Comment

http://stackoverflow.com/a/28038069
answers question: http://stackoverflow.com/q/28038021
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/44460477
has body: Try one of the following formats MM-dd-yyyy yyyy/MM/dd MM/dd/yyyy MMMM dd, yyyy MMM dd, yyyy Could be that some browsers don't support yyyy-mm-dd
score: 1
downvote count: 0

http://stackoverflow.com/a/28077080
has body: Here's what I would do. First add a class to #DetailsBtn's, we'll call it .DetailsBtn. New code will be: $(".DetailsBtn").click(function () { var i = $(this).attr('id').replace('DetailsBtn', ''); $("#DetailsRow"+i).toggleClass("gameRowOpen"); $("#DetailsRow"+i+" .leftDatePantherHolder").toggleClass("gameRowOpen"); $("#DetailsRow"+i+" .hgDate").toggleClass("gameRowOpen"); $("#DetailsRow"+i+" .hgGameTimeThemeGiveaway").toggleClass("gameRowOpen"); $("#DetailsRow"+i+" .hgGameTheme").toggleClass("gameRowOpen"); $("#DetailsRow"+i+" .hgMatchupBox").toggleClass("gameRowOpen"); $("#DetailsRow"+i+" .hgMKEWaveBox, #DetailsRow"+i+" .hgOpponentBox").toggleClass("gameRowOpen"); $("#DetailsRow"+i+" .hgMatchupBoxExpanded").toggleClass("gameRowOpen"); $("#DetailsRow"+i+" .gameThemeAreaExpanded").toggleClass("gameRowOpen"); }); $('#DetailsBtn'+i).toggle(function () { $("#DetailsRow"+i+" .ticketMasterGameLink").fadeIn(); }, function () { $("#DetailsRow"+i+" .ticketMasterGameLink").hide(); }); So the above code will get any of the #DetailsBtn's, grab the number value from the id, and use it to display the data related to that number value.
has comment: http://stackoverflow.com/comment/44533131
answers question: http://stackoverflow.com/q/28076930
type: Answer
upvote count: 2
score: 1
downvote count: 1

http://stackoverflow.com/q/28069433
score: 0
tagged with: bash
answer count: 1
has comment: http://stackoverflow.com/comment/44518562
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: In a bash script, this won't work with Unexpected token ILLEGAL #!/bin/bash value="White Spaced String" mongo --verbose localhost:27017/myDB --eval 'db.ips.update({"id":"id"}, { $push: { "key": {"key":"'$value'"}}})' where as this works: #!/bin/bash value="NonWhiteSpacedString" mongo --verbose localhost:27017/myDB --eval 'db.ips.update({"id":"id"}, { $push: { "key": {"key":"'$value'"}}})' Any ideas ow to work around this? I tried: value="${value// /\\ }" which will substitute whitespaces with \ escape signs and a whitespace. Yet, no success. This does work, yet I want to preserve the whitespaces in my JSON in Mongo: value="${value// /_}"
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44518330
tagged with: mongodb
has answer: http://stackoverflow.com/a/28070821
tagged with: javascript
has title: Bash and MongoDB: Whitespaces in Eval not working
has comment: http://stackoverflow.com/comment/44520193

http://stackoverflow.com/a/27979043
score: 0
answers question: http://stackoverflow.com/q/27977958
type: Answer
has body: check this link http://jsfiddle.net/H3KRk/5/ //$('.nav > ul').toggleClass('no-js js'); $('.nav .js ul').hide(); $(document).on("click", function(e) { var $elem = $(e.target); if ($elem.hasClass('clicker')) { $('.nav .js ul').not($elem.next('ul')).hide(); $elem.next("ul").slideToggle(); } else { $('.nav .js ul').hide(); } }); .nav { width:1024px; margin:0px auto 0px auto; background: #757575; /* Old browsers */ background: -moz-linear-gradient(top, #757575 0%, #474747 47%, #111111 47%, #000000 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#757575), color-stop(47%,#474747), color-stop(47%,#111111), color-stop(100%,#000000)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #757575 0%,#474747 47%,#111111 47%,#000000 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #757575 0%,#474747 47%,#111111 47%,#000000 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, #757575 0%,#474747 47%,#111111 47%,#000000 100%); /* IE10+ */ background: linear-gradient(to bottom, #757575 0%,#474747 47%,#111111 47%,#000000 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#757575', endColorstr='#000000',GradientType=0 ); /* IE6-9 */ } .nav ul { margin:0px 0px 0px 0px; padding:0px 0px 0px 0px; } .nav ul li { position:relative; display:inline; list-style:none; margin:0px 13px 0px 0px; padding:0px 0px 0px 0px; line-height:40px; cursor:pointer; } .nav ul li ul { position:absolute; left:0; right:0; width:1024px; padding:0px 0px 0px 0px; /*padding:14px 15px 14px 15px;*/ background:#f1f1f1; } .nav ul .clicker { background:none; } .nav ul .clicker:hover {} .nav ul li a { /*display:block; padding:8px 10px 8px 40px;*/ color:#ffffff; text-decoration:none; background:none; } .nav ul li a:hover { background:#F2F2F2; } .nav ul .active { background:#f00; } #contentHolder { padding:9px 13px 9px 13px; width:998px; background:#cccccc; } /* Fallbacks */ .nav .no-js ul { display:none; } …

http://stackoverflow.com/comment/44610050
has text: Probably best with a custom filter like this: http://plnkr.co/edit/Yz4bdtIe8EzIWuKZwmKw?p=preview
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28105438

http://stackoverflow.com/a/27971237
answers question: http://stackoverflow.com/q/27971216
score: 3
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/44335135
has body: var useranswer = document.getElementById("useranswer"); You're comparing against the DOM element itself, not the value of the input. var useranswer = document.getElementById("useranswer").value; An element will never equal a number, no matter how much you wish it.
downvote count: 0
has comment: http://stackoverflow.com/comment/44335170

http://stackoverflow.com/a/28092225
type: Answer
has comment: http://stackoverflow.com/comment/44905502
upvote count: 12
score: 12
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/128796702
accepted answer of: http://stackoverflow.com/q/28067549
has comment: http://stackoverflow.com/comment/44905773
answers question: http://stackoverflow.com/q/28067549
has body: In short, YES! There's bindings available for: c# -> js use webBrowser.ExecuteScriptAsync(script); js -> c# use webBrowser.RegisterJsObject(A_NAME_FROM_JS, objectToBind); Then from js you can call: window.A_NAME_FROM_JS.MethodOnObj() and this will invoke the MethodOnObj() on the passed objectToBind It works like a charm. Let me know if you've an issue and I'll help further!

http://stackoverflow.com/q/28047960
type: UnansweredQuestion
tagged with: node.js
tagged with: selenium-webdriver
downvote count: 0
score: 1
tagged with: mysql
has title: Selenium, mocha, mysql. Mysql operation order
has answer: http://stackoverflow.com/a/28225653
has body: I'm using selenium with mocha and node-mysql for my test. But get into the throuble. Looks like part of my code execute mysql query before test manipulations: mysqlfunc.js var mysql = require('mysql'); var connection = mysql.createConnection('here is my connection url'); exports.countNums = function countNumbers(phone, user, callback){ connection.query('Here is SELECT', function(err, rows, fields) { if (err) throw err; callback(rows[0]['COUNT(*)']); }); connection.end(); }; And test.js: var wd = require('selenium-webdriver'); var assert = require('chai').assert; var phonelist = require('./mysqlfunc.js') var SELENIUM_HOST = 'http://localhost:4444/wd/hub'; var URL = 'myurl.com'; var client = new wd.Builder() .usingServer(SELENIUM_HOST) .withCapabilities({ browserName: 'firefox' }) .build(); client.manage().timeouts().implicitlyWait(10000); suite('Blacklists'); test('adding to blacklist', function(done){ client.get(URL); client.findElement({ name: 'username' }).sendKeys('autolistmanageuser'); client.findElement({ name: 'password' }).sendKeys('autolistmanageuser'); client.findElement({ id: 'login-button' }).click(); client.findElement({ linkText: 'Black list' }).click(); client.sleep(2000) client.findElement({ linkText: 'Addnum' }).click(); client.findElement({ xpath: '/html/body/div[4]/div/div/div[2]/div/form/fieldset/div[2]/div[1]/div/div/div/input' }).sendKeys('79265914970'); client.findElement({ xpath: '/html/body/div[4]/div/div/div[2]/div/form/fieldset/div[2]/div[3]/div/div/label[1]/input[@value="1"]' }).click(); client.findElement({ xpath: '/html/body/div[4]/div/div/div[2]/div/form/div[2]/button' }).click() //HERE IS THE PROBLEM!!! Looks like countNums executing before all the selenium code above then result is 1 phonelist.countNums('79265914970','autolistmanageuser', function(result) { assert.equal(0, result, 'Number was not deleted'); done(); },done); }); The problem in phonelist.countNums that returns wrong value as it was executed before the selenium manipulat…
type: Question
tagged with: javascript
tagged with: mocha.js
upvote count: 1
answer count: 1
favorite count: 0

http://stackoverflow.com/q/27966756
has body: I was trying to develop a joomla 3.x module. I am finished with the basic module development. I believe I can do that. But now I am trying to add a PHP code to administrate the module from joomla admin section. you can take an example as slideshowCK module. you can see there they used some javascript and php code to take input for slides. I want to do the same. But I am not getting how they did it. If some one give me a details instruction about this. matter. Thanks a lot in advance. Looking for ward to get a answer from the experts in here. Cheers,
answer count: 1
favorite count: 0
tagged with: joomla
type: UnansweredQuestion
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/44326397
score: -1
has answer: http://stackoverflow.com/a/27981498
type: Question
has title: How to add php code in joomla module administration?
upvote count: 0
tagged with: javascript

backwards-compatibility
tags question: http://stackoverflow.com/q/27987112
tag name: backwards-compatibility
type: Tag

http://stackoverflow.com/q/27964153
has comment: http://stackoverflow.com/comment/44321412
has answer: http://stackoverflow.com/a/27965428
tagged with: javascript
tagged with: jquery
has title: Calculate remaining character for storing in mysql
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/44322271
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27978198
has comment: http://stackoverflow.com/comment/44321690
tagged with: php
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44321869
tagged with: mysql
favorite count: 0
has body: I have a column named DESC in mysql database. I set it to Varchar(255) latin-1. Before storing data in mysql database i use filter_var(mysqli_real_escape_string($value),FILTER_SANITIZE_SPECIAL_CHARS) My question is how do I implement jquery character counting and maxlength restriction and be able to retrieve &amp; display all the data from the textarea? My Pseudo code // Set MaxLength to 255 max= 255; // Get length of textarea $(this).val().length // Count how many &amp;, &lt;,&gt;,",' then multiply by 4 (as each of these characters will convert into &amp;#??? which add extra 4 characters into database) and Newline (add extra 1 character) in the textarea. CountSpecial($(this).val()); //bug #1 // calculate remaining characters. Remaining = max - $(this).val().length -CountSpecial($(this).val()); //Limit the data to varchar(255) to avoid data truncation. If (Remaining &lt;0) { //truncate to fix varchar(255) $(this).val($this.val().substring(0,$this.val().length+Remaining); //bug#2 //recalculate Remaining. Remaining = max - $(this).val().length -CountSpecial($(this).val()); } Bug #1, I dont know how to accurately calculate the extra characters will be stored into database Bug #2 I tried $(this).val($this.val().substring(0,$this.val().length-1); but it doesn't behave the way I want, as I use keyup function, if the user keeps holding a key, this calculation will not work. $(this).val($this.val().substring(0,$this.val().length+Remaining); fixed the problem when the user keeps holding a key, but product another problem. If the user key in something like "&amp;" it will remove the last 4 characters from textarea not 1. Here is my original code http://jsfiddle.net/seth1111/orLh4v4w/5/ How do i fix these bugs? Thanks.
type: Question

http://stackoverflow.com/comment/44342278
comment on: http://stackoverflow.com/q/27974761
has text: @JohnnyDew No idea how... could you give an example?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/28004243
accepted answer: http://stackoverflow.com/a/28004273
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28004273
has title: Creating cache system in javascript
type: Question
tagged with: javascript
tagged with: caching
score: 0
has body: I've made a native javascript class using http requests to get api data from a site. But the website that I request data, has a request limit. So I thought about caching the data but I couldn't find any clear sources about it. Is there a way to cache the data in native javascript?
tagged with: api
answer count: 1

http://stackoverflow.com/a/28093959
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27977357
score: 4
answers question: http://stackoverflow.com/q/27977357
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/51215070
type: Answer
has body: You could JSON.stringify the request object or return it as response to inspect its content. Sample code: Parse.Cloud.define('ShowRequest', function(request, response) { console.log(request); console.log(JSON.stringify(request)); return response.success(request); });
upvote count: 4
has comment: http://stackoverflow.com/comment/61832949

http://stackoverflow.com/comment/46157063
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27973316
has text: I'm not sure what distinction you're making between your angular controller and your MVC controller.
score: 0

http://stackoverflow.com/comment/44563174
type: Comment
type: QuestionComment
has text: @Bondye I know that. That's why I said it was a *first pass* validation, then splitting on periods to validate the ranges.
comment on: http://stackoverflow.com/q/28092429
score: 0

http://stackoverflow.com/comment/44539484
score: 1
has text: @BartekKosa According to [this](http://javascript.crockford.com/private.html), my answer is the only viable method to do this in ES5. However, [this](http://www.nczonline.net/blog/2014/01/21/private-instance-members-with-weakmaps-in-javascript/) shows how it can be done in ES6.
comment on: http://stackoverflow.com/a/28080357
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44418896
comment on: http://stackoverflow.com/q/28015662
has text: @Bosman can I write an if statement on the redirected page to fire it if its coming per my redirect? sounds very confusing but somehow it must be solved
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44374370
has text: Also, can you post your html?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27991737
score: 0

http://stackoverflow.com/q/28067961
tagged with: angularjs-directive
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44532894
tagged with: ionic-framework
type: Question
has body: I have a form inside a nested directive (in an Ionic/Angular project) &lt;ion-content class="scroll-content ionic-scroll has-header"&gt; &lt;recipe-form&gt; &lt;form id="example-form" action="#" class="ng-pristine ng-valid"&gt; &lt;/form&gt; &lt;/recipe-form&gt; &lt;div&gt; But I cannot access this for via jQuery. I tried the following without success: $(function () { #$('#example-form') #angular.element(document.querySelector('#example-form')) #angular.element.find('#example-form') #angular.element.find('example-form') #angular.element(document.querySelector('example-form')) } I also have found several SO questions, and almost all of them are solved by using syntax angular.element(document.querySelector(&lt;element id&gt;)) But for me it gives a blank array [] I'm loading my js file in the head section and after jQuery. Update However, this following method I have in the same file for button click works as expected $( document ).ready(function() { $(document).on('click', 'a.next', function(e){ arr = []; arr = $('.card.recipe-slider'); current_card = $(this).closest('.card')[0]; id = current_card.dataset.id; if (validateInput(current_card)){ $(arr[id]).addClass('active'); $(current_card).removeClass('active'); } else { } }) });
has comment: http://stackoverflow.com/comment/44532642
has comment: http://stackoverflow.com/comment/44532841
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44532694
has comment: http://stackoverflow.com/comment/44532828
has comment: http://stackoverflow.com/comment/44532630
score: 0
has answer: http://stackoverflow.com/a/28109181
accepted answer: http://stackoverflow.com/a/28109181
answer count: 1
linked to: http://stackoverflow.com/q/17283697
has title: Accessing element in an Angular directive with jQuery
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44532678
has comment: http://stackoverflow.com/comment/44532671
linked to: http://stackoverflow.com/q/23609171
has comment: http://stackoverflow.com/comment/44516221

http://stackoverflow.com/comment/44458770
has text: @LeonGaban like this? http://plnkr.co/edit/hgEafncN41SQt0c4plw7?p=preview Il update my answer.
comment on: http://stackoverflow.com/q/28036817
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28034838
type: Answer
has body: If you 'll give a chance to the jquery library, it offers a function load() that loads the given URI and inserts the result directly into the HTML element.
answers question: http://stackoverflow.com/q/28034671
score: 0

http://stackoverflow.com/comment/44521018
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28068554
has text: Oh actually theres a slight snag. The output is including HTML entities in there, e.g. `{"id":3868,"playerID":"5428245075223380049","playerName":"Maelstrome26Jaeger"}` Any way round that?

http://stackoverflow.com/q/27989040
answer count: 1
downvote count: 0
has title: Google Apps Script - Run script as a another user (with password)
tagged with: javascript
favorite count: 0
has body: I have a script which transfers the ownership of a file to another user, this works when the user who runs the scripts is the owner of the file that is going to be transferred. setOwner(emailAddress) Would it be possible to accomplish this without having to login as the owner of the file to run the script? I have the email and the password of the owner.
has answer: http://stackoverflow.com/a/27989433
score: 2
tagged with: google-drive-api
upvote count: 2
type: UnansweredQuestion
type: Question
linked to: http://stackoverflow.com/q/13533565
tagged with: google-apps-script

http://stackoverflow.com/q/28002636
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44394173
tagged with: scripting
has answer: http://stackoverflow.com/a/28002691
has comment: http://stackoverflow.com/comment/44394183
has answer: http://stackoverflow.com/a/28002949
favorite count: 0
has title: Why PHP not working with Javascript?
has answer: http://stackoverflow.com/a/28002702
upvote count: 1
tagged with: php
type: AnsweredQuestion
downvote count: 3
accepted answer: http://stackoverflow.com/a/28002949
has body: A very popular answer in StackOvwerflow suggested that in order to get any php variable within a javascript, simply use php withi angular brackets. var x= <?php echo "val"; ? > . However I see that the script given below entirely fails to run If I use this method. Once I comment out that line script works fine. Even this simple script is not working. The page is saved as .php The page resides in WAMP server and is accessed as localhost/test.php . . EDIT: Full code: Test
type: Question
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/44394133
answer count: 3
possible better answer: http://stackoverflow.com/a/28002691

http://stackoverflow.com/a/28057511
score: 0
has comment: http://stackoverflow.com/comment/44496805
answers question: http://stackoverflow.com/q/28057243
has body: I have been using this pattern for awhile, and seems to be working for your case, too: /^[a-zA-Z0-9][a-zA-Z0-9\-_]*\.([a-zA-Z0-9]+|[a-zA-Z0-9\-_]+\.[a-zA-Z]+)+$/gi The logic is simple: ^[a-zA-Z0-9]: The URL must start with an alphanumeric character [a-zA-Z0-9\-_]*: The first alphanumeric character can be followed by zero or more of: an alphanumeric character, an underscore or a dash \.: The first piece must be followed by a period. The second piece must follow the same pattern: [a-zA-Z0-9]+: One or more alphanumeric character, OR [a-zA-Z0-9\-_]+\.[a-zA-Z0-9]+: One or more alphanumeric character, an underscore or a dash followed by a period and one or more alphanumeric character You can check this pattern working for most of your URLs in the following code snippet. How I do it is similar to the strategy described by others: Get the value of the textarea on keyup (or you can bind the submit, blur, keypress, keydown, change and etc) Split the value by the , character Use $.trim() to remove flanking whitespaces Use the RegEx pattern above to evaluate each individual string Optional, done for visual output: Generate a list of URLs Indicate if each URL entered is valid or not $(function() { $('textarea').keyup(function() { var urls = $(this).val().split(','); $('ul').empty(); $.each(urls, function(i,v) { // Trim URL var url = $.trim(v); // RegEx var pat = /^[a-zA-Z0-9][a-zA-Z0-9\-_]*\.([a-zA-Z0-9]+|[a-zA-Z0-9\-_]+\.[a-zA-Z]+)+$/gi, test = pat.test(url); // Append $('ul').append(' '+url+' '+test+' '); }); }); }); textarea { width: 100%; height: 100px; } ul span { background-color: #eee; display: inline-block; margin-left: .25em; padding: 0 .25em; text-transform: uppercase; }
type: Answer
has comment: http://stackoverflow.com/comment/44496784
has comment: http://stackoverflow.com/comment/44496836
has comment: http://stackoverflow.com/comment/44496838

http://stackoverflow.com/comment/44626320
type: AnswerComment
comment on: http://stackoverflow.com/a/28120507
type: Comment
has text: than of cource use the filter like in @Chris Bouchard aswer. dont see that he already provide how to write the filter
score: 0

http://stackoverflow.com/comment/44503166
comment on: http://stackoverflow.com/a/28026926
type: AnswerComment
has text: I used your [jsfiddle link](http://jsfiddle.net/bx2000cb/4/) and only modified the data. In this data, I have 4 **tasks** but the graph shows me only 3 and bar is displayed only for 2 of them, also hovering on left part of a task displays tooltip on right side.. Please help [http://jsfiddle.net/bx2000cb/6/](http://jsfiddle.net/bx2000cb/6/)
type: Comment
score: 0

http://stackoverflow.com/comment/44599432
score: 0
type: Comment
has text: I updated the example with the initialization: http://jsbin.com/bocuzi/1/edit?html,js,output
comment on: http://stackoverflow.com/a/28112493
type: AnswerComment

http://stackoverflow.com/comment/44344732
has text: What if the language was in english characters?
comment on: http://stackoverflow.com/q/27976155
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/28048276
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/28048641
has answer: http://stackoverflow.com/a/28048640
score: 0
answer count: 2
has title: Retrieve data from a form using jquery
has body: I'm trying to get information from a form and passing it to mysql. Here is my method: var form = []; $("input").each(function(){ var id = $(this).attr("name"); var value = $(this).val(); alert(id); var item = {}; item ["name"] = id; item ["value"] = value; form.push(item); }); return JSON.stringify(form); The problem is when i try to get the checked and unchecked values from the radio buttons. The query string that I want to pass to mysql outputs like this: insert into contatos (nome, rua, sexo, sexo, ncasa, civil, civil, civil, bairro, aniversario, cidade, rg, cpf, usuario, telefone, senha, email, confirmasenha) values ('', '', 'M', 'F', '', 'S', 'C', 'D', '', '', '', '', '', '', '', '', '', '') The fields "sexo" and "civil" are repeating. How do I make the input to read the radio buttons only 1 time?
has answer: http://stackoverflow.com/a/28048641
type: AnsweredQuestion
tagged with: java
tagged with: mysql
tagged with: forms
type: Question
accepted answer: http://stackoverflow.com/a/28048640

http://stackoverflow.com/a/28055049
has body: They are using compact 2 Java profile for creating JRE. You should create Your own JRE which includes nashorn.
upvote count: 3
has comment: http://stackoverflow.com/comment/44515979
score: 3
answers question: http://stackoverflow.com/q/28054849
accepted answer of: http://stackoverflow.com/q/28054849
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44595778
has text: Also doesn't allow you to correct errors with backspace.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28111040

http://stackoverflow.com/comment/44691084
type: AnswerComment
comment on: http://stackoverflow.com/a/28149264
has text: thanks your answer helped me find where the scripts are most likely added. Im my layouts/modules/default.phtml there is a php code: `<?php echo $this->headLink(); ?> <?php echo $this->headScript(); ?>` I just dont know where to find the code for `headLink()` as default.phtml is in the views folder and doesnt contain any function definitions. I have no idea where to look for headScript function.
score: 0
type: Comment

http://stackoverflow.com/a/75988844
has body: Late answer but maybe this'll help someone. If you are using reverse proxy on nginx, you'll need additional proxy_http_version, proxy_set_header(s) in your server nginx block. # example ssl nginx block server { listen 443 ssl; server_name domain.com; ssl_certificate /etc/ssl/certs/domain.com.pem; ssl_certificate_key /etc/ssl/private/domain.com.key; location / { proxy_pass http://localhost:8888; # your server port proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header Origin $http_origin; proxy_set_header Referer $http_referer; } }
score: 0
answers question: http://stackoverflow.com/q/27998407
type: Answer

http://stackoverflow.com/a/28036370
has body: because you were adding it to the tr elem, notice I've changed the top one only to the td and it expands, also the capital S in colSpan function clicked(){ var cells = document.getElementsByClassName( 'cells' ); for( var i = 0; i < cells.length; i++ ){ cells[ i ].classList.remove( 'noDisplay' ); } var dateCells = document.getElementsByClassName( 'dateCells' ); for( var r = 0; r < dateCells.length; r++ ){ dateCells[ r ].colSpan = "2"; } } table td, table th{ border: 2px solid #0f0f0f; text-align:center; } .noDisplay{ display:none; } DATE Cell One Cell Two Cell One Cell Two Cell One Cell Two Cell One Cell Two DATE Cell One Cell Two Cell One Cell Two Cell One Cell Two Cell One Cell Two CLICK HERE
accepted answer of: http://stackoverflow.com/q/28036251
answers question: http://stackoverflow.com/q/28036251
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44459273

http://stackoverflow.com/comment/44559170
comment on: http://stackoverflow.com/q/28091235
score: 0
type: Comment
type: QuestionComment
has text: What returns `$('[id=convo-abierta]').length`??? So question is indeed, how do you check for duplicate IDs?

http://stackoverflow.com/comment/44577167
comment on: http://stackoverflow.com/q/28100711
type: QuestionComment
type: Comment
score: 1
has text: Perhaps http://stackoverflow.com/q/13829667/1544337 or http://docstore.mik.ua/orelly/webprog/jscript/ch12_02.htm is of help?

http://stackoverflow.com/a/27978788
score: 3
downvote count: 0
upvote count: 3
type: AcceptedAnswer
has body: The other page includes js from this plugin https://github.com/kswedberg/jquery-smooth-scroll You can put somewhere above your code to make it work
accepted answer of: http://stackoverflow.com/q/27978729
type: Answer
answers question: http://stackoverflow.com/q/27978729

http://stackoverflow.com/a/28108219
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/28107624
answers question: http://stackoverflow.com/q/28107624
upvote count: 1
has body: json is 2-way binding in json-formatter, so no need interpolation mark {{}} here
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/q/28010455
has title: Javascript and CSS animations
tagged with: css
has comment: http://stackoverflow.com/comment/44408910
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28018696
has body: I have site with infinite animating (sliding) background and dynamically updating charts (flot.js). Charts are updating every 200ms, background is sliding via CSS animation (infinite translate3d). Trouble is performance on Android: when chart is redrawing, css animation is stopping for several milliseconds, so it looks like game with 8-10 fps :) Is there any tricks, which can solve this problem?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28018696
has comment: http://stackoverflow.com/comment/44408935
has comment: http://stackoverflow.com/comment/44408845
tagged with: css-animations
score: 0
answer count: 1
tagged with: flot

http://stackoverflow.com/q/27972543
tagged with: javascript
has comment: http://stackoverflow.com/comment/44337913
tagged with: firefox-addon
answer count: 1
downvote count: 0
has title: OS.File crashes my extension after firefox update from 34 to 35
has answer: http://stackoverflow.com/a/27974254
favorite count: 0
has body: I'm quite new to extension development and the Update from 34 to 35 crashed my extension. The extension is not initializing and running, unless I uncomment line 2 and 3. I could narrow down the problem to the OS.File which I'm using from the main thread. I write a simple string to a file, like in the example at OS.File My Code: let encoder = new TextEncoder(); let array = encoder.encode(GTRatio); //global string variable let promise = OS.File.writeAtomic(filename+".txt", array, {tmpPath: "file.txt.tmp"}); //filename is another defined string Do you have any idea or suggestions? I imported the module with: Components.utils.import("resource://gre/modules/osfile.jsm"); thx for help
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: firefox

http://stackoverflow.com/comment/44547749
type: AnswerComment
comment on: http://stackoverflow.com/a/28008443
type: Comment
has text: so can you the tell the way to see the raw html. Thanks
score: 0

onclicklistener
tag name: onclicklistener
type: Tag
tags question: http://stackoverflow.com/q/28057718

http://stackoverflow.com/a/28048751
accepted answer of: http://stackoverflow.com/q/28048712
answers question: http://stackoverflow.com/q/28048712
has body: Make it a Button By default, acts as a submit.
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/47035778
type: Comment
has text: Good point! Just re-inserting will not work and insert duplicate scripts, as you say. He should find a way to re-trigger the script from userreport.com. I would say: ask support from userreport, or disable turbolinks ;)
comment on: http://stackoverflow.com/a/29432935
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44549397
type: AnswerComment
comment on: http://stackoverflow.com/a/28072471
has text: Sorry I'm insisting, but I don't see it totally clear. How would I access the event object that jQ passes as the first argument to the event handler at that point in the code? ie. When I'm binding a method to an event happening.
type: Comment
score: 0

http://stackoverflow.com/q/28048712
answer count: 1
tagged with: javascript
has body: I have a small code which moves the list items from one list to another list. The code is working in IE8, but not IE10 or chrome. After onclick event, list items moves from Left to right list, but then, page seems page gets automatically refreshed. If I remove the tag then code works, But I need the tag. How do I stop the javascript to not to refresh the page when onclick event happens. I tried few solutions mentioned in other posts, but none worked. Appreciate if you could help me on this. I didn't want to post all code. Hence I have create a sample page for that. &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"&gt; &lt;title&gt;Test&lt;/title&gt; &lt;script&gt; function AppendList() { //event.preventDefault(); I also tried AppendList(event) var node = document.getElementById("batchReportLists0").lastChild; document.getElementById("batchReportLists1").appendChild(node); alert("Added Last Item"); //return false; //window.onbeforeunload = function(){ //return "Refresh"; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form name="batchReportForm" enctype="multipart/form-data"&gt; &lt;table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;select multiple="multiple" size="15" name="T1" class="bodyText" id="batchReportLists0"&gt; &lt;option&gt;Msg1&lt;/option&gt; &lt;option&gt;Msg2&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;td&gt; &lt;button onclick="AppendList();"&gt; &amp;gt;&amp;gt;&amp;gt; &lt;/button&gt; &lt;/td&gt; &lt;td&gt; &lt;select multiple="multiple" size="15" name="T2" class="bodyText" id="batchReportLists1"&gt; &lt;option&gt;Msg3&lt;/option&gt; &lt;option&gt;Msg4&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;br&gt; &lt;/for…
tagged with: http://stackoverflow.com/tag/html
has title: Javascript AppendChild autorefreshes the form
has answer: http://stackoverflow.com/a/28048751
has comment: http://stackoverflow.com/comment/44479666
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/28048751
type: Question

http://stackoverflow.com/a/28179131
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27969285
type: Answer
upvote count: 6
score: 6
answers question: http://stackoverflow.com/q/27969285
has body: Just published a post regarding this... Basically all you have to do is add sourceType to your cameraOptions, like so: var cameraOptions = { width: 800, height: 600, sourceType: Camera.PictureSourceType.PHOTOLIBRARY }; **Note: ** this will only work when using Cordova. Original Post: http://differential.com/blog/access-the-photo-library-in-your-meteor-cordova-app Demo Repo: https://github.com/spencercarli/meteor-cordova-photolibrary

http://stackoverflow.com/comment/44405625
type: QuestionComment
comment on: http://stackoverflow.com/q/28008836
has text: As long as your on HTTPS with SSL certificates it will be as safe as it gets, nobody can read your data, except for you, but what is an attacker going to do with his own password?, hack himself?
type: Comment
score: 0

http://stackoverflow.com/comment/44531014
comment on: http://stackoverflow.com/a/28075975
has text: Thanks for the response. I haven't considered using NodeJS. What would the benefit of doing so be?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/28059126
has comment: http://stackoverflow.com/comment/44501021
tagged with: closures
has body: I've been trying to understand the functional composition techniques of Javascript and I came up with his working code of a toy quasi-MVC to demonstrate my question: var modelFactory = function() { var _state = false; var _listener = null; var _updateView = function() { _listener(_state); }; var _interface = { registerListener: function(listen) { _listener = listen; }, eventHandler: function() { _state = true; _updateView(); } }; return _interface; }; var viewFactory = function(updateFunction) { var _hook = $('&lt;div class="box"&gt;&lt;/div&gt;'); $('body').append(_hook); var _interface = { getHook: function getHook() { return _hook; }, update: updateFunction(_hook) }; return _interface; }; var main = function() { var modelInstance = modelFactory(); var viewInstance = viewFactory( function bindHook (hook) { return function bindState (state) { if (state === true) { hook.addClass("red"); } else { hook.removeClass("red"); } }; } ); modelInstance.registerListener(viewInstance.update); modelInstance.eventHandler(); // When called, mutates _state, then calls the listener }; $(document).ready(main); .box { background-color: #000; width: 100px; height: 100px; } .red { background-color: #f00; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; In this code I am passing in a function that binds the "hook" variable and returns a function whose scope retains that binding. This is the crux of my question. I want to be able to abstract out the "hook" binding, so I can just pass in the "state" binding function to a function that then does the "hook" binding. I haven't figured out how to do it with the late-binding facilities Javascript offers (apply/call this). I can pass around object references to keep state, and get stuff done, but I'm interested in more functional approaches to solving this. So: a) Is there a way to do what I'm trying to do with basic closures in Javascript, if so how, or b) If I should use late-binding "this…
tagged with: functional-programming
score: 2
has comment: http://stackoverflow.com/comment/44499746
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44499732
favorite count: 0
tagged with: lexical-closures
type: Question
has title: The nuances of closing over in Javascript
upvote count: 2
has answer: http://stackoverflow.com/a/28059256
answer count: 1
has comment: http://stackoverflow.com/comment/44500989

http://stackoverflow.com/tag/c
tags question: http://stackoverflow.com/q/28108778
tag name: c
type: Tag
tags question: http://stackoverflow.com/q/28084436

http://stackoverflow.com/comment/44456920
comment on: http://stackoverflow.com/q/28035960
score: 0
type: Comment
has text: People can only make guesses without seeing your actual code. Your description simply isn't enough detail to know what you're doing. Your code (JS, CSS, HTML) would allow people to give you a precise answer without guessing.
type: QuestionComment

http://stackoverflow.com/comment/127325775
type: Comment
comment on: http://stackoverflow.com/a/63716125
has text: When i am export it as svg, then image is not animated.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44518214
comment on: http://stackoverflow.com/q/28064987
type: QuestionComment
has text: Here is the part of the spec: https://html.spec.whatwg.org/multipage/forms.html#common-input-element-events
score: 0
type: Comment

http://stackoverflow.com/a/47330562
type: Answer
downvote count: 0
score: 1
has body: this is a simple counter exapmple function countdown(elementName, minutes, seconds) { var element,endTime,hours,mins,msLeft,time; function twoDigits(n) { return (n &lt;= 9 ? "0" + n : n); } function updateTimer() { msLeft = endTime - (+new Date); if (msLeft &lt; 1000) { element.innerHTML = "countdown's over!"; } else { time = new Date(msLeft); hours = time.getUTCHours(); mins = time.getUTCMinutes(); element.innerHTML = (hours ? hours + ':' + twoDigits(mins) : mins) + ':' + twoDigits(time.getUTCSeconds()); setTimeout(updateTimer, time.getUTCMilliseconds() + 500); } }element = document.getElementById(elementName); endTime = (+new Date) + 1000 * (60 * minutes + seconds) + 500; updateTimer();} to call a function countdown("countdown", 1, 5); countdown("countdown2", 100, 0);
upvote count: 1
answers question: http://stackoverflow.com/q/27972913

http://stackoverflow.com/q/27984228
accepted answer: http://stackoverflow.com/a/27985891
has body: I'm trying to upload a binary file to a server, but avoid a complete page refresh when the server responds. I'm far from experienced at this type of thing so everything about the way I'm doing it is subject to correction. This is what I have done. I have HTML like this: &lt;form id='form'&gt; &lt;input type='file' id='filename'&gt;&lt;/input&gt; &lt;input type='submit' onclick='doTheBusiness'&gt;&lt;/input&gt; &lt;/form&gt; I have javascript like this: function doTheBusiness () { var url = '/target.html?arg1=' + val1 + '&amp;arg2=' + val2; var fd = new FormData ($('#filename')[0]); $.each ( $.ajax ({ 'url': url, 'type': 'post', 'processData': false, 'contentType': 'multipart/form-data', 'success': success-routine, 'data': { 'formData': fd } }); } Before I added 'processData': false, I was getting an exception from Firefox and Chrome that appeared to be caused because the ajax function was trying to serialise my FormData object. When I looked into resolving that, I found that if I didn't have 'contentType': 'multipart/form-data' it would default to application/x-www-form-urlencoded and I didn't think that would be any use for the file contents. Once I'd done all that, I found that I couldn't access my arg1 and arg2 parameters on the server if I put them into the 'data' object as I have done in other places, so I hand-encoded them into the URL. Unfortunately it's not working. Using Firefox, I now don't see the request at the server. Chrome and IE11 send a request, but I get an Internal apreq error when I call apreq_body to see if I can get to the uploaded file data. I've been through the mod_apreq code, and found that Internal apreq error corresponds to APREQ_ERROR_GENERAL, but that error seems to be just what it says, a general error code and I didn't like the idea of trying to follow all the possible places where it might be generated. (I've already seen How to send FormData objects with Ajax-requests in jQuery? which pointed me towards the 'processData' and 'conten…
type: Question
type: AnsweredQuestion
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27985891
has title: Submit file upload via Ajax
answer count: 1
tagged with: jquery
tagged with: ajax
linked to: http://stackoverflow.com/q/6974684

http://stackoverflow.com/a/28056535
has comment: http://stackoverflow.com/comment/55631031
type: Answer
answers question: http://stackoverflow.com/q/28056433
score: 4
has body: There's no default datepicker for Ember.js. However addon you are talking about - Ember CLI Datepicker works great. It uses Pikaday which supports following browsers: Usage of Ember CLI Datepicker is simple, you can use following code for creating datepicker for birthday: {{date-picker date=model.birthday valueFormat='date' yearRange="-100, 0"}} Installation is very simple if you use Ember CLI: ember install:addon ember-cli-datepicker If you are worried if you can use it with recent stable versions of Ember.js - the answer is yes. It works with latest version which is 1.9.1. You can, of course, use it with Ember Data too. If you're not using Ember CLI, this answer might be helpful.
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28056433

http://stackoverflow.com/comment/44368173
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27988559
has text: Why are you doing `+=` for innerHTML? You're not adding anything at that point.
type: Comment

http://stackoverflow.com/q/28071492
type: Question
score: -2
has comment: http://stackoverflow.com/comment/44523367
tagged with: javascript
tagged with: jquery
has title: end of quiz results page not displaying properly Jquery
downvote count: 2
answer count: 1
favorite count: 0
has body: I have created a quiz with 7 questions. Each question has a value in a button that is accumulated until it reaches the results page. At the end, I want it to display an image dependent upon the accumulated values. It is kind of working but shifting all over the place. Also the first result is showing up throughout the quiz. Also, if you have a suggestion on how I can better simplify this code, I would appreciate it. Also, not sure why Question 2 doesn't show all the buttons properly in this post but it does run properly on my end. Thanks! $(document).ready( function() { function qHome () { $("#bkgHome").show(); $("#question1").hide(); $("#question2").hide(); $("#question3").hide(); $("#question4").hide(); $("#question5").hide(); $("#question6").hide(); $("#question7").hide(); $("#results").hide(); $("#goat").hide(); $("#fish").hide(); $("#bird").hide(); } $(qHome).on("load", qHome); function queHomeClick () { $("#bkgHome").hide(); $("#question1").show(); $("#question2").hide(); $("#question3").hide(); $("#question4").hide(); $("#question5").hide(); $("#question6").hide(); $("#question7").hide(); $("#results").hide(); $("#goat").hide(); $("#fish").hide(); $("#bird").hide(); } $("#begin").on('click', queHomeClick); function que1Click () { $("#bkgHome").hide(); $("#question1").hide(); $("#question2").show(); $("#question3").hide(); $("#question4").hide(); $("#question5").hide(); $("#question6").hide(); $("#question7").hide(); $("#results").hide(); $("#goat").hide(); $("#fish").hide(); $("#bird").hide(); } $("#scary_height").on('click', que1Click); $("#small_space").on('click', que1Click); $("#scary_fire").on('click', que1Click); $("#scary_animals").on('click', que1Click); function que2Click () { $("#bkgHome").hide(); $("#question1").hide(); $("#question2").hide(); $("#question3").show(); $("#question4").hide(); $("#question5").hide(); $("#question6").hide(); $("#question7").hide(); $("#results").hide(); $("#goat").hide(); $("#fish").hide(); $("#bird").hide(); } $("#goa…
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/28071671
accepted answer: http://stackoverflow.com/a/28071671

http://stackoverflow.com/q/28098999
has title: WebRTC streaming does not work with some browser combinations
has comment: http://stackoverflow.com/comment/44573980
has comment: http://stackoverflow.com/comment/44575571
type: UnansweredQuestion
tagged with: google-chrome
has body: I stream between two browser sites, one is called master and the other is called slave. Master streams video to slave. Master is always active, slave sometimes connects. I initiate the connection on both sides with this configuration: {'iceServers': [{'url': 'stun:mystunserveraddress'}]}, {'optional': [{'DtlsSrtpKeyAgreement': true},{'RtpDataChannels': true}]} Master sends offer for receiving no audio and no video. Slave handles offer and answers with offer for receiving video. Master handles answer. Ice candidates are processed on both sides. Video is attached to peer connection before sending offer. I tested it to work with following combination of Master->Slave: Android Chrome->Linux Chrome - works Android Chrome->Linux Firefox - works Android Firefox->Linux Firefox - works Android Firefox->Linux Chrome - doesn't work Linux Chrome->Linux Chrome - works Linux Chrome->Linux Firefox - works Linux Firefox->Linux Firefox - works Linux Firefox->Linux Chrome - doesn't work Linux Chrome->Windows Chrome - doesn't work Linux Chrome->Windows Firefox - works Linux Firefox->Windows Firefox - works Linux Firefox->Windows Chrome - doesn't work Why is it not working for those combinations? No error is given. Everything looks ordinary as normal, but the video element on slave is blank. Offering audio and video from both ends, or auto does not change anything. On Firefox master I have two "connected" states and on Chrome slave I have "checking" state. I have tested on local server and remote server, behaves the same. It does not work on AppRTC example either.
type: Question
has comment: http://stackoverflow.com/comment/44573929
has comment: http://stackoverflow.com/comment/44579882
tagged with: firefox
tagged with: webrtc
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44573894
score: 0
tagged with: linux
has answer: http://stackoverflow.com/a/28113091

http://stackoverflow.com/a/28077748
type: Answer
score: 2
downvote count: 0
has body: Rather than adding the inline styles which will get overridden without a lot of hacking why not use the headerTemplate like this: field: "ContactName", title: "Contact Name", width: 200, headerTemplate:' Contact Name ' Then have the appropriate css class in your style sheets like: .greenHeader { color:green ; } for an example see this dojo: Example of header template being used.
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28076987
answers question: http://stackoverflow.com/q/28076987

http://stackoverflow.com/a/28002676
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44394241
accepted answer of: http://stackoverflow.com/q/28002627
has comment: http://stackoverflow.com/comment/44394293
downvote count: 0
has comment: http://stackoverflow.com/comment/44394404
upvote count: 2
has comment: http://stackoverflow.com/comment/44394448
type: Answer
has comment: http://stackoverflow.com/comment/44394231
score: 2
has comment: http://stackoverflow.com/comment/44394544
has body: All values sent in an ajax request must be appended to the FormData object, not just the files. Also the files have to be added individually. var formData = new FormData(); for (var i = 0; i &lt; filesArray.length; i++){ formData.append( 'files[]', filesArray[i]); } formData.append( 'action', 'auto_post'); ... data: formData,
has comment: http://stackoverflow.com/comment/44394521
answers question: http://stackoverflow.com/q/28002627

http://stackoverflow.com/comment/44402608
comment on: http://stackoverflow.com/q/28007109
score: 0
type: Comment
type: QuestionComment
has text: By assigning the result of the same jQuery selection again …?

http://stackoverflow.com/comment/44444101
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28028197
has text: I changed it (and the corresponding form input field values) to machine_class. However, it it still not working properly in IE 8 or 9.
type: AnswerComment

http://stackoverflow.com/comment/44520626
comment on: http://stackoverflow.com/a/28068554
type: Comment
has text: Ahh that worked! So I take it now that the data is JSON encoded, I could just do `$.JSON.parse($data["key"]);` in order to have it accessible by javascript?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44403842
has text: You should add the function to the `submit` event of the form, and prevent the default behavior with `preventDefault`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28007907

http://stackoverflow.com/q/27975072
tagged with: css
answer count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44342827
type: Question
has comment: http://stackoverflow.com/comment/44342795
has comment: http://stackoverflow.com/comment/44342968
tagged with: javascript
has comment: http://stackoverflow.com/comment/44342899
has comment: http://stackoverflow.com/comment/44343093
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44342870
has comment: http://stackoverflow.com/comment/44343054
type: UnansweredQuestion
has body: I don't understand why this isn't working. I am trying to make this navigation stick to the top once the user has scrolled the height of the header. http://jsfiddle.net/fq8ebw6x/ There is the JSfiddle and it is doing what I want however when I copy and paste the code into my document the nav doesn't become fixed. Any help would be much appreciated. Thanks! var mn = $(".nav"); mns = "nav-scrolled"; hdr = $('header').height(); $(window).scroll(function() { if ($(this).scrollTop() > hdr) { mn.addClass(mns); } else { mn.removeClass(mns); } }); header { background: url("images/main-banner.jpg"); background-size: cover; height: 940px; position: fixed; top: 0; width: 100%; } .nav, .container { position: relative; } .nav-scrolled, header { position: fixed; top: 0; width: 100%; } .default-bg { background: #ffffff; background: url("images/body-bg.jpg"); position: relative; overflow: hidden; } .nav { background: url("images/nav-bg.png"); height: 87px; -webkit-box-shadow: 0 5px 10px 0 rgba(50, 50, 50, 0.20); -moz-box-shadow: 0 5px 10px 0 rgba(50, 50, 50, 0.20); box-shadow: 0 5px 10px 0 rgba(50, 50, 50, 0.20); z-index: 150; } .container { width: 1200px; margin: 0 auto; } Hello <?php wp_head(); ?> Nav Link 1 Nav Link 2 Nav Link 3 Nav Link 4 Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean fringilla, purus in porttitor pellentesque, erat arcu tincidunt diam, dapibus faucibus leo mauris at sapien. In porttitor vehicula sodales. Vivamus massa neque, facilisis eu felis ut, aliquet convallis nisi. Nam elementum tellus vitae gravida fermentum. Nullam et imperdiet leo. Integer ut euismod lorem, in placerat lacus. Curabitur bibendum arcu ut feugiat commodo. Suspendisse ut mi vel orci ullamcorper tincidunt. Nam vitae fringilla nibh. Nullam hendrerit blandit velit eu hendrerit. Praesent eu enim non massa pellentesque lobortis. In in sagittis dolor. Aliquam non massa erat. Ut aliquet gravida tellus, sed volutpat nibh condimentum et. Nunc quam purus,…
tagged with: http://stackoverflow.com/tag/html
has title: Sticky Nav after header is scrolled

http://stackoverflow.com/comment/44373463
type: QuestionComment
comment on: http://stackoverflow.com/q/27991293
score: 0
has text: Tested in Chrome and Firefox, present in both. Also, observation; if you let the animation finish, this issue doesn't appear.
type: Comment

http://stackoverflow.com/comment/44525720
type: AnswerComment
has text: that works except for methods and recursive refs, any suggestions for those objects?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28072875

http://stackoverflow.com/q/28112000
tagged with: requirejs
has answer: http://stackoverflow.com/a/28115432
accepted answer: http://stackoverflow.com/a/28115432
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44598059
downvote count: 0
has title: React: Cross origin requests on loading file without local server
has comment: http://stackoverflow.com/comment/44598610
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/44597912
type: Question
has body: I have two modules - one in React JSX and another in JavaScript. define(function (require) { var ExternalJSInterface = require("./../../utils/ExternalJSInterface"); var ExternalJSXInterface = require("jsx!ExternalJSXInterface"); } I'm getting this error while loading ExternalJSXInterface: XMLHttpRequest cannot load file:///Users/.../../ExternalJSXInterface.jsx. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource. I think same error should also come for ExternalJSInterface. But it's working fine loading this. I'm using Chrome with flag setting allow-file-access-from-files.
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/44597691
tagged with: reactjs
answer count: 1
favorite count: 0

http://stackoverflow.com/a/27968444
has body: You should use either exports to attach properties to the predefined exported object or reassign module.exports to your own object. The latter is common when exporting a constructor for example. exports.foo = function() { console.log('Hello world!'); }; exports.add = function(a, b) { return a + b; }; // Then the module might be used like so: // var mymodule = require('./mymodule'); // mymodule.foo(); // console.log(mymodule.add(1, 9)); Or replace the exports object: function Foo() { } module.exports = Foo; // then typically users do this in their script: // var Foo = require('./mymodule'); // var myFoo = new Foo();
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44330009
answers question: http://stackoverflow.com/q/27968310
upvote count: 2
has comment: http://stackoverflow.com/comment/44329963
has comment: http://stackoverflow.com/comment/44330238

http://stackoverflow.com/q/28040489
has comment: http://stackoverflow.com/comment/44465022
has body: Please have a look at the below code TTSScript.js function TTS() { var msg = new SpeechSynthesisUtterance("yohan"); var voices = window.speechSynthesis.getVoices(); this.speakText = function() { window.speechSynthesis.speak(msg); } } index.html TODO supply a title Click me Unfortunatly when I click on the button in the html page, what I get is an error. It is below. Uncaught TypeError: undefined is not a function (13:42:13:817 | error, javascript) at speak2 (public_html/index.html:23:26) at onclick (public_html/index.html:31:126) I am not much familiar with JavaScript, can you please let me know why I am getting this error and how to fix it?
has comment: http://stackoverflow.com/comment/44465262
has comment: http://stackoverflow.com/comment/44465379
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28041234
tagged with: function
has title: Unable to call a Javascript class from HTML
tagged with: javascript
has comment: http://stackoverflow.com/comment/44465419
possible better answer: http://stackoverflow.com/a/28041171
favorite count: 0
has comment: http://stackoverflow.com/comment/44465403
has comment: http://stackoverflow.com/comment/44465344
has answer: http://stackoverflow.com/a/28041171
type: Question
has comment: http://stackoverflow.com/comment/44464832
tagged with: http://stackoverflow.com/tag/html
tagged with: web
accepted answer: http://stackoverflow.com/a/28041234
upvote count: 3
answer count: 2
has comment: http://stackoverflow.com/comment/44464982
downvote count: 1
has comment: http://stackoverflow.com/comment/44464931
has comment: http://stackoverflow.com/comment/44465291

http://stackoverflow.com/comment/44331663
type: AnswerComment
comment on: http://stackoverflow.com/a/27969248
type: Comment
score: 0
has text: This is exactly what I was thinking. Now which do I accept? And plus the upvote war is also nearby.

http://stackoverflow.com/a/28070821
score: 1
answers question: http://stackoverflow.com/q/28069433
upvote count: 1
downvote count: 0
type: Answer
has body: The argument to the --eval option needs to be a single bash word, so you need to avoid bash word-expanding $value. That means you need to put the expansion inside double-quotes: mongo --verbose localhost:27017/myDB --eval \ 'db.ips.update({"id":"id"}, { $push: { "key": {"key":"'"$value"'"}}})' ^ ^ That argument consists of a single-quoted segment, a double-quoted segment, and then a final single-quoted segment. The double quotes inside the single-quoted segments are, of course, ordinary characters.

http://stackoverflow.com/comment/44539609
has text: if i can answer for the sake of answering, i would write wrap DOM access in $timeout so that it will be pushed to async event queue and will run after the current digest cycle. But ideally you shouldn't worry about DOM while using bindings.
comment on: http://stackoverflow.com/q/28080352
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/44399207
has text: Thanks, added. cssInject and cssRemove are in inject.js and one is called at the end of background.js depending on the value of a variable. I can include the rest of the code if it's needed, but I wasn't sure if it'd be too distracting/irrelevant.
score: 0
comment on: http://stackoverflow.com/q/28005359
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44436679
type: Comment
has text: What library are you using for this `dialog.modal` function?
comment on: http://stackoverflow.com/q/28025460
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44489055
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28050047
has text: If thats the case then yes that won't work. So is it possible for express to process another req before it issues a previous res?
type: AnswerComment

http://stackoverflow.com/comment/44351094
has text: have you try after returning `true` from `shouldOverrideUrlLoading` ?
comment on: http://stackoverflow.com/q/27979707
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27969285
possible better answer: http://stackoverflow.com/a/34024204
tagged with: cordova
downvote count: 0
type: AnsweredQuestion
has title: Access Photos of iOS Photos app using Meteor.js and Cordova
score: 3
has answer: http://stackoverflow.com/a/34024204
has comment: http://stackoverflow.com/comment/44582772
has body: How can you select a photo from the Photos iOS app? With mdg:camera installed, I only managed to get photos by taking them using the iPhone's camera. How can we select an existing photo from the Photos app? var cameraOptions = { width: 800, height: 600 }; MeteorCamera.getPicture(cameraOptions, function (error, data) { console.log('photo: ', data) });
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/28179131
accepted answer: http://stackoverflow.com/a/28179131
tagged with: meteor
favorite count: 0
tagged with: cordova-plugins
upvote count: 3

http://stackoverflow.com/comment/44502335
type: QuestionComment
comment on: http://stackoverflow.com/q/28060478
has text: This might answer http://stackoverflow.com/questions/3452816/does-ie8-out-of-the-box-have-support-for-localstorage
score: 0
type: Comment

http://stackoverflow.com/q/28028944
tagged with: javascript
score: 0
has body: When I use the mjn:famous package in my meteor application the links &lt;a&gt;&lt;/a&gt; only work when I do a long tap on mobile. fast tapping will route me to the page also but its refreshing the page and I don't want a refresh here. I also can't deactivate this behavior with. preventDefault() When I remove the package everything works like expected. I´m also using the famousviews packages. How to fix the reload on mobile? (Tested on iOS8)
tagged with: meteor
accepted answer: http://stackoverflow.com/a/28031179
tagged with: iron-router
tagged with: famo.us
type: Question
type: AnsweredQuestion
has title: mjn:famous package destroys my links
has answer: http://stackoverflow.com/a/28031179
answer count: 1

http://stackoverflow.com/comment/44429744
comment on: http://stackoverflow.com/a/28021389
has text: Thanks, looks like a really nice solution! :D When I asked how to create a list for a mobile, a lot recommended to make the body as fixed. and not the list itself. next time I will play this before. I'll wait for more solutions, If you have any other solution that will make it work without changing a big part of my code, I'll be happy to hear. If I'll see that there is no other way so I'll go with your advise mentioned above and mark it as an answer. Thank you very much for your effort! :D
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/28085107
has comment: http://stackoverflow.com/comment/44548529
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Redirect url link based on login user using javascript
has body: How to create url link based on user name(gmail). Eg: http://www.test.com/%username% The following code more or less suitable for me. Only i want to know how to get username automatically on the input area. Link : nothing here yet Here also same issue http://www.test.com/
has comment: http://stackoverflow.com/comment/44548222
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44548910
has answer: http://stackoverflow.com/a/28086211
has comment: http://stackoverflow.com/comment/44548853
has answer: http://stackoverflow.com/a/28086028
has comment: http://stackoverflow.com/comment/44549082
has comment: http://stackoverflow.com/comment/44548429
tagged with: hyperlink

http://stackoverflow.com/q/28056716
favorite count: 0
linked to: http://stackoverflow.com/q/11455515
has answer: http://stackoverflow.com/a/41137585
has answer: http://stackoverflow.com/a/47337711
has body: How to check if an element has event listener on it, if I use an inline function on it like the code below? Because I have a function that recalls the function and add the event listener, but it cause to have duplication event listener causing it to trigger a function twice. How can I check it so I can prevent it to add an event listener if is it already exist? for (var a = 0;a&lt;formFieldInput.length;a++) { if(formFieldInput[a].hasAttribute("name") &amp;&amp; formFieldInput[a].attributes.title.value !== "Valid Until") { formFieldInput[a].addEventListener("click",function(event) { toggleFieldList(event,"show"); }); }
accepted answer: http://stackoverflow.com/a/28056815
has comment: http://stackoverflow.com/comment/75093151
score: 144
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44495294
upvote count: 144
has answer: http://stackoverflow.com/a/28056815
has comment: http://stackoverflow.com/comment/44495293
has comment: http://stackoverflow.com/comment/44495510
possible better answer: http://stackoverflow.com/a/41137585
has comment: http://stackoverflow.com/comment/139772232
has title: Check if an element has event listener on it. No jQuery
answer count: 3
duplicate of: http://stackoverflow.com/q/11455515
has comment: http://stackoverflow.com/comment/44495431
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/44410795
score: 0
comment on: http://stackoverflow.com/q/28011634
type: Comment
type: QuestionComment
has text: @ArtjomB. I've registered these events, but there's no output on my console... (see update1)

http://stackoverflow.com/comment/44333704
type: QuestionComment
comment on: http://stackoverflow.com/q/27964327
has text: I feel it's rather hard to put up a minimal example with all the files it needs to work. But I'm sure someone else had that problem already! Any ideas? :/
score: 0
type: Comment

http://stackoverflow.com/comment/44472839
type: Comment
comment on: http://stackoverflow.com/a/28043602
has text: @shaileshshekhawat I just want to point out that editing your original question and changing the content is considered to be "very rude and uncool on this site" You ask a question and you get the answer to the question you asked. Not others fault that you asked the wrong question. Now, me being "very cool and a super nice guy here". Presumably **"Bob"** is only a single element in the presented array. It's really just a matter of restricting the query to just include that single item as a match. Is this really what you still have no idea how to do?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44550188
comment on: http://stackoverflow.com/q/28086337
score: 0
type: Comment
type: QuestionComment
has text: Quick comment as to why it's not working - `parent()` goes up the chain one step, then `find(':checkbox')` goes right back to where you were. That's why you can't check anything as it stands.

http://stackoverflow.com/a/27978989
has body: it good if you use undefined in javascript as below if(typeof variable_here === 'undefined'){ // your code here. }; so for you it will be like if(typeof error!==null){ //make use of none insted of hidden to hide element completly //if you use hidden it will consume space on you page //with none it will not consume space document.getElementById('loginform').style.display = "none"; alert("ok"); }
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27978956
downvote count: 0

http://stackoverflow.com/q/27979281
tagged with: javascript
tagged with: jquery
has title: Inner .each()-loop with .append()
tagged with: append
has answer: http://stackoverflow.com/a/27979456
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44350278
tagged with: loops
tagged with: each
type: Question
accepted answer: http://stackoverflow.com/a/27979456
score: 0
has body: I have an array of projects. Projects can have subprojects, hence the field parent_id. I want to show a list of subprojects and for each subproject i want to "preview" the prio1 subprojects of that subproject. So i have two .each()-loops and use .append() to add the HTML (INNER AND OUTER). For some reason the preview subprojects come out on top of the list instead of inside the project-div. Any ideas what i do wrong? var filterdata = this.get_subprojects(project_id); // **** OUTER LOOP ******* filterdata.forEach(function(project) { var subprojects = projectList.get_subprojects(project.project_id, 1); $("#projects>.list").append( ' ' +' ' +' ' +' ' +' ' +' ' +' '+project.title+' ' +' '); //*** INNER LOOP LOOP FOR PREVIEW ***** subprojects.forEach(function(subproject,1) { $("#projects>.list").append( +''+subproject.title+''); }); $("#projects>.list").append( ' ' +' ' +' ' +' '); return $("#projects>.list").html(); });
answer count: 1

http://stackoverflow.com/comment/44332663
comment on: http://stackoverflow.com/a/27969648
score: 1
type: AnswerComment
has text: `$(".sidebar-wrapper").closest(".mk-main-wrapper").length && scroll > 147` worked perfectly on my actual page. Thanks a ton! Been playing with this for days.
type: Comment

http://stackoverflow.com/comment/44592445
type: QuestionComment
comment on: http://stackoverflow.com/q/28109006
has text: just a thought but have you tried textArea.innerHTML = textToShow?
score: 0
type: Comment

http://stackoverflow.com/comment/44459930
score: 0
type: Comment
has text: @Chucrutes much simpler and the same thing. The "and" is always implied within the same document in MongoDB queries: `http://server/usuarios?query={"senha":"1234", "email":"igor@teste"}`
type: AnswerComment
comment on: http://stackoverflow.com/a/28035052

http://stackoverflow.com/q/28056691
tagged with: css
has body: I am adding some CSS styles using .... in the htm file specified in the templateUrl when loading a directive. Is this a bad idea? Meaning will it get repeated every time the template is instantiated on the rendered page or is Angular smarter than that? Using the inspector, it seems that it gets repeated with each instance of the template. How then can I load some CSS that is scoped to a template (directive) and load only and only if the template is loaded. Maybe I'm over-optimizing.
has title: Using in my Angular template
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/28058167
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/44495130
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44495346
score: 0
has answer: http://stackoverflow.com/a/28058167

apache
tag name: apache
tags question: http://stackoverflow.com/q/28093005
type: Tag

http://stackoverflow.com/comment/44373142
has text: Sorry is this is off-topic a bit, but what is your OS and browser? Live-reload consistently crashes on me with Windows 8.1 and Chrome
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27991157

http://stackoverflow.com/comment/44557530
score: 0
comment on: http://stackoverflow.com/q/28090440
has text: @RoryMcCrossan if its one of the first 6 elements, its a select, so set the value to "All" which is an option I have, otherwise the 7th element is a text input, so set the val to ""
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/48150656
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27970365
has text: I'm curious why you unaccepted my answer and then accepted yours, despite the fact that my answer encompasses your solution and was up here first.
type: AnswerComment

http://stackoverflow.com/comment/44789349
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28113957
score: 0
has text: are you receiveing any errors in console? also the way you are inserting ` ` looks uncorrect for me in this part `$('#success > .alert-success') .append(' ');`

http://stackoverflow.com/q/28090443
score: 1
favorite count: 0
has title: Change the way to load files from grunt-karma 0.9 to 0.10?
type: UnansweredQuestion
tagged with: node.js
tagged with: karma-runner
answer count: 0
upvote count: 1
type: Question
has body: It there any change of the way to load files in karma.options.files property from version 0.9.x to 0.10.x? in 0.9.x I have this code and works fine prj: { src: 'src', test: 'test', jsPattern: '**/*.js', files: { src: ['&lt;%= prj.src %&gt;/&lt;%= prj.jsPattern %&gt;'], srcTest: ['&lt;%= prj.test %&gt;/&lt;%= prj.jsPattern %&gt;'] } }, karma: { options: { files: [ '&lt;%= prj.files.src %&gt;', '&lt;%= prj.files.srcTest %&gt;' ] } } but in 0.10.1 give me this error WARN [config]: Invalid pattern src/**/*.js! Object is missing "pattern" property. WARN [config]: Invalid pattern test/**/*.js! Object is missing "pattern" property. For fixing I have to change prj: { src: 'src', test: 'test', jsPattern: '**/*.js', files: { src: '&lt;%= prj.src %&gt;/&lt;%= prj.jsPattern %&gt;', srcTest: '&lt;%= prj.test %&gt;/&lt;%= prj.jsPattern %&gt;' } }, karma: { options: { files: [ '&lt;%= prj.files.src %&gt;', '&lt;%= prj.files.srcTest %&gt;' ] } } And it works! but, How can include in karma.options.files an array of patterns like in first example?
downvote count: 0
tagged with: javascript
tagged with: gruntjs

http://stackoverflow.com/comment/44574439
type: Comment
type: QuestionComment
has text: Have you tried coding this in a static page first? If you are dynamically inserting complex `html` into the DOM is easier to have it working before you code the `javascript`.
comment on: http://stackoverflow.com/q/28099309
score: 0

http://stackoverflow.com/comment/44406485
comment on: http://stackoverflow.com/a/28005068
score: 2
has text: This is classic asp, not .net
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27980329
tagged with: javascript
tagged with: jquery
score: 0
tagged with: colors
has answer: http://stackoverflow.com/a/27980436
answer count: 1
has comment: http://stackoverflow.com/comment/44364166
has title: Change colors of pixel in rescaled black and white picture
tagged with: php
has comment: http://stackoverflow.com/comment/44352775
type: AnsweredQuestion
has body: Given a black and white picture, which the user created. I want to add a color function. Since the size of the picture he created may vary, I fixed the height in PHP and drew the original image: //Get img Data $.ajax({ url: "/_app/request.php", type: "POST", dataType:'json', data: ({msg : message}), success: function(data){ $('#qroriginal').attr("src",data) } }); Inside the create function I used: $img= imagescale($img , 200, 200); and then changed the color using a color picker as input: //in front and back are the new rgb color values var c=$('#prev'); var ctx = c[0].getContext("2d"); var img=$('#original'); ctx.drawImage(img[0],0 ,0); var imgData= ctx.getImageData(0,0, c[0].width, c[0].height); //change colors var i; for (i = 0 ; i&lt;imgData.data.length;i+=4){ if(imgData.data[i] &gt; 200){ imgData.data[i] = front[0]; imgData.data[i+1] = front[1]; imgData.data[i+2] = front[2]; } else if(imgData.data[i] &lt; 50){ imgData.data[i] = back[0]; imgData.data[i+1] = back[1]; imgData.data[i+2] = back[2]; imgData.data[i+3] = imgData.data[i+3]; } Now the problem: Without rescaling, the rgb values of black are already between 245-255. But if i rescaled it. I get some values which are between 100-150. So I dont't know if it is a white or black pixel. I was thinking about changing the create function in PHP or writing a better filter in javascript, looking at the neighbour pixel.
has comment: http://stackoverflow.com/comment/44352255
type: Question
tagged with: canvas
accepted answer: http://stackoverflow.com/a/27980436

http://stackoverflow.com/q/28049540
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/44486292
has title: Canvas draws distorted figures and text
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/44482276
tagged with: javascript
has body: I'm building a simple Chart using Canvas. (All the custom packages out there do not fit my needs). On the very basic step of development I've got into a distorted effect of everything I try to draw. I've been lurking the forum for answers and I don't have CSS rules applied to canvas tag. HTML: &lt;div id="platform-wrapper"&gt; &lt;canvas id="platform-chart" width="500" height="250"&gt;&lt;/canvas&gt; &lt;/div&gt; CSS: #platform-wrapper { width: 500px; height: 250px; } JS: ;(function() { var PlatformChart = function() { var graph, canvas, ctx, xPadding = 30, yPadding = 30, data = { values:[ { X: "16:13:15", Y: 1.23453 }, { X: "16:13:30", Y: 1.24528 }, { X: "16:13:45", Y: 1.23438 }, { X: "16:14:00", Y: 1.34544 }, { X: "16:14:15", Y: 1.53444 } ]}; function getMaxY() { var max = 0; for(var i = 0; i &lt; data.values.length; i ++) { if(data.values[i].Y &gt; max) { max = data.values[i].Y; } } return max; } function getXPixel(val) { return ((graph.width() - xPadding) / data.values.length) * val + (xPadding * 1.5); } function getYPixel(val) { return graph.height() - (((graph.height() - yPadding) / getMaxY()) * val) - yPadding; } return { init: function(canvasId) { var selector = '#'+canvasId; if (!canvasId || !$(selector).length) return false; graph = $(selector); canvas = graph[0]; ctx = canvas.getContext('2d'); return this; }, config: function(config) { for(var prop in config) { if (ctx.hasOwnProperty(prop)) { ctx[prop] = config[prop]; } } return this; }, drawBase: function() { //ctx.rect(0, 0, canvas.width, canvas.height); //ctx.fillStyle = "#4c88e1"; //ctx.fill(); return this; }, clear: function() { ctx.clearRect(0, 0, canvas.width, canvas.height); return this; }, drawX: function(offset) { //ctx.fillStyle = "#fff"; for(var i = 0; i &lt; data.values.length; i ++) { ctx.fillText(data.values[i].X, getXPixel(i) + xPadding - 20, graph.height() - 10); } return this; }, drawY: function(offset) { ctx.textAlign = "right"; //ctx.textBaseline = "middle"; //ctx.fillStyle = "#fff"; f…
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44482945
has comment: http://stackoverflow.com/comment/44482061
type: UnansweredQuestion

http://stackoverflow.com/comment/44615480
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28120585
has text: try replacing line breaks with ` ` .

http://stackoverflow.com/comment/44579674
comment on: http://stackoverflow.com/a/28094684
score: 0
type: AnswerComment
type: Comment
has text: I don't string people up who actually explain code. I only string them up if they throw links at me with no explanations. I'll give this a try when I start my work day in a few hours and let you know how it goes.

http://stackoverflow.com/comment/44512094
has text: I get undefinied there to, I'll check if I have to enable WebRTC support....
type: Comment
comment on: http://stackoverflow.com/q/28064331
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44515597
has text: Thank You for Your answer. My problem is this: I want the datepicker to trigger on the tbDate TextBox, but it only works if the RequiredFieldValidator for the TextBox tbEmail is present. If i delete the validator, the datepicker won't trigger on the tbDate TextBox. That is strange since i validate different TextBox. And they are not even in the same div.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28067528

http://stackoverflow.com/comment/44537109
type: Comment
comment on: http://stackoverflow.com/a/28056892
has text: Yes, I ended up using adParamOutput.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44439518
score: 0
has text: I also copied your code into my JS file and tried it. It updated the infowindow with my coordinates, but it didn't bring up the markers. So weird. I also tried on Firefox to make sure and cleared my cache/cookies. Your jsfiddle demo works perfectly fine though.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27992890

http://stackoverflow.com/q/28072643
favorite count: 0
has title: How does Rx really work on web (client side)
accepted answer: http://stackoverflow.com/a/28078031
tagged with: reactive-programming
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44528701
type: Question
upvote count: 4
has body: I have gone through the introduction part at Rx CodePlex page. I have watched the video of the guy with CascadiaJS. I have discovered how the RxJS library is used. I have a question about how is it going to help me with my existing Ajax application and what do I have to change on server side as well as client-side to make the most of RxJS. Scenario I have a REST service written using ASP.NET Web API. The service currently has one method, it takes an array of coordinates and return another array of coordinates. So the call is very simple, it goes like this. $.ajax({ url: "http://www.myservice.com/service1/", type: "POST", data: JSON.stringify(params), contentType: "application/json;charset=utf-8", success: handle_success, error: handle_failure, OPTIONS: null, }); Now the above call simply calls a REST service and takes appropriate action on how the results come out. With Rx, I heard the mantra of "Push" instead of Pull. How are we going to fit "Push" into the sample above ? Am I going to change my REST service to be a Listening TCP Socket which my webpage will stay connected (or make a Keep-Alive connection) and new values will be "Pushed". Or this would just be a service call as above, but the success/error will just be "channeled" through Observable and once the call is finished, the job of that Observable is finished ?
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/28078031
downvote count: 0
answer count: 1
tagged with: rxjs

http://stackoverflow.com/comment/44506369
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28062118
score: 1
has text: Hey, Saurabh! First make it clear; Why do you need validation for a table? Does it contain inputs?

http://stackoverflow.com/comment/44598441
has text: Thank you for the quick answer. It's a very detailed explanation however I do have to ask: is there any significant performance difference between declaring them at a function level as opposed to just the `for` loop, knowing that I will only need the variable for the single loop?
score: 0
comment on: http://stackoverflow.com/a/28112281
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/119891057
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/53999671
has text: This is the only one that works with a Vue object that has getters and setters also on the properties inside the object in arrays. The accepted answer only works with the outer object not it's inner array.

http://stackoverflow.com/comment/72538312
type: AnswerComment
score: 1
type: Comment
has text: I ran into an issue using this. I had a menu over the top of the div where I was tracking hover state. After selecting an entry from the menu, the popover would disappear, but since I didn't move the mouse, the onMouseLeave event wouldn't fire. Using onMouseOver and onMouseOut seems to have fixed that.
comment on: http://stackoverflow.com/a/28073460

http://stackoverflow.com/comment/44555296
has text: @TopQuestions well, if it's the solution of his problem - it's an answer. if it isn't, it still is. lol.
score: 0
comment on: http://stackoverflow.com/a/28089228
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/44434019
comment on: http://stackoverflow.com/a/28021740
type: Comment
score: 0
type: AnswerComment
has text: yes..got it..please look this http://stackoverflow.com/questions/28023451/how-to-load-html-file-in-marionette-js-backbone

http://stackoverflow.com/comment/44591760
has text: In my Windows 7 isn't working at all. Chrome version 40.0.2214.91 m. Try to open the Dev Tools (F12) and cick on `Toggle Element State`. Here it does nothing.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28108867

http://stackoverflow.com/q/28102674
favorite count: 0
has body: Finance applications demand an integer type due to security reasons. Rounding errors are not acceptable in that kind of application and can lead to exploits. Since JavaScript doesn't offer a proper Integer type, only IEEE 754 Doubles, how do you deal with monetary values in JavaScript, while keeping it safe?
type: Question
tagged with: double
has comment: http://stackoverflow.com/comment/44581113
tagged with: integer
has answer: http://stackoverflow.com/a/28103791
score: 0
tagged with: floating-point
upvote count: 1
answer count: 1
downvote count: 1
tagged with: javascript
type: UnansweredQuestion
has title: How to deal with numbers for finance applications on JavaScript, which lacks an Integer type?
linked to: http://stackoverflow.com/q/2876536
has comment: http://stackoverflow.com/comment/44580641
tagged with: security

http://stackoverflow.com/comment/44413919
type: AnswerComment
comment on: http://stackoverflow.com/a/28012555
type: Comment
has text: I've amended animation using left / right to translate, there would need to be some graceful degradation implemented for IE8 and Opera Mini (if required) - http://caniuse.com/#search=transform.
score: 0

http://stackoverflow.com/a/28109483
upvote count: 2
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28107126
has body: Try this:
answers question: http://stackoverflow.com/q/28107126
type: Answer

http://stackoverflow.com/comment/44589706
type: QuestionComment
has text: @Hacketo that seems to fix it. The link I used is the one provided on lodash.com. Must be a corrupt version?
comment on: http://stackoverflow.com/q/28107416
score: 0
type: Comment

http://stackoverflow.com/q/28004128
has body: Say I have a dynamic table, something like this (just an example): var table = ' '; for (var i=0; i<6; i++) { table += ' '; table += ' '; table += 'HEADER ' + i + ' ' table += ' one '; table += ' two '; table += ' three '; table += ' four '; table += ' five '; table += ' six '; table += ' seven '; table += ' eight '; table += ' '; } table += ' '; What I'd like to do is to take each header and its table data under the header and save each as a separate table. For example, the first table would be: HEADER 0 1 2 3 4 5 6 7 8 The second table would be: HEADER 1 1 2 3 4 5 6 7 8 etc... NOTE: There's no guarantee that there's only one row under each header. Some may have multiple rows. To get the first table I could do: var indexval = $(table).find('tr:contains("1")').index(); var firstTable = $(table).find('tr:lt('+indexval+')'); $('#testarea').html(firstTable); I'm aware I'm calling these "tables" and that may not be correct. But how to start at the "next" header and go the the one after that and save 'that' table? In the end I'd have a number of little tables I could print to the screen by calling their variable names. Demo: var table = ' '; for (var i = 0; i < 6; i++) { table += ' '; table += ' '; table += ' HEADER ' + i + ' ' table += ' one '; table += ' two '; table += ' three '; table += ' four '; table += ' five '; table += ' six '; table += ' seven '; table += ' eight '; table += ' '; } table += ' '; //$('#testarea').html(table); var indexval = $(table).find('tr:contains("1")').index(); var firstTable = $(table).find('tr:lt(' + indexval + ')'); $('#testarea').html(firstTable); td, th { min-width: 50px; } EDIT: I ended up solving my own problem by just using a couple of arrays to store each section of the table (each header and its immediate relevant rows under it). The first for loop gets the index value of the header, and the second for loop selects out the table rows (header and associated cells under it). The "firstRow" variable selects just the first header and…
has comment: http://stackoverflow.com/comment/44397222
has comment: http://stackoverflow.com/comment/44397099
has title: From a dynamic table, save separate tables from the master table
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44397622
type: Question
has comment: http://stackoverflow.com/comment/44397292
tagged with: javascript
score: 0
tagged with: jquery

http://stackoverflow.com/q/28081478
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/28081507
tagged with: dom
type: Question
tagged with: javascript
tagged with: jquery
has title: jQuery append() empty elements
has body: I want to retrieve json data and append to an tag in HTML. But each time it also appends an empty right after the specific elements. It looks like this. All condition condition2 Obviously it's suppose to append like below: All condition condition2 Here is the jQuery code: for(var i=0; i<=option_array.length; i++){ if(option_array.indexOf(condition)==-1){ option_array.push(condition); $select.append(' ' + condition + ' '); console.log("CONDITION!" + condition); option_array.push(condition); } Here is the original HTML: Any ideas of why this happen?
answer count: 1
has answer: http://stackoverflow.com/a/28081507
has comment: http://stackoverflow.com/comment/44541488

http://stackoverflow.com/comment/44409257
type: AnswerComment
score: 0
type: Comment
has text: Didn't realize - But thank you for updated your reply and telling me! It works perfectly now. Thank you
comment on: http://stackoverflow.com/a/28010733

http://stackoverflow.com/q/28072092
score: 7
type: Question
has title: How to redirect on different view on refresh in AngularJS?
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/28072567
tagged with: partial-page-refresh
has body: i'm developing an application in AngularJS. Basically, i have a "home" page and a "new project". In the home page i have a menu with a link to "new project". I configured the $stateProvider as follows : $stateProvider.state('home', { url: '/', templateUrl: 'partials/home.jsp' }).state('newproject', { url: '/newproject', templateUrl: 'partials/new-project.html' }) So, when i enter the app, i'm in the home page. Then i click on "new project" link and i'm in the "new project" page. Now the url is http://myapp/newproject My problem is, when i refresh the page, i want to be redirected on the home page, even if the url in my browser bar is still http://myapp/newproject How can i achieve that? UPDATE : Thank you very much squiroid for your answer. I used the second solution and it worked like a charm. A little clarification, just in case someone should have the same problem, before redirecting to home you have to prevent default operation. So the correct working code is : $rootScope.$on("$locationChangeStart", function(event, next, current) { if(next==current &amp;&amp; next=='/newproject') event.preventDefault(); $state.go('home'); });
accepted answer: http://stackoverflow.com/a/28072567
upvote count: 7
type: AnsweredQuestion
tagged with: angular-ui-router

http://stackoverflow.com/comment/44609619
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28117711
has text: @sphanley — The validator seems to agree. I'm trying to find where in the spec it allows it.

http://stackoverflow.com/q/28045929
answer count: 4
has title: Get one object with each unique property-value
type: AnsweredQuestion
has body: I have an array with several objects. I want to get the first object (the order is significant) with each unique value of ref: var data = [ { id: "asghalk", etc: "Hello World", ref: "ad23f1" }, { id: "glfdknd", etc: "Testing, 12", ref: "912b12" }, { id: "lka09go", etc: "Some String", ref: "ad23f1" }, { id: "klghame", etc: "Hello World", ref: "124e12" }, { id: "glkahma", etc: "Hello World", ref: "124e12" } ]; From this, I want: var result = [ { id: "asghalk", etc: "Hello World", ref: "ad23f1" }, { id: "glfdknd", etc: "Testing, 12", ref: "912b12" }, { id: "klghame", etc: "Hello World", ref: "124e12" }, ] (Only the objects with a new ref are kept.) Any proposals (with any dependencies) are welcome.
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/28046020
has answer: http://stackoverflow.com/a/28046020
type: Question
has comment: http://stackoverflow.com/comment/44474741
has comment: http://stackoverflow.com/comment/44474522
tagged with: javascript
upvote count: 1
accepted answer: http://stackoverflow.com/a/28046090
has answer: http://stackoverflow.com/a/28046357
has answer: http://stackoverflow.com/a/28046775
favorite count: 0
has comment: http://stackoverflow.com/comment/44474274
has answer: http://stackoverflow.com/a/28046090

http://stackoverflow.com/comment/44588416
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28093767
type: AnswerComment
has text: Well, the data is being kept in the service only site-wide. If you want to keep it on browser-actions like refresh or history back button I suggest to write a service which writes it to the browsers local storage. Let me know if you need the code for a nice localStorageService.

http://stackoverflow.com/comment/44486806
score: 1
has text: put them all in an array then, loop over array and then loop over properties of each element
comment on: http://stackoverflow.com/q/28052143
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44478911
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27999854
has text: How are you actually editing the start moment? This `$('#control_day_edit').val(moment(calEvent.start._i).format("DD-MM-YYYY hh:mm A/PM"));` creates a new moment object from the `_i`, formats it and stores the derived format string into the jQuery objects value. On the other side I see `y.start = moment(document.getElementById('control_day_edit').value);` which sets the start property to a new moment constructed from a format string. Does your actual manipulation happen in your modal edit? Does `console.log(y.start);` show the change at the end?
type: AnswerComment

http://stackoverflow.com/comment/44339884
has text: link to the site I'm workinng on. http://rob.peytongregory.com
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27973597

http://stackoverflow.com/a/28086097
has body: Like this? $('input:checkbox').change(function () { if ($(this).is(':checked')) { switch (this.id){ case 'cats': alert("Cat Selected"); break; case 'dogs': alert("Dogs Selected"); break; case 'birds': alert("Birds Selected"); break; } } else { alert('Un Checked'); } }); http://jsfiddle.net/ycd5pd4b/1/ UPDATE: As per comments - to handle the unchecked items. You can try this code instead where in fact you don't need the IF condition. Theoretically don't even need a switch but depends on your intentions. $('input:checkbox').change(function () { var checked = $(this).is(':checked'), strChecked = 'checked', strUnchecked = 'unchecked', result = (checked ? (this.id + ' ' + strChecked) : (this.id + ' ' + strUnchecked)); // in fact this switch is useless.. switch (this.id){ case 'cats': alert(result); break; case 'dogs': alert(result); break; case 'birds': alert(result); break; } // you can just call this // alert(result); }); jsfiddle: http://jsfiddle.net/ycd5pd4b/2/
score: 3
has comment: http://stackoverflow.com/comment/44549880
has comment: http://stackoverflow.com/comment/44550991
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28085926
type: Answer
accepted answer of: http://stackoverflow.com/q/28085926
upvote count: 3
has comment: http://stackoverflow.com/comment/44549625

http://stackoverflow.com/comment/44480856
comment on: http://stackoverflow.com/a/28030851
score: 1
has text: Pull request just merged, the fix will soon be available to everybody :)
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44504617
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28061345
type: Comment
has text: It isn't possible. However, maybe you can completely forget about a second instance or ajax. It seems that you reload the original page. Why don't you normally visit `'someURL'` with `thenOpen`, do your parsing and then open the original URL with `thenOpen` without any waiting? You can even get the current URL to make sure you come back to the correct page.

http://stackoverflow.com/q/28003060
tagged with: javafx-webengine
tagged with: javafx-8
has body: I would like to mix JavaFX and HTML5/JS inside a JavaFX-based application. HTML5/JS components would be integrated using the JavaFX WebView and there will be one instance of WebView per HTML5/JS component. Considering the class Person{String:firstname, String:lastname}, I'm investigating the feasibility of drag'n'drop between JavaFX and HTML5. My goal is to be able to drop my model objects as the following MIME types: "text/plain" - This is the standard MIME type for text. My data would be something like "Mr jerry seinfeld" "application/x-pigelvy-person" - This would be my own MIME type and it would let me detect that the Drag'n'Drop operation is actually about a Person object. The data would then by the dragged Person converted to JSON such as {"firstname":"jerry","lastname":"seinfeld"}. You can check my sources at https://github.com/pigelvy/dnd_jfx-js. Starting the drag operation a JavaFX ListView and putting the Person object in the ClipboardContent as "text/plain" and "application/x-pigelvy-person", I was only able to get data for "text/plain" (though the JS object DragEvent.dataTransfer). I have the same result no matter which browser I use (WebView in app or Firefox/Chrome outside my app) I just read the HTML5 D'n'D specification and based on section 7.8.4.1 and 7.8.4.2 I understand that the D'n'D should correctly even when it starts/ends from/in another application/document. I just noticed some weird things: Loading my HTML page on 2 Firefox tabs or 2 Opera tabs, I have access to my custom MIME type along with "text/plain". Loading my HTML page on 2 JavaFX WebViews within the same JavaFX application, I do have access to my custom MIME type, but only to "text/plain". Why isn't my custom data type available? Are there any restrictions I don't know about?
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29646226
favorite count: 0
tagged with: drag-and-drop
has comment: http://stackoverflow.com/comment/110909612
upvote count: 1
has title: Custom DataType in drag'n'drop between JavaFX & HTML5
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29646226
type: Question
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/27990569
has answer: http://stackoverflow.com/a/27992912
has comment: http://stackoverflow.com/comment/44372056
type: AnsweredQuestion
score: -3
has title: How to change the value of check-boxes if checked?
type: Question
has body: I want to change the value of a check-box when I checked on them from 0-1 This is what I have tried HTML &lt;input type="checkbox" name="Semi Annual" id="1" value="0"&gt; Semi Annual &lt;br&gt; &lt;input type="checkbox" name="Quaterly" id="2" value="0"&gt; Quaterly &lt;br&gt; &lt;input type="checkbox" name="Monthly" id="3" value="0"&gt; Monthly &lt;br&gt; JS $('input[type="checkbox"]').change(function(){ this.value = 1; }); Demo : http://codepen.io/evoque2015/pen/RNpOLq
accepted answer: http://stackoverflow.com/a/27992912
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44372063
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44372091
has comment: http://stackoverflow.com/comment/44371967
downvote count: 3
has comment: http://stackoverflow.com/comment/44372005

http://stackoverflow.com/a/28087602
has body: As long as comboFilters[Agencies] is in the url parameters your code is going to create a key named comboFilters[Agencies] in partDic wither or not it has a value. You need to check the value //if it exists and has a non empty value if(partDic['comboFilters[Agencies]'] &amp;&amp; partDic['comboFilters[Agencies]'] != ""){ } else { }
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28087344
answers question: http://stackoverflow.com/q/28087344
type: Answer

http://stackoverflow.com/q/28002040
has title: Javascript SQL Insert Loop
score: 4
has body: I'm attempting to pass a function an array that should run through a loop and call a db.transaction for each incremented SQL statement. function updateColorData (colorArray) { for (var i=0; i&lt;colorArray.length; i++) { var sql = 'INSERT INTO SPColorData (color) VALUES (\''+colorArray[i]+'\')'; if (i &lt; colorArray.length-1) { db.transaction(function (tx) {tx.executeSql(sql, [], gameOptionSuccess, errorCB)}, errorCB); } else { db.transaction(function (tx) {tx.executeSql(sql, [], colorDataQuery, errorCB)}, errorCB); } } } As a test I'm calling the updateColorData function passing in an array like this ['one', 'two', 'three', 'four'] but when I have the database read back the information it received I'm getting ['four', 'four', 'four', 'four'] I realize that calling 4 database transactions in a loop like this is not the most efficient method but I'm not sure why this isn't working or what other method to try. Thanks!
upvote count: 4
accepted answer: http://stackoverflow.com/a/28002204
linked to: http://stackoverflow.com/q/111102
tagged with: sqlite
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/44393290
has comment: http://stackoverflow.com/comment/44393226
favorite count: 0
has comment: http://stackoverflow.com/comment/44393157
type: AnsweredQuestion
tagged with: cordova
has answer: http://stackoverflow.com/a/28002204
has comment: http://stackoverflow.com/comment/44393233
has comment: http://stackoverflow.com/comment/44393340
has comment: http://stackoverflow.com/comment/44393221
tagged with: loops
type: Question
tagged with: database
tagged with: javascript

http://stackoverflow.com/comment/44466185
has text: `$data` is a php variable not a javascript one. Don't mix languages needlessly
comment on: http://stackoverflow.com/q/28041366
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44566676
score: 0
type: AnswerComment
has text: Oh sorry, I didn't even look at that part. Yeah, you cannot give a callback to `res.json`. It does still [support two arguments](https://github.com/strongloop/express/blob/9434ad39e114ea810859cd9c6fef624d4acfbe18/lib/response.js#L208-L236) since in previous versions you could give `statusCode` to it as well, ie. `res.json(400, {status: "error"});`
type: Comment
comment on: http://stackoverflow.com/a/28092774

http://stackoverflow.com/q/27971479
has answer: http://stackoverflow.com/a/48816119
type: Question
has title: How to load jQuery Migrate for jQuery via RequireJS?
score: 5
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/33492187
accepted answer: http://stackoverflow.com/a/33492187
possible better answer: http://stackoverflow.com/a/27974280
favorite count: 0
upvote count: 5
has answer: http://stackoverflow.com/a/69787999
has body: Can I load jQuery migrate via RequireJS? I don't understand how the timing can be handled correctly. See this example: require([ 'jquery', 'jqmigrate' ], function ($) { if ($.browser.msie) {...} }); Isn't is possible that jqmigrate will load before jquery? Also, I do not want to keep loading jqmigrate explicitly in every module. Any way to do this in the require.config so it loads jqmigrate automatically when jQuery is required?
tagged with: requirejs
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27974280
downvote count: 0
tagged with: jquery-migrate

http://stackoverflow.com/a/68935249
score: 0
answers question: http://stackoverflow.com/q/27987969
type: Answer
has body: This is a very generic approach and will need customization depending on what kind of front-end framework is being used. scrollTop maintains the vertical scroll position, so if you find a way to memoize scrollTop, you can always come back to the same position where you last left. // get reference to your scrollable div const element = document.getElementById("scrollableDiv"); // store element.scrollTop in local storage. windows.localStorage.setItem('scrollTop', element.scrollTop); // get scrollTop value once back to the previous page const scrollTop = windows.localStorage.getItem('scrollTop') // apply scrollTop to your scrollable div, to take scroll thumb to the exact position where it was left before document.getElementById("scrollableDiv").scrollTop = scrollTop;

http://stackoverflow.com/a/28029270
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44443583
has comment: http://stackoverflow.com/comment/44443486
has comment: http://stackoverflow.com/comment/44443630
score: 6
type: Answer
answers question: http://stackoverflow.com/q/28029234
upvote count: 6
has comment: http://stackoverflow.com/comment/44443951
has body: https://developer.mozilla.org/en-US/docs/Web/API/Window.name It is a string, because window.name has a purpose. You are setting the name of the window.
accepted answer of: http://stackoverflow.com/q/28029234
has comment: http://stackoverflow.com/comment/44444325
has comment: http://stackoverflow.com/comment/44443590
has comment: http://stackoverflow.com/comment/44443657
has comment: http://stackoverflow.com/comment/44443677

http://stackoverflow.com/a/28056528
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/28055956
accepted answer of: http://stackoverflow.com/q/28055956
downvote count: 0
has comment: http://stackoverflow.com/comment/44495897
type: AcceptedAnswer
has body: Have you tried ngIf? The ngIf directive removes or recreates a portion of the DOM tree based on an {expression}.

http://stackoverflow.com/q/28033824
score: 0
has body: How to pass a client certificate automatically in JavaScript (I am using XmlHttpRequest to make the call)? If this is not possible (and from what I have read it isn't because it is the browser which determines this security aspect and not the javascript running within it) then can I atleast prompt the user to select a client certificate on an event click? Any other way to accomplish this? The code will run in IE. I am currently getting an HTTP Forbidden (requesting a client certificate) when I connect to the URL. There is no prompt for any client cert selection similar to what I get when I call this URL directly from my browser window. Since I am able to connect to the URL, I presume that I am not going to run into any CORS specific issue. For more details - here is what I am trying to accompalish in Javascript: http://msdn.microsoft.com/en-us/library/dn458823.aspx Thanks!
answer count: 1
has answer: http://stackoverflow.com/a/28034042
tagged with: client-certificates
type: AnsweredQuestion
type: Question
has title: Sending client certificate via JavaScript.
tagged with: internet-explorer
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28034042

http://stackoverflow.com/comment/44562202
type: QuestionComment
comment on: http://stackoverflow.com/q/28092937
score: 0
has text: Are there any errors thrown in console? Side note ` ` tag is deprecated
type: Comment

http://stackoverflow.com/comment/44533620
type: AnswerComment
score: 0
type: Comment
has text: why not just open with modal api?
comment on: http://stackoverflow.com/a/28077026

http://stackoverflow.com/q/28098664
has comment: http://stackoverflow.com/comment/44573697
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44573446
tagged with: backbone.js
has title: Ways to create Objects
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44573327
tagged with: oop
answer count: 0
has body: looking at the annotated source of Backbone.js found that they have a peculiar way to create some Objects that I havent seen before. (MyObject = {}); And they use it for example in the sync function like this: MyObject || (MyObject = {})['foo'] = bar; Was wondering why the create or interact with Objects in this way and what benefits this bring at the development process? This first idea comes to my mind is that is a function that return the object passed as a parameter but don't understand why not to do: Myobject = MyObject || {}; Example of Backbone use (attrs = {})[key] = val;
type: Question
has comment: http://stackoverflow.com/comment/44573270
tagged with: object

http://stackoverflow.com/comment/44339660
score: 2
comment on: http://stackoverflow.com/q/27973439
has text: if it is 1 user then this isn't a problem for SO. you need to ask them to hard refresh their screen, restart their computer, and potentially look for reasons that their specific machine might be messing up.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27988845
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27988879
tagged with: javascript
score: 0
has title: Recognising Hashtags in Javascript
has comment: http://stackoverflow.com/comment/44368718
answer count: 1
tagged with: regex
favorite count: 0
tagged with: angularjs
has body: I need to recognise hashtags (#example) in a string using javascript and change them to example at the moment I am using this code: var string = '#hello This is an #example of some text'; string.replace(/(^|\s)(#[a-z\d-]+)/ig, "$1$2"); however the value of $2 still includes the # character and I need to omit this for the url
accepted answer: http://stackoverflow.com/a/27988879
type: AnsweredQuestion
tagged with: hashtag

http://stackoverflow.com/a/28116114
has body: You do not need directive for this. Dont manipulate html when you dont need - let angular do it for you: &lt;a href='' ng-click='open($parent.$index)'&gt;{{item.name}}&lt;/a&gt; in controller: $scope.open = function(index) { $scope.tests.splice(index + 1, 0, [{name : 'n'}, {name: 'p'}]); } http://plnkr.co/edit/tpl:rfqcl9AHEoJZEEJxyNn2?p=preview
answers question: http://stackoverflow.com/q/28115861
score: 0
type: Answer

jquery-ui
tags question: http://stackoverflow.com/q/28072122
tags question: http://stackoverflow.com/q/27994930
tags question: http://stackoverflow.com/q/28039558
tags question: http://stackoverflow.com/q/28058616
tags question: http://stackoverflow.com/q/27972877
tags question: http://stackoverflow.com/q/28003771
tags question: http://stackoverflow.com/q/27987564
tags question: http://stackoverflow.com/q/28105717
tags question: http://stackoverflow.com/q/28110817
tags question: http://stackoverflow.com/q/27981115
tags question: http://stackoverflow.com/q/28035714
tags question: http://stackoverflow.com/q/28042704
tags question: http://stackoverflow.com/q/28047356
tags question: http://stackoverflow.com/q/28050563
tags question: http://stackoverflow.com/q/28077015
tags question: http://stackoverflow.com/q/28111053
tags question: http://stackoverflow.com/q/28094154
tags question: http://stackoverflow.com/q/28000222
tags question: http://stackoverflow.com/q/27974109
tags question: http://stackoverflow.com/q/28059860
tags question: http://stackoverflow.com/q/28008454
tags question: http://stackoverflow.com/q/28092353
tags question: http://stackoverflow.com/q/27993968
tags question: http://stackoverflow.com/q/27978374
type: Tag
tags question: http://stackoverflow.com/q/28024835
tags question: http://stackoverflow.com/q/28088439
tags question: http://stackoverflow.com/q/27981873
tags question: http://stackoverflow.com/q/28050399
tags question: http://stackoverflow.com/q/27967923
tag name: jquery-ui
tags question: http://stackoverflow.com/q/28088699
tags question: http://stackoverflow.com/q/28002888
tags question: http://stackoverflow.com/q/28024304
tags question: http://stackoverflow.com/q/28062261

http://stackoverflow.com/comment/44670945
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28090803
has text: you should post another thread, and describe your problem in that new thread. because what you are asking now is really out of the context of this thread.

http://stackoverflow.com/q/27971216
has body: I got a task in class today- im asking the user a simple math qustion, and if the he answers correctly alert with "Correct" will pop up, if not a "wrong" alert. Math test! Press submit to test yourself I think the problem is that var useranswer isn't being recieved correctly, but debugging didn't help at all. I also tried putting function checkuseranswer in the botton, but same result. All help appreciated.
has comment: http://stackoverflow.com/comment/44335901
has answer: http://stackoverflow.com/a/27971237
tagged with: function
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44335583
downvote count: 2
has comment: http://stackoverflow.com/comment/44335132
type: Question
score: -2
has title: Javascript function checks user input but always posts "wrong"

http://stackoverflow.com/comment/44573922
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28098734
has text: That isn't possible, as you have demonstrated in your question. You would have to override jquery's constructor to store the selected element somewhere where your plugin can access it.
score: 0

http://stackoverflow.com/comment/44559142
type: Comment
type: QuestionComment
has text: @MattBurland yes it is, so I should change contenttype to text/json?
comment on: http://stackoverflow.com/q/28091169
score: 0

http://stackoverflow.com/comment/44393017
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28001835
has text: Ok, so now we have some code. What is the exact issue now? You have code to test it is blank. Now test the indexOf("Street")==0 and that .length>=1 && .length<=14
type: Comment

http://stackoverflow.com/a/27965721
has comment: http://stackoverflow.com/comment/44337696
downvote count: 0
has comment: http://stackoverflow.com/comment/44333059
has comment: http://stackoverflow.com/comment/44324240
type: Answer
has comment: http://stackoverflow.com/comment/44324314
score: 2
has body: This should do the job: arguments.callee.caller.name But careful: 'caller', 'callee', and 'arguments' properties cannot be used in strict mode they are deprecated in ES5 and removed in strict mode.
answers question: http://stackoverflow.com/q/27965657
upvote count: 2
has comment: http://stackoverflow.com/comment/44324441
has comment: http://stackoverflow.com/comment/44324403
has comment: http://stackoverflow.com/comment/44324412

http://stackoverflow.com/q/28107899
has title: Can i add an event programmatically in the user phone calendar?
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/28108477
type: AnsweredQuestion
score: 2
upvote count: 3
has answer: http://stackoverflow.com/a/29285495
has answer: http://stackoverflow.com/a/28108477
accepted answer: http://stackoverflow.com/a/29285495
downvote count: 1
type: Question
tagged with: mobile
tagged with: javascript
tagged with: jquery
has body: I am creating a mobile version of a website with Laravel 4 framework (i'm using jquery normal not jquery mobile), I want to know if I can with code (javascript - jquery ... a plugin) added an event in the calendar of the user's phone .. thank's
answer count: 2
tagged with: laravel-4

http://stackoverflow.com/q/28038733
has title: Meteor: Animate (Fade In/Out) Dynamic Template Data
type: Question
has answer: http://stackoverflow.com/a/32859025
tagged with: javascript
has answer: http://stackoverflow.com/a/28041700
answer count: 3
accepted answer: http://stackoverflow.com/a/28041700
downvote count: 0
tagged with: meteor
favorite count: 0
has comment: http://stackoverflow.com/comment/44463111
score: 6
has answer: http://stackoverflow.com/a/32535835
upvote count: 6
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/32535835
has body: In my Meteor template, I am using each to iterate over a helper array variable named asks whose array contents are dynamically changing. This is displaying properly in Meteor, however, by default, there is no animation to it. The changes are sudden, so it's hard to see exactly what is changing when. I would like to animate these data changes in the template. If asks[1] is the same, do nothing. But if asks[2] has changed, fade out the old &lt;tr&gt; for asks[2] and fade in the new &lt;tr&gt; with the new asks[2] values. How can this be achieved? Thanks! {{#each asks}} &lt;tr class="ask"&gt; &lt;td&gt;{{price}}&lt;/td&gt; &lt;td&gt;{{amount}}&lt;/td&gt; &lt;/tr&gt; {{/each}}

http://stackoverflow.com/comment/44333059
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27965721
type: Comment
has text: I need to use the strict mode, so, I can use this example. There is another way?.

http://stackoverflow.com/q/28031595
has body: I am using the Maps API v3 and added a GeoJSON file to create a circle (based on google.maps.Symbol objects) around each entry in the GeoJSON-file -- which works quite fine by using the setStyle-functionality: map.data.addGeoJson('url_to_GeoJSON'); .. map.data.setStyle(function(feature) { return /** @type {google.maps.Data.StyleOptions} */({ icon: { path: google.maps.SymbolPath.CIRCLE, scale: 5, fillColor: '#f00', fillOpacity: 0.5, strokeWeight: 0 } }); }); Now I would need to draw a circle with a static radius in meters around each point, like it is provided by the regular google.maps.CircleOptions with its 'radius'. Is there any possibility to use the very comfortable data layer 'addGeoJson'- and 'setStyle'-features in combination with a geographically correct radius in meters around each point? I would be very happy to avoid setting up each marker manually "the old way" by iterating through the whole GeoJSON-file with new google.maps.Circle({radius: 20000}); Any help is greatly appreciated! Thanks in advance! After adding the code of Dr. Molle, there seems to be an issue while using multiple google.maps.Data-Objects, that should be shown/hide by checking/unchecking a checkbox within the website. This is my actual code, which already shows the data layer with drawn circles, but does not hide the circles of the specific data layer when unchecking a checkbox: var map; var dataset1 = new google.maps.Data(); var dataset2 = new google.maps.Data(); var dataset3 = new google.maps.Data(); function initialize() { // Create a new map. map = new google.maps.Map(document.getElementById('map-canvas'), { zoom: 6, center: {lat: 50.678240, lng: 9.437256}, mapTypeId: google.maps.MapTypeId.TERRAIN }); checkDataset(); } function checkDataset() { if (document.getElementById('chkDataset1').checked) { // Define styles for dataPlug9 and apply to map-object. dataset1.setStyle(function(feature) { var geo = feature.getGeometry(); // Check for a point feature. if(geo.getType().toLowerCase()…
tagged with: google-maps-api-3
answer count: 1
has comment: http://stackoverflow.com/comment/44484706
has comment: http://stackoverflow.com/comment/44454626
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has title: Draw radius in meters using Maps API v3 Data layer based on GeoJSON
upvote count: 1
has answer: http://stackoverflow.com/a/28052025
type: Question
tagged with: google-maps
tagged with: javascript
score: -1

http://stackoverflow.com/comment/44583951
type: QuestionComment
comment on: http://stackoverflow.com/q/28104569
score: 0
has text: `}` is there. I have edited the code
type: Comment

http://stackoverflow.com/q/28046318
has title: Giving actions on click of leaflet markers created using for loop
tagged with: ajax
has answer: http://stackoverflow.com/a/28046737
type: UnansweredQuestion
has body: I tried to put ajax function calls as response to click on markers in map. But the links doesn't work (probably because) at time of click, the loop is no longer running. Code:
tagged with: leaflet
type: Question
score: 0
tagged with: google-maps
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/44508762
has text: @micha Well, yes of course, but I don't think we should still carry that weight in 2015.
comment on: http://stackoverflow.com/a/28063923
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/28103522
answer count: 1
has body: I have 50 images. With OnCLick function, I would like to enable the 10 images and disable the remaining 40.
has comment: http://stackoverflow.com/comment/44582060
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: php
score: -1
tagged with: onclick
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44582220
has comment: http://stackoverflow.com/comment/44582035
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44582446
has title: How to enable and disable onclick images
has answer: http://stackoverflow.com/a/28103696
upvote count: 0
has comment: http://stackoverflow.com/comment/44582068

http://stackoverflow.com/comment/44539966
type: QuestionComment
has text: I just see it working perfectly fine in your example and here too http://plnkr.co/edit/FPFuTO?p=preview
score: 0
comment on: http://stackoverflow.com/q/28080612
type: Comment

http://stackoverflow.com/comment/44491098
type: AnswerComment
score: 0
has text: Ack, I'm currently using `gulp-notify` per the tag. I'd like to have specific (and different) messages for different errors - eg, sass, vs browserify errors. Thanks (and upmodded) though!
type: Comment
comment on: http://stackoverflow.com/a/28053866

http://stackoverflow.com/q/28075858
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/121022290
has body: I have my JavaScript and XML files in the same folder. I'd like to be able to parse through the XML using the JavaScript, but I don't know how to get the JavaScript file to "talk" to the XML file. I've looked up ways, but they all involved server requests, which I don't need. How do I get the JavaScript to read-in the local XML file to make use of it? I'd eventually want to be able to convert the XML to JSON and then have my JavaScript parse through that, which I think I know how to do. I just don't know how to get the JavaScript to take data from the XML. I'm a beginner so any help is appreciated. Thanks!
tagged with: http://stackoverflow.com/tag/xml
upvote count: 2
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/28075975
linked to: http://stackoverflow.com/q/436670
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/7949752
tagged with: local
duplicate of: http://stackoverflow.com/q/436670
has comment: http://stackoverflow.com/comment/44534518
tagged with: javascript
has title: How to import local XML file and parse through it using JavaScript?
linked to: http://stackoverflow.com/q/14890655
answer count: 1
score: 1
tagged with: parsing
favorite count: 0

http://stackoverflow.com/q/28003505
tagged with: php
downvote count: 1
has answer: http://stackoverflow.com/a/28003571
score: -1
linked to: http://stackoverflow.com/q/1917576
type: Question
upvote count: 0
has title: Pass value from JS to PHP
tagged with: javascript
tagged with: jquery
has body: I want to pass the Client ID from a link to a modal like this &lt;a id="start" data-toggle="modal" href="#static" onclick="start();" data-book-id="&lt;?=$id_cl?&gt;"&gt; and i pickup this id using jquery like this &lt;script type="text/javascript"&gt; $('#static').on('show.bs.modal', function(e) { var bookId = $(e.relatedTarget).data('book-id'); }); &lt;/script&gt; the probleme is how to pickup this bookId and use it to excute query to fetch some data using php
favorite count: 0
has answer: http://stackoverflow.com/a/28003541
answer count: 3
has answer: http://stackoverflow.com/a/28003648
has comment: http://stackoverflow.com/comment/44396190
has comment: http://stackoverflow.com/comment/44395768
type: UnansweredQuestion

http://stackoverflow.com/comment/44555915
score: 4
type: Comment
has text: I checked both all requests and WebSockets tab in Chrome developer tool. But it does not show anything.
comment on: http://stackoverflow.com/a/28089387
type: AnswerComment

http://stackoverflow.com/comment/44513021
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28066343
type: QuestionComment
has text: can any one give an idea to resolve it?

http://stackoverflow.com/comment/44523112
comment on: http://stackoverflow.com/a/28056662
has text: I don't understand. If you mean "sticky" by "active", please show me the exact code(with the id you use) where you add it, and I will fix that too
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27974846
type: AnsweredQuestion
has title: TypeError: $(...).typeahead is not a function with RequireJS
type: Question
has answer: http://stackoverflow.com/a/31906900
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28948694
has comment: http://stackoverflow.com/comment/51635782
score: 7
accepted answer: http://stackoverflow.com/a/31906900
favorite count: 0
possible better answer: http://stackoverflow.com/a/28948694
tagged with: twitter-bootstrap-3
tagged with: requirejs
upvote count: 7
has body: I'm using RequireJS in order to load my dependencies. Here is my config file : requirejs.config({ baseUrl: "/js/dist", paths: { jquery: "../bower_components/jquery/dist/jquery.min", bootstrap: "../bower_components/bootstrap/dist/js/bootstrap.min", typeahead: "../bower_components/bootstrap3-typeahead/bootstrap3-typeahead.min", validator: "../bower_components/bootstrapvalidator/dist/js/bootstrapValidator.min", openlayers: "../vendor/openlayers/OpenLayers" }, shim: { bootstrap: { deps: ["jquery"] }, validator: { deps: ["bootstrap"] }, openlayers: { exports: "OpenLayers" } } }); And a part of my main application file : define(["jquery", "bootstrap", "openlayers", "./popup", "typeahead"], function($, Bootstrap, OpenLayers, Popup) { (...) $("#textSearch").typeahead("destroy"); (...) }); Inspecting with Firebug, I can see that all dependencies are loaded. But calling typeahead() on my search textbox outputs the following message: "TypeError: $(...).typeahead is not a function" I can't figure out this error, since all dependencies (so does typeahead) are loaded. Can you help me ? Thanks in advance

http://stackoverflow.com/comment/44758842
type: QuestionComment
has text: @jbutler483, originally in typography, an em was defined as the *width* of the letter "M," but in CSS, it's defined as the *height*. See http://www.w3.org/WAI/GL/css2em.htm: "*The meaning of "em" has changed over the years. ... The term has therefore come to mean the height of the font - not the width of the letter "M".*"
type: Comment
score: 0
comment on: http://stackoverflow.com/q/28012782

http://stackoverflow.com/comment/44585911
comment on: http://stackoverflow.com/a/28063406
score: 0
type: AnswerComment
has text: Correct, if you look at the linked article in the first section, you can see that the websocket client will send a "standard" http get request, which is what Aimee is seeing in their server print. Its hard to say more about it without the python server's code.
type: Comment

ng-init
type: Tag
tag name: ng-init
tags question: http://stackoverflow.com/q/28101336

http://stackoverflow.com/a/28114506
type: Answer
accepted answer of: http://stackoverflow.com/q/28109507
downvote count: 0
has body: EDIT: Note the below all that is good stuff as well but your actual issue is how you are returning from your sendMail() function. Die is wrong as it will kill the script dead (clue is in the name) so it wont progress to allow the calling script to respond. Change to: .... if (!$this-&gt;email-&gt;send()) { die(show_error($this-&gt;email-&gt;print_debugger())); } else { return "done"; } Die is not good practice for a http response as it might be construed as a broken page. Why not return something the jQuery likes eg a json string. For example: header('Content-Type: application/json'); if($verifyCreate === "success") { if($this-&gt;sendEmail() === 'done'){ echo json_encode(array('status'=&gt;'success')); return; } } else { echo json_encode(array('status'=&gt;'fail')); return; } Then in your jQuery //redacted success: function(data) { if(data.status==='success'){ //do some success stuff } else if(data.status==='fail'){ //do some fail stuff }else{ //do some unexpected stuff } } You might also need to set contentType:json in your $.ajax object.
has comment: http://stackoverflow.com/comment/44610074
score: 1
has comment: http://stackoverflow.com/comment/44609324
has comment: http://stackoverflow.com/comment/44608542
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44610563
answers question: http://stackoverflow.com/q/28109507

http://stackoverflow.com/comment/89786896
type: AnswerComment
has text: This may be true for equivalent function _references_, but not identical functions. `addEventListener(function() { alert('x'); }); addEventListener(function() { alert('x'); });` will alert `x` twice.
comment on: http://stackoverflow.com/a/47337711
type: Comment
score: 131

http://stackoverflow.com/a/28016698
type: Answer
upvote count: 0
has body: This is a self-reference of an object. When you create an object, either by using the new operator, declaring it as an object literal or by calling one of the builtin functions of JavaScript, this is going to be assigned to it. But as the scoping of JavaScript is dynamic and rather non - transient, you usually cannot rely too much on the this object. This is why you often see constructs such as oThis: this or var o
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/28016664

http://stackoverflow.com/q/28037742
has body: I am trying to add/remove data to the projectInfo variable on the success callback. The values don't seem to be sticking. function getIssues(projectInfo, callback) { var projectData = projectInfo; var promises = []; for (keys = 0; keys &lt; projectData.length; keys++) { var urlListData = // A url var result = $.ajax({ url: urlListData, type: "GET", async: true, beforeSend: function (xhr) { xhr.setRequestHeader("ACCEPT", accept); }, success: function (xhr, textStatus) { if (xhr.d.results == "") { console.log("I am removing this value" + xhr.d.results); projectData.splice(keys, 1); keys--; } else { console.log("I add Issues"); console.log("The value of projectData is " + projectData[keys].Issues); projectData[keys].Issues = xhr.d.results; console.log("The value of projectData after setting is " + projectData[keys].Issues); } }, error: function(xhr, ajaxOptions, thrownError){ projectData.splice(keys, 1); keys--; } }) promises.push(result); } $.when.apply(null, promises).done(function () { console.log("Calling in the when promise"); callback(projectData); }); } When I call the getIssues method, I check the console.log values. The log values actually show that Issues are being added and removed then the when promise occurs. However, the value returned from getIssue method doesn't contain any of the added or removed values. What am I doing wrong/missing?
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/44460062
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28037902
has comment: http://stackoverflow.com/comment/44480100
has comment: http://stackoverflow.com/comment/44459956
linked to: http://stackoverflow.com/q/750486
type: Question
has title: Ajax setting a variable value on success callback
has comment: http://stackoverflow.com/comment/44460293

http://stackoverflow.com/comment/44468082
type: AnswerComment
score: 0
type: Comment
has text: I also doubt no one has ever tried managing permissions in client code :)
comment on: http://stackoverflow.com/a/28041115

http://stackoverflow.com/comment/44548209
type: QuestionComment
comment on: http://stackoverflow.com/q/28085030
has text: Maybe I don't understand the question, but why don't you just use css for displaying icons like plus, minus, node etc. ? Take a look at e.g [Font Awesome](http://fortawesome.github.io/Font-Awesome/icons/)
score: 0
type: Comment

http://stackoverflow.com/q/28047792
has body: Im using the code below to draw and scale an image inside a canvas. The issue being that the image rendered inside is stretched to fit. If possible, I would like it to be scaled based on width but to maintain its aspect ratio. Any ideas? //IMAGE LOADER var canvas = document.getElementById('image-canvas'); var canvas2 = document.getElementById('image-canvas2'); ctx = canvas.getContext('2d'); ctx2 = canvas2.getContext('2d'); // Trigger the imageLoader function when a file has been selected var fileInput = document.getElementById('fileInput'); fileInput.addEventListener('change', imageLoader, false); function imageLoader() { var reader = new FileReader(); reader.onload = function(event) { img = new Image(); img.onload = function(){ ctx.drawImage(img,0,0,canvas.width, canvas.height); ctx2.drawImage(img,0,0,canvas.width, canvas.height); } img.src = reader.result; } reader.readAsDataURL(fileInput.files[0]); }
tagged with: canvas
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/28048865
score: 10
favorite count: 0
has comment: http://stackoverflow.com/comment/44478225
has title: HTML Canvas: Scaling image to fit without stretching?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28048865
upvote count: 10
type: Question

http://stackoverflow.com/a/28039501
downvote count: 0
answers question: http://stackoverflow.com/q/28037918
score: 1
has comment: http://stackoverflow.com/comment/44464007
upvote count: 1
type: Answer
has body: You will need to fix d to d.score. If you want to show country text, write svg.selectAll("text") after svg.selectAll("rect"). Like this: var w = 500; var h = 100; var barPadding = 1; var dataset = [ {"country":"Hong Kong","score":8.98}, {"country":"Singapore","score":8.54}, {"country":"New Zealand","score":8.19}, {"country":"Switzerland","score":8.09}, {"country":"Mauritius","score":8.98}, {"country":"United Arab Emirates","score":8.05}, {"country":"Canada","score":8.00}, {"country":"Australia","score":7.87}, {"country":"Jordan","score":7.86}, {"country":"Chile","score":7.84}, ]; //Create SVG element var svg = d3.select("body") .append("svg") .attr("width", w) .attr("height", h); svg.selectAll("rect") .data(dataset) .enter() .append("rect") .attr("x", function(d, i) { return i * (w / dataset.length); }) .attr("y", function(d) { return h - (d.score * 4); }) .attr("width", w / dataset.length - barPadding) .attr("height", function(d) { return d.score * 4; }); svg.selectAll("text") .data(dataset) .enter() .append("text") .text(function(d) { return d.country; }) .attr("transform", function(d, i) { var barW = w / dataset.length; return "translate(" + ( barW * i + barW / 2 + barPadding ) + "," + ( h - 5 ) + ")rotate(-90)"; }) .attr("font-size", "8pt") .attr("fill", "white"); &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"&gt;&lt;/script&gt;

http://stackoverflow.com/comment/44374956
score: 0
has text: Callback depth can also be flattened easily and naturally, by using named functions that are written down per module "flat" instead of ever deeper inline. Combine that with a modular approach and well-defined interfaces and JS has no "callback hell".
type: Comment
comment on: http://stackoverflow.com/a/27992006
type: AnswerComment

http://stackoverflow.com/q/28062884
type: Question
has comment: http://stackoverflow.com/comment/44506392
has comment: http://stackoverflow.com/comment/44506441
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28064052
has comment: http://stackoverflow.com/comment/44506601
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44506558
has comment: http://stackoverflow.com/comment/44506383
has comment: http://stackoverflow.com/comment/44506982
accepted answer: http://stackoverflow.com/a/28064052
tagged with: hyperlink
tagged with: javascript
has comment: http://stackoverflow.com/comment/44506868
has comment: http://stackoverflow.com/comment/44506556
type: AnsweredQuestion
has title: How to assign a variable to information contained in a link? (Javascript/HTML)
has body: I'm a beginner programmer, and I have a question about assigning a variable to information in a link. I can't give the exact example, so I'll try to come up with something that will show you what I mean: Imagine there is a bunch of links in which all that is written is: {"first_name": John, "last_name": Doe, "age": 37}; Another link would contain: {"first_name": Jona, "last_name": Dona, "age": 71}; Nothing else. I can't control the links, but I need to assign such objects to some variable so I can use these attributes in some functions of mine later on. (For example (first link): var x=information_in_first_link; &lt; here, x."age" would be 37.) Is that at all possible? How can I go about it? Thanks in advance! :) (Edited to make clearer...)
tagged with: variables

http://stackoverflow.com/q/27991434
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27991842
tagged with: google-maps
tagged with: jquery
type: UnansweredQuestion
has body: I have a Google Map as my background. Currently it is exactly where I want it when I load the page, but when I scroll down it goes out of view. How can I scroll the google map down so that it is always in the background? My css: #map-canvas { top:0; height: 100vh; position:absolute; z-index:-10000; margin: 0px; margin-top: 0; padding: 0px; width: 100% } I have also tried position:fixed and tried the following dom structure with position:fixed on #mapCanvScroller, but it doesn't work: &lt;div id="mapCanvScroller"&gt; &lt;div id="map-canvas"&gt;&lt;/div&gt; &lt;/div&gt;
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44373801
tagged with: css
has title: How to scroll/slide down google map background into the view with page scroll
type: Question
has answer: http://stackoverflow.com/a/27991518

http://stackoverflow.com/comment/44442174
type: Comment
comment on: http://stackoverflow.com/q/28028525
has text: Which browsers do you want to support the site in?
score: 0
type: QuestionComment

http://stackoverflow.com/q/28047858
tagged with: javascript
has answer: http://stackoverflow.com/a/28047968
score: 0
answer count: 2
has body: How can I close the soft keyboard on both Android and iOS? It seems to linger after the input field is already gone ( moved on to the next view ).
has answer: http://stackoverflow.com/a/28047937
tagged with: soft-keyboard
type: UnansweredQuestion
tagged with: android
has title: Close soft keyboard on iOS / Android
type: Question
has comment: http://stackoverflow.com/comment/44483289
linked to: http://stackoverflow.com/q/1109022
tagged with: ios

http://stackoverflow.com/comment/44603662
has text: Isn't the idea of Angular that you can declare this model in an external js file and then import and use it on any page? If I do `$scope.myCustomFunction = some-function-thats-only-used-on-this-page` aren't I cluttering the global scope with functions only used in one place?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28099315

http://stackoverflow.com/comment/44612345
has text: one that I noticed is that when I debug the javascript I see that the value in var input = document.getElementById('location'); is null. It seems like I should have a value there, maybe not?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28117265

http://stackoverflow.com/comment/44396497
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28003835
has text: What is the value of `URL`?
score: 0

http://stackoverflow.com/q/28033452
has comment: http://stackoverflow.com/comment/44451965
tagged with: javascript
type: AnsweredQuestion
tagged with: function
tagged with: variables
has body: im really new to javascript and im kind of stuck with two problems : -first problem: how can i display variables in html code, here's mine: and here's what im trying to do: first variable $first seconde one is $seconde -2nd problem is how to use a function onclick: stuff thank you for your time :)
possible better answer: http://stackoverflow.com/a/28033526
has comment: http://stackoverflow.com/comment/44452089
has comment: http://stackoverflow.com/comment/44451893
has answer: http://stackoverflow.com/a/28033526
has comment: http://stackoverflow.com/comment/44452127
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/44452016
linked to: http://stackoverflow.com/q/8765855
has answer: http://stackoverflow.com/a/28033594
score: 0
has answer: http://stackoverflow.com/a/28033588
answer count: 3
has title: display javascript variable in html code
accepted answer: http://stackoverflow.com/a/28033594

http://stackoverflow.com/comment/44405851
comment on: http://stackoverflow.com/q/28008852
has text: Yeah it should be ready to parse, very frustrating. It was passed into a database, but with no modification or escape, excepting escaping control characters in JSON.stringify.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/45215846
type: Comment
comment on: http://stackoverflow.com/a/28423598
has text: Glad you found a solution. It would be good to file this as an issue on https://github.com/winjs/winjs/issues as it doesn't look like it's logged yet.
type: AnswerComment
score: 0

http://stackoverflow.com/a/28116264
type: Answer
score: 8
has body: Don't give the self invoking function a name (there is little benefit to it beyond making it easier to find in a stacktrace, which you shouldn't need at that point, and it memory leaks in old IE) Don't call the self invoking function twice Don't treat the self invoking function as if it was a constructor function (by calling it with new) Do capture the return value of the self-invoking function Such: var x = (function () { var j = function() { alert("234234"); }; return { s: j }; })(); x.s(); Or, if you want to create multiple objects in the same way: Don't use a self-invoking function Do call x as many times as you like Such: function x () { var j = function() { alert("234234"); }; return { s: j }; }; var x1 = x(); var x2 = x(); x1.s(); Or, if you want to create a constructor function: Don't return anything from it Do use the prototype chain Such: function x () { }; x.prototype.s = function () { alert("234234"); } var x1 = new x(); var x2 = new x(); x1.s();
accepted answer of: http://stackoverflow.com/q/28116134
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/28116134
has comment: http://stackoverflow.com/comment/44607015
upvote count: 8
has comment: http://stackoverflow.com/comment/44606950

http://stackoverflow.com/q/28014396
has body: Behind the dependency manager for PHP Composer works with the PHP package archive service Packagist. So when I want to defind Zend Framework 2 as a package, my project depends on, I use the syntax developer/package: composer.json { "name": "Project Name", "description": "Project Description", "require": { "php": "&gt;=5.3.23", "zendframework/zendframework": "&gt;=2.3.2,&lt;3.0.0", ... } ... } Then I run composer install and looks in the Packagist archive for the packges, I defined as dependencies. Now the Bower: I can define the dependencies in the bower.json and get them with bower init or load them directly with bower install &lt;package&gt;. In both cases the package can be defined as a GitHub address or any URL (http://sld.tld/file.js), but also in form of developer/package (bower install angular/angular.js) or even just package (bower install jquery). What is Bower's "Packagist"? Which package service provides the package repository for Bower?
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28024128
tagged with: composer-php
score: 2
type: AnsweredQuestion
favorite count: 0
has title: Which package service provides the repository for Bower?
type: Question
upvote count: 2
tagged with: dependency-management
tagged with: php
tagged with: bower
has answer: http://stackoverflow.com/a/28024128
possible better answer: http://stackoverflow.com/a/28014439
answer count: 2
has answer: http://stackoverflow.com/a/28014439

http://stackoverflow.com/q/28062615
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28062997
has title: Html pre fill form and execute filter
has body: I have a website and want to have links to a page which has a filter function. I would like to create a link in such a way that when followed I do not simply get the destination page, but rather the page with a filter already applied. To be more specific I am looking at the website for NetCDF CF standard names. From my page I would like to have link that would already filter e.g. for 'longitude' on the destination page. The destination page is using javascript to apply the filter function. Any ideas how to achieve that?
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/28062997
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/44374440
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27991737
score: 0
has text: Screenshot looks like insecure content warning on Chrome (shield icon on address bar). Might be HTTPS issue (in which case you will want to use relative links or strictly SSL).

http://stackoverflow.com/a/28037199
type: AcceptedAnswer
has body: Apart from my comments in the question, to fix your issue you can take this approach. You have HomeCtrl specified as bound controller in the state registration of home partial. So instead create a main controller for your application. So that you keep the responsibilities separated out. Inject $state and expose a method called hideLogo and use $state.is to determine the logic to show/hide the logo. i.e: var app = angular.module('app-home') .controller('MainCtrl', ['$scope', '$state', function($scope, $state) { $scope.hideLogo = function(){ return $state.is('home'); } }]); In the index html use MainCtrl as your main controller for the app. Corner Logo Plnkr If you want to use $state directly on the view you would need to inject it in MainCtrland set $state on the $scope object so that you can use it directly. Though i highly recommend not to use this technique, you should not expose state in the scope object and ultimately in the view. Just expose only what is needed in the viewmodel. i.e in the MainCtrl : var app = angular.module('app-home') .controller('MainCtrl', ['$scope', '$state', function($scope, $state) { $scope.$state= $state; }]); and just use it on the view as:
upvote count: 2
answers question: http://stackoverflow.com/q/28036817
type: Answer
accepted answer of: http://stackoverflow.com/q/28036817
score: 2
has comment: http://stackoverflow.com/comment/44458944
downvote count: 0
has comment: http://stackoverflow.com/comment/44458936

http://stackoverflow.com/a/27992680
has body: You need to store the value of the link in a variable first. Also, you need different id's for your elements. Suppose your id for hyperlink is "a" and your id for textbox is "tb". Then you will have function insertText() { var url= document.getElementById("a").value; var textboxValue= document.getElementById("tb"); textboxValue.value= url; }
downvote count: 2
score: -2
answers question: http://stackoverflow.com/q/27992638
upvote count: 0
type: Answer

http://stackoverflow.com/comment/44346714
comment on: http://stackoverflow.com/a/27977034
score: 0
type: AnswerComment
type: Comment
has text: I understand the new tag. But the values of each lis are constant and doesn't require the user to input price. Is there any way we can hide the text field and assign the js variable value to it?

http://stackoverflow.com/q/28036708
favorite count: 0
type: UnansweredQuestion
tagged with: php
has title: How can I make my dynamic drop-down list be dependent dependent also to parent drop down?
tagged with: mysql
has body: I have a dependent drop-down list. The sub_cat is dependent on parent_cat at the same time it is dynamic also, where user can add additional if needed. And my problem starts here, Drop down dependent is already working, where the second drop-down sub_cat is dependent to what is selected in the first drop-down parent_cat. but, when I click Add Process (add additional) sub_cat. sub_cat is now empty. How can I make it work that if I click add process, the sub_cat will be populated also depends on what is selected in parent_cat. here's my code: index.php Parent Category <?php echo' '; while($row = $query_parent->fetch()) { echo ' ' . $row['wafer_type'] . ' '; } echo ' '; ?> <?php require 'second_dd.php'; ?> second_dd.php loadsubcat.php <?php include 'db/pdo-connect.php'; $parent_cat = $_GET['parent_cat']; $query = $conn->prepare("SELECT * FROM process WHERE wafer_id = {$parent_cat}"); $query->execute(); while($row = $query->fetch()) { echo ' ' . $row['process_name'] . ' '; } ?> loadscript.js $(document).ready(function() { $("#parent_cat").change(function() { $(this).after(' '); $.get('loadsubcat.php?parent_cat=' + $(this).val(), function(data) { $("#sub_cat").html(data); $('#loader').slideUp(200, function() { $(this).remove(); }); }); }); }); dynamic.js - this is for adding second dropdown list. function addMore() { $(" ").load("second_dd.php", function() { $("#product").append($(this).html()); }); } my DB goes like this: parent_cat id, category sub_cat id, category_id, sub_category
upvote count: 1
type: Question
score: 1
has answer: http://stackoverflow.com/a/28037181
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/28045733
upvote count: 2
score: 0
downvote count: 2
linked to: http://stackoverflow.com/q/18461206
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44474157
has comment: http://stackoverflow.com/comment/44474020
has comment: http://stackoverflow.com/comment/44511825
has body: I can not set a value for CKEDITOR. Below is what I tried: &lt;textarea id="fckAciklamaIcerik" name="fckAciklamaIcerik" class='ckeditor' rows="5" runat="server"&gt; &lt;/textarea&gt; CKEDITOR.replace('fckAciklamaIcerik'); CKEDITOR.instances.fckAciklamaIcerik.setData("sdda dasdsada"); When I try to run this, I get an Browser Error: Uncaught TypeError: Cannot read property 'getEditor' of undefined Why won't it work? Sorry unresolved problems. . How can I do..Waiting for your help.Thanks.. sb.Append(""); sb.Append("").Append(item.UrunAdi).Append(""); sb.Append("").Append(item.Fiyati).Append(""); function tableclickEvent(Description) { alert(Description) //No alert in calling problems.. //Data coming from the description you want to print the CKEditor.. }
has title: Can not set CKEditor value; setData fails
type: Question
has answer: http://stackoverflow.com/a/28045900
tagged with: javascript
tagged with: ckeditor
has comment: http://stackoverflow.com/comment/44481666

http://stackoverflow.com/a/28029256
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28029199
has body: You should be able to use eval() like this: var statement = 'alert('Hi!');"; eval(statement); eval is a dangerous thing though and should be used with caution.
downvote count: 0

http://stackoverflow.com/q/28069585
favorite count: 0
has answer: http://stackoverflow.com/a/28070420
has title: Adding Placeholder attributes base on input label with PURE JS - no jQuery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28070211
possible better answer: http://stackoverflow.com/a/28070420
accepted answer: http://stackoverflow.com/a/28069717
type: AnsweredQuestion
tagged with: placeholder
has answer: http://stackoverflow.com/a/28069717
tagged with: javascript
tagged with: forms
type: Question
score: 0
has body: I need to get the label of each element and apply it to the input as a placeholder attribute, I get about half way though but cannot seem to get just the text of the element in order to add a attribute Please note that i am not able to use jQuery in any regard JS: var elements = document.querySelectorAll('p.form-field'); Array.prototype.forEach.call(elements, function(el, i){ var chel = el.querySelectorAll('.field-label'); console.log(chel.textContent); }); HTML: First Name Last Name Email Company Comments
answer count: 3
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/44395124
has text: I read from angular documentation, and i mentioned the same in my question.I asked you, this is the only thing $compileProvider.debugInfoEnabled(false) does?
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28003017

http://stackoverflow.com/q/27971706
tagged with: socket.io
has body: So I tried to integrate socket.io to my sails project. However I found very little documentation on the sails.js website. I'm trying to build a chat between two browser of my server. in the client i have: io.socket.get('/posts/testStream', function serverResponded (body, JWR) { // JWR ==&gt; "JSON WebSocket Response" console.log('Sails responded with: ', body); console.log('with headers: ', JWR.headers); console.log('and with status code: ', JWR.statusCode); io.socket.on('messege', function onServerSentEvent (msg) { console.log(msg); }); // first argument `body` === `JWR.body` // (just for convenience, and to maintain familiar usage, a la `JQuery.get()`) }); and this is: /posts/testStream: testStream: function(req,res){ res.view(); }, How can i broadcast data to the client and how can i send messege back to the server? if you could show me with an example that would be great.
type: Question
tagged with: sails.js
tagged with: javascript
upvote count: 13
has comment: http://stackoverflow.com/comment/63788604
has comment: http://stackoverflow.com/comment/44337866
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/44346012
has comment: http://stackoverflow.com/comment/44445722
has comment: http://stackoverflow.com/comment/44337807
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44337651
tagged with: node.js
has answer: http://stackoverflow.com/a/31318122
downvote count: 0
has title: Example of socket.io chat - sails.js
score: 13

http://stackoverflow.com/a/28079898
has comment: http://stackoverflow.com/comment/44538728
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44538716
has body: Don't quote the variable. That makes it a string, so it's selecting a &lt;s&gt; tag in the DOM. $(s).appendTo("#fg1");
downvote count: 0
answers question: http://stackoverflow.com/q/28079878
type: Answer

http://stackoverflow.com/comment/44615672
comment on: http://stackoverflow.com/q/28100354
type: Comment
type: QuestionComment
has text: Now its mostly working, its just trying to find assets without the compiled text behind it (its looking for glyphicons-halflings-regular.ttf instead of glyphicons-halflings-regular-jhklaw3kuhsadfkjfhawu4kehr.ttf).
score: 0

http://stackoverflow.com/comment/44928617
score: 0
has text: It sounds like you have a clear cut set of requirements and a few test cases. I would hire a front-end technical consultant to help you determine the best approach given your specific needs. If you can't do that, I would investigate each approach you have outlined a bit more in-depth and make a decision. You really aren't going to be able to answer this until you get your hands dirty and code out these approaches and see what works best for your needs.
comment on: http://stackoverflow.com/q/28079248
type: Comment
type: QuestionComment

asp.net-mvc-4
tags question: http://stackoverflow.com/q/28058697
tag name: asp.net-mvc-4
tags question: http://stackoverflow.com/q/27967835
tags question: http://stackoverflow.com/q/27977434
tags question: http://stackoverflow.com/q/28091222
type: Tag
tags question: http://stackoverflow.com/q/28051963
tags question: http://stackoverflow.com/q/28008397
tags question: http://stackoverflow.com/q/28113937
tags question: http://stackoverflow.com/q/27983692
tags question: http://stackoverflow.com/q/27978847
tags question: http://stackoverflow.com/q/28116234
tags question: http://stackoverflow.com/q/28001805
tags question: http://stackoverflow.com/q/28051414
tags question: http://stackoverflow.com/q/28009357

http://stackoverflow.com/q/28105843
tagged with: openstreetmap
answer count: 1
tagged with: javascript
score: 0
tagged with: geojson
has title: Leaflet + GeoJson converted from OSM Data - Relations
has body: I'm trying to display bicycle relations which I downloaded from geofabrik, converted with osmconvert, filtered with osmfilter and converted to geojson. At the moment Leaflet displays line strings and nodes correctly on the map. The problem is with data from relations that are included in the file. Here is a part of my GeoJson file (I won't include whole file because it's just too big): var rower = { "type": "FeatureCollection", "features": [{ "type": "Feature", "id": "way/27149688", "properties": { "type": "way", "id": "27149688", "tags": { "agricultural": "no", "bicycle": "yes", "highway": "residential", "maxweightrating:hgv": "24", "maxweightrating:hgv:condtitional": "none @ marked", "name": "Mikołaja Reja", "source:maxweightrating:hgv": "PL:sign_B-5-note" }, "relations": [{ "role": "", "rel": "4046118", "reltags": { "colour": "blue", "description": "Leśna trasa rowerowa, preferowany rower górski / Forest track, Mountain Bike preferred", "lcn_ref": "niebieski", "name": "Szlak Trójmiejski", "network": "rcn", "route": "bicycle", "type": "route" } }], "meta": { "timestamp": "2014-04-17T11:58:45Z", "version": "20", "changeset": "21747999", "user": "wojtas82", "uid": "729745" }, "tainted": true }, "geometry": { "type": "LineString", "coordinates": [[ 18.5024141, 54.4354139 ],[ 18.503622, 54.4353485 ],[ 18.5053714, 54.4352858 ]] } }] }; As you can see relations are in square brackets. I wish to display different colours of tracks depending on relations>reltags>colour tag. Here is my main html file (actually the party that doesn't work): var rower2 = L.geoJson(rower, { style: function (feature) { switch (feature.properties.relations) { case 'blue': return {color: "#ff0000"}; case 'red': return {color: "#0000ff"}; } } }).addTo(map); I tried to modify this part (feature.properties.relations) to (feature.properties.relations.reltags.colour) but it doesn't work. Is there any way to fix this problem?
type: AnsweredQuestion
tagged with: leaflet
has answer: http://stackoverflow.com/a/28106324
accepted answer: http://stackoverflow.com/a/28106324
type: Question

http://stackoverflow.com/comment/44603145
has text: You can [add custom sorts](http://tablesorter.com/docs/example-parsers.html) to tablesorter.
comment on: http://stackoverflow.com/q/28114184
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28053913
tagged with: jquery
has comment: http://stackoverflow.com/comment/44490121
has body: HTML 1 2 3 4 ... Request: Please help me figure out how to pass all the values from input, select, etc.. (what might show up in a form) into a "preview" (in this case - into the div's). PS: I have tried this (force me to paste the script numbers of times i have inputs and matching output_ divs - at least with my knowledge today): $("#fname").on("focusout",function(){ setTimeout($.proxy(function(){ $("#output_fname").text(this.value); },this),10); }); But is there a possibility to do something like: and then: .val() from (all inputs) .this class="grab-val" and send to (output_ + matching id)........ //something like that OR (sorry for all the back and forward, but with this question I want to solve a problem but I also kindly ask for a lesson...) What would a good solution be to create a preview on submit - before sending data into db. Data sent after a "is-the-data-correct-"-submit-button.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28054095
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44489890
has comment: http://stackoverflow.com/comment/44489773
type: Question
possible better answer: http://stackoverflow.com/a/28067113
has answer: http://stackoverflow.com/a/28067113
accepted answer: http://stackoverflow.com/a/28054095
tagged with: javascript
has comment: http://stackoverflow.com/comment/44489987
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/44490166
has title: jQuery selector + variable target match
has comment: http://stackoverflow.com/comment/44490300

http://stackoverflow.com/q/28109778
has comment: http://stackoverflow.com/comment/44593537
type: Question
downvote count: 0
tagged with: javascript
tagged with: actionscript
has answer: http://stackoverflow.com/a/28111313
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/13076442
has body: For a fundraiser website, I'm trying to implement a feature on the page that shades in a image which is currently black and white to colour. The image needs to fill in colour (from left to right) based on the percentage of donations received (via paypal and other methods). Once the percentage of donations is complete the image will be completely in colour. Does anyone have any ideas on the best way I could make this possible?
type: UnansweredQuestion
upvote count: 1
has title: Fundraiser website, with real-time donation counter
score: 1
has comment: http://stackoverflow.com/comment/44593504

http://stackoverflow.com/a/28057984
type: AcceptedAnswer
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/28057695
type: Answer
has body: If you can use JQuery. (JSFiddle: http://jsfiddle.net/inanda/o9axgkaz/): jQuery('#btn').on('click', function() { var sumMap = {}; //Iterate through table rows $("table tbody tr").each(function () { if (sumMap[$(this).children('td:nth-child(1)').text()]) { sumMap[$(this).children('td:nth-child(1)').text()] = sumMap[$(this).children('td:nth-child(1)').text()] +Number($(this).children('td:nth-child(2)').text()); } else { sumMap[$(this).children('td:nth-child(1)').text()] = Number($(this).children('td:nth-child(2)').text()); } }) //Append result to the other table $.each(sumMap, function (i, val) { $('#bottomTable tr:last').after('&lt;tr&gt;&lt;td&gt;'+i+'&lt;/td&gt;&lt;td&gt;'+val+'&lt;/td&gt;'); }); }); Pure javascript: (JSFiddle: http://jsfiddle.net/inanda/2dmwudfj/ ): appendResultToBottomTable= function() { var sumMap = calculate(); appendResultToTable('bottomTableBody', sumMap); } function calculate() { var table = document.getElementById("topTableBody"); var map = {}; for (var i = 0, row; row = table.rows[i]; i++) { var itemType=(row.cells[0].innerText || row.cells[0].textContent); var value=(row.cells[1].innerText || row.cells[1].textContent); if (map[itemType]) { map[itemType] = map[itemType] +Number(value); } else { map[itemType] = Number(value); } } return map; } function appendResultToTable(tableId, sumMap){ var table = document.getElementById(tableId); for (var item in sumMap){ var row = table.insertRow(table.rows.length); var cellItem = row.insertCell(0); var cellValue = row.insertCell(1); cellItem.appendChild(document.createTextNode(item)); cellValue.appendChild(document.createTextNode(sumMap[item])); } }
accepted answer of: http://stackoverflow.com/q/28057695
upvote count: 4

http://stackoverflow.com/a/28013438
score: 0
has body: You can't do like this. Please understand javascript is client side scripting langauge and php is server side langauge. When you execute the code or load page, first server side code executed afterwards client side. For Ex:- &lt;html&gt; &lt;head&gt; &lt;body&gt; &lt;script&gt; mynumber=19; &lt;?php /*****PHP Script****/ echo $mynumber; ?&gt; &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; It will throw an error undefine variable $mynymber; But if you want to pass javascript variable to php server side you can do that using Ajax. php-Ajax
type: Answer
answers question: http://stackoverflow.com/q/28013323

http://stackoverflow.com/comment/44405853
score: 0
comment on: http://stackoverflow.com/q/28008947
type: Comment
type: QuestionComment
has text: Hopefully you're not using websockets to send javascript files, so that not very relevant. What would be relevant is what you've tried, and if you've tried any of the many many modules availabe for compression ?

http://stackoverflow.com/q/28019873
tagged with: javascript
has comment: http://stackoverflow.com/comment/44426187
score: 0
has title: How to build dynamic buttons with unique actions
has comment: http://stackoverflow.com/comment/44426215
has comment: http://stackoverflow.com/comment/44426157
tagged with: button
has body: I am building a GUI that pulls in information from a JSON file and populates divs on the screen. I have buttons that are being dynamically created and they all have their own unique ID's (ex: button1, button2, button3, etc. etc.) I want each of these buttons to pass unique information to separate div based on its corresponding information pulled from the JSON. I hope that makes sense. As I am looping through the JSON I am building the buttons like: var viewBtn = document.createElement("button"); viewBtn.setAttribute("class", "button"); viewBtn.setAttribute("id", "button" + i); viewBtn.innerHTML = "View More"; viewBtn.onclick = function() { uniqueAction(i); } product.appendChild(viewBtn); } Right now every button is storing the last number passed by the for loop. Thanks ahead of time for any help anyone can lend!!
has comment: http://stackoverflow.com/comment/44426251
duplicate of: http://stackoverflow.com/q/750486
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/750486
answer count: 0
has comment: http://stackoverflow.com/comment/44426264
has comment: http://stackoverflow.com/comment/44426102
has comment: http://stackoverflow.com/comment/44426124
type: Question

http://stackoverflow.com/comment/44610994
comment on: http://stackoverflow.com/a/28118351
has text: Thanks for help. It seems most people disagree on sending functions to client side, so what pattern do you recommend to do this task? It is mentioned in my question post, basically, I want to limit the kind of functions that a user can use to bind
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/27980235
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has title: preventDefault() doesn't prevent form from being send
has answer: http://stackoverflow.com/a/27980365
has comment: http://stackoverflow.com/comment/44352107
has answer: http://stackoverflow.com/a/27980356
has comment: http://stackoverflow.com/comment/44352088
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/27980331
tagged with: javascript
tagged with: jquery
has body: I have an html snippet &lt;form action="domains.php#searchdomain" method="post" name="m_domain"&gt; &lt;a name="searchdomain"&gt;&lt;/a&gt; &lt;table class="dataTable" width="100%" border="0" cellspacing="0" cellpadding="5" id="" style="text-align:center; margin-top:0px; border-left:1px solid #ddd; border-right:1px solid #ddd; border-top:1px solid #ddd;"&gt; &lt;tr&gt; &lt;td align="left" colspan="2"&gt;&lt;div id="display_message" &lt;?php echo $sstyle; ?&gt;&gt;&lt;?php echo $dis_msg; ?&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="left"&gt;Search Domain&lt;/td&gt; &lt;td align="left" style="display:none;" id="apply_text"&gt;Replace Selected Domains With&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center"&gt;&lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td&gt;&lt;input class="input_field" name="search_domain" id="search_domain" value="&lt;?php echo $search_domain; ?&gt;" type="text"&gt;&lt;/td&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;td&gt;&lt;input type="submit" class="btn blue_button" name="submit" value="Search"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt; &lt;td align="center"&gt;&lt;table width="100%" border="0" cellspacing="0" cellpadding="0" id="apply_button" style="display:none;"&gt; &lt;tr&gt; &lt;td&gt;&lt;input class="input_field" name="domain_name_url" id="domain_name_url" value="&lt;?php echo $domain_name_url; ?&gt;" type="text"&gt;&lt;/td&gt; &lt;td&gt;&amp;nbsp; &lt;input name="domain_replace_id" id="domain_replace_id" value="" type="hidden"&gt; &lt;input name="domain_replace_link" id="domain_replace_link" value="" type="hidden"&gt; &lt;/td&gt; &lt;td&gt;&lt;input type="submit" class="btn blue_button" name="submit" value="Apply" onclick="return validate();"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center"&gt; &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td&gt;&lt;input type="checkbox" name="stat…

http://stackoverflow.com/comment/44411419
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28011767
has text: You cannot write to files using javascripts. http://stackoverflow.com/questions/582268/read-write-to-file-using-jquery

http://stackoverflow.com/a/28088123
type: Answer
score: 3
answers question: http://stackoverflow.com/q/28088058
has body: This is what is known as an immediately invoked anonymous function (IIFE). It allows us to create a new function scope and immediately run the code so that no variable or other items we create "leak" out and manipulate the global scope. Leaking of your code into the global can impact other modules or 3rd party code. This also helps protect your code by making you think about what objects you are using that are not declared in your local scope. http://gregfranko.com/blog/i-love-my-iife/ as a more detailed explanation that covers the general idea other esoteric things like minification benefits.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28088058
upvote count: 3

http://stackoverflow.com/a/28137509
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28111659
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/28111659
has body: You can try my project jquery-lazyload-any Html JavaScript: $('#you-want-lazyload').lazyload(options); or other one jquery-appear Html JavaScript $('#you-want-to-detect').bind('appear', doSomething); // you have to unbind event if you want to trigger only once

http://stackoverflow.com/comment/44393680
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27997618
has text: You could try to post your complete code and csv file as a Gist or similar to provide context?

http://stackoverflow.com/comment/44333643
type: QuestionComment
has text: @Pointy I know. It looks funny, that's all I'm saying.
score: 1
comment on: http://stackoverflow.com/q/27970424
type: Comment

http://stackoverflow.com/comment/44548990
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28085655
has text: You have updated your express to version 4 which had breaking changes. Check the guide on their site on how to upgrade from 3.0 to 4.0

http://stackoverflow.com/comment/44499679
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28055789
has text: @KendrickLay O.K. I did some more research on this. Just as we have for the the Google Maps API, you're going to need two additional plugins: the **goog** plugin and the **propertyParser** plugin. I thought those were required just for the Google Maps. I'll update my answer.

http://stackoverflow.com/q/28021828
tagged with: http://stackoverflow.com/tag/json
has title: HTML tags inside json..view using angularjs
has body: Here is my json data [{"Country" : "Germany"},{"Country" : "Sweden"}] Here is how i am fetching it using angular js {{ x.Country }} and the controller script function customersController($scope,$http){ $http.get("http://localhost/sample.php").success(function(response) {$scope.names = response;}); } The output i am getting is Germany Sweden But the output i wanted is Germany Sweden Need help to sort this out...
type: Question
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/44430120
tagged with: javascript
has answer: http://stackoverflow.com/a/28022206
has comment: http://stackoverflow.com/comment/44429896
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28022145
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/44429833
score: 1

http://stackoverflow.com/comment/44569873
score: 0
type: Comment
type: AnswerComment
has text: @IngoBürk Yeah, updated the answer. The question *might* be a duplicate on top of that, subjective to *how* it's been asked (presuming it has). Got to love JavaScript.
comment on: http://stackoverflow.com/a/28096461

http://stackoverflow.com/q/28111314
type: Question
tagged with: phantomjs
tagged with: javascript
has title: CasperJS doesn't show the characters correctly after screenshot via captureBase64
has body: I'm using captureBase64 to take a screenshot and show it in my website. I have a two test environment running over Windows and Linux in the first I use Wampserver and the other Apache 2.4.6 + php 5.5 both executes the same casperjs code. When I Using Linux I don't know what happened but the strings/characters doesn't appear correctly some times just what it show are squares character below my code: 1. CasperJS this.click(x(btDetalhes)); this.wait(3000); // Descomentar se der ERROR casper.waitForResource("Dúvidas", function detalhesPedido(screenShot) { return screenShot; }, function onReceived() { this.log('Wait...'); myScreenShot = this.captureBase64('png', '#ctl00_Conteudo_rptListaCompras_ctl00_pnlPrincipal', {format: 'png', quality: 100}); }); // Logout &amp; Exit casper.thenOpen(url_logout, function logout() { // Check if exists screenshot if (myScreenShot !== "") { this.echo("data:image/png;base64," + myScreenSHot).exit(); } else { this.echo('Sorry!')exit('1601'); } }).run(); I'm using casperjs-1.1.0-beta3 and phantomjs-1.9.8 with CentOS 7. Thanks for any help.
score: 0
answer count: 1
tagged with: php
has answer: http://stackoverflow.com/a/28131768
type: AnsweredQuestion
tagged with: casperjs
accepted answer: http://stackoverflow.com/a/28131768

http://stackoverflow.com/comment/44497266
score: 2
has text: Here's a hint: something like `firstTable.getElementsByTagName("td");` will return a list that will have fruit names in even positions and quantities in odd.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28057695

http://stackoverflow.com/comment/44667197
has text: Look at your console (dev tools in the browser) and check if this not block loading files from your location
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28042232
score: 0

http://stackoverflow.com/a/28034359
has comment: http://stackoverflow.com/comment/44454578
downvote count: 0
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/28033933
has body: Do you mean something like: $(document).on("click", "#firstTable tr button", function(b) { b = $(this).closest("tr"); var d = $.trim(b.find("td:first").text()); b = parseFloat($.trim(b.find("td:nth-child(3)").text())); var a = $("#secondTable"), c = a.find("tr").filter(function(a) { return $.trim($(this).find("td:first").text()) == d }); c.length ? (a = c.find("td:nth-child(2)"), c = parseFloat($.trim(a.text())), a.text(b + c)) : (a = $(" ").appendTo(a), $(" ", { text: d }).appendTo(a), $(" ", { text: b }).appendTo(a)) }); Item Stock Sold Apples 300 200 Sell Apples 300 100 Sell Oranges 400 300 Sell Sold Item Sold
has comment: http://stackoverflow.com/comment/44453796
score: 1
has comment: http://stackoverflow.com/comment/44454553

http://stackoverflow.com/a/28119128
type: Answer
has body: To supplement answer by Bhojendra Nepal: 1) "keyup" event fits better here. 2) You could try using "disabled" attribute on submit input button instead of another class. It looks like something that fits your case. $("#nome,#lat,#lon").on('keyup', function (e) { if ($(this).val().length &gt; 0) { $('#add').prop("disabled", false); } }); (Updated to use .prop() instead of .attr(), which seems more appropriate. Thanks to War10ck for pointing that out!) Fiddle: http://jsfiddle.net/44ewj7hs/2/ EDIT: As suggested in the comment by @Teemu, even better idea is to use input event (MDN) - with one catch being lack of support in IE &lt; 9.
has comment: http://stackoverflow.com/comment/44613052
has comment: http://stackoverflow.com/comment/44622085
has comment: http://stackoverflow.com/comment/44612737
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44612895
answers question: http://stackoverflow.com/q/28119001
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28119001

http://stackoverflow.com/q/28034604
has answer: http://stackoverflow.com/a/28089645
accepted answer: http://stackoverflow.com/a/34929266
type: AnsweredQuestion
score: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
possible better answer: http://stackoverflow.com/a/28089645
favorite count: 0
type: Question
tagged with: iframe
answer count: 2
has body: There are similar questions on Stack Overflow regarding the way masked domain forwarding affects Meta Viewport tags, but I've yet to find a solution to the way the forwarding removes the Viewport tag and the page's responsiveness. In order to mask the page, an iframe is inserted which contains the content of the referenced site. The problem is that this iframe is placed within a new head tag which no longer contains a meta viewport. I've found from some experimentation in the built in HTML inspector in Chrome, that if I add in this meta tag, the page will display correctly again. So, it seems to me all I would need to do is add a Meta Viewport to the page when it loads like so: &lt;script&gt; function setViewport(){ var meta = document.createElement('meta'); meta.name= "viewport"; meta.content = "width=device-width, initial-scale=1"; document.getElementsByTagName('head')[0].appendChild(meta); } window.onload = setViewport; &lt;/script&gt; However, this doesn't work. When I run the JS in the console, the tag is added in and the page re-formats nicely, but if I actually add the JS to my code it doesn't get fired off. I assume I'm not placing the script in the right location. I'm placing it in my header include file right now, but this include ends up within the iframe when the page is rendered so I could see why it wouldn't have an effect on the page. So my question is, is there a location in my code where I could place this so it runs after the forwarder re-formats the page, or is there a function other than onload that might accomplish this?
upvote count: 3
has answer: http://stackoverflow.com/a/34929266
has title: How can I append a Meta Viewport tag to the masked domain forwarding iframe?
tagged with: mobile
tagged with: javascript

http://stackoverflow.com/comment/44436374
has text: One of them uses `this` as a selector, which is a keyword in JavaScript. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) The other one uses `_this`, which is a normal variable.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/28025497

http://stackoverflow.com/comment/44405781
comment on: http://stackoverflow.com/a/28008744
score: 0
type: AnswerComment
type: Comment
has text: Clear what text? Please accept the answer if it helped you :-)

http://stackoverflow.com/a/28040098
has body: I think, the method you are using to apply this functionality not proper. and id attr must be a array not a integer. Might be its can work by changing implementation method.... see https://stackoverflow.com/a/15635201/1728836 with elegent example.
answers question: http://stackoverflow.com/q/28035714
score: 0
type: Answer

http://stackoverflow.com/q/28028064
has answer: http://stackoverflow.com/a/28029538
has answer: http://stackoverflow.com/a/28028527
type: Question
type: AnsweredQuestion
has title: How to seperate the values of textbox so that I can sort by each value
has comment: http://stackoverflow.com/comment/44443461
has comment: http://stackoverflow.com/comment/44443385
tagged with: javascript
has body: I have a textbox where the user can input a value into a listbox. Then, I have buttons to either Delete that value, or Sort the value. My problem is that I want the value to be sorted by those 2 separated values. For example, the user would enter City=Chicago in the textbox. And there would be 2 sort buttons, to 'Sort by City' and 'Sort by Value' where value in this case is Chicago. So after hours of trying I can't figure out how to: 1. Restrict the user to only be able to enter a value like %=% (e.g. City=Chicago) 2. Have separate sort buttons for the values on either side of the equal sign
has comment: http://stackoverflow.com/comment/44441717
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/44441300
has comment: http://stackoverflow.com/comment/44442135
possible better answer: http://stackoverflow.com/a/28029538
accepted answer: http://stackoverflow.com/a/28028527

http://stackoverflow.com/q/28059397
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: I still didn't get why i can't get text from textbox. I need dynDateTime to get date to textbox, but after i choose the date and the date appear in text box, i can't get the text from the text box. &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#&lt;%=TextBox1.ClientID %&gt;").dynDateTime({ showsTime: false, ifFormat: "%Y/%m/%d", daFormat: "%l;%M %p, %e %m, %Y", align: "BR", electric: false, singleClick: false, displayArea: ".siblings('.dtcDisplayArea')", button: ".next()" }); }); &lt;/script&gt; &lt;asp:TextBox ID="TextBox1" runat="server" ReadOnly = "true" Width="100px"&gt;&lt;/asp:TextBox&gt;&lt;img src="../../images/calendar_icon.png" /&gt; what did i miss? thanks in advance.
has title: how to get text from textbox with dynDateTime
downvote count: 0
has answer: http://stackoverflow.com/a/28059821
type: Question
score: 1
tagged with: javascript
tagged with: visual-studio-2010
upvote count: 1

http://stackoverflow.com/a/28084706
score: -1
has body: var a = [2,3,-1,4,5,7,8,13,-20]; var positiveNums = a.filter(function(num){ return num &gt; 0 }); // [2,3,4,5,7,8,13] var sum = positiveNums.reduce(function(a, b){ return a+b; }); // 42
downvote count: 1
upvote count: 0
answers question: http://stackoverflow.com/q/28084436
has comment: http://stackoverflow.com/comment/44577892
type: Answer

http://stackoverflow.com/comment/44498906
type: Comment
has text: Yes you are right I set it to be ?v=3.8 it works
comment on: http://stackoverflow.com/a/28052584
type: AnswerComment
score: 0

http://stackoverflow.com/q/28045137
favorite count: 0
tagged with: meanjs
tagged with: angularjs
has body: Hi im playing with angular ui time picker http://angular-ui.github.io/bootstrap/ put when i use it, my date is 1 hour behind, how do i change this and why ? JS $scope.dateStart = new Date(); $scope.dateStart.setUTCHours(7); $scope.dateStart.setUTCMinutes(0); HTML Start when i run it show clock 08:00 but i set it to 07:00 as you can see and when i set it to eg. 10:00 on gui {{dateStart}} shows "2015-01-20T09:00:17.382Z" and not T10 :/
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44485274
score: 1
has answer: http://stackoverflow.com/a/33378333
upvote count: 1
type: Question
tagged with: javascript
tagged with: angular-bootstrap
answer count: 1
downvote count: 0
has title: Angular ui.bootstrap.timepicker 1 hour behind

http://stackoverflow.com/comment/44503435
comment on: http://stackoverflow.com/q/28061036
type: QuestionComment
type: Comment
score: 1
has text: @BhargavModi , Hello , If you put it as answer , it will be helpful for future visitors to see answer.Do you think they will be reading Comments to get answer of the question?

http://stackoverflow.com/a/28054787
accepted answer of: http://stackoverflow.com/q/28054004
has comment: http://stackoverflow.com/comment/44650065
has comment: http://stackoverflow.com/comment/44650148
has comment: http://stackoverflow.com/comment/44652800
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44650413
score: 0
type: Answer
has body: Ok, got it. The thing is that the variables cantidadesminimas and cantidadesmaximas depend on the value of cantidadfinal and we don't know the valid value of cantidadfinal until we've gone through all the rows. This leads to the error: if row x comes after row y its cantidadfinaldoesn't take into account the values of row y and therefore remains unmodified. The quickest solution is to loop twice: firstly to calculate cantidadfinal and the other loop to set the correct values in .val5 and .val6. $(".txtMult input").keyup(multInputs); function multInputs() { var mult = 0; var sum = 0; var cantidadfinal = 0; var preciofinal = 0; var cantidadesminimas = 0; var cantidadesmaximas = 0; // for each row: $("tr.txtMult").each(function () { // get the values from this row: var $val1 = $('.val1', this).val(); var $val2 = $('.val2', this).val(); var $val3 = $('.val3', this).val(); var $val4 = $('.val4', this).val(); var $total = ($val1 * 1) * ($val2 * 1); var $cantidadestotales = ($val3 * 1) * ($val2 * 1); var $preciostotales = ($val4 * 1) * ($val2 * 1); mult += $total; cantidadfinal += $cantidadestotales; preciofinal += $preciostotales; sum += parseFloat($val2); }); // Now we have the correct cantidadfinal and can update the values properly $("tr.txtMult").each(function () { var $val3 = $('.val3', this).val(); cantidadesminimas = (8260 - cantidadfinal) / $val3; cantidadesmaximas = (12390 - cantidadfinal) / $val3; $('.val5', this).html(cantidadesminimas.toFixed(0)); $('.val6', this).html(cantidadesmaximas.toFixed(0)); }); $("#precio").html(preciofinal.toFixed(0)); $("#cantidadelegida").html(cantidadfinal.toFixed(0)); $("#sum").html(sum.toFixed(0)); $("#grandTotal").html(mult.toFixed(0)); $("#cantidadmin").html(8260 - cantidadfinal.toFixed(0)); $("#cantidadmax").html(12390 - cantidadfinal.toFixed(0)); $("#kcaltotal").html(14000 - mult.toFixed(0)); } For the next time I recommend you use a very nice javascript plugin called knockout, it does this kind of things really nice and eas…
answers question: http://stackoverflow.com/q/28054004
has comment: http://stackoverflow.com/comment/44651763

http://stackoverflow.com/comment/44525049
type: QuestionComment
has text: @Brocco well that's a good point.
comment on: http://stackoverflow.com/q/28070394
score: 1
type: Comment

http://stackoverflow.com/comment/44577613
type: AnswerComment
has text: Thanks for the answer and code. But helloChris was the first who gave the trick :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28100750

http://stackoverflow.com/a/27983174
has body: element.on('mousedown', function (event) { // Prevent default dragging of selected content **event.preventDefault();** startX = event.screenX - x; startY = event.screenY - y; $document.on('mousemove', mousemove); $document.on('mouseup', mouseup); }); you prevent the default action to happen (in your case, focus on input) You should never have a panel that you can drag from anywhere and that it has content in it. You should have a drag zone (like a title). Here's the code with prevent default commented out: http://plnkr.co/edit/3cpq4vQADP1snHhBMLIj?p=info But I still think you should have a draggable area instead of making the whole thing draggable
has comment: http://stackoverflow.com/comment/44357803
downvote count: 0
answers question: http://stackoverflow.com/q/27982946
has comment: http://stackoverflow.com/comment/44359290
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/28055643
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/28032519
has comment: http://stackoverflow.com/comment/44588231
type: Answer
score: 1
has body: Please check the fiddle. Actually the issue is with your font style. I have just changed the font face and its working fine Refer to this Jsfiddle var textGeom = new THREE.TextGeometry("Video Dp", { font: 'optimer', weight: 'normal' }); var material2 = new THREE.MeshNormalMaterial(); var textMesh = new THREE.Mesh(textGeom, material2); scene.add(textMesh);
has comment: http://stackoverflow.com/comment/44535433

http://stackoverflow.com/comment/44425901
has text: take a look : var app = angular.module('Todo', []); app.controller('TodoCtrl', function($scope) { $scope.initialData = function () { $scope.newTodo = ''; $scope.todos = [ 'Maged Task', 'Essam Task', 'Ashraf Task' ]; } $scope.done = function(todo) { var indexOf = $scope.todos.indexOf(todo); if (indexOf !== -1) { $scope.todos.splice(indexOf, 1); } }; $scope.add = function(e) { if (e.which && e.which === 13) { $scope.todos.push($scope.newTodo); $scope.newTodo = ''; } }; });
comment on: http://stackoverflow.com/a/28019619
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44441274
score: 0
comment on: http://stackoverflow.com/q/28021486
type: Comment
type: QuestionComment
has text: actually I'm upgrading my webapp from old codeigniter version to new one. there are 3-4 errors. But I guess they are not related to this.

http://stackoverflow.com/comment/44338131
has text: It's on my C: drive when I work on it, but when I install it is on my dropbox account that I have connected to heroku to load up the page when I am running the local server I use: `http://localhost:5000/`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27972223
score: 0

http://stackoverflow.com/comment/44480100
comment on: http://stackoverflow.com/q/28037742
has text: I'd guess that you're running into a [scope problem](http://stackoverflow.com/q/750486/1048572) with you `key` variable; Try to log it in the callbacks
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44449172
type: Comment
comment on: http://stackoverflow.com/a/28032081
has text: yes, if you enable html5Mode then hash prefix will went away,,
score: 0
type: AnswerComment

http://stackoverflow.com/q/27973927
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/105262851
tagged with: dom-events
favorite count: 0
has body: I've written directives in the past to handle different keys being pressed in an input form, but for the issue I'm having, I'm needing to be able make it so that when a user presses the tab key, it will handle it the same way as it would as if they had hit the enter key (no losing focus, submit form if needs be...). Is it possible to intercept that event and tell the app it's an enter key instead, and then just do an event.preventDefault() or something?
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44341273
answer count: 0
linked to: http://stackoverflow.com/q/596481
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44341454
upvote count: 1
type: Question
tagged with: angularjs-directive
score: 1
has comment: http://stackoverflow.com/comment/44341471
has comment: http://stackoverflow.com/comment/44340967
has title: Angular change keypress from tab to enter

http://stackoverflow.com/q/27991157
has title: Grunt watch with livereload after javascript concat is loading page with the previous change not latest
answer count: 0
score: 1
tagged with: livereload
upvote count: 1
tagged with: grunt-contrib-watch
has comment: http://stackoverflow.com/comment/44420798
type: Question
tagged with: javascript
tagged with: gruntjs
has body: I'm working on an Angular application. I'm struggling with grunt-contrib-watch and livereload working correctly after I run other tasks on my css and js files. Basically I do the following: JsHint, Concatenate &amp; uglify the js on change. Run autoprefixer on css change. Both of these create new files which I include on my index page. When those new files are created, I want them to be live reloaded in my browser. The following is my Gruntfile.js: grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), autoprefixer: { dist: { files: { 'webapp/assets/css/build/rm.css': 'webapp/assets/css/pre/rm.css' } }, options: { browsers: ['Explorer &gt;= 8', '&gt; 1%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1'] } }, concat: { dist: { src: [ 'webapp/app.js', // This specific file 'webapp/shared/**/*.js', // All the shared angular files 'webapp/specific/**/*.js', // All the page specific angular files '!webapp/shared/tests/*.js', //Remove tests '!webapp/specific/*/tests/*.js' //Remove tests ], dest: 'webapp/assets/libs/production.js', } }, uglify: { options: { banner: '/*! &lt;%= pkg.name %&gt; &lt;%= grunt.template.today("yyyy-mm-dd") %&gt; */\n' }, build: { src: 'webapp/assets/libs/production.js', dest: 'webapp/assets/libs/production.min.js' } }, jshint: { options: { reporter: require('jshint-stylish'), predef: [ "angular", "describe", "beforeEach", "module", "inject", "expect", "it" ] }, target: ['webapp/app.js', 'webapp/shared/**/*.js', 'webapp/specific/**/*.js'] }, watch: { scripts: { files: ['webapp/app.js', 'webapp/shared/**/*.js', 'webapp/specific/**/*.js', '!webapp/shared/tests/*.js', '!webapp/specific/*/tests/*.js'], tasks: ['jshint', 'concat', 'uglify'], }, styles: { files: ['webapp/assets/css/pre/*.css'], tasks: ['autoprefixer'], }, livereload: { options: { livereload: true, }, files: ['webapp/assets/libs/production.js', 'webapp/assets/libs/production.min.js', 'webapp/assets/css/build/rm.css', 'webapp/shared/**/*.html', 'webapp/specific/**/*.html', 'webapp/in…
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/74778026
has comment: http://stackoverflow.com/comment/44373142

http://stackoverflow.com/comment/44613408
has text: `window.resize()` is the one you need
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28119535
type: QuestionComment

http://stackoverflow.com/comment/44602897
type: AnswerComment
comment on: http://stackoverflow.com/a/28111290
score: 0
type: Comment
has text: Adding "-webkit-backface-visibility: hidden;" to the span will prevent a 1px jit in Chrome.

http://stackoverflow.com/comment/44415427
comment on: http://stackoverflow.com/q/28014113
type: Comment
has text: It is a method so you need `()` after this.gameLoop
score: 2
type: QuestionComment

http://stackoverflow.com/q/27989571
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27989804
score: 0
has title: Not show duplicated record
has body: I have a simply problem: some record of one column of my db are: house house palace house bar palace house I want to show a list without duplicate record like: house palace bar I use JS to search into my mysql db and if i write this code that show me the first list: if (Search.EOF) { Response.Write("") } else while (!Search.EOF) { Response.Write(Search("columnname")) Search.Movenext(); } How can i jump the duplicated record?
tagged with: record
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27989687
has comment: http://stackoverflow.com/comment/44370195
has answer: http://stackoverflow.com/a/27989804
has answer: http://stackoverflow.com/a/27989687
tagged with: mysql
type: Question
answer count: 2

http://stackoverflow.com/comment/44475882
comment on: http://stackoverflow.com/q/28046690
type: QuestionComment
score: 0
has text: can you provide a jsfiddle to demo what you're talking about?
type: Comment

http://stackoverflow.com/comment/44509300
score: 0
type: Comment
has text: freeze will freeze the properties.. it will not be variable anymore. i.e. cant be changed.. just freezed.. like a constant..
type: AnswerComment
comment on: http://stackoverflow.com/a/28064400

http://stackoverflow.com/comment/44458473
score: 0
type: QuestionComment
type: Comment
has text: It seems the problem has to do with my server implementation. If no parameter is passed I return, if there is a parameter, I save an async context for later use, because of this it seems its not considered "connected". I will have to try to find a way around this.
comment on: http://stackoverflow.com/q/28036723

http://stackoverflow.com/q/28013227
has body: im trying to repeat a directive inside the directive so i can have a template on each of directive but the problem is i can only show the first entry when using ng-transclude Here is what i've done so far <test-data xx-value="Mouse" xx-href="https://fb.com" /> <test-data xx-value="Keyboard" xx-href="https://goo.gl" /> and for the controller var app = angular.module('TestApp', []); app.controller('TestCtrl', ['$scope', function($scope){ }]); app.directive("testCollector", function () { return { restrict: "E", scope: {}, transclude: true, replace: true, controller: function($scope) { }, template: ' ' + ' ' + ' ' } }); app.directive("testData", function(){ return { restrict: "E", require: '^testCollector', transclude: true, replace: true, scope: { xxValue: '@', xxHref: "@" }, template: '{{xxValue}}' } }); i only get Mouse i prepared a fiddle to see it in action CLICK HERE any help please. Thank you in advance
type: Question
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/28013467
tagged with: javascript
score: 0
tagged with: angularjs-ng-transclude
answer count: 1
tagged with: angularjs-ng-repeat
tagged with: angularjs
has answer: http://stackoverflow.com/a/28013467
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/28019280
has title: Transclude on ng-repeat

http://stackoverflow.com/q/28014010
has body: I'm working on a web app that displays a list of youtube videos for the user to watch, and it's working fine, but when I leave the app alone for a period of time, 45 minutes or so, when I try to make another API request I get a 403 Error: "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup." If I refresh the page it works fine again and it doesn't matter how many individual requests I've made, it simply seems to be a timeout. I can't find any specifics on how long this timeout is, how to prevent or extend it, or anything else. Does anyone know? Also, if I manually call the gapi.client.setApiKey() and gapi.client.load() again from the javascript console it works just fine, I figure I can just set a 30 minute timeout or whatever to refresh this but that seems kind of annoying.
answer count: 1
tagged with: youtube
has title: YouTube Data API says I've exceeded by daily usage limits when left idle for a few hours
tagged with: javascript
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/28014165
score: 0

http://stackoverflow.com/a/28074550
downvote count: 0
has body: There's an event handler for it casper.on('url.changed',function(url) { casper.echo(url); }); Here's the documentation for it: http://casperjs.readthedocs.org/en/latest/events-filters.html#url-changed However, as Artjom B. mentioned, this won't cover all cases that a function extension would handle. It's only really appropriate when you don't need it as part of the control flow, but just want to reactively scrape some values when it happens.
score: 8
upvote count: 8
type: Answer
has comment: http://stackoverflow.com/comment/44528621
has comment: http://stackoverflow.com/comment/44528444
answers question: http://stackoverflow.com/q/28074458

http://stackoverflow.com/a/28120159
has body: Ideally, your table cells would also have a class on them so you could write line two as: $(".game-player").addClass("tsub1a"); jQuery will collect all cells with this class into an object and apply addClass() to them all.
answers question: http://stackoverflow.com/q/28120125
score: 0
type: Answer

http://stackoverflow.com/a/28090861
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/28021249
answers question: http://stackoverflow.com/q/28021249
score: 1
upvote count: 1
downvote count: 0
has body: I finally made it work. I found out, that it could not be done in this manner, because requirejs will always use the current url as the "root", not the URL of the script itself (used in "script" tag). At least I haven't find a way how to get around this. Instead, I've removed the whole app.js file and moved configuration right into the main template with php variable $basePath available, which I used to define the basePath (basicly I defined an absolute path instead of a relative one).

http://stackoverflow.com/q/28005052
upvote count: 2
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28005138
tagged with: jquery
has comment: http://stackoverflow.com/comment/44398629
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28005138
tagged with: css
downvote count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44398541
has body: So I am trying to use some jQuery on a site I am building, but nothing seems to get it working. Here is how I have the files linked in my html: Eddy: Designer Then in my javascript document "script.js" I have this code: $(document).ready(function () { "use strict"; $('#branding').click(function () { $('.branding').removeClass('.hidden'); $('.ui').addClass('.hidden'); $('.logos').addClass('.hidden'); $('.print').addClass('.hideen'); }); $('#ui').click(function () { $('.branding').addClass('.hidden'); $('.ui').removeClass('.hidden'); $('.logos').addClass('.hidden'); $('.print').addClass('.hideen'); }); $('#logos').click(function () { $('.branding').addClass('.hidden'); $('.ui').addClass('.hidden'); $('.logos').removeClass('.hidden'); $('.print').addClass('.hideen'); }); $('#print').click(function () { $('.branding').addClass('.hidden'); $('.ui').addClass('.hidden'); $('.logos').addClass('.hidden'); $('.print').removeClass('.hideen'); }); }); My code editing software says that my $(document).ready is using a '$' before it is defined... I have no idea what that means or if that is what is causing me these issues. The idea is, when I addClass '.hidden' it will make every image that ISN'T the category that the button is labeled go to 50% opacity. This would in a sense "highlight" all the items that are "branding" or what have you. I have been looking at tutorials about using jQuery, and I can't find what is going wrong. Please help. I am stressing myself out over this. I tried linking the jQuery like this: This did not fix my problem. Is my jQuery code written incorrectly and that's why it isn't functioning? It seems like I am loading the jQuery properly, but it still doesn't work.
has comment: http://stackoverflow.com/comment/44399113
type: Question
score: -2
has title: Why isn't my jQuery functioning
has comment: http://stackoverflow.com/comment/44398628
has comment: http://stackoverflow.com/comment/44398531
linked to: http://stackoverflow.com/q/1335851
has comment: http://stackoverflow.com/comment/44398766
has comment: http://stackoverflow.com/comment/44398579

http://stackoverflow.com/q/27966783
has answer: http://stackoverflow.com/a/27967354
accepted answer: http://stackoverflow.com/a/27967354
upvote count: 1
tagged with: slidedown
has title: How to make slideDown animation on a hidden row of table that needs to be shown?
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/27967469
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I know that the animation is not possible on direct rows of a table besides show,hide and fade, but this is actually possible if you wrap the cell of the table inside a div with a display:block. my issue is that it's working great on slideUp and not working on slideDown for the exact same example with the exact same logic. the logic is pretty simple: add div to wrap the table cell apply the animation on the div hide/show the row of the table my code is to have somethin like: JSfiddle Is there anything wrong with my logic/Code ? Thanks!
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27967469

http://stackoverflow.com/comment/44411860
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28012197
has text: @StanislasPiotrowski You need to convince him that CSS isn't build for that. You can use plain JavaScript?
score: 0

asp-classic
tags question: http://stackoverflow.com/q/28052509
tags question: http://stackoverflow.com/q/28072209
tags question: http://stackoverflow.com/q/28004531
tags question: http://stackoverflow.com/q/28053680
tags question: http://stackoverflow.com/q/27989337
tag name: asp-classic
tags question: http://stackoverflow.com/q/28103054
tags question: http://stackoverflow.com/q/28112124
type: Tag

http://stackoverflow.com/a/28119334
has body: You can easliy create a HTML Audio Element with javascript: &lt;audio autoplay&gt;&lt;source src="youraudiofile.mp3" type="audio/mp3"&gt;&lt;/audio&gt; After you created it in jquery with .append() or whatever just add an .delay(2000) in ms with your length of your file and then remove that element again with .remove() e.g. var audioElement = $('&lt;audio autoplay id="music"&gt;&lt;source src="youraudiofile.mp3" type="audio/mp3"&gt;&lt;/audio&gt;'); $("body").append(audioElement).delay(1000).remove("#music");
has comment: http://stackoverflow.com/comment/44613863
has comment: http://stackoverflow.com/comment/44613965
score: 0
answers question: http://stackoverflow.com/q/28119053
type: Answer
has comment: http://stackoverflow.com/comment/44613979

http://stackoverflow.com/comment/44363020
comment on: http://stackoverflow.com/a/27986054
type: Comment
score: 0
type: AnswerComment
has text: I'm getting a "too much recursion" error: PUT THIS IN YOUR CONSOLE TO TEST: function appointment() { Object.defineProperty(this, 'time', { set: function (value) { value = value + ''; this.time = value.replace(":00.0000000",""); } }); } var a = new appointment(); a.time = "15:33:00.0000000"; a.time

http://stackoverflow.com/comment/44568391
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28059325
has text: Nothing in particular looks wrong with index.html. Since the NaCl module is crashing, the error must be in hello_nacl.c. It would be best to post that here instead.
score: 0

http://stackoverflow.com/q/28103323
has comment: http://stackoverflow.com/comment/44582521
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/28103828
has body: I want to pass one variable from javascript in rails view to the controller along with other form parameters.(rails 2.3.5) &lt;script type="text/javascript"&gt; function confirmation(){ var x=confirm("Edit all copies?"); //passing x and other form object (here @book) } &lt;/script&gt; can I convert x to rails variable? if yes,how?
type: Question
tagged with: javascript
has title: pasing values to rails controller from javascript
score: 0
has comment: http://stackoverflow.com/comment/44582379
answer count: 1
has comment: http://stackoverflow.com/comment/44582259
type: UnansweredQuestion

http://stackoverflow.com/comment/44412828
type: Comment
type: QuestionComment
score: 4
has text: What have you tried? We are willing to help you with your code, but we are not slaves.
comment on: http://stackoverflow.com/q/28012829

http://stackoverflow.com/q/28106265
possible better answer: http://stackoverflow.com/a/28106311
type: Question
has answer: http://stackoverflow.com/a/28106311
has answer: http://stackoverflow.com/a/28106570
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28106339
score: 0
has answer: http://stackoverflow.com/a/28106306
accepted answer: http://stackoverflow.com/a/28106339
has body: I'm trying to build a small function where I retrieve the likes of a certain page on Facebook. My script looks like $.getJSON('https://api.facebook.com/method/links.getStats?urls=http://www.example.com&amp;format=json',function(data) { currentdiv.text((data.like_count || 0)+''); console.log(data.like_count); }); However, like_count returns undefined. The data I get back from Facebook is: [{"url":"http:\/\/www.example.com","normalized_url":"http:\/\/www.example.com\/","share_count":19,"like_count":55,"comment_count":40,"total_count":114,"click_count":0,"comments_fbid":10150397389269673,"commentsbox_count":0}]
answer count: 4
type: AnsweredQuestion
has title: Get likes from facebook
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/28064947
type: Answer
accepted answer of: http://stackoverflow.com/q/28064815
score: 1
upvote count: 1
has body: localeCompare is not the same as ==. When you compare two variables using ==, you check whether or not the variables have the same content. This will return a boolean (true/false). However, localeCompare does not return a boolean but an int instead. You will receive a 0 when the two variables are the same, but you will however receive either 1 or -1 if your variables are not the same. The value is based on whether the first variable comes before or after the second variable in sort order. So I myself would use == when I'm purely validating if two variables are the same, but localeCompare can become handy when you want to see what variable comes first in sort order, however it can be used to compare two variables to see if they are the same. string a = "hello"; string b = "world"; a == b // returns false a.localeCompare(b); // returns -1 To answer your question slightly, these are the characteristics / pro's and cons of using either of the examples given: Using == Returns a boolean instead of a string/integer/... Easier to read by most people Using localeCompare Returns an integer (-1, 0 or +1) Can be used to sort variables
answers question: http://stackoverflow.com/q/28064815
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27989883
has title: equial height not working properly?
score: 0
answer count: 2
has body: Hello I have tried doing the equal heights js code but its not working for me somehow, this is my js fiddle: jsfiddle I think im missing something with the classes? Thanks in advance for any help this is my html: // equal heights - plugin ;(function($) { $.fn.equalHeights = function() { var maxHeight = 0, $this = $(this); $this.each( function() { var height = $(this).innerHeight(); if ( height > maxHeight ) { maxHeight = height; } }); return $this.css('height', maxHeight); }; })(jQuery); $(document).ready(function(){ var equaliseMozaic = function(){ $('.jury-president__block').equalHeights(); console.log('reset'); }; // make mozaic blocks equal heights if( $('.jury-president__block').length > 0 ){ // equalise mozaic blocks equaliseMozaic(); // equalise mozaic blocks on resize var throttledequaliseMozaic = _.throttle(equaliseMozaic, 500); $(window).resize(throttledequaliseMozaic); } }); .jury-blocks{} .jury-president__block{width:100px; display: inline-block; background-color:gray;} .jury-president__block img {width:50px;} Name erwer Name, Juror Company Name Name, Juror Company Name Name, Company
has answer: http://stackoverflow.com/a/27991538
tagged with: javascript
tagged with: css
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28014904
has comment: http://stackoverflow.com/comment/44370670
type: Question

http://stackoverflow.com/comment/44597444
score: 0
type: AnswerComment
has text: Sorry, should be >=-1. Anyway it also works in chrome, Thanks!
comment on: http://stackoverflow.com/a/28019085
type: Comment

http://stackoverflow.com/a/28095847
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28094169
has body: In common ES5 case, not using Ember.Object.extend method with this._super, nor ES6 class inheritance, you must use standard call or apply methods to realize it. So to call authenticate method of parent class you must add this to your child method: Authenticator.prototype.authenticate.call(this /* some args here */);

http://stackoverflow.com/comment/44402616
type: Comment
has text: Put this at the top of your controller and see what happens: $scope.visitor = {};
score: 0
comment on: http://stackoverflow.com/a/28007167
type: AnswerComment

http://stackoverflow.com/comment/44330302
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27968771
has text: @BhojendraSah Oh right, I didn't notice you inverted doSomething and doSomethingElse, my bad
type: AnswerComment

http://stackoverflow.com/q/27989904
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27991262
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: angular-strap
has title: Pass content as object in angular-strap popover
tagged with: javascript
has body: I am trying to do the following: I have a json array of questions which I pass like this: {{item.questions.length}} and a template 'popover.question.tpl.html' that contains the following code: {{question.text}} The problem is probably that the content is passed as a string by the directive, leading in the ng-repeat not working. If I just evaluate "{{content}}" I get the actual json data in my div but obviously I can't work with that. Any ideas on how to do that? Do I have to create a separate controller for that (which I would like to avoid)?
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27991262

http://stackoverflow.com/comment/44528799
comment on: http://stackoverflow.com/q/28072249
score: 0
has text: You're drawing a single polyline so the intersections will be blended rather than creating overlaps. ;-)
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28091694
has comment: http://stackoverflow.com/comment/44561091
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44560549
tagged with: c#
has comment: http://stackoverflow.com/comment/44561186
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/44560942
has comment: http://stackoverflow.com/comment/44561359
upvote count: 0
has comment: http://stackoverflow.com/comment/44561479
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I want to know is this possible that we can load all of the data from a webpage using asp.net. Like I have a page including a table and a pie-chart. I am exporting my html content to pdf on my button click. I have used hidden field to fetch the innerHTML data to transform on server-side. I am getting the data but the problem is ,when I do export to pdf the piechart is nowhere to be seen. C# code : string htmlstring = hiddenTest.Value; pdfConverter.SavePdfFromHtmlStringToFile(htmlstring, downloadName); HTML : function DrawPieChart(series) { $('#container').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: 1, //null, plotShadow: false, backgroundColor: { linearGradient: [50, 0, 100, 500], stops: [ [0, 'rgb(255, 255, 255)'], [1, 'rgb(0, 00, 0)'] ] } }, title: { text: 'Matched and Unmatched Regions' }, 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: 'Percentage', data: series }] }); } function htmlbind() { debugger; var d = document.getElementById('pdfdiv'); var e = document.getElementById('hiddenTest'); e.value = d.innerHTML; } &lt;/script&gt; &lt;%--&lt;My:WebUserControl1 runat="server" ID="WebUserControl1" UserName="a" UserAge="45" UserCountry="Australia" /&gt;--%&gt; &lt;%--&lt;asp:PlaceHolder runat="server" ID="phUserInfoBox" /&gt;--%&gt; &lt;/head&gt; &lt;body bgcolor="#999999"&gt; &lt;form id="form1" runat="server"&gt; &lt;asp:Button ID="button" Text="click" runat="server" OnClick="b1_click" OnClientClick="htmlbind();"/&gt; &lt;asp:Button ID="button1" Text="click" runat="server" OnClick="b2_click" /&gt; &lt;div&gt; &lt;/div&gt; &lt;div id="pdfdiv" runat="server"&gt; &lt;div id="container"&gt; &lt;/div&gt; &lt;br /&gt; &l…
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/44561865
has comment: http://stackoverflow.com/comment/44559916
type: UnansweredQuestion
has title: Fetch all data (including image) from a webpage in asp.net c#
has answer: http://stackoverflow.com/a/28092810
has comment: http://stackoverflow.com/comment/44560817

http://stackoverflow.com/comment/44449121
score: 2
has text: @jeremysawesome OK if you go through 11.13.1 (Simple Assignment), you'll see that the `GetValue()` call for the right-hand side is called before the call to `PutValue()`. It's inside `PutValue()` that the special case for non-"strict" implicit globals lives.
type: AnswerComment
comment on: http://stackoverflow.com/a/28031828
type: Comment

http://stackoverflow.com/a/28055990
accepted answer of: http://stackoverflow.com/q/28055188
answers question: http://stackoverflow.com/q/28055188
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has body: The idea of using a function is to avoid duplicating code, so... &lt;script&gt; function readURL(input) { var reader; if (input.files &amp;&amp; input.files[0]) { reader = new FileReader(); reader.onload = function (e) { var id = $(input).attr("id"), new_id = id.substr(0, id.length - 1); // remove 's' $("#" + new_id).attr('src', e.target.result); //hide product_images and fileSelector }; reader.readAsDataURL(input.files[0]); } } $("#product_images, #product_images2").change(function() { readURL(this); }); &lt;/script&gt; Notice that variables are ALL defined at the top of a function. It is safer to define them there so you can see all the variables that you are using and avoid mixing them (not like in C/C++ where braces define a scope.) Also, a variable defined in a parent function is available as is to the sub-functions. Quite practical.

http://stackoverflow.com/comment/44627337
comment on: http://stackoverflow.com/q/28009642
score: 0
type: Comment
type: QuestionComment
has text: @EmanueleCacciaglia, but you can accept an answer by clicking the greyed `v` below the vote buttons.

http://stackoverflow.com/a/27970027
has comment: http://stackoverflow.com/comment/44332868
has body: You're using $formatters, but for validation you should use $validators. Instead of your line starting with ctrl.$formatters, try the following: ctrl.$validators.yourValidatorName = function(modelValue, viewValue) { console.log("Validator is called."); return true; // This means validation passed. }; You can find this in the documentation. Also do not forget to add the directive to the HTML element, so in your case &lt;input ... custom&gt;. To disable a submit button if validation fails, use &lt;input type="submit" data-ng-disabled="formName.$invalid"&gt;.
has comment: http://stackoverflow.com/comment/45071508
has comment: http://stackoverflow.com/comment/47779839
score: 0
has comment: http://stackoverflow.com/comment/44332941
answers question: http://stackoverflow.com/q/27969590
type: Answer

http://stackoverflow.com/comment/44565385
comment on: http://stackoverflow.com/q/28094169
score: 1
type: Comment
type: QuestionComment
has text: think it is Ember.object.extend

http://stackoverflow.com/comment/44508713
has text: There are so many ways to iterate over the data. like, foreach, _.each, etc..
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28064116

http://stackoverflow.com/comment/44446495
type: Comment
comment on: http://stackoverflow.com/a/27995408
score: 0
type: AnswerComment
has text: No you're absolutely correct, and that's basically what I outlined in my original question: "I think I've narrowed it down to the "#navigation ul.nav li.parent > a:after" element which appears larger on the former than it does on the latter, even though when I check the computed styles in chrome developer tools they both have the exact same parameters as far as I can tell."

http://stackoverflow.com/a/28077294
answers question: http://stackoverflow.com/q/28072269
score: 1
upvote count: 1
has body: From Vaadin you can execute any javascript code you wish. In the book of vaadin there is a example on how to acomplish it. In short you can execute any JS code with this method: // Shorthand JavaScript.getCurrent().execute("alert('Hello')"); Of course you will need to find the correct JS code to bookmark your page. If you wish to bookmark a specific application state/view, then you can use the Navigator for this. (It basically adds a #SomeState to your URL which you can the later come back)
accepted answer of: http://stackoverflow.com/q/28072269
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44445868
type: QuestionComment
comment on: http://stackoverflow.com/q/27993893
has text: I only have IE11 available for testing at the moment. If you post your fiddle, someone may be able to help you.
score: 0
type: Comment

http://stackoverflow.com/comment/49851399
score: 0
type: AnswerComment
type: Comment
has text: This is a good idea. But what I am looking for is a solution similar to "Export to excel" where the user clicks a button and the file gets downloaded for you. Only in my case I want an "Export to PDF" option.
comment on: http://stackoverflow.com/a/30765875

http://stackoverflow.com/a/28118559
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28118352
has body: Pre-Update Answer It's not really clear in your question, but I assume what you're trying to do is create an object with a certain set of functions (as defined by the prototype) while at the same time providing implementations for one or more of those functions. I don't know of any way to do this in a single line, but it's easy to do in two lines: // Prototype Object var prototype = { jump: function() { console.log('jump'); } } var person = Object.create(prototype); // Create person person.jump = function() { console.log('fly'); }; // then define invocation person.jump(); // outputs 'fly' If you're interested redefining methods on "closure classes" that have access to "private" members, I'm pretty sure there is no way to do that (if there was, those members wouldn't really be private).

http://stackoverflow.com/q/28050548
score: 15
answer count: 3
downvote count: 0
tagged with: javascript
favorite count: 0
has title: window.pageYOffset is always 0 with overflow-x: hidden
tagged with: css
has answer: http://stackoverflow.com/a/30056532
upvote count: 15
has comment: http://stackoverflow.com/comment/112654718
has body: I'm creating a webpage that has some off-screen content that only needs to slide in at specific times. To achieve this I'm setting overflow-x: hidden on html, body. This way the user cannot scroll left or right to get at the content. However, at some point in the application I also need the amount that the user has scrolled down yet. As far as I know window.pageYOffset is one of the most reliable ways of doing this. However, when I set the overflow-x rule. window.pageYOffset is always equal to 0. Shouldn't these things be pretty unrelated to each other? How can I fix this? I've tested this on Safari, Firefox and Chrome. I've tried document.documentElement.scrollTop but this only worked on Firefox. NB: I was not able to reproduce the problem with a very simple example. My app also has the main content in a container that has position: absolute. If I remove this, everything works. So it seems to be the combination of overflow-x: hidden on body and postion: absolute on the .content inside the body. I cannot easily get rid of the position absolute requirement however, since different .content containers should be able to be placed over one another. Edit 2: It gets even weirder: I've got a transform: translate(0,0) set on .content to be be able to transition to some other value later. If I remove this, everything works fine! Yet another seemingly unrelated css property that interferes.
has answer: http://stackoverflow.com/a/55567095
type: UnansweredQuestion
tagged with: scroll
type: Question
has answer: http://stackoverflow.com/a/70332676

http://stackoverflow.com/a/28014747
answers question: http://stackoverflow.com/q/28014139
score: 2
downvote count: 0
has body: I was able to resolve the issue by adding display:inline-block to .locationElementBtn. It seems that link hitspaces arent quite so visible for inline (span) elements on mobile, thus the jQuery events aren't fired. It probably has something to do with the element containing a font icon. Thanks to t.niese for the hint!
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28014139
type: Answer

http://stackoverflow.com/q/28077017
score: -1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/44533593
linked to: http://stackoverflow.com/q/3514784
tagged with: javascript
type: UnansweredQuestion
has body: I have seen this thread What is the best way to detect a mobile device in jQuery? but it does not solve the question on how to determine, if the device is a tablet, or a smartphone. ipod or ipad ok. But there are android devices for tablets and smartphones Is there a way and if yes, how?
upvote count: 0
tagged with: tablet
has title: CSS / JS to differentiate between tablet / ipad and smartphone?
has comment: http://stackoverflow.com/comment/44533191
favorite count: 0
tagged with: smartphone
type: Question
tagged with: android
has answer: http://stackoverflow.com/a/28077236
tagged with: css

http://stackoverflow.com/comment/44558734
score: 0
type: QuestionComment
has text: Possibly related to: [Google maps javascript API V3 key disabled on certain computers](http://stackoverflow.com/questions/28056809/google-maps-javascript-api-v3-key-disabled-on-certain-computers)
type: Comment
comment on: http://stackoverflow.com/q/28088686

http://stackoverflow.com/comment/44449006
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28032157
has text: Looking through your answers now, I will post again if I have questions. Thank you for responding. +1, I am extremely close. I believe my problem was the ` `'s rather than the row itself!
type: Comment

http://stackoverflow.com/q/28037915
tagged with: unit-testing
type: Question
has comment: http://stackoverflow.com/comment/44499980
tagged with: javascript
tagged with: mocha.js
score: 0
tagged with: angularjs
answer count: 0
has title: AngularJS unit testing module conflicts
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44497240
has comment: http://stackoverflow.com/comment/44542216
tagged with: karma-runner
has body: I have a few modules with code in different places based on where it is necessary: angular.module('hthsLunch.landingPage', [ 'hthsLunch.core.authService', 'hthsLunch.core.messageService' ]); angular.module('hthsLunch.user', ['hthsLunch.core.authService']); angular.module('hthsLunch.order', [ 'hthsLunch.core.itemService', 'hthsLunch.core.orderService', 'hthsLunch.core.userService', 'hthsLunch.core.authService', 'hthsLunch.core.databaseService' ]); angular.module('hthsLunch.panel', [ 'ngResource', 'hthsLunch.core.messageService' ]); angular.module('hthsLunch', [ 'ngMaterial', 'ui.router', 'hthsLunch.landingPage', 'hthsLunch.user', 'hthsLunch.order', 'hthsLunch.panel' ]).config(['$locationProvider', '$mdThemingProvider', function($locationProvider, $mdThemingProvider) { $locationProvider .html5Mode(true) .hashPrefix('!'); $mdThemingProvider .theme('default') .primaryColor('blue') .accentColor('green'); } ]); I'm trying to test a filter in the module hthsLunch.panel, but I can't do beforeEach(module('hthsLunch.panel')); because that causes module dependency errors. I can't do beforeEach(module('hthsLunch')) for some reason because then the filter seems to be undefined. How can I properly write unit tests with this module structure?
has comment: http://stackoverflow.com/comment/44500293

http://stackoverflow.com/comment/44522155
score: 0
type: AnswerComment
type: Comment
has text: well. the sample code is from backbone/marionette/ project accessing parse.Users in a relational query ( query access via relation or pointer to User) . If you are using an MVC framework with collections , i thought it may provide some idea.
comment on: http://stackoverflow.com/a/28053295

http://stackoverflow.com/a/28006807
type: Answer
has body: Seems like it's the way that ui-router handles the creation of scopes when it loads views. I don't use it so i don't know what it does (i use and recommend http://angular-route-segment.com/ ) So i put your wordController inside of game.html and it worked http://plnkr.co/edit/8ZSyuNAXiC9JX4vBcwtr I do also kindly recommend you to re-write your app using more directives and factories than controllers, having factories control the checking of the guesses, so you'd have an api with a factory and use GuessService.checkInput($scope.guestGuess) that would make your app more modular and easier to debug and test.
score: 1
upvote count: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28005950
answers question: http://stackoverflow.com/q/28005950
type: AcceptedAnswer

http://stackoverflow.com/comment/44585408
type: Comment
has text: Anyways, it did work for me both manually and through script. May be its some kind of browser compatible version problem with Selenium Server.
type: QuestionComment
comment on: http://stackoverflow.com/q/28104277
score: 0

http://stackoverflow.com/a/28016100
answers question: http://stackoverflow.com/q/28015970
type: Answer
has body: spy.and.callFake() will delegate calls to the function and not cll the original function at all. http://jasmine.github.io/2.1/introduction.html#section-Spies:_and.callFake Failing example without the ajax call describe('test', function () { it("should call Callback with appropiate Callbacks", function(){ var called = false; var Meth = {test_method: function(params){ called = true; }}; spyOn(Meth,"test_method").and.callFake(function(){ }); Meth.test_method(); expect(Meth.test_method).toHaveBeenCalled(); expect(called).toBe(true); }); }); Passing example without the ajax call describe('test', function () { it("should call Callback with appropiate Callbacks", function(){ var called = false; var Meth = {test_method: function(params){ }}; spyOn(Meth,"test_method").and.callFake(function(){ called = true; }); Meth.test_method(); expect(Meth.test_method).toHaveBeenCalled(); expect(called).toBe(true); }); });
has comment: http://stackoverflow.com/comment/44419481
score: 0

http://stackoverflow.com/a/28074339
answers question: http://stackoverflow.com/q/28074188
score: 2
downvote count: 0
has body: You can add the type attribute of the button and prevent it from sending the form: Graficar
upvote count: 2
type: Answer

http://stackoverflow.com/q/28029856
tagged with: three.js
has title: Position with large values of coordinates x / y / z
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/28051977
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44444491
has body: http://jsfiddle.net/eho5g2go/ var offset=10000000; ... camera.position.set(offset,offset,400); mesh.position.set(offset-300,offset,0); camera.lookAt(mesh.position); ... animate(); The variable "offset", it is used to indicate the position of the camera and mesh. If you set its value to 100000000, then get strange behavior during the animation And if you set 10000000, then everything is fine Why so? How is it possible to specify the position of objects with coordinates more than 100000000, for example?
linked to: http://stackoverflow.com/q/26049182
type: Question
has comment: http://stackoverflow.com/comment/44444562

http://stackoverflow.com/comment/44535791
score: 0
has text: exactly!For all the strings in my JSON Object
comment on: http://stackoverflow.com/q/28078351
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28004404
upvote count: 1
has body: I'm trying to make a simple audio player using just html5 and jQuery. It works well when I want to play one file/stream, or when I click on a next/preview or another file in playlist. But I need a player which can play automatically all files from playlist. I tried $.each(), I tried a recusive function ... but no success... I can show a part of code here: var el = $('#playerbox'); var soundType = el.data('page-soundtype'); var soundFile = el.data('page-soundfile'); var soundFiles = el.data('page-soundfiles');//playlist, paths to sources var audio = $("&lt;audio preload /&gt;"); //make 2 types of sources for different browsers: var source1= $('&lt;source /&gt;').attr('type', 'audio/mpeg'); // original, mp3 format var source2= $('&lt;source /&gt;').attr('type', 'audio/ogg'); // a copy, ogg format audio.append(source1).append(source2); el.append(audio); var player=audio[0]; player.volume=0; var i=0; //The play list counter, in case we have it var op={}; //player options var runPlayer = function(op){ var fadetime = (op.fadetime || 1000); player.oncanplay = function(){ player.play(); audio.animate({volume: 1}, fadetime); } if(soundType === 'list'){ player.addEventListener('ended', function(){ i++; if(soundFiles[i].length&gt;0){ source1.attr('src', soundFiles[i]); source2.attr('src', soundFiles[i].replace(".mp3", ".ogg")); op.fadetime = 1500; player.pause(); runPlayer(op); } }, false) } } //set sources if(soundType==='list' &amp;&amp; $.isArray(soundFiles)){ //prepare playlist source1.attr('src', soundFiles[i]); source2.attr('src', soundFiles[i].replace(".mp3", ".ogg")); op.fadetime = 1; } else if(soundType==='sound'){ //prepare sound source1.attr('src', soundFile); source2.attr('src', soundFile.replace(".mp3", ".ogg")); } runPlayer(op); So, the first audio source is playing well, then the second loads to player's "src", but doesn't play :( Where is my mistake? Thanks.
has title: How to play all audio sources with html5 and jQuery
has comment: http://stackoverflow.com/comment/44397416
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/28004457
score: 1
favorite count: 0
tagged with: playlist
has comment: http://stackoverflow.com/comment/44397703
type: Question
has comment: http://stackoverflow.com/comment/44397628
tagged with: audio

jquery-mobile
tags question: http://stackoverflow.com/q/28067575
type: Tag
tags question: http://stackoverflow.com/q/27976978
tags question: http://stackoverflow.com/q/28037977
tags question: http://stackoverflow.com/q/28035651
tags question: http://stackoverflow.com/q/28106735
tags question: http://stackoverflow.com/q/27974777
tags question: http://stackoverflow.com/q/28056631
tags question: http://stackoverflow.com/q/28012669
tags question: http://stackoverflow.com/q/28028787
tags question: http://stackoverflow.com/q/28079970
tags question: http://stackoverflow.com/q/27991466
tags question: http://stackoverflow.com/q/28113811
tags question: http://stackoverflow.com/q/27971231
tags question: http://stackoverflow.com/q/28091258
tags question: http://stackoverflow.com/q/27981836
tags question: http://stackoverflow.com/q/28078257
tags question: http://stackoverflow.com/q/28110407
tag name: jquery-mobile
tags question: http://stackoverflow.com/q/28023423
tags question: http://stackoverflow.com/q/28007156

http://stackoverflow.com/a/28098359
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/28097684
answers question: http://stackoverflow.com/q/28097684
has body: If you want to change a parameter after initializing the plug-in, you must do so via one of the API methods. For example, to change the endpoint url: uploader.setEndpoint(newUrl); or if you are using the jQuery plugin wrapper: $(element).fineUploader('setEndpoint', newUrl);.
has comment: http://stackoverflow.com/comment/44572864
has comment: http://stackoverflow.com/comment/44572618

http://stackoverflow.com/a/27975819
has body: Alternatively, you use $.ajax() and pass it the asynch : false option. function deleteFunction(courseId, userId) { $.ajax({ url: '../controlers/doDelete.jsp', type: 'POST', dataType: 'json', asynch: false, data: { courseId: courseId, userId: userId } }).done(function(data) { alert("something here"); }); location.reload(); } asynch : false forces ajax to run synchronously, therefore, the script stops and waits until the ajax request has finished, rather than the ajax running in the background.
score: 0
answers question: http://stackoverflow.com/q/27972079
type: Answer

http://stackoverflow.com/comment/44542838
comment on: http://stackoverflow.com/a/28072210
has text: @Lankymart I was considering deleting this post it but it is another way to achieve the desired outcome. The solution by Stephen is much better.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44682406
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/28028107
type: Comment
has text: @AlexanderSolonik `A = B = C = value;` is assigning the same value to the 3 variables A, B and C. This is just to be concise. A longer way would be simply to write: `A = value; B = value; C = value;`

http://stackoverflow.com/comment/44533014
score: 0
type: QuestionComment
type: Comment
has text: 22,25,26 is not `descending` order. Please correct this
comment on: http://stackoverflow.com/q/28076797

http://stackoverflow.com/q/27982245
type: Question
has title: Running Batch file using Javascript - Firefox
linked to: http://stackoverflow.com/q/15507685
has body: This is important for me as I have a PRN file which can be printed only through command prompt. And I want to delete that file after the print command is given. So these 2 commands can be executed using batch file only. And when I try to use activexobject in javascript, my firefox browsers doesnt run it. &lt;script&gt; MyObject = new ActiveXObject("WScript.Shell"); function Runbat() { MyObject.Run("\"D:\\abc.bat\""); } &lt;/script&gt;
tagged with: javascript
has answer: http://stackoverflow.com/a/28043208
score: 0
tagged with: batch-file
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44469112
has comment: http://stackoverflow.com/comment/44355740
has comment: http://stackoverflow.com/comment/44360873
has comment: http://stackoverflow.com/comment/44358460
linked to: http://stackoverflow.com/q/18980957
tagged with: file

http://stackoverflow.com/a/28638143
answers question: http://stackoverflow.com/q/28066317
type: Answer
score: 7
upvote count: 7
has body: Thanks @micnic for answering the question well. I would like to offer some supplemental information about why I implemented smalloc. Don't think raw memory allocations in JS are some strange new thing. It's the same type of mechanism that's used by Typed Arrays under the hood. So, anywhere you can use a Typed Array you could also use smalloc. The advantage of smalloc is that it doesn't define anything for you. Allowing the maximum flexibility of your API. It's also safe, because the GC will clean up your allocations when the object is no longer being used. One usage would be for a math library. Especially if writing a native module. I personally use it for tricky performance optimizations of allocating memory on an object then sharing that memory between JS and C++ to enable shared state between the two. It's by far the fastest way to do so, and has lead to some impressive optimizations in Node and io.js. Remember that you can allocate onto existing objects. Which is where the power lies. For example: function Alloc(n) { n &gt;&gt;&gt;= 0; // uint32 conversion this.length = n; smalloc.alloc(n, this); } var a = new Alloc(16); There's a simple new construct that just allocates a Uint8 external data array onto the instance. I'll quickly reiterate answers to your questions: I wonder if there is really a need of raw memory allocation in javscript using smalloc? Yes. Think Typed Arrays. If its needed then why? Answered above. Also, search for anything that uses Typed Arrays. what would be the use case for using smalloc? Answered above. In addition, there are many other uses that developers are finding for it. and if not then why did io.js members add this module? I wrote it long before io.js was around. :) Are we trying to make javascript a strongly typed language? Absolutely no. The two are not even related. UPDATE: Because of breaking changes coming in V8 v4.4, smalloc has been marked "deprecated" starting in io.js v2.
downvote count: 0

http://stackoverflow.com/q/28085670
tagged with: keycode
has comment: http://stackoverflow.com/comment/44549449
has answer: http://stackoverflow.com/a/28086098
type: UnansweredQuestion
type: Question
has body: I'm trying to insert a white dot and some spaces when I press the keycode 9(TAB), but i can't get it to work. When I insert the dot it never appears in white, it's allways black. Can someone help me? The code that im using is this one: function WebHtmlEditor1_KeyDown(oEditor, keyCode, oEvent) { if (keyCode == 9) { var point = document.createElement("SPAN"); var object = document.createElement("SPAN"); var style = point.style; style.fontColor = "White"; console.log(style); point.innerHTML = '&lt;span style:"color="#ffffff""&gt;TESTE&lt;/span&gt;'; object.innerHTML = "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"; //console.log(object); iged_insText(point.innerText, false); iged_insText(object.innerText, false); oEvent.cancel = true; } }
has title: How can i insert a white dot when pressing keycode 9 in javascript?
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/44606850
type: Comment
type: AnswerComment
score: 7
has text: Ok. Now I feel like an idiot for not just trying that. Thanks. :)
comment on: http://stackoverflow.com/a/28116341

http://stackoverflow.com/comment/44486115
comment on: http://stackoverflow.com/q/28051986
score: 0
has text: create a custom filter ... see filter docs ... or map the data in controller
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44676317
type: Comment
comment on: http://stackoverflow.com/a/28152014
score: 1
type: AnswerComment
has text: That is totally what I needed... Great thanks, I didn't know of this magic css property. Bonus : do you have an equivalent for IE8 ?

http://stackoverflow.com/comment/44378732
has text: Hey thanks so much again! Incorporated your input and edited code above. Also added another line in `views/projects/show.js.erb` to render the likes count and realized I was missing `@ ` in `project` in the `controllers/likes_controller.rb`. Working great now, thanks again for your help!!!
type: AnswerComment
score: 1
comment on: http://stackoverflow.com/a/27972800
type: Comment

http://stackoverflow.com/q/28103054
has answer: http://stackoverflow.com/a/28110025
has body: It appears that Chrome is not deleting session cookies, (see this question) this includes the ones set by IIS for session handling. When I look at the cookie store for my page I see a large number of old these ASP session id cookies. When I process a log out would it be a good idea use JavaScript to remove these from the browser? Can I please ask that when answering that you provide reasoning so that other readers can understand why you are for or against?
has title: Should I clean up session cookies on logout?
type: UnansweredQuestion
tagged with: session-cookies
upvote count: 1
tagged with: google-chrome
score: 1
type: Question
tagged with: asp-classic
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/10617954

http://stackoverflow.com/q/28037732
has title: How to set height of a div element to same as another div
favorite count: 0
has answer: http://stackoverflow.com/a/28037866
has answer: http://stackoverflow.com/a/28037791
tagged with: css
answer count: 4
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1056212
score: 1
has comment: http://stackoverflow.com/comment/44459785
upvote count: 1
has answer: http://stackoverflow.com/a/66957580
type: Question
has answer: http://stackoverflow.com/a/28038714
accepted answer: http://stackoverflow.com/a/28037866
has body: I have two div elements same as the image bellow. Div 1 : It show contents from server, so can not know the height Div 2 : It's height should be same as the height of div 1. I have no experience in HTML (CSS), so I dont know how to do this. Please help me in this case. Thank a lot.
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28038714
tagged with: http://stackoverflow.com/tag/html
downvote count: 0

http://stackoverflow.com/comment/44449493
comment on: http://stackoverflow.com/q/28031579
score: 0
type: Comment
type: QuestionComment
has text: "but something is wrong..." what is wrong/not working?

http://stackoverflow.com/q/28058702
has comment: http://stackoverflow.com/comment/44505730
type: AnsweredQuestion
score: 0
has title: AngularJS : how to create DOM and bind to a model based on arbitrary hierarchical data
tagged with: angularjs-scope
type: Question
tagged with: angularjs-directive
answer count: 2
has comment: http://stackoverflow.com/comment/44505570
accepted answer: http://stackoverflow.com/a/28063373
has body: Angularjs: complex directive in ng-repeat, how to bind the ngModel or ngChecked in directive and make it work? given the array: +----+-----------+----------+----------+-------+ | id | name | parentid | haschild | value | +----+-----------+----------+----------+-------+ | 1 | parent | null | false | true | | 2 | id1 child | 1 | true | true | | 3 | id2 child | 2 | true | true | | 4 | id3 child | 3 | false | true | | 5 | id1 child | 1 | true | true | | 6 | id5 child | 5 | false | true | +----+-----------+----------+----------+-------+ $scope.permission = [ {"id":1,"name":"parent","value":true,"parentid":"","haschild":false}, {"id":2,"name":"id-1 child","value":true,"parentid":1,"haschild":true}, {"id":3,"name":"id-2 child","value":true,"parentid":2,"haschild":true}, {"id":4,"name":"id-3 child","value":true,"parentid":3,"haschild":false}, {"id":5,"name":"id-1 child","value":true,"parentid":1,"haschild":true}, {"id":6,"name":"id-5 child","value":true,"parentid":5,"haschild":false} ]; so in html and the directive myApp.directive('hasChild', function($compile) { return function(scope, element, attrs) { var j = JSON.parse(attrs.hasChild); function generatePermissionDom(thisElement,thisParent) { angular.forEach(scope.permission,function(o,i){ if(thisParent.id==o.parentid) { var e = $(' '+o.name+' '); generatePermissionDom(e,o); $(thisElement).append(e); } }); } if(j.haschild) angular.forEach(scope.permission,function(o,i){ if(o.parentid==j.id) { var e = $(' '+o.name+' '); if(o.haschild) generatePermissionDom(e,o); $(element).append(e); } }); var p = $(element); $compile(element.contents())(scope); } }); So how to bind the model value in the directive? here is the plunker http://plnkr.co/edit/QYqfEVaQF8WmUvB1aHB6?p=preview additional info: the haschild represent the the parent has child element for example: 1.people A own multiple company, so the people A has child 2.then one of the company has multiple employee, then that company has child. so in my directive, if this elemen…
tagged with: javascript
possible better answer: http://stackoverflow.com/a/38158159
has answer: http://stackoverflow.com/a/38158159
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/44502190
tagged with: angularjs
has answer: http://stackoverflow.com/a/28063373

http://stackoverflow.com/comment/44356111
type: AnswerComment
comment on: http://stackoverflow.com/a/27982334
type: Comment
has text: Please verify whether the application user has access to the system processess.
score: 0

http://stackoverflow.com/a/28014318
type: Answer
score: 2
has body: You spring method consumes application/json and the error message says that what you're sending is not a valid JSON. Following that line, I believe that your issue is a $.extend(addParam), when set with a single argument it will extend a jQuery namespace with the object, and won't return any JSON object to be stringified (and nothing being sent to the server). The possible solution is either removing the extend function, or adding another parameter in which case a valid JSON object will be returned, e.g. function sendData() { var addParam = createAddParam(); $.ajax({ url : "/GradleSpringMVC/inventory/add", type : 'GET', dataType : 'json', data : JSON.stringify(addParam), contentType : 'application/json', mimeType : 'application/json' }).done(function(data) { // temGrid.addJSONData(data); }).fail(function(error) { // parseToPageAlerts(error.responseText); }).always(function() { // hideLoading() });}
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/28013769

http://stackoverflow.com/comment/44581487
comment on: http://stackoverflow.com/a/28045512
type: AnswerComment
score: 0
type: Comment
has text: Perfect solution for my problem as well!

http://stackoverflow.com/comment/44539915
comment on: http://stackoverflow.com/q/28080546
has text: Okay. I will do that.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44573731
type: QuestionComment
has text: Even though the library is included, I imagine that it doesn't include a shiv for `document.createElement('canvas');`. Try putting together the element in html instead of trying to create it with javascript and see if it works.
score: 1
comment on: http://stackoverflow.com/q/28098789
type: Comment

http://stackoverflow.com/q/28036945
tagged with: coffeescript
tagged with: dependency-injection
has title: Isn't Inline Array Annotation DI compatible with $routeProvider in AngularJS?
has body: My codes looks like this angular .module('main', ['ngRoute']) .config(['$routeProvider', ($routeProvider) -&gt; $routeProvider .when '/', templateUrl: 'homePage/homePage.html' controller: 'MainCtrl' ]) angular.module('main').controller('MainCtrl', ['$scope' , ($scope) -&gt; $scope.test = {}]) The browser will compain Error: [ng:areq] Argument 'MainCtrl' is not a function, got Object. But if I don't use the inline array dependency injection in MainCtrl and rewrite it like this: angular.module('main').controller('MainCtrl', ($scope) -&gt; $scope.test = {}) Then everything works well. Does anyone have ideas about this? Thanks!
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28036969
type: AnsweredQuestion
tagged with: angularjs
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/28036969
score: 0

http://stackoverflow.com/q/28028135
tagged with: javascript
tagged with: ckeditor
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/15659390
has body: Ckeditor automatically stripping classes/styles/tags when I add the source code of this page into the editor: view-source:http://islandworkshop.myinstapage.com/ ... which results in bad page structure. But when I enter the same source code in Jsbin.com's HTML window then it works like a charm. I thought Ckeditor is behaving like this because of its "Advanced Content Filter". So I tried “allowedContent: true” and "config.extraAllowedContent = '();{}';" but for no luck :( According to CKEditor: "Ckeditor uses advanced W3C DTD controls to ensure that HTML is properly generated. Users will not enter broken code so your pages will easily validate." Well, I don't think I'm entering broken codes but still pages are not loading properly. Please help.
type: Question
has title: Ckeditor | Page source code is not loading properly
score: 0
has comment: http://stackoverflow.com/comment/44441711
answer count: 1
has answer: http://stackoverflow.com/a/28028270
has comment: http://stackoverflow.com/comment/44441580

http://stackoverflow.com/comment/44460564
comment on: http://stackoverflow.com/q/28038168
type: Comment
has text: In your json, the numbers should really be float/int instead of string? It would be best to change it at the server. Is that an option?
score: 0
type: QuestionComment

http://stackoverflow.com/a/28066825
has comment: http://stackoverflow.com/comment/55205721
answers question: http://stackoverflow.com/q/28066429
downvote count: 1
score: 38
has comment: http://stackoverflow.com/comment/55209581
type: Answer
has comment: http://stackoverflow.com/comment/136513193
has comment: http://stackoverflow.com/comment/132877922
has comment: http://stackoverflow.com/comment/132876928
has comment: http://stackoverflow.com/comment/79652608
has body: Yes, the values in results are in the same order as the promises. One might cite the ES6 spec on Promise.all, though it's a bit convoluted due to the used iterator api and generic promise constructor. However, you'll notice that each resolver callback has an index attribute which is created in the promise-array iteration and used for setting the values on the result array.
upvote count: 39
has comment: http://stackoverflow.com/comment/132868995

http://stackoverflow.com/comment/44363091
has text: I did not whitelist myFirebase. I'lll try that, thx!
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27985729

http://stackoverflow.com/comment/44566499
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28095238
has text: Check out ng-pattern instead. https://docs.angularjs.org/api/ng/directive/input

http://stackoverflow.com/q/28073394
has comment: http://stackoverflow.com/comment/44548403
has answer: http://stackoverflow.com/a/29968805
type: AnsweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/45415019
type: Question
has body: Right now we're using a Javascript API to pull our JBPM user forms from the back-end and place them in an iframe which is sitting on our custom front-end. What we'd like to do is pull data from one of our database servers and display it in a suggestion field on our front end (when someone starts typing an id, suggestions are displayed in the field). So the idea is that when someone selects an id this field will populate the underlying jbpm form with the appropriate data from the sql query. Problem is: How to get at the jbpm form (field id's seem to be dynamic) Anyone know of a potential solution to the specific or general problem?
has comment: http://stackoverflow.com/comment/44559099
score: 0
has comment: http://stackoverflow.com/comment/45438330
answer count: 1
tagged with: javascript
has title: JBPM - Populate form on front-end with data structure from database
accepted answer: http://stackoverflow.com/a/29968805
tagged with: jbpm

http://stackoverflow.com/q/27996951
type: AnsweredQuestion
has body: This is my markup: &lt;asp:UpdatePanel ID="updPnl" runat="server" UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;asp:TextBox runat="server" ID="txtEmail" AutoPostBack="true" OnTextChanged="txtEmail_TextChanged" /&gt; &lt;asp:Panel runat="server" Visible="false" ID="pnl"&gt; &lt;asp:TextBox runat="server" ID="txtUname" AutoPostBack="true" OnTextChanged="txtUname_TextChanged" /&gt; &lt;/asp:Panel&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; and this is the code behind: and these are the event handlers in the code behind: protected void txtEmail_TextChanged(object sender, EventArgs e) { pnl.Visible = true; updPnl.Update(); txtUname.Focus(); } protected void txtUname_TextChanged(object sender, EventArgs e) { } If I press enter on txtEmail textbox it works fine in all browsers and the focus comes to txtUName textbox except Chrome. On debugging I found that is happening because Chrome makes Ajax request twice. Is there anyway to fix this Chrome bug? Note that it works fine in Chrome too if I use Tab instead of enter. However, I need to fix this Chrome bug of Enter too.
tagged with: asp.net
type: Question
has answer: http://stackoverflow.com/a/27997083
answer count: 1
score: 0
accepted answer: http://stackoverflow.com/a/27997083
tagged with: google-chrome
has title: Chrome bug asp.net updatepanel posts twice
tagged with: c#
tagged with: javascript

http://stackoverflow.com/a/28034018
type: Answer
answers question: http://stackoverflow.com/q/28033458
has comment: http://stackoverflow.com/comment/44454090
upvote count: 2
has comment: http://stackoverflow.com/comment/44454343
downvote count: 1
has comment: http://stackoverflow.com/comment/44454310
has comment: http://stackoverflow.com/comment/44454226
score: 1
has comment: http://stackoverflow.com/comment/44454305
has comment: http://stackoverflow.com/comment/44454322
has body: Inspired by Naomik, the code will fail when the parent_ids aren't in the correct position. Added a sorting function that will set them in the correct order. obj = [ {id: 2, parent_id: 1, title: "Row 2"}, {id: 3, parent_id: 2, title: "Row 3"}, {id: 4, parent_id: 2, title: "Row 4"}, {id: 1, parent_id: null, title: "Row 1"} ] obj.sort(function(a, b){ return (a.parent_id == null ? 0 : a.parent_id) - (b.parent_id == null ? 0 : b.parent_id); }); var tree = document.getElementById("tree"); for (var i = 0; i &lt; obj.length; ++i) { if (obj[i].parent_id == null) { createTreeElement("li", obj[i].id, obj[i].title, tree); } else { var treeChildNode = document.getElementById("t" + obj[i].parent_id).getElementsByTagName("ul"); if (treeChildNode.length) { createTreeElement("li", obj[i].id, obj[i].title, treeChildNode[0]); } else { createTreeElement("ul", obj[i].parentId, "", document.getElementById("t" + obj[i].parent_id)); createTreeElement("li", obj[i].id, obj[i].title, document.getElementById("t" + obj[i].parent_id).getElementsByTagName("ul")[0]); } } } function createTreeElement(name, id, text, parent) { var node = document.createElement(name); node.id = "t" + id; node.innerHTML = text; parent.appendChild(node); } &lt;ul id="tree"&gt; &lt;/ul&gt; This code is just a prove of concept in HTML to @Daniel Weiners answer why recursion isn't needed here based upon the object model.
has comment: http://stackoverflow.com/comment/44454827
has comment: http://stackoverflow.com/comment/44454280
has comment: http://stackoverflow.com/comment/44453237

http://stackoverflow.com/q/27968798
has comment: http://stackoverflow.com/comment/44333328
has answer: http://stackoverflow.com/a/27970365
has title: Using javascript from an ASP.NET textbox
accepted answer: http://stackoverflow.com/a/27970691
upvote count: 1
downvote count: 1
has body: I am currently making an ASP.Net page as a part of a project; While making the main registration/Login page validators (Labels that change their visibility on javascript and trigger on the OnChange event of their recpective textboxes), I faced a problem. Allthough it worked perfectly fine in our computer labs (which means the javascript code itself is probably correct), the validators do not work at all - regardless of the input. Any idea why would it possibly happen? Thank you! Javascript: function isUserValid() { var UserLength = document.getElementById("UserTB").value.length; var ValidatorLabel = document.getElementById("ValidateUser"); if (UserLength &lt; 6 || UserLength &gt; 15) { ValidatorLabel.style.display = 'inline'; return false; } else { ValidatorLabel.style.display = 'none'; return true; } } function isPassValid() { var PassLength = document.getElementById("PasswordTB").value.length; var ValidatorLabel = document.getElementById("ValidatePassword"); if (PassLength &lt; 6 || PassLength &gt; 15) { ValidatorLabel.style.display = 'inline'; return false; } else { ValidatorLabel.style.display = 'none'; return true; } } function isConfirmValid() { var Password = document.getElementById("PasswordTB").value; var Me = document.getElementById("ConfirmTB").value; var ValidatorLabel = document.getElementById("ValidateConfirm"); if (Password == Me) { ValidatorLabel.style.display = 'none'; return true; } else { ValidatorLabel.style.display = 'inline'; return false; } } function isEmailValid() { var str = document.getElementById("EmailTB").value; var lastAtPos = str.lastIndexOf('@'); var lastDotPos = str.lastIndexOf('.'); var isFine = (lastAtPos &lt; lastDotPos &amp;&amp; lastAtPos &gt; 0 &amp;&amp; str.indexOf('@@') == -1 &amp;&amp; lastDotPos &gt; 2 &amp;&amp; (str.length - lastDotPos) &gt; 2); var ValidationLabel=document.getElementById("ValidateEmail"); if(isFine) { ValidationLabel.style.display='none'; return true; } else { ValidationLabel.style.display='inline'; re…
possible better answer: http://stackoverflow.com/a/27970365
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44332470
has answer: http://stackoverflow.com/a/28000071
has comment: http://stackoverflow.com/comment/44331498
answer count: 3
tagged with: validation
has answer: http://stackoverflow.com/a/27970691
tagged with: javascript
tagged with: textbox
tagged with: asp.net
favorite count: 0
score: 0

http://stackoverflow.com/comment/44535003
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28073659
has text: Here is my sample code: <div class="uploadbox"

http://stackoverflow.com/comment/44339249
type: Comment
type: QuestionComment
score: 1
has text: The block of code in the `keydown` event is passing a single parameter to the `openDetail` function, which will be being used as the `event` argument within the function - none of the others are specified as they are in the hardwired `onclick` handler
comment on: http://stackoverflow.com/q/27973213

http://stackoverflow.com/comment/44438855
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28026656
type: AnswerComment
has text: Gah! This "problem" has caused me a lot of troubleshooting and realizing that I caused it myself is so annoying! Blinded by my own code... Of course it should be as you've shown above. Thanks a lot!

http://stackoverflow.com/q/28073419
answer count: 1
downvote count: 1
has title: How to get the API request response via AJAX
has comment: http://stackoverflow.com/comment/44526214
tagged with: javascript
type: AnsweredQuestion
tagged with: flickr
has body: I'm trying to get the API response of Flickr via Ajax in my application. I'm using Laravel. I have a specific Route and a function to make the API calls. //Route.php Route::post('/getlocation/{latitude}/{longitude}', ['as'=&gt;'get-location', 'uses'=&gt;'FormController@getLocationImage']); and the function //getLocationImage() //GET THE IMAGES BASED ON THE LOCATION FROM FLICKR. $api_key = 'my_api_key_is_here'; $tag = 'night,sunset,sunrise,park,people,summer,tree,flowers'; $lat = '&amp;lat='.$latitude; $lon = '&amp;lon='.$longitude; $perPage = 12; $url = 'https://api.flickr.com/services/rest/?method=flickr.photos.search'; $url.= '&amp;api_key='.$api_key; $url.= '&amp;tags='.$tag; $url.= $lat; $url.= $lon; $url.= '&amp;per_page='.$perPage; $url.= '&amp;format=json'; $url.= '&amp;nojsoncallback=1'; $response = json_decode(file_get_contents($url)); $photo_array = $response-&gt;photos-&gt;photo; return Response::json(["success"=&gt;"true", "photo_array"=&gt;$photo_array]); Now In a jquery function, I'm calling the Ajax. $("#nomination-name").focus(function(){ $.post( '/getlocation/'+$("#newLatitude").val()+"/"+$("#newLongitude").val(), // location of your php script { user: "bob", id: 1234 }, // any data you want to send to the script function( data ){ // a function to deal with the returned information alert(data); }); }); But when I try to alert the data, it just shows [object Object] How can I get the response back in the Ajax call? Output from the console is given below. Object photo_array: Array[12] 0: Objectfarm: 8 id: "16325992992" isfamily: 0 isfriend: 0 ispublic: 1 owner: "35736862@N03" secret: "b7044c5b46" server: "7548" title: "#snow #trees #winter #parcangrignon #montreal #livemontreal #themainmtl #mtlblog #vscocam" __proto__: Object 1: Object ..............
upvote count: 0
has comment: http://stackoverflow.com/comment/44526533
tagged with: jquery
has comment: http://stackoverflow.com/comment/44526311
has comment: http://stackoverflow.com/comment/44526501
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/44526409
has comment: http://stackoverflow.com/comment/44526191
type: Question
has comment: http://stackoverflow.com/comment/44526259
has answer: http://stackoverflow.com/a/28073866
tagged with: php
has comment: http://stackoverflow.com/comment/44526175
score: -1
has comment: http://stackoverflow.com/comment/44526480
has comment: http://stackoverflow.com/comment/44526575
accepted answer: http://stackoverflow.com/a/28073866
has comment: http://stackoverflow.com/comment/44527409

http://stackoverflow.com/q/27987452
type: Question
has answer: http://stackoverflow.com/a/27987660
accepted answer: http://stackoverflow.com/a/27987660
tagged with: javascript
score: 0
answer count: 1
has title: CSS isn't formatting ActionLinks
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has body: I have a shared layout with ActionLinks for getting between pages. I have a project that I worked on before just for fun and was trying to recreate the formatting effect that I used on my navigation menu in that project because I really like the way it looked and it was a responsive menu. For some reason I can't get the links to format with the CSS. Here is the shared layout: &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;title&gt;Onboarding Practice&lt;/title&gt; @Styles.Render("~/Content/Site.css") @Scripts.Render("~/bundles/modernizr") &lt;script src="@Url.Content("~/Scripts/knockout-2.1.0.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="@Url.Content("~/Scripts/jquery-1.7.1.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="@Url.Content("~/Scripts/responsivemobilemenu.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;link href='http://fonts.googleapis.com/css?family=Josefin+Slab:400,700' rel='stylesheet' type='text/css'&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="box-effect"&gt; &lt;div class="web-header"&gt; PrimeRCM Onboarding App &lt;/div&gt; &lt;div class="rmm"&gt; &lt;ul&gt; &lt;li&gt;@Html.ActionLink("Home", "Index", "Home")&lt;/li&gt; &lt;li&gt;@Html.ActionLink("Patients", "Patients", "Patients")&lt;/li&gt; &lt;li&gt;@Html.ActionLink("Practices", "Practices", "Practices")&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="body-content"&gt; @RenderSection("featured", required: false) &lt;section class="content-wrapper clear-fix"&gt; @RenderBody() &lt;/section&gt; &lt;/div&gt; @Scripts.Render("~/bundles/jquery") @RenderSection("scripts", required: false) &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; Navigation Menu CSS for ActionLinks /********Navigation Menu********/ /*#region*/ .rmm { display:block; position:relative; width:100%; padding:0px; margin:0 auto !important; text-align: center; line-height:19px !import…

http://stackoverflow.com/q/28107034
has comment: http://stackoverflow.com/comment/44589590
has answer: http://stackoverflow.com/a/28108562
tagged with: javascript
has comment: http://stackoverflow.com/comment/44589577
possible better answer: http://stackoverflow.com/a/28108231
score: 0
has answer: http://stackoverflow.com/a/28108231
answer count: 3
accepted answer: http://stackoverflow.com/a/28108461
has comment: http://stackoverflow.com/comment/44590175
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44589360
tagged with: php
has comment: http://stackoverflow.com/comment/44589142
type: AnsweredQuestion
has body: I'm trying to make a page redirect to the relevant page dependent on two select choices. I'm unsure whether this would be best done with Javascript or PHP as I want to be able to change the pages easily- which makes me think some kind of PHP form handler would be best. JSFiddle Any examples of how this could work would be greatly appreciated. I've made a JSFiddle to help. If I haven't been specific enough, I'm trying to get the page redirected to a certain page if someone selects "Engineering" and then "New South Wales", and somewhere else if they select "Health" and then "New South Wales" etc. Thanks in advance.
has title: Page to redirect dependent on multiple 'select' choices
type: Question
has answer: http://stackoverflow.com/a/28108461

http://stackoverflow.com/comment/44450309
score: 0
has text: You have defined PairTextbox instead of PairTextBox, check: http://jsfiddle.net/up1f1wjx/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28032734

http://stackoverflow.com/a/28427717
type: Answer
score: 0
answers question: http://stackoverflow.com/q/28045680
has body: Every directive lives within a scope. I had a similar case where I wrote a common pager directive that pulls its details from the Controller scope. My templates are externalized, but this does not affect the functionality. Directive usage: Directive definition: angular.module.directive('tablePager', function() { return { restrict: 'E', replace: true, templateUrl: 'templates/table-pager.html' }; }) Controller: angular.module.controller('TableController', function($scope, $log, $location) { $scope.query = {}; $scope.limit = 20; $scope.offset = 0; $scope.currentPage = 0; $scope.total = 0; ... } Template code of templates/table-pager.html (snippet): {{total}} Entries found ... You can read more about AngularJS custom directives at http://tutorials.jenkov.com/angularjs/custom-directives.html HTH

http://stackoverflow.com/comment/44407563
type: AnswerComment
has text: @I_Debug_Everything `node` will use your `bind` method for `console.log`
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28009631

http://stackoverflow.com/comment/44522266
has text: I understood what you are trying to do. I suppose it would be helpful to match based on property and not object equality. But this is the way Angular works right now (with ` `) and my guess is that `ui-select` mimicked this behavior - so, I'm not sure if they PR would be accepted. If this works for you, that's fine, but like I said, I don't understand why the current-Angular-way would not work, even if you had 45k records. There is no need to retrieve them all.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28069222
type: Comment

http://stackoverflow.com/a/27986694
type: Answer
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27986630
has body: add -webkit-backface-visibility: hidden; backface-visibility: hidden; to the animated elements.

http://stackoverflow.com/q/28050907
has comment: http://stackoverflow.com/comment/44483823
type: Question
has comment: http://stackoverflow.com/comment/44486558
has comment: http://stackoverflow.com/comment/44485592
tagged with: javascript
has comment: http://stackoverflow.com/comment/44483833
has body: Well i'm using the responsive plugin ResponsiveSlides.js and it was working properly but after this new firefox update, some problems with PNG Transparent on fade comes, someone knows if that could be a bug or not? very strange, i make some tests like putting a background-color these PNG pics then it works fine, it sound like the old IE problems with PNG on fade ... but idk. Live example: http://www.arquitet.us/homologacao/
score: 0
tagged with: jquery
has title: Firefox 35.0 and strange bug with fade on png transparent
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44485422
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44484195
has comment: http://stackoverflow.com/comment/44486272
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/44486173

http://stackoverflow.com/comment/44405028
type: Comment
type: QuestionComment
has text: Yes you can, bot don't - (i) it's hard to code, (ii) it doesn't make for a friendly UI, (iii) to access the data, you have to parse out the input string - disadvantages all round.
comment on: http://stackoverflow.com/q/28008474
score: 0

http://stackoverflow.com/comment/44513992
has text: Also replace document.body.scrollLeft/Top with jQuery: http://jsfiddle.net/whw4h421/5/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28065493
type: Comment

http://stackoverflow.com/comment/44558890
type: Comment
has text: @WilfredoP Question is tagged jQuery too, although this answer would be better if it explained why the current code doesn't work instead of suggesting alternative code without explanation.
type: AnswerComment
comment on: http://stackoverflow.com/a/28091111
score: 0

http://stackoverflow.com/comment/44480866
comment on: http://stackoverflow.com/a/28049415
score: 0
type: Comment
has text: Please correct me if I'm wrong, but it seems like the parent controller is setting the person object here. What I am looking for is to get the person object from the directive into the parent controller. Is this still valid?
type: AnswerComment

http://stackoverflow.com/comment/44422689
comment on: http://stackoverflow.com/a/28017777
has text: i tried this one and it is almost right. i forgot to mention that i have radio button. part of that "23 checkboxes" are 3 radio buttons. that when one radio button is clicked, it will add to the grand total. in your code, what happens is, it keeps on adding the radio button.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28008063
type: UnansweredQuestion
has body: I'm trying to write a small scraper with casper, but I'm not able to get the evaluate function work. This is my code, var casper = require('casper').create({ clientScripts: ["bower_components/jquery/src/jquery.js"], verbose: true, logLevel: 'info' }); casper.start('http://stackoverflow.com', function afterStart() { this.echo(this.getTitle()); if (this.exists(".js-headword")) { //This gets executed this.echo("Meh!") } //If this is enabled the above code doesn't work. // this.echo(this.fetchText(".js-headword")) }); casper.then(function evalPage(){ this.evaluate(function(){ //This does not. console.log("Evaluating title"); }) }) casper.run(); and this is my casper log [info] [phantom] Starting... [info] [phantom] Running suite: 3 steps [info] [phantom] Step afterStart 2/3 http://stackoverflow.com/ (HTTP 200) Stack Overflow Meh! [info] [phantom] Step afterStart 2/3: done in 5960ms. [info] [phantom] Step evalPage 3/3 http://stackoverflow.com/ (HTTP 200) [info] [phantom] Step evalPage 3/3: done in 5982ms. [info] [phantom] Done 3 steps in 6002ms The code hits the evalPage function, but it does not run the evaluate method. The console.log is never reached. I'm following the documentation and completely clueless why this is not working. I'm running casper 1.1 beta 3 on OSX10.10. EDIT 1 : I'm trying to perform some DOM manipulation inside evaluate(). For instance, if the page has an h1 tag, I need to get the text inside the h1 tag. this.evaluate(function(){ //This does NOT work console.log(document.querySelector("h1").textContent) }) The console.log is an oversimplified version of what I'm trying to do. My understanding about the evaluate method is it's in the current page context and I can perform and DOM manipulation in that. But I've not been able to achieve this. reference : http://casperjs.readthedocs.org/en/latest/modules/casper.html#evaluate
tagged with: casperjs
has comment: http://stackoverflow.com/comment/44412932
answer count: 0
upvote count: 1
type: Question
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/44411593
has comment: http://stackoverflow.com/comment/44411917
has comment: http://stackoverflow.com/comment/44411252
score: 1
has comment: http://stackoverflow.com/comment/44411906
has title: console.log is not printed inside of casper.evaluate
has comment: http://stackoverflow.com/comment/44411814
downvote count: 0
has comment: http://stackoverflow.com/comment/44411478
tagged with: javascript
has comment: http://stackoverflow.com/comment/44411445
favorite count: 0

http://stackoverflow.com/q/28076976
possible better answer: http://stackoverflow.com/a/28077147
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 1
tagged with: loops
upvote count: 1
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/28076998
has title: Why isn't my JS code displaying the message to the HTML page?
downvote count: 0
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/28077147
accepted answer: http://stackoverflow.com/a/28076998
favorite count: 0
has body: Thanks for viewing my question! I'm a Javascript newbie and I'm learning about retrieving user input values from HTML forms, and I can't figure out why my messages aren't displaying on the page. When I run the code in the browser, the error console tells me that there's a problem on line 16 of the .js file, where the .firstChild.nodeValue is returning null. Where can I fix the problem with the inheritance and receiving the value from the form? By the way, I'm interested in keeping with the firstChild.nodeValue method instead of the .innerHTML method. :) Here is the code in my HTML file: &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;script type="text/javascript" src="X_3_1.js"&gt;&lt;/script&gt; &lt;title&gt;Exercise 3-1 HTML&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Exercise 3-1&lt;/h1&gt; &lt;form id="user_input" name="user_input" method="get"&gt; &lt;p&gt; &lt;label for="first_name"&gt;Enter First Name:&lt;/label&gt; &lt;input type="text" id="first_name"&gt; &lt;/p&gt; &lt;p&gt; &lt;label for="children"&gt;Do you have children? :&lt;/label&gt; &lt;input type="text" id="children"&gt; &lt;/p&gt; &lt;p&gt; &lt;label for="age"&gt;If so, how old is your oldest child? :&lt;/label&gt; &lt;input type="text" id="age"&gt; &lt;/p&gt; &lt;p&gt; &lt;input type="button" value="Submit Information" onClick="processInfo()"&gt;&lt;br&gt; &lt;/p&gt; &lt;span id="message"&gt;&lt;/span&gt; &lt;label&gt;&amp;nbsp;&lt;/label&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; Here is the code in my Javascript file: function processInfo() { var firstName = document.getElementById("first_name").value; var children = document.getElementById("children").value.toUpperCase(); var result = children.substring(0, 1); var age = parseInt(document.getElementById("age").value); var today = new Date(); if (result === "Y" || children === "YES") { if (age &lt;= 19) { document.getElementById("message").firstChild.nodeValue = "&lt;p&gt;You still have kids a…

http://stackoverflow.com/a/28059024
has comment: http://stackoverflow.com/comment/44707156
has body: If you have just simple button, that removes an row from the table, for example: some info Remove Yes you need jQuery listener for click event on that button. For example: // This could easily be a call to .click() $('.remove-row').on('click', function() { var idToRemove = $(this).parent().attr('id'); $.ajax({ method: "POST", data: { 'action': 'remove', 'id': idToRemove }, success: function(response) { // here you can check if the element is removed from the server // based on the response that the server returns. // And if it is, you can remove it from the dom. $('#' + idToRemove).remove(); }, error: function(error) { // Here you can show an user message, "Sorry cannot remove element." } //... }); }); All you need to realize is that, this is async programming and you just defining callbacks. When the server has done the work and the response is received, the callback is called. So you can reload the table, based on user interact or interval of time. I recommend: Do not send HTML to the server, just send some json data, Same for the server - Do not respond with HTML or hardly to escape symbols, just respond with a string 'done' or json {"removed": "someID"}. HTML parsers on different languages are different, you need escaping for the HTML, You will have problems with JSON parsers if you sending json data with HTML inside. So just send JSON with information what exactly you request is trying to do? which element you trying to read/create/update/delete? If you create/update/delete some item from the DB / Server which item has an ID, everytime return the ID back from the server to the client. Most of times it's better to handle exactly what item you are removed. Read about CRUD operations.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/44698464
accepted answer of: http://stackoverflow.com/q/28058780
has comment: http://stackoverflow.com/comment/44499642
has comment: http://stackoverflow.com/comment/44499566
answers question: http://stackoverflow.com/q/28058780
has comment: http://stackoverflow.com/comment/44738714
has comment: http://stackoverflow.com/comment/44517859
has comment: http://stackoverflow.com/comment/44509661
type: AcceptedAnswer

csrf
tags question: http://stackoverflow.com/q/28100537
tag name: csrf
type: Tag

http://stackoverflow.com/comment/44334672
has text: In many cases, I would agree. But for this example, compare how it would be done with a `for` loop to my answer below that uses `reduce`. Is the latter really that much less concerned with irrelevant bookkeeping?
comment on: http://stackoverflow.com/q/27970207
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/28088054
has comment: http://stackoverflow.com/comment/44553210
type: AnsweredQuestion
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/44553078
type: Question
has comment: http://stackoverflow.com/comment/44555052
has body: I have the following script used in html.twig page: My question is: How can I select "my_date" in jquery ? I wrote this, but it doesn't work: $('#my_date').datepicker(); Thanks for your help,
has answer: http://stackoverflow.com/a/28089221
has comment: http://stackoverflow.com/comment/44553044
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/44553108
tagged with: prototype
answer count: 2
has comment: http://stackoverflow.com/comment/44553107
has comment: http://stackoverflow.com/comment/44553012
has comment: http://stackoverflow.com/comment/44553232
possible better answer: http://stackoverflow.com/a/28088286
has comment: http://stackoverflow.com/comment/44553161
has answer: http://stackoverflow.com/a/28088286
favorite count: 0
accepted answer: http://stackoverflow.com/a/28089221
has title: JQuery select on elements
has comment: http://stackoverflow.com/comment/44552957
has comment: http://stackoverflow.com/comment/44553261

http://stackoverflow.com/comment/103364002
type: Comment
comment on: http://stackoverflow.com/a/47337711
score: 2
type: AnswerComment
has text: THis was the right answer for me. I needed to know if the event was added to stop it from being added again. By making it a named function the rule above applies and the listener is not added.

http://stackoverflow.com/a/28106005
has body: Use this javascript: $(document).ready(function(){ var elementPosition = $('.menu').offset(); $(window).scroll(function(){ if($(window).scrollTop() &gt; elementPosition.top){ $('.menu').css('position','fixed').css('top','0'); $('.menu').css('width','100%'); $('.menu').css('z-index','500'); } else { $('.menu').css('position','static'); } }); }); Well, this code is working on my menubar, even if screen size is different .
answers question: http://stackoverflow.com/q/28105539
has comment: http://stackoverflow.com/comment/44661153
has comment: http://stackoverflow.com/comment/44589196
has comment: http://stackoverflow.com/comment/44587684
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/44586682

http://stackoverflow.com/a/28105866
answers question: http://stackoverflow.com/q/28095985
has body: The hosting at www.evennode.com uses Phusion Passenger to run Node.js apps which in turn uses inverse port binding (as mentioned e.g. here by the author) which makes this example not work when hosted by evennode.com. There's a way though to make it work even with "inverse port binding" in place. You first need to create an http server and then pass it to the ws constructor. A simplified example below: var server = require('http').createServer(); var WebSocketServer = require('ws').Server; var wss = new WebSocketServer({server: server}, function(){}); server.listen(3000); wss.on('connection', function(socket) { ... }); Hope this helps solve the issue. Btw. there's also an example with Socket.io if anyone is interested.
accepted answer of: http://stackoverflow.com/q/28095985
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/comment/44433923
score: 0
comment on: http://stackoverflow.com/q/28008608
type: Comment
type: QuestionComment
has text: WestLangley, please post that as answer so I can accept it! I'm puzzled by why the current position forms part of the arc, it seems like the centre point, start angle, end angle and direction provided to arc() completely define the curve and the current position should be irrelevant?

http://stackoverflow.com/q/27980317
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27980594
has title: submit group of inputs when user clicks out of container
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27980635
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44352276
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I have a form with a wide range of inputs. Each input is sent to the backend via ajax on change. However, I also have a group of inputs to collect an address as follows; &lt;div class="address"&gt; &lt;input class="addrField" maxsize="100" name="street1" placeholder="street 1" size="40" type="text"&gt; &lt;input class="addrField" maxsize="100" name="street2" placeholder="street 2" size="40" type="text"&gt; &lt;input class="addrField" maxsize="100" name="city" placeholder="city" size="40" type="text"&gt; &lt;input class="addrField" maxsize="100" name="postcode" placeholder="postcode" size="40" type="text"&gt; &lt;input class="addrField" maxsize="100" name="country" placeholder="country" size="40" type="text"&gt; &lt;/div&gt; i'm wondering if there is an efficient way to allow the user to edit the address fields and then submit all address inputs, as a group, when the user clicks out of the containing div? I've tried using the change event e.g. $(".address").change(function() { var $inputs = $(this).children('input'); submitInput($inputs); }); however, the change event is fired each time the user changes input fields so I get a number of calls to the backend rather than one. Is there a way to only call submitInput, when the user clicks out of the containing div? FYI, submitInput is as follows: function submitInput(group) { $.ajax({ type: 'post', url: '/urladdress', data: group.serializeArray() }); }; NB. Putting a click event on the document is problematic because it's inefficient but also because it submits the form for every click outside the doc. For my purposes, the form should be submitted once when they have changed the form and then clicked to another part of the page (but not to another address field).

http://stackoverflow.com/comment/44506545
comment on: http://stackoverflow.com/q/28059311
score: 0
type: Comment
type: QuestionComment
has text: from your jsfiddle. i think understand what you are saying the script is wholely evaluated before doing the function?

http://stackoverflow.com/comment/44593775
type: AnswerComment
type: Comment
score: 1
has text: Thanks for your answer, but sadly that does not answer the question. To test it would mean re-factoring the whole script... If I keep a reference, then I *know something* about the audio being played.
comment on: http://stackoverflow.com/a/28109818

http://stackoverflow.com/q/28101428
has answer: http://stackoverflow.com/a/28295510
tagged with: d3.js
has body: These are 4 polygons I have: https://i.sstatic.net/GjmUu.jpg in QGIS. I now wanted to use them with D3.js. I already tried out the things in QGIS generated shapefile malformed when converted to topojson by mapshaper. That was working well on the old json file. But when I was creating a new one, it was bugging in the vertical middle. That's the example http://jsfiddle.net/kwoxer/kpL1uyy2/5/: var projection = d3.geo.projection(function(x, y) { return [x, y];}) .precision(0).scale(1).translate([0, 0]); var path = d3.geo.path().projection(projection); I also tried: var path = d3.geo.path().projection(null); but then the whole map was mirrored in the middle. I think I don't use that system correctly I must assume. The json is fine on mapshaper, too. So do you have some tips, so that I just draw anything I want however big it is and then d3.js is able to draw it as it is. =) Maybe by normalizing lan/lng disabling KBS I really don't know why creating an own map is not straithforward. Edit1: found nearly my issue here https://gis.stackexchange.com/questions/54373/either-geojson-to-topojson-conversion-problem-or-projection-issue-with-d3-js but I got: C:\Program Files\GDAL&gt;ogr2ogr.exe -f "GeoJSON" -s_srs region.prj -t_srs EPSG:432 6 asdas.json region.shp ERROR 4: Failed to create GeoJSON datasource: asdas.json. GeoJSON driver failed to create asdas.json Edit2: already found this interesting answer: https://gis.stackexchange.com/questions/14731/how-do-i-specify-a-crs-for-a-fictional-game-map-in-qgis But I used such a projection like he used, but still failing with d3.js.
tagged with: qgis
linked to: http://stackoverflow.com/q/28075867
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/28295510
type: Question
tagged with: projection
tagged with: javascript
score: 0
has title: Visualising a custom map with QGIS and D3.js is harmed by the projection
answer count: 1

http://stackoverflow.com/q/28058845
type: Question
has comment: http://stackoverflow.com/comment/44502297
tagged with: session
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/44501555
has body: node version v0.10.35; express version v4.11.0; My session is use session-mongoose save mongodb, but at the time: request.session.user = user; request.session.success = "sign in success!"; return response.redirect("/"); http.js:689 throw new Error('Can\'t set headers after they are sent.'); Error: Can't set headers after they are sent. this is my code: router.post("/signin", function (request, response) { var name = request.body.signinname; var pass = request.body.password; if(name == "" || pass == ""){ request.session.error = "name and pass can not be empty!"; return response.redirect("/signin"); } User.get(name, function (error, usermodel) { if(!usermodel){ request.session.error = "user does not exist!"; return response.redirect("/signin"); } if(usermodel.password != pass){ request.session.error = "invalid password!"; return response.redirect("/signin"); } request.session.user = usermodel; request.session.success = "user sign in success!"; response.redirect("/home"); }); }); this is error log: http.js:689 throw new Error('Can\'t set headers after they are sent.'); ^ Error: Can't set headers after they are sent. at ServerResponse.OutgoingMessage.setHeader (http.js:689:11) at ServerResponse.res.setHeader (d:\Develop\web\workspace\melove-timeline\node_modules\connect\lib\patch.js:134:22) at ServerResponse.header (d:\Develop\web\workspace\melove-timeline\node_modules\express\lib\response.js:695:10) at ServerResponse.send (d:\Develop\web\workspace\melove-timeline\node_modules\express\lib\response.js:146:12) at fn (d:\Develop\web\workspace\melove-timeline\node_modules\express\lib\response.js:929:10) at handleTemplate (d:\Develop\web\workspace\melove-timeline\node_modules\ejs\lib\ejs.js:209:18) at d:\Develop\web\workspace\melove-timeline\node_modules\ejs\lib\ejs.js:226:7 at fs.js:271:14 at Object.oncomplete (fs.js:107:15) I discovered through debug， When commenting out this line，This error does not occur： // request.session.user = user; this is my node-modules version: "…
upvote count: 1
has comment: http://stackoverflow.com/comment/44500017
downvote count: 0
favorite count: 0
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44504753
tagged with: node.js
has title: express 4.x session-mongoose Can't set headers after they are sent
score: 1

http://stackoverflow.com/a/27981450
has comment: http://stackoverflow.com/comment/44354403
answers question: http://stackoverflow.com/q/27981330
score: 0
has body: Login Details Edit Save Login ID bisa dipakai salah satu dibawah ini: Email : test@yahoo.com HP : 123123123 Javascript code: function toInput(elem){ var input = $(" ", { val: elem.text(), type: "text" } ); elem.replaceWith(input); input.select(); }
has comment: http://stackoverflow.com/comment/44358715
has comment: http://stackoverflow.com/comment/44354660
type: Answer

http://stackoverflow.com/comment/44581098
comment on: http://stackoverflow.com/a/28086050
score: 0
type: AnswerComment
has text: since i am working in local host. I am unable to share the requested link
type: Comment

http://stackoverflow.com/q/28114319
answer count: 1
has comment: http://stackoverflow.com/comment/44606460
has title: Why doesn't NodeJS execute constructors the way browsers do?
has comment: http://stackoverflow.com/comment/44624125
favorite count: 0
has comment: http://stackoverflow.com/comment/44602846
tagged with: constructor
has comment: http://stackoverflow.com/comment/44603044
has comment: http://stackoverflow.com/comment/44602801
has comment: http://stackoverflow.com/comment/44608037
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44605682
has body: I was playing around with NodeJS and I noticed something strange. I was just exploring the use of constructors through the code below. // We declare the constructor. function Personne(inName) { console.log("go!"); if ('undefined' != typeof inName) { this.name = inName; } } // We declare the object's prototype (that will be used by the constructor). var PersonnePrototype = { name: 'toto', setName: function(inName) { this.name = inName; // "this" refers to the new object being created. }, getName: function() { return this.name; // "this" refers to the new object being created. } }; Personne.prototype = PersonnePrototype; var p = new Personne("Tom"); console.log("p.getName(): " + p.getName()); console.log(p); console.log(Object.getPrototypeOf(p)); First, I expected the code inside the constructor Personne(inName) to be executed while using the operator new. Apparently, this is not the case. Below, I give the output from the execution. $ node loop-closure.js p.getName(): toto { prototype: { name: false, setName: [Function], getName: [Function] } } { name: 'toto', setName: [Function], getName: [Function] } You can see that the constructor is not executed... However, if I execute the same code on Chrome or Firefox, then the constructor is executed! FireFox: "go!" "Given: Tom" "p.getName(): Tom" Object { name: "Tom" } Object { name: "toto", setName: window.onload/PersonnePrototype.setName(inName), getName: window.onload/PersonnePrototype.getName() } Chrome: go! Given: Tom p.getName(): Tom Personne {name: "Tom", setName: function, getName: function} Object {name: "toto", setName: function, getName: function} I thought that NodeJS is the JavaScript interpreter used by Chrome. If this is correct, then why does the interpretation differs between Chrome and NodeJS? UPDATE I saw the comments, and I try that: I just copy/paste the code into a file and call NodeJs on that file. Yes, you are right: it works as expected. Then I found what was causing the problem. I had extra code in…
tagged with: node.js
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/44604743
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44607723
has comment: http://stackoverflow.com/comment/44604953
tagged with: javascript
has comment: http://stackoverflow.com/comment/44603015
tagged with: browser
has comment: http://stackoverflow.com/comment/44602902
has answer: http://stackoverflow.com/a/28125095

http://stackoverflow.com/comment/44520526
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28068230
has text: @mplungjan Yes, that would work, although at that point you might as well have a ` ` ;)

http://stackoverflow.com/comment/44495999
score: 0
type: AnswerComment
type: Comment
has text: It doesn't count as "logging out". You have to call `logOut` to log the user out... I guess technically you could keep the user as an anonymous user (and thus avoid having the user login properly) as long as you don't log out.
comment on: http://stackoverflow.com/a/28056622

http://stackoverflow.com/a/27978469
has body: Use event delegating $("#formItems").on('click', 'label', function(e) { var item = e.target.id; item = item.replace("_", ""); $("#" + item).remove(); e.target.remove(); });
accepted answer of: http://stackoverflow.com/q/27978448
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27978448
type: AcceptedAnswer
upvote count: 1
type: Answer

http://stackoverflow.com/comment/44597808
comment on: http://stackoverflow.com/q/28112044
type: QuestionComment
type: Comment
has text: Ok, so what should I use?
score: 0

http://stackoverflow.com/comment/44569914
has text: m2e: yes, version 1.5.0.20140606-0033, m2e-wtp: yes, version 1.1.0.20140611-1646; finally, yes, project recognized as 'maven'. All this I think can be inferred by one of my opening statements: "my application loads and runs in a web container'. I see that I was not specific enough. The application, built within eclipse, can load and run in a web container. Thanks.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28056700

http://stackoverflow.com/comment/44511533
has text: Just thought about something else. Did you try to write mouseover and mouseout chained? img.mouseover().mouseout()...?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/28065163

source-maps
type: Tag
tag name: source-maps
tags question: http://stackoverflow.com/q/27994252

http://stackoverflow.com/comment/44469243
type: QuestionComment
comment on: http://stackoverflow.com/q/28043104
type: Comment
score: 1
has text: Look at https://github.com/select2/select2/issues/1538

http://stackoverflow.com/comment/58001989
type: Comment
score: 3
has text: in newer version of selected 2 use 'maximumSelectionLength:1'
type: AnswerComment
comment on: http://stackoverflow.com/a/27971287

http://stackoverflow.com/q/28112333
has comment: http://stackoverflow.com/comment/44598416
has answer: http://stackoverflow.com/a/28112657
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has body: I get this javascript error in Chrome's console Unexpected token ] pointing to the middle of raw HTML code, what can it be? Unfortunately I can't post the whole code, but the only javascript present before line 53 is just included unmodified jQuery and jQuery validation plugin. The page executes a bunch of JS code after that line, though. How can I get a JS error in HTML code? edit: After a bit of debugging, I found out the error came from a JSON.parse(), what threw me off is that the error in chrome pointed to HTML code, which gave absolutely no clue.
has title: Javascript unexpected token ] error inside HTML code, how can it be possible?
tagged with: google-chrome
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/28113516
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44598422
score: 0
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/comment/44403676
has text: The reference is always to the prototype... That's why it's called the "prototype chain" and not the "constructor chain". It's not that it has a "reference to the second object in the chain"... It's that the given object always has a reference to the previous object in the chain.
comment on: http://stackoverflow.com/a/28007635
score: 0
type: AnswerComment
type: Comment

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/28025074
tags question: http://stackoverflow.com/q/28056700
tags question: http://stackoverflow.com/q/27965948
type: Tag

http://stackoverflow.com/comment/44379431
type: AnswerComment
score: 0
type: Comment
has text: No I'm not interested in streaming; I just want to have my data variable which is a JSON block as a downloaded file in the browser.
comment on: http://stackoverflow.com/a/27993825

http://stackoverflow.com/q/28007134
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44402507
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28011117
has comment: http://stackoverflow.com/comment/44402544
has title: Form validation error... error displayed, but clicking OK on error box, triggers form submit...
type: Question
has body: I'm trying to add form validation / error messages on my website rental form. I'm not sure what wrong here. When I click submit (if form is blank) the error box does show and say the errors, BUT, once you click OK on this error box, it submits the form and loads the thank you page. The 'return false' in the function doesn't seem to be working. I'm trying to get the error box to close when you click OK, then return to the unsent form to fix / fill in the missing fields. It is a very large form, so I'll just display the key areas for review... Thank you all so much for any assistance! &lt;script type="text/javascript"&gt; function checkforblank() { var errormessage = ""; if (document.getElementById('Full Name').value == "") { errormessage += "Please enter your Full Name \n"; } if (document.getElementById('Address').value == "") { errormessage += "Please enter your Address \n"; } if (document.getElementById('Home Phone').value == "") { errormessage += "Please enter your Home Phone Number \n"; } if (document.getElementById('EventPhone').value == "") { errormessage += "Please enter your Event Phone Number \n"; } if (document.getElementById('Email Address').value == "") { errormessage += "Please enter your Email Address \n"; } if (document.getElementById('Number').value == "") { errormessage += "Please enter your Card Number \n"; } if (document.getElementById('NumberB').value == "") { errormessage += "Please enter your Card Number \n"; } if (document.getElementById('NumberC').value == "") { errormessage += "Please enter your Card Number \n"; } if (document.getElementById('NumberD').value == "") { errormessage += "Please enter your Card Number \n"; } if (document.getElementById('ExpMonth').value == "") { errormessage += "Please enter your Cards Exp Date MMYY \n"; } if (document.getElementById('ExpYear').value == "") { errormessage += "Please enter your Cards Billing Zip \n"; } if (document.getElementById('Accept Rental Agreement').value == "") { errormessage += "Please typ…
accepted answer: http://stackoverflow.com/a/28011117
score: 0
tagged with: validation

http://stackoverflow.com/comment/44548171
comment on: http://stackoverflow.com/q/28085090
has text: I find this plugin pretty good - http://cherne.net/brian/resources/jquery.hoverIntent.html
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44331800
type: QuestionComment
has text: What do you mean with "inherit all"? Don't you know which of them you want to use in your directive?
score: 0
comment on: http://stackoverflow.com/q/27969325
type: Comment

http://stackoverflow.com/a/28019592
score: 0
type: Answer
has body: If cbe_searchcontainer is ID, may be you should change it to #cbe_searchcontainer to make a correct jQuery selection.
answers question: http://stackoverflow.com/q/28018786

http://stackoverflow.com/comment/44471775
has text: I want to ask one more thing is there any way to read the selected content by mouse?
comment on: http://stackoverflow.com/a/28044089
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/28096892
tagged with: php
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/28097028
has body: I am trying to pass user's info from mysql to the webpage, if the user has logged in but can't get it to work. If I put a wrong email or password it will show the error message but if the credentials are ok it would do anything... on php file: $sql = "SELECT * FROM users WHERE email='$l_email' AND password='$l_password'"; $query = mysql_query($sql) or die ('Error: ' . mysql_error()); $num_rows = mysql_num_rows($query); if($num_rows &lt; 1) { echo "You have entered a wrong email or password!"; } else { $memberInfo = array(); while( $row = mysql_fetch_array( $query ) ) { $memberInfo[] = $row; } return $memberInfo; echo json_encode( $memberInfo ); //echo "1"; } on js file: $.post("./includes/checkOut.php",{ l_email1: l_email, l_password1: l_password }, function(data) { if(data=='1') $("#checkOut_form")[0].reset(); $("#login_returnmessage").html(""); $("#memberInfo").hide(""); var memberInfo = jQuery.parseJSON(memberInfo); for( var i in memberInfo ) { var f_name = memberInfo[i].f_name; var l_name = memberInfo[i].l_name; var phone = memberInfo[i].phone; } $("#loggedinInfo").show(""); $('#_f_name').val(f_name); $('#_l_name').val(l_name); $('#_email').val(l_email); $('#_phone').val(phone); } $("#login_returnmessage").html(data); });
tagged with: javascript
tagged with: ajax-request
has title: ajax login form doesn't work
type: AnsweredQuestion
tagged with: jquery
accepted answer: http://stackoverflow.com/a/28097028
type: Question

http://stackoverflow.com/q/28017652
has body: Trying to see how can I invoke an alert after the event is fired by clicking a button from a Meteor method call. I am able to see that the function is invoked, but seems that it is crashing on the template.find. Any thoughts h here is the code: "click .regular-button": function (event, template) { var show = template.find('.showinputtext').value; alert(show); and Search
tagged with: http://stackoverflow.com/tag/html
has title: MeteorJS invoking a client function and alerting result
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28017960
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28017960
answer count: 1
tagged with: meteor

http://stackoverflow.com/comment/44445694
type: Comment
type: QuestionComment
has text: I found the problem.... it has to do with the generation of the actual URL for the AJAX call, for some reason FF and IE are not able to interpret correctly the value of a select box
comment on: http://stackoverflow.com/q/28029294
score: 0

http://stackoverflow.com/a/27968219
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/80362749
answers question: http://stackoverflow.com/q/27964630
has body: To compute the length of the polyline, sum the distance between all the vertices: var distance = 0; for (var i = 0; i &lt; path.getLength() - 2; i++) { distance += google.maps.geometry.spherical.computeDistanceBetween(path.getAt(i), path.getAt(i + 1)); } alert(distance / 1000).toFixed(2) + " km [" + path.getLength() + "]"); working fiddle working code snippet: var geocoder; var map; var poly; var path; var service = new google.maps.DirectionsService(); function initialize() { var map = new google.maps.Map( document.getElementById("map_canvas"), { center: new google.maps.LatLng(37.4419, -122.1419), zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP }); poly = new google.maps.Polyline({ map: map }); path = poly.getPath(); google.maps.event.addListener(map, "click", function(evt) { var latitude_longitude = evt.latLng; // alert(latitude_longitude); ////Gets latitude and Longitude - Latitude first - Longitude second if (path.getLength() === 0) { path.push(evt.latLng); poly.setPath(path); } else { service.route({ origin: path.getAt(path.getLength() - 1), destination: evt.latLng, 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]); } var distance = 0; for (var i = 0; i &lt; path.getLength() - 2; i++) { distance += google.maps.geometry.spherical.computeDistanceBetween(path.getAt(i), path.getAt(i + 1)); } document.getElementById('info').innerHTML = (distance / 1000).toFixed(2) + " km [" + path.getLength() + "]"; } }); } }); } google.maps.event.addDomListener(window, "load", initialize); html, body, #map_canvas { height: 100%; width: 100%; margin: 0px; padding: 0px } &lt;script src="https://maps.googleapis.com/maps/api/js?libraries=geometry"&gt;&lt;/script&gt; &lt;div id="info"&gt;&lt;/div&gt; &lt;div id="map_canvas" style="border: 2px solid #3872ac;"&gt;&lt;/div&gt;

http://stackoverflow.com/q/27989810
answer count: 2
has answer: http://stackoverflow.com/a/27989897
tagged with: javascript
tagged with: jquery
has body: I have a layout such as this: Input One Checkbox One ... elements ... Input Two Checkbox Two ... elements ... ... elements ... Whenever I check an input, I' like the next children UL to display or not display if unchecked. The problem I keep running into is that if I use find() it will also select the nested children, which is not what I want. Some stipulations is that I can't have additional classes or IDs as this is on a WordPress platform, category metabox but I want to use Jquery to manipulate the data. My jquery is something like this: $('#tax_id li label > input:checkbox').click(function(){ if($(this).is(':checked')){ $(this).parent('label').parent('li').find('ul.children').css('display', 'block'); } else{ $(this).parent('label').parent('li').find('ul.children').css('display', 'none'); } }); JSFiddle
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Get Direct Child - Not Nested Children
accepted answer: http://stackoverflow.com/a/27989861
possible better answer: http://stackoverflow.com/a/27989897
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27989861
type: Question

http://stackoverflow.com/a/28099909
has comment: http://stackoverflow.com/comment/44644067
answers question: http://stackoverflow.com/q/28075867
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
has body: I looked at your Fiddle, and I think I see the problem. You are using d3's Equirectangular map projection, which expects lat-long coordinates with x values in the range [-180, 180] and y values in the range [-90, 90]. The actual x and y ranges of your dataset are [-991.4407052281722, 6787.6906928973385] and [-4789.571699454693, -155.32649155239142]. When d3 encounters coordinates outside the expected range, it wraps them -- this is why the lines look "crazy." Based on your coordinate values, I'm guessing that you're using a projected coordinate system in your QGIS project. To display the data using d3, you can either export your shapes in lat-long coordinates (e.g. by selecting "WGS 84" as the CRS when saving a QGIS layer), or you can use d3 with projected data (see Drawing already projected geoJSON map in d3.js)
accepted answer of: http://stackoverflow.com/q/28075867
type: Answer
has comment: http://stackoverflow.com/comment/44575822

http://stackoverflow.com/comment/113512558
has text: @RonInbar - If I'm reading you right, you're saying `fact` isn't added to the scope when you do `console.log(function fact(n) { /*...*/ });`, right? If so, quite correct, it isn't; and the arrow function version does define `fact` in that scope. That's part of why the last version is there. :-)
type: Comment
comment on: http://stackoverflow.com/a/37488652
score: 0
type: AnswerComment

http://stackoverflow.com/q/28008209
upvote count: 1
tagged with: methods
downvote count: 1
tagged with: object
has title: Definitive best way to add properties/methods
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28008271
has body: I got tired of writing long object property/method expressions like the example below. Adding every property one by one seemed like such a waist of keystrokes. var foo = function(object){ object.foo = "foo"; object.function = function(){}; return object; } I got so frustrated with it, I thought there had to be a better way. After a bit of thought the best thing I could come up with was a addProperties loop function, like so. var addProperties = function(properties, subject){ subject = subject ? subject : {}; for(propertie in properties){ if(properties.hasOwnProperty(propertie) &amp;&amp; !subject[propertie]){ subject[propertie] = properties[propertie] } } return subject; } This does make the code a bit more concise : var foo = function(object){ return addProperties({foo : "foo", function : function(){}}, object); } BUT I AM NOT SATISFIED!! So I am turning to you, the great people of stack overflow : what is the definitive best way to add properties/methods? (In your personal opinions)
tagged with: jquery
has answer: http://stackoverflow.com/a/28008334
favorite count: 0
type: Question
tagged with: properties
score: 0
answer count: 2

http://stackoverflow.com/a/28126604
type: Answer
score: 0
answers question: http://stackoverflow.com/q/28091036
has body: There is no need to trigger any event to display Native DatePicker/TimePicker. If browser supports HTML5 input type date/time, then it will open native DatePicker/TimePicker. Check this example

http://stackoverflow.com/comment/44539104
score: 0
type: QuestionComment
has text: Yes. I could add this case to the question with a snippet. You mean something like: `step2 = step1.then(function(result) {if (killFlag) {return} else {return fcn2(result)})`? The Pros and cons are probably the same as Promise.race.
type: Comment
comment on: http://stackoverflow.com/q/28079758

http://stackoverflow.com/comment/44419634
type: Comment
has text: If that is the case your controller should automatically have the function inherited (to verify that try calling it from `SearchSortModalCtrl`). So you could just set the scope option by creating a child scope of your controller scope `scope:$scope.$new()`
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28015361

http://stackoverflow.com/q/28081105
tagged with: contextmenu
has answer: http://stackoverflow.com/a/28095783
type: UnansweredQuestion
has body: Currently I am working on fixing up a Chrome Extension. My last problem is that I am trying to create two contextMenus when a person scrolls over something and right clicks. chrome.contextMenus.create({ title: "One: '%s'", contexts:["selection"], id:'sat' }); chrome.contextMenus.create({ title: "Two: '%s'", contexts:["selection"], id:'dat' }); chrome.contextMenus.onClicked.addListener(function(info, tab){... When I test it it only creates the first one.
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: google-chrome-extension
has title: Creating more than one contextMenu on Selection

http://stackoverflow.com/a/28104120
answers question: http://stackoverflow.com/q/28104061
downvote count: 0
type: Answer
upvote count: 1
has body: The problem is in your javascript where you set the salaryString variable. You need to make sure to collect the value of the element you are selecting. Like so: var salaryString = document.getElementById("grossSalary").value; After you do that, your code should behave as expected.
score: 1

http://stackoverflow.com/a/27977638
has comment: http://stackoverflow.com/comment/44347514
upvote count: 1
has body: It would be better to use a class for the buttons and create a callback for the item. var num=4; for(var z = 0 ; z &lt; num ;z++) { //create a div with id 'z' $("&lt;div/&gt;",{id:z,class:'btn'}).appendTo("#empty"); //displaying the id on the screen $("#"+z).text(z); console.log("button "+z+" created"); } $(".btn").mousedown(function(){ var z = $(this).attr('id'); console.log("Button "+z+" clicked !"); });
has comment: http://stackoverflow.com/comment/44347484
type: Answer
answers question: http://stackoverflow.com/q/27977383
has comment: http://stackoverflow.com/comment/44347605
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27977383
type: AcceptedAnswer

http://stackoverflow.com/q/27964471
downvote count: 0
tagged with: javascript
tagged with: rest
has comment: http://stackoverflow.com/comment/44325069
has title: Application hangs and getting status Pending when calling rest function call
favorite count: 0
has body: Coldfusion version 10. The app hangs using IE9 when I do a REST cf function call from js file. Observing the console, I see Pending status. However, it works fine in later versions of IE, Chrome and Mozilla. When I changed cffunction httpmethod from DELETE to PUT it worked. So, I figure that maybe javascript function call and cffunction header mismatch. Here is cffunction; &lt;cffunction output="no" name="zeroUpdateCredits" access="remote" produces="application/json" consumes="application/json" returnType="struct" httpmethod="DELETE"&gt; &lt;cfargument name="DATA" type="struct" required="yes"/&gt; &lt;cfset var retStatus = StructNew() /&gt; &lt;cfset retStatus["success"] = true /&gt; &lt;cftry&gt; &lt;cfset var qSponsDetails = APPLICATION.cfc.properties.getsettings(DATA.employee_id)&gt; &lt;cfif qSponsDetails.allow_credits&gt; &lt;cfset temp = saveCredits(credits = 0, employee_id = DATA.employee_id, effective_date = DATA.effective_date)&gt; &lt;/cfif&gt; &lt;cfcatch type="any"&gt; &lt;cfthrow errorcode="401" message="error zero credits" /&gt; &lt;cfreturn&gt; &lt;/cfcatch&gt; &lt;/cftry&gt; &lt;cfreturn retStatus&gt; &lt;/cffunction&gt; Here is the function call: exports.clearCredits = function(employeeId, effectiveDate){ data = { employee_id: employeeId, effective_date: effectiveDate }; var promise = rest.DELETE({ url: appConfig.restPrefix + 'selections/unusedcredits?t=' + new Date().getTime(), contentType: 'application/json' }, JSON.stringify(data) ); return promise; }; Thank you, Gena
upvote count: 2
type: UnansweredQuestion
tagged with: coldfusion
score: 2
has comment: http://stackoverflow.com/comment/44323998
answer count: 0
has comment: http://stackoverflow.com/comment/44325302
type: Question

http://stackoverflow.com/a/27988483
type: Answer
downvote count: 0
score: 1
has body: Try using yPos = window.pageYOffset; http://jsfiddle.net/nwv3e7qr/
answers question: http://stackoverflow.com/q/27988276
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27988276

http://stackoverflow.com/a/28112073
downvote count: 0
answers question: http://stackoverflow.com/q/28111488
upvote count: 2
type: Answer
score: 2
has body: I made a few changes to your CSS and JS to achieve the effect you're looking for. Changed JS so it's adding a class to the parent .carta so both children can be styled based on the change in state Fixed the "contentitore-carta" selector in CSS — it was missing the hyphen Instead of using the images for the transforms, I switched these to using the parent .front, .back divs. This isn't make-or-break, but transforms tend to play nicer with divs. Think that covers it. Updated code below. $(".carta").click(function() { $(this).toggleClass("flipped"); }) .contenitore-carta { position: relative; width: 100px; height: 150px; perspective: 800px; } .carta { width: 100px; height: 150px; position: absolute; transform-style: preserve-3d; transition: transform 1s; } .carta .front, .carta .back { display: block; position: absolute; z-index: 2; width: 100%; height: 100%; backface-visibility: hidden; } .carta .back { transform: rotateY(180deg) } .carta.flipped { transform: rotateY(180deg); }

http://stackoverflow.com/q/28006716
score: 0
answer count: 1
tagged with: asynchronous
favorite count: 0
has answer: http://stackoverflow.com/a/28006749
type: AnsweredQuestion
has title: what does Q( Q framework) mean? ( the asynchronous javascript framework)
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/28006749
tagged with: javascript
has body: Q framework is very famous( more than 7k stars on github), could someone tell me what does Q mean? I have googled around and checked its official doc, but not found any clue...

http://stackoverflow.com/q/27968169
tagged with: jwplayer
has answer: http://stackoverflow.com/a/42353873
tagged with: soundcloud
type: AnsweredQuestion
score: 2
downvote count: 0
has title: JWPlayer, Soundcloud file source
tagged with: javascript
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/27968473
upvote count: 2
has body: Does JWPlayer support the file source from soundcloud? &lt;script type="text/javascript" language="javascript"&gt; jwplayer("mainplayer").setup({ playlist: [{ file: "https://soundcloud.com/hucci/desire-remix" }], primary: "flash", height: 30, width: 370, autostart: false, }); &lt;/script&gt; This seems to be an unanswered question across the board. I'm hoping someone dedicated such as "Ethan JWPlayer" can answer this one, or provide a possible work-around! Thanks again.
answer count: 2
tagged with: loops
has answer: http://stackoverflow.com/a/27968473
possible better answer: http://stackoverflow.com/a/42353873

http://stackoverflow.com/comment/44587588
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28104333
type: Comment
has text: @ozn Yes... here the data is still stored and fetched from the database :) My whole point was that my example was the *rendered* HTML, not the backend PHP. So you would render this from PHP and PHP would fetch the data from the DB normally. Do you get what I mean by rendered HTML?

http://stackoverflow.com/q/28020192
has comment: http://stackoverflow.com/comment/44427027
has comment: http://stackoverflow.com/comment/44429663
has comment: http://stackoverflow.com/comment/44426914
tagged with: bootbox
has comment: http://stackoverflow.com/comment/44429740
has comment: http://stackoverflow.com/comment/44431329
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44431065
tagged with: confirm
score: 2
has comment: http://stackoverflow.com/comment/44429083
has comment: http://stackoverflow.com/comment/44429711
answer count: 0
downvote count: 0
favorite count: 0
type: Question
has title: BootBox javascript Confirm delete
has body: I am using asp.net MVC 5. In Bootbox js $(document).on("click", ".MyLink", function (e) { bootbox.confirm("Are you sure?", function(result) { Example.show("Confirm result: "+result); }); }); @Html.ActionLink("Delete", "Delete", new { id = item.CustomerID }, new { @class = "MyLink" }) How to delete the HTML action link ? Please find the full details of the code:- Javascript code:- $(document).on("click", ".MyLink", function (e) { var self = this; bootbox.confirm("Are you sure?", function (result) { Example.show("Confirm result: " + result); $(self).remove(); }); }); HTML Code:- Index Content here. Alert! @Html.ActionLink("Create New", "Create") Also see the inside code for your reference:- First Name Last Name @foreach (var item in Model) { @Html.DisplayFor(modelItem => item.FirstName) @Html.DisplayFor(modelItem => item.LastName) @Html.ActionLink("Edit", "Edit", new { id=item.CustomerID }) | @Html.ActionLink("Details", "Details", new { id = item.CustomerID }) | @*@Html.ActionLink("Delete", "Delete", new { id = item.CustomerID, @class = "MyLink" })*@ Delete } Also see the Controller code for your reference:- public ActionResult Delete(int? id) { if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } Customer customer = db.Customers.Find(id); db.Customers.Remove(customer); db.SaveChanges(); if (customer == null) { return HttpNotFound(); } return RedirectToAction("Index"); //return View(customer); }
upvote count: 2
has comment: http://stackoverflow.com/comment/44429687
has comment: http://stackoverflow.com/comment/44426792

http://stackoverflow.com/comment/44421847
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28017147
has text: Yes, I think it has to do with what PointText expects as its arguments for the constructor. I should have mentioned before that I don't really understand the second `this` in `PointText.call(this,this)`. I think if I do it will be a lot easier... PointText expects a single argument that is an object - this is probably what is going wrong.
score: 0

tcp
type: Tag
tags question: http://stackoverflow.com/q/28084031
tags question: http://stackoverflow.com/q/28004856
tags question: http://stackoverflow.com/q/28017812
tag name: tcp
tags question: http://stackoverflow.com/q/27989053

http://stackoverflow.com/comment/44472248
has text: Thank you very much chipChocolat.py
type: Comment
comment on: http://stackoverflow.com/a/28044089
type: AnswerComment
score: 0

jsonp
tags question: http://stackoverflow.com/q/28014748
tags question: http://stackoverflow.com/q/28079248
tags question: http://stackoverflow.com/q/27965700
type: Tag
tag name: jsonp

http://stackoverflow.com/comment/44558957
comment on: http://stackoverflow.com/a/28090515
type: Comment
type: AnswerComment
has text: great,but how would i save that in my desktop, because if i open through browser it wont load the map
score: 0

http://stackoverflow.com/comment/44434093
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28023170
score: 1
has text: @Ravia `.dialog()` is asynchronous. It returns immediately, but the DOM isn't updated until the user clicks on the `Associate` button.

http://stackoverflow.com/comment/44589590
comment on: http://stackoverflow.com/q/28107034
score: 0
type: Comment
type: QuestionComment
has text: @Sean Thanks Sean, I'll have a play with that. Thanks for the help!

fullcalendar
tags question: http://stackoverflow.com/q/28111021
tags question: http://stackoverflow.com/q/27966960
tags question: http://stackoverflow.com/q/28001919
tags question: http://stackoverflow.com/q/27968231
tags question: http://stackoverflow.com/q/28048501
tags question: http://stackoverflow.com/q/28048236
tags question: http://stackoverflow.com/q/28038211
tags question: http://stackoverflow.com/q/28020925
tags question: http://stackoverflow.com/q/28111281
tags question: http://stackoverflow.com/q/28115122
tag name: fullcalendar
tags question: http://stackoverflow.com/q/28078064
tags question: http://stackoverflow.com/q/28027748
tags question: http://stackoverflow.com/q/28111602
tags question: http://stackoverflow.com/q/28100852
tags question: http://stackoverflow.com/q/28035416
type: Tag

http://stackoverflow.com/a/66175222
answers question: http://stackoverflow.com/q/28041677
upvote count: 2
type: Answer
score: 2
downvote count: 0
has body: For anyone looking to use this answer, but modifying the AndroidManifest via config.xml, the following did the trick for me. Trying to match on android:name didn't work no matter which permutations I used. <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" />

papaparse
type: Tag
tags question: http://stackoverflow.com/q/28030299
tag name: papaparse

http://stackoverflow.com/comment/44540620
score: 0
type: Comment
type: QuestionComment
has text: Ok now it is clear what you are trying to achieve, please see my answer.
comment on: http://stackoverflow.com/q/28080612

http://stackoverflow.com/comment/44582466
type: QuestionComment
comment on: http://stackoverflow.com/q/28103372
has text: @RobertHarvey focus and click calling same time its causing to hide the section
score: 0
type: Comment

http://stackoverflow.com/q/28020925
tagged with: http://stackoverflow.com/tag/pdf
upvote count: 3
type: UnansweredQuestion
type: Question
score: 3
has answer: http://stackoverflow.com/a/28730520
has title: PDF is not rendering properly in Rotativa
tagged with: fullcalendar
has body: This is my page. @model JNCloud.Web.UI.Models.AppointmentModel @{ Layout = null; } UB-04-081A <!--[if lt IE 9]> <![endif]--> @Html.TextBoxFor(x => x.SelectedPID) @* End Confirm Assessment form *@ And in controller when I use this return View(objappointmentmodel); then it's look like this And when in controller I use this return new ViewAsPdf("PrintCalendar", objappointmentmodel) { PageSize = Rotativa.Options.Size.A4, PageOrientation = Orientation.Portrait, PageMargins = { Left = 0, Right = 0 } }; then it's look like this. This isn't loading properly. What should I do? I have researched also about this. But I can't find a proper solution. Please suggest me.
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: rotativa
has answer: http://stackoverflow.com/a/28341583

http://stackoverflow.com/comment/44337807
score: 0
has text: Did you look at [these docs](http://sailsjs.org/#/documentation/reference/websockets/sails.sockets)?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27971706

http://stackoverflow.com/comment/44510490
has text: OK. There's no obvious reason why it wouldn't work then.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28050645

http://stackoverflow.com/comment/44400521
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28005947
has text: It doesn't really matter what the array returns. It's just an array with uncertain length that also generates an array of input boxes as ng-repeat iterates. I'm not seeing the code here. Could you elaborate? Sorry. Using the generic getter/setter I use for single values, as I pointed out, just changes all the values.

http://stackoverflow.com/comment/44331828
type: AnswerComment
score: 0
type: Comment
has text: Just trying to make sure that I understand what you want: specifying a range within the ID? like for example if I have ` This is a test `, and you want to select only "test", you'd pass a range of the type 10,4 (beginning of the text, and size). Is that correct? Something like `#myId&range=10,4`? or just the range?
comment on: http://stackoverflow.com/a/27967888

http://stackoverflow.com/a/28019999
type: Answer
score: 1
upvote count: 1
has body: In the first example, the get method is only available once a new object is created. test.get(); // This will throw an error var a = new test(); a.get(); // This will work. In the second example, the get method can be called directly on the test function test.get(); // This will work. If you were to put the code into English, it would appear like so First: Lets define a function called test. Inside this function, lets create a get function on the return object. Second Lets define a function called test. Lets define a function called get as a property of the test function.
answers question: http://stackoverflow.com/q/28019942
downvote count: 0

http://stackoverflow.com/comment/44580295
has text: thx, I tried this, the "tooltip" part doesnt work, but i change it for a event "mouseover" and it does work but intermittently, like it loads it, works first time but then if i keep mouseing over, it wont appear afterwards "weird" [Live-Example](http://www.jbunlock.com/test.html) not sure if its my browser , chrome, firefox
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28077552

http://stackoverflow.com/a/28094092
score: 1
answers question: http://stackoverflow.com/q/28093999
has comment: http://stackoverflow.com/comment/44587293
upvote count: 1
has body: Sure, just check the length property: Items in list: {{filtered.length}} FLAG CODE HERE
type: Answer
downvote count: 0

http://stackoverflow.com/a/28124182
answers question: http://stackoverflow.com/q/28065844
downvote count: 2
score: -2
has body: in Echart u can make chart/graph with combination of the chart, and thre is too many config for every charts section, like legend, etc... just have look at their api documantation on their web site and Example page (Combinations part)
type: Answer
upvote count: 0

d3.js
tags question: http://stackoverflow.com/q/28027934
tags question: http://stackoverflow.com/q/27964356
tags question: http://stackoverflow.com/q/28051730
tags question: http://stackoverflow.com/q/28102089
tags question: http://stackoverflow.com/q/28086994
tags question: http://stackoverflow.com/q/28065117
tags question: http://stackoverflow.com/q/28113792
tags question: http://stackoverflow.com/q/28067429
tags question: http://stackoverflow.com/q/28034612
tags question: http://stackoverflow.com/q/28037918
tags question: http://stackoverflow.com/q/28101774
tags question: http://stackoverflow.com/q/28000211
tags question: http://stackoverflow.com/q/28015630
tags question: http://stackoverflow.com/q/27972202
tags question: http://stackoverflow.com/q/28073119
tags question: http://stackoverflow.com/q/28098879
tags question: http://stackoverflow.com/q/28011025
tags question: http://stackoverflow.com/q/28052085
tags question: http://stackoverflow.com/q/28120779
tags question: http://stackoverflow.com/q/28007120
tags question: http://stackoverflow.com/q/27984603
tags question: http://stackoverflow.com/q/28027907
tags question: http://stackoverflow.com/q/28106560
tags question: http://stackoverflow.com/q/27967490
tags question: http://stackoverflow.com/q/27987538
tags question: http://stackoverflow.com/q/28069216
tags question: http://stackoverflow.com/q/28052419
type: Tag
tags question: http://stackoverflow.com/q/28116230
tags question: http://stackoverflow.com/q/27992967
tags question: http://stackoverflow.com/q/28090873
tags question: http://stackoverflow.com/q/28075867
tags question: http://stackoverflow.com/q/28088812
tags question: http://stackoverflow.com/q/28092275
tags question: http://stackoverflow.com/q/28075461
tags question: http://stackoverflow.com/q/28119815
tags question: http://stackoverflow.com/q/28073838
tags question: http://stackoverflow.com/q/28068736
tags question: http://stackoverflow.com/q/28035075
tags question: http://stackoverflow.com/q/28038777
tags question: http://stackoverflow.com/q/27974801
tags question: http://stackoverflow.com/q/28120453
tags question: http://stackoverflow.com/q/28112007
tags question: http://stackoverflow.com/q/28077734
tags question: http://stackoverflow.com/q/28100245
tags question: http://stackoverflow.com/q/28064565
tags question: http://stackoverflow.com/q/27985171
tags question: http://stackoverflow.com/q/28050434
tags question: http://stackoverflow.com/q/28111981
tags question: http://stackoverflow.com/q/28028615
tags question: http://stackoverflow.com/q/28021460
tags question: http://stackoverflow.com/q/28015393
tags question: http://stackoverflow.com/q/28097184
tags question: http://stackoverflow.com/q/28057847
tags question: http://stackoverflow.com/q/27971519
tags question: http://stackoverflow.com/q/28100801
tags question: http://stackoverflow.com/q/27980999
tags question: http://stackoverflow.com/q/28064957
tags question: http://stackoverflow.com/q/28082430
tags question: http://stackoverflow.com/q/28058732
tags question: http://stackoverflow.com/q/27985926
tags question: http://stackoverflow.com/q/28110490
tag name: d3.js
tags question: http://stackoverflow.com/q/28067299
tags question: http://stackoverflow.com/q/28119021
tags question: http://stackoverflow.com/q/28066052
tags question: http://stackoverflow.com/q/28005841
tags question: http://stackoverflow.com/q/28115582
tags question: http://stackoverflow.com/q/27987742
tags question: http://stackoverflow.com/q/27987555
tags question: http://stackoverflow.com/q/28045107
tags question: http://stackoverflow.com/q/28019036
tags question: http://stackoverflow.com/q/27995661
tags question: http://stackoverflow.com/q/28059467
tags question: http://stackoverflow.com/q/28067116
tags question: http://stackoverflow.com/q/28101428
tags question: http://stackoverflow.com/q/27977214
tags question: http://stackoverflow.com/q/28084735
tags question: http://stackoverflow.com/q/28033225
tags question: http://stackoverflow.com/q/27971846

http://stackoverflow.com/q/28048174
type: Question
answer count: 2
tagged with: javascript
has title: Navigate to a page only on form submit
has answer: http://stackoverflow.com/a/28048238
has body: I have a form that needs to be filled out in order to navigate to another page. However, this page needs to be hidden (even if I get the url and paste it to another tab is should display 404 and of course not be included in google search). So, the only way one can navigate to it is by filling out the form. How can I achieve this by changing the URL of the page that contains the form and the page we want to navigate to? I am using PHP/JavaScript. Thanks.
has comment: http://stackoverflow.com/comment/44478844
tagged with: php
possible better answer: http://stackoverflow.com/a/28048231
has answer: http://stackoverflow.com/a/28048231
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28048238
score: 0
tagged with: forms

http://stackoverflow.com/a/28108213
has comment: http://stackoverflow.com/comment/44603299
has comment: http://stackoverflow.com/comment/44602528
has body: I assume that from the perspective of webRequest / Chrome's network stack, this request actually completed. So you need to hook to some other event, e.g. function extractStatus(line) { var match = line.match(/[^ ]* (\d{3}) (.*)/); if(match) { return {code: match[1], message: match[2]}; } else { return undefined; } } chrome.webRequest.onHeadersReceived.addListener( function(details) { var status = extractStatus(details.statusLine); if(status) { // Do something based on status.code } }, {urls: ["&lt;all_urls&gt;"]} ); Note that this event is optionally blocking: you can redirect the request if needed. Obviously, this will create a lot of work for your extension; in the above snippet, the listener is not blocking, but if you do make it blocking it will slow down your Chrome considerably - only use it when absolutely necessary and filter by URL when appropriate.
has comment: http://stackoverflow.com/comment/44600913
has comment: http://stackoverflow.com/comment/44601708
downvote count: 0
has comment: http://stackoverflow.com/comment/44600890
type: Answer
has comment: http://stackoverflow.com/comment/44601219
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/28106097
has comment: http://stackoverflow.com/comment/44601273

http://stackoverflow.com/a/28091052
has comment: http://stackoverflow.com/comment/44558887
score: 8
has comment: http://stackoverflow.com/comment/44559080
upvote count: 9
has comment: http://stackoverflow.com/comment/44558819
has comment: http://stackoverflow.com/comment/44558965
has comment: http://stackoverflow.com/comment/44558912
has comment: http://stackoverflow.com/comment/44559089
has comment: http://stackoverflow.com/comment/44558842
has body: You're getting the DOMElement, but not retrieving the text from it. To do that use innerText. Try this: function myFunction() { var uri = "www. google.com"; var res = encodeURIComponent(uri); var address = document.getElementById("address").innerText; // note innerText here console.log(uri); // print out = www. google.com console.log(res); // print out = www.%20google.com console.log(address); // print out = null ???? } 410 Walker Street Lowell MA 01851 console.log(); Run Or alternatively, as you've tagged this question with jQuery: var address = $('#address').text(); Also note that you've set id="addess" in the HTML, which appears to be a typo.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44558722
has comment: http://stackoverflow.com/comment/44559035
type: Answer
has comment: http://stackoverflow.com/comment/44559062
has comment: http://stackoverflow.com/comment/44558767
accepted answer of: http://stackoverflow.com/q/28091040
has comment: http://stackoverflow.com/comment/44558983
has comment: http://stackoverflow.com/comment/44558993
answers question: http://stackoverflow.com/q/28091040
downvote count: 1

http://stackoverflow.com/q/27970459
has answer: http://stackoverflow.com/a/27970810
type: Question
tagged with: escaping
has comment: http://stackoverflow.com/comment/44333670
answer count: 2
has body: trying to escape and html for appending in jquery with adding a dynamic variable that i am bringing in with ajax and I seem to not be able to get the escaping correct. Here is what I have - $(" ").appendTo(".myDiv'); I am unsure how to escape this correctly so I can use the variable. Thanks.
accepted answer: http://stackoverflow.com/a/27970810
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/27970552
type: AnsweredQuestion
has title: Jquery, Escaping url with variable
has answer: http://stackoverflow.com/a/27970552
has comment: http://stackoverflow.com/comment/44333587

http://stackoverflow.com/q/27973501
has answer: http://stackoverflow.com/a/27985852
accepted answer: http://stackoverflow.com/a/27985852
tagged with: ember.js
has comment: http://stackoverflow.com/comment/44349048
has title: EmberJs add the return string of a function as a class name
type: AnsweredQuestion
downvote count: 0
has body: Basically, I have an EmberJS Application. In it, I want to show a different validation state and to do so, I want to update the html class attribute. Each of these form elements can have three different names: "" (empty), "has-success" or "has-error". Basically, I want to bind the class name off a computed property which will return any of those three (much like the AngularJS ng-class) depending on the state of the form. I want something like this: validationState: function() { if(element.state === "pristine") { return ""; } else if(element.state === "valid") { return "has-success"; } else{ return "has-error"; } } In the template, I would like something like that: &lt;input class="{{ validationState }} form-control"&gt; Is this something feasible ? If yes, what is the best way to do it ? Creating a custom helper ? Or is there already a way to do so?
score: 1
type: Question
has comment: http://stackoverflow.com/comment/44362448
tagged with: javascript
has comment: http://stackoverflow.com/comment/44344564
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/44345556

http://stackoverflow.com/comment/44561229
comment on: http://stackoverflow.com/q/28092429
score: 1
has text: split('.'), loop and parseInt may be easier
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/119091352
has text: It looks like with latest version of bluebird, all you need to do is basically `window.addEventListener("unhandledrejection", function(event) {})` http://bluebirdjs.com/docs/api/error-management-configuration.html#global-rejection-events -- I may be mis-reading the docs, but it sounds like bluebird will now trigger a `unhandledrejection` event for you
type: Comment
comment on: http://stackoverflow.com/a/28004999
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44579300
has text: This returns `undefined` to the console.
type: AnswerComment
comment on: http://stackoverflow.com/a/28101963
score: 0
type: Comment

http://stackoverflow.com/a/28099734
has comment: http://stackoverflow.com/comment/44576713
has body: Chrome's console.log() shows the array grouped by 100 items. At the length property you can see, that the array contains all 520 items.
answers question: http://stackoverflow.com/q/28099576
has comment: http://stackoverflow.com/comment/44575426
has comment: http://stackoverflow.com/comment/44575306
has comment: http://stackoverflow.com/comment/44576517
has comment: http://stackoverflow.com/comment/44576109
has comment: http://stackoverflow.com/comment/44575256
score: 0
has comment: http://stackoverflow.com/comment/44575214
has comment: http://stackoverflow.com/comment/44576764
has comment: http://stackoverflow.com/comment/44576416
has comment: http://stackoverflow.com/comment/44576235
type: Answer
has comment: http://stackoverflow.com/comment/44575875
has comment: http://stackoverflow.com/comment/44575629

http://stackoverflow.com/comment/44502225
type: QuestionComment
comment on: http://stackoverflow.com/q/28059922
type: Comment
has text: Here is my jsfiddle link http://jsfiddle.net/vmehz2fg/
score: 0

http://stackoverflow.com/comment/44462909
type: Comment
score: 0
has text: You can simply pass another flag value to show or hide, then you can perform the desired operation
type: QuestionComment
comment on: http://stackoverflow.com/q/28039490

http://stackoverflow.com/a/28092051
has body: There is not straight-forward configuration in Kendo. You can achieve this using CSS. You can show elipsis (...) for large text in cells : .k-grid td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } to show the complete cell text, you can either use Tooltips or Modal popups depending upon your requirement.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/28091154
upvote count: 1

http://stackoverflow.com/comment/44587811
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28092783
score: 0
has text: could you help me with this please? could u double check my fiddle?

http://stackoverflow.com/a/28047937
answers question: http://stackoverflow.com/q/28047858
has comment: http://stackoverflow.com/comment/44489450
has body: press the back arrow in order to exit the keyboard
downvote count: 1
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/44478917
type: Answer

http://stackoverflow.com/comment/44324314
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27965721
has text: @SpencerWieczorek: nope
score: 0

http://stackoverflow.com/comment/44570410
type: Comment
has text: I just added this, and it works easily. I would prefer to use the bootstrap-toggle, but this is a workaround and I can style it. Thanks
score: 1
comment on: http://stackoverflow.com/a/28097100
type: AnswerComment

http://stackoverflow.com/comment/44330524
type: AnswerComment
has text: The text I would like to mark might appear several times on the page, so I'm doubtful that an actual search is really what I want here.
type: Comment
comment on: http://stackoverflow.com/a/27967745
score: 0

http://stackoverflow.com/q/28040259
has title: Javascript Load More Data on Click in Codeigniter results not displaying
tagged with: javascript
has answer: http://stackoverflow.com/a/28135206
has comment: http://stackoverflow.com/comment/44543639
score: 0
has comment: http://stackoverflow.com/comment/44473385
has body: I have products in table I wish to display some when page load and remain data should display on button click, I have set limit as 6 per page, when page loading it is displaying first six rows and if I click on Load More button it is displaying another six rows here problem coming after got 12 rows from table when I click again on Load More button it is not working even I have more data in table, I have cross checked parameters also, it is fine parameters also sending with request. please help me how to solve this. NOTE: when I test this script in core php it is working fine, when I implement this script in codeigniter first time click load more data working second time when i click it is not wokring. Javascript Code Block $('.more').click(function(){ var ID = $(this).attr("id"); var cats = $('input[name=cats]').val(); $("#more"+ID).html('<img src="<?=ROOT;?>resources/moreajax.gif" />'); $.post('<?=ROOT;?>product/dataLoad', {id:ID,cats:cats}, function(data){ if(data) { $('ol#updates').append(data); $("#more"+ID).remove(); } else { $(".morebox").html('The End');// no results } }); return false; }); codeigniter controller function public function dataLoad() { if(isset($_POST['id'])) { $lastmsg=$_POST['id']; $cats = $_POST['cats']; $query=mysql_query("select * from product where id > '".$lastmsg."' AND category_id IN ($cats) order by id asc limit 4"); $numrows = mysql_num_rows($query); while($ob = mysql_fetch_array($query)) { ?> ID: <?=$ob['id']; NAME: <?=$ob['name']; <?php }//while ?> <?php if($numrows > 0) { ?> <div id="more<?php echo $ob['id']; ?>" class="morebox" style="clear:both"> <input type="hidden" name="cats" value="<?=$cats;?>" /> <a href="#" class="more" id="<?=$ob['id'];?>">Load More <?php } } ?> product page code $str = implode(",",$cats); $query = "select * FROM product WHERE category_id IN (".$str.") order by id asc limit 4"; $result=mysql_query($query); $numrows = mysql_num_rows($result); while($ob = mysql_fetch_array($result)) { ?> ID: <?=$ob['id']; N…
has comment: http://stackoverflow.com/comment/44469594
answer count: 1
type: UnansweredQuestion
tagged with: codeigniter
type: Question

http://stackoverflow.com/comment/124351056
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/52248590
type: Comment
has text: This really neither answers the question nor even uses the Enhanced Object Properties that are linked.

http://stackoverflow.com/q/28032615
has comment: http://stackoverflow.com/comment/44452858
type: AnsweredQuestion
has title: RESTful Commit to Github file
has body: I've been looking for quite some time if it is even possible to do this. I'd like to make a RESTful POST call with a javascript without the use of a server (node) to send a json object in the request body to update a json file in a github repo triggering a commit/push.
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/28048752
has comment: http://stackoverflow.com/comment/44451378
has comment: http://stackoverflow.com/comment/44452495
type: Question
has comment: http://stackoverflow.com/comment/44453936
has answer: http://stackoverflow.com/a/28048752
downvote count: 0
tagged with: javascript
score: 4
upvote count: 4
tagged with: api
answer count: 1
tagged with: github
favorite count: 0
tagged with: rest
linked to: http://stackoverflow.com/q/246801

http://stackoverflow.com/q/27973317
has body: I can´t solve my issue with the jQuery .val(). I want to spice up, the site creation functions on my website and there I have several metaboxes to choose header layout and so on. There I want to show or hide metaboxes based on my choices. I´ll get an error in line 18 and have no idea how to solve it... It´s difficult to explain, so created a simple Fiddle. It would be really nice, if someone can take a short look on the code. Thanks a lot! [Fiddle] [Fiddle]: http://jsfiddle.net/Blackzet/2Lr2g09p/1/
downvote count: 2
tagged with: wordpress
answer count: 1
tagged with: meta-boxes
has answer: http://stackoverflow.com/a/27973752
tagged with: javascript
type: AnsweredQuestion
upvote count: 0
has title: Wordpress jQuery .val statement error
tagged with: jquery
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/27973752
tagged with: input
score: -2

http://stackoverflow.com/a/28117118
downvote count: 0
answers question: http://stackoverflow.com/q/28117004
type: Answer
accepted answer of: http://stackoverflow.com/q/28117004
has body: Use after (called when images have been added to the page) callback var feed = new Instafeed({ get: 'user', userId: 3722752, accessToken: '3722752.467ede5.edc5948480384f54915ea14617ce6716', template: '&lt;div&gt;&lt;a href="{{link}}"&gt;&lt;img src="{{image}}" /&gt;&lt;/a&gt;&lt;/div&gt;', after: function () { $('.instafeed').slick({slidesToShow: 3}); } }); Example
score: 9
upvote count: 9
type: AcceptedAnswer

http://stackoverflow.com/q/27985387
score: 0
has comment: http://stackoverflow.com/comment/44361679
has body: My folder architecture is: Script--->App--->Administration--->UserModel.js I use knockoutjs so I bound my html to javascript like this: AddUser.cshtml &lt;script type="text/javascript"&gt; $(function () { require(["Administration/UserModel"], function (userModel) { var userModel = new userModel(); ko.applyBindings(userModel, document.getElementById("AddUserForm")); }); }); &lt;/script&gt; UserModel.js return function () { var self = this; self.email = ko.observable(""); self.password = ko.observable(""); self.createUser = function () { webRequest.postJSON("/Administration/User/CreateUser", ko.toJSON(self), self.saveSucceeded); } } I deleted my UserModel.js file and started the project then I checked from firebug and I noticed that It posted observables. This file is still being executed. However I deleted this file. Where did it come from?
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44362204
has comment: http://stackoverflow.com/comment/44362376
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/44362335
has title: Why is non-exist javascript file being executed?
tagged with: knockout.js
type: Question
tagged with: javascript

http://stackoverflow.com/a/28073014
answers question: http://stackoverflow.com/q/28072209
downvote count: 0
has body: It seems the JScript array methods are still available via VBScript: &lt;script language="javascript" runat="server"&gt; var myArray = [ { name: "object 1" }, { name: "object 2" }, { name: "object 3" } ]; &lt;/script&gt; &lt;% Do While myArray.length &gt; 0 response.write myArray.shift().name response.write "&lt;br&gt;" Loop %&gt;
score: 5
type: AcceptedAnswer
upvote count: 5
type: Answer
accepted answer of: http://stackoverflow.com/q/28072209

http://stackoverflow.com/q/28046893
has comment: http://stackoverflow.com/comment/44476182
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28710704
type: UnansweredQuestion
score: 1
has body: I've been trying to put a next/prev button on my swiper and I can't get it to work I've tried various stuff and its just not working, can someone put out why its not working. I'm using jquery one not zepto. Tried this one. Next button Previous button This is how I initialise my swipe which is working fine. var swiper1 = new Swiper('.swiper-container.newscol-swiper',{ slideClass: 'post-item', slidesPerView: 4, slidesPerViewFit: false, loop: true, centeredSlides: true, autoplay: 5000, speed: 400, calculateHeight: true, roundLength: true, mode: 'horizontal' })
has title: iDangerous swipe not functioning
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/44540007
type: AnswerComment
score: 0
has text: Nope, will not work: https://developer.chrome.com/extensions/content_scripts#execution-environment
type: Comment
comment on: http://stackoverflow.com/a/28080490

http://stackoverflow.com/q/27968329
has comment: http://stackoverflow.com/comment/44329369
has answer: http://stackoverflow.com/a/27968375
linked to: http://stackoverflow.com/q/23212997
tagged with: javascript
has title: Javascript numeric variable comparison not working
duplicate of: http://stackoverflow.com/q/23212997
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27968375
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/44329344
has body: I have a form with 2 Submit buttons. One is for Approve the other is for Reject. The HTML is: &lt;form action="test.php" method="post" name="sos_submit" id="sos_submit"&gt; &lt;input type="text" name="qty_indented" value="&lt;?php echo $qty_indented ?&gt;" id="qty_indented" readonly="readonly" /&gt; &lt;input type="text" name="qty_approved" value="&lt;?php echo $qty_approved ?&gt;" id="qty_approved" /&gt; &lt;input type="submit" name="da_approve" value="APPROVE" onclick="return submitForm(this)" /&gt; &lt;input type="submit" name="da_reject" value="REJECT" onclick="return submitForm(this)" /&gt; &lt;/form&gt; And my submitForm(this) Function looks like: &lt;script&gt; function submitForm (button){ if (button.value == "APPROVE"){ var qty_approved = document.getElementById("qty_approved").value; var qty_intended = document.getElementById("qty_indented").value; if (qty_approved &lt;= 0){ alert("Please Enter the Quantity for Approval!"); submitOK = "false"; } else if(qty_approved &gt;= qty_intended){ alert("Quantity Approved " + qty_approved + " Cannot be more than quantity intended " + qty_intended + " !"); submitOK = "false"; } if (submitOK == "false") { return false; } } else{ confirm("Are you sure you want to REJECT the Voucher?"); } } &lt;/script&gt; Although its very simple code, but somehow not working properly. Even though qty_approved is LESS than qty_indented, the if() statements are executing. For example, if qty_approved = 5 and qty_indented = 10, then the code should submit the form, but it is NOT. It is showing: Quantity Approved 5 Cannot be more than quantity intended 10 ! Did I do anything wrong?
score: 0

http://stackoverflow.com/comment/44414216
has text: You are absolutely correct. I had a space in my column name. A very stupid mistake that took me a while to figure out! I ended up swapping csv files around, and figured out that the csv file had bad headers! If you write this as an answer I'll give it to you!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27995661
score: 0

http://stackoverflow.com/q/28031786
answer count: 3
has comment: http://stackoverflow.com/comment/44448409
downvote count: 0
has comment: http://stackoverflow.com/comment/44448506
has comment: http://stackoverflow.com/comment/44448334
has comment: http://stackoverflow.com/comment/44448573
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44448284
has comment: http://stackoverflow.com/comment/44448261
has comment: http://stackoverflow.com/comment/44448262
has answer: http://stackoverflow.com/a/28031983
has answer: http://stackoverflow.com/a/28031961
has body: My tabs are created using PHP so I do not want a set width per tabswitcher tab. Due to this I am trying to add up the total width of the tabswitcher so I can set the width then apply a margin:0 auto;. Alerting the var width is returning NaN. This is my first loop attempt, probably screwed up somewhere! (obviously...) JQuery var width; var NumOfTabs = $('.TabSwitcher .Tab').length; var count = 1; while (count < NumOfTabs){ width = width + $('.TabSwitcher .Tab:nth-child(' + count + ')').width(); count++; } width = width + (NumOfTabs * 4) // Add passing $('.TabSwitcher').css({'width': width + 'px'}); HTML 1 2
has comment: http://stackoverflow.com/comment/44448270
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28031983
has comment: http://stackoverflow.com/comment/44448356
has comment: http://stackoverflow.com/comment/44448350
upvote count: 2
has comment: http://stackoverflow.com/comment/44448577
has comment: http://stackoverflow.com/comment/44448378
type: Question
has comment: http://stackoverflow.com/comment/44448627
has comment: http://stackoverflow.com/comment/44448382
accepted answer: http://stackoverflow.com/a/28031961
has title: Broken JQuery Loop
has comment: http://stackoverflow.com/comment/44448441
has answer: http://stackoverflow.com/a/28032077
has comment: http://stackoverflow.com/comment/44448400
tagged with: javascript
has comment: http://stackoverflow.com/comment/44448318

http://stackoverflow.com/a/28576984
has body: You might have to specifically set the vertical alignment of your &lt;td&gt; elements to something like vertical-align:top because this seems to be the behavior for the default which is vertical-align:baseline. Try adding that css rule/style.
type: Answer
answers question: http://stackoverflow.com/q/27981483
score: 0

http://stackoverflow.com/q/27987985
linked to: http://stackoverflow.com/q/16915661
has body: I was planning to develop a project including VoIP functionality between mobile app client and web browser with Rails as back-end. After I did some research, I had several questions. First I Google it around and found most of VoIP applications have a client installed. Is that possible to just use web browser to make a audio call? I did a project of simple computer-to-computer VoIP with Sockets and some Audio library. I think what I can do is to use sockets to connect web browser (JavaScript?) with mobile client. (I'm not very experienced with Client-side JavaScript so not sure what can be done in browser.) Second I searched about real time application with Rails, and many other developers are talking about rails + node.js + socket.io + redis. For what I'm understanding (not know node.js very well), node.js is a server javascript engine. So does that means there are two back-end running for one application? Last I searched about VoIP in rails and found Adhearsion for Ruby which is built on to asterisk. Adhearsion did have some way to integrate with rails which is good. But does this make for communicate with actual phone (i.e. regular phone call with phone number)? If I installed Adhearsion, do I answer the phone call through terminal or some client application or web browser? I'll continue research more about Adhearsion and other stuff. Any clarification or guidance would be very helpful. Thanks. UPDATE: As for first question, I found WebRTC probably the solution. Some Sources: Are there any web standards for voice over IP? SIP, asterisk, adhearson and VoIP node.js + socket.io + redis + rails — RealTime application http://www.slideshare.net/DieterPisarewski/ruby-voip
type: Question
tagged with: javascript
tagged with: voip
linked to: http://stackoverflow.com/q/3492758
has title: Web based Voice over IP application with Rails
score: 0
linked to: http://stackoverflow.com/q/4628372
answer count: 1
has answer: http://stackoverflow.com/a/27989341
type: UnansweredQuestion
tagged with: sockets
tagged with: ruby-on-rails
tagged with: node.js

http://stackoverflow.com/q/28019250
tagged with: iphone
answer count: 1
tagged with: objective-c
has title: How we get Style with appropriate with class name
tagged with: http://stackoverflow.com/tag/html
has body: I want to replace with their style defined earlier and soon for all class. I am newer in iOS. it is dynamic HTML. which render in any format . I want to replace with appropriate style Sent Sent from Zone Mail for iOS
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/28019851
tagged with: javascript
score: 0

http://stackoverflow.com/comment/44572121
has text: Where *is* angular.js? And what Type is that message in the Problems View? I'm skeptical it's the editor itself or its validator saying that.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28056700

drupal
type: Tag
tags question: http://stackoverflow.com/q/28120137
tag name: drupal

http://stackoverflow.com/a/29071525
type: Answer
score: 0
has body: Please refer this code. Server.js var express = require("express"); var mysql = require("mysql"); var bodyParser = require("body-parser"); var rest = require("./REST.js"); var app = express(); function REST(){ var self = this; self.connect_to_mysql(); } REST.prototype.connect_to_mysql = function() { var self = this; var pool = mysql.createPool({ connectionLimit : 100, host : 'localhost', user : 'root', password : '', database : 'restful_api_demo', debug : false }); pool.getConnection(function(err,connection){ if(err) { self.stop(err); } else { self.configureExpress(connection); } }); } REST.prototype.configureExpress = function(connection) { var self = this; app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); var router = express.Router(); app.use('/api', router); var rest_router = new rest(router,connection); self.start_server(); } REST.prototype.start_server = function() { app.listen(3000,function(){ console.log("All right ! I am alive at Port 3000."); }); } REST.prototype.stop = function(err) { console.log("ISSUE WITH MYSQL \n" + err); process.exit(1); } new REST(); // Instantiate clas Here is REST.js function REST_ROUTER(router,connection) { var self = this; self.handle_routes(router,connection); } REST_ROUTER.prototype.handle_routes = function(router,connection) { router.get("/",function(req,res){ res.json({"Message" : "Hello World !"}); }) } module.exports = REST_ROUTER; Link : http://codeforgeek.com/2015/03/restful-api-node-and-express-4/
answers question: http://stackoverflow.com/q/27973190

http://stackoverflow.com/comment/44587293
has text: thanks that does work. but i dont think i explained it properly in my question. is there a way to filter by value? i want it the code to be able to print to screen the Brazil flag when i type in Brazil and the Argentina flag when i type in Argentina AND i only want it to show a flag where one result remains. e.g. if i type in South i dont want it to show both South Africa and South Sudan. make sense?
comment on: http://stackoverflow.com/a/28094092
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44479715
type: QuestionComment
has text: please search about 'import' tag, which may be supported in future browser. It has same concept. I like such architecture that browser can build a site dynamically from html modules loaded from server.
type: Comment
comment on: http://stackoverflow.com/q/28042877
score: 0

http://stackoverflow.com/comment/44406036
comment on: http://stackoverflow.com/q/28008852
score: 0
type: Comment
type: QuestionComment
has text: @lftah Your example parse command works just fine, you just forgot a closing ")" at the end.

ember-data
tags question: http://stackoverflow.com/q/28076689
tags question: http://stackoverflow.com/q/28035300
type: Tag
tags question: http://stackoverflow.com/q/28030356
tags question: http://stackoverflow.com/q/28094306
tags question: http://stackoverflow.com/q/27971242
tags question: http://stackoverflow.com/q/27973406
tags question: http://stackoverflow.com/q/27972615
tags question: http://stackoverflow.com/q/28012514
tags question: http://stackoverflow.com/q/27993234
tags question: http://stackoverflow.com/q/28008733
tags question: http://stackoverflow.com/q/27967520
tags question: http://stackoverflow.com/q/28104484
tag name: ember-data
tags question: http://stackoverflow.com/q/28120066
tags question: http://stackoverflow.com/q/28116625
tags question: http://stackoverflow.com/q/28024422

http://stackoverflow.com/comment/44331320
comment on: http://stackoverflow.com/a/27969248
type: AnswerComment
score: 0
type: Comment
has text: What a timing.. Our answers are posted exactly at the same time.. 17-21-21, you were milliseconds ahead of me.. :D

http://stackoverflow.com/comment/44419639
comment on: http://stackoverflow.com/q/28016084
type: Comment
type: QuestionComment
has text: What does JavaScript have to do with this? Bad Tag
score: 0

http://stackoverflow.com/comment/44428296
type: QuestionComment
comment on: http://stackoverflow.com/q/28020478
type: Comment
has text: @Marian07 [jsBeautifier](http://jsbeautifier.org/) is your friend ; ).
score: 1

http://stackoverflow.com/comment/44376558
has text: this is CSS, what does it have to do with jQuery?
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27992850

http://stackoverflow.com/q/28036614
score: -2
linked to: http://stackoverflow.com/q/18248851
linked to: http://stackoverflow.com/q/28531345
type: UnansweredQuestion
has body: I am creating a cross-platform application with Awesomium using Mono(C#). I am trying to create app with HTML/CSS/JS UI, so on main form only one item - Awesomium WebView. But I am new at this thus I know nothing about logic and structure of the applications with HTML/CSS/JS GUI. My application not will be absolutely standalone, it will be connect to the server and receive data from it, but I want UI which will be on the client side and which will not be loaded from a server every time. So I need sample application which uses Awesomium or another similar SDK for the standalone GUI, not like web-browser. Or I need detailed explanation about logic and structure of the application with HTML UI(for example how I need to store my html/css/js files? Like the regular html/css/js files? Is it safely? etc). Thanks!
upvote count: 1
tagged with: awesomium
linked to: http://stackoverflow.com/q/25014442
downvote count: 3
has answer: http://stackoverflow.com/a/28154007
type: Question
has title: Structure of standalone HTML UI
tagged with: user-interface
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/44568692
type: Comment
has text: See if you can mimic that script in JSFiddle on your side and see if it works.
comment on: http://stackoverflow.com/a/28096038
type: AnswerComment
score: 0

http://stackoverflow.com/q/28102391
accepted answer: http://stackoverflow.com/a/28128113
has comment: http://stackoverflow.com/comment/44581158
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/28128113
has title: Kendo Grid keydown event
favorite count: 0
has answer: http://stackoverflow.com/a/28109096
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44580796
tagged with: kendo-asp.net-mvc
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: angularjs-directive
tagged with: kendo-grid
possible better answer: http://stackoverflow.com/a/28109096
has body: I have initiated a Kendo Grid using Kendo directives. How do I catch the keydown/keypress event of the grid? My final objective is to populate a grid column based on user input of another column. For example, populate the phone number when the first name is entered. For that I believe I have to use the Kendo Grid edit and the keypress events and do a search on the user input, unless there's a better way to do it. Is this possible? This is how I initialized the grid: &lt;section id="dashboard-view" class="mainbar" data-ng-controller="dashboard as vm"&gt; .... &lt;div kendo-grid="vm.testGrid" k-options="vm.testGridOptions" k-rebind="vm.testGridDataSource.data" k-on-edit="vm.onEdit(kendoEvent)"&gt;&lt;/div&gt; .... &lt;/section&gt; Options defined in my JavaScript file: vm.testGridOptions = { columns: [ { field: "Id", title: "ID" }, { field: "FirstName", title: "First Name" }, { field: "LastName", title: "Last Name" }, { field: "Phone", title: "Phone" }, { command: ["destroy"] } ], toolbar: ["create", "save", "cancel"], dataSource: vm.testGridDataSource, editable: { createAt: "bottom" }, height: 400, autoBind: false }; vm.onEdit = function (e) { //if grid column == Id &amp;&amp; keypressed == Tab key //search }; The grid is on batch edit mode.
tagged with: javascript

http://stackoverflow.com/a/28015170
downvote count: 0
has comment: http://stackoverflow.com/comment/44419396
answers question: http://stackoverflow.com/q/28011359
has comment: http://stackoverflow.com/comment/44419077
has comment: http://stackoverflow.com/comment/44419165
type: Answer
has comment: http://stackoverflow.com/comment/44418073
has comment: http://stackoverflow.com/comment/44418149
has comment: http://stackoverflow.com/comment/44418976
upvote count: 2
score: 2
has body: is there any way to "reset" (clear) module in requirejs? You can use requirejs.undef(), but the documentation mention some gotchas. And to my knowledge there is no call you can use to say "unload this module and everything it depends on", which in a complex application is probably what is needed. is there any better approach to run karma and requirejs, so that modules do not have any remains (side effects) of other tests (it function calls) on them ? The better approach is to design your application so that state is tied to an object you instantiate rather than to the module itself. This is what I do in the test suite for a large application of mine. The beforeEach hook resets what requires resetting and instantiates the application anew for each test.

http://stackoverflow.com/q/28011557
accepted answer: http://stackoverflow.com/a/28011576
has body: I have a div with a unique id='myDiv'. In a CasperJS test, I need to verify that this div is not displayed (i.e., display=none). How can I achieve this?
type: Question
type: AnsweredQuestion
answer count: 2
has answer: http://stackoverflow.com/a/28011576
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/28011624
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28011624
tagged with: css
has title: How to test if a div is not displayed?
tagged with: casperjs

http://stackoverflow.com/q/27997373
has comment: http://stackoverflow.com/comment/44384583
has answer: http://stackoverflow.com/a/27997489
has answer: http://stackoverflow.com/a/27997446
has comment: http://stackoverflow.com/comment/44384616
score: 1
type: Question
has answer: http://stackoverflow.com/a/27997586
upvote count: 1
has answer: http://stackoverflow.com/a/27997430
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27997425
has comment: http://stackoverflow.com/comment/44384622
has body: I have a date from my textbox of '2015-02-17' (yy-mm-dd) format. Now I want to return only the month number of 2 and a year of 2015. I can't do it correctly using getMonth() function. I tried the following: // Get date value from the textbox var t_date = $("#t_date").val(); // 2015-01-17 alert(t_date.getMonth()); It does not show the alert box. Seems like my code is not valid. Please help. Thanks
answer count: 5
has title: How to return month number and year using javascript in YY-MM-DD format?
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44385530

http://stackoverflow.com/comment/44511578
has text: *threaded sorry not treaded
comment on: http://stackoverflow.com/q/28065173
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28066818
has body: Look for this line of code: var productName = 'ChW: Ladie's Summer Stylish Envelope Handbag'; You either need to use double quotes to surround the string, or escape that apostrophe in "Ladie's". (The correct spelling is "Ladies'" btw). Escape it with a backslash: Ladies\' You've also got a number of other errors like jQuery not loading, but I think this is the one it's complaining about.
type: Answer
answers question: http://stackoverflow.com/q/28066465
score: 0

http://stackoverflow.com/q/28034155
has answer: http://stackoverflow.com/a/28042037
type: Question
has answer: http://stackoverflow.com/a/28043312
answer count: 3
has answer: http://stackoverflow.com/a/28065053
tagged with: javascript
tagged with: ckeditor
has title: Ckeditor: customize specific areas
score: 0
has body: I would like to enable Ckeditor on a specific website page to manage HTML content. The problem is that I would like to keep a specific HTML strcture as following: Some text Some link caption Some title Some description text (lorem ipsum dolor sit amet consectetuer ...) I need to make each "text" elements customisable: Some text Some link caption Some title Some description text (lorem ipsum dolor sit amet consectetuer ...) The aim is to prevent changes into HTML strcture (I guess there should be some "readonly" parts). If not implemented with ckeditor, maybe I can use another plugin? Thank you for your help!
type: UnansweredQuestion

http://stackoverflow.com/a/28145889
has comment: http://stackoverflow.com/comment/56906633
type: AcceptedAnswer
upvote count: 7
type: Answer
accepted answer of: http://stackoverflow.com/q/28112863
answers question: http://stackoverflow.com/q/28112863
has body: This is very popular Foundation issue: http://foundation.zurb.com/forum/posts/965-fixed-menu-using-offcanvas http://foundation.zurb.com/forum/posts/547-off-canvas-with-fixed-top-bar https://github.com/zurb/foundation/issues/3863 https://github.com/zurb/foundation/issues/3710 Despite of it seems that official solution doesn's exist yet I have found this one (reference) which looks like a nice fix of your problem. HTML Foundation 5 test Foundation [...] The Psychohistorians [...] Content Content Build with HTML Arrival 2 [...] Content [...] ... CSS article { overflow-y: auto; } article, body, html, .off-canvas-wrap, .off-canvas-wrap .inner-wrap, .row { height: 100%; width: 100%; } .header { position: absolute; top: 0; width: 100%; z-index: 99; }
has comment: http://stackoverflow.com/comment/46276301
downvote count: 0
score: 7

http://stackoverflow.com/q/28044874
has answer: http://stackoverflow.com/a/28045006
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/44472415
has comment: http://stackoverflow.com/comment/44472336
type: Question
has body: I'm building a script to show/hide some content when a checkbox is checked. Since my content is divided in multiple pages I need the checkbox to stay checked when you change pages. I've read about localStorage, tried that and it works nice. The proble however is that my script isn't firing when you change page. So the checkbox keeps checked but the content which shouldn't be visible is still visible. So what I have (don't mind the Twig tags, the script itself works!!) $(function() { var test = localStorage.input === 'true' ? true : false; $('#stock').prop('checked', test || false); }); $(document).ready(function() { $.getJSON('?format=json', function(data) { $.each(data.product.variants, function(index, variant) { if (variant.stock.on_stock) { $('.item-image-container.{{ product.id }}') .find('figure') .after(' '); $('.label_ship.{{ product.id }}').addClass('active'); } }); }); $('#stock').change(function() { localStorage.input = $(this).is(':checked'); if (this.checked && !$('.label_ship.{{ product.id }}') .hasClass('active')) { $('.stock-check-{{ product.id }}').fadeOut('fast'); } else { $('.stock-check-{{ product.id }}').fadeIn('fast'); } }); }); show only on stock Can anybody help with that? Is it perhaps better to wrap everything in a functioin and then re-run that function when page changes??
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Re-run script after localStorage
has comment: http://stackoverflow.com/comment/44472499
has comment: http://stackoverflow.com/comment/44472357

http://stackoverflow.com/q/28050605
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28060974
has title: Video-JS issue playing on iPad (sound only)
type: Question
tagged with: javascript
score: 0
has body: I have a website that has a video playing on it using Video-JS. It works fine, apart from on an iPad, in which case there is a 50/50 chance that the video will play with audio only. However, rotating the iPad causes the video to display properly, at the point that it should be at (synced with the audio). I am not entirely sure what's going wrong, since sometimes it does work so I doubt it is the video stream itself. Apart from that the video-js integration script is pretty textbook and seems to work on everything else.
answer count: 1
tagged with: ipad
tagged with: video.js

http://stackoverflow.com/comment/44518237
comment on: http://stackoverflow.com/q/28069001
score: 0
type: QuestionComment
type: Comment
has text: Can you post also the CSS part?

http://stackoverflow.com/a/28158026
score: 2
has comment: http://stackoverflow.com/comment/44704861
answers question: http://stackoverflow.com/q/28050645
has body: If you change the div tags to button instead (for the clickable elements), or make the div text unselectable (e.g disabling user-select with css) it should work as you expect. The reason is that when you click on the div with text inside, the execCommand targets the div's text (which is not contenteditable) so the command fails silently. Try adding contenteditable="true" to the div and you'll see that it will bold the div's text if you click on it. Alternatively, try adding the css rule -webkit-user-select: none; (on Chrome, vendor prefixes differ on other browsers) to disable text selection on the div, and you'll see that the execCommand works just fine. See a working demo here. Code examples, for clarity: Option 1 bold Option 2 bold
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44705062
type: Answer
accepted answer of: http://stackoverflow.com/q/28050645
upvote count: 2

http://stackoverflow.com/comment/44661760
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/28122724
score: 0
has text: Looking at the models doneProject is not defined anywhere neither is doneProjectComment

http://stackoverflow.com/comment/44595969
type: Comment
type: QuestionComment
has text: @David Any one of the code is not hitting the Add to cart button
comment on: http://stackoverflow.com/q/28110966
score: 0

http://stackoverflow.com/q/27983468
tagged with: underscore.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27983511
tagged with: javascript
has title: Underscore templates with Backbone view
has comment: http://stackoverflow.com/comment/44384093
tagged with: backbone.js
type: Question
tagged with: templates
score: 0
has body: I am having trouble passing a Backbone collection to an Underscore template in my HTML. Right now in the template code <%=teamCollection%> is undefined. teamCollection is the Backbone collection I want to pass from the Backbone view into the template. Here is the template code: And here is the Backbone code: var Team = Backbone.Model.extend({ idAttribute: "_id", urlRoot: '/api/teams' }); var TeamCollection = Backbone.Collection.extend({ model: Team }); var teamCollection = new TeamCollection([]); var UserHomeMainTableView = Backbone.View.extend({ tagName: "div", collection: teamCollection, events: {}, initialize: function () { this.render(); }, render: function() { //this.template = _.template($('#tmpl').html()); var userHomeMainTableTemplate = document.getElementById('user-home-main-table-template').innerHTML; var template = _.template(userHomeMainTableTemplate); //this.$el.html(_.template(userHomeMainTableTemplate)()); this.$el.html(template({teamCollection:teamCollection})); console.log('userHomeMainTableTemplate rendered'); return this; }, addTeam: function (teamData) { console.log('adding team:', team_id); } }); here is a JSFiddle that corresponds to this question, which I obviously can't get working either: http://jsfiddle.net/the1mills/26dkh5wa/
answer count: 1

http://stackoverflow.com/comment/44504059
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28059938
type: Comment
has text: Thanks! It works perfectly! and thanks for the explanation on `\b` too! Totally saves my day. :D

http://stackoverflow.com/q/27973980
has comment: http://stackoverflow.com/comment/47035605
answer count: 2
tagged with: turbolinks
downvote count: 0
has title: UserReport and Turbolinks - How to make JS turbolinks compatible?
linked to: http://stackoverflow.com/q/29101155
favorite count: 0
type: UnansweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/31661983
has body: I'm running rails, and I've got this code at end of my body tag. :javascript var _urq = _urq || []; _urq.push(['initSite', 'mySiteId']); (function() { var ur = document.createElement('script'); ur.type = 'text/javascript'; ur.async = true; ur.src = ('https:' == document.location.protocol ? 'https://cdn.userreport.com/userreport.js' : 'http://cdn.userreport.com/userreport.js'); var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ur, s); })(); No matter what I do, clicking any and all turbolink enabled links breaks this code. The button disappears. I've tried encapsulating the code inside a function called userReport, and then doing something like this: $(document).ready(userReport); $(document).on('page:load', userReport); This does not work. Suggestions are very welcome :)
tagged with: ruby-on-rails
type: Question
score: 3
has answer: http://stackoverflow.com/a/29432935
tagged with: javascript
has comment: http://stackoverflow.com/comment/47133090

http://stackoverflow.com/q/28003664
answer count: 1
has comment: http://stackoverflow.com/comment/44397121
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/44396479
has title: Deferred, Promises, and Ajax not going in correct order
has comment: http://stackoverflow.com/comment/44396315
has comment: http://stackoverflow.com/comment/44396551
type: AnsweredQuestion
has body: I'm trying to set up a loop of Ajax calls and a function that runs after all the Ajax calls have resolved. I read through a bunch of SO questions on this problem and thought I was able to apply it to my code, but it isn't working and I can't for the life of me figure out why. Here's the JS code. The map function runs 10 times FYI. function addData(data) { var deferreds = []; $.map(data, function(job) { deferreds.push(addLocation(job)); }); console.log(deferreds); $.when.apply($, deferreds).then(mapData(data)); } function addLocation(job) { var dfd = $.Deferred(), url = url; console.log('in the addLocation function, outside the ajax call'); $.ajax({ url: url, dataType: 'jsonp', jsonp: 'json_callback' }).done(function(location) { job.lnglat = [parseFloat(location[0].lon), parseFloat(location[0].lat)]; console.log('resolved location'); dfd.resolve(); }); return dfd.promise(); } function mapData(data) { console.log('in the mapData function'); console.log(data); var point = svg.selectAll('points') .data(data); point.exit().remove(); point.enter().append('circle') .attr('r', 2.5); point .attr('cx', function(d) { console.log(d); //shows d and has the lnglat but I think that is due to the developer tools reading the final result, not the result at the time console.log(d.lnglat); // this gives undefined console.log(d.lnglat[0]); // this gives an error as it hasn't been defined console.log(projection(d.lnglat[0])); return projection(d.lnglat[0])[0]; }) .attr('cy', function(d) { return projection(d.lnglat[1])[1]; }); } The Chrome Developer tools reports the following order: in the addLocation function, outside the ajax call //x10 [Object, object...] //this is the object list of deferred objects, there are 10 of them in the mapData function [Object, object..] //this is the object list of data from the mapData function Object &gt; ... //this is the d object in the mapData function &gt; point anonymous function undefined // this is the result of d.lnglat Uncaught typeError ... //…
has comment: http://stackoverflow.com/comment/44396135
has comment: http://stackoverflow.com/comment/44396624
type: Question
has answer: http://stackoverflow.com/a/28004406
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28004406
score: 0

http://stackoverflow.com/comment/44458652
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28035272
score: 0
has text: Do you want to know why `req.end();` inside `res.on` is not working?

http://stackoverflow.com/comment/44550956
comment on: http://stackoverflow.com/q/28076875
has text: Thanks, I have fixed it. It was a hyperlink misbeahving that was only picked up on chrome. Many thanks for taking to time to look though
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44465272
comment on: http://stackoverflow.com/q/28040717
has text: the first class is "right" - 200px to the right, so it shouldnt be up.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44573318
type: Comment
type: QuestionComment
has text: Could you extend it instead? Create your own constructor that has all of foo's instance methods/properties, with a new `do` method?
comment on: http://stackoverflow.com/q/28098602
score: 0

http://stackoverflow.com/q/28051444
type: Question
tagged with: mongodb
tagged with: mongoose
tagged with: javascript
tagged with: express
score: 0
answer count: 1
has title: Why is a Mongo Id pushed to array instead of an Object?
has body: I am creating my first backend project with Node.js. I am building a stock trading app with Express 4, and Mongoose.The User has a list of stock objects {symbol: amount}. When the user wants to buy a stock, they send a POST request with stock, an amount, and a verb in this case 'buy'. In the Post, I take the stock and amount from the request body and add it to the User's stock list, and also add the data to a list of actions. I POST a request with {stock: 'F', amount: '2', verb: 'buy'} so the resulting stock list should be stocks:[{'F': '2'}] and actions: [{"time": "2015-01-20T19:07:15.000Z", "verb": "buy", "amount": 2, "stock": "P",}] When I do user.stocks.push(stockObject); user.stocks becomes [{ _id: 54be8739dd63f94c0e000004 }] instead of [{'F': '2'}] and the action list becomes "actions": [ { "time": "2015-01-20T19:07:15.000Z", "verb": "buy", "amount": 2, "stock": "P", "_id": "54bea763589e571f0f000004" }] with an _id added to it. Why is the stock list only getting an object with an id, when the action list is getting the full object with an id? var UserSchema = new Schema({ id: String, stocks: [{ symbol: String, amount: Number }] }); router.route('/user/:user_id/action') .post(function(req, res) { User.findOne({ id: req.params.user_id }, function(err, user) { if (err) res.send(err); var stock = req.body.stock; var amount = req.body.amount; var stockObject = {}; if(req.body.verb === 'buy') { stockObject[stock] = amount; } var action = { time: Date(), verb: req.body.verb, amount: req.body.amount, stock: req.body.stock } user.stocks.push(stockObject); user.actions.push(action); user.save(function(err) { if (err) res.send(err); res.json({ actions: user.actions, stocks: user.stocks }); }); }); })
has answer: http://stackoverflow.com/a/28051683
type: UnansweredQuestion
tagged with: node.js

http://stackoverflow.com/q/28047508
upvote count: 1
type: AnsweredQuestion
has body: Create a web project in Visual Studio 2013, remove all scripts (which could interfere) and add this: &lt;script type="text/javascript" src="~/Scripts/jquery-1.8.2.min.js"&gt;&lt;/script&gt; &lt;!-- Note that the version might be different --&gt; &lt;script type="text/javascript"&gt; jQuery(window).bind('beforeunload', function (e) { var message = "Why are you leaving?"; e.returnValue = message; return message; }); &lt;/script&gt; The onbeforeunload event won't fire. However if you open this with Visual Studio 2012 it will work (note that to open it with Visual Studio 2012 you shouldn't use ASP.NET MVC 5).
score: 1
type: Question
has answer: http://stackoverflow.com/a/28047509
linked to: http://stackoverflow.com/q/23101265
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/28047509
answer count: 1
tagged with: browser-link
tagged with: onbeforeunload
tagged with: visual-studio-2013
has title: onbeforeunload doesn't work from Visual Studio 2013

database-connection
tags question: http://stackoverflow.com/q/28069677
type: Tag
tag name: database-connection

http://stackoverflow.com/a/28118801
upvote count: 1
has comment: http://stackoverflow.com/comment/44612704
score: 1
has comment: http://stackoverflow.com/comment/44649410
answers question: http://stackoverflow.com/q/28118363
has body: I updated the fiddle. http://jsfiddle.net/d6r7gffs/5/ is automatic play and http://jsfiddle.net/d6r7gffs/4/ is wrapped in a function so you could restart the slider when it reaches the end. I simplified the code a bit. Also, it really wasn't clear in your example what was a slide and what was a line. The line's had position:absolute; so they would appear on top of each other (were these supposed to be the slides?). Anyway, I gave the ul's the class slide so that it is clear what the elements in the example are supposed to be. If this wasn't you intent, you should be able to understand how to modify it to your needs. (function ($) { var linePause = 2000; var wordPause = 100; var slidePause = 8000; //this will execute on load to parse the words into spans $('.example ul.slide &gt; li').each(function(){ var words = $(this).html().split(' '); $(this).html('').hide(); for(var i = 0; i &lt; words.length; i++){ $(this).append($('&lt;span&gt;&lt;/span&gt;') .text(words[i] + (i+1 == words.length ? '' : ' ')) .hide()); } }); //this will run the animation on the created spans (function showNextSlide(slide){ slide.eq(0).fadeIn(500, function(){ (function showNextLine(line){ line.eq(0).fadeIn(500, function(){ (function showNextWord(word){ word.eq(0).fadeIn(wordPause, function(){ (word=word.slice(1)).length &amp;&amp; showNextWord(word); }); })(line.eq(0).find('span')); }) .delay(linePause) .queue(function(){ (line=line.slice(1)).length &amp;&amp; showNextLine(line); $(this).dequeue(); }); })(slide.eq(0).find('li')); }) .delay(slidePause) .fadeOut(500, function(){ (slide=slide.slice(1)).length &amp;&amp; showNextSlide(slide); }); })($('.slide')) })(jQuery); Look at this like a nested for each loops (I know it's recursion but it models the same way): for each slide in slider for each line on slide for each word on line. If you need additional clarification, let me know and I will be happy to help.
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/44684863

http://stackoverflow.com/comment/44498751
comment on: http://stackoverflow.com/a/28052584
has text: I dont know how to forward this to google looks like many people are going to effected but guess we were the first ones to realise this issue.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/27989115
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27991225
score: 0
tagged with: canvas
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/44370396
has body: I have a CanvasJs chart and the dimension is fine. I decided to add a link to show or hide the chart and now the chart is shrank in width. When I resize the browser window by dragging the window handles it changes to the width it's suppose to have. HTML: See chart CSS: #charts_wrapper{ display: none; } .chartContainer{ height: 300px; width: 100%; margin-bottom: 50px; } JS that generates the chart: window.onload = function () { var grades = <?php echo json_encode($grades);?>; if("" != grades){ var chartObject1 = { title:{ text: "" }, axisY: { prefix: "", suffix: "%", minimum: 0, maximum: 100, interval: 5, title: "Notas" }, axisX: { title: "Subjects" }, data: [ { type: "bar", toolTipContent: "{label}: {y}%", dataPoints: [] } ] }; for(var key in grades) { var value = grades[key]; var obj = {}; obj.label = key; obj.y = parseInt(value); chartObject1['data'][0]['dataPoints'].push(obj); } var chartdiv = ' '; $('#charts_wrapper').append(chartdiv); var chart1 = new CanvasJS.Chart("chartContainer1", chartObject1); chart1.render(); } } JS display div: function showTests(){ $('#charts_wrapper').slideToggle(); } Will appreciate any help.
tagged with: canvasjs
has title: Canvas size affected by jQuery slide toggle
has comment: http://stackoverflow.com/comment/44373099
has comment: http://stackoverflow.com/comment/44369760

http://stackoverflow.com/comment/44503150
type: QuestionComment
comment on: http://stackoverflow.com/q/28034771
has text: Great it means the data is fine. Please check what is the 'observer' referring to. This data should be appended to your dropdown
score: 0
type: Comment

cookies
tags question: http://stackoverflow.com/q/28051857
type: Tag
tags question: http://stackoverflow.com/q/28116801
tags question: http://stackoverflow.com/q/28080087
tags question: http://stackoverflow.com/q/28086087
tags question: http://stackoverflow.com/q/27983153
tags question: http://stackoverflow.com/q/27975452
tags question: http://stackoverflow.com/q/28062805
tags question: http://stackoverflow.com/q/28038929
tags question: http://stackoverflow.com/q/28019324
tag name: cookies
tags question: http://stackoverflow.com/q/28059499
tags question: http://stackoverflow.com/q/28054699
tags question: http://stackoverflow.com/q/28078360
tags question: http://stackoverflow.com/q/27967150
tags question: http://stackoverflow.com/q/28099470
tags question: http://stackoverflow.com/q/28119444
tags question: http://stackoverflow.com/q/28046360
tags question: http://stackoverflow.com/q/28086180

http://stackoverflow.com/comment/44423509
type: AnswerComment
type: Comment
has text: Yes why not , you can have a look at this http://stackoverflow.com/questions/11234920/changing-css-class-in-knockout-js-on-mouse-click
comment on: http://stackoverflow.com/a/28018222
score: 1

http://stackoverflow.com/comment/44572465
type: QuestionComment
type: Comment
score: 0
has text: Reading both questions, I don't understand how this is useful. Additionally, it seems like a very very poor choice to couple javascript to css. I tend to [Decouple My HTML, CSS, and JavaScript](http://philipwalton.com/articles/decoupling-html-css-and-javascript/).
comment on: http://stackoverflow.com/q/28082556

http://stackoverflow.com/comment/44338728
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27971519
score: 0
has text: @EthanJewett good point, that's more or less what the example I linked is doing.

http://stackoverflow.com/comment/44368102
has text: OMG thank you! It's always the little things!
comment on: http://stackoverflow.com/q/27988389
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/28013226
has body: So here's what I have so far. What I'd like my code to render is that if any of the three user inputs are invalid, the corresponding error message should be displayed on screen. As it is at the moment, this does not happen....also what I thought would be a nice touch is that once the correct input has been typed, that it would then display a green tick mark after the input field, alas I have been unable to implement this. Validation John Doe (C1_A2_2015) 4 Digit PIN: Surname: E-mail:
favorite count: 0
score: -1
has comment: http://stackoverflow.com/comment/44413693
has comment: http://stackoverflow.com/comment/44413726
type: Question
has answer: http://stackoverflow.com/a/28013398
has title: Validation form using Javascript, seem to be missing a little code or perhaps a little understanding
has comment: http://stackoverflow.com/comment/44413655
answer count: 1
downvote count: 1
upvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/7816863
accepted answer: http://stackoverflow.com/a/28013398
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44413766
tagged with: validation

http://stackoverflow.com/a/28021731
has comment: http://stackoverflow.com/comment/44430500
has body: The only way you'd be able to so that is by converting the string to a number typeof (5 + parseInt("7")) N.b. that's if you are using the plus operator, multiply/divide/minus work differently and will convert the string type to a number (unless NaN)
answers question: http://stackoverflow.com/q/28021668
score: 0
type: Answer

http://stackoverflow.com/q/28075131
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has comment: http://stackoverflow.com/comment/44529790
type: AnsweredQuestion
downvote count: 3
has answer: http://stackoverflow.com/a/28075440
type: Question
score: -2
tagged with: javascript
has body: please help remove the text node "Бесплатно!". here's my attempt on jsfiddle. the problem is that I only delete the first node, but others remain Here is the simplified code: qqq 3.50 из 5 Рейтинг 3.50 из 5 deleteNode ...... ...... ...... ......
upvote count: 1
has answer: http://stackoverflow.com/a/28075402
accepted answer: http://stackoverflow.com/a/28075402
has title: how to delete a text node?
has answer: http://stackoverflow.com/a/28075485
has answer: http://stackoverflow.com/a/28075310
possible better answer: http://stackoverflow.com/a/28075440
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/28092921
type: Answer
has body: You should include the file extension in templateUrl: routeProvider .when('/', { templateUrl: 'partials/landing.jade', controller: 'taskController' }). when('/task', { templateUrl: 'partials/task.jade', controller: 'taskController' }). otherwise({redirectTo: '/'});
score: 0
answers question: http://stackoverflow.com/q/28092809

http://stackoverflow.com/a/28043381
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28043338
downvote count: 0
has body: In general, you can't. The point of defining a function inside another function is to scope it to that function. The only way for b to be accessible outside of a is if (when you call a) you do something inside a to make it available outside of a. This is usually done to create a closure, so that b could access variables from a while not making those variables public. The normal way to do this is to return b. function a() { var c = 0; function b() { alert(c++); } return b; } var d = a(); d(); d(); d(); var e = a(); e(); e(); e();
answers question: http://stackoverflow.com/q/28043338
type: Answer
score: 7
upvote count: 7

http://stackoverflow.com/comment/44554861
comment on: http://stackoverflow.com/a/28084599
score: 0
type: AnswerComment
has text: Any chance to do this image picker responsive?
type: Comment

http://stackoverflow.com/comment/44572843
type: QuestionComment
has text: What's the size of the code without dependencies?
type: Comment
score: 1
comment on: http://stackoverflow.com/q/28098487

http://stackoverflow.com/a/33024929
has comment: http://stackoverflow.com/comment/71188757
has body: (PLEASE NOTE - In December 2017, the gulp-util module was deprecated.) To build on the answer by Jacob Budin, I recently tried this and found it useful. var gulp = require("gulp"); var util = require("gulp-util"); var changed = require("gulp-changed"); gulp.task("copyIfChanged", function() { var nSrc=0, nDes=0, dest="build/js"; gulp.src("app/**/*.js") .on("data", function() { nSrc+=1;}) .pipe(changed(dest)) //filter out src files not newer than dest .pipe(gulp.dest(dest)) .on("data", function() { nDes+=1;}) .on("finish", function() { util.log("Results for app/**/*.js"); util.log("# src files: ", nSrc); util.log("# dest files:", nDes); }); } Update (April 2021): Re the deprecated module issue. Try replacing util.log from require('gulp-util') with log from require('fancy-log'). The rest of the approach should still work. Disclaimer: I haven't tested this.
score: 18
has comment: http://stackoverflow.com/comment/109088554
has comment: http://stackoverflow.com/comment/69212309
type: Answer
downvote count: 1
upvote count: 19
answers question: http://stackoverflow.com/q/27975129
has comment: http://stackoverflow.com/comment/69162542

http://stackoverflow.com/comment/44419182
score: 0
type: Comment
has text: How do you know what error he has when he hasn't told us? And that is NOT what the error in your answer says... read it again... your interpretation is 100% incorrect.
comment on: http://stackoverflow.com/a/28015521
type: AnswerComment

http://stackoverflow.com/comment/44390099
type: QuestionComment
comment on: http://stackoverflow.com/q/28000222
score: 0
type: Comment
has text: Second question: with this solution http://stackoverflow.com/a/11419341/1861097 you can get levels count and then you can use eg. `.css("margin-left",level*5+"px")`

http://stackoverflow.com/comment/44539474
score: 0
has text: @qamar, I am using onClick()
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28080393

http://stackoverflow.com/q/28014113
upvote count: 2
has title: Why does this throw a Uncaught TypeError: Illegal invocation
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28014160
type: Question
accepted answer: http://stackoverflow.com/a/28014160
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/44415427
tagged with: javascript
tagged with: web
favorite count: 0
tagged with: typeerror
has body: Why does this throw a "Uncaught TypeError: Illegal invocation"? function Game () { this.reqAnimFrame = window.requestAnimationFrame; this.gameLoop = function () { this.reqAnimFrame(this.gameLoop); // It's thrown on this line }; } var game = new Game(); game.gameLoop();
score: 2

http://stackoverflow.com/q/28015319
tagged with: iron-router
type: AnsweredQuestion
upvote count: 5
has title: Meteor / Iron Router external redirection
type: Question
score: 5
has answer: http://stackoverflow.com/a/28015628
accepted answer: http://stackoverflow.com/a/28015628
answer count: 1
downvote count: 0
has body: So I'm creating a basic vanity URL system, where I can have http://myURL.com/v/some-text, grab an item from the database and redirect to a specific URL based on whether or not the client is mobile/desktop and other features. I usually build Facebook apps, so in the case of desktop they would be redirected to a Facebook URL, otherwise on mobile I can just use normal routes. Is there a way to redirect from Iron Router on the server-side to an external website? this.route('vanity',{ path: '/v/:vanity', data: function(){ var vanity = Vanity.findOne({slug:this.params.vanity}); // mobile / desktop detection if(vanity){ if(mobile){ // Redirect to vanity mobile link }else{ // Redirect to vanity desktop link } }else{ Router.go('/'); } } });
tagged with: javascript
tagged with: meteor
favorite count: 0

http://stackoverflow.com/comment/44580092
type: Comment
type: QuestionComment
has text: Can you give an example? Like ... what should the output be if the paragraph tag has "this is a fine dress. we like dresses like these. So if you dress in a dress, we want your address to send the new dress"?
score: 0
comment on: http://stackoverflow.com/q/28102356

http://stackoverflow.com/q/28120378
tagged with: javascript
has answer: http://stackoverflow.com/a/31307445
answer count: 3
downvote count: 0
favorite count: 0
has body: I am doing the activity, referenced above, wherein the program needs to search for an entry by last name, find that entry, and then return the first and last name of all entries that match the last name. The activity can be found here. My code displays the correct message after running (Bob Jones), but it comes with an error message that says: "TypeError: Cannot read property 'lastName' of undefined" I cannot figure out where the error message is coming from, nor how to resolve it. Any input would be welcome. My code: var bob = { firstName: "Bob", lastName: "Jones", phoneNumber: "(650) 777-7777", email: "bob.jones@example.com" }; var mary = { firstName: "Mary", lastName: "Johnson", phoneNumber: "(650) 888-8888", email: "mary.johnson@example.com" }; var contacts = [bob, mary]; function printPerson(person) { console.log(person.firstName + " " + person.lastName); } function list() { var contactsLength = contacts.length; for (var i = 0; i &lt; contactsLength; i++) { printPerson(contacts[i]); } } /*Create a search function then call it passing "Jones"*/ function search(lastName) { for (var i = 0; i &lt;= contacts.length; i++) { if (contacts[i].lastName === lastName) { printPerson(contacts[i]); } } }; search("Jones");
has answer: http://stackoverflow.com/a/42454893
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28120406
possible better answer: http://stackoverflow.com/a/42454893
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/28120406
type: Question
has title: Codecademy Building an Address Book 5/6
tagged with: arrays

http://stackoverflow.com/q/28071096
has answer: http://stackoverflow.com/a/28071238
has answer: http://stackoverflow.com/a/28071199
has title: Javascript HTML DOM select
has answer: http://stackoverflow.com/a/28071252
type: Question
has comment: http://stackoverflow.com/comment/44521873
tagged with: javascript
has comment: http://stackoverflow.com/comment/44522415
has body: I have a question regarding HTML element selection using javascript. Here is my code: Javascript &lt;script&gt; function changeText() { document.getElementsByClassName("CentralContainer")[0].getElementsByClassName("PlayFlowSelect")[0].childNodes[1].innerHTML = "Custom Stream"; } &lt;/script&gt; HTML &lt;div class="CentralContainer"&gt; &lt;div class = "PlayFlowSelect"&gt; &lt;input type="image" src="./Home Page Resources/ArrowLeftIcon.png" onclick="changeText()"&gt; &lt;h2&gt; Top Stories &lt;/h2&gt; &lt;input type="image" src="./Home Page Resources/ArrowRightIcon.png" onclick="alert('Trigger Upload Page')"&gt; &lt;/div&gt; For some reason my selection path in my javascript isn't selecting the h2 innerHTML. I'm not sure why... Any help?
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/44522176
has comment: http://stackoverflow.com/comment/44521564
type: UnansweredQuestion

http://stackoverflow.com/q/27965076
answer count: 3
has comment: http://stackoverflow.com/comment/44323659
downvote count: 0
possible better answer: http://stackoverflow.com/a/27965259
has comment: http://stackoverflow.com/comment/44323534
favorite count: 0
has answer: http://stackoverflow.com/a/27965259
has title: Setting Object Data Structure Array Property
accepted answer: http://stackoverflow.com/a/27965493
has answer: http://stackoverflow.com/a/27971937
type: AnsweredQuestion
score: 3
upvote count: 3
has body: After an exhaustive search, I have yet to find a clear answer to address my problem. This may in part be due to incorrect or imprecise references to javascript terminology as object proiented programming is new to me. var numArray = [0.123456789, 31.415, 314.15, -314.15, 0.0, 0, 1, 10, 100]; var AlignDecimal = function(NumberArray){ var numberStructure = [{ value:0, toString:"", decimalIndex:-1, integer:"", integerLength:-1, mantissa:"", mantissaLength:-1, sign:"" }]; for (var i = 0; i &lt; NumberArray.length; i++){ numberStructure[i].value = NumberArray[i]; println(numberStructure[i].value); } }; AlignDecimal(numArray); I'm hoping from the above that there's enough information to ascertain my ultimate programming objective. Originally I tried: numberStructure.value = NumberArray This partially worked except that .value had become an array, rather than numberStructure[].value. Then I tried: numberStructure = NumberArray Now numberStructure[] array recieved NumberArray[] but, obviously, numberStructure[].value was undefined. Also tried: for (var i = 0; i &lt; NumberArray.length; i++){ numberStructure[i].value.push(NumberArray[i]); println(numberStructure[i].value); } That didn't work either.
type: Question
has answer: http://stackoverflow.com/a/27965493
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/q/27993884
score: 0
has comment: http://stackoverflow.com/comment/44378494
has title: How To Change A Global Variable From Inside An If Statement - Javascript
tagged with: arrays
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/44378433
has comment: http://stackoverflow.com/comment/44378654
answer count: 0
type: UnansweredQuestion
upvote count: 1
has body: I have put together a loop which I want to run through several times. I want to change some values each time the code completes a loop in the array defined as "num" without having the array reset to (1,2) every time the code loops. I currently have the changes to the array that I want being made inside if/else statements in the code. I know that this is a scope issue, I just do not know how to fix it. for (i = 0; i &lt; 6; i++) { var num = new Array(1, 2); var bet = []; var ran = []; var wl = []; bet = num[0] + num[num.length - 1]; ran = Math.floor((Math.random() * 10000) + 1); if (ran &lt;= 4637) { wl = "Win" } else { wl = "Lose" } var para = document.createElement("p"); var node = document.createTextNode(num + " | Bet:" + bet + " | " + wl); para.appendChild(node); var element = document.getElementById("text"); element.appendChild(para); window.scrollBy(0,1000); if (ran &lt;= 4637) { num.splice(0,1) num.splice(cars.length - 1,1) } else { num.push(bet) } }
downvote count: 1
type: Question
tagged with: if-statement

http://stackoverflow.com/a/28004889
has body: To get what you need use AJAX request to change server state. &lt;h:commandLink id="changeEmployee" onclick="addEmployee()"&gt; &lt;f:ajax listener="#{controller.changeEmployee}"/&gt; &lt;img src="images/stift.png" width="30" heigth="30"/&gt; &lt;/h:commandLink&gt; Using only h:commandLink submits the form. This results in whole page being reloaded. Because page is reloaded any JavaScript that was invoked on previous page has no effect on new page. AJAX requests do not reload current page (but might refresh parts of a page - which you can also use to display dialog).
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44398468
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/28003389
accepted answer of: http://stackoverflow.com/q/28003389

http://stackoverflow.com/a/28001685
score: 1
has body: That should load fine, as along as your index.html and Cards.js files are in the same folder. If you put your Cards.js file in a /js/ folder, you will need to add /js/Cards.js to your path. As a side note, I recommend downloading Firefox and the Web Developer and Firebug addons. It will show you if your files are loading and if they're generating any errors, and where the errors are located in the file.
has comment: http://stackoverflow.com/comment/44395619
downvote count: 0
has comment: http://stackoverflow.com/comment/44392787
answers question: http://stackoverflow.com/q/28001637
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/44395582

http://stackoverflow.com/q/28072082
has answer: http://stackoverflow.com/a/28072239
tagged with: javascript
has comment: http://stackoverflow.com/comment/44524066
upvote count: 3
has comment: http://stackoverflow.com/comment/44523685
downvote count: 2
has comment: http://stackoverflow.com/comment/44523614
answer count: 1
favorite count: 0
has body: A little bit puzzled by the below code. function DoColor() { document.getElementById("ID").style.backgroundColor = "#F4FFFF"; alert("ID color = " + $("#ID").css("background-color")); // this shows RGB(244, 255, 255) alert($("#ID").css("background-color") === "RGB(244, 255, 255)"); // this show false ????? } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="text" id="ID" onclick="DoColor()"&gt; Why is it not alerting true as expected?
has comment: http://stackoverflow.com/comment/44523628
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44523724
has comment: http://stackoverflow.com/comment/44523829
has comment: http://stackoverflow.com/comment/44523559
has title: set $(element).style.backgroundColor, then check but not working
score: 1
type: Question

http://stackoverflow.com/q/28019794
score: 1
upvote count: 1
type: Question
tagged with: yahoo-api
has body: I am using hello.js for listing all my friends in yahoo.Following is the function used on button click : getFriends('yahoo', 'me/friends') I generated yahoo api key for my application.While generating api key I have checked all checkboxes given under permissions.The api key is used in the script as given below, hello.init( { yahoo : 'YAHOO_CONSUMER_KEY' } , { redirect_uri:'APPLICATION_URI', oauth_proxy : 'https://auth-server.herokuapp.com/proxy', scope:"friends" } ); Following is the error I am getting now. code:"parameter_rejected" message:"401 could not authenticate" Can someone please help me to resolve this?
tagged with: javascript
has title: Get yahoo friends list using hello js
answer count: 1
downvote count: 0
favorite count: 0
tagged with: yahoo
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29359997
tagged with: hello.js

http://stackoverflow.com/q/28087404
tagged with: sockjs
has title: No cookies during /info request using sockjs and stomp
type: Question
tagged with: stomp
tagged with: spring-websocket
tagged with: javascript
score: 6
has answer: http://stackoverflow.com/a/33483117
has body: I'm trying to use Spring Security with websockets. As an example I'm using spring-websocket-chat (https://github.com/salmar/spring-websocket-chat) — demo application from talk "Deep dive into websockets". In that application CookieHttpSessionStrategy uses for storing session id, stored during authentication cookie is sending with /info request. Here are code that demonstrates connecting to server via sockjs (this request sends cookies) https://github.com/salmar/spring-websocket-chat/blob/master/src/main/webapp/js/services.js. I wrote my own client that uses sockjs and stomp but there are no cookies sending during /info request. Here are my code $connectButton.click(function () { var serverHost = $host.val(); console.log("sockjs created"); stomp = Stomp.over(new SockJS(serverHost)); console.log("stomp over"); stomp.connect({}, function () { console.log("connected"); }, function () { console.log("error"); }) console.log("pressed"); });
downvote count: 0
answer count: 1
tagged with: spring-security
favorite count: 0
upvote count: 6
accepted answer: http://stackoverflow.com/a/33483117
type: AnsweredQuestion

http://stackoverflow.com/comment/44615905
has text: Yes it is different. Read the previous answer by @New Dev
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28120861

http://stackoverflow.com/q/28030449
tagged with: richtext
type: Question
tagged with: rich-text-editor
tagged with: javascript
has body: I have an existing Rich Text UI that I'd like to use with CKEditor. Basically, I want CKEditor to handle the complicated parts of applying styles, formats, filtering, and normalizing inserted content. My existing UI needs to drive the interaction and show state based on selection (ie. selecting bold text should be reflected in the state of my 'Bold' button in the UI. I have got the integration to a point where I can apply bold, italic, and underline formats, change font size, and add styles. For bold, italic, and underline: var editor = this.getEditor(); editor.execCommand('underline'); // bold, italic (Note, I added config.extraAllowedContent = 'strong;u;em'; in config.js to enable underline) For changing font size: var editor = this.getEditor(); var style = new CKEDITOR.style({ element: 'span', styles: { 'font-size': fontSize + 'px' }, overrides: [{ element: 'font', attributes: { 'size': null } },{ element: 'span', attributes: { 'class': null } }] }); editor.applyStyle(style); For toggling between styles (css classes): var editor = this.getEditor(); _.each(this.textStyleChoices, function(styleChoice) { var style = new CKEDITOR.style({ element: 'span', attributes: { 'class': styleChoice.style } }); if(styleChoice.style === textStyle && !style.checkActive(editor.elementPath(), editor)) { editor.applyStyle(style); } else { editor.removeStyle(style); } }); Now, I believe I am going about this in the wrong way, as with this approach I am clearly going to run into some css specificity issues. Note, my css classes for my 'styles' contains attributes such as color, font-size, etc. So, if I apply a style that has font size 40px to my selection: This is my [selected text] And then change the font size of that selection to 10px, then this is the resulting html: This is my [selected text] Which results in the selected text having a font size of 40px. If the two spans were merged, then the font size would be correctly set at 10px. Obviously, this is a simple example; there are…
tagged with: ckeditor
downvote count: 0
favorite count: 0
has title: Use my existing Rich Text UI with CKEditor APIs
type: UnansweredQuestion
score: 2
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/108942052

http://stackoverflow.com/q/28011397
upvote count: 2
tagged with: loops
answer count: 1
has body: I have a problem in my code and I can't found the mistake(s)... I have a loop which load multiple obj and give them a name but as a result the "objects" array is empty... I would like to give to each object a name in order to detect the intersections (the code is OK for that). It's very tricky because when I click on the different parts of the loaded object (a cathedral), the database is contacted but all the objects have the same name. Do you know why ? Here is the code: objects is the array which stores the all geometries, and object is the argument of the function. load_obj is defined by a loop below (string store in another array: OBJETS which store the name of obj of all parts of the cathedral). for (var i in OBJETS){ load_obj = OBJETS[i]; loader.load('./Donnees/OBJ/'+load_obj+'.obj','./Donnees/OBJ/'+load_obj+'.mtl', function ( object ) { object.name=load_obj; scene.add( object ); objects.push(object); }, onProgress, onError ); } Thanks for your help !
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44410219
score: 2
tagged with: arrays
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/28011635
type: Question
has title: three.js - add multiple objects (obj & mtl) with a loop
tagged with: three.js

http://stackoverflow.com/a/28120247
accepted answer of: http://stackoverflow.com/q/28120068
has comment: http://stackoverflow.com/comment/44631433
answers question: http://stackoverflow.com/q/28120068
type: Answer
has comment: http://stackoverflow.com/comment/44643776
has comment: http://stackoverflow.com/comment/44630633
has body: Javascript passes primitives by value. so when you call setonfire(monster, extra); you are passing the value of 100 to the method and it will never affect the outside monster variable. You can reference the monster object directly in the method. So: var monster = 100; var extra = 10; function setonfire(extra) { setTimeout(function () { print("Monster: " + monster + ", Extra: " + extra); if (monster &gt; 0) { if (monster === 55) { monster = monster - extra; print("Poke for an extra " + extra); } monster = monster - 5; setonfire(extra); } }, 200); } setonfire(extra); Otherwise make monster an object such as: var monster = { health: 100 }; var extra = 10; function setonfire(monster, extra) { setTimeout(function () { print("Monster: " + monster.health + ", Extra: " + extra); if (monster.health &gt; 0) { if (monster.health === 55) { monster.health = monster.health - extra; print("Poke for an extra " + extra); } monster.health = monster.health - 5; setonfire(monster, extra); } }, 200); } setonfire(monster, extra); Edit: Variable casing
has comment: http://stackoverflow.com/comment/44631353
has comment: http://stackoverflow.com/comment/44628221
has comment: http://stackoverflow.com/comment/44623072
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/44512279
type: Comment
score: 1
comment on: http://stackoverflow.com/q/28066202
has text: And what if my name has those characters in it? ==>
type: QuestionComment

http://stackoverflow.com/q/28031459
tagged with: reactjs
tagged with: javascript
score: 0
answer count: 1
type: AnsweredQuestion
has title: Reactjs : Invariant Violation when using input element
has answer: http://stackoverflow.com/a/28032730
has body: I am a bit new to React and was trying out a simple experiment. I wanted to have a text-box and a search-button in my initial render, and then when I click on the search-button, I wanted a completely different markup (close-button + div/h1) So I store the value in a state variable and in render method I check that state and decide upon the markup. Here's the JSFiddle for the same http://jsfiddle.net/rso3uk9f/ While doing this, I was facing 2 problems While clicking on the search-button, re-render happens and the results page is shown but the search button is not disposed. When I click on close button, I get errors like Danger: Discarding unexpected node: " ". ReactMount: Two valid but unequal nodes with the same data-reactid: .0.1 Can somebody give some clean workaround ? Some of the work-arounds, I tried If you substitute input element with text-area or div then everything works fine. Also If I add an empty div after the search-button, then the empty div is renderend on the results page and search-button is not displayed. But the JS errors still comes up.
accepted answer: http://stackoverflow.com/a/28032730
type: Question

http://stackoverflow.com/comment/44415159
type: AnswerComment
has text: @Ben - You need `cornersAbs[corner].OOB` or `cornersAbs[corner]["OOB"]`. What goes in the brackets is a literal string or a variable name that contains a string. Since `corner` is a variable containing a string, you have to use brackets for that one. Since `OOB` is a literal string, you can use either for that part of the reference. You can't use `cornersAbs[corner][OOB]` because `OOB` is not a defined variable.
score: 0
comment on: http://stackoverflow.com/a/28013837
type: Comment

http://stackoverflow.com/a/27987638
has body: javascripts event.button function will give you the mouse button you clicked. &lt;img onMouseDown="alert(event.button)" src="yourimage" /&gt; right click should return 2 but best check each browser
score: 0
answers question: http://stackoverflow.com/q/27987441
type: Answer

http://stackoverflow.com/a/28106438
has comment: http://stackoverflow.com/comment/44588226
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28104277
type: Answer
has body: This might occur when the default value of ff config javascript.enabled is false. Try to change the value by following steps: 1) in firefox browser type `about:config` in URL 2) Toggle the value of 'javascript.enabled` to 'true` The default firefox profile might have changed the value to false. When you launch the firefox through webdriver it loads a new profile. In new profile the default value for this config will be true always. This might be one of the reasons for that. Hope this might help you to resolve issue.
answers question: http://stackoverflow.com/q/28104277

http://stackoverflow.com/a/27966386
has comment: http://stackoverflow.com/comment/44325610
type: Answer
accepted answer of: http://stackoverflow.com/q/27966037
answers question: http://stackoverflow.com/q/27966037
has comment: http://stackoverflow.com/comment/44325747
score: 0
type: AcceptedAnswer
has body: You have a number issues in your switch, I rewritten that with some comments: switch(personPrompt) { case 'person': //collecting name var name = prompt("Name:").replace(/['"]/g,''); //collecting age var age = prompt("Age:").replace(/['"]/g,''); //creating an instance of person var person = new Person(name, age); //adding person to Persons array Persons.push(person); break; } //and then you can access person that you just created like Persons[0] JsFiddle

http://stackoverflow.com/a/28099787
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28099721
has body: You need to initialize c variable

http://stackoverflow.com/q/28048167
possible better answer: http://stackoverflow.com/a/28048293
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28048293
has title: How to replace some of text in href of Anchore tag in jquery
has comment: http://stackoverflow.com/comment/44478466
upvote count: 1
type: Question
tagged with: anchor
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28048258
answer count: 2
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
has body: I have few anchor with URL like "http%3a//test.dev.test.com/posts/test test", i want to replace it with "http://test.dev.test.com/posts/test test" on window load function, i have tried below code for this but it is not updating the URL of anchor tags. $('a[href*="http%3a//"]').each(function () { this.href = this.attr('href').replace('http%3a//', 'http://'); }); i am not getting why it is not working. please help me. EDIT:: New test in March
favorite count: 0
accepted answer: http://stackoverflow.com/a/28048258

http://stackoverflow.com/q/28071419
has comment: http://stackoverflow.com/comment/44522163
favorite count: 0
has answer: http://stackoverflow.com/a/28071474
upvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/44522194
has comment: http://stackoverflow.com/comment/44522181
has title: Dynamic selector
type: Question
accepted answer: http://stackoverflow.com/a/28071474
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44522428
has comment: http://stackoverflow.com/comment/44522186
has body: I am trying to do this: var divString = '#sContainer' + [index]; $(divString).append(SSDisplay); So that it is var divString = '#sContainer' + [index]; $('#sContainer0').append(SSDisplay); $('#sContainer1').append(SSDisplay); $('#sContainer2').append(SSDisplay); It doesn't seem to be working. I have also tried $('#sContainer' + [index]).append(SSDisplay); Any idea how I can get the jquery selector to do this dynamically?
answer count: 1

http://stackoverflow.com/q/28017970
tagged with: twilio
tagged with: sms
upvote count: 1
has title: How to get a Twilio SMS body text in Node.js
downvote count: 1
tagged with: node.js
possible better answer: http://stackoverflow.com/a/28020495
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28020495
has comment: http://stackoverflow.com/comment/44424648
type: Question
has comment: http://stackoverflow.com/comment/44441097
answer count: 2
tagged with: hapi.js
tagged with: javascript
favorite count: 0
score: 0
has answer: http://stackoverflow.com/a/28034973
has body: I'm working on a side-project of mine which integrates with Twilio. It's a Node.js app running on the Hapi.js framework. I have the app set up with Twilio so that when I text my Twilio number, Twilio gets the request from my app's route and texts me back with a static message in the response. What I'm having trouble with is getting the SMS body from the user's text. Let's say that I text the Twilio number with a word like banana I want to be able to retrieve that from the request so that I can have a dynamic message based on it. I've tried request.Body, request.message, among several other things, and I can't seem to retrieve the user's text to the Twilio number. I've looked through Twilio's documentation and can't seem to figure it out. I saw this PHP keyword tutorial on Twilio which looked promising, but even accessing request.Body as in that tutorial doesn't seem to work at all. Does anyone know how to get the text body from a Twilio SMS that a user sends? Any and all help is appreciated
accepted answer: http://stackoverflow.com/a/28034973

http://stackoverflow.com/a/28027071
type: AcceptedAnswer
type: Answer
has body: Using jQuery you can do this: HTML: Item Item Item Item Item Item Where you see name="section-filename-here", only input the name of the file without the .php extension as this can be added in the jQuery as in the example below Javascript (jQuery/aJax): $('ul.nav li a').click(function () { var thisSection = $(this).attr('name'); $.ajax({ url: "/path-to-sections/"+thisSection+".php", cache: false, success: function (data) { $('#content').html(data); }, error: function () { // only put something here if you want to show an error } }); });
answers question: http://stackoverflow.com/q/28026800
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28026800
score: 1
upvote count: 1

http://stackoverflow.com/comment/44674428
has text: Thanks Mr D. This explained what was going on and how to tackle it. I was able to get it going with your guidance. For others trying to do the same, my code is at: https://github.com/Digital-Thor/FountCouver.
type: AnswerComment
comment on: http://stackoverflow.com/a/28041384
type: Comment
score: 1

http://stackoverflow.com/q/28061993
favorite count: 0
possible better answer: http://stackoverflow.com/a/28062147
tagged with: angularjs
has answer: http://stackoverflow.com/a/28062147
upvote count: 1
has title: Push data in to JSON on ng-blur using angularjs
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/28062158
type: Question
accepted answer: http://stackoverflow.com/a/28062158
has body: I have one text box. When I type something in that text box and click anywhere then the content in the text box want to push in JSON. Here is my text box code &lt;input type="text" name="treatmentCost" class="form-control" ng-model="addTemplate" /&gt; Here is my JSON $scope.existingTemp = [{"name": "template1"},{"name": "template2"},{"name": "template3"},{"name": "template4"},{"name": "template5"}]; Please share your ideas. Thanks in advance.
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0

http://stackoverflow.com/a/28101028
has comment: http://stackoverflow.com/comment/133370492
answers question: http://stackoverflow.com/q/28100644
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44579813
has comment: http://stackoverflow.com/comment/120901518
type: Answer
upvote count: 205
has body: UPDATE -- use this instead: Add type="text/jsx" as an attribute of the script tag used to include the JavaScript file that must be transformed by JSX Transformer, like that: Then you can use MAMP or some other service to host the page on localhost so that all of the inclusions work, as discussed here. Thanks for all the help everyone!
score: 204
downvote count: 1
has comment: http://stackoverflow.com/comment/53417560
accepted answer of: http://stackoverflow.com/q/28100644

http://stackoverflow.com/comment/44595758
score: 1
has text: Seriously, this is obviously a XY problem. Ask specific question regarding your former issue, not the fix you think would work
type: QuestionComment
comment on: http://stackoverflow.com/q/28110966
type: Comment

http://stackoverflow.com/a/28023785
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44439144
has comment: http://stackoverflow.com/comment/44434921
accepted answer of: http://stackoverflow.com/q/28001609
type: Answer
answers question: http://stackoverflow.com/q/28001609
has comment: http://stackoverflow.com/comment/44494360
has body: if (scroll >= 50) sticky.addClass('sticky'); else sticky.removeClass('sticky'); }); $(window).scroll(function(){ var sticky = $('.content'), scroll = $(window).scrollTop(); if (scroll >= 12) sticky.addClass('sticky'); else sticky.removeClass('sticky'); }); adds the sticke header when scrolling over "50" and removes it wenn scrolling under 12. just edit those numbers as long as it would be good for you ;)
has comment: http://stackoverflow.com/comment/44494847

http://stackoverflow.com/comment/79623931
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/33591133
type: Comment
has text: @user1438038: I'm sorry but I hardly see what else can be added here. The code entirely defines how it works. And to see what it does, simply click on "Run code snipped"

http://stackoverflow.com/q/28033460
type: UnansweredQuestion
has title: Tidio Chat - no longer installed but still trying to pull .js
tagged with: php
has comment: http://stackoverflow.com/comment/44453523
tagged with: wordpress
has comment: http://stackoverflow.com/comment/44473433
type: Question
has comment: http://stackoverflow.com/comment/44452704
has comment: http://stackoverflow.com/comment/44471446
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/44472611
tagged with: javascript
has answer: http://stackoverflow.com/a/28084164
has body: I installed Tidio Chat for wordpress then uninstalled it. It is still however trying to retrive .js code. It's adding 9-10 seconds on my site load time. www.ivebeangrounded.com search for tidio on page source and it's there. I assumed removing that script code would work. But I can't figure out what file that code is located in. It's not in footer.php

step
tags question: http://stackoverflow.com/q/28084906
tag name: step
type: Tag

http://stackoverflow.com/comment/44966865
type: QuestionComment
comment on: http://stackoverflow.com/q/28056700
has text: The webjars documentation says this: "This works because anything in a META-INF/resources directory in a JAR in WEB-INF/lib is automatically exposed as a static resource." So, I think the validation of an html is unaware of this rule, or eclipse needs to be configured as such. The rule works fine in a servlet3 container, just not in eclipse html validator.
score: 0
type: Comment

http://stackoverflow.com/q/28016580
downvote count: 0
accepted answer: http://stackoverflow.com/a/28016693
tagged with: javascript
tagged with: jquery
has body: I am a beginner with jQuery and need to figure out how to automatically update one field when another has been changed. The code I have works for when the input field is changed, but I don't know how to find (and change) the corresponding field. Here's a jsFiddle HTML: (cm) (inches) (kg) (lbs) javascript: $(document).ready(function() { $('#auto-calc input').change(function () { alert($(this)); }); }); So with this, if (cm) changed, I would want to automatically change (inches), and vice versa. Same for (kg) <--> (lbs). Any ideas? I know that I pretty close, I just can't figure out this last little part this html will be repeated throughout my entire form. So there will be several cm/in and lbs/kg fields that will need to be corresponded to each other
possible better answer: http://stackoverflow.com/a/28016617
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28016617
has comment: http://stackoverflow.com/comment/44420683
favorite count: 0
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/28016693
type: Question
has title: Use javascript to calculate corresponding field
answer count: 2

http://stackoverflow.com/comment/46202034
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28031579
score: 0
has text: @Claies how to use it here?

http://stackoverflow.com/comment/44526311
comment on: http://stackoverflow.com/q/28073419
has text: if you want to add it as text, $('#yourDiv').append(arrText[3])
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28100448
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/44577665
has comment: http://stackoverflow.com/comment/44576879
upvote count: 1
has comment: http://stackoverflow.com/comment/44577931
downvote count: 0
has comment: http://stackoverflow.com/comment/44577865
has body: Template.d3chart.rendered = function(){ // chart attributes and scale are defined up here... Tracker.autorun(function(){ var chart = d3.select(".chart") d3.tsv("data.tsv", type, function(error, data) { // callback function } }) } Typo on rendered?, render dosn't exists
accepted answer of: http://stackoverflow.com/q/28100245
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28100245

http://stackoverflow.com/a/27970560
has body: You can use filter method for this: var emptyElements = $('form.registration-form :input').filter( function() { return this.value === ''; }); if( emptyElements.length === 0 ) { // all IS filled in } else { // all is NOT filled in } $('#submit').click(function(){ var emptyElements = $('form.registration-form :input').filter( function() { return this.value === ''; }); if( emptyElements.length === 0 ) { alert('All Filled'); } else { alert('1 or more not filled') } }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;form action="" class="registration-form"&gt; &lt;input type="text"&gt; &lt;input type="text"&gt; &lt;input type="text"&gt; &lt;input type="text"&gt; &lt;input type="submit" id="submit" value="Check"&gt; &lt;/form&gt;
accepted answer of: http://stackoverflow.com/q/27970513
has comment: http://stackoverflow.com/comment/44334021
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44333890
answers question: http://stackoverflow.com/q/27970513
has comment: http://stackoverflow.com/comment/44333971
type: Answer
has comment: http://stackoverflow.com/comment/44334289
upvote count: 3
has comment: http://stackoverflow.com/comment/44333906
has comment: http://stackoverflow.com/comment/44333813
score: 3

http://stackoverflow.com/q/27971675
tagged with: photoshop
has comment: http://stackoverflow.com/comment/44337790
has answer: http://stackoverflow.com/a/27972951
type: UnansweredQuestion
tagged with: creative-cloud
score: 0
type: Question
tagged with: automation
tagged with: javascript
has title: Photoshop Script to Move Text Layer through Actions
has body: I'm designing hundreds of posters that all have different text - but should all be at the same X,Y position - reference point being the top left: X= 213 px and Y= 41 px Some are a little off and I'd love to get them corrected, quickly and through automation. It's easy enough to create an action to transform text, but since the text content is different from file to file, I can't automate that portion. So looking for a script that essentially selects the text layer. There's only one text layer in all of these documents so something like "function: gettextlayer" and then select that layer in the layer panel. I can do the transform bit via action automation from there. Been scratching my head at this one and have dug everywhere.
answer count: 2
has answer: http://stackoverflow.com/a/65725520
tagged with: action

http://stackoverflow.com/comment/62902766
type: AnswerComment
type: Comment
has text: Awesome!. The custom method does it for me. Thank you
comment on: http://stackoverflow.com/a/27973784
score: 1

http://stackoverflow.com/comment/44469005
type: Comment
score: 0
comment on: http://stackoverflow.com/a/28040706
type: AnswerComment
has text: this code set only the default input value but any edit in the input will be reset

http://stackoverflow.com/comment/44457809
type: Comment
has text: When you are logged in as the Hudson user, are you able to run `where grunt` and `echo %PATH%` and see the location of the `grunt.cmd` file?
comment on: http://stackoverflow.com/q/28035657
score: 0
type: QuestionComment

http://stackoverflow.com/a/28031320
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28031228
has body: If you want to repeat something, then please try the above code using setInterval(runscript, 20000) setTimeout() simply invokes after the said amount of milliseconds only once, whereas setInterval as the name implies keeps on invoking after the said milliseconds.

http://stackoverflow.com/a/36589155
answers question: http://stackoverflow.com/q/28010444
type: Answer
downvote count: 0
score: 1
has body: See React's Immutability Helpers. handleChange(index, newElement){ var newStateArray = update(this.state.myArray, { [index]: {b: {$set: newElement.target.value} } }); this.setState({myArray: newStateArray }); }
upvote count: 1

http://stackoverflow.com/q/28104721
tagged with: http://stackoverflow.com/tag/html
has title: Javascript `onerror` is not getting fired
has body: Please have a look at the code below: function longSentenceSpeak(text) { var url = "http://www.translate.google.com/translate_tts?tl=en&q="+finalString; var url2 = "http://www.translate.google.com/translate_tts?tl=sp&q="+finalString; var audio = document.getElementById('audio'); var source = document.getElementById('source'); source.src=url; audio.load(); //call this to just preload the audio without playing audio.play(); //call this to play the song right away audio.onerror = function() { var url2 = "http://translate.google.com/translate_tts?tl=en&q="+text; var audio = document.getElementById('audio'); var source = document.getElementById('source'); source.src = url2; audio.load(); //call this to just preload the audio without playing audio.play(); //call this to play the song right away }; } Below is my HTML: TODO supply a title Click me However this gives this error, even though it should handle it: Failed to load resource: the server responded with a status of 404 (Not Found) (12:49:15:455 | error, network) at http://www.translate.google.com/translate_tts?tl=en&q=hello What I want to do is, if this error occurred, I want to use var url2 instead of var url in function longSentenceSpeak(text). How can I do this?
has comment: http://stackoverflow.com/comment/44584377
type: Question
has comment: http://stackoverflow.com/comment/44584181
has comment: http://stackoverflow.com/comment/44584337
tagged with: javascript
has comment: http://stackoverflow.com/comment/44584386
score: 0
has comment: http://stackoverflow.com/comment/44584365
answer count: 1
has comment: http://stackoverflow.com/comment/44584196
has answer: http://stackoverflow.com/a/61984353
tagged with: dom-events
tagged with: onerror
type: UnansweredQuestion

http://stackoverflow.com/a/28000484
has comment: http://stackoverflow.com/comment/44433048
upvote count: 2
accepted answer of: http://stackoverflow.com/q/28000415
has comment: http://stackoverflow.com/comment/44410606
has comment: http://stackoverflow.com/comment/44409845
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44409799
has body: Use a timeout which runs only once then add extra time and run the timeout again until you reach 24. var count=0; var ms = 200; var step = 5; var counter=setTimeout(timer, ms); //1000 will run it every 1 second function timer() { count=count+1; if (count &lt;= 24) { //Do code for showing the number of seconds here document.getElementById("countdown").innerHTML=count ; // watch for spelling ms = ms - step; counter = setTimeout(timer, ms); } }
type: Answer
has comment: http://stackoverflow.com/comment/44390230
answers question: http://stackoverflow.com/q/28000415
score: 2

http://stackoverflow.com/comment/44577495
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28100850
score: 0
has text: what errors are thrown? Is jQuery loading before jQueryUI and other plugins and dependent code?

http://stackoverflow.com/q/28113811
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28116491
answer count: 1
score: -1
favorite count: 0
has title: Pie time animation
downvote count: 1
has body: I Am building an app using query mobile, I have been struggling with this code for some time: JSBin link What it does is to create multiple pie timers that will start when clicked. The problem is when I reload the page the timers reset, I know that I somehow need to instantiate the timer with some id but since I have limited knowledge of javascript I can't figure it out, how to make it work.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28116491
type: Question
upvote count: 0

http://stackoverflow.com/q/28035376
type: Question
possible better answer: http://stackoverflow.com/a/28035730
has title: Returning a string with only vowels capitalized
score: 0
has answer: http://stackoverflow.com/a/74790581
has answer: http://stackoverflow.com/a/28035468
tagged with: javascript
has answer: http://stackoverflow.com/a/28035537
has body: I'd like to return the variable newString with only vowels capitalized. Not sure how to proceed. Tried using an if/else block but my logic wasn't correct. function LetterChanges(str) { var newArray = []; for (var i = 0; i &lt; str.length; i++) { var strCode = str.charCodeAt(i) + 1; var strLetter = String.fromCharCode(strCode); newArray.push(strLetter); var newString = newArray.join(""); } return newString; } LetterChanges("hello");
answer count: 4
accepted answer: http://stackoverflow.com/a/28035468
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28035730

http://stackoverflow.com/q/28058697
score: 0
has answer: http://stackoverflow.com/a/28058831
answer count: 1
has body: I need help with Kendo UI PanelBar. I have 3 sections (3 Panel Bar's). Panel 1 Panel 2 Panel 3 It's a single expand mode. So you click on one panel then all other panels are collapsed and the one you clicked on expand. However, I want to add a condition so that if there are invalid data in Panel 1, then you can't expand Panel 2 or 3. How do you do that?
has title: Kendo UI PanelBar Conditional Expand
tagged with: asp.net-mvc-4
type: AnsweredQuestion
tagged with: kendo-ui-mvc
type: Question
accepted answer: http://stackoverflow.com/a/28058831
tagged with: javascript
tagged with: jquery
tagged with: kendo-ui

http://stackoverflow.com/comment/44452805
comment on: http://stackoverflow.com/q/28033600
score: 0
type: Comment
type: QuestionComment
has text: Use Bootstraps modal service ;] It does exactly what you want, and it does it well. If you need the details, look at the source code.

http://stackoverflow.com/comment/44407445
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28009706
has text: It never reaches the server side. I added a console.log() message to see if anything gets printed on the other side. It doesn't.

http://stackoverflow.com/comment/44545543
has text: http://jsfiddle.net/1gxnxo2b/ here is the solution as said above using some for and if loops
comment on: http://stackoverflow.com/q/28082908
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27982344
type: AnsweredQuestion
tagged with: java
has comment: http://stackoverflow.com/comment/44356621
has title: Speed up javascript programming of Java EE application
has comment: http://stackoverflow.com/comment/44356257
has answer: http://stackoverflow.com/a/27982592
type: Question
tagged with: jakarta-ee
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27982592
has answer: http://stackoverflow.com/a/27983119
linked to: http://stackoverflow.com/q/17507879
has answer: http://stackoverflow.com/a/27983038
has comment: http://stackoverflow.com/comment/44357171
score: 0
has comment: http://stackoverflow.com/comment/44362725
answer count: 3
has comment: http://stackoverflow.com/comment/44356040
has body: I'm playing on a Java EE application using heavily javascript, a RIA application. Do you have any tip/best practice about speed up javascript developing process instead of change javascript, build a .war and deploy the app on the AS to see if my javascript is fine?
accepted answer: http://stackoverflow.com/a/27983119

http://stackoverflow.com/q/28093178
possible better answer: http://stackoverflow.com/a/28093354
has answer: http://stackoverflow.com/a/28093354
type: Question
accepted answer: http://stackoverflow.com/a/28093378
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28093378
has body: The CSS code : .mainDiv{ width: 600px; height: 600px; background-color: blue; } .innerDiv{ width: 400px; margin: auto; height: 400px; background-color: green; } .innerDiv div{ width: 50px; height: 50px; background-color: red; display: inline-block; } .removing{ -webkit-animation: slideout 1s; animation: slideout 1s; } @-webkit-keyframes slideout { 0% { -webkit-transform: translateX(0px); transform: translateX(0px); } 100% { -webkit-transform: translateX(-200%); transform: translateX(-200%); } } @keyframes slideout { 0% { -webkit-transform: translateX(0px); transform: translateX(0px); } 100% { -webkit-transform: translateX(-200%); transform: translateX(-200%); } } Here is a jsFiddle of the problem. What i would like it to do is this : When the first red block moves outside of the green block, i would like it to be behind the blue block instead of in front of it.
tagged with: css
type: AnsweredQuestion
has title: How to hide div under another during CSS3 animation

http://stackoverflow.com/comment/44607300
type: Comment
type: QuestionComment
has text: @Andy what is a `multidimensional array` so ?
comment on: http://stackoverflow.com/q/28087754
score: 0

http://stackoverflow.com/comment/44576514
has text: @Sebb Indeed. I know how to mimic infinite looping in the browser by setting an interval with a very short timer. I wanted more insight in the difference between infinite looping within a browser and a non-browser program.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28100439
type: Comment

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/28097020
tags question: http://stackoverflow.com/q/28116187
tag name: sequelize.js

http://stackoverflow.com/a/28046902
answers question: http://stackoverflow.com/q/28046849
upvote count: 1
type: Answer
has body: The PHP script just needs to display content as it would if you loaded it directly in the browser, using echo or simply closing your PHP tag ?&gt; and outputting HTML or similar.
downvote count: 0
score: 1

http://stackoverflow.com/q/28077350
accepted answer: http://stackoverflow.com/a/28077533
tagged with: javascript
score: 0
has title: how to add populated select field to form on button click
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/44534723
has answer: http://stackoverflow.com/a/28077533
tagged with: django
has body: I have form where a user can select an option and then submit, i want to add a button that will add another select option to the form. so that the user can submit two or more options Add another field {%for each in mechanic_list %} {{each.DESCRIPTION}} {%endfor%} the above code will populate a first select box and has a button that adds empty select fields (after the submit, for some reason) two questions 1. how do i populate the added select field 2. how do i move the new field to the proper side of the submit button. one thing to note, i am using the Django web Framework and have used a for loop to populate the select values. this is a JSfiddle http://jsfiddle.net/5Jr8N/59/ (no for loop) thanks Edit/update HTML script as coded html script as "rendered" (given to browser/from browser "view source") so this is working except that it only displays the last value not both/all values. this is so close i can taste it. how do i get both/all the values not just the last one?
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/44533977

http://stackoverflow.com/a/28118588
has comment: http://stackoverflow.com/comment/44611525
type: Answer
has comment: http://stackoverflow.com/comment/44611556
has comment: http://stackoverflow.com/comment/44611296
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/44611265
has comment: http://stackoverflow.com/comment/44611439
answers question: http://stackoverflow.com/q/28118564
has comment: http://stackoverflow.com/comment/44611314
downvote count: 0
has body: I think you're looking for: $('#buttonFoo').on('click', function(){ // selects all elements that are not containing // any elements that have an element of class="foo" // as a descendant: $('p:not(:has(.foo))') // and then toggles their visibility: .toggle(); }); $('span.foo').closest('p').addClass('fooHighlight'); $('#buttonFoo').on('click', function() { $('p:not(:has(.foo))').toggle(); }); .fooHighlight { background-color: #ffa; } ButtonFoo 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. FOO Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 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. FOO Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. BAR Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 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. FOO Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. BARExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 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 …

http://stackoverflow.com/q/28040176
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44464384
type: UnansweredQuestion
score: 6
has answer: http://stackoverflow.com/a/36177551
has comment: http://stackoverflow.com/comment/44464324
has body: Below Is the code that Im getting problem with: //Main Codes for the Diary App (function () { //Create a new diary app var diary = angular.module('diary', ['ngRoute']); //Define a Router for the App diary.config(function ($routeProvider) { $routeProvider. when('/', { templateUrl: 'partials/wall.php', controller: 'DiaryWallController' }). when('/images', { templateUrl: 'partials/images.html', controller: 'DiaryImagesController' }). when('/audio', { templateUrl: 'partials/audio.html', controller: 'DiaryAudioController' }). otherwise({ redirectTo: '/' }); }); //Define Controllers diary.controller('DiaryWallController', function($scope) { $scope.message = "Lets do this!! Wall of this site"; }); diary.controller('DiaryImagesController', function($scope) { $scope.message = "Lets do this!! Images of this site"; }); diary.controller('DiaryAudioController', function($scope) { $scope.message = "Lets do this!! Audio of this site"; });})(); I am getting this Unknown TypeError: Cannot read property '1' of NuLL. It successfully fetch the files specified in the route but it doesn't display in the site.. I have checked the console: XHR finished loading: GET "http://localhost/mobile%20diary/app/partials/images.html". But the contents of the loaded page is not displayed in the site. I check in resources and in there the images.html file is loaded and I can see the file preview but it is not shown in the site. Below is the HTML Shell file:
type: Question
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29021764
tagged with: javascript
favorite count: 0
has title: AngularJS Unknown TypeError: Cannot Read Property '1' Of Null
has comment: http://stackoverflow.com/comment/44464243
upvote count: 6
has comment: http://stackoverflow.com/comment/44464563

http://stackoverflow.com/q/27993227
score: 0
answer count: 1
has body: I have installed meteorhacks:npm and defined apn in packages.json {"apn": "1.6.2"}. However, I get an error ReferenceError: require is not defined when I run the following code: var apn = Npm.require('apn'), path = Npm.require('path'), apnOptions = Meteor.settings.apnOptions || {}, alertSound = apnOptions.sound || "alert.aiff", apnConnection // default apn connection options apnOptions = _.extend({ cert: path.join(appRootPath, "private", "cert.pem"), key: path.join(appRootPath, "private", "key.pem"), }, apnOptions) apnConnection = new apn.Connection(apnOptions) The full error message: W20150116-23:30:51.097(2)? (STDERR) W20150116-23:30:51.100(2)? (STDERR) /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:173 W20150116-23:30:51.101(2)? (STDERR) throw(ex); W20150116-23:30:51.101(2)? (STDERR) ^ W20150116-23:30:51.101(2)? (STDERR) ReferenceError: require is not defined W20150116-23:30:51.102(2)? (STDERR) at app/node_modules/apn/lib/connection.js:1:49 W20150116-23:30:51.102(2)? (STDERR) at app/node_modules/apn/lib/connection.js:774:3 W20150116-23:30:51.106(2)? (STDERR) at /Users/Mika/Devaus/meteor/flashcards/.meteor/local/build/programs/server/boot.js:175:10 W20150116-23:30:51.107(2)? (STDERR) at Array.forEach (native) W20150116-23:30:51.107(2)? (STDERR) at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11) W20150116-23:30:51.107(2)? (STDERR) at /Users/Mika/Devaus/meteor/flashcards/.meteor/local/build/programs/server/boot.js:86:5 My repo: https://github.com/mvaisanen/flashcards
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27993478
tagged with: meteor
has title: Meteor: ReferenceError: require is not defined
tagged with: npm
type: Question
tagged with: node.js
accepted answer: http://stackoverflow.com/a/27993478

http://stackoverflow.com/q/27972694
has comment: http://stackoverflow.com/comment/44338845
type: Question
accepted answer: http://stackoverflow.com/a/27973300
possible better answer: http://stackoverflow.com/a/27973284
has body: How can I assign value to variable in global from double callback? First of, I read some value from file, when its done, I pass it to some fn in callback and want to use result value in initial scope, outside callback. I can't wrap my head around this for some reason although at first it looks trivial. var done = function(err, value) { if (err) { return; } var resultValue = someMethod(value); }; loadFile(done); var resultVal = ?? //result value needed here function loadFile(done) { fs.realpath(filePath, function (err, resolvedPath) { if (err) { return done(err); } fs.readFile(resolvedPath, function (err, value) { if (err) { return done(err); } return done(null, data); }); }); }
has answer: http://stackoverflow.com/a/27973284
tagged with: javascript
has comment: http://stackoverflow.com/comment/44338195
tagged with: callback
score: 0
answer count: 2
tagged with: fs
has title: Extract value from double callback
has answer: http://stackoverflow.com/a/27973300
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/44519037
type: QuestionComment
comment on: http://stackoverflow.com/q/28069574
has text: http://jsfiddle.net/j08691/eppq92cx/
score: 0
type: Comment

http://stackoverflow.com/q/28064815
tagged with: string
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/28064947
accepted answer: http://stackoverflow.com/a/28064947
has answer: http://stackoverflow.com/a/28064973
has body: What are the pros and cons of each of them when compared to each other? In which cases should == be used over localeCompare and viceversa, in Javascript?
possible better answer: http://stackoverflow.com/a/28064950
upvote count: 4
has answer: http://stackoverflow.com/a/28064950
has comment: http://stackoverflow.com/comment/44510344
type: AnsweredQuestion
score: 3
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44510318
has answer: http://stackoverflow.com/a/28065031
has title: In which cases should `==` be used over `localeCompare` and viceversa, in Javascript?
downvote count: 1

http://stackoverflow.com/q/28031299
type: UnansweredQuestion
tagged with: mustache
tagged with: http://stackoverflow.com/tag/json
has title: How to create a Mustache template for JSON data with nested objects?
type: Question
tagged with: javascript
has body: I have this JSON data [ { "item":{ "name":"some name", "description":" someDescription ", "price":"6", "image_url":"url" }, "options":[ ] }, { "item":{ "name":"some name", "description":" someDescription ", "price":"6", "image_url":"url" }, "options":[ ] } ] and my code is I am using JavaScript and Mustache Templates to display all the items with its name, description and picture. But I am having trouble accessing through nested arrays. How do I retrieve these nested values?
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/28031489

http://stackoverflow.com/a/28022205
answers question: http://stackoverflow.com/q/28022115
has body: Simply set the value to 0 before calling $http $scope.number = 0
type: Answer
score: 0

http://stackoverflow.com/comment/44411812
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/28005841
has text: ["Creating closure in loops, a common mistake"](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures#Creating_closures_in_loops.3A_A_common_mistake)
type: Comment

http://stackoverflow.com/comment/44570298
type: Comment
has text: Pressing a single digit (just one keyboard key, inside the textbox) is good enough to fire the method thrice.
score: 0
comment on: http://stackoverflow.com/q/28097091
type: QuestionComment

http://stackoverflow.com/a/27969321
score: 3
has comment: http://stackoverflow.com/comment/44331361
upvote count: 3
has body: Your function will recurse immediately, dispatching all of the animation requests around the same time. To stagger them, you should recurse with a timeout: $(document).ready(function() { var slide = 1; nextSlide(); function nextSlide() { $('.content' + slide.toString()).fadeTo(2000, 1.0).delay(5000).fadeTo(2000, 0.0).delay(2000); if(slide &gt; 5) { slide = 1; } else { slide++; } setTimeout(nextSlide, 2000); // second param is delay in ms }; }); This will cause the next call to occur after 2000ms. Thanks to closure, your slide variable should be captured and will persist its value between calls.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44331499
has comment: http://stackoverflow.com/comment/44331326
has comment: http://stackoverflow.com/comment/44332004
type: Answer
answers question: http://stackoverflow.com/q/27969279
accepted answer of: http://stackoverflow.com/q/27969279

http://stackoverflow.com/a/28050312
type: Answer
has body: Your code fails with a ReferenceError because key1, key2 etc don't exist - the JavaScript runtime doesn't know what value you are asking for. Your example doesn't actually need these variables to be set. If you simply want an Array of 35 elements, all set to 0, you can use: var keys = []; for(var i = 0; i &lt; 36; i ++) { keys.push(0); } For other ways to do this, see Most efficient way to create a zero filled JavaScript array? Looking a small distance into the future, ES6 provides Array.prototype.fill: var keys = new Array(35); keys.fill(0); This method is not widely implemented yet, but you can try it out in Firefox 31+. ES6 compatibility table
answers question: http://stackoverflow.com/q/28049961
score: 2
upvote count: 2
downvote count: 0

http://stackoverflow.com/comment/44419045
type: Comment
has text: BTW it is common habit to use English names for a variable.
comment on: http://stackoverflow.com/a/28015846
type: AnswerComment
score: 0

http://stackoverflow.com/a/65509700
type: Answer
score: 0
has body: Try this, maybe is not the most elegant solution but for me it worked //fixing scroll issue on datepicker $(".ui-datepicker-trigger").on("click", function() { $("#ui-datepicker-div").css({top: xxx}); });
answers question: http://stackoverflow.com/q/27966645

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/28097522

internet-explorer
tags question: http://stackoverflow.com/q/27980428
tags question: http://stackoverflow.com/q/28086932
tags question: http://stackoverflow.com/q/28024385
tags question: http://stackoverflow.com/q/27966400
tags question: http://stackoverflow.com/q/28027549
tags question: http://stackoverflow.com/q/28114472
tags question: http://stackoverflow.com/q/27980743
tags question: http://stackoverflow.com/q/28041174
tag name: internet-explorer
tags question: http://stackoverflow.com/q/27982674
tags question: http://stackoverflow.com/q/28006082
tags question: http://stackoverflow.com/q/28019076
tags question: http://stackoverflow.com/q/28120316
tags question: http://stackoverflow.com/q/27980641
tags question: http://stackoverflow.com/q/27980221
tags question: http://stackoverflow.com/q/27987112
tags question: http://stackoverflow.com/q/28085662
tags question: http://stackoverflow.com/q/27993893
tags question: http://stackoverflow.com/q/28031707
tags question: http://stackoverflow.com/q/28025599
tags question: http://stackoverflow.com/q/28006300
tags question: http://stackoverflow.com/q/28043620
tags question: http://stackoverflow.com/q/28108821
tags question: http://stackoverflow.com/q/28033824
tags question: http://stackoverflow.com/q/27977408
tags question: http://stackoverflow.com/q/28017814
tags question: http://stackoverflow.com/q/28024390
tags question: http://stackoverflow.com/q/28029181
tags question: http://stackoverflow.com/q/28002574
tags question: http://stackoverflow.com/q/27999383
tags question: http://stackoverflow.com/q/28065163
tags question: http://stackoverflow.com/q/28020105
tags question: http://stackoverflow.com/q/27994508
tags question: http://stackoverflow.com/q/28006037
tags question: http://stackoverflow.com/q/27984820
tags question: http://stackoverflow.com/q/28100123
tags question: http://stackoverflow.com/q/27986879
tags question: http://stackoverflow.com/q/28092910
tags question: http://stackoverflow.com/q/28084267
tags question: http://stackoverflow.com/q/28057255
tags question: http://stackoverflow.com/q/27986563
type: Tag
tags question: http://stackoverflow.com/q/27966546
tags question: http://stackoverflow.com/q/27968580
tags question: http://stackoverflow.com/q/28062805
tags question: http://stackoverflow.com/q/27984939
tags question: http://stackoverflow.com/q/27989025
tags question: http://stackoverflow.com/q/28073848
tags question: http://stackoverflow.com/q/27965293
tags question: http://stackoverflow.com/q/27979606
tags question: http://stackoverflow.com/q/27970260
tags question: http://stackoverflow.com/q/27985171
tags question: http://stackoverflow.com/q/28103844
tags question: http://stackoverflow.com/q/28105287
tags question: http://stackoverflow.com/q/28009115
tags question: http://stackoverflow.com/q/28068839
tags question: http://stackoverflow.com/q/28096583

http://stackoverflow.com/comment/44584354
comment on: http://stackoverflow.com/q/28104765
type: Comment
has text: My bad ! . Actually i have tried using ternary operator first then changes its implementation as needed..(Updated my ques). its not about ternary operator its about short hand syntax for return.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/44393616
comment on: http://stackoverflow.com/q/28001835
has text: huft, still won't work....
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28104114
downvote count: 0
answers question: http://stackoverflow.com/q/28104035
type: Answer
has comment: http://stackoverflow.com/comment/44583038
has body: Here is Plunkr Declare ng-app="myApp" You are defining controller in wrong way angular.module('myApp',[]) .controller('testcontroller', function($scope){ $scope.message="world"; });
upvote count: 1
has comment: http://stackoverflow.com/comment/44583106
score: 1
accepted answer of: http://stackoverflow.com/q/28104035
type: AcceptedAnswer

http://stackoverflow.com/comment/44447755
type: QuestionComment
has text: Asking for best (anything) is almost always off topic for stackoverflow as it is just another way of asking for opinions.
score: 0
comment on: http://stackoverflow.com/q/28031561
type: Comment

http://stackoverflow.com/a/28107003
has body: Every time your execute $(selector) the DOM has to be searched for matching element(s). This is a slow process, so always look for ways to minimise the the number of DOM interactions. In this regard, jQuery method chaining can be very effective. For example : $(document).ready(function(){ $(".cs_name").click(function() { $("#cos_container") .append("&lt;div&gt;&lt;select name='new_courses[]'&gt;&lt;/select&gt;&lt;/div&gt;&lt;br/&gt;");//ensure all HTML fragments are well formed and complete at the point they are inserted. .find("select") .append('&lt;?php echo $all_cs; ?&gt;'); }); }); This will be faster but maybe still not as fast as your POJS code.
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/28106761
type: Answer
upvote count: 1

http://stackoverflow.com/a/28112280
has body: Yeah, you're writing them all into one anchor in your ejs template. Something like this: &lt;ul&gt; &lt;% for(var i=0; i&lt;blog.tags.length; i++) { %&gt; &lt;li&gt; &lt;a href='/tags/&lt;%= blog.tags[i] %&gt;'&gt; &lt;%= blog.tags[i] %&gt; &lt;/a&gt; &lt;/li&gt; &lt;% } %&gt; &lt;/ul&gt; I'm assuming that your save logic successfully saves the array as you think, but that's worth checking as well
answers question: http://stackoverflow.com/q/28112161
has comment: http://stackoverflow.com/comment/44603622
has comment: http://stackoverflow.com/comment/44604707
accepted answer of: http://stackoverflow.com/q/28112161
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44649657
type: Answer

http://stackoverflow.com/q/28061032
has answer: http://stackoverflow.com/a/28061168
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/28061168
has comment: http://stackoverflow.com/comment/44503621
has answer: http://stackoverflow.com/a/28061270
type: AnsweredQuestion
score: 0
has title: Javascript Password field comparison
tagged with: forms
possible better answer: http://stackoverflow.com/a/28061270
type: Question
has body: Hello i have the following code. &lt;script type="text/javascript"&gt; function validateForm() { var u = document.forms["myForm"]["username"].value; if (u == null || u == "") { alert("First name must be filled out"); return false; } else var x = document.forms["myForm"]["email"].value; var atpos = x.indexOf("@"); var dotpos = x.lastIndexOf("."); if (atpos &lt; 1 || dotpos &lt; atpos + 2 || dotpos + 2 &gt;= x.length) { alert("Not a valid e-mail address"); return false; } else var p = document.forms["myForm"]["pwd1"].value; if ( p &lt; 7) { alert("Not a valid password"); return false; } } &lt;/script&gt; Username: &lt;input type="text" name="username"&gt;&lt;br /&gt; Email&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;input id="email" type="text" /&gt;&lt;br /&gt; Password&amp;nbsp; &lt;input id="pwd1" type="password" /&gt;&lt;br /&gt; Confirm&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;input id="Password2" type="password" /&gt;&lt;br /&gt; &lt;br /&gt; &lt;input type="submit" value="Submit"&gt;&lt;br /&gt; &lt;/div&gt; &lt;/form&gt; which is run with visual studio 13 asp runat server. Now my problem is that the other 2 (username and email) if they aren't correct it displays the warning and notifies the user (aka me ) that something is wrong. the password field only does that if its emtpy with the current code and not if i even put a single a character then it redirects me to the 404 which would be natural if it would be 7 characters and above. I have no idea why this is happening and have had the past 6 hours trying to figure out a solution or a mistake in my code via some already implemented forms or examples. Any help appreciated thank you.

jsp
tags question: http://stackoverflow.com/q/27978448
tags question: http://stackoverflow.com/q/28042360
tags question: http://stackoverflow.com/q/28082331
tags question: http://stackoverflow.com/q/27992550
tags question: http://stackoverflow.com/q/28117109
tags question: http://stackoverflow.com/q/28099714
tags question: http://stackoverflow.com/q/28021566
tags question: http://stackoverflow.com/q/28100431
tags question: http://stackoverflow.com/q/28025249
tags question: http://stackoverflow.com/q/28107255
tags question: http://stackoverflow.com/q/28080525
tags question: http://stackoverflow.com/q/27966840
tags question: http://stackoverflow.com/q/28038594
tags question: http://stackoverflow.com/q/28106114
tags question: http://stackoverflow.com/q/28045953
tags question: http://stackoverflow.com/q/28106427
type: Tag
tags question: http://stackoverflow.com/q/28084073
tag name: jsp
tags question: http://stackoverflow.com/q/28012168
tags question: http://stackoverflow.com/q/28107710
tags question: http://stackoverflow.com/q/28102932
tags question: http://stackoverflow.com/q/28089919
tags question: http://stackoverflow.com/q/27998908
tags question: http://stackoverflow.com/q/28091420
tags question: http://stackoverflow.com/q/28011682
tags question: http://stackoverflow.com/q/28110568
tags question: http://stackoverflow.com/q/28019120
tags question: http://stackoverflow.com/q/27966724
tags question: http://stackoverflow.com/q/28023519
tags question: http://stackoverflow.com/q/27984624
tags question: http://stackoverflow.com/q/28075722

http://stackoverflow.com/comment/44405695
comment on: http://stackoverflow.com/q/28008836
type: Comment
score: 2
type: QuestionComment
has text: Making something secure it actually quite complicated, and requires knowledge. The real question is, how secure does it need to be? Is this is a bank, or do you store personal information? First of all, you generally don't have to worry about javascript, whatever the user can see in the source or on the screen, is data the user already know, just make sure it's not visible to everyone. On the server you should at least never store passwords, and use hashes and salts. There's millions of pages written about this, and the web is full of resources

http://stackoverflow.com/a/28118351
has body: Here's a plunk. // Get this from the server var textReceived = 'var fn = function(){ alert("hello"); };'; function getFunction(textReceived) { eval(textReceived); return fn; } var f = getFunction(textReceived); f();
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/44610768
upvote count: 0
has comment: http://stackoverflow.com/comment/44610994
has comment: http://stackoverflow.com/comment/44633733
type: Answer
answers question: http://stackoverflow.com/q/28117733

http://stackoverflow.com/a/27976190
type: Answer
downvote count: 0
score: 1
has body: You're making a call to API v2. I can tell by the URL which differs significantly from API v3. According to Google Calendar API v2 Developer's Guide: Protocol "This API is a subject to the Deprecation Policy and was shut down on November 17, 2014. Please use APIv3 instead." I assume you are viewing that data by GET request in your browser address bar. As soon as you start trying to use that same URL in an ajax request, I think you'll have headed down a path that ultimately results in you switching to API V3.
accepted answer of: http://stackoverflow.com/q/27976020
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27976020

http://stackoverflow.com/comment/44523831
comment on: http://stackoverflow.com/a/28072239
type: AnswerComment
score: 0
has text: Uh, the first string is already lowercase. OP's comment is a lie.
type: Comment

http://stackoverflow.com/q/28075035
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44529303
has answer: http://stackoverflow.com/a/28075733
answer count: 2
has title: Script to embed HTML content on page
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/28075208
has body: The scenario: My company wants to have a "content builder" on our customer portal. Using this content builder, the user can check off their requested content (example: about the company, about our products, etc.) Once the options are selected, I want to provide the user with a script they can place on their website. When run, the parameters in the script will reach out, call our CMS for the appropriate copy, and return the markup.. which should display within their browser. My question is.. how do I go about doing this? I know how to get the HTML from the CMS, but how do I write the data back into the DOM? Should I just embed an IFRAME? Can I just write out div tags and such onto the host website? Any advice is appreciated, thanks in advance.
accepted answer: http://stackoverflow.com/a/28075733
has answer: http://stackoverflow.com/a/28075208

http://stackoverflow.com/comment/44352671
type: Comment
comment on: http://stackoverflow.com/a/27980593
score: 0
has text: This answer is correct. The amount of escaping involved also indicates that perhaps there is a better way of doing whatever it is the OP is attempting to do.
type: AnswerComment

http://stackoverflow.com/comment/44361639
score: 0
has text: header('Location: you_url_here'); Use this whenever you need to redirect through PHP
comment on: http://stackoverflow.com/q/27983939
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44373184
score: 2
has text: `getElementById()` does not require the `#`, only the value of the ID -- i.e `getElementById('val1')`.
type: AnswerComment
comment on: http://stackoverflow.com/a/27991097
type: Comment

http://stackoverflow.com/comment/44524097
type: QuestionComment
has text: Sorry for my answer is not working. May be the method resolveLocalFileSystemURL does the job instead of resolveLocalFileSystemURI that is deprecated.
comment on: http://stackoverflow.com/q/28065882
score: 0
type: Comment

http://stackoverflow.com/comment/44349627
type: Comment
has text: Where did you inspect the log?
score: 0
comment on: http://stackoverflow.com/q/27977357
type: QuestionComment

http://stackoverflow.com/comment/44340843
has text: You have 3 different string formats representing dates here: `'2015.01.15 23:54:12'`, `'01.15.2015 22:23:53'` and `"15.01.2015 23:59:42"` -- And none of them are standardized time formats as far as I can tell. Why not use a standardized iso format and be done with it?
score: 0
comment on: http://stackoverflow.com/q/27973941
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28078880
has comment: http://stackoverflow.com/comment/44536612
upvote count: 2
has comment: http://stackoverflow.com/comment/44536556
answers question: http://stackoverflow.com/q/28078815
has comment: http://stackoverflow.com/comment/44536636
has body: No variable holds response.php?name=Smith&amp;age=10 because you aren't sending the data as a query string. This would happen if you issued a GET request, but doesn't with a POST request. You're sending the data in the request body of an HTTP post. The data is the data that you assigned to the data parameter. You don't need to round-trip it through jQuery's ajax methods. You've got it already. It's: {name:'Smith',age:10} does jQuery's interpretation of your data really matter?
type: Answer
has comment: http://stackoverflow.com/comment/44536609
has comment: http://stackoverflow.com/comment/44536567
score: 2
downvote count: 0

http://stackoverflow.com/q/28069412
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
type: Question
has body: I want to know how I can determine whether class A is derived from class B in JavaScript. Here's an example, using ES6 classes for clarity: class Animal { } class Dog extends Animal { } class Cat extends Animal { } // ... function makeAnimalOf(ctor) { if (/* ctor derived from Animal */) { return new ctor; } throw "ctor is not derived from Animal"; } var mrWoofles = makeAnimalOf(Dog); var mittens = makeAnimalOf(Cat); What would my type guard in makeAnimalOf need to look like?
has title: Is class A derived from class B
downvote count: 0
tagged with: javascript
duplicate of: http://stackoverflow.com/q/14486110
favorite count: 0
linked to: http://stackoverflow.com/q/14486110

http://stackoverflow.com/a/27994543
downvote count: 0
type: AcceptedAnswer
upvote count: 3
type: Answer
has body: As per Lars's recommendation in the comments above, you can use .tickFormat() to transform the value with the year into a value without the year. Here's a modified fiddle. I disabled your slicing of the keys (but did it in a lazy way by just commenting out the slicing part without removing the entire loop, even though it's no longer necessary). Then, the only thing that was needed is the .tickFormat() bit that strips the year out of the full value: var xAxis = d3.svg.axis() .scale(x) .tickValues(sliceKeys) .tickFormat(function(yearAndWeek) { return String(yearAndWeek).slice(2); }) .orient("bottom");
accepted answer of: http://stackoverflow.com/q/27987742
answers question: http://stackoverflow.com/q/27987742
score: 3

http://stackoverflow.com/q/28066465
upvote count: 1
type: Question
tagged with: javascript
has body: I am having hard time figuring it out what is the issue behind these errors on my prestashop built website: JSMin: Unterminated String at byte 714: '; JSMin: Unterminated String at byte 730: '; JSMin: Unterminated String at byte 746: '; JSMin: Unterminated String at byte 26113: '; ﻿one of the worse page is the one below: Link:https://www.advantagelife.net/ladies-hand-and-sholder-bags/40-chw-ladie-s-summer-stylish-envelope-handbag.html Can anyone help? Thanks in advance! :)
downvote count: 4
has title: Strange JS Issues
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/28066606
has answer: http://stackoverflow.com/a/28066818
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/44512748

http://stackoverflow.com/comment/44486284
type: QuestionComment
type: Comment
has text: @Barmar: Ok thx but that adds class `hover` on any page refresh.
comment on: http://stackoverflow.com/q/28051857
score: 0

http://stackoverflow.com/comment/44496737
type: Comment
has text: @MarcoBonelli: then you should check the length of the filtered array. that's hard as-coded above because the array is re-defined. bottom line: you need to validate them individually to easily tell if all of them are valid; otherwise, you just make it hard on yourself. it not like it takes a long time to check them in a loop as opposed to all at once...
score: 0
comment on: http://stackoverflow.com/a/28057455
type: AnswerComment

http://stackoverflow.com/comment/44579857
score: 0
type: QuestionComment
type: Comment
has text: It's printing your variable. Your variable is a reference to the object for the HTML input element with the id of "k". Is it the value of that input element that you want to retrieve?
comment on: http://stackoverflow.com/q/28102252

http://stackoverflow.com/a/27998671
has body: There are two aspects to your question: Is the string the correct format? Does it represent a valid date? The required format can be tested using a regular expression like: /\d\d\/\d\d\/\d{4}/; The date itself can be tested by various means (including a long a complex regular expression, examples of which are here on SO), probably the simplest for this format is to create a Date and test the result. The following function will parse a string in n/n/n format and return either a Date object if it represents a valid date in m/d/y format, or NaN if it doesn't: // Treats 2 digit years as years 0 - 99, not 1900 to 1999 function parseMDY(s) { var b = s.split(/\D/); var d = new Date(); d.setHours(0,0,0,0); d.setFullYear(b[2], --b[0], b[1]); return d.getMonth() == b[0]? d : NaN; } So to validate the date you can use something like: // Return true if s is a valid date in mm/dd/yyyy format function validateDate(s) { return !!(/\d\d\/\d\d\/\d{4}/.test(s) &amp;&amp; parseMDY(s)); } console.log(validateDate('30/02/2015')) // false (invalid date) console.log(validateDate('02/02/2015')) // true (valid date) console.log(validateDate('2/02/2015')) // false (incorrect format) This will not detect if the user has accidentally transposed the month and day numbers but still produced a valid date, so that 01/02/20115 may be intended to represent 1 February and not 2 January. It is helpful to reflect the input date in an unambiguous format to help prevent such errors.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27998286
accepted answer of: http://stackoverflow.com/q/27998286
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/44371178
comment on: http://stackoverflow.com/q/27990133
type: Comment
score: 1
type: QuestionComment
has text: Have you tried looping over the array, and comparing values with four variables for {x/y} {min/max}? If you have tried that, what part of this approach gives you problems?

http://stackoverflow.com/a/28018108
has body: The data looks right to me. It's two 32-bit floats in little endian format. To verify: var buf = new Buffer([0,0,192,63,195,245,72,64]); console.log(buf.readFloatLE(0)); // outputs: 1.5 console.log(buf.readFloatLE(4)); // outputs: 3.140000104904175 I'm not sure if there's a way to go directly back to a Float32Array from a Buffer, but you could do something like this if you need to do that: var fa = new Float32Array(buf.length / 4); for (var i = 0, p = 0; i &lt; buf.length; i += 4, ++p) fa[p] = buf.readFloatLE(i);
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28017812
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28017812
has comment: http://stackoverflow.com/comment/44454352
type: Answer

http://stackoverflow.com/comment/44492903
comment on: http://stackoverflow.com/q/28055545
has text: Is this showing up in your browser source? If so your server isn't executing PHP, it's just sending it through raw.
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/28110594
answers question: http://stackoverflow.com/q/28108816
upvote count: 1
score: 1
downvote count: 0
has body: For who is interested I solved this problem. The only thing that I changed is this line: string script = @"javascript: window.open('http://www.microsoft.com', null, 'scrollbars=1,width=600,HEIGHT=400');"; Response.Write(script.ToString()); into this: Page.ClientScript.RegisterStartupScript( GetType(), "MyKey", "window.open('http://www.microsoft.com', null, 'scrollbars=1,width=600,HEIGHT=400');", true); I don't really understand why this happen but in this way I solved my problem.
type: Answer

http://stackoverflow.com/comment/44482910
comment on: http://stackoverflow.com/q/28050071
has text: @Max `live()` has been deprecated for years, and was completely removed several major versions ago
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27978266
has title: Firebase + Angular + User Associated Items
tagged with: firebase
type: Question
has body: If you look at my code below I can add a project and associate it with the user, but when I want to pull up a users projects I keep getting the error: TypeError: undefined is not a function I've also tried using $child on the top but that's not working either. Here is my code: 'use strict'; angular.module('writer') .factory('Users', ['firebaseURI', '$firebase', 'Auth', function(firebaseURI, $firebase, Auth){ var currentUser = Auth.currentUser, users = new Firebase(firebaseURI + 'users'); function _getProjectsForCurrentUser(){ return users.child(currentUser.id + '/projects/'); } function _addProjectForCurrentUser(projectRef){ users.child(currentUser.id + '/projects/' + projectRef.key()).set(true); } return { getProjectsForCurrentUser: _getProjectsForCurrentUser, addProjectForCurrentUser: _addProjectForCurrentUser }; }]) .factory('Projects', ['firebaseURI', '$firebase', 'Auth', 'Users', function(firebaseURI, $firebase, Auth, Users){ var projectsRef = new Firebase(firebaseURI + 'projects'), projects = $firebase(projectsRef); function _getProjects(){ return projects; } function _create(project){ console.log('create', project); projects.$push(project).then(function(ref){ Users.addProjectForCurrentUser(ref); }, function(error){ console.log('Projects Error:', error); }); } return { getProjects: _getProjects, create: _create }; }]) ; Any help is greatly appreciated.
downvote count: 2
score: -2
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27981077
tagged with: angularfire
upvote count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/q/28119857
answer count: 0
has body: I found this post, namely, this Gremlin query at the end of the post: g.V.as('all').out.in.as('parents').optional('all').except('parents') This query finds all orphaned nodes (or at least it should). I need to do this in Cayley (google's Golang graph database) but it doesn't work with Cayley's version of Gremlin (which is not truly Gremlin). Since there are various commands that are missing from Cayley's version I am unable to run the query against a Cayley graph. How would I go about writing a query that find all orphaned nodes like this with Cayley-gremlin's limited set of commands? Is it possible?
score: 1
tagged with: cayley
upvote count: 1
has title: Gremlin Cayley query: return all orphaned nodes?
tagged with: gremlin
type: Question
tagged with: graph-databases
tagged with: javascript
downvote count: 0
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/28109086
has comment: http://stackoverflow.com/comment/44592261
has body: It will spare your from using two buttons.When submit button is clicked check if all the fields are filled in or not.Use && operator instead of || operator.Because you want all the fields to be filled if(name != '' && vorname != '' && email != '' && firma != '' && telefon != '' ) If all fields are filled it will alert a message which will tell you that your form is submitted.Otherwise it will alert you to fill all the fields function validateForm() { var name = document.getElementById('name').value; var vorname = document.getElementById('vorname').value; var email = document.getElementById('fullemail').value; var firma = document.getElementById('firma').value; var telefon = document.getElementById('telefon').value; if(name != '' && vorname != '' && email != '' && firma != '' && telefon != '' ) { alert('form is sumbitted.'); e.preventDefault(); }else { alert('fill all fields !!'); } } @
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28108982

http://stackoverflow.com/q/28030132
type: Question
answer count: 2
downvote count: 3
upvote count: 0
has answer: http://stackoverflow.com/a/28030220
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28030181
has comment: http://stackoverflow.com/comment/44445089
score: -3
has title: Append to string in JavaScript
favorite count: 0
has body: What I have is very simply this: myDir = location.href; myDir = myDir.substring(0,hipsDir.lastIndexOf("/",hipsDir.length)); Now myDir will point to the current folder. Now all I want is to get the variable to point to a different folder. So instead of /path/to/this/ I would like to have /path/to/this/and/that I just can't figure out how to append the string here…

http://stackoverflow.com/q/28114472
has comment: http://stackoverflow.com/comment/44603788
has comment: http://stackoverflow.com/comment/44605940
has title: attachEvent/for=".." event=".." equivalent in javascript
has comment: http://stackoverflow.com/comment/44603030
type: UnansweredQuestion
answer count: 0
tagged with: internet-explorer-11
has body: I am trying to replace attachEvent in Internet Explorer Javascript. ptIn = document.Form1.pt; if (ptIn.attachEvent){ ptIn.attachEvent("BeforeContextMenu", pivotBeforeContextMenu); ptIn.attachEvent("CommandExecute", pivotCommandExecute); }else{ alert("Running IE11 or IE9"); ptIn.addEventListener("BeforeContextMenu(ix, iy, mnu, cancel)", pivotBeforeContextMenu,false); ptIn.addEventListener("CommandExecute(vCommand, fSucceeded)", pivotCommandExecute,false); ptIn.addEventListener("BeforeContextMenu", pivotBeforeContextMenu,false); ptIn.addEventListener("CommandExecute", pivotCommandExecute,false); ptIn.BeforeContextMenu = pivotBeforeContextMenu; ptIn.CommandExecute = pivotCommandExecute; } I even tried naming the functions pt_BeforeContextMenu. The only thing that does work is making a script tag like : Is there better way to accomplish attaching a function to an event? Notes: ptIn.attachEvent(....) works, but no longer in IE11. Event I am trying to use: https://msdn.microsoft.com/en-us/library/aa193082(v=office.11).aspx function pivotBeforeContextMenu(iX, iY, mnu, fCancel){ //does stuff } function pivotCommandExecute(vCommand, fSucceeded){ //does stuff }
has comment: http://stackoverflow.com/comment/44603008
type: Question
tagged with: internet-explorer
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44603054
has comment: http://stackoverflow.com/comment/44608216
tagged with: dom-events

rate-limiting
tags question: http://stackoverflow.com/q/28019782
type: Tag
tag name: rate-limiting

http://stackoverflow.com/comment/44357861
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27973190
type: Comment
has text: @AbhilashShamsunder I am not too familiar with it myself but what kind of frustrations are they experiencing? (for future reference).

http://stackoverflow.com/comment/44363531
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27986320
score: 2
has text: If you do it a lot you could write a function that returns that function.

http://stackoverflow.com/q/28068404
has comment: http://stackoverflow.com/comment/44519287
upvote count: 3
tagged with: cucumber
answer count: 2
tagged with: gherkin
has comment: http://stackoverflow.com/comment/44519369
has answer: http://stackoverflow.com/a/28070106
favorite count: 0
has answer: http://stackoverflow.com/a/56661282
tagged with: ruby
type: UnansweredQuestion
has title: Save javascript variable to cucumber variable
downvote count: 0
has comment: http://stackoverflow.com/comment/44517064
type: Question
has body: I use Gherkin with Cucumber. But unfortunately I need to fetch some data from server with JavaScript. Question: How to save JavaScript request result to cucumber variable to be able to reuse the result in next steps? Code: Then(/^I load all stuff$/) do script = "(function run(){ var url = 'localhost:8o8o/getStuff'; $.ajax({url: url}).then(function(res) { //PROBLEM: how to save 'res' variable to Ruby variable? }); })()".gsub(/[\t\r\n]/, ''); @browser.execute_script(script) end
score: 3
tagged with: javascript

http://stackoverflow.com/comment/44493764
comment on: http://stackoverflow.com/a/28054454
has text: Btw. thank you so much for your help! I really appreciate it, that you, as a core developer of Meteor, take the time for StackOverflow questions! :)
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/28050174
answers question: http://stackoverflow.com/q/28049845
has comment: http://stackoverflow.com/comment/44483731
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/28049845
upvote count: 1
has body: A meta tag you should use to turn zoom function off would be the next: &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"&gt; You'll find more information reading the answers section of this StackOverflow question Next thing you've got to do is to find out about user's operating system. The way to do so depends on server's programming language. Ok, since you're using Ruby, you might need something like request.user_agent.include?("Android") to get user's OS. But you've got to know this information is not guaranteed to be sent. So, combining both elements we've got something like: &lt;% if request.user_agent.include?("Android") %&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"&gt; &lt;% end %&gt;

http://stackoverflow.com/q/28081826
tagged with: javascript
score: 4
upvote count: 4
has answer: http://stackoverflow.com/a/68916425
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: css
has title: Touch event on position: fixed; element doesn't work correctly on iOS
has body: This is a similar problem with IOS 5 (safari) bug with HTML touch events on "position:fixed" div Somebody said that this bug has been fixed. But, on iOS 8, I find it is only fixed when you tap and scroll the page SLOWLY. Here is my codes: Document You can find the bug in these two different ways: fast swipe and scroll the page on the area for several times. swipe on the .content area, then quickly tap on the area before the page stop scrolling. In both cases, sometimes you can find that "Tap on UNDER content." is output when you tap on the area. Update: There is 3rd case: swipe on the .content area, then quickly tap on the .content area again before the page stop scrolling, then tap on the area. In this case, the tap on the area doesn't output anything. I've tried the hacks, like "add touchstart event for ", "add temporary ". None of them works. Any idea on how to fix this? Thanks.
linked to: http://stackoverflow.com/q/8809706
type: Question
tagged with: ios

http://stackoverflow.com/comment/44582792
type: QuestionComment
comment on: http://stackoverflow.com/q/28103894
has text: @JCOC611 it should work with .css files
score: 0
type: Comment

http://stackoverflow.com/comment/44412759
comment on: http://stackoverflow.com/q/28012614
score: 0
has text: Please consider doing a little research before posting a question this basic. https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=javascript+element+content
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44614229
has text: With the loop you're basically overriding each control until you hit your last control which is Export.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28119963

http://stackoverflow.com/comment/44432534
type: AnswerComment
type: Comment
score: 1
has text: great, I'll accept answer as soon as site allow it to me.
comment on: http://stackoverflow.com/a/28023489

http://stackoverflow.com/comment/44397108
score: 0
has text: Wow, that's awesome! It worked, I am going to update the answer in a second!
comment on: http://stackoverflow.com/q/28004167
type: Comment
type: QuestionComment

webstorm
tags question: http://stackoverflow.com/q/27999781
type: Tag
tags question: http://stackoverflow.com/q/28044162
tag name: webstorm
tags question: http://stackoverflow.com/q/28080084
tags question: http://stackoverflow.com/q/28053092

ejbca
type: Tag
tags question: http://stackoverflow.com/q/27982781
tags question: http://stackoverflow.com/q/28067553
tag name: ejbca

http://stackoverflow.com/a/27986076
has body: Simple search on the plugin page show that "Autosize has no way of knowing when the value of a textarea has been changed through JavaScript". As of this documentation, you should use $("#request_description").val(data1)trigger('autosize.resize');
type: Answer
accepted answer of: http://stackoverflow.com/q/27985910
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27985910
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44369068

http://stackoverflow.com/comment/44378850
comment on: http://stackoverflow.com/a/27975409
has text: Appears to be running in order now, but here's an example of what it is outputting (note the answers are being overwritten by stray IDs -- from the next game?). I think something may be up with the array clears: `clue_J_1_1|THE ROOSEVELTS: AN INTIMATE HISTORY|$200|On April 25, 1865, 6-year-old Teddy watched from a window as this man's funeral procession moved through Manhattan|clue_J_1_1 clue_J_2_1|DOUBLE TALK|$200|Cheerleaders know it traditionally precedes "sis, boom, bah!"|clue_J_2_1 clue_J_3_1|STATES THAT FLOW TOGETHER|$200|One has St. Louis, the other has East St. Louis|clue_J_3_1`
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28018237
has comment: http://stackoverflow.com/comment/44423670
has body: I'm new to AngularJS and very lost at this point. I am trying to learn from this code: http://plnkr.co/edit/dd8Nk9PDFotCQu4yrnDg?p=preview script.js: // create the module and name it scotchApp var scotchApp = angular.module('scotchApp', ['ngRoute']); // configure our routes scotchApp.config(function($routeProvider) { $routeProvider // route for the home page .when('/', { templateUrl : 'pages/home.html', controller : 'mainController' }) // route for the about page .when('/about', { templateUrl : 'pages/about.html', controller : 'aboutController' }) // route for the contact page .when('/contact', { templateUrl : 'pages/contact.html', controller : 'contactController' }); }); // create the controller and inject Angular's $scope scotchApp.controller('mainController', function($scope) { // create a message to display in our view $scope.message = 'Everyone come and see how good I look!'; }); scotchApp.controller('aboutController', function($scope) { $scope.message = 'Look! I am an about page.'; }); scotchApp.controller('contactController', function($scope) { $scope.message = 'Contact us! JK. This is just a demo.'; }); My index.html file includes &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"&gt;&lt;/script&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular-route.js"&gt;&lt;/script&gt; I have it set up on a local environment. I can load the main page but the routing only changes the URL, nothing else. Any ideas what could be causing this?
possible better answer: http://stackoverflow.com/a/28019051
score: 0
has answer: http://stackoverflow.com/a/28019051
accepted answer: http://stackoverflow.com/a/28029742
has comment: http://stackoverflow.com/comment/44423712
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44423568
tagged with: url-routing
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44423682
has answer: http://stackoverflow.com/a/28029742
type: Question
has title: AngularJS Routing Not Working As Expected
has comment: http://stackoverflow.com/comment/44424105
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/44490913
has text: Uh, if the `condition1` is not matched then the `_counter` is never assigned to? What else do you expect? Where (and how often) do you call that function?
type: QuestionComment
comment on: http://stackoverflow.com/q/28054411
score: 0
type: Comment

http://stackoverflow.com/q/28086337
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28087727
has comment: http://stackoverflow.com/comment/44550188
has title: jquery uncheck parent if current element is check
has comment: http://stackoverflow.com/comment/44550112
type: Question
has answer: http://stackoverflow.com/a/28086559
has answer: http://stackoverflow.com/a/28086471
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44550015
score: 0
has body: I have the following html markup Smith Emma Peter Admins Michael Ashley Robert Steve Jennifer Rock Jack http://jsfiddle.net/ckoe9q3L/5/ when user checks admin, and then checks Michael, I want it to uncheck admin. I am not able to uncheck admin, if user checks Michael and another example user checks Robert and then checks Steve. So it should uncheck Admin and Robert but keep Steve checked $('.user').change(function() { var c = this.checked; if (c) { $(this).parent().find(':checkbox').prop('checked', false); } }
answer count: 3
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/28086471
has comment: http://stackoverflow.com/comment/44550066
possible better answer: http://stackoverflow.com/a/28087727

http://stackoverflow.com/a/27994919
has body: The step run immediately without waiting for your deferred because $.when is run asynchronously and in your script you are return status for $.when callback not for onStepChanging. My suggestion, yo need to return false your onStepChanging event by default, and do step change manually.. may be something like this onStepChanging: function(event, currentIndex, newIndex) { $.when(asyncEvent()).then(function(status) { if(status) { if (currentIndex &lt; newIndex) { form.children("div").steps('next'); } else { form.children("div").steps('previous'); } } }); return false; } Sorry if I write some mistake, I'm not testing this code well, I just read example on http://www.jquery-steps.com/Examples and try to understand how it work, but the main idea is just return false by default and do step change manually.. Hope it help..
score: 0
has comment: http://stackoverflow.com/comment/44443617
type: Answer
answers question: http://stackoverflow.com/q/27994071

http://stackoverflow.com/a/29030602
has body: I've encountered exactly the same issue. The solution that worked for me was editing the nivo-lightbox.min.js file. Look for string "http" and replace it with "https". The only downside for this solution is that it you will load videos in https even if the user requested to see your page on http protocol. Hope this helps!
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/28071138
type: Answer
accepted answer of: http://stackoverflow.com/q/28071138
has comment: http://stackoverflow.com/comment/57061002
upvote count: 1

http://stackoverflow.com/q/28041636
possible better answer: http://stackoverflow.com/a/28041658
has answer: http://stackoverflow.com/a/28041658
answer count: 3
upvote count: 0
has title: How to add the checked attribute to check box field which having some class using jquery
has answer: http://stackoverflow.com/a/28041774
tagged with: jquery
has answer: http://stackoverflow.com/a/28041772
favorite count: 0
score: -3
has comment: http://stackoverflow.com/comment/44466643
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28041774
has comment: http://stackoverflow.com/comment/44466729
has body: I want add the checked attribute for which element has some class called 'addCheck', here is my code : &lt;input type="checkbox" id="due_date" name="due_date" class='addCheck'&gt; Here is jquery code for trial: $(".addCheck" ).attr('checked','checked');
downvote count: 3
type: Question
tagged with: javascript

http://stackoverflow.com/comment/44561854
type: Comment
comment on: http://stackoverflow.com/a/28092367
has text: you probably forgot to add it to the container?
score: 0
type: AnswerComment

http://stackoverflow.com/q/28105097
has comment: http://stackoverflow.com/comment/45322396
favorite count: 0
linked to: http://stackoverflow.com/q/3100319
type: Question
has comment: http://stackoverflow.com/comment/44584887
has comment: http://stackoverflow.com/comment/45321707
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28501545
duplicate of: http://stackoverflow.com/q/3100319
tagged with: css
has comment: http://stackoverflow.com/comment/45322472
has comment: http://stackoverflow.com/comment/45321354
has comment: http://stackoverflow.com/comment/45321904
has comment: http://stackoverflow.com/comment/44584830
has body: How to disable this below context menu in jquery when text box is disabled. my right click disabled functionality working fine in all browsers except firefox. Note: When text box is enabled the right click disabled functionality is working fine in all browsers.Please help here. I tried the below code in my body tag. but it won't work in firefox oncontextmenu="return false;"
linked to: http://stackoverflow.com/q/16109228
has comment: http://stackoverflow.com/comment/45321928
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/28509978
has comment: http://stackoverflow.com/comment/45321864
downvote count: 1
has comment: http://stackoverflow.com/comment/45323809
has comment: http://stackoverflow.com/comment/45321887
has comment: http://stackoverflow.com/comment/45322449
has comment: http://stackoverflow.com/comment/44584893
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44584869
has comment: http://stackoverflow.com/comment/45321808
has answer: http://stackoverflow.com/a/28497462
has title: How to disable this below context menu in jquery when text box is disabled
tagged with: javascript
score: 1
tagged with: jquery

http://stackoverflow.com/comment/44440555
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/28022528
has text: Some browsers are ok with non-full-http Ajax calls and some aren't. Phantom is weird like that.
type: Comment

http://stackoverflow.com/comment/44581067
score: 0
type: Comment
type: QuestionComment
has text: Thanks for the link. But i dont get an output. myself getting the same error.
comment on: http://stackoverflow.com/q/28085826

http://stackoverflow.com/a/27969248
type: AcceptedAnswer
downvote count: 0
upvote count: 45
score: 45
type: Answer
has body: Theres a dash in your class name, so use single quotes! ng-class="{'has-success': form.email.$valid}"
accepted answer of: http://stackoverflow.com/q/27969218
has comment: http://stackoverflow.com/comment/98858129
has comment: http://stackoverflow.com/comment/44331320
has comment: http://stackoverflow.com/comment/44331663
answers question: http://stackoverflow.com/q/27969218
has comment: http://stackoverflow.com/comment/44331404

http://stackoverflow.com/q/27992562
has body: I couldnt find answer anywhere so Iam posting the question. How to properly load byte array of pdf file (taken from i.e. Web API) to blob and then generate url based on this blob? Tried to use this solution: AngularJS: Display blob (.pdf) in an angular app But I keep getting: Failed to load PDF document.
type: Question
tagged with: blob
has title: Load pdf to Blob and create url
linked to: http://stackoverflow.com/q/21628378
score: 0
answer count: 1
tagged with: asp.net-web-api
tagged with: javascript
has comment: http://stackoverflow.com/comment/44377810
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/pdf
has answer: http://stackoverflow.com/a/28320556

http://stackoverflow.com/comment/44465189
comment on: http://stackoverflow.com/q/28040717
score: 0
has text: Check your css classes - you're moving it up out of view when you click.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27973698
has body: Your HTML structure is not ideal for this type of thing but chaining together a series of selectors can accomplish this: $('.align .desktop').click(function (e) { var target = $(this).data('toggleTarget'); $( '#' + target).siblings(".secret").slideUp().end().closest(".row").siblings(".row").find(".secret").slideUp().end().end().end().slideToggle(300).toggleClass('open'); }); FIDDLE
type: Answer
answers question: http://stackoverflow.com/q/27973125
accepted answer of: http://stackoverflow.com/q/27973125
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/44661384
comment on: http://stackoverflow.com/q/28083385
type: Comment
type: QuestionComment
score: 0
has text: UserScript on Greasemonkey has `GM_xmlhttpRequest` API which can access cross domain resource directly. Is this what you need?

http://stackoverflow.com/comment/44524987
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28072718
has text: I *do* want to invoke the predefined `sayOrdinal` function. Maybe not for the simplified example here, but my real life code needs it.
score: 0

http://stackoverflow.com/a/28064539
upvote count: 5
answers question: http://stackoverflow.com/q/28064433
score: 5
downvote count: 0
type: Answer
has body: You need to push a reference to the function, not to its (undefined) results: Try this: calls.push(callWithIndex.bind(null, i));
has comment: http://stackoverflow.com/comment/44509935
has comment: http://stackoverflow.com/comment/44510167
has comment: http://stackoverflow.com/comment/44509694

http://stackoverflow.com/comment/44557700
comment on: http://stackoverflow.com/q/28090563
type: Comment
type: QuestionComment
has text: When you debug the JavaScript in the browser, what happens? Is the element found? Is there an `onclick` attribute to remove? What's in that attribute? Are you also removing the click handler which invokes the postback? (That would explain the behavior you're seeing of not invoking the postback.)
score: 0

http://stackoverflow.com/a/28005243
type: Answer
upvote count: 1
score: 1
has body: You may have much more compact code: .... $list = array() while($rows = mysql_fetch_assoc($sql)) { $list[] = $rows[$haber]; } echo '&lt;script type="text/javascript"&gt;' . "\n"; echo 'var yazi='; echo json_encode($list,JSON_HEX_APOS | JSON_HEX_QUOT); echo ";\n"; echo '&lt;/script&gt;' . "\n"; What is this doing: There's no need to count the added elements in $i, count($array) will give you the cutrrent number.. But it's not needed anyway. Put some newlines behind the echo, better readable source json_encode will format an JSON array from your php array, which can be directly used as source code.
downvote count: 0
answers question: http://stackoverflow.com/q/28005025

http://stackoverflow.com/comment/44584094
type: Comment
type: QuestionComment
has text: I have included http also but here it is not displayed
comment on: http://stackoverflow.com/q/28104277
score: 0

http://stackoverflow.com/q/28027934
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28028182
has title: Stroke-dasharray tween on multiple paths
type: Question
tagged with: interpolation
tagged with: d3.js
score: 0
tagged with: tween
answer count: 1
has answer: http://stackoverflow.com/a/28028182
has body: I am projecting multiple line paths on a map and hoping to use stroke-dash interpolation on them to show path movements. I want to use the same Tween function on all the paths, but it seems as though the Tween is returning the same value for every path. All of the lines seem to be projecting fine; it's only the Tween that's causing some issue. It causes this issue, where the paths show stroke-dashes: It should instead look like the following: My lines are projected using the following standard process for a leaflet x/y conversion: var svg = d3.select(map.getPanes().overlayPane).append("svg"); var g = svg.append("g").attr("class", "leaflet-zoom-hide"); var transform = d3.geo.transform({ point: projectPoint }); var d3path = d3.geo.path().projection(transform); var toLine = d3.svg.line() .interpolate("linear") .x(function(d,i) { return applyLatLngToLayer(d).x }) .y(function(d,i) { return applyLatLngToLayer(d).y }); g.selectAll(".lineConnect").remove(); var linePath = g.selectAll(".lineConnect") .data(series) .enter() .append("path") .attr("class", "lineConnect") linePath.attr("d", toLine) And here you see the function that calls the Tween: function transition() { linePath.transition() .duration(700).attrTween("stroke-dasharray", tweenDash); } function tweenDash() { return function(t) { var l = linePath.node().getTotalLength(); interpolate = d3.interpolateString("0," + l, l + "," + l); return interpolate(t); } }
type: AnsweredQuestion

http://stackoverflow.com/q/28007637
score: 0
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has body: I have a modal window using twitter bootstrap, i need to align certain elements inside a tab, i have followed the documentation and did several changes, it dint help. Is there any bootstrap expert to help me on this?.Here is my problem. Html: Title Type Color Width Dash Style interpolate Delete Output:
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44403708
tagged with: css
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/44403489
has title: Alignment of ng-repeat elements using bootstrap modal
type: Question
has comment: http://stackoverflow.com/comment/44403672
tagged with: javascript
has answer: http://stackoverflow.com/a/28154028

http://stackoverflow.com/q/28033700
has comment: http://stackoverflow.com/comment/44454329
tagged with: http://stackoverflow.com/tag/html
has title: How can I programatically generate Html on the server, without a third party library?
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/28033814
has comment: http://stackoverflow.com/comment/44454272
has body: I asked a similar question, but before it got closed as a duplicate I forgot to mention I want to understand how to do this without using a third party library. How can I dynamically generate Html content with Node.js? So, how can I programatically generate Html content on the server side using Node.js? (I don't mean sending hard-coded Html, I mean generating it like you would on the client side). (I have nothing against 3rd party libraries. I prefer to understand Node.js well before learning about libraries on top of it).
tagged with: node.js
has comment: http://stackoverflow.com/comment/44452382
has comment: http://stackoverflow.com/comment/44452435
tagged with: server
has answer: http://stackoverflow.com/a/28033830
linked to: http://stackoverflow.com/q/28023829
has comment: http://stackoverflow.com/comment/44452482
type: Question
answer count: 2
upvote count: 0
score: -2
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/28093635
answer count: 0
type: UnansweredQuestion
tagged with: streaming
has title: Syncing Javascript Canvas shapes with web video stream
downvote count: 0
score: 1
type: Question
tagged with: canvas
tagged with: javascript
has body: Im trying to synchronize a web video stream (rtsp, or whatever) with rectangles that I will draw on canvas. The values of the rectangles will be passed on from a software that will detect some features on the video. The challenge is that there is a lag from the video stream, how can I keep them in sync together so the shape that I will draw will follow the rectangle coordinates being passed?
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: synchronization
favorite count: 0
has comment: http://stackoverflow.com/comment/44578309

http://stackoverflow.com/comment/44549477
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28082556
has text: Not sure if this will help you, but look at `window.getMatchedCSSRules`.
score: 0

http://stackoverflow.com/comment/44524314
score: 6
has text: You can change any recursion to a loop with a stack.
comment on: http://stackoverflow.com/q/28072418
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44612863
score: 0
type: Comment
type: QuestionComment
has text: Is the element registering the event being fired? Console log is your best friend for debugging
comment on: http://stackoverflow.com/q/28118849

http://stackoverflow.com/comment/44406139
type: QuestionComment
has text: No There is no such error!
type: Comment
comment on: http://stackoverflow.com/q/28009115
score: 0

http://stackoverflow.com/a/28034414
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/28034030
downvote count: 0
has comment: http://stackoverflow.com/comment/44454076
type: Answer
upvote count: 1
score: 1
has body: They are required because when they are required is as if the file is ran i.e. core.js is ran. By looking at the core.js code, it will create the core functionality and it will expose it. i.e. jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; ... ... etc Snippet taken from jQuery core If they are not required, the functionality will not be exposed. Hope that helps.
accepted answer of: http://stackoverflow.com/q/28034030

http://stackoverflow.com/a/79389432
has body: layer.property("ADBE Mask Parade").property(1).property("ADBE Mask Shape")
score: 0
answers question: http://stackoverflow.com/q/27993646
has comment: http://stackoverflow.com/comment/140004350
type: Answer

hyperlink
tags question: http://stackoverflow.com/q/28019090
tags question: http://stackoverflow.com/q/28085107
tags question: http://stackoverflow.com/q/28060086
tags question: http://stackoverflow.com/q/28072771
tags question: http://stackoverflow.com/q/28089796
tags question: http://stackoverflow.com/q/27974801
tags question: http://stackoverflow.com/q/28062884
tag name: hyperlink
tags question: http://stackoverflow.com/q/28092888
tags question: http://stackoverflow.com/q/27992638
type: Tag

http://stackoverflow.com/q/28100711
has comment: http://stackoverflow.com/comment/44590180
accepted answer: http://stackoverflow.com/a/28102629
linked to: http://stackoverflow.com/q/13829667
has comment: http://stackoverflow.com/comment/44577150
has comment: http://stackoverflow.com/comment/44577703
tagged with: php
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44577691
has body: I know im doing something wrong since i dont know javascript yet. My slider is not showing on the website but everything else yes. Here is my code: Html Hellequin - Class - Cra Please slide ! Css .container {width : 70%; margin: 0px auto;} #elephant{ margin-bottom:5px; border : 1px solid black; width : 50px; height : 20px; line-height : 20px; position : relative; text-align : center; } Javascript $(document).ready(function () { $(function () { var elephantArr = new Array("", "200", "199", "198", "197", "196", "195", "194", "193", "192", "191", "190", "189"); var initialValue = 1, min = 1, max = 200; $("#slider").slider({ value: initialValue, min: min, max: max, step: 1, slide: function (event, ui) { $("#elephantInfo").val(ui.value); $("#elephant").text(elephantArr[ui.value]); $("#elephant").css("left", "10px"); } }); $("#elephantInfo").val(initialValue); $("#elephant").text(elephantArr[initialValue]); $("#elephant").css("left", "10px"); }); }); And if there any tips about how to customize how the slider look like, im open to suggestion! PS: Sry for the bad language..
has comment: http://stackoverflow.com/comment/44577668
type: Question
has comment: http://stackoverflow.com/comment/44577870
has answer: http://stackoverflow.com/a/28102629
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44577096
score: 0
tagged with: slider
answer count: 1
has comment: http://stackoverflow.com/comment/44577081
has comment: http://stackoverflow.com/comment/44577167
has title: Javascript Slider not showing and Graph tips
has comment: http://stackoverflow.com/comment/44577029

http://stackoverflow.com/comment/44584221
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28104277
has text: No i am not getting any error

http://stackoverflow.com/comment/44498021
has text: I didn't realize that I couldn't insert the script in the head, but that fixed my problem. Thanks matthias_h!
type: Comment
comment on: http://stackoverflow.com/a/28057764
score: 0
type: AnswerComment

http://stackoverflow.com/a/28184050
has body: Lexical this is the last part of ES6 arrow functions to land in v8 and it is the reason why it is still behind a flag and not ready to ship yet. Adrian Perez at Igalia is implementing arrow functions and the final patch is almost ready to land as soon as a few TurboFan issues are worked out: https://codereview.chromium.org/883823002/
answers question: http://stackoverflow.com/q/28029523
score: 11
has comment: http://stackoverflow.com/comment/50948912
has comment: http://stackoverflow.com/comment/50946670
has comment: http://stackoverflow.com/comment/50225032
has comment: http://stackoverflow.com/comment/50484320
has comment: http://stackoverflow.com/comment/50380429
has comment: http://stackoverflow.com/comment/50418882
has comment: http://stackoverflow.com/comment/50402086
has comment: http://stackoverflow.com/comment/50829390
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/50998906
has comment: http://stackoverflow.com/comment/50402088
type: Answer
accepted answer of: http://stackoverflow.com/q/28029523
upvote count: 11

http://stackoverflow.com/comment/44436690
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28025259
has text: I'm changing my browsermode to IE7. jsFiddle won't work unfortunately because their site isn't optimized for IE7 your tip with ".get(0)" also crashes the application and the length check like this: $('textarea.classname, input.classname[type=text]').length too so I have to check the length using this: if($('textarea.classname').length > 0 || $('input.classname[type=text]').length > 0){
score: 0

http://stackoverflow.com/a/28083939
answers question: http://stackoverflow.com/q/28083708
has comment: http://stackoverflow.com/comment/105726107
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28083708
has body: The CSS property that can be used is: pointer-events:none !IMPORTANT Keep in mind that this property is not supported by Opera Mini and IE 10 and below (inclusive). Another solution is needed for these browsers. jQuery METHOD If you want to disable it via script and not CSS property, these can help you out: If you're using jQuery versions 1.4.3+: $('selector').click(false); If not: $('selector').click(function(){return false;}); Referenced from : jquery - disable click You can re-enable clicks with pointer-events: auto; (Documentation) Note that pointer-events overrides the cursor property, so if you want the cursor to be something other than the standard , your css should be place after pointer-events.
type: Answer
score: 211
upvote count: 211
has comment: http://stackoverflow.com/comment/102904511
has comment: http://stackoverflow.com/comment/115126278

http://stackoverflow.com/comment/44544329
score: 0
type: Comment
type: QuestionComment
has text: Remove first `select` from ` ` !!!
comment on: http://stackoverflow.com/q/28082878

http://stackoverflow.com/comment/44381573
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27992764
score: 1
has text: yes, its loading the js file before jquery or not loading jquery at all. All new themes include jquery in the footer (mostly) if your file is in the header, its going to throw errors. BTW WP uses noconflict jquery so replace '$` with `jQuery` just in case $elem is not a valid object after correcting this.

http://stackoverflow.com/q/28058756
possible better answer: http://stackoverflow.com/a/28058896
score: 0
answer count: 3
tagged with: drop-down-menu
has answer: http://stackoverflow.com/a/28081123
has comment: http://stackoverflow.com/comment/44499234
has comment: http://stackoverflow.com/comment/44499118
accepted answer: http://stackoverflow.com/a/28081123
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28058818
has title: Hiding options in select box using Javascript
has body: Home – dilo <!--[if lt IE 9]> <![endif]--> Home About Us Our Organisation Our History Our Training Philosophy Our Vision Our Corporate Customers Media Images Videos In the News Apply Now Aviation English Training Aircraft Maintenance Training Programme Contact Us Go to... Home About Us Our Organisation Our History Our Training Philosophy Our Vision Our Corporate Customers Media Images Videos In the News Apply Now Aviation English Training Aircraft Maintenance Training Programme Contact Us Recent Posts Hello world! Training Events Recent Comments Mr WordPress on Hello world! Archives January 2015 June 2014 Categories Uncategorized Meta Site Admin Log out Entries RSS Comments RSS WordPress.org Home Home / Home Aircraft Maintenance Training Approved Maintenance Training Organisation for fixed and rotary wing personnel. Aviation Consultancy The Group’s dynamic aviation consultancy arm. Aviation English Malaysia’s and the region’s only Aviation Language specialists. Home March 26, 2014 san cheam Posted In: Widget areas This is a sidebar (widget area). Please go to Appearance → Widgets to add widgets to this area This is the Footer Sidebar 1 (widget area). Please go to Appearance → Widgets to add widgets to this area This is the Footer Sidebar 2 (widget area). Please go to Appearance → Widgets to add widgets to this area This is the Footer Sidebar 3 (widget area). Please go to Appearance → Widgets to add widgets to this area This is the Footer Sidebar 4 (widget area). Please go to Appearance → Widgets to add widgets to this area Copyright ©2015 dilo. All rights reserved. Skip to toolbar About WordPress WordPress.org Documentation Support Forums Feedback dilo Dashboard Themes Customize Widgets Menus 0 New Post Media Page Portfolio User Edit Page Howdy, tommy tommy Edit My Profile Log Out Log Out var id = document.getElementById('nav-container'); var sel = id.getElementsByTagName('select'); var option = sel.getElementsByTagName('option'); sel.remove(3); Hi, I have the above…
type: Question
has answer: http://stackoverflow.com/a/28058896
has comment: http://stackoverflow.com/comment/44499197
tagged with: javascript

http://stackoverflow.com/q/28083528
has body: FIDDLE DEMO var oldValue; $(document).on('keydown','.main', function (e) { oldValue = $(this).val(); }); var newValue; $(document).on('keyup', '.main',function (e) { newValue = $(this).val(); foo(oldValue,newValue); }); function foo(orig){ $('#table2').find('tbody tr').each(function (i) { var $td2 = $(this).find('td input:text'); if (orig == $td2.val()) { $td2.val(newValue); } }); } This is what happens,if I change "Apple" on table 1 slowly typing, "Apple" input field changes, but If I type too fast, my code is not working.
has comment: http://stackoverflow.com/comment/44546626
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44545212
has comment: http://stackoverflow.com/comment/44555438
tagged with: javascript
has comment: http://stackoverflow.com/comment/44545055
answer count: 2
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44545398
has comment: http://stackoverflow.com/comment/44546159
upvote count: 2
type: UnansweredQuestion
has title: function for keypress event not triggered when typing too fast
has comment: http://stackoverflow.com/comment/44545149
has answer: http://stackoverflow.com/a/28084201
has answer: http://stackoverflow.com/a/28083753
has comment: http://stackoverflow.com/comment/44545158
has comment: http://stackoverflow.com/comment/44545233

http://stackoverflow.com/q/28005066
tagged with: javascript
tagged with: date
has comment: http://stackoverflow.com/comment/44399486
has body: I have a two textboxes which I'll get the date to compare in the format of yy-mm-dd. // Get the value from textbox var date1 = $("#f_date").val(); // 2015-01-01 var date2 = $("#t_date").val(); // 2015-03-01 if(date1 &lt; date2) { alert("From date is lesser than To Date"); } else { alert("From date is greater than To Date"); } How can I do that? Please help. Thanks
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/44398525
has comment: http://stackoverflow.com/comment/44398540
has answer: http://stackoverflow.com/a/28005083
has title: How to compare two dates in yy-mm-dd format in javascript?
possible better answer: http://stackoverflow.com/a/28005241
has answer: http://stackoverflow.com/a/28005241
has comment: http://stackoverflow.com/comment/44398537
linked to: http://stackoverflow.com/q/492994
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/28005083
type: Question

http://stackoverflow.com/a/28049755
has body: You may look at Tabs Integration to view how to add widgets inside Tabs using the jQWidgets Tabs widget.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/28048331

http://stackoverflow.com/comment/70840249
has text: In my case, my goal was using it in the view. I've achieved this by using underscore.memoize function. In my case, i can't include underscore or refactor my code to use underscore but this info might be helpful for people who can take such a decision.
score: 0
comment on: http://stackoverflow.com/a/28045501
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/44386567
type: AnswerComment
has text: `isDate('2/30/2015');` gives `true` when it should return `false`.
type: Comment
comment on: http://stackoverflow.com/a/27998371
score: 1

http://stackoverflow.com/comment/66607448
comment on: http://stackoverflow.com/a/28112010
type: AnswerComment
score: 1
type: Comment
has text: @Brandon but when does the map function iterate? I mean, when you map on an array, you already have all the elements in the array and it iterates log(n) times through each of the elements. When you .map on an Observable, has the observable already received all of the elements (and it iterates through each of them) or do the functions (inside the map block) operate on each element (event) as it arrives? So for Observables, does map act as an iterator (like it does for normal arrays) or is .map more of a decorator for each event (element) to pass through?

http://stackoverflow.com/comment/46890704
has text: Is there a way I could add functionality **after** the default execution of a Blueprint route? I want to "expand" the list of IDs returned by a controller. Question: http://stackoverflow.com/questions/29254826/populating-a-many-to-many-through-relation-in-sails-js
type: Comment
score: 2
comment on: http://stackoverflow.com/a/27989894
type: AnswerComment

http://stackoverflow.com/comment/44551806
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28087344
has text: Instead of all that parsing, you probably can use something like `if(~parts.search('comboFilters%5BYears%5D=&')){[code if empty...]}else{[code if not empty...]}`
score: 0

http://stackoverflow.com/comment/44569791
score: 1
comment on: http://stackoverflow.com/q/28096922
type: QuestionComment
type: Comment
has text: @Blazemonger `function.name` isn't supported everywhere, and won't work on anonymous functions like `b: function(args) {`

cryptography
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/28084053
tags question: http://stackoverflow.com/q/28067553
tags question: http://stackoverflow.com/q/28066979

http://stackoverflow.com/a/28022500
has comment: http://stackoverflow.com/comment/44443604
has comment: http://stackoverflow.com/comment/44443363
has comment: http://stackoverflow.com/comment/44431379
has comment: http://stackoverflow.com/comment/44438068
accepted answer of: http://stackoverflow.com/q/27997206
has comment: http://stackoverflow.com/comment/44444883
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44440963
downvote count: 0
has body: To get the divs to behave the same, you probably just need to remove #manuscript from the styles where #article does not appear (or conversely add #article to the ones where #manuscript does). The only one I see in your example is #Page-Table, #Content, #Left, #Right, #Header, #Footer, #Manuscript, #Manuscript { height:100%; top: 0; bottom: 0; left: 0; right: 0; position: relative; border:0; margin:0; padding:0; } Just change it to #Page-Table, #Content, #Left, #Right, #Header, #Footer { height:100%; top: 0; bottom: 0; left: 0; right: 0; position: relative; border:0; margin:0; padding:0; } Here's an example setting the height of the div and giving it a border so that you see it a little clearer within SO. You have some odd styling on your footer that overlaps the article, but that may work when you have the rest of your styles in - $(document).ready(function() { $("#Content").tabs({ event: "mouseover" }); //Setup Manuscript Editor var Editor = ace.edit("Manuscript"); Editor.setTheme("ace/theme/twilight"); Editor.getSession().setMode("ace/mode/markdown"); //set contents of Manuscript to "index.md" file contents //jQuery.get('README.md', function(data) { // Editor.setValue("Test markdown"); //}); //startup showdownjs to reset Article contents on Manuscript changes //var converter = new Showdown.converter({ // extensions: ['table'] //}); var doc = Editor.getSession().getDocument(); Editor.getSession().on('change', function(e) { //document.getElementById("Article").innerHTML = converter.makeHtml(Editor.getValue()) //MathJax.Hub.Queue(["Typeset",MathJax.Hub,"Article"]) //$("#Article").children().addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"); // using current line-height of 14 pixels... $("#Manuscript").css({"height": (14 * doc.getLength()) + 'px'}); Editor.resize(); }); // Editor.resize(); }); #Page-Table { min-height: 100%; width: 100%; margin: 0; } #Page-Table, #Content, #Left, #Right, #Header, #Footer { height: 100%; top: 0; bottom: 0; left: 0; right: 0…
has comment: http://stackoverflow.com/comment/44436940
type: Answer
has comment: http://stackoverflow.com/comment/44447976
has comment: http://stackoverflow.com/comment/44437338
score: 2
answers question: http://stackoverflow.com/q/27997206
has comment: http://stackoverflow.com/comment/44436643
upvote count: 2
has comment: http://stackoverflow.com/comment/44444617
has comment: http://stackoverflow.com/comment/44447428

http://stackoverflow.com/q/28036723
score: 0
has comment: http://stackoverflow.com/comment/44458473
type: UnansweredQuestion
has body: I'm trying to connect a JavaScript EventSource to a Servlet. I have the following JavaScript code: var eventSource = new EventSource("notify?userId=123456"); eventSource.onopen = function(e){ console.log("Connection Opened"); }; eventSource.onmessage = function(e){ console.log("Message: " + e.data); }; eventSource.onerror = function(e){ console.log("Error"); }; Where notify is the location of my Servlet (on the Servlet I use @WebServlet("/notify")) and ?userId=123456 is a parameter I'm trying to pass to the Servlet. In the developer console, the above code does not produce any logs. However, on the server-side I can see that the code did connect, though, whenever I try to send a message to the client the onmessage function is never hit. If I remove the parameter and do something like this: var eventSource = new EventSource("notify"); In the developer console, every few seconds I get: Connection Opened Error It seems to continuously repeat. What am I missing here?
has title: Error connecting EventSource (Server-sent event) to server
tagged with: java
tagged with: server-sent-events
tagged with: servlets
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/28037408

http://stackoverflow.com/comment/44606944
type: AnswerComment
comment on: http://stackoverflow.com/a/28115504
type: Comment
has text: clever ... but not sure it really answers the question with enough context.
score: 0

http://stackoverflow.com/comment/44591503
score: 0
type: AnswerComment
has text: update your answer to your comment and you will get my +1 for sure
type: Comment
comment on: http://stackoverflow.com/a/28107198

http://stackoverflow.com/q/28081043
has comment: http://stackoverflow.com/comment/44540702
has comment: http://stackoverflow.com/comment/44540758
has title: jQuery .forEach() causing error, "undefined is not a function"
upvote count: 1
has answer: http://stackoverflow.com/a/28081264
type: Question
tagged with: object
score: 1
has answer: http://stackoverflow.com/a/28081174
has comment: http://stackoverflow.com/comment/44540714
has comment: http://stackoverflow.com/comment/44540700
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I'm getting the error, undefined is not a function for the line entries.forEach(function(e) { and I don't know why. Can anyone help? I'm certain that entries is defined as the prototype below when I pass it to the function. This is the function I'm working on: function score_relevance3(entries, usr_tags) { entries.forEach(function(e) { entries[e].count = 0; entries[e].tags.forEach(function(i) { usr_tags.forEach(function(f) { if (entries[e].tags[i] === usr_tags[f]) { entries[e].count++; } }); }); }); return entries; } Here is a prototype of my entries object: entries = { "1":{"tags":["1","2"]}, "2":{"tags":["1","3","2"]}, "3":{"tags":["1","2"]}, "4":{"tags":["1","2"]}, "5":{"tags":["1","2"]}, "6":{"tags":["4","5","6","2"]}, "7":{"tags":["4","7"]}, "8":{"tags":["4","8","3"]}, "9":{"tags":["4","9"]} };
linked to: http://stackoverflow.com/q/8312459
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44541097

http://stackoverflow.com/a/28068166
upvote count: 3
has comment: http://stackoverflow.com/comment/44517541
has comment: http://stackoverflow.com/comment/44520950
downvote count: 0
has body: (I'm assuming the syntax and other errors that JAAulde pointed out aren't really in your code, or that you've fixed it.) but with delete Object is not destroyed Completely... delete doesn't release objects; it removes properties. The object will be eligible for garbage collection if the property you're removing is the only reference to the object. When and how the actual garbage collection occurs is up to the JavaScript engine (it's unlikely to happen immediately). If you have other references to that object, then deleting the property won't make it eligible for GC (because of the other references to it). But if you're about to assign a new value to the property, there's no reason for delete; assigning a new value also releases the reference to the previous object, making it eligible for GC (assuming nothing else has a reference to it). E.g., this code will completely release the old object (unless something else has a reference to it): $scope.mediacontent = {}; $scope.mediacontent[$scope.slider_url] = media_data; $scope.mediacontent[$scope.slider_url][img_no].active = true; ...because the first line of that replaces the reference to the old object with a reference to a newly-created one.
has comment: http://stackoverflow.com/comment/44520029
answers question: http://stackoverflow.com/q/28068046
has comment: http://stackoverflow.com/comment/44516466
score: 3
type: Answer
has comment: http://stackoverflow.com/comment/44516071
has comment: http://stackoverflow.com/comment/44516406

http://stackoverflow.com/a/28106422
accepted answer of: http://stackoverflow.com/q/28106394
answers question: http://stackoverflow.com/q/28106394
upvote count: 2
type: AcceptedAnswer
has body: You just need to move the .append() to follow the tr declaration, not the td: $('&lt;tr&gt;') .append($('&lt;td&gt;', {'class' : 'text-center', 'text' : 'col1'})) .append($('&lt;td&gt;', {'class' : 'text-center', 'text' : 'col2'}))
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/44607659
score: 0
type: Comment
type: QuestionComment
has text: this site is just for brazilians @adeneo, and of course some immigrant who speaks Portuguese can use it, but i want capitalize the word just for search throw the database.
comment on: http://stackoverflow.com/q/28116533

http://stackoverflow.com/a/28046577
type: Answer
has comment: http://stackoverflow.com/comment/44475467
has comment: http://stackoverflow.com/comment/44475553
has body: You need to use the DOM API for the HTML table element. It's documented at http://www.w3schools.com/jsref/dom_obj_table.asp Here's an example taken from http://www.w3schools.com/jsref/met_table_insertrow.asp : // Find a &lt;table&gt; element with id="myTable": var table = document.getElementById("myTable"); // Create an empty &lt;tr&gt; element and add it to the 1st position of the table: var row = table.insertRow(0); // Insert new cells (&lt;td&gt; elements) at the 1st and 2nd position of the "new" &lt;tr&gt; element: var cell1 = row.insertCell(0); var cell2 = row.insertCell(1); // Add some text to the new cells: cell1.innerHTML = "NEW CELL1"; cell2.innerHTML = "NEW CELL2";
answers question: http://stackoverflow.com/q/28046480
score: 0

http://stackoverflow.com/a/28063923
type: Answer
has comment: http://stackoverflow.com/comment/44508762
score: 1
has body: As there are a few answers, I'll give a functional one based on reduce : var arr = data.reduce(function(r,m){ (r[m.type]||(r[m.type]=[])).push(m.path+m.name+'.'+m.type); return r; },{});
answers question: http://stackoverflow.com/q/28063766
upvote count: 1
has comment: http://stackoverflow.com/comment/44508845
downvote count: 0
has comment: http://stackoverflow.com/comment/44508606

http://stackoverflow.com/q/28010484
tagged with: javascript
score: -1
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/28010516
accepted answer: http://stackoverflow.com/a/28010516
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44408607
downvote count: 2
has comment: http://stackoverflow.com/comment/44408616
has comment: http://stackoverflow.com/comment/44408829
has body: I would like to change the data-title to "Projects" through jQuery. Get in touch I've tried something like this but it didn't work. Is there a way? $('#contact-button').data('title', 'Projects').text('Projects');
upvote count: 1
has title: Change a data type through jQuery
type: Question

http://stackoverflow.com/a/28121221
answers question: http://stackoverflow.com/q/28121011
type: Answer
has comment: http://stackoverflow.com/comment/44618882
has comment: http://stackoverflow.com/comment/44618779
has body: Removing the GetString() function your javascript is operating like this: bip.server.BPF("gS",z).done(function(result){array.push(result)}); alert(array); The .done() function is executed asynchronously. Meaning the script will jump right to the next statement, which is the alert(). Basically you want to return the deferred object, and use that to handle the callback: function GetString(z){ return bip.server.BPF("gS",z); } GetString("select top 1 u from users").done(function(r) { array.push(r); alert(array); });
score: 0

http://stackoverflow.com/comment/44325954
type: Comment
has text: @Neil See my edit, your `.js` files are still in the wrong order. Right click and press `View Source` and compare the two pages; you'll see the issue.
comment on: http://stackoverflow.com/a/27966356
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44459652
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28037259
has text: You're right - Gonna see what I can do with the CSS now... Thanks a lot for your help, stealth! Get back to you soon.

http://stackoverflow.com/comment/44377705
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27965700
score: 0
has text: ok , lemme switch gears here and try that. I will modify the question if needed.

http://stackoverflow.com/a/57409538
has body: You can use css .ads{pointer-events:none} or Using javascript prevent event $("selector").click(function(event){ event.preventDefault(); });
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/28083708
downvote count: 0
score: 4

http://stackoverflow.com/q/27994512
has body: I'm currently trying to make a page with an overlay that toggles once the form is correctly filled out then submitted. Once the first form is submitted it should take you to another. Both forms are in the html already, first overlay works but second does not. function formValidator() { var firstname = document.getElementById('firstname'); var lastname = document.getElementById('lastname'); var email = document.getElementById('email'); var phone = document.getElementById('phone'); // Check each input in the order that it appears in the form! if (notEmpty(firstname, "Cannot leave First Name empty")) { if (notEmpty(lastname, "Cannot leave Last Name empty")) { if (notEmpty(phone, "Cannot leave Phone # empty")) { if (notEmpty(email, "Cannot leave Email empty")) { if (isAlphabet(firstname, "Please enter only letters for your first name")) { if (isAlphabet(lastname, "Please enter only letters for your last name")) { if (phoneValidator(phone, "Numbers only for phone # in the xxx-xxx-xxxx format")) { if (emailValidator(email, "Please enter a valid email address")) { return true; } } } } } } } } return false; } function notEmpty(elem, helperMsg){ if(elem.value.length == 0){ alert(helperMsg); elem.focus(); // set the focus to this input return false; } return true; } function isAlphabet(elem, helperMsg){ var alphaExp = /^[a-zA-Z]+$/; if(elem.value.match(alphaExp)){ return true; }else{ alert(helperMsg); elem.focus(); return false; } } function phoneValidator(elem, helperMsg){ var alphaExp = /^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/; if(elem.value.match(alphaExp)){ return true; }else{ alert(helperMsg); elem.focus(); return false; } } function emailValidator(elem, helperMsg){ var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/; if(elem.value.match(emailExp)){ return true; }else{ alert(helperMsg); elem.focus(); return false; } } function formValidator2(){ var dropdown1 = document.getElementById('selection').value; var dropdown2 = document.getElementById('selection2'…
has comment: http://stackoverflow.com/comment/44379931
answer count: 1
tagged with: javascript
has title: Multiple toggles using javaScript not jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/44379646
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44380789
has comment: http://stackoverflow.com/comment/44379504
has comment: http://stackoverflow.com/comment/44379975
has comment: http://stackoverflow.com/comment/44379904
type: Question
has answer: http://stackoverflow.com/a/27994791
has comment: http://stackoverflow.com/comment/44379679

http://stackoverflow.com/a/28031716
type: Answer
accepted answer of: http://stackoverflow.com/q/28031625
upvote count: 2
answers question: http://stackoverflow.com/q/28031625
score: 2
has body: Put 'alert' in quotes. It's a string
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27966791
answer count: 3
has comment: http://stackoverflow.com/comment/44327466
downvote count: 0
has body: I'm using the select2 plugin with the property maximumSelectionSize: 1. After selecting 1, there is an event still on the form that allows the user to click on the outside of the box and a message will appear to say: "You can only select 1 item". I don't want this message at all. Is there a way I can ensure that this doesn't ever appear? EDIT - code posted on request: $('.select2-select').select2({ maximumSelectionSize: 1 }); EDIT 2: aaand a fiddle: http://jsfiddle.net/s85k7tg7/
favorite count: 0
has comment: http://stackoverflow.com/comment/44326367
has title: Select2 - only allow one selected AND disabled popup
has answer: http://stackoverflow.com/a/78116805
has answer: http://stackoverflow.com/a/27971287
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27971287
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/44326716
score: 5
upvote count: 5
possible better answer: http://stackoverflow.com/a/59942445
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/59942445
tagged with: jquery-select2

http://stackoverflow.com/a/28116491
has body: By 'change to another page and back again', I take it that you reload the page? You need to have a database (ex. mysql) set up so that you can figure out when the time left when a user visit that page again. User clicks the pie Pie saves current_time and ending_time into db User reloads the page Page pulls the current_time and ending_time Page generates the pie relative to the current_time and ending_time
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28113811
type: Answer
answers question: http://stackoverflow.com/q/28113811
score: 1
upvote count: 1

http://stackoverflow.com/q/28035300
has comment: http://stackoverflow.com/comment/44466439
type: Question
tagged with: ember-data
tagged with: javascript
score: 0
has body: I have a list which is displayed which has a hasMany relationship. I'm not having trouble displaying the initial list, but I would like to display data from a second JSON when a link in the item is clicked. Here are my models: App.TemplateInstance = DS.Model.extend({ name: DS.attr(), template_instances_audiences: DS.hasMany("TemplateInstanceAudience", {async:true}) }); App.TemplateInstanceAudience = DS.Model.extend({ name: DS.attr(), template_instance: DS.belongsTo("TemplateInstance",{async:true}), asset_instances: DS.hasMany("AssetInstance") }); App.AssetInstance = DS.Model.extend({ name: DS.attr(), template_instance_audience: DS.belongsTo("TemplateInstanceAudience") }); I'm using mockjax to simulate making a GET request. As you can see from the mockjax, I have different nested routes displaying different data: $.mockjax({ url: '/templateInstances/4', dataType: 'json', responseText: { template_instances: { id: 1, name: "bill", links: { template_instances_audiences: "/templateInstances/4/audiences" } } } }); $.mockjax({ url: "/templateInstances/4/audiences", dataType: "json", responseText: { template_instance_audiences: [{ id: 1, name: "bar 1", template_instance: 1, links: { asset_instances: "/templateInstances/4/audiences/1/assets" } },{ id: 2, name: "bar 2", template_instance: 1, links: { asset_instances: "/templateInstances/4/audiences/2/assets" } }] } }); $.mockjax({ url: "/templateInstances/4/audiences/1/assets", dataType: "json", responseText: { asset_instances: [{ id: 1, asset_id: 1, name: "Assets 1", template_instance: 1 },{ id: 2, asset_id: 2, name: "Assets 2", template_instance: 1 }] } }); $.mockjax({ url: "/templateInstances/4/audiences/2/assets", dataType: "json", responseText: { asset_instances: [{ id: 3, asset_id: 3, name: "Assets 3", template_instance: 1 },{ id: 4, asset_id: 4, name: "Assets 4", template_instance: 1 }] } }); My template is displaying the items from template instance model. &lt;ul&gt; {{#each item in template_instances_audiences}} &lt;…
has comment: http://stackoverflow.com/comment/44460438
answer count: 0
type: UnansweredQuestion
tagged with: ember.js
has title: Display data with hasMany relationships

http://stackoverflow.com/a/28038239
type: Answer
has comment: http://stackoverflow.com/comment/44461031
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/28038124
has comment: http://stackoverflow.com/comment/44461152
downvote count: 0
has body: The bug in your code is that i is a global variable. Therefore each call to the function rewrites the same i and i keeps being reset to 0.
has comment: http://stackoverflow.com/comment/44461961

http://stackoverflow.com/comment/44464313
has text: or load first.js after render function in .html page
comment on: http://stackoverflow.com/q/28039944
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28036638
score: 0
type: Answer
has body: IE tends to have a lot of issues. jQuery is a popular JavaScript library created with solving cross-browser issues in-mind. You can use jQuery's .attr() function to set your data attributes, like so: setInterval(function () { $('body').attr('data-after', new Date()); }, 1000); See: http://api.jquery.com/attr/ Alternatively, you can look into using jQuery's .data([key], [value]) method. Note: Be careful using dates with Internet Explorer, in my experience its unable to parse some common ISO 8601 date formats. I'd suggest another library for handling dates and times: moment.js
has comment: http://stackoverflow.com/comment/44650631
answers question: http://stackoverflow.com/q/28031707

http://stackoverflow.com/a/28034662
answers question: http://stackoverflow.com/q/28024805
upvote count: 1
type: AcceptedAnswer
has body: Perhaps you're running into the "MDS" (Minimal Download Strategy) feature of SP2013. Make sure you register your template overriding code as a module with RegisterModuleInit(), if you have MDS enabled in your site. You can see this article for more details: http://blogs.msdn.com/b/sridhara/archive/2013/02/08/register-csr-override-on-mds-enabled-sharepoint-2013-site.aspx
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/28024805

http://stackoverflow.com/a/27982475
has comment: http://stackoverflow.com/comment/44356626
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44356883
has comment: http://stackoverflow.com/comment/44356666
answers question: http://stackoverflow.com/q/27982300
has comment: http://stackoverflow.com/comment/44356650
has comment: http://stackoverflow.com/comment/44356958
downvote count: 0
has comment: http://stackoverflow.com/comment/44358455
has comment: http://stackoverflow.com/comment/44356847
type: Answer
has comment: http://stackoverflow.com/comment/44356902
has comment: http://stackoverflow.com/comment/44357433
has comment: http://stackoverflow.com/comment/44356752
has body: z-index only works for elements which have their position set. in the following example, 4 divs, 2 on top of other 2, note how the yellow div's z-index works while the blue one's doesnt, because the yellow has its position set and the blue doesnt: div{ display:block; width:100px; height:50px; } .red{ background:red; position:absolute; } .blue{ background:blue; z-index:2; } .green{ background:green; position:absolute; } .yellow{ background:yellow; position:absolute; z-index:2; } here is the same in a fiddle, so you can play around with the css and see the difference: Fiddle Example UPDATE: following your fiddle, i have bad news and good news: bad news: the html dropdown option list is rendered by the browser liek a context menu, and will always appear above all other elements, and you cannot change that. good news:, you can create your own custom dropdown list and make it appear behind the menu. luckily, jQuery UI does exactly that using jQuery SelectMenu you can download jquery Here, and customize your own jquery UI theme Here (or use the online links from the example below) $(function(){ $("#divisiondrpdwn").selectmenu(); }); ul, li { list-style:none; margin:0; padding:0; } .Nav2 ul.Main { list-style-type:none; margin:0; padding:0; position:relative; font-size: 100%; } .Nav2 ul.Main li { float:left; } .Nav2 ul.Main li> a { text-decoration:none; padding:5px 15px; color:#00f; background:url(sprite.png) no-repeat right 8px #ff0; text-transform:uppercase; display:block; height:18px; line-height:18px; } /*-----Hover-----*/ .Nav2 ul.Main li a:hover { background:#fc0; color:#000; } .Nav2 ul.Main li:last-child a, ul.Dropdown a { background-image:none; } .Nav2 ul.Dropdown { list-style-type: none; margin: 0; padding: 0; position: absolute; width: 9.2em; z-index: 1020; } .Nav2 ul.Dropdown li { text-decoration:none; clear:both } .Nav2 ul.Dropdown li> a { background-image:none; display:none; padding: 5px 24px; } .Nav2 ul.Main li:hover ul.Dropdown li> a { display:block; } .Nav2 …

http://stackoverflow.com/a/28040915
score: 0
has body: You could also write an directive. Which is the nicest way in angular to do this kind of stuff: Html: Lijst van producten {{item.naam}} {{item.prijs}} js: .controller("basictrl", function ($scope, $http, producteffecten) { $scope.producten = null; $http({ method: 'GET', url: 'producten.json' }). success(function (data, status, headers, config) { $scope.producten = data; $scope.showdescription = producteffecten.showdescription; }).error(function (data, status, headers, config) {}); }) .directive("hoverText",function(){ return {link:function(scope,elem,attr){ var insertElem=$(" "+scope.hoverText+" ") elem .mouseenter(function() { insertElem.appendTo(elem); }) .mouseleave(function() { insertElem.remove(); }); }, scope:{"hoverText":"="} }; });
type: Answer
answers question: http://stackoverflow.com/q/28027215

http://stackoverflow.com/q/28019246
has comment: http://stackoverflow.com/comment/44425021
score: 0
has answer: http://stackoverflow.com/a/28019499
accepted answer: http://stackoverflow.com/a/28019499
answer count: 1
has comment: http://stackoverflow.com/comment/44425077
tagged with: jquery
has comment: http://stackoverflow.com/comment/44424989
has comment: http://stackoverflow.com/comment/44425372
tagged with: animation
tagged with: css
has title: How do I make this code more DRY? (Multiple css animations playing on scroll over)
has comment: http://stackoverflow.com/comment/44425350
type: AnsweredQuestion
type: Question
has body: I have the usual animation.css file and a few divs that are in the same place but have different animations attached to them. They should animate at the same time (when scrolling over the page) but differently, that is. This is the code I use for ONE animation: function isElementInViewport(elem) { var $elem = $(elem); // Get the scroll position of the page. var scrollElem = ((navigator.userAgent.toLowerCase().indexOf('webkit') != -1) ? 'body' : 'html'); var viewportTop = $(scrollElem).scrollTop(); var viewportBottom = viewportTop + $(window).height(); // Get the position of the element on the page. var elemTop = Math.round( $elem.offset().top ); var elemBottom = elemTop + $elem.height(); return ((elemTop &lt; viewportBottom) &amp;&amp; (elemBottom &gt; viewportTop)); } // Check if it's time to start the animation. function checkAnimation() { var $elem = $('.sp-effect1'); if (isElementInViewport($elem)) { // Start the animation $elem.addClass('fadeInLeft'); } else { $elem.removeClass('fadeInLeft'); } } // Capture scroll events $(window).scroll(function(){ checkAnimation(); }); The problem is, I only know how to get the other animations playing at the same time by copying this code and calling the variables different things, and then running it again and again, just calling different classes (fadeInRight and fadeInDown) on the different divs (sp-effect2 and sp-effect3). As this method isn't very DRY and frankly a bit stupid, how can I achieve the same result within the same code block instead? Edit: The code I pasted here above is DRY, since I didn't want to paste the actual bad code which is just a repeat of what is pasted here above. You have to read my request to understand what I mean.
tagged with: javascript

http://stackoverflow.com/q/28019840
upvote count: 2
tagged with: kendo-tooltip
possible better answer: http://stackoverflow.com/a/32700826
accepted answer: http://stackoverflow.com/a/28043978
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/32700826
type: Question
answer count: 2
has body: I know that there are people ask kendo to prevent kendo tooltip from close/hide whenever we click outside the tooltip. They are suggesting it here but seems that it has not been implemented yet. I couldn't find the method which closes/hides when we click outside kendo tooltip so far. I only found the event triggered when we click on close or cancel button on kendo tooltip. But is there any way/hackish way to achieve this using javascript/jquery/anything?
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: kendo-ui
has title: Prevent kendo tooltip hide/close when clicking outside the tooltip?
has comment: http://stackoverflow.com/comment/50407832
favorite count: 0
has answer: http://stackoverflow.com/a/28043978

http://stackoverflow.com/q/28042360
has answer: http://stackoverflow.com/a/28042579
answer count: 3
favorite count: 0
type: UnansweredQuestion
has body: I want to pass array elements from Java code into jsp page so that if I click the button it will show the array elements in the page. I tried to use JSTL forEach tag inside JavaScript or jQuery but it doesn't work and I don't get any error when I run the program! .jsp page joining jQuery and JSTL &lt;%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%&gt; &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt; &lt;%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %&gt; &lt;stripes:submit name="showData" value="Show" id="button"&gt;&lt;/stripes:submit&gt; &lt;script&gt; $(document).ready(function() { $("button").button().click(function(){ &lt;c:forEach var="array" items="${actionBean.myArray }"&gt; &lt;c:out value="${array }"&gt;&lt;/c:out&gt; &lt;/c:forEach&gt; }); }); &lt;/script&gt; .jsp page joingin JS and JSTL &lt;stripes:submit name="showData" value="Show" onClick="myFunc"&gt;&lt;/stripes:submit&gt; &lt;c:set var="newVar"&gt; &lt;c:forEach var="array" items="${actionBean.myArray }"&gt; &lt;c:out value="${array }"&gt;&lt;/c:out&gt; &lt;/c:forEach&gt; &lt;/c:set&gt; &lt;script type="text/javascript"&gt; var my_js_data = &lt;c:out value="${newVar}"/&gt; function myFunc() { return my_js_data; } &lt;/script&gt;
upvote count: 1
has answer: http://stackoverflow.com/a/28042574
has answer: http://stackoverflow.com/a/28042856
score: 1
tagged with: java
type: Question
tagged with: jstl
has title: JSTL inside jQuery or JavaScript
downvote count: 0
tagged with: jsp
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/44583924
type: Comment
has text: Doesn't this only work if the objects are in order of lowest to highest id first? That or my brain is not working properly..
comment on: http://stackoverflow.com/a/28104593
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44452890
has text: What I meant was to try a large Microsoft exe file, I think it is safe to assume that other file types would work except for exe files larger than 2MB
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/28033246

http://stackoverflow.com/q/27980107
possible better answer: http://stackoverflow.com/a/27980328
score: 0
has answer: http://stackoverflow.com/a/27980328
accepted answer: http://stackoverflow.com/a/27980187
has title: JS - Separating a string with periods to meet certain character length
has comment: http://stackoverflow.com/comment/44351769
has answer: http://stackoverflow.com/a/27981141
has body: I'm trying to find a way to separate two words with periods to match a certain character length in Javascript. For example, say I made a function where my desired length is 20 characters and entered 'Dapper' and 'Donald'. I need to find a way to pad out the string and get a result of 'Dapper........Donald'. I'm pretty lost, so I appreciate any help.
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1877475
has answer: http://stackoverflow.com/a/27980187
type: Question
answer count: 3
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/q/28104893
type: Question
has title: How to make an element active on hover, and remain active when im hovering over another specific div
has answer: http://stackoverflow.com/a/28105117
accepted answer: http://stackoverflow.com/a/28105117
score: -1
answer count: 2
downvote count: 1
has comment: http://stackoverflow.com/comment/44584707
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/28105161
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
upvote count: 0
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/44584751
has body: I have a menu bar with categories, when I hover a certain category a large drop down appear under it with subcategories. I have already created it, you can see it here http://www.bootply.com/9Qz14HIz8R Now when I hover the category its background change to gray, and when I move the cursor down to the subcategory drop down the grey background on the category is gone. I want to find a way to make the category background gray when hovered, and then when I move the cursor to the subcategory drop down, i want the category to remain in gray background. And when i move the cursor outside the subcategories drop down box then the category background will be gone. I want to know what is the best way to achieve this. I'm thinking that using js or jquery we can make the category active on hover and keep it active once cursor is on the subcategories drop down but make it inactive when the cursor moves out of the drop down box. Any idea on how to solve this or if you suggest a different approach to achieve it.
possible better answer: http://stackoverflow.com/a/28105161
has comment: http://stackoverflow.com/comment/44586154

http://stackoverflow.com/comment/44574079
comment on: http://stackoverflow.com/q/28098525
type: Comment
score: 0
has text: @TimLewis noted. I was kind of in a rush, but I will remember that for next time. Thanks again.
type: QuestionComment

http://stackoverflow.com/q/28065882
has comment: http://stackoverflow.com/comment/44513202
score: 0
has title: How to process an image in url to upload on the server in cordova
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44524097
tagged with: cordova
answer count: 0
has comment: http://stackoverflow.com/comment/44512177
has body: I am having a problem with this code. i wanna process the cordova android image url ( ie. stored in localStorage ) to upload in my web server. function processImages(list, i){ var images = list[i].images; images &amp;&amp; images.forEach(function(image, j){ window.resolveLocalFileSystemURI(image, function(entry) { var reader = new FileReader(); reader.onloadend = function(evt) { list[i].images[j] = evt.target.result; } reader.onerror = function(evt) { alert("error"); } entry.file(function(f) { //alert("Image is added"); reader.readAsDataURL(f); }, function(e) { alert('Image process error : '+e); }); }); }); } This code runs good if i am enabling #alert("Image is added"); this alert. without this alert the app is shutting down by giving error unfortunately appname has stopped. Its also not working for n number of images of size more than 2mb. Note : consider async call and image size is more than 2mb each minimum 10 image per record. Please help me !!! Thanks
type: Question

http://stackoverflow.com/comment/44371579
type: Comment
type: QuestionComment
score: 0
has text: If I use like tutorials: app.all('/*', function(req, res, next) {res.render('index.jade', {'root': 'app/views/'});});, the browser downloads the file, but with app.get('*', index.render); after all other routes, It render the index again, but not invoke my client routes
comment on: http://stackoverflow.com/q/27971489

http://stackoverflow.com/comment/44560212
score: 1
comment on: http://stackoverflow.com/q/28091906
has text: Change that to an array of arrays.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28042222
has comment: http://stackoverflow.com/comment/44467637
tagged with: javascript-objects
possible better answer: http://stackoverflow.com/a/28042377
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has title: How to list the properties of a JavaScript object by field name
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/28042293
has body: I create an object like this: [ Object { Username = "James", Password = "12345", Email = "james@test.com" }, Object { Username = "Auric", Password = "12345", Email = "auric@test.com" } ] What is the best way to retrieve a list of the property names? i.e. I would like to end up with some variable 'keys' such that: Object = ["james@test.com", "auric@test.com"] Thanks.
favorite count: 0
has answer: http://stackoverflow.com/a/28042377
accepted answer: http://stackoverflow.com/a/28042293

http://stackoverflow.com/a/28011589
has comment: http://stackoverflow.com/comment/44410766
answers question: http://stackoverflow.com/q/28011220
accepted answer of: http://stackoverflow.com/q/28011220
type: AcceptedAnswer
downvote count: 0
has body: It should be something like this: var xmlDoc, quest, ans, i, n; xmlDoc = loadXMLDoc("questions.xml"); quest = xmlDoc.getElementsByTagName('main'); document.write(" "); for (i = 0; i < quest.length; i+=1) { document.write(" "); document.write( quest[i].childNodes[0].nodeValue ); document.write(" "); for(n = 1; n < 5; n++) // m = 1 because [0] is the title. { document.write(" "); document.write( quest[i].childNodes[n].nodeValue ); document.write(" "); } } document.write(" ");
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44440260

http://stackoverflow.com/q/28032958
has answer: http://stackoverflow.com/a/28035233
score: 4
tagged with: interpolation
accepted answer: http://stackoverflow.com/a/28035258
tagged with: math
answer count: 3
tagged with: algorithm
has title: understand implementation of cubic interpolation
tagged with: javascript
upvote count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28035258
downvote count: 0
has answer: http://stackoverflow.com/a/28033440
favorite count: 0
possible better answer: http://stackoverflow.com/a/28035233
has body: I want to implement the cubic interpolation in javascript to draw a curve with canvas. The idea is to click in the canvas to add points and with each change a redraw function is called which calculates the points to draw in the canvas for the given clicked points. I found some examples for example: http://snipplr.com/view/727/cubic-interpolation/ http://www.paulinternet.nl/?page=bicubic http://dzone.com/snippets/cubic-interpolation But I don't get how to use this code :/ According to this simple example for 4 points: float cubic_interpolate( float y0, float y1, float y2, float y3, float mu ) { float a0, a1, a2, a3, mu2; mu2 = mu*mu; a0 = y3 - y2 - y0 + y1; //p a1 = y0 - y1 - a0; a2 = y2 - y0; a3 = y1; return ( a0*mu*mu2 + a1*mu2 + a2*mu + a3 ); } First one I don't get are the parameters. I have 4 points and a value between 0 and 1. So what is my return value? Or better what is mu? Are y0 ... y3 just the y-values of the points or points like y0[0] is x and y0[1] is y? What I need is a algorithm which have some points and a x value as parameters and the return value should be the y value. Something like that: function calculateCubic( points ){ var pointsToDraw = []; getValue(p1,p2,p3,p4,xCoordinate){ var yCoordinate; yCoordinate = ... ... return yCoordinate; } for(var i = 0; i&lt;p.length-3;i++){ var stepLen = ( p[i+1][0] - p[i][0] ) / 100; for( var s = p[i][0]; s &lt;= p[i+1][0] ;s += stepLen ){ pointsToDraw[pointsToDraw.length] = getValue(p[i],p[i+1],p[i+2],p[i+3],p[i][0]); } } return pointsToDraw; } Can anyone help me understanding the code snipets and using them for my problem? Thanks in advice!
type: Question

http://stackoverflow.com/q/27981734
score: -2
tagged with: javascript
linked to: http://stackoverflow.com/q/5034781
has comment: http://stackoverflow.com/comment/44417756
upvote count: 0
answer count: 1
has title: how can i parse a csv with javascript for a non-web application?
tagged with: adobe-indesign
favorite count: 0
has comment: http://stackoverflow.com/comment/44356407
has body: I am trying to write a script that will dynamically generate some InDesign templates using values contained within various columns of a local csv file. There seems to be a number of ways to approach this for a browser application, however, I can't find anything for non-web applications and all attempts thus far have failed. nb: data created on windows, using excel. I'm editing on my linux box, and running the script on a mac so I need a solution that takes all this into account. This is what i have so far, incorporating some helpful code found here: http://www.bennadel.com/blog/1504-ask-ben-parsing-csv-strings-with-javascript-exec-regular-expression-command.htm // target the latest version of InDesign #target "InDesign-10" // This will parse a delimited string into an array of // arrays. The default delimiter is the comma, but this // can be overriden in the second argument. // http://www.bennadel.com/blog/1504-ask-ben-parsing-csv-strings-with-javascript-exec-regular-expression-command.htm function CSVToArray( strData, strDelimiter ){ // Check to see if the delimiter is defined. If not, // then default to comma. strDelimiter = (strDelimiter || ","); // Create a regular expression to parse the CSV values. var objPattern = new RegExp( ( // Delimiters. "(\\" + strDelimiter + "|\\r?\\n|\\r|^)" + // Quoted fields. "(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|" + // Standard fields. "([^\"\\" + strDelimiter + "\\r\\n]*))" ), "gi" ); // Create an array to hold our data. Give the array // a default empty first row. var arrData = [[]]; // Create an array to hold our individual pattern // matching groups. var arrMatches = null; // Keep looping over the regular expression matches // until we can no longer find a match. while (arrMatches = objPattern.exec( strData )){ // Get the delimiter that was found. var strMatchedDelimiter = arrMatches[ 1 ]; // Check to see if the given delimiter has a length // (is not the start of string) and if it matches // field delimiter. If id does not, then we …
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/csv
has answer: http://stackoverflow.com/a/27982183
has comment: http://stackoverflow.com/comment/44405797
tagged with: adobe
has comment: http://stackoverflow.com/comment/44355017
downvote count: 2
has comment: http://stackoverflow.com/comment/44355125
type: Question

http://stackoverflow.com/comment/44447871
type: Comment
type: QuestionComment
has text: You've simply picked [a terrible question](http://stackoverflow.com/questions/17021615/display-error-message-in-a-separate-div-using-jquery-validation) to follow, as there is no explanation about what is calling the function in the first place.
comment on: http://stackoverflow.com/q/28022317
score: 0

rich-text-editor
tags question: http://stackoverflow.com/q/28028840
tag name: rich-text-editor
type: Tag
tags question: http://stackoverflow.com/q/28050645
tags question: http://stackoverflow.com/q/28030449

http://stackoverflow.com/comment/44511782
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28061155
has text: on reload f page this is not working. e.g : if I'm on www.mysitename.com/about on reload this page i got page not found error
score: 0

http://stackoverflow.com/a/28091084
score: 4
type: Answer
has body: Do this: var address = document.getElementById("address").innerHTML;
answers question: http://stackoverflow.com/q/28091040
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/44707005
score: 0
type: Comment
has text: Ok. Will do.sorry again!
comment on: http://stackoverflow.com/a/28106324
type: AnswerComment

http://stackoverflow.com/comment/44454202
has text: @user3610227 You may have to create custom validator. Try this question. http://stackoverflow.com/questions/14012239/password-check-directive-in-angularjs
comment on: http://stackoverflow.com/a/28034306
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/28114094
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44602635
type: Question
tagged with: reactjs
tagged with: javascript
has answer: http://stackoverflow.com/a/28114196
score: 0
has title: Onclick function not firing
answer count: 1
has body: I'm trying to show a list of button (PageLink) using React. A function(handleClick) will be called when any of the button is clicked. I'm passing this function as a callback from a parent component (Pagination). But the function isn't being called. Here is my code: var PageLink = React.createClass({ render: function() { return ( &lt;li&gt; &lt;button onclick={this.props.onPageClick}&gt;{this.props.pageNumber}&lt;/button&gt; &lt;/li&gt; ); } }); var Pagination = React.createClass({ render: function() { var pageLinks = []; for (var i = 1; i &lt;= this.props.totalPages; i++) { pageLinks.push(&lt;PageLink pageNumber={i} onPageClick={this.handleClick} key={i} /&gt;); } return ( &lt;nav&gt; &lt;ul className="pagination"&gt; {pageLinks} &lt;/ul&gt; &lt;/nav&gt; ); }, handleClick: function() { alert('hello'); } });
accepted answer: http://stackoverflow.com/a/28114196

http://stackoverflow.com/q/28084906
type: UnansweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/28118067
has comment: http://stackoverflow.com/comment/44557264
tagged with: three.js
has title: STL file reader issues
tagged with: step
has comment: http://stackoverflow.com/comment/44570118
tagged with: stl-format
has comment: http://stackoverflow.com/comment/44585382
type: Question
has comment: http://stackoverflow.com/comment/44584546
answer count: 2
has comment: http://stackoverflow.com/comment/44560372
downvote count: 0
has comment: http://stackoverflow.com/comment/44604899
tagged with: javascript
has comment: http://stackoverflow.com/comment/44629369
has comment: http://stackoverflow.com/comment/44582551
has comment: http://stackoverflow.com/comment/44590695
has answer: http://stackoverflow.com/a/28215585
score: 3
has comment: http://stackoverflow.com/comment/44560189
has body: I am using STLLoader.js to draw components. Every components are rendered properly with one defined color but that is not look like a real world component. Above image is my three.js implementation using STLLoader.js (Binary STL file used) as I have read this format supports color for the components. Below image is rendered one of my windows software and there I have used Step file. I want to render component same as look like in below image so its look like a real world component. Is there any way to get correct colored output in three.js? I have searched a lot but didn't get a way to implement it. Please help me to go in forward direction. var loader = new THREE.STLLoader(); loader.addEventListener( 'load', function ( event ) { var material = new THREE.MeshPhongMaterial( { color: 0x75D3DC, ambient: 0x75D3DC, specular: 0x75D3DC, shininess: 200/*, vertexColors: THREE.VertexColors */} ); var mesh = new THREE.Mesh( geometry, material ); mesh.position.x = x - boardMaxX + w/2 ; mesh.position.y = - 5 ; mesh.position.z = z - boardMaxY + h/2 ; mesh.rotation.set( (rotation * Math.PI / 180.0), 0, 0 ); mesh.scale.set(2, 2, 2); mesh.castShadow = true; mesh.receiveShadow = true; board.add(mesh); objects.push( mesh ); i = i + 5; componenetDraw(componentArray[i] * scaleX, -7, componentArray[i + 1] * scaleY, componentArray[i + 2], componentArray[i + 4]); } ); loader.load( fileName ); } The above code is used for read STL file. But I dont have code for read STEP file.
has comment: http://stackoverflow.com/comment/44619961
favorite count: 0
has comment: http://stackoverflow.com/comment/44583204

http://stackoverflow.com/comment/44575201
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/28099721
has text: Give `c` an initial value -- `var a, c = '';` The first time through the loop with `c = c + str[a];`, `c` hasn't yet been given a value, so it evaluates as `c = undefined + 'e';`

http://stackoverflow.com/comment/44581001
type: QuestionComment
comment on: http://stackoverflow.com/q/28102880
has text: sorry, your requirement is not clear - http://jsfiddle.net/arunpjohny/y8tygddw/1/ - can you tell us what should happen based on the attached fiddle
score: 0
type: Comment

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/27989450
tags question: http://stackoverflow.com/q/28098430
type: Tag
tags question: http://stackoverflow.com/q/28068237

http://stackoverflow.com/a/28081959
downvote count: 0
has comment: http://stackoverflow.com/comment/44542387
type: Answer
answers question: http://stackoverflow.com/q/28081877
accepted answer of: http://stackoverflow.com/q/28081877
has comment: http://stackoverflow.com/comment/44542369
score: 4
upvote count: 4
has body: You need to escape your newlines. You've embedded literal new-line characters into your string. Each of your \n escape sequences needs to be \\n. Note that your string will pass validation when copy-pasted into a validator because it's the JavaScript parser that turns \n into a literal newline character. This problem only manifests itself when your particular JSON string is first evaluated as a JavaScript string literal, and then parsed as JSON.
type: AcceptedAnswer

http://stackoverflow.com/comment/44528262
score: 0
type: QuestionComment
type: Comment
has text: Possibly relevant: [Iterate over ES6 Set/Map in Coffeescript (with `of` operator)](http://stackoverflow.com/q/26719794/1048572) :-)
comment on: http://stackoverflow.com/q/28073820

http://stackoverflow.com/a/28014331
answers question: http://stackoverflow.com/q/28014217
upvote count: 1
type: Answer
has body: You can get a reference to the textarea using getElementsByTagName, then start an interval that adds text to the placeholder. When the user starts typing you might want to stop the interval: setTimeout(function(){ var comp = document.getElementById('comp'); comp.innerHTML = '&lt;textarea placeholder="Write on me now, or else... you will have to watch me write on"&gt;&lt;/textarea&gt;'; var tex = comp.getElementsByTagName('textarea')[0]; var handle = window.setInterval(function(){ if (tex.value.length == 0) { tex.placeholder += ' and on'; } else { window.clearInterval(handle); } }, 200); }, 1500); textarea { width: 90%; height: 200px; } &lt;div id="comp"&gt;&lt;/div&gt; Also, you might want to add a counter (or just check the length of the placeholder), so that you can stop the interval after a certain number of times. If you leave the interval on indefinitely, the browser will eventually crash.
downvote count: 0
score: 1

http://stackoverflow.com/comment/44322985
has text: @Sander Have edited the post with what I'm getting at - made some assumptions about what `distinctItemTypes` is. If this doesn't help, could you add more context to your question please?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27964902
type: AnswerComment

http://stackoverflow.com/a/27977699
type: Answer
downvote count: 0
score: 1
has body: Try this: s.replace(/(^&amp;bull;\s*|&lt;br(?: ?\/)?&gt;)/g, "").split(/&amp;bull;\s*/g); Simple but effective, assuming the string is consistently delimited by "&amp;bull;&lt;br /&gt;" sequences.
accepted answer of: http://stackoverflow.com/q/27977601
answers question: http://stackoverflow.com/q/27977601
upvote count: 1
type: AcceptedAnswer

axes
tag name: axes
type: Tag
tags question: http://stackoverflow.com/q/27985926

http://stackoverflow.com/a/28040757
has comment: http://stackoverflow.com/comment/44507220
has body: You have three options. You would make an Ajax call, form submission of some kind with a submit button and action to be set to a php file, or finally have your whole page in a php file and after receiving data in JavaScript do your php there.
score: 0
has comment: http://stackoverflow.com/comment/44465681
has comment: http://stackoverflow.com/comment/44465810
type: Answer
answers question: http://stackoverflow.com/q/28040692

http://stackoverflow.com/q/28098916
tagged with: node.js
has body: I am currently writing some tests against the code shown below in node.js using mocha. I want to simulate the response from the event emitter 'check_user'. I have sinon.js but I can't get my mind in the right place to work out the best way to simulate the response. Anyone able to offer some advice on how to go about this? TgCustomCommand.contact = new Command("contact", "Will send you a users contact card to add to your contact list. Usage is .contact nick", function (input, callback) { var payload = input; //Switch our contact to payload.to as this is what our checkuser function looks at //Check the command over if (payload.command_args === false) { payload.response = 'msg ' + payload.to + ' ' + this.description; return callback(null, payload); } else { payload.return = payload.to; payload.to = payload.command_args; //Set up ready for nick check //Check the nick exists emitter.emit('check_user', payload, function (err, result) { if (err) return callback(err, null); payload = input; //Reset our payload so we have correct payload.to //Check how many users we returned if (result.length === 0) { //Not in our contact list payload.response = 'msg ' + payload.return + ' I do not have that person in my contact list!'; return callback(null, payload); } else if (result.length === 1) { payload.to = result[0].Nick; payload.response = "send_contact " + payload.return + ' ' + result[0].Phone + ' ' + result[0].Nick + " _"; return callback(null, payload); } else { //loop through our object and create a list of those returned payload.response = "msg " + payload.return + " I know multiple people with a similar nick: "; for (var i = 0; i &lt; result.length; i++) { log.debug(result[i].Nick); payload.response = payload.response + result[i].Nick + " "; } return callback(null, payload); } }); } ; });
answer count: 0
has comment: http://stackoverflow.com/comment/47661896
tagged with: unit-testing
has comment: http://stackoverflow.com/comment/44585311
type: Question
tagged with: javascript
has title: Unit testing a function and simulating an event emitter response
score: 0
has comment: http://stackoverflow.com/comment/44573701
type: UnansweredQuestion

http://stackoverflow.com/comment/129956536
comment on: http://stackoverflow.com/a/67633103
score: 0
type: AnswerComment
type: Comment
has text: So it's doable, but I don't think the Stackblitz implementation is open-source/available :(

http://stackoverflow.com/comment/44472146
score: 0
comment on: http://stackoverflow.com/a/28044568
type: AnswerComment
type: Comment
has text: @user3271259 - you can read about promise object on jquery site or google ...and dont forget to upvote and accept answer

http://stackoverflow.com/a/28011664
score: 0
type: Answer
has body: Please read the error message carefully: Error: value is null .link/&lt;@http://andcweb.com/App/Directives/maxlength.js:10:1 NgModelController This message provides the exact line number at which the error is occurring and a clear description of the error. if (value.length &gt; maxlength) { ... } should be: if (value &amp;&amp; value.length &gt; maxlength) { ... } Otherwise, you may be attempting to read the length property of null when $viewValue is null.
answers question: http://stackoverflow.com/q/28008669

http://stackoverflow.com/comment/44481447
type: Comment
has text: @BenMcCormick Haha, I liked that!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28049538

http://stackoverflow.com/comment/44543770
has text: Yes it's the standard.But browsers implement them differently. But even if that's not the problem i provide an additional solution. You should be be easy on the downvote if the problem is actually solved. It should weigh a false statement don't u think?
type: Comment
comment on: http://stackoverflow.com/a/28082597
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44596038
comment on: http://stackoverflow.com/q/28108781
has text: We have 574 own JavaScript files and 1405 more in dependencies. The "uglification" takes only a few seconds. Your problem might be elsewhere.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44551688
has text: I will check this out, anyway using is not recommended, use instead.
comment on: http://stackoverflow.com/a/28086600
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28042762
has body: How does one get the list of indexes on a collection with Meteor? Something similar to (or perhaps based on, proxying) Mongo's db.collection.getIndexes There's not much of an indexing API in Meteor yet (there will be one eventually); but I hope someone has already solved this problem Cheers
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44477942
score: 7
has comment: http://stackoverflow.com/comment/44475727
type: Question
has comment: http://stackoverflow.com/comment/44468593
tagged with: mongodb
has answer: http://stackoverflow.com/a/32848389
accepted answer: http://stackoverflow.com/a/32848389
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: mongodb-indexes
upvote count: 7
tagged with: meteor
has title: Get a list of collection's indexes in Meteor
downvote count: 0

http://stackoverflow.com/comment/44545267
type: Comment
comment on: http://stackoverflow.com/a/28082787
score: 0
type: AnswerComment
has text: You are printing table you just need to show json data remove that table tag that is not valid json

http://stackoverflow.com/a/28027506
has body: Thats what directives are designed for, point is to figure out best way to pass and evaluate those attributes of fields, in plnkr i made a possible solution. Here you have a starting point: PLNKR app.directive('cmsInput', function() { return { restrict: 'E', template: '&lt;label ng-if=(exists(label))&gt;{{label}}&lt;/label&gt;', controller: function($scope) { $scope.exists = function(a) { if(a &amp;&amp; a.length&gt;0) { return true; } return false; } }, link: function(scope, elem, attr) { scope.label = attr.label; } } }) It requires work, but you'll get the point. EDIT: You could use 'scope' field of directives to bind values, but for purpose of finding solution I wanted to make it as clear as possible. EDIT2: Angular directive is being define with a rule "camelCase" in javascript(directive name) is eaxctly "camel-case" in html, as a directive call. Angular matches correct js code to called directive and puts exactly in that place in DOM your template. One of the parameters of link method are attributes, those are the same values that you have in html, so under: 'attr.label' you get value of 'label' in html, in this case string "header". The template attribute of directive is a string with bindigs to variables that were set in scope and and when we combine it all together we get: Angular "finds" a directive Directive code is being fired Link function is being called - inside which we set to field named "label" value of attribute named "label" Template compiles - under {{ }} markers correct variables are being set. vio'la - in place of this cms-input element you get normal html
score: 1
has comment: http://stackoverflow.com/comment/44440832
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28026703
type: Answer
answers question: http://stackoverflow.com/q/28026703
has comment: http://stackoverflow.com/comment/44440599
upvote count: 1

http://stackoverflow.com/comment/103425494
type: AnswerComment
type: Comment
score: 8
comment on: http://stackoverflow.com/a/50229738
has text: React component = plain JS function is a brilliant way to clearly explain this. And with React moving more and more toward functional components, this is becoming even more literally the case.

http://stackoverflow.com/q/28030581
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has title: Chosen JavaScript can't click/select on update dynamically
has answer: http://stackoverflow.com/a/32185646
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/52256476
accepted answer: http://stackoverflow.com/a/32185646
tagged with: jquery-chosen
has body: I have a website where I need to filter a list of media types depending on the media family. ie: if print is chosen, it must only show options to do with print, if digital is chosen, it must only show options to do with digital stuff. I can update the list with new values, but then they are not clickable anymore? Here are the screenshots: I am already using: $("#mec_id").trigger("liszt:updated"); where mec_id is the id of the select. Here is the HTML after the media family is chosen, when trying to click on the media type it does not give the option to click/select the option. In the code I have selected print because there is only one value for the dropdown there (to save space in the code). HTML: print print JavaScript/JQuery (function of the AJAX Success call): success: function (data) { var ul = document.createElement('ul'); ul.className = "chosen-results"; for (var i = 0; i < data.length; i++) { if (i == 0) { $('#media_types .chosen-drop').contents().remove(); $('#mec_id').contents().remove(); } var text = data[i].text; var li = document.createElement('li'); li.className = "active-result"; li.setAttribute('data-option-array-index', data[i].id); li.innerHTML = text; ul.appendChild(li); // create options var option = document.createElement('option'); option.setAttribute('data-val', data[i].id); option.value = data[i].text; option.text = data[i].text; document.getElementById("mec_id").appendChild(option); } $('#mec_id_chosen .chosen-drop').append(ul); $("#mec_id").trigger("liszt:updated"); },
type: Question
answer count: 1

http://stackoverflow.com/q/28020524
tagged with: ruby-on-rails
has title: Rails Alter Final response HTML
type: Question
tagged with: ab-testing
tagged with: javascript
has body: I am trying to implement A/B test framework where it should allow to change(test against users) any content on any page dynamically(without need to code specifically). Plus this should allow to change(test) static content(header, footer links) and dynamic db driven element(entity description, product images) as well. (I know its silly to A/B test dynamic db driven elements, as they are always changeable by CMS tool) I could figure out 2 probable solutions 1) Change the content of the dom element after page load via JS, But it could lead to minor flickering of the elements as it changes the content after page load(or even during the page load). 2) Change the final html of the response using the after_filter or middleware(not sure of this). I am planning to use nokogiri to parse and alter the html I wanted to know/confirm if there exists a better way to implement this or any possible flaws in the 2nd approach.
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44430685
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44428029

http://stackoverflow.com/a/28043007
type: Answer
has comment: http://stackoverflow.com/comment/65255457
has body: There is a way to save files to the local file system, through the File System API, but only Chrome and Opera supports it. If you want to render an image file from File/Blob to an IMG tag, you can do img.src = URL.createObjectURL(myFileOrBlob); This will convert the File/Blob to an URL, which is available only inside of your browser and looks like that blob:http%3A//localhost/2ee59cd6-9220-429c-add9-05983645639e After you are done using the image, it's good to free the memory by doing URL.revokeObjectURL(blobURL); Hope I understood you correctly and that helps you.
score: 1
answers question: http://stackoverflow.com/q/28042535
upvote count: 3
downvote count: 2

http://stackoverflow.com/comment/46276301
has text: The CSS in this Answer helped me fix my problem in Chrome. Thank You!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/28145889
type: Comment

http://stackoverflow.com/comment/44368180
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27988268
has text: @jmore009 when I animate the first div, it's moved to top:30% position. Then, when I click on the second div, first of all I want the first div to get back to the top:52% position, and then move the content of second div to top:30% position.
score: 0

http://stackoverflow.com/q/28045905
has answer: http://stackoverflow.com/a/28046043
answer count: 1
has comment: http://stackoverflow.com/comment/44474182
type: AnsweredQuestion
type: Question
has body: In my HTML form I have Email: Confirm Email: In my external JS file I have the function function confirmEmail() { var email = document.getElementById("email").value var confemail = document.getElementById("confemail").value if(email != confemail) { alert('Email Not Matching. Try again'); } } How do I implement this function? When I submit my form it doesn't actually use the function. If I add 2 different emails in the form, it allows me to carry on. I'm not talking about adding
has title: Calling external JS function to verify email
has comment: http://stackoverflow.com/comment/44474210
accepted answer: http://stackoverflow.com/a/28046043
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/44474237

http://stackoverflow.com/comment/44584525
has text: The `Login` button is from another website, Will `resizeIframe()` work from my website script?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28104892

http://stackoverflow.com/q/28006173
has body: Is there a function that I can use to execute commands multiple times... alert('hi'); alert('hi'); alert('hi'); so that I can do this without repitition. Is there a way to do this with a preset function to eliminate redundancy?
possible better answer: http://stackoverflow.com/a/28006193
has answer: http://stackoverflow.com/a/28006195
has answer: http://stackoverflow.com/a/28006193
linked to: http://stackoverflow.com/q/18499935
score: 2
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/18499935
has comment: http://stackoverflow.com/comment/44400708
has title: execution of commands multiple times without loops javascript
type: Question
has comment: http://stackoverflow.com/comment/44400875
answer count: 3
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/28006196
has comment: http://stackoverflow.com/comment/44402274
accepted answer: http://stackoverflow.com/a/28006196
upvote count: 2

http://stackoverflow.com/a/28106311
score: 1
upvote count: 1
has body: The JSON you get back returns an array containing the object. This should work: Console.log(data[0].like_count);
downvote count: 0
answers question: http://stackoverflow.com/q/28106265
type: Answer

http://stackoverflow.com/comment/50419704
comment on: http://stackoverflow.com/a/31198987
type: Comment
score: 0
type: AnswerComment
has text: I'm not sure that reference doc is actual. I would prefer to use http://kangax.github.io/compat-table/es6/#chrome45

http://stackoverflow.com/comment/44352485
comment on: http://stackoverflow.com/q/27980420
score: 0
type: Comment
type: QuestionComment
has text: Is there an HTML element that shows when something is added to the cart? An ` ` perhaps? Or a ` ` with a particular class that shows it's a cart item? If you can identify a DOM element then your jQuery `if` statement can also look for the existence of the newly created cart element and then trigger the rest of the `if`...

http://stackoverflow.com/q/28041680
score: 0
accepted answer: http://stackoverflow.com/a/28041781
answer count: 3
has title: How to redirect from One page to Another
tagged with: angularjs
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28041781
tagged with: mysql
has answer: http://stackoverflow.com/a/28041828
tagged with: ionic-framework
type: Question
possible better answer: http://stackoverflow.com/a/28041754
has body: I am a .NET developer but newbie in Angular js and PHP, I want to redirect to another page after saving the data. Here is the following code which i had written, what should i do for that var url = domain+"/index.php/welcome/insert2?email="+$scope.uemail+"&amp;name="+$scope.uname+"&amp;make="+$scope.umake.id+"&amp;model="+$scope.umodel.id+"&amp;mobile="+$scope.umobile+"&amp;car_reg_no="+$scope.car_regist+"&amp;pincode="+$scope.upincode; //$log.log(url); $ionicLoading.show(); $scope.submitData(url).then(function(data){ $log.log(data); $localstorage.set("uid",data); $ionicLoading.hide(); }); } };
has answer: http://stackoverflow.com/a/28041754
tagged with: javascript

http://stackoverflow.com/comment/44409774
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28011132
type: Comment
has text: Yes you have reason :)

http://stackoverflow.com/comment/44382660
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27996110
has text: You are mistaken. Assigning to `_.prototype.func` does not make the function available as `_.func`. And the tutorial you linked to doesn't claim that either. Nor does it set `_.prototype` inside the function itself.

http://stackoverflow.com/comment/44417295
comment on: http://stackoverflow.com/q/28014972
score: 0
has text: Yes. At my understanding, all un-primitive type value should pass reference. Why yscale is not the new value we changed in the execution of chart()? Or why the yscale here is not really closed in closure. I know this would work. function render() { status.yscale = function() { console.log("I am a scale"); }; }
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44534567
type: Comment
comment on: http://stackoverflow.com/a/28050029
score: 0
type: AnswerComment
has text: Thanks a lot Oleg Dubas! I love this site because people like you, so helpfull, and last but not least very skilled at programming topics!

http://stackoverflow.com/q/28060783
type: UnansweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/28060843
score: 1
has title: logo should be visible only on scroll
type: Question
tagged with: javascript
has body: I placed logo in sticky navigation bar. It should be visible only if scroll some 100px. I tried using reference Show div after scrolling 100px from the top of the page but its not working for me. Can any one please help. Here is the code &lt;div id="toplogo"&gt;&lt;img src="images/logo.png" /&gt;&lt;/div&gt; &lt;script&gt; var navlogo = $("toplogo"); $(window).scroll(function(){ if($(window).scrollTop() &gt;= 100 ){ navlogo.show(); } else { navlogo.hide(); } }); &lt;/script&gt;
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/13195048

http://stackoverflow.com/q/28068947
tagged with: store
has title: ExtJs Dynamic Store Failed call Handle
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/13907860
type: Question
has answer: http://stackoverflow.com/a/28070654
tagged with: javascript
tagged with: ajax
tagged with: extjs
score: 0
has body: I have a clasic store Ext.define('xxx.store.Search', { extend: 'Ext.data.Store', model: 'xxx.model.Search', requires: ['xxx.data.xxxx'], proxy: { type: 'xxxxx', digSearchUrl: { initRequest: 'ajax/xxx/xxx/xx', pollRequest: 'ajax/xxxx/xxxx/xxxxxx' } }, autoLoad: false, defaultSortDirection: 'DESC' }); Now i usually do a store load like this: this.getStore('Search').load({ digSearchCfg: { xxx: sid, xxx: xxxx } }); I know i could use the standard approch like in here: Attempting to load Ext store with JSON data from AJAX request returns error But i would rather define the error handler in the store it self. is that possible?
answer count: 1
accepted answer: http://stackoverflow.com/a/28070654

http://stackoverflow.com/comment/44370976
has text: Got it, get to the point. Must be nice to have this much time on your hands :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27985099

http://stackoverflow.com/comment/44634647
type: Comment
has text: Yes this works, the submit works as expected. The problem I am now having is that the submit continues even when the validation fails. I think this will work for most non-yii developers.
comment on: http://stackoverflow.com/a/28102959
type: AnswerComment
score: 0

http://stackoverflow.com/q/27977525
has answer: http://stackoverflow.com/a/47717702
tagged with: arrow-functions
has answer: http://stackoverflow.com/a/37488652
accepted answer: http://stackoverflow.com/a/37488652
favorite count: 0
has comment: http://stackoverflow.com/comment/50599377
has comment: http://stackoverflow.com/comment/46067342
downvote count: 2
has comment: http://stackoverflow.com/comment/44347362
has answer: http://stackoverflow.com/a/34971248
has answer: http://stackoverflow.com/a/31544156
has comment: http://stackoverflow.com/comment/62472036
type: AnsweredQuestion
has body: I have a function that I am trying to convert to the new arrow syntax in ES6. It is a named function: function sayHello(name) { console.log(name + ' says hello'); } Is there a way to give it a name without a var statement: var sayHello = (name) =&gt; { console.log(name + ' says hello'); } Obviously, I can only use this function after I have defined it. Something like following: sayHello = (name) =&gt; { console.log(name + ' says hello'); } Is there a new way to do this in ES6?
has answer: http://stackoverflow.com/a/31307350
upvote count: 264
has title: How do I write a named arrow function in ES2015?
has answer: http://stackoverflow.com/a/79356776
possible better answer: http://stackoverflow.com/a/27977567
linked to: http://stackoverflow.com/q/41107548
type: Question
answer count: 8
tagged with: ecmascript-6
has comment: http://stackoverflow.com/comment/62472278
has answer: http://stackoverflow.com/a/38325734
score: 262
has answer: http://stackoverflow.com/a/27977567
tagged with: javascript
has comment: http://stackoverflow.com/comment/57344765

http://stackoverflow.com/q/27997898
has answer: http://stackoverflow.com/a/27997964
has answer: http://stackoverflow.com/a/27998253
type: Question
upvote count: 2
tagged with: javascript
tagged with: jquery
has title: How to execute a function after scrolling (jquery)
answer count: 3
has comment: http://stackoverflow.com/comment/44386479
possible better answer: http://stackoverflow.com/a/27997964
favorite count: 0
has answer: http://stackoverflow.com/a/58691911
accepted answer: http://stackoverflow.com/a/27998253
has comment: http://stackoverflow.com/comment/44385918
score: 2
has body: I need to scroll the page and then execute a function. This code gives me an error No function was found that matched the signature provided. window.scrollTo(0, 100, { onAfter : function(){ alert('test'); } }); If I remove the third (settings) argument then the page scrolls. I also tried: $('html,body').animate({ scrollTop: 100, complete: function(){alert();} }, 0); It scrolls the page, but never calls alert. Maybe I'm missing some small thing, but I don't know what it is! There are tons of examples, but none seem to work for me. They often have extra parameters and settings, and I'm unclear whether some use special libraries, besides jQuery. EDIT: 2 requirements: It must be instant scroll and there must be a callback function after it's done. Just writing the next function on the next line does not work. My iPhone still does it out of order, I guess because scrollTop is still slow.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44385826
downvote count: 0

http://stackoverflow.com/comment/44493432
score: 0
has text: forEach is a built-in method
comment on: http://stackoverflow.com/q/28055770
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28102692
favorite count: 0
has answer: http://stackoverflow.com/a/28102719
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/762011
score: 6
has body: I was reading about hoisting in mozilla, and noticed an example explaining how a variable can leak outside of the function scope: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var#Initialization_of_several_variables The example says, var x = 0; function f(){ var x = y = 1; // x is declared locally. y is not! } f(); console.log(x, y); // 0, 1 // x is the global one as expected // y leaked outside of the function, though! I don't understand what is happening here. I am looking for a technical explanation more than anything. How is y accessible outside at this point? Edit: I understand how this function is behaving, and I should clarify and say I wanted an understanding of what is happening in the code and memory (ex, pointers, etc..).
upvote count: 6
answer count: 4
has answer: http://stackoverflow.com/a/28102748
has comment: http://stackoverflow.com/comment/44580659
type: Question
has answer: http://stackoverflow.com/a/28102772
tagged with: javascript
has title: Explanation of how is the variable "leaking"?
has answer: http://stackoverflow.com/a/28102718
downvote count: 0

http://stackoverflow.com/comment/44395135
has text: This is a very broad question. In my oppinion This can not be answered without a minimal example and a clear problem statement.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28003165
score: 1

http://stackoverflow.com/comment/44323549
type: QuestionComment
has text: @salniro It's not an event.
type: Comment
comment on: http://stackoverflow.com/q/27965269
score: 0

http://stackoverflow.com/q/27996352
type: UnansweredQuestion
has title: Schema Field Type for Date.now() in Meteor-Simple-Schema
upvote count: 1
type: Question
tagged with: mongodb
tagged with: javascript
has body: In my Meteor app I'm using Date.now() to create a timestamp for using in a new document that I'm inserting into Mongodb. Date.now() seems very well suited for my app. However I'm not very familiar with handling dates and times. Now that I'm making the switch to aldeed:simple-schema, is it best practice to use Date.now() or convert it to another format? For the schema type, do we use datetime or datetime-local?
has answer: http://stackoverflow.com/a/27996471
downvote count: 0
answer count: 1
score: 1
tagged with: meteor
favorite count: 0

http://stackoverflow.com/comment/44490806
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28054446
score: 2
has text: Why are you trying to use Duff's Device in Javascript? The fact that it gives you an error means that it isn't supported. C is one of the only languages you can do this in. Just use a simple loop, and worry about optimizing it further only if you run into actual performance issues.

http://stackoverflow.com/a/28109869
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/44605647
has comment: http://stackoverflow.com/comment/44603409
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/28109760
answers question: http://stackoverflow.com/q/28109760
has body: Try this &lt;li ng-repeat="(key, value) in data | filter: {visible: true}"&gt;{{value.value}}&lt;/li&gt; Example Update: Filter by object property in object // only for one property, for example {a: 1} myApp.filter('filterByProperty', function () { return function(items, field) { var result = {}, key = Object.keys(field).pop(), value = field[key]; angular.forEach(items, function(el, index) { if (el[key] === value) { result[index] = el; } }); return result; }; }); Example
type: AcceptedAnswer

http://stackoverflow.com/q/28087364
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44556825
has comment: http://stackoverflow.com/comment/44552331
type: Question
has title: Markers not showing in Google Maps - Bootstrap
has body: I'm struggling with the markers... I'm trying to show a marker on click in my local XAMPP server. In the HTML I've got: &lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?&amp;sensor=TRUE"&gt; &lt;/script&gt; &lt;div id="map" class="centered row clearfix partida doesntPlay"&gt;&lt;/div&gt; And then in the JS: var marker; var markers = []; var initialize = function() { var mapOptions = { center: new google.maps.LatLng(43.177644, -2.310920), zoom: 11, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map"), mapOptions); google.maps.event.addListener(map, 'click', function(event) { addMarker(event.latLng); }); } // Add a marker to the map and push to the array. function addMarker(location) { marker = new google.maps.Marker({ position: location, map: map }); markers.push(marker); console.log("new Marker: " + marker.getPosition().k + "/" +marker.getPosition().D); } // Sets the map on all markers in the array. function setAllMap(map) { for (var i = 0; i &lt; markers.length; i++) { markers[i].setMap(map); } } // Removes the markers from the map, but keeps them in the array. function clearMarkers() { setAllMap(null); } // Shows any markers currently in the array. function showMarkers() { setAllMap(map); } // Deletes all markers in the array by removing references to them. function deleteMarkers() { clearMarkers(); markers = []; } google.maps.event.addDomListener(window, 'load', initialize); I have to say that the map is hidden and when the users click a button it appears. I've tried it with a displaying map and got the same results. I can see the log on the console with the latitude and longitude, but the map is not showing any marker. Can somebody help me? EDIT: I noticed that if I comment the line of Bootstrap CSS the markers appear perfectly. So the problem is that there are in the map, but not showing because of CSS. Anyhow, I cannot see the markers yet. RE-EDIT: SOLVED (more or less). If I use a cu…
tagged with: google-maps
has answer: http://stackoverflow.com/a/28090887
tagged with: javascript
tagged with: google-maps-api-3
score: 0
tagged with: google-maps-markers
answer count: 1
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/86174290
has text: That's what I ended up doing. I'd rather have anonymous classes generated by my class inheritance library to be anonymous than have names of internal variables that the user of my class inheritance library doesn't need to think about, and I'd like the end user to see a name only if they provided a name for the class. (http://github.com/trusktr/lowclass)
comment on: http://stackoverflow.com/a/37488652
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/28010267
type: UnansweredQuestion
answer count: 0
type: Question
has body: I have a single page application, using reactjs and react-router. I developed a maps component, and of course with google maps have a memory leak going from screen to screen if I try and cleanup the map on component did mount and rebuild it on component did mount. so I tried this approach: What is the proper way to destroy a map instance and re-using the map instance and the node combined with excessive measures to clean things up works well and stabilizes things. For cleanup, I call clearInstanceListeners on every marker, map, window and document set map to null on any markers delete this.map on the component then set it to null delete this.markers then set it to empty array The issue i'm having at this point is that when I trigger resize, it's not resizing. after reading several other posts, and making sure i'm triggering after the div is shown, it doesn't resize. However, I have a resize function bound to window.onresize, and have noticed that after resizing the window, and the second time the function is called, the map does resize and center. here's that function: sizeMapToContainer: function () { google.maps.event.trigger(this.map, 'resize'); if (this.props.fitBounds) { this.zoomInOnMarkers(); } else { this.map.setCenter(new google.maps.LatLng(this.props.center[1], this.props.center[0])); this.map.setZoom(this.props.zoom); } }, and the function for window resize: window.onresize = function onResize () { if (this.map) { this.sizeMapToContainer(); } }.bind(this); My render call for react just returns a div, where later on in did mount I append the map div myself. buildMap: function (nextProps) { var mapProps; if (nextProps) { mapProps = nextProps; } else { mapProps = this.props; } var centerpoint = mapProps.center; var zoom = mapProps.zoom || 8; var center = new google.maps.LatLng(centerpoint[1], centerpoint[0]); var mapNode = this.refs.map.getDOMNode(); var mapOptions = { center: center, zoom: zoom }; if (mapInstance.map) { window.tmMap = this.map = mapInstance…
has title: Google maps - resize event not filling div after div shown
tagged with: react-router
tagged with: javascript
score: 4
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/50057707
upvote count: 4
tagged with: reactjs
tagged with: google-maps
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/10485582

http://stackoverflow.com/comment/44502278
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28060186
score: 0
has text: I would go with option 1

http://stackoverflow.com/q/28113036
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44610640
has comment: http://stackoverflow.com/comment/44612027
tagged with: javascript
tagged with: jquery
tagged with: jquery-validate
score: 0
has comment: http://stackoverflow.com/comment/44609307
has comment: http://stackoverflow.com/comment/44613473
has body: I validate my form in bootstrap tabs using jquery validation plugin like this : JS: $(document).ready(function () { $("form[name=modify]").validate({ highlight: function (label) { $(label).closest('.form-group').addClass('has-error'); var fieldset = $(label).parent().parent().parent().parent().parent().parent().parent(); if ($(fieldset).find("fieldset.tab-pane.active:has(div.has-error)").length == 0) { $(fieldset).find("fieldset.tab-pane:has(div.has-error)").each(function (index, tab) { var id = $(tab).attr("id"); $('a[href="#' + id + '"]').tab('show'); }); } }, debug: true, ignore: [], rules: { first_name: { required: true, }, surname: { required: true }, id_number: { required: true }, mobile_number: { number: true, minlength: 10, }, home_number: { number: true, minlength: 10, }, other_contact: { number: true, minlength: 10, }, line1: { required: true, }, city_town: { required: true, }, postal_code: { required: true, minlength: 4, }, curr_renumeration: { required: true, number: true, }, expect_renumeration: { required: true, number: true }, email: { email: true, required: true, }, } }); $("[type=submit]").submit(function (e) { e.preventDefault(); }); }); in action jquery validation plugin worked and validate all tabs and show error bottom of each input. i need to show alert Or highlight title of tabs (ie : Address Details) if in tabs was a error. how do can i show this alert or highlight error in title tabs DEMO FIDDLE
has title: show alert highlights for jQuery validation in bootstrap 3 tabs
has comment: http://stackoverflow.com/comment/44610507
has comment: http://stackoverflow.com/comment/44610875
favorite count: 0
has comment: http://stackoverflow.com/comment/44610109
has comment: http://stackoverflow.com/comment/44609963
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/44610900
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44613903
has comment: http://stackoverflow.com/comment/44611002
has comment: http://stackoverflow.com/comment/44611578
answer count: 0

http://stackoverflow.com/comment/44539344
type: AnswerComment
type: Comment
score: 0
has text: @chipChocolate.py. Yes, I think I get it. I've used 25% and 75% as midpoitns and set to some color that is between the white and the green. So, I think it will do nice. I'd still like to have a jQuery solution though. If nobody replies to this I will select your answer tomorrow. Thanks.
comment on: http://stackoverflow.com/a/28079835

http://stackoverflow.com/comment/44423226
type: Comment
has text: convert rgba(0,0,0,0.5) to hex
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28016827

http://stackoverflow.com/q/28034745
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
has title: How to auto-populate custom field in a SharePoint Modal dialog?
answer count: 1
has body: I am having some difficulty auto-populating a field in a SharePoint Modal dialog. When the dialog appears, I want the text box to be automatically set with a value. Like this: None of these columns are default. I created a list, and then created these fields afterwards. Each are used in "Item". Then I tied the list to this dialog. Also, I went into the list settings and choose " Allow management of content types". The default column is hidden. One of the problems is that I'm not sure if I need to pass the value to the options object to set the value in the text box. Here is the code I am currently trying. I've tested it in IE 8, 9 and 10, and also in Chrome 39. The field I want to populate when the dialog opens is always blank in each, however. This is how I render the dialog via html: Contact Us ​ Any ideas what is wrong, or how I can auto-populate the Subject custom field in the dialog?
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28099193
tagged with: modal-dialog
tagged with: sharepoint-2010
tagged with: jquery
has comment: http://stackoverflow.com/comment/44486083

http://stackoverflow.com/comment/44622686
type: Comment
type: QuestionComment
has text: Thanks, I've read the docs you posted. After a google search I've found https://support.zabbix.com/browse/ZBX-8459 I need to consume those API and... I don't understand if it is possible with any configuration of HEADER request from AngularJS (XMLRequest). Thanks a lot for any suggestion.
comment on: http://stackoverflow.com/q/28120699
score: 0

http://stackoverflow.com/comment/44503692
has text: I think you should get that from the POST value's like adeneo us suggesting.
comment on: http://stackoverflow.com/a/28061283
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44573090
comment on: http://stackoverflow.com/q/28098299
has text: Ok, I think I get what you're working with. So essentially you would want to define a Javascript function in the parent document like `function ImageError()` which you would then call from the iframe using `parent.ImageError()`
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/44530501
has text: Thanks for your answer, but that is not what I was looking for. Well I need something in the d3.json ... that says center on the first path there. That needs to be triggered at the end or so. Or could you change the jsfiddle example with your code and show it to me. Maybe I just do not get your way? Thank you.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28074937

http://stackoverflow.com/comment/44603637
score: 0
type: Comment
has text: I see it smoothly.....
type: QuestionComment
comment on: http://stackoverflow.com/q/28114753

http://stackoverflow.com/a/28080835
type: Answer
answers question: http://stackoverflow.com/q/28080704
upvote count: 3
has body: Here's an approach using EventEmitter var EE = require("events").EventEmitter; function MyObject() { // call EE constructor EE.call(this); // myProperty instance variable var myProperty; // define dynamic property Object.defineProperty(this, "myproperty", { get: function() { return myProperty; }, set: function(newValue) { myProperty = newValue; this.emit("change:myproperty", myProperty); return myProperty; }.bind(this) }); } // setup prototype MyObject.prototype = EE.prototype; MyObject.prototype.constructor = MyObject; Ok, let's check it out ! // create an instance of your object var obj = new MyObject(); // listen for changes obj.on("change:myproperty", function(myproperty) { console.log("myproperty changed to:", myproperty); }); // change the property obj.myproperty = "foo!"; Output (check console) "myproperty changed to: foo!"
score: 3
downvote count: 0

http://stackoverflow.com/a/28020283
has comment: http://stackoverflow.com/comment/44437414
score: 1
answers question: http://stackoverflow.com/q/28019069
has comment: http://stackoverflow.com/comment/44437453
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/44581750
has body: first you should make sure you declared your applet like the following : &lt;APPLET code="MyApplet.class" height="0" id="myApplet" name="myApplet" archive="/path/to/MyApplet.jar"&gt;&lt;/APPLET&gt; after that to call MyApplet from JS like the following : function callMyAppletFromJS() { alert("callMyAppletFromJS"); document.getElementById('myApplet').jsAppletCall(); } in your applet call the JS back like the following : public void jsAppletCall() { // do you java stuff here // then // call the javascript from the applet using the JSOBject JSObject win = JSObject.getWindow(this); win.eval("callJSFromMyAppletMessage();"); } and the JS function to be called from the applet like the following : function callJSFromMyAppletMessage() { alert("callJSFromMyAppletMessage"); } so the way to call the JS from applet is using the JSObject , please check the docs here for the JSObject as it describes the use for this class . also as @Hemant mentioned , please check the oracle tutorial here about this subject . Note : but please be aware if you are calling your applet from JS , even if its signed applet , it will be treated as unsigned applet , check the oracle docs here . Hope that Helps .
downvote count: 0
accepted answer of: http://stackoverflow.com/q/28019069

http://stackoverflow.com/a/29987231
downvote count: 2
upvote count: 0
score: -2
answers question: http://stackoverflow.com/q/28108581
has body: http://robertleeplummerjr.github.io/CanvasWorker or http://github.com/robertleeplummerjr/CanvasWorker 15000 pngs load in under a second ;)
type: Answer

http://stackoverflow.com/q/28054725
has answer: http://stackoverflow.com/a/28448308
tagged with: angularjs
has comment: http://stackoverflow.com/comment/44505395
has comment: http://stackoverflow.com/comment/44491532
type: AnsweredQuestion
score: 1
has title: ExpressJs - How to make api files unreadable in developer tools
upvote count: 1
accepted answer: http://stackoverflow.com/a/28448308
type: Question
tagged with: javascript
tagged with: express
answer count: 1
has comment: http://stackoverflow.com/comment/44491396
downvote count: 0
has comment: http://stackoverflow.com/comment/110418937
favorite count: 0
has body: Naturally, when I use developer tools in Google and click open an API file in a new tab, I can see the data as exampled below. But I have been to websites when I attempt to do the same thing, there is some security measure taken causing the opened in new tab page to show an "Unauthorized" message and not the data. It cannot be a session event because I was logged in properly. I think it is determined by WHAT is calling the API file. Does anyone know how to replicate this in my ExpressJs javascript/angularjs app? { username: "James Doe", picture: "styles/person.png", activity: 12 } Here is an example from GTDNext.com

http://stackoverflow.com/comment/44527967
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28074281
has text: Also another totally valid option. Editing it in for completeness.

http://stackoverflow.com/q/27999635
has answer: http://stackoverflow.com/a/27999669
accepted answer: http://stackoverflow.com/a/27999669
has comment: http://stackoverflow.com/comment/44388820
duplicate of: http://stackoverflow.com/q/1099628
score: 0
has title: How to create functional Methods
tagged with: function
has body: What I want to approach is to create a custom Function that looks like this: access('h1').content('Hello World'); And this is how I tried to accomplish that: function access(Tag) { var Element = document.getElementsByTagName(Tag)[0]; this.content = function(Content) { if (Content !== undefined) return Element.innerHTML = Content; else return Element.innerHTML; } return Element; } So this Function shall be in the verge of changing the Content or just returning it. Unfortunately it does not work this Way. So far I played with it for about an Hour to rewrite it and find a Solution on my own, but I have not been successfull and I also do not know how to describe this Problem to Google it. How can I solve this it?
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/1099628
has comment: http://stackoverflow.com/comment/44390131
has comment: http://stackoverflow.com/comment/44388574
has comment: http://stackoverflow.com/comment/44388639
type: AnsweredQuestion
tagged with: methods
type: Question

http://stackoverflow.com/q/27991433
has comment: http://stackoverflow.com/comment/44376937
has comment: http://stackoverflow.com/comment/44373653
has comment: http://stackoverflow.com/comment/44374001
downvote count: 4
has comment: http://stackoverflow.com/comment/44374314
has comment: http://stackoverflow.com/comment/44376151
accepted answer: http://stackoverflow.com/a/27991523
answer count: 1
has comment: http://stackoverflow.com/comment/44376547
has comment: http://stackoverflow.com/comment/44376866
has comment: http://stackoverflow.com/comment/44373629
favorite count: 0
has comment: http://stackoverflow.com/comment/44376828
upvote count: 2
has body: I'm having a real problem finishing off this For Loop function.. basically when a player reaches a certain score, they get a certain cash amount.. Here the variables.. CashThresholds = [500000, 1000000, 1500000, 2000000, 2500000, 3000000, 3500000, 4000000, 4500000, 5000000]; TheCashValues = [0.50, 1.00, 1.50, 2.00, 2.50, 3.00, 3.50, 4.00, 4.50, 5.00]; Here's the rest.. var TheCashValues = 0; for (var i = 0; i &lt; CashThresholds.length; i++) { if (CashThresholds[i] &gt; TheScore) { TheCashValues = CashThresholds[i]; } } Many thanks
score: -2
type: AnsweredQuestion
has title: Finishing off a For Loop function
has answer: http://stackoverflow.com/a/27991523
type: Question
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/q/28034235
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28193471
has comment: http://stackoverflow.com/comment/99405089
has comment: http://stackoverflow.com/comment/71845190
has body: Before, we were using jqGrid. Later we moved to Backbone.js, started working with Backgrid. Now, we are evaluating moving Backbone.Views to React components and we can't find any grid plugin / add-on fat and rich as those mentioned. Basically, we need everything you might imagine, selecting, filtering, paging, editing, sorting, subgrids...Out of the box :) I know we can make our own table component, adding sorting and stuff, but that's way too much work for us. We were more hoping for some "reuse" :) Is there some grid component I missed on Google? or Is there some (nasty) way of using some of the old DOM dependant, jquery, backbone.js stuff with React?
type: Question
has answer: http://stackoverflow.com/a/28537004
tagged with: reactjs
has comment: http://stackoverflow.com/comment/71875757
has answer: http://stackoverflow.com/a/35937550
has answer: http://stackoverflow.com/a/35224925
tagged with: jqgrid
has title: React.js and rich datagrid components OR at least hack [2015]
tagged with: javascript
accepted answer: http://stackoverflow.com/a/35224925
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/29594334
favorite count: 0
tagged with: backbone.js
answer count: 5
has answer: http://stackoverflow.com/a/28193471
score: 11
upvote count: 11

http://stackoverflow.com/comment/44596351
type: QuestionComment
has text: @Chaitanya: Sure, you can trigger the click event. For example, http://stackoverflow.com/questions/2381572/how-can-i-trigger-a-javascript-event-click
comment on: http://stackoverflow.com/q/28110966
score: 0
type: Comment

http://stackoverflow.com/comment/44440944
has text: @OlegDubas it is not working on my computer ! i do not know why !
comment on: http://stackoverflow.com/q/28027726
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27991791
type: Question
has comment: http://stackoverflow.com/comment/44374365
linked to: http://stackoverflow.com/q/20426116
tagged with: javascript
duplicate of: http://stackoverflow.com/q/20426116
has comment: http://stackoverflow.com/comment/44375149
has comment: http://stackoverflow.com/comment/44374391
has comment: http://stackoverflow.com/comment/44374802
has body: So I have a few node servers running, for example in var/www/mysite/ then in var/www/mybackend, also in var/www/someotherapp. If I cd var/www/someotherapp then run forever stop server.js all node servers are killed, I think this applies to the other commands as well? This is just a hassle, how do I mange multiple node apps better?
tagged with: forever
has comment: http://stackoverflow.com/comment/44374783
type: UnansweredQuestion
has title: Forever and node.js, stopping one forever process stops all processes
tagged with: node.js
answer count: 0
has comment: http://stackoverflow.com/comment/44375032
has comment: http://stackoverflow.com/comment/44375048
score: 0
has comment: http://stackoverflow.com/comment/44374483

http://stackoverflow.com/q/27977073
type: Question
tagged with: javascript
score: 0
answer count: 1
has title: How to reload the current route after configuration change?
tagged with: meteor
tagged with: iron-router
has answer: http://stackoverflow.com/a/27980997
accepted answer: http://stackoverflow.com/a/27980997
has body: Some times I need to change the layoutTemplate in IronRouter dynamicly, but after I change that using Router.configure({ layoutTemplate: &lt;a new layout&gt; });, it does not take effect immediately. It only works after going to other path/route. Is there a way to reload current Route?
type: AnsweredQuestion

http://stackoverflow.com/q/27993407
upvote count: 2
has comment: http://stackoverflow.com/comment/44377550
possible better answer: http://stackoverflow.com/a/27993570
answer count: 4
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/74176876
has answer: http://stackoverflow.com/a/27993570
tagged with: reduce
linked to: http://stackoverflow.com/q/10865025
accepted answer: http://stackoverflow.com/a/27993457
has comment: http://stackoverflow.com/comment/44377599
type: Question
has answer: http://stackoverflow.com/a/46251296
tagged with: concatenation
tagged with: arrays
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44377694
has title: Concatenating arrays in Javascript
has body: I am pretty new to javascript and I have an issue with flattening several arrays into one complete array using the reduce and concat function. var array = [ [1, 3], [6, 6], [3, 3] ]; var finishedArray = function(array) { var reducedArray = {}; var completeArray = {}; for (var i = 0; i &lt; array.length; i++) { reducedArray[i] = array[i].reduce(function (a, b) { return a + b; }); completeArray = reducedArray[i].concat(reducedArray[i + 1]); } return completeArray; } console.log(finishedArray(array));` The error I get is : completeArray = reducedArray[i].concat(reducedArray[i + 1]); TypeError: undefined is not a function Why is that???
favorite count: 0
has answer: http://stackoverflow.com/a/27993457

http://stackoverflow.com/comment/44384374
type: QuestionComment
has text: I am really sorry. I don't know Frisby and since the questions isn't tagged as Frisby, I left the generic way of doing this.
comment on: http://stackoverflow.com/q/27997104
score: 0
type: Comment

http://stackoverflow.com/comment/44591775
has text: Welcome to the world of async! the `load` event is happening *after* the `console.log` at the end of your code, so at that point the `imgH` value is not set.
comment on: http://stackoverflow.com/q/28108951
type: Comment
type: QuestionComment
score: 4

http://stackoverflow.com/comment/44435725
comment on: http://stackoverflow.com/a/28024875
has text: I don't say div would be a polygon, but some element with this id. Ok, I'll close this question if you think that there are no more ways to resolve it.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44470246
score: 2
has text: should that not be `css/movimentacao-ie.css`?
comment on: http://stackoverflow.com/q/28043620
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44592555
type: QuestionComment
comment on: http://stackoverflow.com/q/28109305
score: 0
has text: @dystroy I know, I plan to let this run on another computer and give it as long as it needs.
type: Comment

http://stackoverflow.com/comment/44586603
has text: Any idea guys? Thanks
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28002220

http://stackoverflow.com/comment/44615832
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28118024
has text: I've updated my answer. I forgot a level of function. That's what I get for not testing it.
type: AnswerComment

http://stackoverflow.com/q/28007742
type: Question
has body: I have multiple canvas object in the toolbar. i want add drag and drop feature to canvas object like fiddle. How can i do this? JS Code $(function(){ var stage = new Kinetic.Stage({ container: 'toolbar', width: 350px, height: 350px }); var layer = new Kinetic.Layer(); stage.add(layer); var line = new Kinetic.Shape({ x:0, y:0, stroke:"blue", fill: 'black', drawFunc: function(context) { context.beginPath(); context.moveTo(20,5); context.quadraticCurveTo(10, 35, 20, 60); context.moveTo(20,5); context.quadraticCurveTo(30, 35, 20, 60); context.fillStrokeShape(this); } }); var line2 = new Kinetic.Rect({ x: 60, y: 8, width: 40, height: 40, fill: "red", }); layer.add(line); layer.add(line2); layer.draw(); });
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/28007861
tagged with: kineticjs
has answer: http://stackoverflow.com/a/28007861
type: AnsweredQuestion
has title: Make drag and drop canvas object using kineticjs

http://stackoverflow.com/q/28105539
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
type: AnsweredQuestion
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/28111548
score: 3
has body: I do a menu fixed top when scroll, it ok with some pages have large height, but in page has not enough height, this script loop: Example: I have menu with height 50px and i write a script: if ($(this).scrollTop() &gt; 50){ // add class fixed } else { //remove class } on pages with large height this run: scroll(over 50px) &gt; add class on pages with small height this run: scroll(over 50px) &gt; add class &gt; remove class Please see this example: http://jsfiddle.net/F4BmP/2930/
has answer: http://stackoverflow.com/a/28107549
tagged with: javascript
has answer: http://stackoverflow.com/a/28106005
has comment: http://stackoverflow.com/comment/44585857
has title: Problems with menu fixed top on scroll, when html document not enough height?
upvote count: 3
possible better answer: http://stackoverflow.com/a/28106005
favorite count: 0
has comment: http://stackoverflow.com/comment/44585924
has answer: http://stackoverflow.com/a/28146369
accepted answer: http://stackoverflow.com/a/28146369

http://stackoverflow.com/a/28046357
score: 0
has body: I would suggest using an empty js object like a dictionary/map &lt;html&gt; &lt;script&gt; var data = [ { id: "asghalk", etc: "Hello World", ref: "ad23f1" }, { id: "glfdknd", etc: "Testing, 12", ref: "912b12" }, { id: "lka09go", etc: "Some String", ref: "ad23f1" }, { id: "klghame", etc: "Hello World", ref: "124e12" }, { id: "glkahma", etc: "Hello World", ref: "124e12" } ]; var result = []; var map = {}; for(var i=0;i&lt;data.length;i++){ map[ data[i].ref ] = data[i]; } for(var item in map){ //document.write("[item]"+item + "&lt;br&gt;"); result.push(map[item]); } for(var i=0;i&lt;result.length;i++){ document.write(JSON.stringify(result[i]) + "&lt;br&gt;"); } &lt;/script&gt; &lt;/html&gt;
answers question: http://stackoverflow.com/q/28045929
type: Answer
has comment: http://stackoverflow.com/comment/44475126
has comment: http://stackoverflow.com/comment/44475161

http://stackoverflow.com/comment/44476066
comment on: http://stackoverflow.com/q/28046820
has text: Another problem with this question is that we don't see if the quotes are part of the string or not...
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/28086784
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/44554667
linked to: http://stackoverflow.com/q/24912796
has body: I have this Javascript. It is finding and showing user the shorter path between two cities. <?php include 'includes/connection.php'; //database connection ?> And I have simple form to get start and end position. And button to draw a path on the map.: You travel from: To: It show a map with selected path (without red circles): I need to select atractions for example in area 20 km from path (red circles) from my database. In database every row has latitude,longitude GPS position. This select i use to get atractions ONLY from city in start and end position. I need all atractions around path in area for example 20 km.: if(!empty($end_position) || !empty($start_position)){ if($result = $conn->query("SELECT * FROM atractions where City = '$end_position' OR City = '$start_position'"));{ if($result->num_rows){ while ($atraction = $result->fetch_array()){ ?> <?php echo " " . $atraction['Name']; ?> <?php echo " " . $atraction['City']; ?> <?php echo $atraction['Kategory']; ?> <?php } }$result->free(); } } ?>
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: google-api
has title: Google maps API, How to find and select location (latitude,longitude) in database NEAR 10 km distance from path
has comment: http://stackoverflow.com/comment/44559107
tagged with: path
upvote count: 1
tagged with: php
score: 1
type: Question
tagged with: google-maps

http://stackoverflow.com/a/28050260
type: Answer
has body: As per my observation of your scenario, It seems questionOneButton is created after the $.getJSON is called, which constructs the required UI. Please attach the click handler after $.getJSON has completed. This will ensure the event handler is attached after the element is available in DOM. $.getJSON("url",function(data) { //attach click handler here }) Please refer jQuery getJSON
answers question: http://stackoverflow.com/q/28050071
score: 0

http://stackoverflow.com/a/27968647
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27968511
has comment: http://stackoverflow.com/comment/44330051
score: 2
answers question: http://stackoverflow.com/q/27968511
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44330012
downvote count: 0
has body: Since the conditions are mutually exclusive, you can just use an else if without nesting. if (condition1 &amp;&amp; condition2 &amp;&amp; condition3) { doSomething(); } else if (!condition1) { doWhatIDoWhenC1isFalse(); } // add more else-if conditions as needed If only one of your conditions can be false at a time (or if you don't care when two of them are false) then you can just have three else-if clauses and check each condition individually. If you do need to treat the cases where two conditions are false separately, you'll need an else-if for each combination. Pay close attention to the order you list them in if that's the case. The cases where you check if two conditions are both false should come before the cases where you only check one condition.
type: Answer

http://stackoverflow.com/a/28121943
has body: If you wanted an array and didn't want to keep the "\n" around you could do... var strings = text.split("\n"); which would yield ["This is a sentence.", "This is another sentence", "", "This is the last sentence!"] if you wanted to get rid of that empty string chain a filter onto the split... var strings = text.split("\n").filter(function(s){ return s !== ""; }); Maybe not what you want tho, also not as efficient as the regex options already proposed. Edit: as torazaburo pointed out using Boolean as the filter function is cleaner than a callback. var strings = text.split("\n").filter(Boolean); Edit Again: I keep getting one upped, using the /\n+/ expression is even cooler. var strings = text.split(/\n+/);
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/44618360
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44618080
answers question: http://stackoverflow.com/q/28121766

http://stackoverflow.com/comment/44359601
has text: You need to intercept the click event handler then. Try calling it manually, log it and/or debug through the code.
comment on: http://stackoverflow.com/a/27984202
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/113517018
score: 0
type: AnswerComment
has text: @RonInbar - I see what you're referring to. Yes, that's true, but it doesn't really matter for the example provided, since it closes over the identifier. (Not sure why I used `let`, though; I've changed it to `const`.)
type: Comment
comment on: http://stackoverflow.com/a/37488652

http://stackoverflow.com/a/28029126
has body: You can do: slideArr["slide" + index] = index; but I would like to add this looks weird. Are you sure this is what you want? How about: slideArray.slides.push(totalSlides[i]);
type: Answer
answers question: http://stackoverflow.com/q/28029098
downvote count: 0
has comment: http://stackoverflow.com/comment/44443344
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44443485

http://stackoverflow.com/a/28098453
type: Answer
has comment: http://stackoverflow.com/comment/44572883
has body: Another approach would be to re-write the current usage of accessing object properties via the dot notation and use the bracket notation instead. launch_no_eval:function(id) { //we init a blank dhtmlxwindow and do some other things here, then... if (id==="window_a") var x = wins.a({x:1}); //fill dhtmlxwindow with proper content else if (id==="window_b") var x = wins.b({x:1}); //fill dhtmlxwindow with proper content else if (id==="window_c") var x = wins.c({x:1}); //fill dhtmlxwindow with proper content //and so on for literally thousands of items. } could be re-written as follows, launch_no_eval:function(id) { var x = wins[id]({x:1}); } This would mean your HTML markup can change from, Window-A Window-B Window-C to, Window-A Window-B Window-C As Daniel commented below, assuming you have no control over the HTML markup and must use the window_# value being passed in then you could perform the following, launch_no_eval:function(id) { // replace 'window_' with empty string to retrieve unique id var x = wins[id.replace('window_', '')]({x:1}); }
score: 2
has comment: http://stackoverflow.com/comment/44572901
downvote count: 0
has comment: http://stackoverflow.com/comment/44572800
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28098239
has comment: http://stackoverflow.com/comment/44573458
answers question: http://stackoverflow.com/q/28098239

http://stackoverflow.com/q/28096098
has answer: http://stackoverflow.com/a/28096191
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28096283
tagged with: .net
score: 1
favorite count: 0
has title: Javascript code not being called on pageload? .net
type: Question
has body: I am currently trying to call a JavaScript function when the update panel refreshes, but for some reason it is just not being called; even though I am using the exact same method which is working for other functions. c#, this is in the page load event: ScriptManager.RegisterStartupScript( UpdatePanel1, this.GetType(), "Modify Map", "modifyMap();", true); Javascript function: function modifyMap() { alert(1); //To change the map size if the user is viewing the site on a mobile. if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { //Change width/height of map. //Change the width of the wrapper to 100% of the screen. document.getElementById('wrapper-div').style.width = "100%"; //Set the map to fill the wrapper. document.getElementById('canvasMap').style.width = "100%"; //Set the height of the map. document.getElementById('canvasMap').style.height = "500px"; } } If anyone could help me out that would be great. Thanks, Callum
upvote count: 2
answer count: 2
downvote count: 1

http://stackoverflow.com/comment/44365563
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27983211
has text: Wow, that works, thanks! Can you explain why two functions that test true for equality give different results? That's really perplexing to me.
type: AnswerComment

http://stackoverflow.com/a/28090838
has comment: http://stackoverflow.com/comment/44559267
has body: What code is used to call this? The problem is more likely to be there than in the function itself.
has comment: http://stackoverflow.com/comment/44585142
has comment: http://stackoverflow.com/comment/44558627
has comment: http://stackoverflow.com/comment/44558895
has comment: http://stackoverflow.com/comment/44558423
has comment: http://stackoverflow.com/comment/44558977
answers question: http://stackoverflow.com/q/28090773
type: Answer
score: 0

http://stackoverflow.com/comment/44559340
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28091248
score: 0
has text: do you have duplicate ids on any of your html elements?

http://stackoverflow.com/comment/44472810
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28045134
has text: `slider.slidesContainer[0].style.color `. slidesContainer is a NodeList, not node
score: 0

http://stackoverflow.com/comment/44574761
has text: You may be right...I solved the issue with a simple `browser.manage().addCookie('user_portfolio_name', "1");` + a page refresh in my test block.
comment on: http://stackoverflow.com/q/28095405
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44551111
score: 0
has text: Is there a specific question here? Are you getting errors in the console? What is the expected output? You've told us nothing about what the code is meant to do.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28086937

http://stackoverflow.com/a/28076609
upvote count: 0
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/28076472
type: Answer
has body: After you are done doing all of your 'things' in the $('.site-title a').on('click', ... function you can assign the home link to the window.location to navigate there. $('.site-title a').on('click', function(e) { e.preventDefault(); History.pushState(null, site.title, site.url); // Some things that happen when I hit the home button $('#project-wrapper').removeClass('activated').css('max-height', ''); $('article.project').removeClass('grayscale grayscale-fade').css('opacity', '1'); //perform the page navigation now window.location.href = $(this).attr('href'); });

http://stackoverflow.com/comment/44418986
type: QuestionComment
type: Comment
has text: What JavaScript console errors are you getting? My guess is that Mozilla is simply ignoring your botched `language` attribute.
score: 0
comment on: http://stackoverflow.com/q/28015379

http://stackoverflow.com/comment/44555414
type: QuestionComment
type: Comment
has text: You are embedding Hangouts in a `<webview>`, correct?
comment on: http://stackoverflow.com/q/28089359
score: 0

http://stackoverflow.com/comment/44559121
type: QuestionComment
comment on: http://stackoverflow.com/q/28091235
score: 0
has text: I get this: $("#convo-abierta").val('foo'); [ ​]
type: Comment

http://stackoverflow.com/comment/44344460
score: 0
comment on: http://stackoverflow.com/q/27974631
type: Comment
type: QuestionComment
has text: So, the `submit(e)` function is triggered from a Form associated with a spreadsheet? And you have a trigger set up with the name of the function as "submit"?

http://stackoverflow.com/comment/44374401
score: 0
type: Comment
type: QuestionComment
has text: On the other hand, @asawyer says it works, though I can see only one "a" at the linked fiddle (FF). Which browser are you using? (The jsFiddle message "document.write is disallowed in JSFiddle envioriment and might break your fiddle." makes this even more weird.)
comment on: http://stackoverflow.com/q/27991568

arrow-functions
tag name: arrow-functions
type: Tag
tags question: http://stackoverflow.com/q/27977525

http://stackoverflow.com/comment/44526808
comment on: http://stackoverflow.com/a/28073582
has text: im trying to use html5 not flash i just saw in this example http://nthitz.github.io/turndownforwhatjs/ they did it im not sure how
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/44325052
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27966107
type: QuestionComment
has text: I feel like an idiot. sorry. Thanks for the reply.

http://stackoverflow.com/q/28020150
has body: I've got some code that does the following.... The first get call basically just gives a list of posts in data. Then for each post, there are a number of replies which I would like to load given by the second get call. The problem is, it actually goes through the loop but then only loads the last reply. http.get("../api/sortpost/trending").success(function (data){ scope.posts = data; for(var i = 0; i &lt; scope.posts.length; i++){ post=scope.posts[i]; console.log(i); //prints 1 to i as expected http.get("/api/postreply/"+post.id).success(function (data){ post.replies = data; console.log(i); //prints i only i number of times }); } }); Anyone know how to fix? I am guessing that I am looping too quickly through and that the get request does not have enough time to process. Thus something funny is happening with my post.replies and i and the post is changing before the request is actually complete.
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/14220321
tagged with: angularjs
type: UnansweredQuestion
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/44426692
has answer: http://stackoverflow.com/a/28020225
linked to: http://stackoverflow.com/q/750486
type: Question
has answer: http://stackoverflow.com/a/28020236
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has title: Request Javascript/Angular running into problems with Async stuff

http://stackoverflow.com/comment/44589205
score: 0
comment on: http://stackoverflow.com/q/28105178
type: Comment
type: QuestionComment
has text: no..i have made a service authservice in which i have made a function called loggedIn() .which i am calling in my html page

http://stackoverflow.com/comment/44424804
type: Comment
type: QuestionComment
has text: please share how you are returning the response from applet to jaavascript
score: 0
comment on: http://stackoverflow.com/q/28019069

http://stackoverflow.com/q/28071953
has title: How to measure a label's width if it exceeds his parents width
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28072276
accepted answer: http://stackoverflow.com/a/28072276
answer count: 1
has body: I have a division with a label as below in code, and I would like to know the complete width of the label by javascript, but the label seems to collapse automatically to fit within the division. So if I measure the label width, it is the 100px of the division. &lt;div style="width: 100px; overflow: hidden; background-color: lime;"&gt; &lt;label id="getMyWidthLabel" style="background-color: cyan;"&gt; Some text which is longer than the div's 100 pixels. &lt;/label&gt; &lt;/div&gt; Now if I would place an width on the label like style="width: 200px", I get the preferenced look (no collapsion, but the label is not measurable anymore. What css or javascript do i need and why? EDIT: I would like to measure the width of the label as seen here: But because it stands in a division, it automatically breaks and I can't measure the full width anymore:
has comment: http://stackoverflow.com/comment/44523504
has comment: http://stackoverflow.com/comment/44523371
duplicate of: http://stackoverflow.com/q/118241
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44523335
type: Question
has comment: http://stackoverflow.com/comment/44525852
linked to: http://stackoverflow.com/q/118241

http://stackoverflow.com/comment/44331951
type: Comment
comment on: http://stackoverflow.com/a/27966070
has text: Interesting! I have been receiving some undefined function error messages that may be related to this. I will put everything back in to document ready even though it will be really long.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44326537
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27966809
score: 1
has text: how is myArray being used? doesn't look like its been accessed at all

http://stackoverflow.com/comment/44471122
type: Comment
comment on: http://stackoverflow.com/a/28043184
score: 0
type: AnswerComment
has text: it seems a lot of hassle for such a standard functionality, perhaps there's a more straight forward way?

http://stackoverflow.com/q/28070574
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/44525488
has comment: http://stackoverflow.com/comment/44520586
tagged with: iframe
has title: Stop iframe from interfering with hash link
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/44557908
tagged with: javascript
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I have a project where I have an iframe with a form that needs to be accessible, but also there's a section lower on the page with information that's hashlinked you can see a jsfiddle to get an idea of the rough structure. http://jsfiddle.net/jz2rsxLb/2/ BLAH BLAH BLAH Basically, whenever someone goes to site/#blue, it loads to the correct location briefly, then when the iframe and form in the iframe load, it springs the page back up to the iframe suddenly. I need to turn off this behavior. Any ideas?

http://stackoverflow.com/comment/44374544
comment on: http://stackoverflow.com/a/27991792
type: AnswerComment
score: 0
type: Comment
has text: See my answer. Fix your array and set your initial zoom to 20. @James Taylor your example only partly works, js error and 4 markers instead of 6

http://stackoverflow.com/q/28009738
downvote count: 0
score: 1
tagged with: material-design
has title: Inputs in material design are not themed
type: Question
has comment: http://stackoverflow.com/comment/44424320
accepted answer: http://stackoverflow.com/a/28032103
has comment: http://stackoverflow.com/comment/44424562
tagged with: javascript
has answer: http://stackoverflow.com/a/28032103
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/44423655
favorite count: 0
tagged with: angularjs
has body: I've got working, buttons, carts, lists, but my inputs are not themed like in the demo here: https://material.angularjs.org/#/demo/material.components.input Now I've simply copied code from demo, but it's still not working. Here is html: Top Secret Project Description This is required. The name has to be less than 30 characters long. Client Name This is required. Hourly Rate (USD) You've got to charge something! You can't just give away a Missile Defense System. You should charge at least $800 an hour. This job is a big deal... if you mess up, everyone dies! $5,000 an hour? That's a little ridiculous. I doubt event Bill Clinton could afford that. And js: .controller('View1Ctrl', [function View1Controller() { $scope.project = { description: 'Nuclear Missile Defense System', clientName: 'Bill Clinton', rate: 500 }; }]); Result: https://i.sstatic.net/FEwzD.png What am I missing?
has comment: http://stackoverflow.com/comment/44447396
type: AnsweredQuestion

http://stackoverflow.com/comment/44620320
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28118946
has text: Can someone help me with the code?
score: 0

http://stackoverflow.com/comment/44555381
has text: Downvoter and the delete request guy (most likely the same one)! care to leave a comment elaborating the _actual_ reason? Too broad? really? I want my **google map** which has been generated on a **web page** using **javascript** shared on **facebook/twitter ...**. I've highlighted the specific parts of the question for convenience.
score: 0
comment on: http://stackoverflow.com/q/28077239
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28077576
has body: An alternative using string methods. var str = "thisisasimpleinput"; var cpy = str; var indexes = []; var n = -1; for (var i = cpy.indexOf('i'); i &gt; -1; i = cpy.indexOf('i')) { n += i; n++; indexes.push(n); cpy = cpy.slice(++i); } alert(indexes.toString());
type: Answer
answers question: http://stackoverflow.com/q/28077353
score: 0

http://stackoverflow.com/q/28038626
has body: I am currently using angular-google-maps and have built a working map displaying a few markers from the backend. What I wish to do is to add custom zoom controls to the map. Hence I did this. But it is not working as expected. If anybody has worked on it before or knows how, then can you please help me out? This is my directive-view: %ui-gmap-google-map(center='map.center' pan='map.pan' options='map.options' draggable='true' zoom='map.zoom') %ui-gmap-marker(ng-repeat='marker in map.markers' idKey="marker.id" coords='marker.coords' location='marker.location' icon="marker.icon" click="marker.click") %ui-gmap-window(show="marker.showWindow" isIconVisibleOnClick="marker.isIconVisibleOnClick" options="map.infoWindowCustomClass.options") .tooltip-container %p.paragraph-one {{marker.appName}} %ul %li {{marker.city}}, {{marker.country}} %li Users: {{marker.userName}} .mapzoomControls %i.fa.fa-minus-square.zoom-icons(ng-click='increaseMapZoom()') %i.fa.fa-plus-square.zoom-icons(ng-click='decreaseMapZoom()') Here is my directive: 'use strict' angular.module('protoV3App') .directive('dashboardMap',[ 'mapSettings',(mapSettings) -&gt; templateUrl: 'views/dashboardmap.html' restrict: 'E' link: (scope, element, attrs) -&gt; scope.increaseMapZoom = ()-&gt; mapSettings.increaseMapZoom() scope.$apply() scope.decreaseMapZoom = ()-&gt; mapSettings.decreaseMapZoom() scope.$apply() ]) The corresponding functions in the service: increaseMapZoom: ()-&gt; currentMap.zoom =currentMap.zoom+1; currentMap; decreaseMapZoom: ()-&gt; currentMap.zoom =currentMap.zoom-1; currentMap; So the error I get is that apply is already in progress and the changed map object is not reflected in the scope. :(
has answer: http://stackoverflow.com/a/28056824
type: Question
tagged with: angular-google-maps
tagged with: google-maps
answer count: 1
has title: How to add custom zoom controls to the map built using angular-google-maps
tagged with: javascript
tagged with: angularjs
type: UnansweredQuestion
score: 0

http://stackoverflow.com/q/28114465
tagged with: javascript
tagged with: ajax
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/28115454
has comment: http://stackoverflow.com/comment/44603065
accepted answer: http://stackoverflow.com/a/28115454
type: AnsweredQuestion
has title: setState start to work recursively in React.js
has body: I start to work with react.js and create a component Box, state = {pageNumber: 1, dataForTable:''}. I insert two components in it - Pagination and Table. When click to Pagination it give number of page to Box. Box state change then it render and then Pagination render too. Then I set ajax to server, get new data for table and then Box render for second time to render Tables. In which function should I put ajax logic? When i put it in componentDidUpdate setState start to work recursively. In future will be more components in &lt;Box/ &gt; which will change &lt;Tables /&gt;.
type: Question
tagged with: reactjs
tagged with: pagination

http://stackoverflow.com/comment/44562788
type: QuestionComment
has text: Also did you do any debugging using browser tools?
comment on: http://stackoverflow.com/q/28092888
score: 0
type: Comment

http://stackoverflow.com/comment/44569025
comment on: http://stackoverflow.com/q/28096583
score: 0
type: Comment
type: QuestionComment
has text: What does it do in Internet Explorer? Have you checked the Network and/or Console tabs in the F12 Developer Tools?

http://stackoverflow.com/comment/44456750
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28035651
has text: Awesome, I'll add an answer

http://stackoverflow.com/q/28099639
has body: In Netsuite, the following code works in the header to pull the users role on most of the webstore. var context= nlapiGetContext(); var userRole = context.getRole(); But on the viewCart page we get an "Uncaught ReferenceError: nlapiGetContext is not defined" How can I make this code work on the viewCart page? We tried using a JSON but are having issues due to single source requirements.
accepted answer: http://stackoverflow.com/a/29242608
possible better answer: http://stackoverflow.com/a/28145645
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/28145645
tagged with: netsuite
tagged with: javascript
has title: calling user role in Netsuite on view cart page
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29242608
type: Question

http://stackoverflow.com/comment/44567983
type: AnswerComment
has text: It should work. Please check your css if there's something wrong which might be overriding...Are you trying it with important,elsewhere?
comment on: http://stackoverflow.com/a/28096038
type: Comment
score: 0

http://stackoverflow.com/comment/44367706
type: Comment
comment on: http://stackoverflow.com/a/27988006
score: 0
type: AnswerComment
has text: I don't get an error. But it simply follows the link, no postdata is sent.

http://stackoverflow.com/q/28100644
has answer: http://stackoverflow.com/a/65747299
has answer: http://stackoverflow.com/a/36396441
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/44942763
has body: I am trying to get started building a site in ReactJS. However, when I tried to put my JS in a separate file, I started getting this error: "Uncaught SyntaxError: Unexpected token <". I tried adding /** @jsx React.DOM */ to the top of the JS file, but it didn't fix anything. Below are the HTML and JS files. Any ideas as to what is going wrong? HTML Page JS /** * @jsx React.DOM */ var Lander = React.createClass({ render: function () { var info = "Lorem ipsum dolor sit amet... "; return( {info} ); } }); EDIT: I realized that I need to add type="text/jsx" to the script tag which includes my lander code. However, after adding this and reloading I get this warning "You are using the in-browser JSX transformer. Be sure to precompile your JSX for production - http://facebook.github.io/react/docs/tooling-integration.html#jsx" followed by this error: "XMLHttpRequest cannot load file:///Users/.../lander.js. Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource." it seems like there is something else that I need to do in order to get in browser jsx transform working, but I'm not sure what it is. EDIT: OOOOH do I need to host it using MAMP or something?
has comment: http://stackoverflow.com/comment/104479467
has answer: http://stackoverflow.com/a/75710453
score: 159
linked to: http://stackoverflow.com/q/10752055
has answer: http://stackoverflow.com/a/28101028
has answer: http://stackoverflow.com/a/44225901
has answer: http://stackoverflow.com/a/69288199
has comment: http://stackoverflow.com/comment/103639008
type: Question
tagged with: reactjs
accepted answer: http://stackoverflow.com/a/28101028
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/62413643
answer count: 13
has answer: http://stackoverflow.com/a/36447247
has comment: http://stackoverflow.com/comment/44577174
upvote count: 159
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/42511457
has answer: http://stackoverflow.com/a/69288213
has answer: http://stackoverflow.com/a/28100662
favorite count: 0
possible better answer: http://stackoverflow.com/a/37196396
has answer: http://stackoverflow.com/a/37196396
has title: ReactJS: "Uncaught SyntaxError: Unexpected token <"

http://stackoverflow.com/q/28117680
tagged with: drawimage
type: Question
tagged with: canvas
linked to: http://stackoverflow.com/q/19546035
has body: I am trying to render some pictures into a canvas, but when I use my rendering function, the images won't appear. The function is: function populateSquareImages(){ for(var i = 0,ii = squares.length; i &lt; ii; i++) { if(squares[i].hasImage) { var img = new Image(); img.src = "../Content/Squares/images/square_" + squares[i].uniqueId + ".png"; context.drawImage(img, squares[i].x, squares[i].y); } } } After some debugging, I am sure that x and y are accurate. The image file path is correct as well. Any idea of what might be wrong here?
tagged with: javascript
has answer: http://stackoverflow.com/a/28118459
score: 0
has comment: http://stackoverflow.com/comment/44610115
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/28118459
has title: Canvas ctx.drawimage() not working
duplicate of: http://stackoverflow.com/q/19546035
type: AnsweredQuestion

http://stackoverflow.com/comment/44922302
type: AnswerComment
has text: This looks like promising. I'm going to give it a try shortly (hoping I'm not too late to give the bounty to best answer)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28254287

http://stackoverflow.com/a/28076685
has body: /^'.*'$/.test(str) Regex for starts and ends with a single quote.
downvote count: 0
has comment: http://stackoverflow.com/comment/44532438
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/28076624
score: 3

http://stackoverflow.com/q/28059826
has answer: http://stackoverflow.com/a/28059870
tagged with: javascript
has answer: http://stackoverflow.com/a/28059841
score: 0
answer count: 3
tagged with: jquery
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/28059841
tagged with: css
possible better answer: http://stackoverflow.com/a/28059858
has title: How to get the clicked menu details
has answer: http://stackoverflow.com/a/28059858
has comment: http://stackoverflow.com/comment/44501025
has body: i have jquery menu like Refresh - Exit Add Edit Delete i got the way to get click event on child menu items like $('#fileMenu').on('click', 'li', function () { alert("Hello"); // Or make($(this)); if you still want that extra function }); But, how to find out the particular menu option, i.e user clicked on Open, Exit, Edit, delete etc...
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/44391530
score: 0
type: Comment
type: QuestionComment
has text: @bayblade567 why should this be a syntax error? It's a string and it passes a variable to jQuery's animate which is legitimate. http://api.jquery.com/animate/
comment on: http://stackoverflow.com/q/28001103

http://stackoverflow.com/q/28081425
has answer: http://stackoverflow.com/a/28081778
has body: I have a code to plot a highcharts on my website, I need to plot multiple charts on same div(container), so please guide to reach this, below is my code $('#container').highcharts('StockChart', { chart: { borderColor: 'black', borderWidth: 0, borderRadius: 10, height:150 }, I tried this for append $('#container').append.highcharts('StockChart', but it seems like a wrong syntex,please share your answer,thanks
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28081778
type: Question
answer count: 2
tagged with: highcharts
has title: How to append highcharts on same div?
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/28081716
has answer: http://stackoverflow.com/a/28081716
has comment: http://stackoverflow.com/comment/44541604
has comment: http://stackoverflow.com/comment/44541660

http://stackoverflow.com/comment/44565754
comment on: http://stackoverflow.com/q/28093713
type: Comment
has text: Your problem is that `read` is asynchronous, and you're alerting the variables before they will get assigned.
score: 0
type: QuestionComment

http://stackoverflow.com/a/32638806
upvote count: 2
has body: What i did was empty the id=" " where the d3pie is point it in the html. After calling your pie in your JavaScript code, just type: $('#TheIdOfYourPie').empty();
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/28034612

http://stackoverflow.com/comment/138693285
has text: any suggestions for 2024? @Cubi73
comment on: http://stackoverflow.com/q/27986868
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/44383837
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27996783
has text: Since when has a Submit button have a checked property?

http://stackoverflow.com/q/27999963
favorite count: 0
has answer: http://stackoverflow.com/a/28000521
has title: D3 loop array inside data object
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
upvote count: 4
type: AnsweredQuestion
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/44389340
has comment: http://stackoverflow.com/comment/44389912
tagged with: javascript
has body: data = [ {"name":"c1","id":4690 ,"day":[1,3], "start":"8:00", "end":"10:00"}, {"name":"c3","id":5283 ,"day":[3,4], "start":"8:00", "end":"17:00"}, {"name":"c4","id":4862 ,"day":[4], "start":"10:00", "end":"12:30"}, {"name":"c5","id":4862 ,"day":[5], "start":"10:00", "end":"12:30"}] i'm trying to create a rectangle for each day of each object, the following code without the "for" is working and creating a rectangle for day[0], but not working for all the days!! function markCourses( data) { var coursesGroup = cont.append("g"); for ( var x=0; x&lt;data[this].day.length; x++) { var rects = coursesGroup.selectAll("rect").data(data).enter().append("rect") .attr("x",function(d){ return d.x_position;}) .attr("y", function(d){ return d.y_position;}) .attr("width", function(d){ return d.duration;}) .attr("height", vSize-6) // the -6 is used here is used for improvement of the interface .style("fill",function(d){return d.color;}) . style("opacity",0.6); } }
score: 4
accepted answer: http://stackoverflow.com/a/28000521
answer count: 1

http://stackoverflow.com/comment/44658816
has text: Thank you, my only question would be where to properly iterate minTimestamp (`minTimestamp = images[0].created_time`)?
type: Comment
comment on: http://stackoverflow.com/a/28142255
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44429623
type: Comment
type: QuestionComment
score: 0
has text: I've tested the above function as it is in a separate html file. i works fine. When I tried to copy the same into my webapp it gives me the above error
comment on: http://stackoverflow.com/q/28021486

http://stackoverflow.com/q/28067153
has title: HTML5 and canvas to plot Pie Chart
has comment: http://stackoverflow.com/comment/44513969
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/28075685
score: 0
has body: I'm trying to plot a pie chart using HTML5 and Canvas. Here below is my working example in jsfiddle. http://jsfiddle.net/2mf8gt2c/ I need to show the values inside of the pie chart. i.e var myColor = ["Green","Red","Blue"]; var myData = [30,60,10]; The value should be displayed inside the pie chart. How can I achieve that? The full code is available below. My Title This text is displayed if your browser does not support HTML5 Canvas. Can someone help me to get this done? Thanks, Kimz
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44515481
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44519925

http://stackoverflow.com/q/28102451
has title: Chartjs highlights multiple points in row
answer count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
tagged with: graph
has comment: http://stackoverflow.com/comment/44773257
tagged with: chart.js
tagged with: javascript
type: Question
has body: I'm using Chartjs, and its not highlighting properly. Its only supposed to highlight one data point at a time, but for some reason it highlights all data points to the right of my mouse. I've attached a gif to demonstrate: My data structure is as follows: { "labels": ["", "", "", "", "", "", "", "", "", ""], "datasets": [{ "data": [null, null, "5.00", null, null, null, "5.00", null, "2.00", null, "7.00", null, null, null], "label": "item 1", "fillColor": "rgba(0, 0, 0, 0.2)", "strokeColor": "rgb(255, 153, 0)", "pointColor": "rgba(198,229,217", "pointStrokeColor": "#fff", "pointHighlightFill": "#fff", "pointHighlightStroke": "rgba(220,220,220,1)" }, { "data": [null, null, null, null, null, null, null, null, null, null, "7.00", null, null, null], "label": "Item 2", "fillColor": "rgba(0, 255, 255, 0.46)", "strokeColor": "rgb(0, 255, 0)", "pointColor": "rgba(220,220,220,1)", "pointStrokeColor": "#fff", "pointHighlightFill": "#fff", "pointHighlightStroke": "rgba(220,220,220,1)" }, { "data": [null, null, null, null, null, null, null, null, null, null, null, null, null, null], "label": "Item 3", "fillColor": "rgba(198,229,217,.2)", "strokeColor": "rgba(198,229,217,1)", "pointColor": "rgba(220,220,220,1)", "pointStrokeColor": "#fff", "pointHighlightFill": "#fff", "pointHighlightStroke": "rgba(220,220,220,1)" }] } If you can see whats going wrong that would be great. Its a pretty complex app I'm building, so I may be making a mistake elsewhere.
has comment: http://stackoverflow.com/comment/44757336
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/44483182
has text: @BenMcCormick: I don't disagree. I think `indexOf` makes the intent much clearer and the code much more concise. It would be even better if we could use [Array.includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes), but sadly it's not supported by most browsers.
type: AnswerComment
comment on: http://stackoverflow.com/a/28049538
score: 0
type: Comment

http://stackoverflow.com/q/28045735
type: Question
has body: I have a hidden div which contains my new links: ... The links I want to change are in my head: I've tried something like this: updateLinks(); function updateLinks() { var str = document.getElementById("links").innerHTML; document.getElementById("myHead").innerHTML = str; } But my head don't receive the new links. I want to update my links because I download html files and when I try to open them I have ERR_FILE_NOT_FOUND Can you help me please?
has answer: http://stackoverflow.com/a/28045891
accepted answer: http://stackoverflow.com/a/28045891
tagged with: dom
has title: How to dynamically change my includes to js files?
upvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/44474049
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28046630
has answer: http://stackoverflow.com/a/28046219
type: AnsweredQuestion
score: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/28046219
has comment: http://stackoverflow.com/comment/44473962

viewbag
tags question: http://stackoverflow.com/q/28029677
type: Tag
tag name: viewbag

http://stackoverflow.com/q/28027951
tagged with: javascript
score: -6
favorite count: 0
has comment: http://stackoverflow.com/comment/44441122
has answer: http://stackoverflow.com/a/28028392
has comment: http://stackoverflow.com/comment/44441767
downvote count: 6
type: UnansweredQuestion
has title: Traversing the response text
has comment: http://stackoverflow.com/comment/44441799
has comment: http://stackoverflow.com/comment/44441031
type: Question
upvote count: 0
answer count: 1
has body: I am using Ajax for request/response. I am getting responseText having lot of divs and hidden fields(HTML page). From this how can I get my required div id from the responseText?, I don't want to store responseText in any other div's innerHTML, instead, just I want to access my required div id from the responseText using javascript. Below is the Html content which I get in ajax response. testissue123 And storing the responseText in one variable, following is the same mentioned. onSuccess: function(transport) { var response = transport.responseText; }

http://stackoverflow.com/comment/44393517
has text: Dear ssh2 creator, thanks a lot it works perfectly :) ! I would like to ask you something : Is this way the best way to execute a shell script on a server, or is it better to upload the script using sftp and then exec the script ? thanks alot !
type: Comment
comment on: http://stackoverflow.com/a/28002173
score: 0
type: AnswerComment

http://stackoverflow.com/a/28017063
upvote count: 9
has body: For Additive Color mixing: To mix the two colors, do this: function approximateColor1ToColor2ByPercent(color1, color2, percent) { var red1 = parseInt(color1[1] + color1[2], 16); var green1 = parseInt(color1[3] + color1[4], 16); var blue1 = parseInt(color1[5] + color1[6], 16); var red2 = parseInt(color2[1] + color2[2], 16); var green2 = parseInt(color2[3] + color2[4], 16); var blue2 = parseInt(color2[5] + color2[6], 16); var red = Math.round(mix(red1, red2, percent)); var green = Math.round(mix(green1, green2, percent)); var blue = Math.round(mix(blue1, blue2, percent)); return generateHex(red, green, blue); } function generateHex(r, g, b) { r = r.toString(16); g = g.toString(16); b = b.toString(16); // to address problem mentioned by Alexis Wilke: while (r.length &lt; 2) { r = "0" + r; } while (g.length &lt; 2) { g = "0" + g; } while (b.length &lt; 2) { b = "0" + b; } return "#" + r + g + b; } function mix(start, end, percent) { return start + ((percent) * (end - start)); } Then this following code: approximateColor1ToColor2ByPercent('#000000', '#ffffff', .50); will return '#808080'
type: Answer
has comment: http://stackoverflow.com/comment/44421890
downvote count: 0
has comment: http://stackoverflow.com/comment/44421514
has comment: http://stackoverflow.com/comment/44421394
has comment: http://stackoverflow.com/comment/44421876
accepted answer of: http://stackoverflow.com/q/28016890
score: 9
answers question: http://stackoverflow.com/q/28016890
type: AcceptedAnswer

http://stackoverflow.com/comment/44506963
score: 0
has text: i know but it doesn't do the function I'm looking for :)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28062979

http://stackoverflow.com/a/28015207
accepted answer of: http://stackoverflow.com/q/28014567
has comment: http://stackoverflow.com/comment/44418148
type: Answer
has body: You can put markers which belong together in one group: // Create group and add to map var group = new L.LayerGroup().addTo(map); $.getJSON('markers.json', function (data) { for (var i = 0; i &lt; data.length; i++) { var location = new L.LatLng(data[i].lat, data[i].lng); var marker = new L.Marker(location); // Add marker to group group.addLayer(marker); } }); Put an onchange handler on your input: &lt;input type="checkbox" onchange="toggleGroup(this)" checked&gt;Toggle group&lt;/li&gt; Then add a function to handle the onchange event: function toggleGroup (e) { // Is checked if (e.checked) { // Add group to map map.addLayer(group); // Isn't checked } else { // Remove group from map map.removeLayer(group); } } Here's a working example on Plunker: http://plnkr.co/edit/cSUVCW?p=preview
has comment: http://stackoverflow.com/comment/44418036
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44417831
answers question: http://stackoverflow.com/q/28014567
score: 0

http://stackoverflow.com/comment/44515253
type: Comment
score: 0
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/69298/discussion-between-abi1964-and-pawel-fus).
comment on: http://stackoverflow.com/a/28026926
type: AnswerComment

http://stackoverflow.com/comment/44371251
comment on: http://stackoverflow.com/a/27989846
has text: @JohnnyHK I edited my answer with the mongoose debug output, but as I said before, this `findOne` is called before, to check the email uniqueness, and works fine. It's the same function, with the same input. Maybe a connection problem?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/30880412
score: 2
downvote count: 0
has body: grunt-contrib-imagemin uses jpegtran to optimize jpg files. It uses the options -copy none -optimize which strips meta-data from the file and optimizes the Huffman table which is a lossless process. jpegtran does not perform lossy operations such as changing the image quality. So to answer your question, you can not use grunt-contrib-imagemin to optimize jpg files further, you would need to use something else. png files are optimized with optipng which is able to apply different algorithms which appear to be more effective for that file type while remaining lossless.
upvote count: 2
answers question: http://stackoverflow.com/q/28093591
type: Answer

http://stackoverflow.com/comment/44384455
score: 0
type: AnswerComment
has text: Hey @detailer I've used alert messages alert('msg1'); in showrSS function its going inside the showrss but not going in any of if else statements ...!!
type: Comment
comment on: http://stackoverflow.com/a/27997034

custom-data-attribute
tags question: http://stackoverflow.com/q/27988833
type: Tag
tag name: custom-data-attribute

http://stackoverflow.com/comment/44550688
comment on: http://stackoverflow.com/q/28085876
type: Comment
type: QuestionComment
has text: It must have something to do with the modal then. Your example seems fine but when in the modal I cannot change the items. I can't recreate it on Plunker as it'll mean rebuilding the entire app get all the dependencies in. It's an Ionic app so that means using Ionic and getting the modal template and so on.
score: 0

http://stackoverflow.com/comment/44514629
type: QuestionComment
comment on: http://stackoverflow.com/q/28067475
has text: Where exactly in callback i'm pretty new to api and kendo
score: 0
type: Comment

http://stackoverflow.com/q/28095626
tagged with: javascript
answer count: 2
upvote count: 0
linked to: http://stackoverflow.com/q/2901102
favorite count: 0
has body: I have a input field for user to input number. This number will be displayed in span tag as user is typing. And i would like to format this number in span tag with thousand separator. Currently, it only show exactly what is typing without thousand separator: JSFiddle Here is my simplified code: Price:
has comment: http://stackoverflow.com/comment/44567967
has answer: http://stackoverflow.com/a/28095963
has title: Displaying number with thousand seperator
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28095691
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/44567225
possible better answer: http://stackoverflow.com/a/28095691
accepted answer: http://stackoverflow.com/a/28095963
score: -2

http://stackoverflow.com/comment/44595077
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28110590
type: Comment
has text: @techfoobar you are right. can you see my fiddle i didn't get exact answers.

http://stackoverflow.com/q/28038394
has body: I am working on a GWT project and making a JSNI call to a javascript function on some event. Issue is after my event fires (on tab load), the jsni call to js function is getting called even before the javascript and css have been loaded and so it gives error that function not exists. What is the best way to handle such a scenario ?
has answer: http://stackoverflow.com/a/28059079
score: 0
type: Question
tagged with: gwt
tagged with: javascript
answer count: 2
has title: GWT : Fire and event after javascript and css loads
tagged with: smartgwt
has answer: http://stackoverflow.com/a/28374876
type: UnansweredQuestion
tagged with: jsni

http://stackoverflow.com/q/28026876
answer count: 1
tagged with: webrtc
favorite count: 0
upvote count: 1
has body: I am creating a sample application for audio conferencing using WebRTC. What I am trying to do is creating a RTCpeerconnection object and passing it remote description received from the caller. Once remote description is set then then 'onaddstream' event is fired for the peer-connection object, where we can set the stream received in remote description to some audio/video control as shown in example code below: function call() { chatHub.server.connect('receiver'); pc2 = new RTCPeerConnection(null, pcConstraints); pc2.onicecandidate = iceCallback2; pc2.onaddstream = gotRemoteStream; } function gotDescription1(desc) { var dessc = new RTCSessionDescription({ type: 'offer', sdp: desc }); pc2.setRemoteDescription(dessc); } function gotRemoteStream(e) { //attaching the stream to UI controls audio2 = attachMediaStream(audio2, e.stream); audio2.play(); pc2.createAnswer(gotDescription2, onCreateSessionDescriptionError,sdpConstraints); callButton.disabled = true; hangupButton.disabled = false; } function gotDescription2(desc) { pc2.setLocalDescription(desc); } function iceCallback2(event) { //---foo---- } as clear from sample code process starts from call method , which set up a PeerConnection object and set its events callback, then gotDescription1 is called by some code element, now this is where we set remoteDescription which should fire gotRemoteStream internally. All this is working fine in major browsers except Firefox, remote description is set for object but there is no callback for gotStream. Check this for possible explanation. https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection#Initializing_the_call
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28052631
score: 1
type: Question
has comment: http://stackoverflow.com/comment/45640610
has title: event callback not firing in Mozilla Firefox
tagged with: firefox
downvote count: 0
tagged with: javascript
tagged with: dom-events
tagged with: callback
has answer: http://stackoverflow.com/a/28052631

http://stackoverflow.com/comment/44762338
type: Comment
has text: @GregoryLoginow Give a class to your .a elements you need to close the menu then put that class name instead of .a in the function.
type: AnswerComment
comment on: http://stackoverflow.com/a/28120722
score: 0

http://stackoverflow.com/comment/44443463
type: Comment
has text: For what reason are you trying to do this?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28029199

http://stackoverflow.com/a/29124415
has comment: http://stackoverflow.com/comment/46947388
has comment: http://stackoverflow.com/comment/47056337
answers question: http://stackoverflow.com/q/28023654
score: 0
has comment: http://stackoverflow.com/comment/47056422
type: Answer
has comment: http://stackoverflow.com/comment/47060903
has comment: http://stackoverflow.com/comment/47057512
has comment: http://stackoverflow.com/comment/46947273
has body: DEMO Update I really like your improvements, pure css. Now since I'm not sure what you need help with I remade my answer but with your new fiddle. so the animation run a set amount of times: -webkit-animation: dash 5s linear alternate 3 forwards; Note Consider adding all the prefixes so you have both -wekkit-animation and animation and so you have support for none webkit browsers. Cross Browser Animation: -webkit-animation: -moz-animation: -o-animation: Keyframe: @-webkit-keyframes NAME { //code } @-moz-keyframes NAME { //code } @-o-keyframes NAME { //code } @keyframes NAME-YOUR-ANIMATION { //code } .circle { stroke-dasharray: 2000; stroke-dashoffset: 2000; -webkit-animation: dash 5s linear alternate 3 forwards; -webkit-transform-origin: 50% 50% ; -webkit-transform: rotate(-90deg) ; } .circle1 { stroke-dasharray: 2000; stroke-dashoffset: 2000; -webkit-animation: dash 5s linear alternate 3 forwards; -webkit-transform-origin: 50% 50% ; -webkit-transform: rotate(-90deg) ; } .circle2 { stroke-dasharray: 2000; stroke-dashoffset: 2000; -webkit-animation: dash 5s linear alternate 3 forwards; -webkit-transform-origin: 50% 50% ; -webkit-transform: rotate(-90deg) ; } .circle3 { stroke-dasharray: 2000; stroke-dashoffset: 2000; -webkit-animation: dash 5s linear alternate 3 forwards; -webkit-transform-origin: 50% 50% ; -webkit-transform: rotate(-90deg) ; } @-webkit-keyframes dash { from { stroke-dashoffset: 2000; } to { stroke-dashoffset: 0; } } &lt;svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="400px" height="400px" viewBox="0 0 711.1 717.1" enable-background="new 0 0 711.1 717.1" xml:space="preserve"&gt; &lt;circle class="circle" fill="none" stroke="#FD4F00" stroke-width="66" stroke-miterlimit="10" cx="355.55" cy="358.55" r="285.956"/&gt; &lt;circle class="circle1" fill="none" stroke="#FD4F00" stroke-width="3.0819" stroke-miterlimit="10" cx="355.55" cy="358.55" r="233.497"/&gt; &lt;circle class="circle2" f…

http://stackoverflow.com/a/28055648
type: Answer
has comment: http://stackoverflow.com/comment/44493173
score: 2
has comment: http://stackoverflow.com/comment/44496215
answers question: http://stackoverflow.com/q/28055315
downvote count: 0
has comment: http://stackoverflow.com/comment/44493243
upvote count: 2
has body: This will do it. //using regex var keyString = "|KEY1|VALUE 1 |KEY2| VALUE 2 |KEY3| OTHER VALUE WITH ANY CHARACTER LIKE SPACES, |PIPES| AND WHAT YOU WANT |KEY4| VALUE4" var cases = keyString.match(/[^|]+/g) var myObject = {}; if (cases.length &gt; 0) { for (var i = 0; i &lt; cases.length; i += 2) { myObject[cases[i].toString()] = cases[i+1].trim(); } } document.write(JSON.stringify(myObject));

http://stackoverflow.com/comment/45094184
score: 0
has text: No problem at all. Hope I could have done more but impressive hack. N if i come across something more stable than this, I will post here. Cheers!
type: AnswerComment
comment on: http://stackoverflow.com/a/28376677
type: Comment

http://stackoverflow.com/a/28089169
accepted answer of: http://stackoverflow.com/q/28064433
has body: First of all, thanks to everybody, but it turned out that the problem was something else. The problem was not that the functions in the array were called immediatly but that the done() function was executed before the ajax calls within the callWithIndex function were finished. The right way to achieve that the done is invoked after the functions in the array have finished is to let the passed functions return the return value of its inner ajax() call (which in my case is wrapped in api.loadUser). As far as I understood, a jQuery's ajax call returns a Deferred object and the done() function is invoked as soon as all Deferred objects that were passed in the when() function finished. Imho, this is not really well documented in the jQuery documentation, where they simply use ajax() calls without mentioning that the return value does the trick here. Here you'll find a nice Tutorial about jQuery when(...)done(...) stuff So in the end, my code looks as follows: In my api namespace i define the loadUser function which now returns the ajax return value api.loadUser = function(userType, userId, onSuccess, onError) { return $.ajax({ //do your ajax stuff }); }; In my current JavaScript file it now looks as follows: var collectedData = []; var callWithIndex = function(i, userType, userId) { return api.loadUser(userType, userId, function(data) { collectedData.push(data); }); } var deferreds = []; for(var i=0;i&lt;someData.length;++i) { var entry = someData[i]; deferreds.push(callWithIndex(i, entry.userType, entry.userId)); } $.when.apply($, deferreds).done(function(result) { // do stuff with collectedData }); This worked for me so far and now the done() is invoked when all callWithIndex calls are done. The reason I did not use deferreds.push(api.loadUser(answer.userType, answer.userId, function(data) { //do stuff with collectedData })); was that the collectedData array is undefined for the success function of loadUser(). I guess this is some scope related issue, but I don't care.
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/28064433

http://stackoverflow.com/q/28080704
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28080835
has comment: http://stackoverflow.com/comment/44540311
score: 3
upvote count: 3
has body: I want to know if there is a way for a client to detect that some global.variable has changed and update the value on the browser whenever the global.variable value changes. My use case is I have a module that I added to the global object in order to maintain its state across different users requests. Each user can modify a property of this object (global.myobject.myproperty) independently, but I want them to be updated whenever global.myobject.myproperty is modified by any other user. I'm fairly new to Javascript and Node.js and I'm mostly adventuring into the unknown, so please don't assume I know too much. :) Any guidance is appreciated.
has answer: http://stackoverflow.com/a/28080811
has comment: http://stackoverflow.com/comment/69705284
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/129248508
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/69701628
has comment: http://stackoverflow.com/comment/44540576
has title: How to detect a global value change in Node.js
tagged with: node.js
favorite count: 0

http://stackoverflow.com/comment/44623144
has text: but using _blank I can't hide the done button on the bottom of the web page.
comment on: http://stackoverflow.com/a/28087934
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44398117
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/28004771
has text: Lol! @Sverri, the code pasted above is from Firebug source, not from my html page. I patched both the main page code and iframe code here to show the full picture.

http://stackoverflow.com/comment/44510822
comment on: http://stackoverflow.com/q/28062688
score: 0
type: QuestionComment
type: Comment
has text: Hi Sebastian this is not really an option for me as I would like to use Angular functionality inside of the click function

http://stackoverflow.com/a/28043602
has comment: http://stackoverflow.com/comment/44473358
has comment: http://stackoverflow.com/comment/44472628
has comment: http://stackoverflow.com/comment/44515143
has comment: http://stackoverflow.com/comment/44470371
has comment: http://stackoverflow.com/comment/44470499
has comment: http://stackoverflow.com/comment/44473387
has comment: http://stackoverflow.com/comment/44473504
has comment: http://stackoverflow.com/comment/44472839
score: 0
answers question: http://stackoverflow.com/q/28042257
type: Answer
has comment: http://stackoverflow.com/comment/44515186
has comment: http://stackoverflow.com/comment/44515010
has body: I cannot see the result that you claim, which means it works for me and the rest of the world. Here is the abridged listing as a single script example: var async = require('async'), mongoose = require('mongoose'), Schema = mongoose.Schema; mongoose.connect('mongodb://localhost/test'); var invitationSchema = new Schema({ "ID": { "type": Schema.Types.ObjectId }, "Accepted": Boolean }); var userSchema = new Schema({ "Invitation": [invitationSchema] }); var User = mongoose.model( 'User', userSchema ); User.find({},'Invitation',function(err,docs) { if (err) throw err; var results = []; async.each(docs,function(doc,callback) { async.each(doc.Invitation, function(invite,callback) { User.findOneAndUpdate( { "_id": doc._id, "Invitation._id": invite._id }, { "$set": { "Invitation.$.Accepted": !invite.Accepted } }, function(err,doc) { results.push(doc); callback(err); } ); },callback); },function(err) { if (err) throw err; console.log( results.slice(-1)[0] ); process.exit(); }); }); So that clearly "toggles" both values as requested and works perfectly. This is the result from me on one shot: { _id: 54be2f3360c191cf9edd7236, Invitation: [ { __v: 0, ID: 54afaabd88694dc019d3b628, __t: 'USER', _id: 54b5022b583973580c706784, Accepted: true }, { __v: 0, ID: 54af6ce091324fd00f97a15f, __t: 'USER', _id: 54bde39cdd55dd9016271f14, Accepted: true } ] }
has comment: http://stackoverflow.com/comment/44473571

http://stackoverflow.com/comment/44363664
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27986289
has text: did you define `now` as a variable? what's its value?

zurb-foundation
tags question: http://stackoverflow.com/q/27986467
type: Tag
tags question: http://stackoverflow.com/q/28071570
tags question: http://stackoverflow.com/q/28037482
tags question: http://stackoverflow.com/q/28047273
tags question: http://stackoverflow.com/q/28032147
tags question: http://stackoverflow.com/q/28112863
tag name: zurb-foundation
tags question: http://stackoverflow.com/q/28053610
tags question: http://stackoverflow.com/q/27991390
tags question: http://stackoverflow.com/q/28070004
tags question: http://stackoverflow.com/q/28001182

http://stackoverflow.com/a/28051883
has body: An alternative implementation would be to not use a switch statement at all. You could create a javascript object mapping boolean values as keys to function objects. var truthTable = { false: { false: falsefalseFunc, true: falsetruefunc }, true: { false: truefalseFunc, true: truetrueFunc } } Where falsefalseFunc, falsetrueFunc, etc... are function objects. Then you can call it like: truthTable[boolA][boolB]();
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/28051537

http://stackoverflow.com/comment/44576923
has text: My actual question was : "How to load script without actually appending the script tag inside html?".
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28099589

http://stackoverflow.com/comment/44592394
type: Comment
type: QuestionComment
has text: Hey yes you are doing it in a wrong way you need to create a sevice to share data between controllers.
comment on: http://stackoverflow.com/q/28109115
score: 0

http://stackoverflow.com/q/28052114
tagged with: javascript
has comment: http://stackoverflow.com/comment/44486482
has body: What I have is an iframe displaying a web page for a sensor that hosts it's own webpage showing humidity and temperature. All I really need is the current temperature and humidity so that I can display it on a main page displaying lab status. So from what I gather I need to reach into the iframe, that way I can get to the tr/td values for the table being used to hold what I need. From scouring the internet top to bottom I put together the following code... var myIFrame = document.getElementById('ifOmega'); var content = myIFrame.contentWindow.document.body.innerHTML; The problem is that the second line silently fails. I tested myIframe to ensure that it executed and was not null. I am using Visual Studios 2010 and so I am not sure if maybe it's a limitation there? I only say that because when I try to type... var content = myIFrame. ...the intellisense doesn't pop up with contentWindow as an option. Even when I figure this out I'm not sure how to dig deeper other than. var var0 = content.getElementById('rd0'); Where rd0 is the name/id of the cell that has a div inside containing the temperature value. I am assuming to reach into the I will need one of the javascript sibling/child methods? BTW, my javascript is executed client side with... Sys.Application.add_load(getTempTable); ..at the top. Thank you for any help.
tagged with: visual-studio-2010
linked to: http://stackoverflow.com/q/1451208
has comment: http://stackoverflow.com/comment/44486553
has comment: http://stackoverflow.com/comment/44486914
has comment: http://stackoverflow.com/comment/44486935
tagged with: asp.net
answer count: 0
type: UnansweredQuestion
score: 0
linked to: http://stackoverflow.com/q/19498725
has title: Reach inside of iframe using javascript in asp.net webform
tagged with: dom
has comment: http://stackoverflow.com/comment/44487115
type: Question
has comment: http://stackoverflow.com/comment/44486497
tagged with: c#

http://stackoverflow.com/comment/44362714
score: 0
type: Comment
has text: I don't want to have to write that every time I assign a value. I'd like it to perform automatically when time is assigned.
comment on: http://stackoverflow.com/a/27985909
type: AnswerComment

http://stackoverflow.com/comment/44474003
type: QuestionComment
has text: @DavidThomas, Yes, I am actually aware about that. But, I have many freak code for this that doesn't seem to work. I even have download an open source script to achieve this. However the script is too long that is difficult to me to read that. So I open this question hoping that there will an answer with short code that I can easily understand how does it work so that I can modify it as how I expect it next.
type: Comment
comment on: http://stackoverflow.com/q/28034998
score: 0

http://stackoverflow.com/comment/44543696
type: Comment
comment on: http://stackoverflow.com/a/28082787
has text: Is your php hosted on any webserver ..?? Or just a simple file ..?? If simple please host it on any server locally then hit it.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44594683
comment on: http://stackoverflow.com/q/28102457
type: QuestionComment
has text: Yes, unless I am missing something. You can check by [going to the article](http://grantland.com/the-triangle/13-observations-from-the-d-league-showcase/), and looking at examples such as `document.querySelectorAll( '#layout-main .blog-body p' )[8]`, in the console.
type: Comment
score: 0

http://stackoverflow.com/q/27991756
tagged with: jquery-ui-selectmenu
type: Question
has title: In JQuery, how do I copy a subset of select options from one select menu to another?
score: -2
tagged with: javascript
tagged with: copying
answer count: 2
downvote count: 3
accepted answer: http://stackoverflow.com/a/27991918
upvote count: 1
possible better answer: http://stackoverflow.com/a/27991923
tagged with: jquery
favorite count: 0
tagged with: html-select
has answer: http://stackoverflow.com/a/27991918
type: AnsweredQuestion
has body: I'm using JQuery 1.11.1. I have two select menu elements, one containing options like option A option B ... ============= option AA option BB ... How do I copy the options up to and including the option with the "=============" text to the second select menu (let's say the second select menu has id='select2'). Thanks, - Dave
has answer: http://stackoverflow.com/a/27991923

http://stackoverflow.com/comment/44551591
type: Comment
score: 0
has text: the event onclick need to be in my case in the MANAGED BEAN like **Action=#{#paintmanagedbean.paintrectangle()}**
comment on: http://stackoverflow.com/a/28087180
type: AnswerComment

http://stackoverflow.com/comment/44321621
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27964332
has text: ok i want to give id from code behind or jqueryfunction to toggle function
type: Comment

http://stackoverflow.com/comment/44589537
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28107605
has text: Can you picture what you have in mind?
score: 0

http://stackoverflow.com/q/28001169
accepted answer: http://stackoverflow.com/a/28001195
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28001195
type: AnsweredQuestion
score: 1
type: Question
tagged with: internet-explorer-9
tagged with: javascript
has body: I have built a very simple example, loading a table into a page via ajax from another html page and it works fine in all browsers, except IE9, that seems to nest tables. Replacing table with div isn't an option here. What would be the workaround for it? (I'm using jquery-1.8.1) Here is my code: index.html Sort Column 1 Sort Column 2 Row 1 Data 1 Row 1 Data 2 Row 2 Data 1 Row 2 Data 2 load new data table.html Sort Heading 1 Sort Heading 2 Row 1 New Data 11 Row 1 New Data 22 Row 2 New Data 11 Row 2 New Data 22
has title: IE9 - Loading html table into a page with jQuery
upvote count: 1
answer count: 1
downvote count: 0
tagged with: jquery

cors
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/28045033
tags question: http://stackoverflow.com/q/28088087
tags question: http://stackoverflow.com/q/27993087
tags question: http://stackoverflow.com/q/28040007
tags question: http://stackoverflow.com/q/28068237
tags question: http://stackoverflow.com/q/27971189
tags question: http://stackoverflow.com/q/28050825
tags question: http://stackoverflow.com/q/27990010
tags question: http://stackoverflow.com/q/28100985

http://stackoverflow.com/q/28038021
answer count: 4
has comment: http://stackoverflow.com/comment/44460809
has answer: http://stackoverflow.com/a/28038254
has title: Turn string into date - JavaScript
has comment: http://stackoverflow.com/comment/44460659
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28038069
has answer: http://stackoverflow.com/a/28038194
possible better answer: http://stackoverflow.com/a/28038044
type: Question
has answer: http://stackoverflow.com/a/28038044
has comment: http://stackoverflow.com/comment/44460614
accepted answer: http://stackoverflow.com/a/28038254
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44460722
has body: Hey guys I am retrieving a value from an input box and am using that value to turn into a Date for JavaScript the format is Y-m-d h:i:s. It works perfect in Chrome but any other browser says invalid Date var old = $(".checked-in-time").val(); old = new Date(old); UPDATE: Here is what I am doing: var current = new Date(); var old = $(".checked-in-time").val(); old = Date.parse(old , 'Y-m-d H:i:s'); var newEnd = current - old minutes = parseInt((newEnd/(1000*60))%60); var subtractedWaitTime = minutes; Pretty much getting the time difference based on minutes.
score: 0

http://stackoverflow.com/q/28050091
has title: set an error handler for jquery datatables ajax call
has answer: http://stackoverflow.com/a/52084157
has comment: http://stackoverflow.com/comment/44483047
has answer: http://stackoverflow.com/a/77533328
has answer: http://stackoverflow.com/a/60824664
type: Question
has answer: http://stackoverflow.com/a/28605246
upvote count: 40
type: AnsweredQuestion
has body: I'm trying to have a custom error handler when something goes wrong (i.e. the server does not respond) on the ajax call for loading new data into my datatable. $table.DataTable().ajax.url(ajaxURL).load(); By default it shows an alert and I can change that to throw a javascript error with the following setting: $.fn.dataTable.ext.errMode = 'throw'; But with this, I just have an error logged to the console and I'm not sure how to catch that thrown error so I still can't provide my own error handler. There is also an error event listed in the documentation, but that doesn't seem to get triggered, so the following never alerts. $table.on( 'error', function () { alert( 'error' );} ); Everything else I've found so far is for the legacy code, such as setting the fnServerData, which I would like to avoid getting into. Is there a method to set the ajax error callback in the 1.10 API?
has answer: http://stackoverflow.com/a/54415174
accepted answer: http://stackoverflow.com/a/28605246
score: 40
possible better answer: http://stackoverflow.com/a/54415174
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 5
tagged with: datatables

http://stackoverflow.com/q/28098892
has comment: http://stackoverflow.com/comment/44573829
answer count: 0
has title: Track whether user completes call after clicking tel: link
type: Question
tagged with: tel
tagged with: javascript
has body: I am working on a page which has a button whose onclick function looks like this handleClick: function () { var url = "tel:" + PHONE_NUMBER; window.location = url; }, The problem is this. I don't just want to track whether or not the user clicks the button, I also want to track whether or not the user actually places the call. Is there a way to do this? I need methods for both IOS and android. EDIT: it seems like this isn't possible (and rightly so), but I am still looking for hacky ways to guess at it. For instance, is there a way to check whether or not the browser goes to the background between two page actions in IOS?
score: 0
has comment: http://stackoverflow.com/comment/44573720
tagged with: mobile
has comment: http://stackoverflow.com/comment/44573635
has comment: http://stackoverflow.com/comment/44573896
has comment: http://stackoverflow.com/comment/44574014
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44573684
tagged with: android
has comment: http://stackoverflow.com/comment/44573537
tagged with: tracking

http://stackoverflow.com/comment/44523606
type: AnswerComment
score: 0
has text: Was running out of space in question so have added `index.php` but deleted all the ` ` data from all files as it's irrelevant to this problem
type: Comment
comment on: http://stackoverflow.com/a/28066850

http://stackoverflow.com/a/28004867
has comment: http://stackoverflow.com/comment/44398771
type: Answer
has comment: http://stackoverflow.com/comment/44398803
has body: Using querySelector and querySelectorAll, this seem to work. Can I get any more efficient? I don't seem to have to use complete path ( A > B > C). Note that I added OrderDetail tags to example below. I validates without this, but just seems cleaner. var myOrders = "<?xml version='1.0' encoding='UTF-8'?>" + "<Orders>" + " " + " " + " 12345 " + " " + " " + " " + " ABC " + " 2 " + " " + " " + " DEF " + " 4 " + " " + " " + " "...; document.write(" 4. Get all Orders Numbers and SKU Ordered for each Order "); myOrders= xmlDoc.getElementsByTagName("Order"); // iterate through orders for(x = 0; x < myOrders.length; x++){ var myOrder = myOrders[x].querySelector('OrderNo').textContent; document.write(myOrder + " "); // iterate through SKUS in each order var mySkus = myOrders[x].querySelectorAll('OrderDetail > Sku'); for(y = 0; y < mySkus.length; y++){ document.write("-- SKU: " + mySkus[y].firstChild.nodeValue + " "); } } document.write(" ");
answers question: http://stackoverflow.com/q/28003923
score: 0

http://stackoverflow.com/comment/70070713
has text: As of 2017 is it still the case, that Cordova-sqlite-storage doesnt support pre-populated db ? Also do you know where to put the file in Ionic2 app?
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/30418284

http://stackoverflow.com/comment/112795836
score: 0
type: Comment
has text: This does not work in Firefox
type: AnswerComment
comment on: http://stackoverflow.com/a/41137585

http://stackoverflow.com/q/28024703
type: Question
has body: Here's the function I'm trying to use $('body').on('click', '.up-vote', function(event) { event.preventDefault(); var data = {"action": "voteKarma", "id": $(this).data("id"), "value": $(this).data("val")} $.post(window.apiURL, data, function(result) { switch(result['status']) { case 1: var vote_sum_text = $(this).next(".sum").text(); if (!isNaN(parseInt(vote_sum_text, 10))) { var vote_sum_text = $(this).next(".sum").text(); } else { alert("isNaN Variable") } break; }, 'json'); }); When the Ajax result returns 0 It's returning an alert with isNaN Variable which is my fallback to debug with problem. Here's my HTML layout which is grabbed dynamically using another Ajax request there are multiple of these divs listed in format : 0 In simple terms; when you click .up-vote or .down-vote it'll send an AJAX request that'll then grab the text() of the .sum value.
has title: isNan using this selector with dynamic content in jQuery
answer count: 2
has answer: http://stackoverflow.com/a/28024781
upvote count: 1
possible better answer: http://stackoverflow.com/a/28025046
has answer: http://stackoverflow.com/a/28025046
accepted answer: http://stackoverflow.com/a/28024781
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/q/28052480
tagged with: forms
upvote count: 1
downvote count: 1
type: Question
has body: I'm a bit baffled by Angular. I'm trying to alter a form by giving the fields values from $scope.data but although I know I can "see" the data, I can't get it to display. When I press on an item on a list I use this to get the data: ng-click="openModal(data)" This opens the modal with the form in it and passes the data to the openModal function. I know it's working because there is a pop-up called in the openModal function that says "You are accessing data:" and then the id of the row, or the title or whatever. Now what I want is to use the data to alter the view, the form. I want this: &lt;input type="text" placeholder="Namegoeshere" value="{{$scope.data.nameOfRecord}}"&gt; All I get in the input field is the text [object.Object] though. I know the full record is being passed because console.log("The data is: ", data); gives me the full record I can inspect in the console. Why can I not get access to the data in the form?!
tagged with: javascript
has title: Angular - binding data into a form?
has answer: http://stackoverflow.com/a/28052752
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/28052752
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/28052560
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28052560

http://stackoverflow.com/a/28054994
has body: var localiseEN = { courseEN : "English" }; var learnLang = 'EN'; alert( localiseEN.courseEN + learnLang); Like this?
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/44491870
answers question: http://stackoverflow.com/q/28054967
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44518234
score: 0
has text: Matt Burland - good thinking! At one point I resolve the angle into an X and Y direction/speed - I'm going to try and compare those for both sprites! Many thanks. I'll report back and post the code if I get it working.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28069268

http://stackoverflow.com/a/27995747
answers question: http://stackoverflow.com/q/27995739
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: You have invalid syntax in your filter. You need to provide the key name of the object as the filter object, do not use dot notation for the object key @filter:{data.user_Name:name_filter}" i.e try ng-repeat="data in profile_pictures | filter:{user_Name:name_filter}"
type: Answer
has comment: http://stackoverflow.com/comment/44393545
accepted answer of: http://stackoverflow.com/q/27995739

http://stackoverflow.com/comment/44527370
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28073866
type: AnswerComment
has text: This is the response from the console.log(data) output. https://i.sstatic.net/tweVD.png I just want to add all these images in a div

http://stackoverflow.com/comment/58236129
type: AnswerComment
comment on: http://stackoverflow.com/a/27991152
has text: `Meteor.publish()` does not have access to `Meteor.userId()`: http://docs.meteor.com/#/full/meteor_userid "Anywhere but publish function"
type: Comment
score: 1

http://stackoverflow.com/q/28106229
upvote count: 8
type: UnansweredQuestion
has title: How can this Haskell program, compiled to JavaScript, be faster than JavaScript itself?
has comment: http://stackoverflow.com/comment/44587040
score: 7
downvote count: 1
type: Question
tagged with: javascript
tagged with: haskell
has comment: http://stackoverflow.com/comment/44588631
has comment: http://stackoverflow.com/comment/44679643
has body: I always believed GHCJS, for obvious reasons, generated very slow JavaScript programs, compared to manually written and optimized code. When experimenting with it, though, I noticed it was not as bad as I expected. I decided to run a series of small benchmarks to get a grasp on the true performance, and this one in particular surprised me. The program simply fills an array with "1"'s and add them up. Haskell: import Data.Array.Repa len = 1024*1024*64 arr = fromFunction (Z :. len) (const 1) :: Array D DIM1 Float main = sumAllP arr &gt;&gt;= print JavaScript: var len = 1024*1024*64 var arr = []; var sum = 0; for (var i=0; i&lt;len; ++i) arr[i] = 1; for (var i=0; i&lt;len; ++i) sum += arr[i]; console.log(sum); And a crude benchmark: apple1$ ghcjs -O2 bench_fill.hs -funfolding-use-threshold10000 -funfolding-keeness-factor1000 -o bench_fill.js; time node bench_fill.js/all.js Linking bench_fill.js (Main) 6.7108864e7 real 0m1.543s user 0m1.512s sys 0m0.033s apple1$ time node benchfill.js 67108864 real 0m1.764s user 0m1.173s sys 0m0.583s How can the GHCJS run faster than a slim, clean native for-loop? That shouldn't be possible considering the amount of boxings the generated code should be exposed to.
tagged with: ghc
has answer: http://stackoverflow.com/a/28118061
tagged with: ghcjs
has comment: http://stackoverflow.com/comment/44588238
answer count: 1
has comment: http://stackoverflow.com/comment/44607229
has comment: http://stackoverflow.com/comment/44598791
favorite count: 0

http://stackoverflow.com/comment/44609517
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/28117578
type: Comment
has text: Hmm the task is for a normal website, that has the possibility to upload files (even big files)

http://stackoverflow.com/comment/44680284
type: Comment
comment on: http://stackoverflow.com/a/28152438
score: 0
type: AnswerComment
has text: Ah, good call. JSLint is file-specific, and might consider checking function names outside of the scope of a linter, though it *would* be nice. [Steve Sanderson's blog](http://blog.stevensanderson.com/2012/08/17/using-jshint-inside-visual-studio-the-basics/) (KnockoutJS's author) makes a related point on JSHint drawbacks: `"JavaScript is fully dynamic, so the linter can’t know whether or not a given object will have a certain property at runtime."` That's fair, though, as you say, a good warning would be nice. [WebStorm](https://www.jetbrains.com/webstorm/) might try to do this; can't recall.

hoisting
tag name: hoisting
tags question: http://stackoverflow.com/q/28014480
type: Tag

http://stackoverflow.com/a/28060161
upvote count: 2
answers question: http://stackoverflow.com/q/28060105
downvote count: 0
has body: Just use setTimeout to create a delay. setTimeout(function () { document.title = "New Title!"; }, 6000); // 6 seconds The setTimeout function takes two parameters, a function to call, and a delay in milliseconds. It simply calls the function after the given delay.
type: Answer
score: 2

http://stackoverflow.com/a/39676165
score: 3
has body: @Snoozer right, I also had the same issue, I am using php v7 and after enable the gd extension its fixed. you should open your php.ini file and uncomment this line: extension=php_gd2.dll Update for the comment that I've read in the options array: // Set to 0 to use the GD library to scale and orient images, // set to 1 to use imagick (if installed, falls back to GD), // set to 2 to use the ImageMagick convert binary directly: 'image_library' =&gt; 1,
answers question: http://stackoverflow.com/q/28103078
upvote count: 3
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44946618
type: Comment
has text: A small update: As I had very little time to spend with this issue, I fixed it by changing the timeout value to a certain value. Now it works with just your method. So thanks to you once again.
comment on: http://stackoverflow.com/a/28066772
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44517363
score: 0
type: Comment
comment on: http://stackoverflow.com/q/28068606
type: QuestionComment
has text: I will play around with that. In the mean time I have made changes and am adding an answer, it does not cover transitions yet.

http://stackoverflow.com/comment/44593964
score: 0
has text: @MaxWilliams I see there 'Status Code:200 OK' It means problem is in Rails code ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28109768

http://stackoverflow.com/a/27997977
type: Answer
answers question: http://stackoverflow.com/q/27997918
score: 0
has body: If you call val() on a multiple-choice select list, you get an array instead of a string. So you are actually trying to append a "," to an array. Try this: $value = $( "#leftValues&gt;option:selected" ).val(); $("textarea[name=include_field_list]").append($value.join( ", " ) + ','); The JSFiddle of the fix (Without CSS): http://jsfiddle.net/hyoLedxw/

http://stackoverflow.com/a/28014133
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/28013804
answers question: http://stackoverflow.com/q/28013804
type: Answer
has body: describe "error object", it "should fail", (done) done(new Error(JSON.stringify({link: "mock" })));

http://stackoverflow.com/comment/44478011
score: 1
has text: Why are you suggesting what the OP has already mentioned they are trying to do? OP already said they are displaying them in same page and using show/hide functions. The Problem is with adding up the values associated with the buttons
type: AnswerComment
comment on: http://stackoverflow.com/a/28047893
type: Comment

http://stackoverflow.com/comment/44593936
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28110042
has text: It's hard to tell from your examples, but most probably you're calling `messages = $("#messages")` outside of the onload handler, in which case it returns nothing.
score: 3

http://stackoverflow.com/q/27999899
upvote count: 6
has answer: http://stackoverflow.com/a/28000874
has title: AngularJS $http.get difference between then and success callback
type: Question
has answer: http://stackoverflow.com/a/33044183
tagged with: javascript
has body: I would like understand the difference between then callback and success callback when called over http get. When i use then callback it returns the data but with success callback it doesnt. Below is the code Then callback $http.get(url). then(function(response) { response.data.data;}); Success callback $http.get(url). success(function(response) { response.data;});
answer count: 3
has answer: http://stackoverflow.com/a/28000008
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
score: 6

http://stackoverflow.com/q/28104798
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/47928508
tagged with: javascript
score: 22
possible better answer: http://stackoverflow.com/a/36251811
has title: _.assign only if property exists in target object
favorite count: 0
has answer: http://stackoverflow.com/a/28152433
has answer: http://stackoverflow.com/a/71190125
accepted answer: http://stackoverflow.com/a/28152433
has answer: http://stackoverflow.com/a/64206333
answer count: 5
has answer: http://stackoverflow.com/a/36251811
has body: My need is to do something like an _.assign, but only if the target object already has the property being assigned. Think of it like the source objects may have some properties to contribute, but also some properties that I don't want to mix in. I haven't ever used _.assign's callback mechanism, but tried the following. It 'worked', but it still assigned the property to the dest object (as undefined). I don't want it to assign at all. _.assign(options, defaults, initial, function (destVal, sourceVal) { return typeof destVal == 'undefined' ? undefined : sourceVal; }); I wrote the following function to do this, but wondering if lodash already has something baked in that is more elegant. function softMerge (dest, source) { return Object.keys(dest).reduce(function (dest, key) { var sourceVal = source[key]; if (!_.isUndefined(sourceVal)) { dest[key] = sourceVal; } return dest; }, dest); }
upvote count: 22
tagged with: lodash
downvote count: 0

http://stackoverflow.com/comment/44587000
score: 0
type: QuestionComment
has text: @Amit Joki: The app "navigon" does not require this information in this way, the app "tomtom".
type: Comment
comment on: http://stackoverflow.com/q/28106166

http://stackoverflow.com/comment/44359549
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27984202
type: Comment
has text: You're right. However, this is the `$next`: `$next = $("#top-slider .slide-right");` - I just want to trigger its click() every two seconds.

http://stackoverflow.com/q/28014217
has title: How does one target a placeholder value in a textarea tag using pure javascript
accepted answer: http://stackoverflow.com/a/28014252
tagged with: javascript
possible better answer: http://stackoverflow.com/a/28014331
score: 0
has answer: http://stackoverflow.com/a/28014331
answer count: 2
tagged with: textarea
favorite count: 0
has answer: http://stackoverflow.com/a/28014252
tagged with: append
type: AnsweredQuestion
tagged with: placeholder
upvote count: 1
downvote count: 1
type: Question
has body: I currently have a div named comp &lt;div id="comp"&gt;&lt;/div&gt; Using Javascript, I have added a textarea tag with a placeholder value var comp = document.getElementById('comp'); setTimeout(function(){ comp.innerHTML = '&lt;textarea placeholder="Write on me now, or else... you will have to watch me write on"&gt;&lt;/textarea&gt;'; }, 1500); Keep in mind that it has taken about 1.5 seconds to write out the entire text word by word. How does one append the words "and on" every 200 milliseconds using setInterval to the placeholder value in textarea, so that every .2 seconds "and on" keeps getting written until the user writes something. Feel free to take a look at this JSFiddle to clarify. (aesthetics are a bit messed up, but it get's the job done). Thanks and I really appreciate it! Also, I have tried to find similar questions and I haven't been able to find any. It would really help if someone would direct me towards them.

http://stackoverflow.com/comment/44355163
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27980836
has text: Does the call to `control` even run?

http://stackoverflow.com/comment/44408465
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28009947
has text: Well. So I think my code snnipet 2 suits for you. Just try it and update your questions and let me know if I can help.

http://stackoverflow.com/a/28008886
has body: You can check out the fiddle created here http://jsfiddle.net/uqxp4j73/ The code for this is as under var x='{ "head": { "vars": [ "name" , "email" ] } , "results": { "bindings": [ { "name": { "type": "literal" , "value": "aadil keshwani" } , "email": { "type": "literal" , "value": "name.surname@email.com" } } ] }}'; obj = JSON &amp;&amp; JSON.parse(x) || $.parseJSON(x); console.log(obj); console.log(obj["results"]["bindings"][0]["name"]["value"]); alert(obj["results"]["bindings"][0]["name"]["value"]); Hope this helps :)
has comment: http://stackoverflow.com/comment/44406330
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/28008790
answers question: http://stackoverflow.com/q/28008790
upvote count: 1
type: AcceptedAnswer
type: Answer

modal-dialog
tag name: modal-dialog
tags question: http://stackoverflow.com/q/28025460
tags question: http://stackoverflow.com/q/28112417
tags question: http://stackoverflow.com/q/28111350
tags question: http://stackoverflow.com/q/27990097
tags question: http://stackoverflow.com/q/28088441
type: Tag
tags question: http://stackoverflow.com/q/28052345
tags question: http://stackoverflow.com/q/28093859
tags question: http://stackoverflow.com/q/28000270
tags question: http://stackoverflow.com/q/27988833
tags question: http://stackoverflow.com/q/28034745
tags question: http://stackoverflow.com/q/28046789
tags question: http://stackoverflow.com/q/28067554

http://stackoverflow.com/comment/44496042
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/28057075
has text: @Octopus: There is no declaration, and there is no object. There's a function that is assigned to an undeclared variable.

http://stackoverflow.com/q/28109265
tagged with: jsf-2
tagged with: javascript
has title: JSF passthrough elements jsf:action javascript function
has answer: http://stackoverflow.com/a/28110226
score: 0
answer count: 1
has body: I'm using JSF 2.2 passthrough elements and I'd like to call both functions, jsf:action and jsf:onclick. I tryed a lot of ways to do it and none worked for me. The closest approach I got, was this way: HTML <f:ajax execute="@form" render="frmRedirect:frmNewHomeRedirect"/> [...] JS function clickHome(){ document.getElementById("frmRedirect:frmNavigation:btnHome").addClass("metro-btn-red"); document.getElementById("frmRedirect:frmNavigation:btnCadCli").removeClass("metro-btn-red"); document.getElementById("frmRedirect:frmNavigation:btnModel1").removeClass("metro-btn-red"); document.getElementById("frmRedirect:frmNavigation:btnModel2").removeClass("metro-btn-red"); } Note My JS it's in the HTML page, but either in external JS it didn't worked. The id related in the JS appers to be correct. I checked the DOM output. I also tryed to invoke click function in JS code. It didn't worked. Either tryed the HTML onclick, but this one erases the Mojarra click event ( jsf:action ). I found another anwser in this forum http://www.coderanch.com/t/211593/JSF/java/Calling-backingBean-method-javascripthttp://www.coderanch.com/t/211593/JSF/java/Calling-backingBean-method-javascript Guess what, it didn't worked too '_'. I'm missing something which I can't figure. I was thinking if there is a way to call my action from JS. Is there an way to do that without composing a new element? Thanks in advance. Update Trying the same in a new project: HTML Facelet Title <f:ajax execute="@form" render="frmRender"/> Back Bean import java.io.Serializable; import javax.enterprise.context.SessionScoped; import javax.inject.Named; @Named("cbMain") @SessionScoped public class TesteBean implements Serializable{ private int i = 0; public void doSomething(){ System.out.println( i++ ); } } And this is the generated lines in DOM: Click me It also didn't worked for me in a new and clean project.
type: UnansweredQuestion
tagged with: passthrough-elements
type: Question

http://stackoverflow.com/a/28414444
has body: That's work fine. You will have to change the links. It is quite simple, although at the beginning I was getting some problems. I wanted to put on jsfiddle.net but I couldn't point to the js and css files on github I don't know why..So I have just put the code. Hope this help
type: Answer
answers question: http://stackoverflow.com/q/28072443
score: 0

http://stackoverflow.com/a/28118231
has body: $(document).ready(function() { var count = 5; for (var i = 0; i < count; i++) { var clone = $('#template').clone(true).attr('id', ''); clone.find('.street').find('label').attr('for', 'street_' + (i+2)); clone.find('.street').find('label').find('span').html(i+2); clone.find('.street').find('input').attr('name', 'street_' + (i+2)); clone.find('.street').find('input').val(clone.find('.street').find('input').attr('name')); clone.find('.streetm2').find('label').attr('for', 'm2street_' + (i+2)); clone.find('.streetm2').find('label').find('span').html(i+2); clone.find('.streetm2').find('input').attr('name', 'm2street_' + (i+2)); clone.find('.streetm2').find('input').val(clone.find('.streetm2').find('input').attr('name')); $('.addresses').append(clone); } }); Mailing Address 1 - 1: Mailing Address 2 - 1:
type: Answer
answers question: http://stackoverflow.com/q/28117790
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/44610870
downvote count: 0

http://stackoverflow.com/q/28070394
has comment: http://stackoverflow.com/comment/44524940
score: 0
has comment: http://stackoverflow.com/comment/44520139
has title: How to forward AngularJS $http response to the browser?
answer count: 1
has comment: http://stackoverflow.com/comment/44525049
has comment: http://stackoverflow.com/comment/44521069
has comment: http://stackoverflow.com/comment/44521123
tagged with: angularjs
has body: I have a backend with header-based authentication and I want to download a file from it. With cookie-based authentication it is simple: you render a link to a file into &lt;a href...&gt; and let browser to handle the rest. I have this code: $http.get(url).then(function (response) { // do something }, function (response) { alert("ERROR"); }); I have injection of HTTP headers, so in this case $http.get will populate them for us. What I want to do is to feed this response to $window, so from user perspective it will looks like usual file download. Is there any way of doing this? Any other options are welcomed.
has answer: http://stackoverflow.com/a/28072422
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44564535
type: Question
accepted answer: http://stackoverflow.com/a/28072422
tagged with: javascript

http://stackoverflow.com/q/28098789
tagged with: excanvas
tagged with: internet-explorer-8
accepted answer: http://stackoverflow.com/a/28099894
score: 0
answer count: 1
tagged with: javascript
has body: if(/MSIE (\d+\.\d+); /.test(navigator.userAgent)) { var foo = document.getElementById('herd-reports-report-table-div'); var c = document.createElement('canvas'); c.setAttribute("width",800); c.setAttribute("height",400); c.setAttribute("class","mapping"); foo.appendChild(c); c = G_vmlCanvasManager.initElement(c); } else { var c = document.getElementById('herd-report-chart-canvas'); } var context = c.getContext('2d'); Let's say that I have this code executing in a function on load of a page, and I need a chart to be built. I have included excanvas, yet it won't work. IE8 throws an error at the last line. All I get is "null" error at the appendChild step. Or i get "Object is not supported by this property or method". I'm at my wit's end. I need this canvas to work in IE8. Somehow.
has comment: http://stackoverflow.com/comment/44574819
has title: excanvas refusing to work in IE8 despite executing in load event
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44573731
has answer: http://stackoverflow.com/a/28099894
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44574447
type: Question
tagged with: charts

http://stackoverflow.com/q/28091420
score: 0
has body: I am using IE8. Thus request to put solutions which work on IE8. The problem is age old. I have a big form in the jsp. User fills the form. Mistakenly presses the backspace on a uneditable textbox and the data entered is all lost. To warn the user, I wrote the following code: window.onbeforeunload = function() { return "Your work will be lost."; }; However, now this alert comes for all the links, menus and buttons as well along with the backspace key press even though the page unload is valid in these cases. I solved it for the hyperlinks by calling a function on onclick event: var link_was_clicked = false; window.onbeforeunload = function() { if(link_was_clicked){ return; } return "Your work will be lost."; }; var elements = document.getElementsByTagName('a'); for(var i = 0, len = elements.length; i &lt; len; i++) { elements[i].onclick = function () { link_was_clicked = true; } } This works as expected. However, I do not know how to do the same for the menus and the buttons on the page. I am using Array as a menu: var menus = new Array(); menus[0] = new menu( .. and so on Item getting added to the menu as: menus[0].addItem("javascript:loadMyHome();", "", 65, "left", "&amp;nbsp;MyHome", 0); The loadMyHome() is having submit: document.myFormName.submit(); Similarly, the buttons are defined as: &lt;INPUT TYPE="button" value="MyButton" onClick="funcMyButton()" /&gt; The funcMyButton() also has submit: document.myFormName.submit(); Thanks for reading!
tagged with: jsp
has answer: http://stackoverflow.com/a/28092340
tagged with: javascript
type: UnansweredQuestion
has title: Attaching event handling to menus and buttons
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/28092373
tagged with: internet-explorer-8